Professional Documents
Culture Documents
Time Discretization PDF
Time Discretization PDF
time
Initial-boundary value problem u = u(x, t)
future
zone of influence
∂u
present
∂t + Lu = f in Ω × (0, T ) time-dependent PDE
domain of
past dependence Bu = 0 on Γ × (0, T ) boundary conditions
u = u0 in Ω at t = 0 initial condition
space
The space and time variables are essentially decoupled and can be discretized
independently to obtain a sequence of (nonlinear) algebraic systems
∂u
∀t ∈ (tn , tn+1 )
R
Weak formulation Ω ∂t + Lu − f v dx = 0, ∀v ∈ V,
d d
dt (u, v) + a(u, v) = l(v), ∀v ∈ V → dt (uh , vh ) + a(uh , vh ) = l(vh ), ∀vh ∈ Vh
Differential-Algebraic Equations MC du
dt + Au = b t ∈ (tn , tn+1 )
where MC = {mij } is the mass matrix and u(t) = [u1 (t), . . . , uN (t)]T
P P R
Mass lumping MC → ML = diag{mi }, mi = mij = (ϕi , ϕj ) = Ω
ϕi dx
j j
P
due to the fact that ϕj ≡ 1. In the 1D case FDM=FVM=FEM + lumping
j
Two-level time-stepping schemes
Lumped-mass discretization ML du
dt + Au = b, R(u, t) = ML−1 [Au − b]
du
dt + R(u, t) = 0 for t ∈ (tn , tn+1 )
First-order ODE system
u(tn ) = un , ∀n = 0, 1, . . . , M − 1
Consistent-mass discretization MC du
dt + Au = b, R(u, t) = MC−1 [Au − b]
R tn+1 du n+1 n
R tn+1
Exact integration tn dt dt = u −u = tn
f (t, u(t)) dt
un+1 = un + f (τ, u(τ ))∆t, τ ∈ (tn , tn+1 ) by the mean value theorem
111111111
000000000 111111111
000000000
000000000
111111111 000000000
111111111 111111111
000000000
000000000
111111111 000000000
111111111 000000000
111111111
111111111
000000000 000000000
111111111 000000000
111111111 000000000
111111111
000000000
111111111 000000000
111111111 000000000
111111111 000000000
111111111
000000000
111111111 000000000
111111111 000000000
111111111 000000000
111111111
000000000
111111111 000000000
111111111 000000000
111111111 000000000
111111111
000000000
111111111 000000000
111111111 000000000
111111111 000000000
111111111
000000000
111111111 000000000
111111111 000000000
111111111 000000000
111111111
000000000
111111111 000000000
111111111 000000000
111111111 000000000
111111111
000000000
111111111 000000000
111111111 000000000
111111111 000000000
111111111
000000000
111111111 000000000
111111111 000000000
111111111 000000000
111111111
t 000000000
111111111 t 000000000
111111111 t t
tn tn+1 tn tn+1 tn tn+1 tn tn+1
ǫloc
τ = O(∆t)
p
⇒ ǫglob
τ = M ǫloc
τ = O(∆t)
p−1
du(x(t), t) ∂2u
Lagrangian representation =d 2 pure diffusion equation
dt ∂x
d dx(t)
where dt is the substantial derivative along the characteristic lines dt =v
unknown
T
tn = n∆t, ∆t = M, n = 0, . . . , M
tn+1
un −→ un+1 , u0i = u0 (xi ) t
tn
t
Fully discretized equation 0≤θ≤1 t 1
n
known
un+1
i = uni + [θfhn+1 + (1 − θ)fhn ]∆t
" #
n+1 n n+1 n+1 n+1 n+1 n+1
ui − ui u − ui−1 u − 2ui + ui+1
= θ −v i+1 + d i−1
∆t 2∆x (∆x)2
uni+1 − uni−1 uni−1 − 2uni + uni+1
+ (1 − θ) −v +d
2∆x (∆x)2
a sequence of tridiagonal linear systems i = 1, . . . , N, n = 0, . . . M − 1
Example: 1D convection-diffusion equation
Standard θ−scheme (two-level) FE
t
n+1
n+θ n+θ n+θ
un+1
i − uni ui+1 − ui−1 ui−1 − 2uin+θ + ui+1
n+θ
+v =d t
n
∆t 2∆x (∆x)2
uin+θ = θun+1
i + (1 − θ)uni , 0≤θ≤1 n+1
BE
t
Given the parameters θ ∈ (0, 1), θ′ = 1 − 2θ, and α ∈ [0, 1] subdivide the time
interval (tn , tn+1 ) into three substeps and update the solution as follows
Step 2. un+1−θ = un+θ + [(1 − α)f (tn+1−θ , un+1−θ ) + αf (tn+θ , un+θ )]θ′ ∆t
Step 3. un+1 = un+1−θ + [αf (tn+1 , un+1 ) + (1 − α)f (tn+1−θ , un+1−θ )]θ∆t
Predictor-corrector algorithm
1. Compute ũn+1 using an Adams-Bashforth method of order p − 1
2. Compute un+1 using an Adams-Moulton method of order p with
predicted value f (tn+1 , ũn+1 ) instead of f (tn+1 , un+1 )
∆t
p=2 ũn+1/2 = un + n n
2 f (t , u ) forward Euler / predictor
∆t
p=4 ũn+1/2 = un + n n
2 f (t , u ) forward Euler / predictor
∆t
ûn+1/2 = un + 2 f (t
n+1/2
, ũn+1/2 ) backward Euler / corrector
Explicit methods: use the largest time step satisfying the stability condition
Implicit methods: estimate the error and adjust the time step if necessary
Automatic time step control
⊖ Note that the cost per time step increases substantially (um∆t may be as
expensive to obtain as u∆t due to slow convergence at large time steps).
⊕ On the other hand, adaptive time-stepping enhances the robustness of the
code, the overall efficiency and the credibility of simulation results.
Evolutionary PID controller
||un+1 −un ||
• Monitor the relative changes en = ||un+1 || of an indicator variable u
ǫ
• If en > ǫ reject the solution and repeat the time step using ∆t∗ = en ∆tn
k P k I k D
e2n−1
en−1 T OL
∆tn+1 = ∆tn
en en en en−2