Up: Return
EGN 5456 Project Fall 1999
This project is 25% of your grade.
Solve the following convection equation:
ut + a ux + b uy = u
with a=2 and b=0.5, in a rectangular domain of length and
height h=1, for . Take as initial condition:
and as boundary conditions:
Derive the exact solution for the P.D.E. in general and in particular
for this special case.
Then write a Peaceman-Rachford scheme to compute a finite difference
solution.
Optimize the ratio of mesh size to time step for a given
computational effort (= points computed) to give best results for a
given effort.
Next create a Mitchell-Fairweather scheme from the Peaceman-Rachford
one.
Optimize the ratio of square mesh size to time step for the
same computational effort as for the Peaceman-Rachford scheme to
give the best results.
See whether the Mitchwell-Fairweather scheme gives better results than
the Peaceman-Rachford
Increase the effort by a factor 10 and compare again.
Program requirements:
- One input file. No exceptions.
- One output file (additional output files for plotting as
needed permitted.) No exceptions.
- Read from the input file and print to the output file: a, b,
, h, , , maximum Courant
number (taken as
1), , and the (taken as 5) desired output times (0, 0.25, 0.5, 0.75, 1).
No exceptions.
- All input variables checked for proper sign, value, whether
program limits are exceeded, etcetera.
- Program must work correctly when the parameters in the input
file are changed. No exceptions.
- Exactly the following subroutines/functions (no more, no less,
no exceptions):
- main does the actual initialization and time advance.
- output does the output of the computed solution at
the requested times and writing to the plot files.
- exact is the exact solution, and should be used to set
the initial and physical boundary conditions.
No exceptions.
- Each subroutine/function in a separate file. A makefile
must also be provided.
- The only two-dimensional, (j,l), array storage that may be used are
, , and . All other storage must be scalar or one-dimensional. No exceptions.
- The coefficients of the tridiagonal system may not be stored in
an array, only the processed bidiagonal coefficients C* and D*
may be stored as arrays. No exceptions.
- No common blocks. No exceptions.
- No reading from the input file except in main. No exceptions.
- All array storage declared in main using symbolic constants
(C) or parameters (Fortran) for the bounds. No exceptions.
- Print out rms and maximum errors whenever output is done.
- No large tables of numbers.
- Heavily commented so that anybody can easily read, understand,
and modify it.
- One time march from 0 to 1 does all five output times. No
exceptions.
- Extremely neat.
- Satisfies good programming requirements.
If any requirement marked as ``No exceptions'' is not met, the
maximum assigned for the program is 10%. (Total for the project
50% or less.)
Contour lines of constant temperature are a good way to plot the
temperature evolution. Otherwise you might want to plot the
temperature evolutions at and the ones at
as six individual graphs.
Up: Return
Author: Leon van Dommelen