0% found this document useful (0 votes)
56 views7 pages

Time-Dependent Methods SPRING 2005: Source Flux Net Amount T

This document discusses numerical methods for solving time-dependent partial differential equations, which are important for time-dependent computational fluid dynamics (CFD) simulations. It describes one-step and multi-step time-marching methods, including explicit methods like forward differencing and implicit methods like backward differencing. The document focuses on first-order accurate one-step methods like Euler, Runge-Kutta, and Crank-Nicolson that are commonly used in CFD due to their lower computational cost compared to higher-order multi-step methods. Stability criteria involving the Courant number are also discussed for different methods.

Uploaded by

Vinay Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views7 pages

Time-Dependent Methods SPRING 2005: Source Flux Net Amount T

This document discusses numerical methods for solving time-dependent partial differential equations, which are important for time-dependent computational fluid dynamics (CFD) simulations. It describes one-step and multi-step time-marching methods, including explicit methods like forward differencing and implicit methods like backward differencing. The document focuses on first-order accurate one-step methods like Euler, Runge-Kutta, and Crank-Nicolson that are commonly used in CFD due to their lower computational cost compared to higher-order multi-step methods. Stability criteria involving the Courant number are also discussed for different methods.

Uploaded by

Vinay Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

CFD 6-1 David Apsley

6. TIME-DEPENDENT METHODS SPRING 2005



6.1 The time-dependent scalar transport equation
6.2 One-step methods
6.3 Multi-step methods
6.4 Uses of time-marching in CFD
6.5 Summary


6.1 The Time-Dependent Scalar-Transport Equation

