p6 PDF
p6 PDF
p6 PDF
Time-Dependent Methods
or
1
Time-Dependent Scalar-Transport Equation
Conservation: u
d V un
(amount) net flux source A
dt
d
(ρV P ) a P P a F F bP
dt
d
F (t , ) 1st-order in time; solve by time-marching
dt
One-step methods: old
● given (n), find (n+1) t
t
t old t new
(n+1)
Multi-step methods: (n)
● given (n), (n-1), (n-2), …, find (n+1) (n-2) (n-1)
2
One-Step Methods
new
d
F F is the gradient.
dt
old
t
t
t old
t new
d Δ
F F av Δ F av Δt
dt Δt
new old F av Δt
One-Step Methods
new
d
F new old F av Δt
dt
old
t
t
t old t new
Example
The following differential equation is to be solved on the
interval [0,1]:
d
t , (0) 1
dt
Solve this numerically, with a step size t = 0.2 using:
3
Forward Differencing
(Explicit or Forward Euler Method)
d Δ
F F old
dt Δt new
Δ F old Δt old
For
● Easy to implement (because explicit)
Against
● Only 1st-order accurate in t
● In CFD, timestep restrictions
Backward Differencing
(Implicit or Backward-Euler Method)
d Δ
new
F F new
dt Δt
Δ F newΔt
old
new old F newΔt
t
t old t new
4
Backward Differencing: Assessment
For
● In CFD, no timestep restrictions
Against
● Implicit; usually requires iteration
● Only 1st-order accurate in t
Crank-Nicolson
(Semi-Implicit or Time-Centred Method)
Use the average of the gradients at the start and end of the
timestep
new
d Δ 1
F ( F old F new )
dt Δt 2
1 old
Δ ( F old F new )Δt
2
1
2 t 1
2 t
1 t
new old ( F old F new )Δt t old
t new
2
Crank-Nicolson: Assessment
1
new old ( F old F new )Δt
2
For
● 2nd-order accurate in t
Against
● Implicit; usually requires iteration
● In CFD, timestep restrictions
5
Example
d
F (t , ) Δ Δt F
dt
6
One-Step Methods in CFD
Scalar-transport equation:
d
(amount) net flux source
dt
Δt
Forward Differencing
d
Conservation: (amount) source net flux
dt
old
ρV ρV
Rearrange (dropping “new”): P ( aP ) P bP aF F
Δt Δt
● Explicit; no iteration.
ρV
● Timestep restriction for boundedness: Δt
aP
● Only first-order accurate in time.
e P , w W (upwind differencing)
uΔt old
new
P old
P ) ( P Wold ) 0
Δx
7
Backward Differencing
d
Conservation: (amount) source net flux
dt
ρV ρV
Rearrange: ( a P ) P a F F bP ( P ) old
Δt Δt
Crank-Nicolson
d
Conservation: (amount) source net flux
dt
Time-centred-differencing:
old
ρV 1 ρV 1
Rearrange: ( a P ) P 12 a F F 12 bP ( 2 a P ) P 12 (bP a F F )
Δt 2 Δt
old
ρV ρV
(2 a P ) P a F F bP (2 a P ) P (bP a F F )
Δt Δt
● Implicit
● Implemented by modifying matrix coefficients aP and bP
ρV
● Timestep restriction for boundedness: Δt 2
aP
● Second-order accurate in time
Multi-Step Methods
(n+1)
(n)
(n-2)
(n-1)
Problems:
● Storage
● Start-up
8
Gear’s Scheme
(n)
d 3 ( n ) 4 ( n1) ( n2)
dt 2Δt
2nd-order accurate in t
Predictor-Corrector Methods
d
F Δ Δt F
dt
Adams-Bashforth predictor:
1
npred n 24
1
Δt [9F n3 37 F n2 59F n1 55F n ]
Adams-Moulton corrector:
n1 n 24
1
Δt[ F n2 5F n1 19F n 9Fpred
n 1
]
4th-order accurate in t
Uses of Time-Marching
9
Summary (1)
● One-step methods:
– forward differencing (explicit)
– backward differencing (implicit)
– Crank-Nicolson (semi-implicit)
Summary (2)
10