3D Staggered Lagrangian discretization based on cell-centered Riemann solver A bridge from staggered to cell-centered Lagrangian schemes?
3 , R. Loubere ´ ` 1 P.-H. Maire2 , P. Vachal 1 Institut
´ de Mathematique de Toulouse and CNRS, Toulouse, France 2 CEA-CESTA,
3 Faculty
Le Barp, France
of Nuclear Sciences and Physical Engineering, Czech Technical University in Prague, Czech Republic SIAM CSE Feb-March, 2011
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
1 / 33
Introduction Context and purpose Lagrangian formulation of hydrodynamics equations Exhibit the links between compatible staggered [1] and cell-centered [2] Lagrangian discretizations Extension in 3D of the 2D approach described in [3]: Development of a staggered Lagrangian scheme using cell-centered Riemann solver based artificial viscosity [1] E.J. Caramana, et al. The construction of compatible hydrodynamics algorithms utilizing conservation of total energy. J. Comput. Phys., 146(1):227- 262 (1998) [2] P.-H. Maire, A high-order cell-centered Lagrangian scheme for two-dimensional compressible fluid flows on unstructured mesh, J. Comput. Phys. 228(7):2391-2425 (2009) ` ´ [3] P.-H. Maire, R. Loubere, and P. Vachal. Staggered Lagrangian discretization based on cell-centered Riemann solver... Commun. Comput. Phys., 2011. In Press.
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
2 / 33
Plan Framework Equations, 3D notation, compatible discretization Subcell force and cell-based approximate Riemann solver High-order extensions Numerical tests Sanity checks; 1D Sod, 2D Sedov 3D Noh, Sedov Rayleigh-Taylor instability Conclusions and perspectives
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
3 / 33
Governing equations 3D gas dynamics equations d 1 d ρ −∇·U =0 ρ U + ∇P = 0 dt ρ dt
ρ
d ε + P∇ · U = 0 dt 2
Equation of state EOS P = P(ρ, ε), where ε = E − U2 . Internal energy equation can be viewed as entropy evolution an 1 equation (Gibbs relation TdS = dε + Pd ρ ≥ 0) d d d 1 ρ ε + P∇ · U = ρ ε+P ≥0 dt dt dt ρ Trajectory equations dX = U(X (t), t), dt
X (0) = x,
Lagrangian motion of any point initially located at position x. ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
4 / 33
3D notation Ωc , Ωp polyhedral primal and dual cells Ωcp = Ωp ∩ Ωc subcell
Cell : c
C(p): set of cells sharing p,
int
int
Af,cpN f,cp
F(c): set of faces of cell c Af surface, N f unit normal F(cp): set of subcell cp faces F int (cp) = ∂Ωp ∩ Ωc
Point : p
F ext (cp) = ∂Ωc ∩ Ωp , 3D corner vector X Acp N cp = −
int
int Af,cp Nf,cp
int
int
Af,cpN f,cp
int Aint f ,cp N f ,cp
f ∈F int (cp) ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
5 / 33
Preliminaries Staggered placement of variables Point velocity U p , cell-centered density ρc and internal energy εc Subcells are Lagrangian volumes Subcell mass mcp is constant in time so are cell/point masses X X mc = mcp , mp = mcp , p∈P(c)
c∈C(p)
Compatible discretization [5-6] Cornerstone: subcell force F cp that acts from subcell Ωcp on p. [5] D.E. Burton. Exact conservation of energy and momentum in staggered-grid hydrodynamics with arbitrary connectivity. Advances in the Free Lagrange Method, Springer-Verlag, 1990 [6] E.J. Caramana, et al. The construction of compatible hydrodynamics algorithms utilizing conservation of total energy. J. Comput. Phys., 146(1):227- 262, 1998. ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
6 / 33
Subcell-based compatible discretization Methodology of derivation
Discretization of GCL Discretizaton of momentum Discretization of internal energy equation in terms of subcell forces is deduced from total energy conservation Exhibit an abstract subcell force form to get an entropy inequality Subcell force writes as a pressure contribution + a tensorial viscous contribution (proportional to Mcp (U c − U p ) ) Cell-centered velocity is a supplementary degree of freedom determined invoking the principle of Galilean invariance Subcell matrix involved in the viscous part of subcell force is a fundamental object defining “the artificial viscosity” of the scheme. One possible matrix is found via an approximate cell-centered Riemann solver. ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
7 / 33
Geometric Conservation Law (GCL) Discrete divergence operator over cell c Z 1 1 X (∇ · U)c = U.Ndl ' Acp N cp · U p Vc ∂Ωc Vc p∈P(c)
Volume equation X d 1 d ρ − ∇ · U = 0 =⇒ Vc − Acp N cp · U p = 0 dt ρ dt p∈P(c)
Remark Compatible with the discrete version of the trajectory equation d X p = Up, dt ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
X p (0) = x p .
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
8 / 33
Momentum equation Discrete version mp
X d Up + F cp = 0. dt
Dual cell of mass
mp Fcp
c∈C(p)
F cp is the subcell force (pressure gradient force) Z F cp = PNdl.
c
p
∂Ωp (t)∩Ωc (t)
Remark Momentum equation is nothing but the Newton law applied to a particle of mass mp moving with velocity U p . ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
9 / 33
Specific internal energy equation Kinetic, internal and total energies are K(t) =
X1 p
2
mp U 2p (t),
E(t) =
X
mc εc (t),
E(t) = E(t) + K(t)
c
Total energy conservation
d dt E
= 0 leads
X X d d d d E+ K = mc εc + mp U p · U p dt dt dt dt c p X X d εc − F cp · U p , dt c p c∈C(p) X X d mc εc − = F cp · U p = 0 dt c =
X
mc
p∈P(c)
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
10 / 33
Specific internal energy equation Kinetic, internal and total energies are K(t) =
X1 p
2
mp U 2p (t),
E(t) =
X
mc εc (t),
E(t) = K(t) + E(t)
c
d E = 0 leads Total energy conservation dt X X d mc εc − F cp · U p = 0 dt c p∈P(c)
Sufficient condition yields the compatible internal energy discretization X d mc εc − F cp · U p = 0 dt p∈P(c)
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
11 / 33
Summary Discrete equations X d Vc − Acp N cp · U p = 0, dt p∈P(c)
mc
mp
X d Up + F cp = 0 dt c∈C(p)
X d εc − F cp · U p = 0 dt p∈P(c)
Discrete trajectory equations d X p = Up, dt ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
X p (0) = x p
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
12 / 33
Subcell force property invoking Galilean invariance Galilean invariance Energy equation under Galilean boost U c remains mc
X d εc − F cp · (U p − U c ) = 0 dt p∈P(c)
Must be true for all U c , then X F cp · U c = 0 =⇒ p∈P(c)
X
F cp = 0
p∈P(c)
Remark It implies momentum conservation
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
13 / 33
Subcell force form invoking thermod. consistency 2nd principle of thermodynamics (sufficient condition) X X d mc Tc Sc = F cp · (U p − U c ) + Pc Acp N cp · U p dt p∈P(c) p∈P(c) X = (F cp + Acp Pc N cp ) · (U p − U c ) ≥ 0 p∈P(c)
leads to the abstract subcell force form F cp = −Acp Pc N cp + Mcp (U p − U c ), | {z } | {z } Pressure term
Viscous term
where Mcp subcell-based 3 × 3 positive definite matrix i.e Mcp U · U ≥ 0, ∀U ∈ R3 . ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
14 / 33
Subcell force form invoking thermod. consistency 2nd principle of thermodynamics (sufficient condition) X X d mc Tc Sc = F cp · (U p − U c ) + Pc Acp N cp · U p dt p∈P(c) p∈P(c) X = Mcp (U p − U c ) · (U p − U c ) ≥ 0 p∈P(c)
leads to the abstract subcell force form F cp = −Acp Pc N cp + Mcp (U p − U c ), | {z } | {z } Pressure term
Viscous term
where Mcp subcell-based 3 × 3 positive semi-definite matrix i.e Mcp U · U ≥ 0, ∀U ∈ R3 . ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
15 / 33
Cell-based velocity solver SubstitutingX subcell force F cp = −A Xcp Pc N cp + Mcp (U p − U c ), into condition, F cp = 0 leads ( Acp N cp = 0) p∈P(c)
p∈P(c)
X
Mc U c =
Mcp U p
p∈P(c)
Matrix Mc is invertible as Mc =
X
Mcp > 0 so
p∈P(c)
U c = M−1 c
X
Mcp U p
p∈P(c)
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
16 / 33
Cell-based approximate Riemann solver Analogy with the vertex-based solver of P.-H. Maire. J. Comput. Phys., 228 (2009)
Introduce subcell-face internal pressure Π X F cp = Af ,cp Πf ,cp N f ,cp
Cell : c int
int
Af,cpN f,cp
f ∈F int (cp)
Af ,cp surface of internal face, N f ,cp normal. Riemann solver ∀f ∈ F int (cp)
int
int Af,cp Nf,cp
Point : p
Pc − Πf ,cp = Zf ,cp (U p − U c ).N f ,cp
int
int
Af,cpN f,cp
leads to −Acp N cp
F cp =
z X
Mcp
}| { z X Af ,cp N f ,cp Pc −
f ∈F int (cp) ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
}| { Zf ,cp Af ,cp N f ,cp ⊗ N f ,cp (U p − U c )
f ∈F int (cp) 3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
17 / 33
Riemann-solver based subcell matrix [1] Choice of subcell matrix ⇒ artificial viscosity force Mcp (U p − U c ) X Mcp = Zf ,cp Af ,cp (N f ,cp ⊗ N f ,cp ) f ∈F int (cp)
with σc sound speed and acoustic impedance [2] is given by Zf ,cp = ρc σc + cQ Γc | (U c − U p ) · N f ,cp | For a( γ gas law γ+1 if (∇ · U)cp = − V1cp Acp N cp · (U c − U p ) < 0, 2 Γc = 0 if (∇ · U)cp ≥ 0, ` ´ [1] P.-H. Maire, R. Loubere, and P. Vachal. Staggered Lagrangian discretization based on cell-centered Riemann solver... Commun. Comput. Phys., 2011. In Press. [2] J.K. Dukowicz. A general, non-iterative Riemann solver for Godunov’s method. J. Comput. Phys., 61:119-137, 1985. ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
18 / 33
Anti-Hourglass subcell forces Subpressure forces [1] Based on the difference in subcell pressures Pcp = P(ρcp , εc ) within a cell to fight back too big internal volume changes Subpressure forces within Riemann solver [2] In the Riemann solver replace Pc by Pcp to get the same type of effect as above
[1] E. J. Caramana and M. J. Shashkov Elimination of Artificial Grid Distortion and Hourglass-Type Motions by Means of Lagrangian Subzonal Masses and Pressures, J. Comp. Phys. 142 (1998) 521-561 ` ´ [2] P.-H. Maire, R. Loubere, and P. Vachal. Staggered Lagrangian discretization based on cell-centered Riemann solver... , Commun. Comput. Phys., 2011. In Press.
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
19 / 33
High-order time/space extensions High-order in time Predictor-corrector time scheme is used High-order in space Piecewise linear reconstruction U p (X ) = U p + Φp ∇U p · (X − X p ) 3D frame invariant limitation Φp x Orthonormal basis (ξ p , η p , ζ p ) U 1st flow direction ξ p = kU pp k X ep = λpq U p 2nd flow direction U with λpq =
1 kX q −X p k 1 kX q −X p k q,q6=p
P
:
q,q6=p e U ηp = e p kU p k
3rd direction ζ p = ξ p × η p
η
~p U p
ζ z
Up
y
ζ ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
ξ
η x
3D Lag Hydro with Riemann solver
ξ
SIAM CSE Feb-March, 2011
20 / 33
High-order time/space extensions High-order in time Predictor-corrector time scheme is used High-order in space Piecewise linear reconstruction U p (X ) = U p + Φp ∇U p · (X − X p ) 3D frame invariant limitation Φp Subcell force modification to gain 2nd order accuracy F cp = −Acp Pc N cp + Mcp (U p (X c ) − U c ) .
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
21 / 33
High-order time/space extensions High-order in time Predictor-corrector time scheme is used High-order in space Piecewise linear reconstruction U p (X ) = U p + Φp ∇U p · (X − X p ) 3D frame invariant limitation Φp Subcell force modification to gain 2nd order accuracy F cp = −Acp Pc N cp + Mcp (U p (X c ) − U c ) . 1
1 Exact solution Second order 0.9
0.8
0.8
0.7
0.7
0.6
0.6
Density
Density
Exact solution First order 0.9
0.5
0.4
0.5
0.4
0.3
0.3
First order
0.2
Second order
0.2
0.1
0.1 0
0.2
0.4
0.6
0.8
1
0
X
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
0.2
0.4
0.6
0.8
1
X
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
21 / 33
Numerical tests 3D hexahedral hydro mono-material codes Edge artificial viscosity [1], gradient modification [2], curlQ [3] Mcp Riemann solver based viscosity Test cases (quad mesh, octant or unit cube) 1D Sod shock tube → sanity check 2D Sedov and Noh problems → recover 2D 3D Sedov and Noh problems Rayleigh-Taylor instability [1] E.J. Caramana, M.J. Shashkov, P.P. Whalen, Formulations of artificial viscosity for multi-dimensional shock wave computations, J. Comp. Phys. 144 (1998) 70-97 [2] E.J. Caramana, C.L. Rousculp, D.E. Burton, A Compatible, Energy and Symmetry Preserving Lagrangian Hydrodynamics Algorithm in 3D, J. Comput. Phys. 157 (2000) 89-119 ` [3] E.J. Caramana, R. Loubere, Curl-q: A Vorticity Damping Artificial Viscosity for Lagrangian Hydrodynamics Calculations, J. Comput. Phys. 215 (2006) 385-391 ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
22 / 33
Validation test cases 1D Sod problem on 3 × 3 × 100 mesh
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
and
2D Sedov problem on 30 × 3 × 30 mesh
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
23 / 33
Validation test cases 3D Sedov problem on 30 × 30 × 30 and on an octant nr × nθ × nΦ = 50 × 3 × 3
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
24 / 33
3D code (edge viscosity with/without curl-Q) Noh problem without/with curl-Q (left/right) on 30 × 30 × 30 quadrangular mesh
` [3] E.J. Caramana, R. Loubere, Curl-q: A Vorticity Damping Artificial Viscosity for Lagrangian Hydrodynamics Calculations, J. Comput. Phys. 215 (2006) 385-391 ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
25 / 33
3D Noh present second-order method Noh problem on 30 × 30 × 30 quadrangular mesh
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
26 / 33
Validation test cases 3D Rayleigh-Taylor instability on 100 × 30 × 30 up to t = 0.4
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
27 / 33
Validation test cases 3D Rayleigh-Taylor instability on 100 × 30 × 30 down and up
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
28 / 33
Validation test cases 3D Rayleigh-Taylor instability edge artif. visco vs present method
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
29 / 33
Conclusions and perspectives Conclusions Cell-centered Riemann solver based artificial viscosity in 3D produce acceptable results Results are close to the one from cell-centered Lagrangian results using nodal Riemann solvers Links between cell-centered and staggered Lagrangian scheme approaches involve a subcell matrix Mcp which is the cornerstone of the scheme Perspectives Develop this approach in cylindrical geometry Analyse different Mcp and exhibit THE best one?
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
30 / 33
What about the bridge? between staggered and cell-centered Lagrangian formulation
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
31 / 33
Acknowledgements
Czech ministry of Education ´ P. Vachal has been partly supported by the Czech Ministry of Education grants MSM 6840770022, MSM 6840770010, LC528 and the Czech Grant Agency grant P205/10/0814. French embassy in Prague The authors warmly thank the support of the French embassy in Prague, Czech Repulic under the P.H.C Barrande which has provided the conditions for this work to reach maturity.
¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
32 / 33
Other forms of subcell matrix • Riemann-solver based Mcp =
X
Zf ,cp Af ,cp (N f ,cp ⊗ N f ,cp )
f ∈F int (cp)
• Diagonal Riemann-solver based (extra-diag. terms are neglected) X Mcp = Zf ,cp Af ,cp diag(N f ,cp ⊗ N f ,cp )Id, f ∈F int (cp)
• Identity-based X
Mcp =
Zf ,cp Af ,cp N f ,cp · N f ,cp Id,
f ∈F int (cp)
!!! No unique choice, different behaviors to be expected!!! ¨ Loubere ` ´ Raphael (P. Vachal, P.-H Maire)
3D Lag Hydro with Riemann solver
SIAM CSE Feb-March, 2011
33 / 33