hmwk_6_2010_solutions

# It is not as clear in the δ x 10 case this is due to

• Notes
• 18

This preview shows page 9 - 12 out of 18 pages.

It is not as clear in the Δ x = 10 case. This is due to the short time over which we iterate. If we were to continue iterating this solution past a time of 10 we would expect to see the large oscillations seen in the other two examples. We can see that there is some oscillation even in two time steps. At t = 10 the solution oscillates between negative and positive values. 9

Subscribe to view the full document.

0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 25 30 35 x y Example of a stable timestep for dx = 10, dt = 1 t=0 t=1 t=2 t=4 t=8 t=10 (a) Δ x = 10, Δ t = 1 0 5 10 15 20 25 30 35 40 45 50 -10 -5 0 5 10 15 20 25 30 35 x y Example of an unstable timestep for dx = 10, dt = 5 t=0 t=10 (b) Δ x = 10, Δ t = 5 0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 25 30 35 40 x y Example of a stable timestep for dx = 1 . 0, dt = 0 . 01 t=0 t=1 t=2 t=4 t=8 t=10 (c) Δ x = 1.0, Δ t = 0.01 0 5 10 15 20 25 30 35 40 45 50 -1.5 -1 -0.5 0 0.5 1 1.5 x 10 19 x y Example of an unstable timestep for dx = 1 . 0, dt = 1 t=0 t=1 t=2 t=4 t=8 t=10 (d) Δ x = 1.0, Δ t = 1 0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 25 30 35 40 x y Example of a stable timestep for dx = 0 . 1, dt = 0 . 0001 t=0 t=1 t=2 t=4 t=8 t=10 (e) Δ x = 0.1, Δ t = 0.0001 0 5 10 15 20 25 30 35 40 45 50 -1.5 -1 -0.5 0 0.5 1 1.5 x 10 38 x y Example of an unstable timestep for dx = 0 . 1, dt = 1 t=0 t=1 t=2 t=4 t=8 t=10 (f) Δ x = 0.1, Δ t = 1 Figure 9: Solutions at times 0, 1, 2, 4, 8, and 10 for aforementioned discretizations. 10
Problem 5 For this problem, we use a Crank-Nicolson scheme to solve the same heat conduction equation as in Problem 4. Applying this process and arranging knowns and unknowns gives us the following general equation (unknowns on left hand side, knowns on right hand side): - D Δ t x 2 T i - 1 ,j +1 + 1 + D Δ t Δ x 2 T i,j +1 - D Δ t x 2 T i +1 ,j +1 = D Δ t x 2 T i - 1 ,j +1 + 1 - D Δ t Δ x 2 T i,j +1 + D Δ t x 2 T i +1 ,j +1 As can be seen Figure 10, this method gives an unconditionally stable solution. The figure shows the solutions determined using Crank-Nicolson for the same timesteps that were used in problem 4. As expected, for the small time steps the solution is stable and very similar to the solutions in problem 4. However when we look at the solutions that were unstable in the explicit scheme we see that for Crank-Nicolson there is no instability. This is because Crank-Nicolson is unconditionally stable in time. However, large timesteps still effect the accuracy. This is most clearly seen in the the smaller Δ x cases. For Δ x = 1 . 0 and Δ t = 1 the solution diffuses as expected but there is a little dip at the point x = 25 that is not present in the solutions with smaller time step. Thus Crank-Nicolson is an unconditionally stable scheme, but care must be taken to choose a timestep that will provide an accurate solution. Note: It is not shown here but if slightly smaller time steps are chosen that would still be unstable in the explicit case much of the accuracy is regained. The timesteps chosen here are deliberately large to illustrate the possible effects of a large time step.

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