Lab Exercises )

Recommended reading from Numerical Recipes ("NR"):
 
Ch. 16, 17, 19.


Exercise 1.

As an example of a boundary value problem, suppose you launch a projectivile vertically upward from elevation y=0 m, and hit reaches a an altitude of 10 m at a time t=1 second after launch. Assuming a constant downward acceleration of a=-9.8 m/s^2, solve for the trajectory at 500 enenly spaced times between 0 and 1 s. Do this numerically and compare with the simple analytical result.

Exercise 2.

A metallic rod of length 0.1 m and thermal diffusivity D=2.3e-5 m^2/s (typical of steel) is at a uniform temperature of 20 C at time t = 0. One end of the rod (x=0) is fixed at that temp, and the other (x=0.1 m) is attached to a heat bath of T=100 C (Dirichlet boundary conditions). Evolve the temperature in time until steady-state heat flow is approximately reached. Use a straight-u[ explicit FD method. Be careful of the Courant condition!

Repeat for the case where the cooler end of the rod (x=0) is insulated.

Exercise 3.

Solve the case of the rod as above with Dirichlet boundary conditions, but this time using the Crank-Nikolson scheme.