PDE assignment 3 Numerical Problems 1. (From Problem 1, Chapter 2, of Smith) Calculate a finite-difference solution of ut uxx 0 x 1, t 0 satisfying the initial condition u sinx when t 0 for 0 ≤ x ≤ 1 and u 0 at x 0,1 for t 0 Use the explicit method with x 0. 1, r 0.1. Compare to the answers in Smith to check that your code is working. Then compute with x 0. 01, r 0.1 and r 0. 5. Determine and plot the solution to t 0.01 and t 0.1 for each case. Do not provide all output, just the plots and the specific approximations where you computed the exact solutions. Show that a solution of the PDE, satisfying the BC’s and IC’s is Ux, t e−2t sinx Verify the accuracy of your numerical approximations at t 0. 005, t 0.01 and t 0.1 for x 0.2 and x 0.5 2. Showthat theCrank-Nicholsonschemeisconsistentandthat thelocal truncationerrorat the point ih, jk of the Crank-Nicholson approximation to Ut Uxx is of order Oh2 Ok2. Then under the assumption that the scheme is unconditionally stable, prove that the solutions of the Crank-Nicholson scheme will converge to the true solution of the heat equation. 3. Provide the detail to show why the result of p. 56 of Smith proves that the Crank-Nicholson Scheme is unconditionally stable. That is, demonstrate why the spectral radius is as indicated and why it must be less than 1. See “challenge problem” below. 4. An alternate notation for writing out finite difference schemes employs the discrete differential operators, of order two xUi, j Ui 12 , j − Ui− 12 , j x 2Ui, j Ui1, j − 2Ui, j Ui−1, j The difference equation 1 − 12 r − 16 x 2 Ui, j1 1 12 r 16 x 2 Ui, j gives the Douglas formula. Explicitly write out the Douglas formula in a form that allows us to write out the equivalent matrix formulation of the method. Also, write out the matricies for the formula. 5. Determine the matrix formulation of the Crank-Nicholson Scheme (e.g., BUj1 CUj bj. Explicitlywrite out thematricies B,C and the vector b. 1 6. Develop the Crank-Nicholson equations for the problem in exercise 1 of Smith except with r k/h, x 0. 1, r 0.5 . Solve them directly for two time-steps. Evaluate the corresponding analytical solution and calculate the absolute and relative errors in the numerical solution at the second time step for x 0.2 and x 0.5. Compare the result of this problem at t 0.1 to the solution determined by the explicit method for the same r value. Discuss any observations. 7. (See problem 7 of Smith Chapter 2) A uniform solid rod of one-half a unit of length is thermally insulated along its length and its initial temperature at zero time is 0°C. One end is thermally insulated and the other supplied heat at a steady rate. Show that the subsequent temperatures at points within the rod are given, in non-dimensional form, by the solution of the equation ∂U ∂t ∂2U ∂x2 0 x 12 , t 0 satisfying the initial condition U 0 when t 0 0 ≤ x ≤ 12 and the boundary conditions ∂U ∂x 0 at x 0, t 0, ∂U ∂x f at x 12 , t 0 where f is a constant. Solve this problem numerically for f 1, to t 1. 0, using a. theexplicitmethodwith x 0. 01, r 14 b. theCrank-Nicholsonmethodwithx 0. 01, r 1.0 Display tables of heat values for times t 0. 01, 0. 05, 0. 1, 0. 5, 1.0 for both methods. Plot the solutions through t 1.0 (3-D plots), 1 plot for each method. The analytical solution of the PDE is U 2t 12 12×2 − 1 6 − 2 2 Σ n1 e−42n2t cos2nx 2 tΣn0 i erf c 2n 1 − 2x 4 t i erf c 2n 1 2x 4 t Compare the true solution at x 0.3 for t 0. 01, 0. 05, 0. 1, 0. 5, 1.0 to the approximate solutions from parts a. and b. above Here “compare” is most easily done by creating a small table with the analytical solution, explicit method solution and associated relative error, the C-N solution and its relative error. Discuss your observations. 8. Complete problem 6 of Smith Chapter 2. 9. Complete problem 13 of Smith Chapter 2. 2 Challenge Problem Using the cool fact about eigenvalues of a tridiagonal matrix, prove that the Crank-Nicholson difference approximation to the heat equation is unconditionally stable. Recall, the eigenvalues of an N N tridiagonal matrix are: i a 2 bc cos i N 1 , i 1, . . . ,N where a,b and c may be real or complex numbers and each full row of the matrix has these constants in the order: c b a. 3

PDE assignment 3 Numerical Problems 1. (From Problem 1, Chapter 2, of Smith) Calculate a finite-difference solution of ut uxx 0 x 1, t 0 satisfying the initial condition u sinx when t 0 for 0 ≤ x ≤ 1 and u 0 at x 0,1 for t 0 Use the explicit method with x 0. 1, r 0.1. Compare to the answers in Smith to check that your code is working. Then compute with x 0. 01, r 0.1 and r 0. 5. Determine and plot the solution to t 0.01 and t 0.1 for each case. Do not provide all output, just the plots and the specific approximations where you computed the exact solutions. Show that a solution of the PDE, satisfying the BC’s and IC’s is Ux, t e−2t sinx Verify the accuracy of your numerical approximations at t 0. 005, t 0.01 and t 0.1 for x 0.2 and x 0.5 2. Showthat theCrank-Nicholsonschemeisconsistentandthat thelocal truncationerrorat the point ih, jk of the Crank-Nicholson approximation to Ut Uxx is of order Oh2 Ok2. Then under the assumption that the scheme is unconditionally stable, prove that the solutions of the Crank-Nicholson scheme will converge to the true solution of the heat equation. 3. Provide the detail to show why the result of p. 56 of Smith proves that the Crank-Nicholson Scheme is unconditionally stable. That is, demonstrate why the spectral radius is as indicated and why it must be less than 1. See “challenge problem” below. 4. An alternate notation for writing out finite difference schemes employs the discrete differential operators, of order two xUi, j Ui 12 , j − Ui− 12 , j x 2Ui, j Ui1, j − 2Ui, j Ui−1, j The difference equation 1 − 12 r − 16 x 2 Ui, j1 1 12 r 16 x 2 Ui, j gives the Douglas formula. Explicitly write out the Douglas formula in a form that allows us to write out the equivalent matrix formulation of the method. Also, write out the matricies for the formula. 5. Determine the matrix formulation of the Crank-Nicholson Scheme (e.g., BUj1 CUj bj. Explicitlywrite out thematricies B,C and the vector b. 1 6. Develop the Crank-Nicholson equations for the problem in exercise 1 of Smith except with r k/h, x 0. 1, r 0.5 . Solve them directly for two time-steps. Evaluate the corresponding analytical solution and calculate the absolute and relative errors in the numerical solution at the second time step for x 0.2 and x 0.5. Compare the result of this problem at t 0.1 to the solution determined by the explicit method for the same r value. Discuss any observations. 7. (See problem 7 of Smith Chapter 2) A uniform solid rod of one-half a unit of length is thermally insulated along its length and its initial temperature at zero time is 0°C. One end is thermally insulated and the other supplied heat at a steady rate. Show that the subsequent temperatures at points within the rod are given, in non-dimensional form, by the solution of the equation ∂U ∂t ∂2U ∂x2 0 x 12 , t 0 satisfying the initial condition U 0 when t 0 0 ≤ x ≤ 12 and the boundary conditions ∂U ∂x 0 at x 0, t 0, ∂U ∂x f at x 12 , t 0 where f is a constant. Solve this problem numerically for f 1, to t 1. 0, using a. theexplicitmethodwith x 0. 01, r 14 b. theCrank-Nicholsonmethodwithx 0. 01, r 1.0 Display tables of heat values for times t 0. 01, 0. 05, 0. 1, 0. 5, 1.0 for both methods. Plot the solutions through t 1.0 (3-D plots), 1 plot for each method. The analytical solution of the PDE is U 2t 12 12×2 − 1 6 − 2 2 Σ n1 e−42n2t cos2nx 2 tΣn0 i erf c 2n 1 − 2x 4 t i erf c 2n 1 2x 4 t Compare the true solution at x 0.3 for t 0. 01, 0. 05, 0. 1, 0. 5, 1.0 to the approximate solutions from parts a. and b. above Here “compare” is most easily done by creating a small table with the analytical solution, explicit method solution and associated relative error, the C-N solution and its relative error. Discuss your observations. 8. Complete problem 6 of Smith Chapter 2. 9. Complete problem 13 of Smith Chapter 2. 2 Challenge Problem Using the cool fact about eigenvalues of a tridiagonal matrix, prove that the Crank-Nicholson difference approximation to the heat equation is unconditionally stable. Recall, the eigenvalues of an N N tridiagonal matrix are: i a 2 bc cos i N 1 , i 1, . . . ,N where a,b and c may be real or complex numbers and each full row of the matrix has these constants in the order: c b a. 3

This content is for CheckYourstudy.com Members members only.Kindly register or Login to see content or contact +1 909 666-5988. Log InRegister