hmwk_6_2010_solutions

# E the error versus the grid spacing for the three

• Notes
• 18

This preview shows page 5 - 10 out of 18 pages.

(e) The error versus the grid spacing for the three coarse grids is shown in Figure 8. As can be seen the slope of this curve is approximately 2 on the log-log scale. This makes sense since it is a second order accurate solution. Also, note that the slope is further away from two for coarser grid spacings. 5

Subscribe to view the full document.

0 2 4 6 8 10 -20 0 20 40 60 80 100 120 140 160 x y(x) Difference from Δ x = 0 . 001 solution dx=2.5 Figure 4: Difference between Δ x = 2 . 5 and Δ x = 0 . 001 0 2 4 6 8 10 -4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 x y(x) Difference from Δ x = 0 . 001 solution dx=0.5 Figure 5: Difference between Δ x = 0 . 5 and Δ x = 0 . 001 6
0 2 4 6 8 10 -0.16 -0.14 -0.12 -0.1 -0.08 -0.06 -0.04 -0.02 0 x y(x) Difference from Δ x = 0 . 001 solution dx=0.1 Figure 6: Difference between Δ x = 0 . 1 and Δ x = 0 . 001 Figure 7: Differences between each of the Δ x = 2.5, Δ x = 0.5, and Δ x = 0.1 solutions and the finer Δ x = 0.001 solution. 7

Subscribe to view the full document.

10 -1 10 0 10 1 10 -2 10 -1 10 0 10 1 10 2 10 3 Δ x RSME Log-Log plot of error m = 2.668 m = 2.0013 Figure 8: RMSEs for each of the Δ x = 2.5, Δ x = 0.5, and Δ x = 0.1 solutions. 8
Problem 4 For this problem, we use an explicit in time, central in space finite difference discretization to solve the heat conduction equation: ∂T ∂t = ∂x D ∂T ∂x 0 x ‘50 With the following initial conditions: T ( x ) = 40 25 x, 0 x 25 T ( x ) = 80 - 40 25 x, 25 x 50 And the following boundary conditions: T (0) = 0 T (50) = 0 And D = 25. With this, our forward in time approximation for the first derivative in time is as follows: ∂T ∂t = T i,j +1 - T i,j Δ t Given that D is a constant it can be pulled out of the derivative such that we have: ∂x D ∂T ∂x = D 2 T ∂x 2 The central type approximation in space is as follows: 2 T ∂x 2 = T i +1 ,j - 2 T i,j + T i - 1 ,j x ) 2 Plugging these into the heat conduction equation yields: T i,j +1 - T i,j Δ t = D T i +1 ,j - 2 T i,j + T i - 1 ,j x ) 2 Solving for the unknown T i,j +1 represents the solution at the i th node and the ( j + 1) th time level. T i,j +1 = Δ tD x ) 2 T i +1 ,j + 1 - tD x ) 2 T i,j + Δ tD x ) 2 T i - 1 ,j We the solve this problem for spacial discretization of size 10, 1.0, and 0.1. In each case, we note that in order for the solution to remain stable, the following inequality must be satisfied: Δ t 1 2 x ) 2 D This implies that the discretizations of 10, 1.0, and 0.1 require time steps less than or equal to 2, 0.02, and 0.0002, respectively. We choose choose timesteps of 1, 0.01, and 0.0001 to demonstrate a stable solution and choose timesteps of 5, 1 and 1 respectively to demonstrate unstable solutions. The plots for these runs can be seen in Figure 9. In all of the stable runs the solution retains its shape and diffuses in a manner we would expect. Clearly the more coarse Δ x = 10 solution is less accurate. We can see that the top corner of the initial condition is chopped off. As for the unstable solutions it is very clear in the Δ x = 1 and Δ x = 0 . 1 cases that the solution is unstable. The solutions are oscillatory and are increasing towards infinity in value.

Subscribe to view the full document.

You've reached the end of this preview.
• Fall '08
• Westerink,J
• Trigraph, yn, Yi, dx, ∆x

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern