Sie sind auf Seite 1von 2

EGM 6342, CFD

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)

EGM 6342, CFD


For Project #3, below are some comments and hints:
1. Remember that now in Project #3 you are solving a non-linear convection term whereas in
Project #2 you were solving a linear convection term.
2. The implementation is similar to Project #2 except the non-linearity (now the coefficient
matrix is a function of the solution variable u). You will use the finite volume method (FVM)
similar to what you did in Project #2. Do not get confused by some of the class notes where I
have used the finite difference method (FDM) to illustrate the various time discretization
schemes.
3. Remember that, in the FVM, we integrate the differential equation (in space) over a control
volume. The diffusion term is implemented just like in Project #2.
4. The convective flux after integration is now uu on any control volume interface. At the "e"
face it is written as ( u)e ue Feue and treated in two steps:
(a) Fe ( u)e at any interface is the mass flux and is always averaged from control point values:
Fe u e

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

Das könnte Ihnen auch gefallen