Beruflich Dokumente
Kultur Dokumente
PROJECT 3
(Purpose: implementation and assessment of different time-discretization schemes:
(a) explicit, (b) fully implicit, (c) Crank-Nicolson)
Consider the following equation:
u
u uu , 0 x 1 , 1, 0.1
t
x
x x
Boundary conditions:
u x 0, t 0.11 sin 6t
Initial condition:
u x 1, t 1.0
u x, t 0 0
Write a computer program to obtain the numerical solution to the above equation:
Use the second-order central difference scheme in space (for both the
convection and diffusion terms) using the finite volume method.
Use the following three time-integration schemes:
(a) Explicit
(b) Fully implicit
(c) Crank-Nicolson
Use a uniform mesh with N=50.
Make sure the residue at each time step is reduced to a low level.
(a) Obtain the solution at t=5, 10 and 20 using t=0.01, 0.05, 0.1, 0.25 and 0.5.
Plot the solutions for all three time instances with all three time-integration
schemes.
(b) At t=20, assuming the solution with t=0.01 to be the exact solution, obtain
the error in the other numerical solutions and plot the error versus t on a log-log
plot. Critically examine the plot and comment on the behavior of the error.
(also see next page)
1
u P u E
2
This Fe ( u)e is used as the direction of the upwind (though in Project #3 you are only using
central difference scheme and so dont need to worry about the upwind direction).
(b) Then the second part of ( u )e ue , i.e., ue is evaluated by the scheme you pick (i.e., FOU,
SOU, central, QUICK, etc.). Here you are asked to use only the central difference scheme.
5. There are 5 major aspects to this project:
(a) FVM implementation for non-linear equation
(b) Crank-Nicolson scheme in time
(c) Central difference in space
(d) Outer iteration
(e) Tri-diagonal matrix algorithm (TDMA) within each outer iteration