Wave propagation methods for hyperbolic problems on mapped
grids
Keh-Ming Shyue
Department of Mathematics National Taiwan University
Taiwan
Outline
Review a high-resolution wave propagation method for solving hyperbolic problems on mapped grids (which is basic integration scheme implemented in CLAWPACK) Describe an interpolation-type adaptive moving mesh approach that is an easy generalization of the above method for improving numerical resolution
Show sample results
Mapped grid methods
To begin with, we consider system of conservation laws
∂tq + ∇ · f (q) = 0 (1) with suitable initial condition for q in Nd ≥ 1 spatial domain Here q ∈ lRm denotes vector of m conserved quantities, f = (f1, f2, . . . , fNd) ∈ lRm×Nd denotes flux matrix; fj ∈ lRm It is known integral form of (1) over any control volume C is
d dt
Z
C
q dx = − Z
∂C
f(q) · n ds,
where n is outward-pointing normal vector at boundary ∂C
Mapped grid methods
Using above integral conservation law, a finite volume method on a control volume C can be written as
Qn+1 = Qn − ∆t M(C)
Ns
X
j=1
hjF˘j,
where M(C) is measure (area in 2D or volume in 3D) of C, Ns is number of sides,
hj is length of j-th side (in 2D) or area of cell edge (in 3D) measured in physical space,
F˘j is numerical approximation to normal flux in average across j-th side of grid cell
Mapped grid methods
In the following we assume that our mapped grids are logically rectangular, & will restrict our consideration to two-dimensional case Nd = 2 as illustrated below
i − 1 i − 1
i
i j
j
j + 1 j + 1
Cˆij Cij
ξ1 ξ2
mapping
∆ξ1
∆ξ2
computational grid physical grid
←−
x1 = x1(ξ1, ξ2) x2 = x2(ξ1, ξ2) x1
x2
Then on a curvilinear grid, a finite volume method takes
∆t ∆t
Mapped grid methods
On a curvilinear grid, a finite volume method takes Qn+1ij = Qnij− ∆t
κij∆ξ1
Fi+1 1
2,j − Fi−1 1 2,j
− ∆t κij∆ξ2
Fi,j+2 1 2
− Fi,j−2 1 2
where ∆ξ1, ∆ξ2 denote equidistant discretization of computational domain,
κij = M(Cij)/∆ξ1∆ξ2 is area ratio between area of grid cell in physical space & area of a computational grid,
Fi−1 1
2,j = γi−1
2,jF˘i−1
2,j, Fi,j−2 1
2
= γi,j−1
2
F˘i,j−1
2 are fluxes per unit length in computational space with γi−1
2,j = hi−1
2,j/∆ξ1 &
γi,j−1
2 = hi,j−1
2 /∆ξ2 representing length ratios
Mapped grid methods
In this setup, first order wave propagation method is a Godunov-type finite volume method that takes form
Qn+1ij = Qnij− ∆t κij∆ξ1
A+1 ∆Qi−1
2,j + A−1 ∆Qi+1
2,j
−
∆t κij∆ξ2
A+2 ∆Qi,j−1
2 + A−2 ∆Qi,j+1
2
with right-, left-, up-, and down-moving fluctuations
A+1 ∆Qi−1
2,j, A−1 ∆Qi+1
2,j, A+2 ∆Qi,j−1
2, & A−2 ∆Qi,j+1
2 that are entering into grid cell
To determine these fluctuations, we need to solve
one-dimensional Riemann problems normal to cell edges
Computing fluctuations
Let ni−1
2,j = (n1, n2) & ti−1
2,j = (t1, t2) be normalized normal and tangential vectors to cell edge (i − 12, j) between cells (i − 1, j) & (i, j). Then rotation matrix which rotates velocity components (e.g., for shallow water or acoustic equations) has form
Ri−1
2,j =
1 0 0
0 n1 n2 0 t1 t2
Fluctuations A±1 ∆Qi−1
2,j can be calculated by steps:
1. Determine Q˘L & Q˘R by rotating velocity components,
Q˘L = Ri−1
2,jQi−1,j, Q˘R = Ri−1
2,jQi,j
Computing fluctuations
2. Solve Riemann problem for 1D conservation law
∂tq + ∇ · f1 = 0
with initial data
q(ξ1, 0) =
Q˘L if x < xi−1
2
Q˘R if x > xi−1
2
This results in waves W˘i−1,k1
2,j that are moving with speeds
λ˘1,ki−1
2,j, k = 1, . . . , Nw, Nw is the number of waves. Here jumps are decomposed into waves as Q˘R − ˘QL = PNw
k=1 W˘i−1,k1
2,j
& solution at cell edge can be expressed
X
Computing fluctuations
3. Define scaled speeds
λ1,ki−1
2,j = γi−1
2,jλ˘1,ki−1
2,j
and rotate waves back to Cartesian coordinates by
Wi−1,k1
2,j = RTi−1
2,jW˘i−1,k1
2,j, k = 1, . . . , Nw
4. Determine left- and right-moving fluctuations in the form
A±1 ∆Qi−1
2,j =
Nw
X
k=1
λ1,ki−1
2,j
±
Wi−1,k1
2,j
5. In an analogous way up and down-moving fluctuations at cell edge (i, j − 12) can be calculated
High resolution corrections
The speeds and limited versions of waves are used to
calculate second order correction terms. These terms are added to the method in flux difference form as
Qn+1ij := Qn+1ij − 1 κij
∆t
∆ξ1
Fei+1 1
2,j − eFi−1 1 2,j
− 1 κij
∆t
∆ξ2
Fei,j+2 1
2 − eFi,j−2 1 2
For example, at cell edge (i − 12, j) correction flux takes
Fei−1 1
2,j = 1 2
Nw
X
k=1
λ1,ki−1
2,j
1 − ∆t κi−1
2,j∆ξ1
λ1,ki−1
2,j
!
Wfi−1,k1
2,j
where κi−1
2,j = (κi−1,j + κij)/2. To aviod oscillations near discontinuities, a wave limiter is applied leading to limited
f
High resolution corrections
To ensure second order accuracy & also improve stability, a transverse wave propagation is included in the algorithm
that left- & right-going fluctuations A±1 ∆Qi−1
2,j are each split into two transverse fluctuations: up- & down-going
A±2 A+1 ∆Qi−1
2,j & A±2 A−1 ∆Qi−1
2,j
This wave propagation method can be shown to be conservative & stable under a variant of CFL
(Courant-Friedrichs-Lewy) condition of form
ν = ∆t max
i,j,k
λ1,ki−1
2,j
Jip,j∆ξ1 ,
λ2,ki,j−1
2
Ji,jp∆ξ2
≤ 1,
where ip = i if λ1i−,k1
2,j > 0 & i − 1 if λ1i−,k1
2,j < 0
Accuracy test in 2D
Consider 2D compressible Euler equations with ideal gas law as governing equations
Take smooth vortex flow with initial condition
ρ =
1 − 25(γ − 1)
8γπ2 exp (1 − r2)
1/(γ−1)
, p = ργ,
u1 = 1 − 5
2π exp ((1 − r2)/2) (x2 − 5) , u2 = 1 + 5
2π exp ((1 − r2)/2) (x1 − 5) ,
& periodic boundary conditions as an example, where r = p
(x1 − 5)2 + (x2 − 5)2
Accuracy test in 2D
Grids used for this smooth vortex flow test
0 5 10
0 2 4 6 8 10
0 5 10
0 2 4 6 8 10
0 5 10
0 2 4 6 8
Grid 1 Grid 2 10 Grid 3
kEzk1,∞ = kzcomput − zexactk1,∞ denotes discrete 1- or maximum-norm error for state variable z
Results shown below are at time t = 10 on N × N mesh
Accuracy results in 2D: Grid 1
N E1(ρ) Order E1(u1) Order E1(u2) Order E1(p) Order
40 0.6673 2.3443 1.7121 0.8143
80 0.1792 1.90 0.6194 1.92 0.4378 1.97 0.2128 1.94 160 0.0451 1.99 0.1537 2.01 0.1104 1.99 0.0536 1.99 320 0.0113 2.00 0.0384 2.00 0.0276 2.00 0.0134 2.00
N E∞(ρ) Order E∞(u1) Order E∞(u2) Order E∞(p) Order
40 0.1373 0.3929 0.1810 0.1742
80 0.0377 1.87 0.1014 1.95 0.0502 1.85 0.0482 1.85 160 0.0093 2.02 0.0248 2.03 0.0123 2.03 0.0119 2.02 320 0.0022 2.07 0.0062 2.00 0.0030 2.04 0.0029 2.04
Accuracy results in 2D: Grid 2
N E1(ρ) Order E1(u1) Order E1(u2) Order E1(p) Order
40 0.9298 2.6248 2.1119 1.2104
80 0.2643 1.81 0.7258 1.85 0.5296 2.00 0.3277 1.89 160 0.0674 1.97 0.1833 1.99 0.1309 2.02 0.0845 1.96 320 0.0169 2.00 0.0458 2.00 0.0327 2.00 0.0212 1.99
N E∞(ρ) Order E∞(u1) Order E∞(u2) Order E∞(p) Order
40 0.1676 0.4112 0.2259 0.2111
80 0.0471 1.83 0.1242 1.73 0.0645 1.79 0.0586 1.85 160 0.0126 1.91 0.0333 1.90 0.0162 2.02 0.0149 1.97 320 0.0033 1.93 0.0085 1.97 0.0040 2.00 0.0038 1.98
Accuracy results in 2D: Grid 3
N E1(ρ) Order E1(u1) Order E1(u2) Order E1(p) Order
40 4.8272 4.7734 5.3367 5.4717
80 1.5740 1.62 1.5633 1.61 1.5660 1.77 1.5634 1.81 160 0.4536 1.79 0.4559 1.78 0.4537 1.79 0.4560 1.78 320 0.1215 1.90 0.1221 1.90 0.1222 1.89 0.1221 1.90
N E∞(ρ) Order E∞(u1) Order E∞(u2) Order E∞(p) Order
40 0.4481 0.4475 0.4765 0.4817
80 0.1170 1.94 0.1181 1.92 0.1196 1.99 0.1191 2.02 160 0.0434 1.43 0.0431 1.45 0.0442 1.43 0.0440 1.44 320 0.0117 1.89 0.0119 1.86 0.0119 1.89 0.0118 1.89
Accuracy test in 3D
Consider 3D compressible Euler equations with ideal gas law as governing equations
Take smooth radially-symmetric flow with the flow condition that is at rest initially with density
ρ(r) = 1 + exp(−30(r − 1)2)/10 & pressure p(r) = ργ Grids used for smooth radially-symmetric flow test
1 1 2
2 0 1 2
1 1 2
2 0 1 2
1 1 2
2 0 1 2
Grid 1 Grid 2 Grid 3
Accuracy results in 3D: Grid 1
N E1(ρ) Order E1(|~u|) Order E1(p) Order 20 7.227 · 10−3 8.920 · 10−3 1.019 · 10−2
40 2.418 · 10−3 1.58 2.558 · 10−3 1.80 3.415 · 10−3 1.58 80 6.356 · 10−4 1.93 6.754 · 10−4 1.92 8.980 · 10−4 1.93 160 1.616 · 10−4 1.98 1.718 · 10−4 1.97 2.282 · 10−4 1.98
N E∞(ρ) Order E∞(|~u|) Order E∞(p) Order 20 1.096 · 10−2 1.200 · 10−2 1.569 · 10−2
40 4.085 · 10−3 1.42 4.381 · 10−3 1.45 5.848 · 10−3 1.42 80 1.235 · 10−3 1.73 1.263 · 10−3 1.79 1.765 · 10−3 1.73 160 3.517 · 10−4 1.81 3.349 · 10−4 1.91 5.030 · 10−4 1.81
Accuracy results in 3D: Grid 2
N E1(ρ) Order E1(|~u|) Order E1(p) Order 20 7.227 · 10−3 8.920 · 10−3 1.019 · 10−2
40 2.418 · 10−3 1.58 2.558 · 10−3 1.80 3.415 · 10−3 1.58 80 6.356 · 10−4 1.93 6.754 · 10−4 1.92 8.980 · 10−4 1.93 160 1.616 · 10−4 1.98 1.718 · 10−4 1.97 2.282 · 10−4 1.98
N E∞(ρ) Order E∞(|~u|) Order E∞(p) Order 20 7.227 · 10−3 8.920 · 10−3 1.019 · 10−2
40 2.418 · 10−3 1.58 2.558 · 10−3 1.80 3.415 · 10−3 1.58 80 6.356 · 10−4 1.93 6.754 · 10−4 1.92 8.980 · 10−4 1.93 160 1.616 · 10−4 1.98 1.718 · 10−4 1.97 2.282 · 10−4 1.98
Accuracy results in 3D: Grid 3
N E1(ρ) Order E1(|~u|) Order E1(p) Order 20 1.290 · 10−2 1.641 · 10−2 1.816 · 10−2
40 4.694 · 10−3 1.46 4.999 · 10−3 1.71 6.623 · 10−3 1.46 80 1.257 · 10−3 1.90 1.379 · 10−3 1.86 1.774 · 10−3 1.90 160 3.209 · 10−4 1.97 3.546 · 10−4 1.96 4.527 · 10−4 1.97
N E∞(ρ) Order E∞(|~u|) Order E∞(p) Order 20 1.632 · 10−2 1.984 · 10−2 2.316 · 10−2
40 5.819 · 10−3 1.49 6.745 · 10−3 1.56 8.307 · 10−3 1.48 80 1.823 · 10−3 1.67 4.290 · 10−3 0.65 2.710 · 10−3 1.67 160 5.053 · 10−4 1.85 3.271 · 10−3 0.39 7.237 · 10−4 1.85
Extension to moving mesh
One simple way to extend mapped grid method described above to solution adaptive moving grid method is to take approach proposed by
H. Tang & T. Tang, Adaptive mesh methods for one- and two-dimensional hyperbolic conservation laws, SIAM J.
Numer. Anal., 2003
In each time step, this moving mesh method consists of three basic steps:
1. Mesh redistribution
2. Conservative interpolation of solution state 3. Solution update on a fixed mapped grid
Mesh redistribution scheme
Winslow’s approach (1981)
Solve ∇ · (D∇ξj) = 0, j = 1, . . . , Nd
for ξ(x). Coefficient D is a positive definite matrix which may depend on solution gradient
Variational approach (Tang & many others)
Solve ∇ξ · (D∇ξxj) = 0, j = 1, . . . , Nd for x(ξ) that minimizes the “energy” functional
E(x(ξ)) = 1 2
Z
Ω Nd
X
j=1
∇Tξ D∇xjdξ
Lagrangian (ALE)-type approach ( , CAVEAT code)
Mesh redistribution
Dashed lines represent initial mesh & solid lines represent new mesh after a redistribution step
0 0.5 1 1.5 2 2.5 3 3.5 4
0 0.5 1 1.5 2 2.5 3 3.5 4
Conservative interpolation
Numerical solutions need to be updated conservatively, i.e.
XM Ck+1
Qk+1 = X
M Ck Qk
after each mesh redistribution iterate k. This can be done Finite-volume approach (Tang & Tang, SIAM 03)
M Ck+1
Qk+1 = M Ck
Qk −
Ns
X
j=1
hjG˘j, G = ( ˙x · n)Q˘
Geometric approach (Shyue 2010 & others)
"
X
S
M Cpk+1 ∩ Spk#
Qk+1C = X
S
M Cpk+1 ∩ Spk QkS
Conservative interpolation
Geometric way to perform conservative interpolation
0 0.5 1 1.5 2 2.5 3 3.5 4
0 0.5 1 1.5 2 2.5 3 3.5 4
Interpolation-free moving mesh
One way to dervise an interpolation-free moving mesh
method is to consider coordinate change of equations via (x, t) 7→ (ξ, t). In this case, the transformed conservation law reads
∂tq˜ + ∇ξ · ˜f = G (2) with
˜
q = Jq, J = det (∂ξ/∂x)−1 f˜j = J (q ∂tξj + ∇ξj · f )
G = q [∂tJ + ∇ξ · (J∂tξj)] +
XN j=1
fj∇ξ · J∂xjξk
= 0 (if GCL & SCL are satisfied)
We may then devise numerical method to solve (2) (Shyue:
2 D Riemann Problem
4-shock wave pattern initially
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1
ρ u1 u2
p
=
1.1
0 0 1.1
0.507 0.893
0 0.35
1.1 0.893 0.893
1.1
0.507 0 0.893
0.35
2 D Riemann Problem
Mesh redistribution scheme: variational approach Grid system
time=0.25
2 D Riemann Problem
Mesh redistribution scheme: variational approach Density contours
t=0.25
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Sedov problem
Mesh redistribution scheme: Lagrangian approach 30 × 30 mesh grid
0.2 0.4 0.6 0.8 1 1.2
y
Grid system
1 2 3 4 5 6
Density
Lagrangian Eulerian
Sedov problem
Mesh redistribution scheme: variational approach
“Monitor” function D based on density gradient
0 0.2 0.4 0.6 0.8 1
0 0.2 0.4 0.6 0.8 1 1.2
y
Grid system
0 0.2 0.4 0.6 0.8 1
0 1 2 3 4 5 6
Density
Variational Eulerian
Shock waves over circular array
A Mach 1.42 shock wave in water over a circular array
t=0
shock
Shock waves over circular array
Grid system
−3 −2 −1 0 1 2 3 4 5
−4
−3
−2
−1 0 1 2 3 4
time=0
Shock waves over circular array
Contours for density
t=0.0024
Moving cylindrical vessel
Impose uniform flow velocity (u1, u2) = (−1, 0) (i.e., in the frame of vessel moving with speed one in x1-direction)
air helium interface
Moving cylindrical vessel
Solution at time t = 0.25
Moving cylindrical vessel
Solution at time t = 0.5
Moving cylindrical vessel
Solution at time t = 0.75
Moving cylindrical vessel
Solution at time t = 1
Cavitation test: 2D steady state
Uniform gas-liquid mixture with speed 600m /s over a circular region
Cavitation test: 2D steady state
Pseudo colors of volume fraction
Formation of cavitation zone (Onset–shock induced, diffusion, . . . ?)
Cavitation test: 2D steady state
Pseudo colors of pressure
Smooth transition across liquid-gas phase boundary
Cavitation test: 2D steady state
Pseudo colors of volume fraction: 2 circular case
Convergence of solution as the mesh is refined ?
t=0.05
Thank You
Compressible Multiphase Flow
Homogeneous equilibrium pressure & velocity across material interfaces
Volume-fraction based model equations (Shyue JCP
’98, Allaire et al. JCP ’02)
∂
∂t (αiρi) + 1 J
Nd
X
j=1
∂
∂ξj (αiρiUj) = 0, i = 1, 2, . . . , mf
∂
∂t (ρui) + 1 J
Nd
X
j=1
∂
∂ξj (ρuiUj + pJji) = 0, i = 1, 2, . . . , Nd,
∂E
∂t + 1 J
Nd
X
j=1
∂
∂ξj (EUj + pUj) = 0,
∂αi
∂t + 1 J
Nd
XUj ∂αi
∂ξj = 0, i = 1, 2, . . . , mf − 1
Barotropic two-fluid flow
Two-phase flow model
∂t (α1ρ1) + ∇ · (α1ρ1u) = 0,
∂t (α2ρ2) + ∇ · (α2ρ2u) = 0,
∂t (ρu) + ∇ · (ρu ⊗ u + pδ) = 0 α1ρ1
ρ1(p) + α2ρ2
ρ2(p) = 1 (Iterative solve for p)
Barotropic two-fluid flow
A relaxation model of Saurel et al. (JCP ’090
∂
∂t (α1ρ1) +
XN j=1
∂
∂xj (α1ρ1uj) = 0,
∂
∂t (α2ρ2) +
XN j=1
∂
∂xj (α2ρ2uj) = 0,
∂
∂t (ρui) +
XN j=1
∂
∂xj (ρuiuj + pδij) = 0, i = 1, . . . , N
∂α1
∂t +
XN j=1
uj ∂α1
∂xj = 1
µ (p1 (ρ1) − p2 (ρ2))
Each phasic pressure pι is a function of density only Mixture pressure p satisfies p = α1p1 + α2p2, µparameter
Mixture speed of sound
Wood formula (stiffness in c¯ vs. α)
1
ρ¯c2 = α ρwc2w
+ 1 − α ρgc2g
ρw = 103kg/m3, cw = 1449.4m/s, ρg = 1.0kg/m3, cg = 374.2m/s
500 1000 1500
¯c