






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The time-dependent scalar-transport equation in computational fluid dynamics (cfd), focusing on one-step and multi-step methods for solving the first-order differential equation. Forward, backward, and centred differencing methods, their advantages and disadvantages, and their implementation in cfd. Examples are provided to illustrate the concepts.
Typology: Study notes
1 / 10
This page cannot be seen from the preview
Don't miss anything!







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 Summary Examples
6.1 The Time-Dependent Scalar-Transport Equation
The time-dependent scalar-transport equation for an arbitrary control volume is
amount netflux source t
d
d (1)
where: amount = total quantity in a cell = mass × concentration; flux = rate of transport through the boundary.
In Section 4 it was shown how the flux and source terms could be discretised as
P F
In this Section the time derivative will also be discretised.
We first examine numerical methods for the first-order differential equation
(, ) d
d = φ φ F t t
, φ( 0 )=φ 0 (3)
where F is an arbitrary scalar function of t and φ. Then we extend the methods to CFD (where φ and F refer to all nodes of the mesh).
Initial-value problems of the form (3) are solved by time- marching. There are two main types of method:
φ
φ
φ
old
new
∆φ
t
φ
t(n+1)
φ (n+1)
φ (n) φ (n-2) φ (n-1)
t(n-2) t(n-1) t(n)
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 )^ … compute φ at time t ( n +1)
The following notation is used:
By integration of (3), or from the definition of average slope,
F^ av t
φ or φ = F av t (4)
Hence, φ new^ =φ old + F av t (5) These are exact. However, since the average derivative Fav^ isn’t available until the solution φ is known, this is a Catch-22 situation. For a numerical method Fav^ 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 Fav^ as the derivative at the start of the time-step:
Backward Differencing (Backward Euler) Take Fav^ as the derivative at the end of the time-step:
Centred Differencing (Crank-Nicolson) Take Fav^ as the average of derivatives at the beginning and end.
φ new^ =φ old + F old t φ new^ =φ old + F new t φ new^ =φ old +^12 ( F old + Fnew ) t
t
φ
φ
φ old
new
t old^ tnew^ t
φ
φ
φ
old
new
t old^ tnew^ t
φ
φ
φ
old
new
t old^ tnew
(^12) ∆ t (^12) ∆ t
For :
For :
For :
Against :
Against :
Against :
φ
φ
φ
old
new
∆φ
6.2.2 Other 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; similar to Crank-Nicolson, but explicit)
2 1 2 1
2 1
1
φ= φ + φ
φ = + φ + φ
φ = φ old old
old old
tFt t
tF t
Runge-Kutta (4 function evaluations)
6 1 2 3 4 1
4 3
2 2 1 2 1 3
2 1
1 2
1 2
1
φ= φ + φ + φ + φ
φ = + φ + φ
φ = + φ + φ
φ = + φ + φ
φ = φ
old old
old old
old old
old old
tFt t
tF t t
tFt t
tF t
More details of these – and other advanced methods – can be found in the course notes for the “Computational Mechanics” unit.
For scalar φ, such methods are popular. Runge-Kutta is probably the single 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.
Exercise. Using Microsoft Excel (or other computational tool of your choice) solve the Classroom Examples from the previous subsection using Modified-Euler or Runge-Kutta methods.
6.2.3 One-Step Methods in CFD
General scalar-transport equation:
( ) 0 d
d V φ + net flux − source = t
For one-step methods the time derivative is always discretised as
t
t
old P
new P P
d
d φ − φ φ → (7)
Flux and source terms could be discretised at any particular time level as
Different time-marching schemes arise from the time level at which (8) is evaluated.
Forward Differencing
φ − φ
old P P F F P
old P
new P (^) a a b t
Rearranging, and dropping any “ new ” superscripts as tacitly understood: old P (^) t aP P bP aF F
t
Assessment.
Backward Differencing
φ − φ
new P P F F P
old P
new P (^) a a b t
Rearranging, and dropping any “ new ” superscripts:
P^ old P P F F P t
a a b t
φ
Assessment.
old P P P P t
b b t
a → a + → +( ) (11)
Crank-Nicolson
2
1 2
φ − φ + (^1) φ − φ − + φ − φ − =
new P P F F P
old P P F F P
old P
new P (^) a a b a a b t
Rearranging, and dropping any “ new ” superscripts: old P P F F P t aP P bP aF F
a a b t
or, multiplying by 2 for convenience: old P P F F P aP P bP aF F t
a a b t
Assessment.
b b t
a a
6.3 Multi-Step Methods
One-step methods use only information from time level t ( n )^ to calculate (dφ/d t ) av.
Multi-step methods use the values of φ at earlier time levels as well: φ( n -1), φ( n -2), ....
One example is Gear ’ s method :
t t
n n n n
2
d
d () (^1 ) (^2 ) ( ) − − φ − φ +φ =
φ^ (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: φ npred +^1 =φ n + 241 t [ − 9 Fn −^3 + 37 Fn −^2 − 59 Fn −^1 + 55 Fn ] corrector: φ n^ +^1 =φ n + 241 t [ Fn −^2 − 5 Fn −^1 + 19 Fn + 9 Fpredn +^1 ]
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 limit their application in CFD:
6.4 Uses of Time-Marching in CFD
Time-dependent schemes are used in two ways: (1) for a genuinely time-dependent problem; (2) for time marching to steady state.
In case (1) accuracy and stability often impose restrictions on the timestep and hence how fast one can advance the solution in time. Because all nodal values must be updated at the same rate the timestep 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 timestep 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+1)
φ (n+1)
φ (n) φ (n-2) φ (n-1)
t(n-2) t(n-1) t(n)
Summary
t
b b t
a a
old P P P P P
φ → + → +
x
u t c =
Q5. (MSc Exam, May 2010) (a) Explain what is meant by the terms explicit and implicit when applied to time- marching schemes for differential equations of the type
(, ) d
d = φ φ F t t
(b) The equation
4 d
d = −φ
φ t t
, φ = 2 when t = 0,
is to be solved numerically, using a timestep t = 0.1. Solve this equation up to time t = 0.4 using the following approaches to time-marching: (i) forward-differencing (“fully-explicit”); (ii) backward-differencing (“fully-implicit”); (iii) centred-differencing (“semi-implicit”). Note. Be very careful how you rearrange the implicit schemes for iteration.
(c) The 1-d time-dependent equation for a transported scalar φ is
= 0 ∂
∂ φ
∂
∂ φ x
u t
where t is time, x is distance and u is a constant positive velocity. Using first-order upwind differencing for the advection term, determine the restriction on the size of the timestep when the time derivative is discretised by forward-differencing, and state the corresponding restriction on the Courant number (which should be defined).
Q6. (MSc Exam, May 2011 – part) For the equation
2 d
d ( ) =−φ
φ
t , φ = 2 when t = 0,
use the following methods with a timestep t = 0.25 to find the value of φ at t = 1: (a) forward differencing (“fully-explicit”); (b) backward differencing (“fully-implicit”); (c) centred differencing (“semi-implicit”).