Triangular metric-based mesh adaptation for compressible multi-material flows in semi-Lagrangian coordinates
ECCOMAS 2014 | S. Del Pino and I. Marmajou CEA, DAM, DIF F-91297, Arpajon France Barcelona, July 2014
Introduction Multi-material compressible gas dynamics in Lagrangian form ∀ω(t) ∈ Ω(t), R R d 1 = ω(t) ∇ · u, dt ω(t) R d ρ = 0, dt ω(t) R R d ρu = − ω(t) ∇p, dt ω(t) R R d ρE = − ω(t) ∇ · pu. dt ω(t)
ρ is the density, u is velocity, E is the total energy, e = E − 12 kuk2 is the internal energy, p = p(ρ, e) is the pressure. ω(t) is lagrangian (ie moves at fluid velocity).
Lagrangian methods vs Eulerian methods Pros lesser numerical dissipation contact discontinuities are preserved exactly ( =⇒ no need for mixing models)
Cons
cannot compute shear or vortexes
CEA | Barcelona, July 2014 | PAGE 1/11
Objective Mesh adaptation for semi-Lagrangian calculations Improve solution quality Improve robustness ALE (defined as mesh smoothing) is not always enough Hoch Semi-conformal polygonal mesh adaptation seen as grid velocity formulation for ALE simulations, MULTIMAT’09 Loub` ere-Maire-Shashkov-Breil-Galera ReALE: A reconnection-based arbitrary-Lagrangian-Eulerian method, JCP 2010 Z. Lin, S. Jiang, S. Zu, and L. Kuang A local rezoning and remapping method for unstructured mesh. Comput. Phys. Comm., 2011.
New tools semi-Lagrangian cell-centered schemes: simplify remapping step Despr´ es-Mazeran
Lagrangian Gas Dynamics in Two Dimensions and Lagrangian systems, ARMA 2005
Maire-Abgrall-Breil-Ovadia
A cell-centered Lagrangian scheme for two-dimensional compressible flow problems, SIAM JSC 2007
triangular based local remeshing
Multi-material context Try to be as Lagrangian as possible, especially at material interfaces. Avoid spurious mixing due to remeshing: use interface reconstruction. CEA | Barcelona, July 2014 | PAGE 2/11
Local remeshing Quality pattern (edge swapping)
Coarsening pattern (edge collapsing)
Refinement pattern (edge splitting)
Interface treatment
Rules are overcome if an edge becomes too small
CEA | Barcelona, July 2014 | PAGE 3/11
Remapping
First-order remapping ρ, ρu and ρE are projected through exact local mesh intersection.
Multi-material treatment Pure cells: swapping and splitting do not generate mixed cells. Collapsing may generate mixing. Mixed cells: to reduce numerical mixing an interface reconstruction method is used. Simple Youngs method Exact intersection between reconstructed geometry and new mesh is performed for remapping.
CEA | Barcelona, July 2014 | PAGE 4/11
Metric formalism Bourouchaki-George-Hecht-Laug-Saltel Alauzet-Frey
Delaunay mesh generation overned by metric specifications, FEAD 1997
Anisotropic mesh adaptation for CFD computations, CMAME 2005
Definition (Metric field) A metric field x → Mx is a field of positive definite matrices of R2×2 .
Length and distance 1/2 R1 Riemannian distance: dM (a, b) = inf γ 0 γ 0 (t), Mγ(t) γ 0 (t) dt, where γ is a C 1 path satisfying γ(0) = a and γ(1) = b. In practice (approximation) : γ(t) = a + t(b − a) 1/2 R1 thus dM (a, b) := 0 (b − a), Ma+t(b−a) (b − a) dt dM is a length but not a distance!
Why using this formalism? Construction of unit mesh: each edge lenght is 1 using dM . Mesh adaptation only requires the choice of M (not easy). Metric intersection allows to combine various refinement information (geometry, physics,...) CEA | Barcelona, July 2014 | PAGE 5/11
Metric formalism Metric operations Intersection (isotropic case): M = max(|λ1 |, |λ2 |)I2 , where Mi = |λi |I2 . 1 Interpolation (eg: harmonic mean): Mt = 1−t I2 , where Mi = |λi |I2 . + |λt2 | |λ1 |
Metric evaluation: geometric error estimate H: Hessian of quantities at vertices M = P −1 |Λ|P, where H = P −1 ΛP and Λ =
λ1 0
0 λ2
.
Here we only consider the isotropic case M = max(|λ1 |, |λ2 |)I2 . Prescribed length: h = √1λ . Metric filtering ˜= Interpolation error: λ
c|λ| ,
2
d with c = 2(d+1) 2 and prescribed error: . ˜ = min max c|λ| , 2 1 Edge length filtering: λ , h21 . h max
min
Metric smoothing to avoid h-schock. CEA | Barcelona, July 2014 | PAGE 6/11
Adaptation loop
1 Edge swapping
[none boundaries nor interfaces]
Compute edges that require swapping Priority to edges with smallest ids Swap and remap
2 Edge collapsing Compute edges to remove Priority smallest then to smallest ids Collapse and remap Edge swapping 1
3 Edge collapsing 4 Edge cleaning 5 Edge splitting
Repeat 2 until convergence
[none boundaries nor interfaces] (same as collapsing for very small edges) [boundaries and interfaces]
Compute edges to split Priority to largest then to smallest ids Split and remap Edge swapping 1
6 Edge splitting
Repeat 1 until convergence
[boundaries and interfaces]
Repeat 5 until convergence
[none boundaries nor interfaces] CEA | Barcelona, July 2014 | PAGE 7/11
Triple-point problem Initial data
G B R
ρ=1 p=1 γ = 1.5
ρ = 0.125 p = 0.1 γ = 1.5
ρ=1 p = 0.1 γ = 1.4
Adaptation criteria: ρ, u, E . hmin = 10−2 . CEA | Barcelona, July 2014 | PAGE 8/11
Triple-point problem Mixing / hmin = 2 × 10−2 / t = 5s / Massic concentration of R
Eucclhyd
Glace
CEA | Barcelona, July 2014 | PAGE 8/11
Triple-point problem Youngs / hmin = 2 × 10−2 / t = 5s / Massic concentration of R
Eucclhyd
Glace
CEA | Barcelona, July 2014 | PAGE 8/11
Triple-point problem Mixing / hmin = 1 × 10−2 / t = 5s / Massic concentration of R
Eucclhyd
Glace
CEA | Barcelona, July 2014 | PAGE 8/11
Triple-point problem Youngs / hmin = 1 × 10−2 / t = 5s / Massic concentration of R
Eucclhyd
Glace
CEA | Barcelona, July 2014 | PAGE 8/11
Triple-point problem Discussion Small numerical dissipation Low CPU overhead (≈ 4 times cost of one step second-order hydro scheme)
Total number of cells vs number of remeshing patterns per timestep Example: Youngs / Eucclhyd / hmin = 2 × 10−2 Most of the mesh is unchanged each timestep
100000 ’NumberOfCells’ ’NumberOfConnectivityChanges’
Remapping becomes cheap, whichever (local) method is used
10000
1000
100
Costly step is metric evaluation
10
CEA | Barcelona, July 2014 | PAGE 8/11
1 0
1
2
3
4
5
“Mixer” test
Purpose Lagrangian/ALE/Eulerian standard schemes cannot perform this calculation Usually requires sophisticated domain decomposition like approaches or very low order method such as fictitious domain One can easily imagine trickier extensions of this test Natural (easy?) using mesh adaptation
no reference solution =⇒ robustness/flexibility test
CEA | Barcelona, July 2014 | PAGE 9/11
“Mixer” test
Description / Initial mesh
CEA | Barcelona, July 2014 | PAGE 9/11
“Mixer” test
Description / Initial mesh
0.2 8
?
6 6
ρ = 0.1
6
ρ=1
6
θ˙ = 74
θ˙ = 1
4 3.6
2
? ρ = 10
? ? 2 u = 0, p = 1, γ = 1.4. Symmetry on external boundaries. Normal velocity on rigid bars. CEA | Barcelona, July 2014 | PAGE 9/11
“Mixer” test
Mixing / t = 2s / hmin = 10−2
CEA | Barcelona, July 2014 | PAGE 9/11
“Mixer” test
Youngs / t = 2s / hmin = 10−2
CEA | Barcelona, July 2014 | PAGE 9/11
“Mixer” test
Total number of cells vs number of remeshing patterns per timestep 100000 ’NumberOfCells’ ’NumberOfConnectivityChanges’
10000
1000
100
10
1 0
0.5
1
1.5
2
CEA | Barcelona, July 2014 | PAGE 9/11
Conclusions Conclusions Metric-based triangular mesh adaptation for semi-Lagrangian flows Very robust method Low cost: ≈ 4 to 5 times Lagrangian scheme Low numerical dissipation
Future work Mesh adaptation Improve metric evaluation (especially at boundaries, get rid of “spurious” mesh refinement) Anisotropic metric field: benefit for Lagrangian flows? Cost/improvement?
Interface reconstruction Impose fine mesh in mixing region (when using interface reconstruction) Test more clever interface reconstruction methods: what is to expect since mesh modifications in mixing zones is a rare event?
Second-order remapping: evaluate benefit (knowing that it will be cheap) CEA | Barcelona, July 2014 | PAGE 10/11
Commissariat ` a l’´ energie atomique et aux ´ energies alternatives Centre de Saclay | 91191 Gif-sur-Yvette Cedex T. +33 (0)1 69 08 66 30 | F. +33 (0)1 69 08 66 30 ´ Etablissement public ` a caract` ere industriel et commercial RCS Paris B 775 685 019
CEA DAM