Up: Return
EML 5725 Computational Fluid Dynamics Spring 2003
Groups Project 2
- 1.
- Fix all problems with respect of neatness, comments, error
evaluation, exact solution drawing, etc with your previous program.
- 2.
- Copy it into a new file cn.f, cn.cpp, or whatever,
and copy ftcs.in into cn.in.
- 3.
- Change the cn files to use the Crank-Nicholson finite
difference formula instead of the forward-time, central-space
(simple explicit) scheme. See the supporting material page
for helpful subroutines. From now on, restrict yourself to the
case that V1=1.
- 4.
- You will need to replace the specification of
by specification of a
. Figure out the value of p for which the CN is scheme is the most
accurate for a given number of points. Then test various values of
C to figure out for which value of C the scheme is most accurate
for the same number of computed points.
- 5.
- Copy the cn files into mf files, and change the
Crank-Nicholson formula into the Mitchell-Fairweather one.
(To get the MF scheme, replace the second order accurate approximations
of the second order x-derivatives by fourth order accurate compact
ones. Then multiply the entire finite difference formula by the
factor that gets rid of the operators in the bottoms of the compact
finite difference formula, and write out in terms of mesh point
values.
- 6.
- You will need to replace the specification of
by one of the form
. Figure out the value of q for which the MF is scheme is the most
accurate for a given number of points. Then test various values of
D to figure out for which value of D the scheme is most accurate
for the same number of computed points.
- 7.
- Hold a competition between the FTCS scheme at N=1/6, the CN
scheme, and the MF scheme to see what method can achieve a maximum
error at t=0.5 of 0.01 with the least number of total points
computed. Same for a maximum error of 0.001, and of 0.0001,
and of 0.00001, and of 0.000001.
Hand in the MF code only, and ensure it is extremely neat and very
solidly commented. Add evidence supporting the values of p, q,
C, and D. Also hand in tables of spatial and temporal number of
points, total number of points, and actual maximum error showing the
results of the requested competition. Comment on all results.
Up: Return