The time-dependent scalar-transport equation for an arbitrary control volume is
source flux net amount
t
= + ) (
d
d
(1)
where:
amount V = quantity in a cell
flux is the rate of transport through a cell face


In Section 4 it was shown how the discretisation of flux and source terms led to

P
F
F F P P
b a a source flux net =

(2)
In this Section the time derivative will be discretised.


We first examine numerical methods for the general first-order differential equation
F
t
=

d
d
(3)
where F is an arbitrary function of t and . Then we extend the methods to CFD.


Initial-value problems of the form (3) are solved by time-marching.
There are two main types of method:


one-step methods: use the value from the previous time level
only;






multi-step methods: use values from several previous times.

t

old
new
t t
old new

t

t

t
(n)

(n)

(n-1)

(n-2)

(n-3)
t
(n-1)
t
(n-2)
t
(n-3)


CFD 6-2 David Apsley
6.2 One-Step Methods

For the first-order differential equation
F
t
=

d
d
(3)
the one-step problem is:
given at time t
(n-1)
compute at time t
(n)


The following notation is used:
identify everything at t
(n-1)
by a superscript old this is what we currently know;
identify everything at t
(n)
by a superscript new this is what we seek.

By integration of (3), or from the figure above,
t F
av
old new
+ = (4)
or
t F
av
= (5)
These are exact. However, since the average derivative, F
av
, isnt known until the solution
is known, it must be estimated.


6.2.1 Simple Estimate of Derivative

This is the commonest class of time-stepping scheme in general-purpose CFD. There are
three obvious methods of making a single estimate of the average derivative.

Forward Differencing
(Euler Method)
Take F
av
as the derivative at the
start of the time-step:
Backward Differencing
(Backward Euler)
Take F
av
as the derivative at
the end of the time-step:
Centred Differencing
(Crank-Nicolson)
Take F
av
as the average of
derivatives at the beginning and end.

t F
old old new
+ =

t F
new old new
+ =


t F F
new old old new
) (
2
1
+ + =
t

old
new
t t
old new

t

old
new
t t
old new

t

old
new
t t
old new
t
1
2 t
1
2

For:
Easy to implement because
explicit (the RHS is known).
For:
In CFD, no time-step
restrictions;
For:
Second-order accurate in t.
Against:
Only first-order in t;
In CFD, stability imposes
time-step restrictions.
Against:
only first-order in t;
implicit (although, in CFD,
no more so than steady case).
Against:
Implicit;
In CFD, stability imposes time-
step restrictions.

t

old
new
t t
old new

t


CFD 6-3 David Apsley
Classroom Example
The following differential equation is to be solved on the interval [0,1]:
1 ) 0 ( ,
d
d
= =

t
t

Solve this numerically, with a step size t = 0.2 using:
(a) Forward differencing;
(b) Backward differencing;
(c) Crank-Nicolson.
Solve the equation analytically and compare with the numerical approximations.


6.2.2 Refined Methods
For equations of the form F
t
=

d
d
, improved solutions may be obtained by making
successive estimates of the average gradient. Important examples include:

Modified Euler Method (2 function evaluations)

) (
) , (
) , (
2 1 2
1
1 2
1
+ =
+ + =
=
t t F t
t F t
old old
old old


Runge-Kutta (4 function evaluations)

) 2 2 (
) , (
) , (
) , (
) , (
4 3 2 1 6
1
3 4
2
1
2 2
1
3
2
1
1 2
1
2
1
+ + + =
+ + =
+ + =
+ + =
=
t t F t
t t F t
t t F t
t F t
old old
old old
old old
old old


For scalar , such methods are popular. Runge-Kutta is probably the most widely-used
method in engineering. However, in CFD, and F represent vectors of nodal values and
calculating the derivative F (evaluating flux and source terms) is very expensive. The
majority of CFD calculations are performed with the simpler methods of 6.2.1.


6.2.3 Application of One-Step Methods to CFD

General scalar-transport equation:
0 ) (
d
d
= + source flux net V
t
P
(6)
For one-step methods the time derivative is always discretised as

t
V V
V
t
old
P
new
P
P
) ( ) (
) (
d
d
(7)
Flux and source terms could be discretised at any particular time level as

P F F P P
b a a source flux net =

(8)
Different time-marching schemes arise from the time level at which (8) is evaluated:

CFD 6-4 David Apsley
Forward Differencing
[ ] 0
) ( ) (
= +

old
P F F P P
old
P
new
P
b a a
t
V V

Rearranging, and dropping any new superscripts as tacitly understood:

old
F F P P P P
a b a
t
V
t
V
(

+ + =

) ( (9)

Assessment.
Explicit; no simultaneous equations to be solved.
Timestep restrictions; for stability a positive coefficient of
old
p
requires 0
P
a
t
V
.


Backward Differencing
[ ] 0
) ( ) (
= +

new
P F F P P
old
P
new
P
b a a
t
V V

Rearranging, and dropping any new superscripts:

old P
P F F P P
t
V
b a a
t
V
) ( ) (

+ = +

(10)

Assessment.
Straightforward to implement; amounts to a simple change of coefficients:

old
P P P P
t
V
b b
t
V
a a ) ( + + (11)
No timestep restrictions.


Crank-Nicolson
[ ] [ ] 0
) ( ) (
2
1
2
1
= + +


new
P F F P P
old
P F F P P
old
P
new
P
b a a b a a
t
V V

Rearranging, and dropping any new superscripts:

old
F F P P P P F F P P
a b a
t
V
b a a
t
V
(

+ + + = +

) ( ) ( ) (
2
1
2
1
2
1
2
1
2
1

or, multiplying by 2 for convenience:

old
F F P P P P F F P P
a b a
t
V
b a a
t
V
(

+ + + = +

) ( ) 2 ( ) 2 ( (12)

Assessment.
Fairly straightforward to implement; amounts to a change of coefficients:

old
F F P P P P P P P
a b a
t
V
b b
t
V
a a
(

+ + + +

) ( ) 2 ( , 2 (13)
Timestep restrictions; for stability, a positive coefficient of
old
p
requires 0 2
P
a
t
V
.


CFD 6-5 David Apsley

In general, weightings 1 and can be applied to derivatives at each end of the time step:

old new
P
F F V
t
) 1 ( ) (
d
d
+ (14)
This includes the special cases of Forward Differencing ( = 0), Backward Differencing
( = 1) and Crank-Nicolson ( = ).

For 0 this so-called method can be implemented by a simple change in matrix
coefficients. For 1 (i.e. anything other than fully-implicit Backward-Differencing),
stability requires a timestep restriction

old
P
a
V
t ) (
1
1

< (15)


Example. Consider a 1-d time-dependent advection-diffusion problem
S
x
u
x t
=

) ( ) (
with the first-order upwind advection scheme on a uniform grid of spacing x, it is readily
shown that at any time-level the coefficients in the flux-source discretisation are
C D a a a D a C D a
E W P E W
+ = + = = + = 2 , ,
where the mass flow rate C and diffusive transfer coefficient D are given by

x
A
D uA C , = =
In the 1-d case the cross-sectional area A = 1 and the time-step restriction (15) becomes

1
1
) (
2
2

< +
x
t u
x
t


Special cases are:
explicit (forward differencing; = 0) and pure diffusion (u = 0):
2
1
) (
) / (
2
<
x
t

explicit (forward differencing; = 0) and pure advection ( = 0): 1 <
x
t u

implicit (backward differencing; = 1): no restrictions.


Courant Number

The Courant number c is defined by:

x
t u
c = (16)
It can be interpreted as the ratio of distance of travel in one time step (u t) to the mesh
spacing x.

For the fully-explicit method the Courant-number restriction c < 1 means that the distance
which information can be advected in one time step should not exceed the mesh spacing.

The Courant-number restriction is only slightly milder when = (Crank-Nicolson).

CFD 6-6 David Apsley
6.3 Multi-Step Methods

One-step methods use only information about the
derivative at time levels t
(n-1)
and t
(n)
to calculate (d/dt)
av
.

Multi-step methods use the values of at earlier time levels
as well: t
(n-2)
, t
(n-3)
, ... .



One example is Gears method:

t t
n n n
n
2
4 3
d
d
) 2 ( ) 1 ( ) (
) (

+
=
|
.
|

\
|
(17)
This is second-order in t; (exercise: prove it).

A wider class of schemes is furnished by so-called predictor-corrector methods which refine
their initial prediction with one (or more) corrections. A popular example of this type is the
Adams-Bashforth-Moulton method:
predictor: ] 55 59 37 9 [
1 2 3 4
24
1
1
+ + + =
n n n n n n
pred
F F F F t
corrector: ] 9 19 5 [
1 2 3
24
1
1 n
pred
n n n n n
F F F F t + + + =



Just as three-point advection schemes permit greater spatial accuracy than two-point schemes,
so the use of multiple time levels allows greater temporal accuracy. However, there are a
number of disadvantages which make their application comparatively rare in CFD:
Storage. Each computational variable has to be stored at all nodes at each time level.
Start-up. Initially, only data at time t = 0 is available; the first step inevitably requires
a single-step method.


6.4 Uses of Time-Marching in CFD

Time-dependent schemes are used in two ways:
for a genuinely time-dependent problem;
or
for time marching to steady state.

In case (1) accuracy and stability often impose restrictions on the time step and hence how
fast one can advance the solution in time. Because all nodal values must be updated at the
same rate the time step t is global; i.e. the same at all grid nodes.

In case (2) one is not seeking high accuracy so one simply adopts a stable algorithm, usually
Backward Differencing. Alternatively, if using an explicit scheme such as Forward
Differencing, the time step can be local, i.e. vary from cell to cell, in order to satisfy Courant-
number restrictions in each cell individually.

In practice, for incompressible flow, steady flow should be computable without time-
marching. This is not the case in compressible flow, where time-marching is necessary in
transonic calculations (flows with both subsonic and supersonic regions).
t

t
(n)

(n)

(n-1)

(n-2)

(n-3)
t
(n-1)
t
(n-2)
t
(n-3)


CFD 6-7 David Apsley
6.5 Summary

The time-dependent fluid-flow equations are first-order in time and are solved by
time-marching.

Time-marching schemes may be explicit (time derivative known at the start of the
time step) or implicit (usually requiring iteration at each time step).

Common one-step methods are Forward Differencing (fully-explicit), Backward
Differencing (fully-implicit) and Crank-Nicolson (semi-implicit).

One-step methods are easily implemented via changes to the matrix coefficients. For
the Backward-Differencing scheme the only concessions required are:

t
V
b b
t
V
a a
old
P
P P P P
) (
,

+ +

The only unconditionally-stable two-time-level scheme is Backward Differencing
(fully implicit). Other two-step schemes have time-step restrictions: typically
limitations on the Courant number

x
t u
c =

The Crank-Nicolson scheme is second-order accurate in t. The Backward-
Differencing and Forward-Differencing schemes are both first order in t, which
means they need more time steps to achieve the same time accuracy.

Multi-step methods may be used to achieve accuracy and/or stability. However, these
are less favoured in CFD because of large storage overheads.

Time-accurate solutions require a global time step. A local time step may be used for
time-marching to steady state. In the latter case, high time accuracy is not required.

You might also like