DOC PREVIEW
CSUN ME 501A - Homework Solutions

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

College of Engineering and Computer ScienceMechanical Engineering DepartmentMechanical Engineering 501ASeminar in Engineering AnalysisFall 2004 Number: 17472 Instructor: Larry CarettoNovember 30 Homework SolutionsHoffman, page 494, problem 64 – Solve problem 58 by the second order equilibrium method.We first convert the differential equation into a finite difference equation, using second-order expressions for the derivatives: dy/dx = (yn+1 – yn-1)/(2h) and d2y/dx2 = (yn+1 + yn-1 – 2yn)/h2. This gives the following finite difference equation.   1121211211nnnnnnnnyxhyyxhyyyMultiplying this equation by h2 and rearranging gives the following result.  212121112211 hyxhyhxyxhnnnnnnThis is a set of equations that we can use to solve for the y values. From the initial condition that y(0) = 1 we have y0 = 1 so that the initial equation in the set becomes.  211211211121201221121xhhyxhhyxhyhxWe can use the second-order backwards difference equation1 to obtain a finite-difference equivalent of the zero gradient boundary condition at x = 1. This is the last grid node, corresponding to n = N.21212340234NNNNNNxxyyyhyyydxdyNWith h = 0.125, the boundary node at x = 1 is N = 8. We have almost a tridiagonal system, but in such a system the last equation can only have two unknowns, yN-1, and yN. We have two equations that involve the last three unknowns. In addition to the zero gradient equation above, we also have the general finite-difference equation for n = N – 1 = 7; this equation is shown below.  2877276721112211 hyxhyhxyxh We can combine the equation above with the zero gradient equation to obtain a new equation that has only y7 and y8 as unknowns. To do this we write the zero gradient equation for N = 8 and1 This equation was presented in the class notes and is equation 5.101 on page 271 of Hoffman.Engineering Building Room 1333 Mail Code Phone: 818.677.6448Email: [email protected] 8348 Fax: 818.677.7062use the result to eliminate y6 from the two equations. Substituting the zero gradient equation for y6 into the above equation gives.    2877278772111234211 hyxhyhxyyxh The algebraic manipulation below gives us an equation that we can use as the last equation in a tridiagonal system of equations.    28777727213321112412 hyxhxhyxhhx      287727122212 hyxhyhhx We still have to use the equation   877276721112211 yxhyhxyxh= h2 asone of our equations. The purpose of the algebraic manipulations above was to convert one pair of equations, both of which had three variables, into an equivalent pair of equations, one of which has only two variables.We now have a set of linear equations that forms a tridiagonal matrix with the general equation Anyn-1 + Bnyn + Cnyn+1 = Dn. For all equations except the first (n = 1) and last (n = 8) equations, these coefficients are defined as follows. 2221112211 hDxhChxBxhAnnnnnnnFor the constant step size used here, xn = nh.The first and last equations in the set were derived above. The first equation has no A coefficient and the last equation has no C coefficient. The values of the other coefficients for the first and last equations are 2112111212111211xhhDxhChxB   2878278122212 hDxhBhhxA We can use the Thomas algorithm for applying Gauss elimination to a tridiagonal system of equations. In this algorithm we compute values of Fn and En for a back-substitution process usingthe following initial equations: E1 = -C1/B1 and F1 = D1/B1. The remaining values of En and Fn are found from the following equations.111 nnnnnnnnnnnnEABFADFandEABCEThe last value of y, yN – in this problem, N = 8 – is found from the following equation.Engineering Building Room 1333 Mail Code Phone: 818.677.6448Email: [email protected] 8348 Fax: 818.677.706211NNNNNNNEABFADyThe various coefficients and the solution by back substitution, yn = Fn + En yn+1 are shown in the table below.n xnAnBnCnDnEnFnyn0 0 11 0.125 -1.98242 1.070313 -0.91406 0.539901 0.461084 0.6169452 0.25 0.921875 -1.98047 1.078125 0.015625 0.727113 0.276134 0.2886853 0.375 0.914063 -1.97852 1.085938 0.015625 0.826506 0.180212 0.0172624 0.5 0.90625 -1.97656 1.09375 0.015625 0.891009 0.120315 -0.197165 0.625 0.898438 -1.97461 1.101563 0.015625 0.938224 0.078759 -0.356316 0.75 0.890625 -1.97266 1.109375 0.015625 0.97566 0.047949 -0.463717 0.875 0.882813 -1.9707 1.117188 0.015625 1.007039 0.024072 -0.524428 1 1.560547 -1.53125 0.015625 -0.54466 -0.54466The two approaches are seen to give significant differences. To determine which method is more accurate for this problem I ran the calculation using h = 0.005 and constructed the following table which compares the two methods for different grid sizes. The two methods give approximately the same results, to three significant figures, for N = 200; these presumably more accurate resultsare closer to the shoot-and-try method than to the finite-difference approach. This confirms that the shoot-and-try method is usually more accurate for boundary value problems in ordinary differential equations.xN = 8 N = 200FinitedifferencesShoot-and-tryFinitedifferencesShoot-and-try0 1 1 1 10.125 0.61695 0.57307 0.59250 0.592420.25 0.28868 0.20780 0.22739 0.227240.375 0.01726 -0.09345 -0.07474 -0.074940.5 -0.19716 -0.33045 -0.31352 -0.313770.625 -0.35631 -0.50520 -0.49075 -0.491030.75 -0.46371 -0.62172 -0.61019 -0.610490.875 -0.52442 -0.68578 -0.67736 -0.677661 -0.54466 -0.70445 -0.69910 -0.69941No statement is implied in this table about the relative accuracy of the two methods for N = 200. If we solved the equation using N = 20000 and compared both solutions for N = 200 to the N = 2000 grid, we would expect the shoot-and-try to be more accurate. Of course, this accuracy


View Full Document
Download Homework Solutions
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Homework Solutions and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Homework Solutions 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?