View
7
Download
0
Category
Preview:
Citation preview
Energy conserving time integration methods for the incompressible
Navier-Stokes equations
B. Sanderse
Paper presented at the “Verwer65 - Workshop on time integration of ODEs and PDEs”,
Amsterdam, 17-19 January, 2011
ECN-M-11-005 January 2011
Energy conserving time integration methods for the incompressible Navier-Stokes equations
B. Sanderse
donderdag 20 januari 2011
donderdag 20 januari 2011
Introduction
• Accurate and efficient numerical simulation of turbulence with Large Eddy Simulation
• Requirements for discretization:• low numerical diffusion• high order spatial discretization• stable long-term integration
• Energy conserving discretizations1:• Correctly capture the turbulence energy spectrum and cascade• Non-linear stability bound
1: B. Perot (2010), Discrete conservation properties of unstructured mesh schemes, Annual Review Fluid Mechanics.
donderdag 20 januari 2011
Discretization of fluid flows
The incompressible Navier-Stokes equations describe fluid flow:
To compute flows of practical interest, we need:• A numerical approximation to the NS equations• A turbulence model
∇ · u = 0,
∂u
∂t+ (u ·∇)u = −∇p+ ν∇2u.
donderdag 20 januari 2011
Energy properties of incompressible NS
The incompressible Navier-Stokes equations:
possess a number of mathematical properties, e.g.
• The convective operator is skew-symmetric• The diffusive operator is symmetric• The divergence and gradient operator are related
∇ · u = 0,
∂u
∂t+ (u ·∇)u = −∇p+ ν∇2u.
donderdag 20 januari 2011
Energy properties of incompressible NS
• In inviscid flow energy is an invariant:
• The NS equations are then time-reversible
• Time-reversibility has been proposed as test for energy conservation1
1: Duponcheel et al. (2008), Time reversibility of the Euler equations as benchmark for energy conserving schemes, JCP
dk
dt= −ν(∇u,∇u) ≤ 0, k = 1
2�u�2
donderdag 20 januari 2011
• Finite volume method on staggered Cartesian grid• Exact conservation of mass• Compatible divergence and gradient operator,
no pressure-velocity decoupling• Skew-symmetric convective operator• Energy is conserved:
a stable discretization on any grid!
• Fourth order accuracy: Verstappen & Veldman, JCP 2003
Spatial discretization
xixi!1
!xi!1
yj
yj!1
!yj!1pi,j ui,j
vi,jvi,j
Figure 3.4: Staggered grid layout with p-centered control volume "pi,j .
xixi!1
yj
yj!1
pi,j pi+1,jui,j ui+1,j
vi,jvi,j
Figure 3.5: u-centered control volume "ui,j .
xixi!1
yj
yj!1
pi,j
pi,j+1
ui,j
vi,j
vi,j+1
Figure 3.6: v-centered control volume "vi,j .
25
donderdag 20 januari 2011
• Method of lines gives non-autonomous semi-discrete DAE system of index 2:
• Continuous properties are mimicked in a discrete sense:
Spatial discretization
!du
dt+ C(u, u)! !Du+Gp = g2(t)
Mu = g1(t)
(Gp, u) = −(Mu, p)
(C(u, v), w) = −(v, C(u,w)) → (C(u, u), u) = 0
0 = g(y, t)
y� = f(y, z, t)
donderdag 20 januari 2011
• Current practice: multistep or multistage methods with pressure correction and explicit convection• Not energy conserving, not time-reversible
• Research questions:• Energy conservation and/or time reversibility with Runge-
Kutta methods?• Order reduction when applying Runge-Kutta methods to the
incompressible NS equations?• Can implicit methods be more efficient than explicit
methods?
Temporal discretization
donderdag 20 januari 2011
• General implicit/explicit Runge-Kutta method:
• supplemented with consistent initial conditions:
where is the Laplacian; should be bounded.
Runge-Kutta methods
Ui = un +∆ts�
j=1
aijF (Uj , pj , tj)
MUi = g1(ti)
un+1 = un +∆ts�
i=1
biF (Ui, pi, ti)
Mun+1 = g1(tn+1)
Mu0 = g1(t0)
L = MG
Lp0 = M(−C(u0) + νDu0 + g2(t0))− g1(t
0)
L−1
donderdag 20 januari 2011
• In literature there is confusion on how to handle the pressure• The theory on DAEs gives a guideline: half-explicit methods1
• Equations for the stages:
Explicit methods
Ui = un +∆ti−1�
j=1
aijF (Uj , pj , tj)
MUi = g1(ti)
F (Ui, pi, ti) = −C(Ui) + νDUi −Gpi + g2(ti)
1: Hairer et al. (1989), The numerical solution of differential-algebraic systems by Runge-Kutta methods
F (Ui, ti) = −C(Ui) + νDUi + g2(ti)
donderdag 20 januari 2011
• Poisson equation for the pressure:
• Similar to pressure correction• Butcher array and only appear for unsteady BCs
Explicit methods
∆t
ai+1,i∆tLpi = M
un +∆ti−1�
j=1
ai+1,jF (Uj , pj , tj) +∆tai+1,iF (Ui, ti)
−g1(ti+1)
Lpi = MF (Ui, ti)−i�
j=1
f(A)g1(ti+1)− g1(tn)
∆t1 ≤ i ≤ s
donderdag 20 januari 2011
• Example: classical RK4
Explicit methods
Lp1 = MF1 −g1(tn+1/2)− g1(tn)
12∆t
Lp2 = MF2 −g1(tn+1/2)− g1(tn)
12∆t
Lp3 = MF3 −g1(tn+1/2)− g1(tn)
∆t
Lp4 = MF4 − 4g1(tn+1)− g1(tn)
∆t+ 3
g1(tn+1/2)− g1(tn)12∆t
approximations to g1
donderdag 20 januari 2011
• No equation for ; is not of the expected order• Higher order accurate with additional Poisson equation:
• This does not increase computational costs: solution of is the same as .
• does not influence and can be computed as post-processing step
Explicit methods
pspn+1
p1pn+1
pn+1un+1
Lpn+1 = MFn+1 − g1(tn+1)
donderdag 20 januari 2011
• Recall the general form:
Implicit Runge-Kutta methods
Ui = un +∆ts�
j=1
aijF (Uj , pj , tj)
MUi = g1(ti)
un+1 = un +∆ts�
i=1
biF (Ui, pi, ti)
Mun+1 = g1(tn+1)
donderdag 20 januari 2011
• Energy conservation (periodic BC, ):
• : , , • :
Implicit Runge-Kutta methods
(Fi, Ui) = 0mij = bibj − biaij − bjaji mij = −mji
(un+1, un+1) = (un, un) + 2∆ts�
i=1
bi (Fi, Ui) + ...
∆t2s�
i,j=1
mij (Fi, Fj) .
MUi = 0
ν = 0
(C(Ui, Ui), Ui) = 0 M = −G∗
donderdag 20 januari 2011
• Time reversibility
• Conditions for coefficients:
• Time reversibility and energy conservation conditions are satisfied by Gauss methods
Implicit Runge-Kutta methods
un+ci → −un+1−ci
aij + as+1−i,s+1−j = bj ,
bi = bs+1−i,
ci = 1− cs+1−i
donderdag 20 januari 2011
• Butcher tableaus:
• : algebraic stability
• Convergence order1:
Implicit Runge-Kutta methods: Gauss
12
121
(a) s = 1
12 −
√36
14
14 −
√36
12 +
√36
14 +
√36
14
12
12
(b) s = 2
ODE DAE u DAE ps odd
2ss+ 1 s− 1
s even s s− 2
1: Hairer et al. (1989), The numerical solution of differential-algebraic systems by Runge-Kutta methods
mij = 0
donderdag 20 januari 2011
• Solution of non-linear system with Newton linearization
Implicit Runge-Kutta methods
�I + a11∆tJ(U1) G
a11∆tM 0
� �∆F1
∆p1
�= R
I + a11∆tJ(U1) a12∆tJ(U1) G 0a21∆tJ(U2) I + a22∆tJ(U2) 0 Ga11∆tM a12∆tM 0 0a21∆tM a22∆tM 0 0
∆F1
∆F2
∆p1∆p2
= R
donderdag 20 januari 2011
• For general there is no guarantee that • Additional projection1:
• Alternative:Stiffly accurate RK methods: , e.g. Radau IIA or Lobatto IIIA/C methods, not energy conserving
Implicit Runge-Kutta methods
g1(t) Mun+1 = g1(tn+1)
asi = bi, cs = 1
1: Ascher & Petzold (1991): Projected implicit Runge-Kutta methods for differential-algebraic equations, SIAM J. Num. Anal.
un+1 = un +∆ts�
i=1
biFi
un+1 = un+1 −Gφ
Lφ = Mun+1 − g1(tn+1)
donderdag 20 januari 2011
• Pressure can be solved as for explicit methods
• Alternatively:
• Order reduction expected
Implicit Runge-Kutta methods
pi = pn +∆ts�
j=1
aijZj
Zi =1
∆t
s�
j=1
ωij(pj − pn)
pn+1 = pn +∆ts�
i=1
biZi
donderdag 20 januari 2011
• Sacrificing energy conservation: pressure correction• Provisional velocity:
• Pressure solve:
• Velocity update:
Implicit Runge-Kutta methods - PC
un+1 − u∗
∆t= −1
2G∆p
u∗ − un
∆t= F (
un + u∗
2)−Gpn
1
2L∆p =
1
∆t(Mu∗ − g1(t
n+1))
donderdag 20 januari 2011
• An energy error is introduced since • The scheme remains unconditionally stable, but only in a linear
sense1
• Time reversibility is unaffected
Implicit Runge-Kutta methods - PC
Mu∗ �= g1(tn+1)
1: van Kan (1986): A second-order accurate pressure-correction scheme for viscous incompressible flow, SIAM J.Sci.Stat.Comput.
�un+1�2 + ∆t2
8�Gpn+1�2 ≤ �un�2 + ∆t2
8�Gpn�2.
donderdag 20 januari 2011
• Sacrificing time-reversibility: extrapolated convecting velocity
• : independent of the time level of the convecting velocity
• First order:
• Second order:
• Still unconditionally stable
• Linear system
• Not time reversible
Implicit Runge-Kutta methods - linear
(C(u, u), u) = 0
C(un, un+1/2)
C�32u
n − 12u
n−1, un+1/2�
donderdag 20 januari 2011
• Energy conservation and time reversibility
• Computational cost
Summary
time reversibley n
energy conservingy IRK IRK - linear (ERK-cons)n IRK - PC ERK
Table 4: Overview energy conservation and time reversibility.
−5 −4 −3 −2 −1 0 1 2 3−3
−2
−1
0
1
2
3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
(a) ERK2
−5 −4 −3 −2 −1 0 1 2 3−3
−2
−1
0
1
2
3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
(b) ERK4
−5 −4 −3 −2 −1 0 1 2 3−3
−2
−1
0
1
2
3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
(c) IRK2
−5 −4 −3 −2 −1 0 1 2 3−3
−2
−1
0
1
2
3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
(d) IRK4
Figure 1: Stability regions.
17
nonlinear SP linear SP nonlinear LaplaceERK s 0 0 0 s
IRK - steady BC 1 0 0 1IRK - unsteady BC 1 0 0 2
IRK - linear 0 1 0 2IRK - PC 0 0 1 2
donderdag 20 januari 2011
Summary
time reversibley n
energy conservingy GLRKn GLRKn - linear, ERKcn GLRKn - pressure correction ERK
Table 4: Overview energy conservation and time reversibility.
−5 −4 −3 −2 −1 0 1 2 3−3
−2
−1
0
1
2
3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
(a) ERK2
−5 −4 −3 −2 −1 0 1 2 3−3
−2
−1
0
1
2
3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
(b) ERK4
−5 −4 −3 −2 −1 0 1 2 3−3
−2
−1
0
1
2
3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
(c) IRK2
−5 −4 −3 −2 −1 0 1 2 3−3
−2
−1
0
1
2
3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
(d) IRK4
Figure 1: Stability regions.
17
donderdag 20 januari 2011
• Taylor vortex: Order of accuracy
• Shear-layer roll-up: Energy conservation and time reversibility
• Corner flow: Order of accuracy and efficiency
Results
donderdag 20 januari 2011
• Analytical solution on a domain of
• Boundary conditions: periodic or unsteady Dirichlet
• Temporal error evaluated at
Taylor vortex
u(x, y, t) = − sin(πx) cos(πy) e−2π2νt,
v(x, y, t) = cos(πx) sin(πy) e−2π2νt,
p(x, y, t) =1
4(cos(2πx) + cos(2πy))e−4π2νt
t = 1
[ 14 , 214 ]× [ 14 , 2
14 ]
donderdag 20 januari 2011
Taylor vortex; velocity field
x
y
0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
donderdag 20 januari 2011
Energy error
Taylor vortex; periodic BC
ν = 1/100
20x20 volumes
10 2 10 1
10 14
10 12
10 10
10 8
10 6
10 4
10 2
!t
! k
ERK2IRK2IRK2 linearIRK2 PCERK4IRK4
4
2
donderdag 20 januari 2011
Taylor vortex; periodic BC
ν = 1/100
Pressure error
20x20 volumes
10 2 10 1
10 14
10 12
10 10
10 8
10 6
10 4
10 2
!t
! p
ERK2IRK2IRK2 linearIRK2 PCERK4IRK4IRK 4 no p solve
4
2
donderdag 20 januari 2011
Energy error
Taylor vortex; Dirichlet BC
ν = 1/100
20x20 volumes
10 2 10 1
10 14
10 12
10 10
10 8
10 6
10 4
10 2
!t
! k
ERK2IRK2IRK2 linearIRK2 PCERK4IRK4IRK4 no projection
2
4
donderdag 20 januari 2011
Taylor vortex; Dirichlet BC
ν = 1/100
Pressure error
20x20 volumes
10 2 10 1
10 14
10 12
10 10
10 8
10 6
10 4
10 2
!t
! p
ERK2IRK2IRK2 linearIRK2 PCERK4IRK4IRK4 no projection
2
4
donderdag 20 januari 2011
• Analytical solution on a domain of
• Boundary conditions: periodic• Inviscid: • Time reversal at
Shear-layer roll-up
[0, 2π]× [0, 2π]
u =
tanh
�y−π/2
δ
�y ≤ π,
tanh�
3π/2−yδ
�y > π,
v = ε sin(x),
p = 0.
ν = 0t = 8
donderdag 20 januari 2011
• Implicit midpoint• 100x100 volumes•
Shear-layer roll-up; time reversibility
∆t = 0.05
donderdag 20 januari 2011
Shear-layer roll-up; energy conservation
0 2 4 6 8 10 12 14 1610
8
6
4
2
0
2x 10 14
!t
! k
donderdag 20 januari 2011
Shear-layer roll-up; energy conservation
IRK2 - PC
0 2 4 6 8 10 12 14 168
7
6
5
4
3
2
1
0
1x 10 3
!t
! k
donderdag 20 januari 2011
• Implicit midpoint• 10x10 volumes•
Shear-layer roll-up; time reversibility
∆t = 1
donderdag 20 januari 2011
• Explicit RK 4• 100x100 volumes•
Shear-layer roll-up; time reversibility
∆t = 0.05
donderdag 20 januari 2011
Shear-layer roll-up; energy conservation
ERK4
0 2 4 6 8 10 12 14 163.5
3
2.5
2
1.5
1
0.5
0
0.5x 10 7
!t
! k
ERK4
donderdag 20 januari 2011
• 2nd order Adams-Bashforth• • 100x100 volumes
Shear-layer roll-up; time reversibility
∆t = 0.05
donderdag 20 januari 2011
Shear-layer roll-up; energy conservation
32x32 volumes
t = 4
10 2 10 110 16
10 14
10 12
10 10
10 8
10 6
10 4
10 2
!t
! k
ERK2IRK2IRK2 linearIRK2 PCERK4IRK4
2
4
3
donderdag 20 januari 2011
• ‘stiff’ problem; boundary layers,• domain • 20x20 volumes• simulation until
Corner flow
[0, 1]× [0, 1]ν = 1/10
t = 1
u = v = 0
u = v = 0
∂v
∂x= 0
u = 0, v = − sin(π(x3 − 3x2 + 3x))e1−1/t
−p+ ν∂u
∂x= 0
donderdag 20 januari 2011
Corner flow
10 4 10 3 10 2 10 1 10010 14
10 12
10 10
10 8
10 6
10 4
10 2
!t
! k
ERK2ERK4
donderdag 20 januari 2011
Corner flow
10 4 10 3 10 2 10 1 10010 14
10 12
10 10
10 8
10 6
10 4
10 2
!t
! k
IRK2IRK2 linearIRK2 PCAB CN
donderdag 20 januari 2011
Corner flow
10 4 10 3 10 2 10 1 10010 14
10 12
10 10
10 8
10 6
10 4
10 2
!t
! k
IRK4IRK4 no projection
donderdag 20 januari 2011
Corner flow
10 4 10 3 10 2 10 1 10010 14
10 12
10 10
10 8
10 6
10 4
10 2
!t
! k
ERK2IRK2IRK2 linearIRK2 PCAB CNERK4IRK4IRK4 no projection
4
2
donderdag 20 januari 2011
Corner flow: computational time
10 1 100 101 102 10310 14
10 12
10 10
10 8
10 6
10 4
10 2
CPU
! k
ERK2IRK2IRK2 linearIRK2 PCAB CNERK4IRK4IRK4 no projection
donderdag 20 januari 2011
• Time-reversible and energy conserving integration of the NS equations can be achieved with Gauss methods
• Order reduction is observed for unsteady boundary conditions only, and can be cured with an extra projection step. Both the differential and algebraic variable obtain the classical order.
• Cheaper methods can be constructed by linearizing or splitting, leading to loss of time-reversibility or energy conservation properties.
• Optimization of matrix solvers and investigation of turbulent flow will shed more light on the usefulness of these properties.
Conclusions
donderdag 20 januari 2011
Recommended