






































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
Finite difference, time marching, stability, false diffusion, false convection ,wiggles, cell reynolds number
Typology: Study notes
1 / 46
This page cannot be seen from the preview
Don't miss anything!







































CFD is the art of simulating numerically the motion of fluid. Thekey difficulty is that in reality fluid motion takes place in aCONTINUUM described by continuous DIFFERENTIALEQUATIONS. A computer can only handle a limited quantity ofnumbers (2Mb stores 500,000 32bit numbers) and perform basicarithmetical operations. The art of CFD is to construct anappropriate DISCRETE REPRESENTATION of the continuum.This construction is governed by:
•PHYSICAL BEHAVIOUR of the continuum equations –conservation; the possible presence of characteristics or wave-like behaviour; whether the problem is “initial value” or“boundary value”.•NUMERICAL BEHAVIOUR of the discrete representation –accuracy; stability; false diffusion false convection.There are four main methodologies adopted in constructing thenumerical models
-spectral
The main ideas can be most easily demonstrated using the finite difference approach.
It is clear that both differences are “consistent” in the sense that as
0 the desired
differential is recovered. However, for practical computations
X is very much finite (of
order 10
chord lengths!) and the two difference equations have very different properties.
The leading error term in the expansion is retained and called the “truncation error”; one-sided dif
f
erences are “first order accurate” as the truncation error is O(
X) whereas centred
differences are “second order accurate” as the error term is O(
2
Thus,•
−
2 2
1 i
i
f
f X
f
f
−
3 3 2 1 i 1 i
X
f
f X
f
f
A one-sided difference replacement for a sense derivative is Note how the lack of symmetry in the one-sided difference has caused the truncation errorto deteriorate Appropriate difference operators can be derived in a similar way for any requireddifferential. For example, a centred difference replacement for a second derivative is
3 3
2 2
2
2 i
1 i
i
f
f
f
f 2
f
−
−
4 4 2 2 2 2
1 i
i
1 i
f
f
f
f 2
f
−
If we use this “dif
f
erence molecule” and choose a centred representation for
2
u/
2
and a
one-sided representation for
u
t we have
Time level
Space location
2
n 1 i i 1 i
n i
1 n i
t
−
This expression is “first order accurate in time and second order accurate in space”. The newvalue of U
i^
can be found EXPLICITLY as all other references to U
i^
are at the old time level.
All we have to do is choose a value of
t and “Time-March” the solution forward: see Fig 1.
i = 21
X
5 9
X
t^2
=
Δ
Δ ν
/ x (^0510)
X t^
2
=
Δ
ν
u
i = 1
(^511)
X
t^2
=
Δ
Δ ν
2 (^2) X u
u t
∂ ∂ ν =
∂ ∂
(^
n) 1 i i 1 i 2
ni
1 ni^
u
u 2
u
X
t
u
u
−
−
Δ
Δ ν
=
0
BOUNDARY
u(1) = 0
21 space nodesCONDITIONS u(21) = 0
i i + 1
Δ
X
5
X t^ 2
=
Δ
ν (^1020)
X
10
We imagine the finite difference solution to be composed of two parts, the exact solution,
and
a perturbation,
ε
i
We substitute this into the finite difference equations and follow the growth or decay of
ε
This approach leads to strong physical insight into how the numerical model mimics theunderlying physics of the governing differential equation.For example: introduce a point disturbance at point i
DISCRETE PERTURBATION STABILITY ANALYSIS
i U
i
i
i^
ε
ε i
[
]
[
]
Δ υ − = ε ∴
ε
Δ υ + ε = ⇒
ε + = + − Δ
υ
−
2
1 n i
2
1 n i
i
i
i
n
1 i
n i
n
1 i
2
n i
1 n i
t
t
t
For stability,
t
e . i
t
Thus
u
2
2
1
n i
ν
Δ ν − ≤ − ≤ ε +
Note: if we require no overshoot (ie no non-physical negative values of U) we musthave
t^2
ν
Substituting the “wiggle” disturbance into the finite difference equation gives: This shows that for a given
ν
and
X, the stable choice of
t is restricted; Fig.l
shows solution attempts either side of the stability boundary. This stability bound is very restrictive since if we half the mesh spacing (to checkaccuracy for example) then
t is reduced by a factor of four and so we must perform
four times as many time marching steps, each costing twice as much, to get to thesame physical time – an increase in cost of factor 8!
t
Hence
1 X / t 4 1 1
stability
for
X / t 4 1 U. e
i
t
2
(^12) n i
2
1 n i
2
1 n i
ν
ε
Δ Δ ν − = ε
ε + ε − − ε Δ
Δ ν = ε − −
14
VON NEUMANN STABILITY ANALYSIS In this common analysis we
represent
the variation of the computed variable by a Fourier
Series:
π
=
λ k
x
λ
k
n i
U
ˆ^ kXj
k
n
n i^
e
n
is the Fourier coeff. @ time n
k = wave number = 2
π
/wavelength
X = i
λ
X with I the space increment
ˆj
16
The stability analysis is linear so we consider one harmonic
i ˆj
n
kXj ˆ
n
n i^
e
e
u
θ
with
θ
= k
X, the “phase angle” and substitute into the difference equation:
(^
)^
(^
)
(
)
(
)
cos
t
e
e
t
e e 2 e U X
t
e
e
2
ˆj
ˆj
2
n
1 n
1 i ˆj
i ˆj
1 i ˆj
n
2
i ˆj
n
i ˆj
1 n
θ
Δ ν + = λ ∴
Δ ν + = λ = ∴
ν
θ −
θ
− θ θ + θ θ θ +
For stability :
π ≤ θ ≤ ≤ λ
for
for
all
harmonics
Hence,
before
as
t^2
ν
17
If we are only interested in steady solutions and we regard time marching as simply aniterative strategy we might reasonably ask what is the best value of
t to choose. It is not
always the case that the bigger
t the faster the “convergence rate” (i.e. the fewer the steps
needed to attain a steady solution). We assess the convergence rate by examining themagnitude of the von Neumann
λ
which, if less than unity, gives the rate at which errors
associated with a given harmonic are damped. CONVERGENCE RATE
cos
t
have
we
above
From
2
θ
ν
λ
π
θ
λ^ 1. 0.
2
X
t 4 1 X x 2
x
Δ ν − = λ ∴ = Δ ⋅ Δ
π
θ
π
-thus for a typical choice of
t^2
λ
ν
π
This means that “wiggles” arevigorously damped!
2D EXAMPLE^ Consider the 2D heat conduction equation^ A numerical representation is
2 2
2 2
u
u
u t
n
2
1 ij
ij
1 ij
2
j 1 i
ij
j 1 i
n ij
1 n ij
u
u 2
u
u
u 2
u
t
u
u
ν
=
−
−
i+1j
ij-
i-1j
ij+
t Δ
Y Δ
X Δ
n + 1 n
ij
t
Y
X
We analyse for stability using the 2D form of the von-Neumann method:
(^
) η
ξ
j
i ˆj
n
n i^
e
u
no
wave
wise
k
k
no
wave
wise
k
k
Y j Y , X i X , 1
ˆj
Y
Y
X
X
η
ξ
Substituting this trial function: The restrictive stability bounds of “explicit” time-marching can, under some circumstances,be relieved by “implicit” techniques, i.e. by updating the variables simultaneously
(
)
η
ξ
Δ ν ⋅ + = λ = ∴
− + Δ ν = − +
η − η ξ − ξ + ξ +
η
cos
cos
t
e
e
e
e
e
tU
e
e
2
2
n
1
n
ˆj 2
ˆj
ˆj 2
ˆj
...j ˆ
n
...j ˆ
n
j
i ˆj
1
n
This can be analysed for stability etc… In particular, if
⏐λ⏐≤
for
which is twice as restrictive as in 1D!
t^2
ν IMPLICIT TIME-MARCHING
i+
i-
i
n+
Δ
t
Δ
X
n
1 n 1 i i 1 i 2
ni
1
ni
2 2
u
u 2
u
t
u
u
u
u t
−
ν
ν
=
t
X