26
Tetrahedral Mesh Adaptation for Lagrangian Shock Hydrodynamics D. A. Ibanez, E. Love, T. E. Voth, J. R. Overfelt, N. V. Roberts, G. A. Hansen a a 1443 Computational Multi-Physics Department, Sandia National Laboratories, New Mexico, P.O. Box 5800, Albuquerque, NM 87185-1321 Abstract Lagrangian shock hydrodynamics simulations will fail to proceed past a certain time if the mesh is approaching tangling. A common solution is an Arbitrary Lagrangian Eulerian (ALE) form, in which the mesh is improved (remeshing) and the solution is remapped onto the improved mesh. The simplest remeshing techniques involve moving only the nodes of the mesh. More advanced remeshing techniques involve altering the mesh connectivity in portions of the domain in order to prevent tangling. Work has been done using Voronoi-based polygonal mesh generators and 2D quad/triangle mesh adaptation. This paper presents the use of tetrahedral mesh adaptation methods as the remeshing step in an otherwise Lagrangian finite element shock hydrodynamics code called Alexa. Keywords: Shock Hydrodynamics, ALE, Mesh Adaptation, Multi-Material, Remap 1. Introduction When simulating shock hydrodynamics, Lagrangian methods (those in which the mesh follows the material) have several key benefits compared to Eulerian methods (those in which the material moves past a fixed mesh), including ease of formulation and implementation, decreased diffusion, better interface tracking, and more theoretically sound treatment of solid materials including plasticity. However, Lagrangian methods have a fundamental limitation in that for most non-trivial simulations there is a point where elements will approach an inverted state, and via the CFL constraint the time step will go to zero, preventing the simulation from proceeding past the point where the element would tangle. Several researchers to date have thus devised methods in which, when the mesh comes close to tangling, a new mesh is somehow created, and the solution is “remapped” from the old mesh to the new mesh. The simulation then continues using the pure Lagrangian method based on the new mesh. One of the easiest ways to obtain this new mesh is by “relaxing” the current mesh by moving its nodes to a state where its elements are further from tangling, possibly moving them to their original positions. Preprint submitted to Elsevier November 12, 2018

Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Tetrahedral Mesh Adaptation for Lagrangian ShockHydrodynamics

D. A. Ibanez, E. Love, T. E. Voth, J. R. Overfelt, N. V. Roberts, G. A.Hansena

a 1443 Computational Multi-Physics Department, Sandia National Laboratories, NewMexico, P.O. Box 5800, Albuquerque, NM 87185-1321

Abstract

Lagrangian shock hydrodynamics simulations will fail to proceed past a certaintime if the mesh is approaching tangling. A common solution is an ArbitraryLagrangian Eulerian (ALE) form, in which the mesh is improved (remeshing)and the solution is remapped onto the improved mesh. The simplest remeshingtechniques involve moving only the nodes of the mesh. More advanced remeshingtechniques involve altering the mesh connectivity in portions of the domain inorder to prevent tangling. Work has been done using Voronoi-based polygonalmesh generators and 2D quad/triangle mesh adaptation. This paper presentsthe use of tetrahedral mesh adaptation methods as the remeshing step in anotherwise Lagrangian finite element shock hydrodynamics code called Alexa.

Keywords: Shock Hydrodynamics, ALE, Mesh Adaptation, Multi-Material,Remap

1. Introduction

When simulating shock hydrodynamics, Lagrangian methods (those in whichthe mesh follows the material) have several key benefits compared to Eulerianmethods (those in which the material moves past a fixed mesh), including ease offormulation and implementation, decreased diffusion, better interface tracking,and more theoretically sound treatment of solid materials including plasticity.However, Lagrangian methods have a fundamental limitation in that for mostnon-trivial simulations there is a point where elements will approach an invertedstate, and via the CFL constraint the time step will go to zero, preventing thesimulation from proceeding past the point where the element would tangle.

Several researchers to date have thus devised methods in which, when themesh comes close to tangling, a new mesh is somehow created, and the solution is“remapped” from the old mesh to the new mesh. The simulation then continuesusing the pure Lagrangian method based on the new mesh. One of the easiestways to obtain this new mesh is by “relaxing” the current mesh by moving itsnodes to a state where its elements are further from tangling, possibly movingthem to their original positions.

Preprint submitted to Elsevier November 12, 2018

Page 2: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

More advanced remeshing approaches have also been used in which a subsetof the mesh (typically the subset closest to tangling) is replaced with a new meshof different connectivity altogether which is as far from tangling as possible.

The work in this paper focuses on the use of local tetrahedral mesh modifica-tions as a viable way to implement the remeshing step, and present a Lagrangianfinite element formulation and remapping algorithms that work together withthese tetrahedral modifications to form an effective shock hydrodynamics solu-tion.

We used (and contributed to) the Omega h 1 library to provide our tetrahe-dral mesh adaptation mechanics, and our overall shock hydrodynamics code iscalled Alexa.

2. Related Work

Crowley presented work done at Lawrence Livermore National Laboratoryto develop a shock hydrodynamics code which employed a variety of local meshmodification methods on a 2D mesh composed of quads and triangles [1]. Hedescribes the trade-offs between the convenience of node-centered schemes versusthe ability to run multi-material simulations and presents a wide variety ofmodifications that can be applied to the mixed-topology mesh.

Loubere, Maire, Shashkov, Breil, and Galera [2] presented a method whichbegins with a 2D Lagrangian hydrodynamics code that uses a staggered griddiscretization on general polygonal elements (built from the Voronoi tesselationof a set of generator points), and adds a remeshing step (which they refer toas the “rezone phase”), which generates a new mesh where needed by movinggenerator points and recomputing the Voronoi tesselation. Fields (e.g. massdensity) then need to be remapped onto the new mesh. Since the connectivityof the new mesh can be arbitrarily different from that of the old mesh, the abilityto intersect two arbitrary polygons is necessary to remap fields conservativelybetween the two meshes. Some of the earliest work on such intersection ofpolyhedra (in 3D) is by Grandy [3].

Simplicial meshes are those composed of triangles, tetrahedra, or in thetrivial 1D case, 1D segments (edges). Local mesh modification operations havebeen developed that are able to modify such meshes to satisfy certain resolutionor quality requests [4]. We review the details of these operations in Section4. These operations have formed the basis for mesh adaptation techniqueswhich modify simplicial meshes to minimize the number of degrees of freedomrequired to solve a problem at a certain accuracy by changing element sizesand aspect ratios. The success of simplicial mesh adaptation is most evident inthe Computational Fluid Dynamics (CFD) community whose turbulent Navier-Stokes solutions are preferably resolved using very high aspect ratio elements.This is exemplified by the work of Frey and Alauzet [5].

1Available at https://github.com/ibaned/omega_h

2

Page 3: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Del Pino used the 2D (triangle) versions of these simplicial modification op-erations as the remeshing component of an otherwise Lagrangian shock hydro-dynamics simulation [6]. Like Loubere et al., Del Pino develops a technique forintersecting polygons and uses this to implement a conservative remap scheme.Our work can be viewed in part as an extension of Del Pino’s work to 3D(tetrahedral) elements.

3. Lagrangian Finite Element

This section describes the Lagrangian finite element formulation which weuse to advance in time in between mesh adaptations. We had several key con-straints that influenced how we formulated our finite element discretization:

1. Geometrically, each element must be a flat-sided simplex. This is a con-straint imposed by the mesh adaptation techniques being used.

2. Discontinuities between materials must be representable, meaning it mustbe feasible to have two adjacent elements represent two different mate-rials. This is a formal expression of our need to simulate multi-materialscenarios.

3. It should be feasible to model compressible gases.

4. It should be feasible to model elastic and plastic solids.

In the pseudo-code blocks to follow, most of the statements express an oper-ation which is acting on every element of the mesh, or on every node. This canusually be inferred from the variable on the left hand side of the assignment.

For our time integration, we use the midpoint predictor-corrector time in-tegrator of Love et al. [7]. This time integrator is stable for even numbers ofpredictor-corrector iterations, and is second-order accurate in time. The core ofthis algorithm is the corrector update step shown in Algorithm 7.

To satisfy the flat-sided constraint, we use a piecewise linear (nodal) dis-cretization using 4-noded tetrahedra for kinematic variables, in particular ve-locity. To be able to represent discontinuities across materials, we keep thermo-dynamic variables at element centers. These include pressure, internal energy,and mass density.

Table 1 lists the symbols we will use to describe our finite element formula-tion, including key physical variables.

All nodal variables are denoted with a superscript h, other variables areeither global constants or cell variables. For example, ph is pressure at nodes,while p is pressure at cell centers. Subscripts are used to denote the point intime that the variable represents. For example, pn denotes pressure at timetn and pn+ 1

2is the pressure at time tn+ 1

2= (tn+1 + tn)/2. Superscripts in

parentheses denote the iteration of the predictor-corrector time integrator. For

example, p(i)n+1 is the prediction of pressure at time tn+1 during iteration i of

the predictor-corrector method, while p(i+1)n+1 is the corresponding prediction at

the next predictor-corrector iteration. Vectors and tensors are bold-faced, while

3

Page 4: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

scalars are not. Lagrangian (material perspective) time derivatives are denotedby dots (e.g. vh).

Since we use linear tetrahedra, we introduce a Variational Multi-Scale (VMS)stabilization inspired by the works of Scovazzi et al. [8, 9]. In particular, weadopt the fine-scale pressure concept described in [8] and the fine-scale displace-ment concept described in [9]. Algorithm 4 shows the computation of thesequantities during one predictor-corrector iteration.

In order to help prevent element locking, we project pressure onto the nodeswhile including a stabilizing contribution from fine-scale displacement as intro-duced in [9]. This projection is presented in Algorithm 5.

For shock-capturing, we use the same stress-tensor artificial viscosity termintroduced in [8]. We omit the artificial heat flux term because it was non-trivialto express it in our staggered discretization, as opposed to the original node-centered discretization. Our computation of artificial viscosity is described inAlgorithm 6.

Algorithm 1 combines the other algorithms to show our full Lagrangianmethod including time stepping and predictor-corrector loops. Our definitionof total stress includes a contribution from the projected pressure, a VMS fine-scale pressure contribution, and a tensorial artificial viscosity as shown in line16 of Algorithm 1.

For plasticity modeling, we use an updated-Lagrangian formulation to tracka deformation gradient value at each element. It is initially the identity F = I,and is updated at each time step as shown in line 21 of Algorithm 1.

A more in-depth description of our Lagrangian method, including conver-gence and non-adaptive results on standard problems, will be the subject of afuture publication.

4

Page 5: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Table 1: Nomenclature for the Lagrangian method

d Spatial dimensionxh Nodal coordinates (a d-dimensional vector at each node)vh Nodal velocitiesfh Nodal internal forcesρ Cell mass densitiesε Cell specific internal energies (internal energy per unit mass)F Cell deformation gradientsu′ Cell fine-scale displacementsσ Cell stresses, as given by the material model and equation of stateσ Cell algorithmic stresses, include contributions from

algorithmic pressure, fine-scale pressure, and artificial viscosityK Cell bulk moduli, as given by the material model and equation of stateM Cell wave moduli, as given by the material model and equation of state.

In the case of ideal gases, this is the same as the bulk modulus.For solid materials, this is the plane wave modulus.In general, it should be the modulus which corresponds tothe speed of the fastest plane wave which can propagate in the medium.

Y The combined “primary” state x,v, ρ, ε,F,u′, introduced for brevityZ The combined “secondary” state Y,σ,M,K, introduced for brevityimax Number of predictor-corrector iterations to execute per time stepnmax Maximum number of time steps to executetmax Maximum time to reachCart;1 Linear artificial bulk viscosityCart;2 Quadratic artificial bulk viscosityCCFL Courant-Friedrichs-Lewy number.

multiplies the maximum stable time deltato obtain the actual time delta to use.

Cτ Stabilization parameter, scales the effect of stabilization termsV h Nodal co-volumes, defined as (the sum of) (1/(d+ 1)) of

each adjacent element volume,where d+ 1 is the number of nodes per element

V Cell volumesm Cell masses (constant in time)ph Nodal “algorithmic” pressures,

include fine-scale displacement contributionsmh Node masses (also constant in time), the integral of

density over the nodal co-volumec Cell wave speedsHmax Given nodal coordinates, computes for each cell

the length of its longest edgeI Interpolates values to cells from adjacent nodesE Cell workNh Basis functions of nodes

5

Page 6: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Algorithm 1 Runs a simulation using the Alexa Lagrangian finite elementmethod

1: function Simulate2: User specifies imax, nmax, tmax, Cart;1, Cart;2, CCFL, Cτ , and Y0

3: V0 ← V(x0), m← V0ρ0, V h0 ←∫

Ω

N0 dΩ, mh ←∫

Ω

N0ρ0 dΩ

4: (σ0,M0,K0)← MaterialModel(Y0)5: ComputeTimeDelta(0)6: n← 0, t← 07: while (n < nmax) and (t < tmax) do

8: Z(0)n+1 ← Zn

9: DeriveMidpointProperties(n, 0)

10: ph;(−1)

n+ 12

= 0, ˙ph;(−1)

n+ 12

= 0

11: ComputeStabilization(n, 0)12: ComputePressure(n, 0)13: for i = 0, . . . , imax − 1 do14: ComputeArtificialViscosity(n, i)15: . Compute algorithmic stress

16: σ(i)

n+ 12

← σ(i)

n+ 12

−(

tr(σ

(i)

n+ 12

)/d+ p

(i)n+1 + (p′)

(i)

n+ 12

)I + σ

(i)art;n+1

17: . Compute internal force

18: fh;(i)

n+ 12

(∫Ω

(i)

n+ 12

(∇Nh;(i)

n+ 12

)))dΩ

19: fh;(i)

n+ 12

← NaturalBoundaryConditions(fh;(i)

n+ 12

)20: ApplyCorrectorStep(n, i)

21: F(i+1)n+1 ← (∇nxh;(i+1)

n+1 )(Fn)

22:

(i+1)n+1 ,M

(i+1)n+1 ,K

(i+1)n+1

)← MaterialModel

(Y

(i+1)n+1

)23: DeriveMidpointProperties(n, i+ 1)24: ComputeStabilization(n, i+ 1)25: ComputeNodalPressure(n, i+ 1)26: end for27: accept state Zn+1 ← Z

(imax)n+1

28: ComputeTimeDelta(n+ 1)29: t← t+ (∆t)n, n← n+ 130: end while31: end function

6

Page 7: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Algorithm 2 Use finite differences to compute values and time derivatives atthe midpoint

1: function DeriveMidpointProperties(n, i)

2: Z(i)

n+ 12

← (Z(i)n+1 + Zn)/2 . Average midpoint state

3: . Recompute time derivatives

4: σ(i)

n+ 12

←(σ

(i)n+1 − σn

)/(∆t)n

5: (u′)(i)

n+ 12

←(

(u′)(i)n+1 − (u′)n

)/(∆t)n

6: vh;(i)

n+ 12

←(vh;(i)n+1 − vhn

)/(∆t)n

7: c(i)

n+ 12

=√M

(i)

n+ 12

/ρ(i)

n+ 12

. wave speed: use plane wave modulus

8: end function

Algorithm 3 Compute the maximum stable time step, accounting for artificialviscosity and stabilization

1: function ComputeTimeDelta(n)2: Vn ← (∇n · vhn)3: hmax;n ← Hmax

(xhn)

4: hart;n ← hmax;n

5: hvms;n ← hmax;n

6: cn =√Mn/ρn . wave speed: use plane wave modulus

7: νart;0 ← Cart;1|Vn| (hart;n)2

+ Cart;2cnhart;n

8: . current Alexa sets Cτ = 1 below, which is safely conservative so longas Cτ ≤ 1

9: (∆t)n = CCFL min((Hmin

(xhn))2

/(νart;n +

√ν2

art;n + Cτ cnh2vms;n

))10: end function

Algorithm 4 Fine-scale displacement and pressure updates for stabilization

1: function ComputeStabilization(n, i)

2: τ(i)

n+ 12

← CτHmax

(xh;(i)

n+ 12

)/c

(i)

n+ 12

3: v(i)

n+ 12

← I(vh;(i)

n+ 12

)

4: (v′)(i)

n+ 12

← −(τ

(i)

n+ 12

/ρ(i)

n+ 12

)(ρ

(i)

n+ 12

v(i)

n+ 12

−(∇(i)

n+ 12

ph;(i−1)

n+ 12

))5: (u′)

(i)n+1 ← (u′)n + (∆t)nK

(i)

n+ 12

(v′)(i)

n+ 12

6: (p′)(i)

n+ 12

← −τ (i)

n+ 12

(˙p(i−1)

n+ 12

+K(i)

n+ 12

(∇(i)

n+ 12

· vh;(i)

n+ 12

))7: end function

7

Page 8: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Algorithm 5 Pressure projection to and from nodes with stabilization

1: function ComputePressure(n, i)

2: p(i)

n+ 12

← − tr(σ

(i)

n+ 12

)/d

3: p(i)

n+ 12

← − tr(σ

(i)

n+ 12

)/d

4: ph;(i)

n+ 12

←(∫

Ω

Nh;(i)

n+ 12

p(i)

n+ 12

)/V

h;(i)

n+ 12

5: ph;(i)

n+ 12

←(∫

Ω

Nh;(i)

n+ 12

p(i)

n+ 12

)/V

h;(i)

n+ 12

6: ph;(i)

n+ 12

← ph;(i)

n+ 12

−(∫ (

∇Nh;(i)

n+ 12

)·(−(u′)

(i)

n+ 12

))/V

h;(i)

n+ 12

7: ˙ph;(i)

n+ 12

← ph;(i)

n+ 12

−(∫ (

∇Nh;(i)

n+ 12

)·(−(u′)

(i)

n+ 12

))/V

h;(i)

n+ 12

8: . Interpolate pressure back to elements

9: p(i)n+1 = I

(ph;(i)n+1

)10: ˙p

(i)n+1 = I

(˙ph;(i)n+1

)11: end function

Algorithm 6 Tensorial stress artificial viscosity

1: function ComputeArtificialViscosity(n, i)

2: V(i)

n+ 12

← ∇ · vh;(i)

n+ 12

3: . The directional hart of Scovazzi, Shadid, Love, and Rider 2010 wasconsidered but not used because it introduces strange noise

4: . The largest hart was chosen because without it Sedov would not runmore than a few hundred steps

5: h(i)

art;n+ 12

← Hmax

(xh;(i)

n+ 12

)6: δ

(i)

n+ 12

←(V

(i)

n+ 12

< 0 ? 1 : 0)

7: ν(i)art;n+1 ← Cart;1|V (i)

n+ 12

|(h

(i)

art;n+ 12

)2

+ Cart;2c(i)

n+ 12

h(i)

art;n+ 12

8: σ(i)art;n+1 ← δ

(i)

n+ 12

(−ρ(i)

n+ 12

ν(i)art;n+1

(((∇vh;(i)

n+ 12

)+((∇vh;(i)

n+ 12

))T)/2

))9: . Artificial heat flux is omitted because it was non-trivial to implement

for the staggered discretization10: end function

4. Tetrahedral Mesh Adaptation

We make use of the open-source Omega h library which is designed to applysimplex mesh modifications based on a “metric field” of desired mesh resolutionsand a minimum desired element quality. The term “metric” comes from a widely

8

Page 9: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Algorithm 7 The core of the midpoint predictor-corrector time integrator

1: function ApplyCorrectorStep(n, i)

2: ah;(i)

n+ 12

= fh;(i)

n+ 12

/m

3: ah;(i)

n+ 12

← EssentialBoundaryConditions(ah;(i)

n+ 12

)4: v

h;(i+1)n+1 = vhn − (∆t)na

h;(i)

n+ 12

5: W(i,i+1)n+1 = V

(i)

n+ 12

((∇(i)

n+ 12

vh;(i+1)

n+ 12

): σ

(i)

n+ 12

)6: ε

(i+1)n+1 = εn − (∆t)nW

(i,i+1)

n+ 12

/m

7: xh;(i+1)n+1 ← xhn + (∆t)nv

h;(i+1)

n+ 12

8: V(i+1)n+1 ← V

(x

(i+1)n+1

)9: ρ

(i+1)n+1 ← m/V

(i+1)n+1

10: end function

used specification for anisotropic simplicial meshes. Since this paper presentsonly work with isotropic meshes, we will present a simplified description of themetric for this special case. Although it is usually represented as a 3× 3 tensorin 3D, in the isotropic case it is a diagonal tensor with all equal eigenvalues, so itmay be replaced with a scalarM = 1/h2, where h is the desired resolution (edge

length) at a given point in space. The length of an edge−→ab in metric space can

be measured as lM =√

(b− a)TM(b− a). Note that if an edge has Euclideanlength 2h, then its length in metric space is 2. In other words the metric lengthis a relative measure of the edge’s actual Euclidean length relative to its desiredEuclidean length. This measure drives most of the operations involved in meshadaptation.

Another important measure is that of element quality. We can define thequality of a tetrahedron by comparing its volume to the cube of its “average”edge length, as described in (1), where V is the volume of the tetrahedron andli the length of one of its edges i ∈ [1, 6]. Note that the quality of an equilateraltetrahedron is 1.

Q =

V

1√72·(

16

∑6i=1 l

2i

) 32

23

(1)

Omega h employs the following simplex mesh modifications, which we willalso refer to as topological modifications because they change the connectiv-ity of the mesh, and as cavity modifications because each one only alters theconnectivity in a small local cavity defined by a few adjacent elements:

1. Edge split: A single edge of the mesh is split in half (measured in pureEuclidean space, not metric space) , and all adjacent elements are also splitin half in a conformal way. This operation is primarily used to increase

9

Page 10: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Table 2: Illustrations of the three mesh modification operations

Operation 2D Example 3D Example

Split

Collapse

Swap

mesh resolution. In particular, Omega h will attempt this operation onedges whose metric length lM exceeds

√2.

2. Edge collapse: A vertex of the mesh is moved across an edge onto anothervertex, reducing the size of the edge and any adjacent elements to zero.These elements are removed from the mesh. This operation is primarilyused to decrease mesh resolution, and sometimes to improve quality. Inparticular, Omega h will attempt this operation on edges whose metriclength lM is less than 1/

√2.

3. Edge swap: the set of elements around an edge is removed, and replacedwith a new set of elements that fit the same volume, such that the originaledge is not recreated. This operation is primarily used to improve meshquality. In particular, Omega h will attempt this operation if the set ofelements contains an element with quality Q less than 0.3.

Table 2 shows illustrations of each of these operations in both 2D (triangle)and 3D (tetrahedron) cases.

Although more operations exist in the literature [10, 11], we find these threesufficient to satisfy the resolution and quality requirements for our shock hydro-dynamics application.

Mesh adaptation must take care not to violate certain high-level propertiesof the approximate domains when making these modifications. For example, anaive edge collapse may remove all elements representing a given material regionfrom the mesh, thus artificially causing that region to disappear. Unrestrictededge swaps can also cause such issues. Thus, Omega h will only perform edgeswaps when their cavity is entirely within one material region, and will onlyperform edge collapses when the topology of interfaces between material regionsis preserved. However, edge collapses whose cavities include multiple materialregions are allowed and even necessary in some cases (the quality of triangles

10

Page 11: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

on the interface can restrict the quality of tetrahedra inside the region).Del Pino cites the complexity of implementing 3D tetrahedral edge swaps as

a barrier for going from 2D to 3D [6]. As Table 2 shows, the 2D edge swap hasonly one possible outcome, while the 3D edge swap has arbitrarily many possibleoutcomes, because it reduces to the problem of triangulating an arbitrary convex2D polyhedron. Omega h has a limited but efficient implementation of edgeswapping based on work by Freitag and Ollivier-Gooch [12], which can handlecases of up to 7 tetrahedra adjacent to the target edge. All possible topologicaloutcomes for each case of N ≤ 7 adjacent tetrahedra are enumerated (combiningduplicates under rotational symmetry) and stored as tables. All topologicallyunique tetrahedra that could be formed are also stored as tables, allowing fastevaluation and caching of tetrahedra which appear in many possible outcomes.Since the goal is to improve the quality of elements per (1), possible outcomesare quickly eliminated once a unique tetrahedron is discovered whose quality islower than desired. A more detailed description of this approach is given byFreitag and Ollivier-Gooch [12].

Our mesh adaptation guarantees that all elements are above a certain desiredmesh quality (> 28% as measured by (1)) at all points during the simulation(Lagrangian steps and during adaptation and remap). When using adaptation,elements do not go below this level of quality, let alone tangle. This holds forall results in Section 7.

5. Field Remap

We remap the following fields during mesh adaptation: velocity (v), massdensity (ρ), internal energy per unit volume (ρε), deformation gradient (F), andfine scale displacement (u′).

In addition, we exactly conserve the following quantities as integrals oversingle-material bodies during remap: mass, internal energy, and momentum.While many aspects of our remap are localized, there are parts of the algorithmwhich are non-local and risk transferring quantities faster than the wave speed.

Note that there is a mismatch in conservation between the Lagrangianmethod and the remap algorithm: the Lagrangian method conserves total en-ergy, while the remap algorithm conserves internal energy. Together they con-serve neither exactly. It remains future work for us to reconcile these conserva-tion properties such that the overall code conserves an energy quantity, possiblyusing ideas from the remap method of Burton et al. [13].

One of the key benefits of using local cavity modifications on the mesh isthat remapping can be done during mesh modification, and can in most casesbe restricted to alter only the interior of the cavity being modified.

Another benefit of cavity-level remap is that it can be tailored to specificproperties of each modification. For example, it is usually possible to define aremap algorithm such that an edge split is exact and introduces no error. Thisis fundamentally because the new discretization space is strictly a superset ofthe old discretization space in the cavity.

11

Page 12: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

5.1. Edge Split: velocity and densities

The basic velocity remap algorithm is straightforward: when an edge splitoccurs, the velocity at the new node is the average of the velocities at theendpoints of the edge. This is consistent with the claim above that edge splitsincur no remap error, since the variation of velocity over the cavity remains thesame.

a<latexit sha1_base64="ohtGmP/JOKjYP9EU54/s0TBxXiY=">AAAB6HicbVBNS8NAEJ3Ur1q/qh69LBbBU0lEaI8FLx5bsB/QhrLZTtq1m03Y3Qgl9Bd48aCIV3+SN/+N2zYHbX0w8Hhvhpl5QSK4Nq777RS2tnd294r7pYPDo+OT8ulZR8epYthmsYhVL6AaBZfYNtwI7CUKaRQI7AbTu4XffUKleSwfzCxBP6JjyUPOqLFSiw7LFbfqLkE2iZeTCuRoDstfg1HM0gilYYJq3ffcxPgZVYYzgfPSINWYUDalY+xbKmmE2s+Wh87JlVVGJIyVLWnIUv09kdFI61kU2M6Imole9xbif14/NWHdz7hMUoOSrRaFqSAmJouvyYgrZEbMLKFMcXsrYROqKDM2m5INwVt/eZN0bqqeW/Vat5VGPY+jCBdwCdfgQQ0acA9NaAMDhGd4hTfn0Xlx3p2PVWvByWfO4Q+czx/AW4zb</latexit><latexit sha1_base64="ohtGmP/JOKjYP9EU54/s0TBxXiY=">AAAB6HicbVBNS8NAEJ3Ur1q/qh69LBbBU0lEaI8FLx5bsB/QhrLZTtq1m03Y3Qgl9Bd48aCIV3+SN/+N2zYHbX0w8Hhvhpl5QSK4Nq777RS2tnd294r7pYPDo+OT8ulZR8epYthmsYhVL6AaBZfYNtwI7CUKaRQI7AbTu4XffUKleSwfzCxBP6Jjy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(va + vb)

<latexit sha1_base64="eLMhaQpTEZHpC2Kt0WerRCmAUFI=">AAACDXicbVDLSsNAFJ3UV62vqEs3g1WoCCUpgm6EohuXFewDmhAm00k7dDIJM5NICfkBN/6KGxeKuHXvzr9x2mah1QMXDufcy733+DGjUlnWl1FaWl5ZXSuvVzY2t7Z3zN29jowSgUkbRywSPR9JwignbUUVI71YEBT6jHT98fXU76ZESBrxOzWJiRuiIacBxUhpyTOPUi9zRAg5uc/hJXQCgXBm51kjr6Uegqcw9fwTz6xadWsG+JfYBamCAi3P/HQGEU5CwhVmSMq+bcXKzZBQFDOSV5xEkhjhMRqSvqYchUS62eybHB5rZQCDSOjiCs7UnxMZCqWchL7uDJEayUVvKv7n9RMVXLgZ5XGiCMfzRUHCoIrgNBo4oIJgxSaaICyovhXiEdKBKB1gRYdgL778l3Qadduq27dn1eZVEUcZHIBDUAM2OAdNcANaoA0weABP4AW8Go/Gs/FmvM9bS0Yxsw9+wfj4BmcamnY=</latexit><latexit sha1_base64="eLMhaQpTEZHpC2Kt0WerRCmAUFI=">AAACDXicbVDLSsNAFJ3UV62vqEs3g1WoCCUpgm6EohuXFewDmhAm00k7dDIJM5NICfkBN/6KGxeKuHXvzr9x2mah1QMXDufcy733+DGjUlnWl1FaWl5ZXSuvVzY2t7Z3zN29jowSgUkbRywSPR9JwignbUUVI71YEBT6jHT98fXU76ZESBrxOzWJiRuiIacBxUhpyTOPUi9zRAg5uc/hJXQCgXBm51kjr6Uegqcw9fwTz6xadWsG+JfYBamCAi3P/HQGEU5CwhVmSMq+bcXKzZBQFDOSV5xEkhjhMRqSvqYchUS62eybHB5rZQCDSOjiCs7UnxMZCqWchL7uDJEayUVvKv7n9RMVXLgZ5XGiCMfzRUHCoIrgNBo4oIJgxSaaICyovhXiEdKBKB1gRYdgL778l3Qadduq27dn1eZVEUcZHIBDUAM2OAdNcANaoA0weABP4AW8Go/Gs/FmvM9bS0Yxsw9+wfj4BmcamnY=</latexit><latexit sha1_base64="eLMhaQpTEZHpC2Kt0WerRCmAUFI=">AAACDXicbVDLSsNAFJ3UV62vqEs3g1WoCCUpgm6EohuXFewDmhAm00k7dDIJM5NICfkBN/6KGxeKuHXvzr9x2mah1QMXDufcy733+DGjUlnWl1FaWl5ZXSuvVzY2t7Z3zN29jowSgUkbRywSPR9JwignbUUVI71YEBT6jHT98fXU76ZESBrxOzWJiRuiIacBxUhpyTOPUi9zRAg5uc/hJXQCgXBm51kjr6Uegqcw9fwTz6xadWsG+JfYBamCAi3P/HQGEU5CwhVmSMq+bcXKzZBQFDOSV5xEkhjhMRqSvqYchUS62eybHB5rZQCDSOjiCs7UnxMZCqWchL7uDJEayUVvKv7n9RMVXLgZ5XGiCMfzRUHCoIrgNBo4oIJgxSaaICyovhXiEdKBKB1gRYdgL778l3Qadduq27dn1eZVEUcZHIBDUAM2OAdNcANaoA0weABP4AW8Go/Gs/FmvM9bS0Yxsw9+wfj4BmcamnY=</latexit><latexit sha1_base64="eLMhaQpTEZHpC2Kt0WerRCmAUFI=">AAACDXicbVDLSsNAFJ3UV62vqEs3g1WoCCUpgm6EohuXFewDmhAm00k7dDIJM5NICfkBN/6KGxeKuHXvzr9x2mah1QMXDufcy733+DGjUlnWl1FaWl5ZXSuvVzY2t7Z3zN29jowSgUkbRywSPR9JwignbUUVI71YEBT6jHT98fXU76ZESBrxOzWJiRuiIacBxUhpyTOPUi9zRAg5uc/hJXQCgXBm51kjr6Uegqcw9fwTz6xadWsG+JfYBamCAi3P/HQGEU5CwhVmSMq+bcXKzZBQFDOSV5xEkhjhMRqSvqYchUS62eybHB5rZQCDSOjiCs7UnxMZCqWchL7uDJEayUVvKv7n9RMVXLgZ5XGiCMfzRUHCoIrgNBo4oIJgxSaaICyovhXiEdKBKB1gRYdgL778l3Qadduq27dn1eZVEUcZHIBDUAM2OAdNcANaoA0weABP4AW8Go/Gs/FmvM9bS0Yxsw9+wfj4BmcamnY=</latexit>

During an edge split, each affected “parent” element is cut into two “child”elements of equal volume. Therefore, we assign the parent element’s mass den-sity, internal energy density, deformation gradient, and fine scale displacementto both of the child elements. That is:

ρchild = ρparent Fchild = Fparent

u′child = u′parent (ρε)child = (ρε)parent.

This conserves integrals of densities and remains consistent with the principleof error-free remap for an edge split.

5.2. “Pointwise” values: deformation gradient and fine-scale displacement

The deformation gradient and fine scale displacement are remapped on acomponent-by-component basis. For each of the 9 components of the defor-mation gradient and 3 components of the fine scale displacement, we apply analgorithm to remap scalar values at element centers. In the case of edge collapsesand edge swaps, this algorithm finds a single linear polynomial over the cavitythat best fits (in a least-squares sense) the scalar values at the centroids of theelements prior to the modification. Then, for each centroid of an element afterthe modification, this linear polynomial is evaluated at that centroid to obtainthat element’s new scalar value. If Vd and Vt are the Vandermonde matricesformed by the coordinates of cell centers of the donor and target configurations,respectively, then the scalar values at target cell centers ut are given by (2).While this algorithm is good at preserving the variation of said scalar field overspace, it does not take into account any invariant properties of the deformationgradient or displacement vector. It also has no guarantees of conservation. Wetherefore consider it future work to implement better algorithms for remappingdeformation gradient and fine scale displacement which are guaranteed to pre-serve certain properties, for example the positivity of the determinant of thedeformation gradient.

c←(VTdVd

)−1VTd ud, ut ← Vtc (2)

12

Page 13: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Figure 1: Volume-weighted density remap from domain ΩD (D for Donor) to domain ΩT (Tfor Target). An integral quantity (e.g. mass) proportional to the volume of intersection |Ωa∩b|times the density in element a is transferred from element a to element b.

Put another way, if we take the scalar value of interest as f(xK), evaluated atthe centroid xK of some element K in the cavity, we solve:

g = argming∈R3,b∈R∑

K∈cavity

||f(xK)− g · xK − b||2

The vector g and scalar b then define a linear function over the cavity. Weevaluate this at each target centroid.

5.3. Collapses and swaps: integral conservation

The remap of mass density and internal energy density during edge collapsesand edge swaps requires special consideration to ensure conservation. We firstemploy an intersection-based technique that considers all elements in the cavityprior to the modification (we call these donor elements), and all elements in thecavity after the modification (we call these target elements). For each uniquepair consisting of one donor and one target element, we compute the volumeof their geometric intersection. To do this, we use a modified version of theR3D software [14], which computes intersections of polyhedra. If C is a cav-ity, E∗(C) its target elements, and E(C) its donor elements, (3) describes thevolume-weighted computation of each target element’s density given the densi-ties of donor elements and intersection volumes. An example of this process isillustrated in Figure 1.

∀t ∈ E∗(C) : ρt ←∑d∈E(C) ρd |Ωt ∩ Ωd|∑d∈E(C) |Ωt ∩ Ωd|

(3)

If the cavity’s overall domain does not change between donor and targetconfigurations, this method exactly conserves mass. There are cases, however,when an edge collapse must be performed on a boundary that is not completelyplanar, which can alter the domain (and volume) of the cavity between config-urations. As Figure 1 shows, this can lead to situations where part of a donorelement does not intersect with any target elements, or vice versa. As specifiedin (3), we choose to use only the portion of the volume of a target element

13

Page 14: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

that intersects with donor elements as the divisor in this case, which may beless than the target element’s volume. This has the effect of better preservingexisting densities (i.e. it is bounds-preserving) in the case when the volume ofthe cavity changes, but it is not conservative.

By constrast, Del Pino always divides by the full volume of the target ele-ment, which has the effect of applying a local correction to conserve mass in thecavity [6]. We find that in certain cases this can cause an excessively large andabrupt change in density (proportional to the change in cavity volume) whichcan cause non-physical shocks to form. Thus, we choose instead to add this in-tegral error to a temporary “error field” which exists throughout the adaptationprocedure, which gives us a chance to smooth the error beyond the level of onecavity.

∀t ∈ E∗(C) : ρt ←∑d∈E(C) ρdVd

|E(C)|Vt(4)

Algorithm 8 Conservative algorithm to smooth integration errors

given the error integrals e and quantity integrals m at cellsuser specifies parameters Vmin, ρmax

V ← max(|m|, Vmin) . algorithmic “volume” is integral magnitudeρ← e/V . algorithmic “error density”while ∃ρ > ρmax do

for each cell a dofor each cell b which is face-adjacent to a do

Va,b = min(Va, Vb)

ρa ← ρa + (ρb − ρa)Va,b/(Va(d+ 1))end for

end forend whilee← ρV

During adaptation, “error density” fields are remapped as shown in (4),which is always exactly conservative but is diffusive and not bounds-preserving.At the end of the adaptation procedure, we smooth the various error fields tohelp decrease their effect during the subsequent repair step. The smoothingalgorithm is listed as Algorithm 8. It distributes this error among elements inthe same material region, in proportion to the integral amount they already have(e.g. the amount of mass error associated with an element (ρmax) is up to 10%of its current mass). Since we do not allow error flux between material regions,the non-locality extends up to the full volume of a single material region. Theparameter ρmax forms a relative cap on the amount of error that each elementis allowed to support. After smoothing, the error assigned to each element issubtracted from its integral amount, restoring conservation. Figure 2 illustratesthe benefit of error smoothing in terms of preserving bounds on minimum andmaximum mass density.

14

Page 15: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Figure 2: Example of error smoothing after an adaptation which reduced the volume of thecenter sphere: (left) final mass densities with error smoothing, (right) final mass densitieswithout error smoothing.

5.4. Momentum conservation

Because we use a staggered grid (velocity and mass density use differentbasis functions), momentum is not conserved by edge collapses and edge swapseven when their cavities are within one material region. We focus on momentumevaluated at cell centers using interpolated velocity values. As with mass error inthe special case of curved boundaries, we can measure and track the momentumconservation error (at cell centers) in its own error field.

The conservation repair for momentum is similar, but instead of directly sub-tracting the smoothed error from a element-centered field, the smoothed errorin each element is used to adjust adjacent nodal velocities such that conserva-tion is restored in the resulting momentum integral. To be precise, the error inmomentum at cell centers is computed and smoothed as before, followed by eachcell donating equal parts of its momentum error to each node. Nodal momen-tum error is then divided by nodal mass, obtaining a nodal velocity correction.Nodal mass is computed based on the nodal co-volume, which is one fourththe volume (mass) of each adjacent tetrahedron. We also take care to honorspecified boundary conditions on velocity, so that the momentum conservationrepair cannot accelerate a boundary which was previously fixed in space.

5.5. Remaining Issues

Due to a combination of using strictly single-material elements and allowingcertain modifications to alter region volume, we incur a material region volumeerror which essentially requires us to make a trade-off between conservationand bounds-preservation. Other researchers [2, 15] prevent volume errors byallowing material interfaces to cut through elements, resulting in multi-materialelements. This creates new challenges in the form of interface reconstruction [16]and establishing an equilibrium within an element based on multiple materialvolume fractions [15]. It remains as future work for us to compare and contrast

15

Page 16: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

our approach with alternatives from the standpoint of both conservation andoverall solution accuracy in problems of interest.

Our remapping algorithm conserves internal energy, not total energy, andtherefore the overall adaptive method does not conserve total energy. A secondarea of future work for us is to attempt to conserve total energy in the overallmethod, possibly using ideas from Burton et al.’s work [13].

The error field smoothing step carries risk because it is non-local in nature,and thus decreases the locality of conservation that is a key advantage of cavity-based adaptation, and central to classic proofs of convergence. A third area offuture work is then to examine the trade-offs of this non-local inconsistencyversus non-local conservation, possibly contrasting our current approach withmore consistent but less conservative alternatives.

The cavity-level remapping algorithms dealing with densities are at bestfirst-order accurate, which is consistent with the Lagrangian element’s first-order accuracy in space. The accuracy is harder to evaluate for things likeleast-squares remap or error smoothing.

6. Metric Field

Mesh adaptation is guided by a metric field which specifies the desired meshresolution at each point in the domain. Algorithms exist in the literature forderiving a metric that aims to equally distribute and minimize the discretizationerror for a given field, based on estimates of its derivatives. We use Hessian-based (second derivative) and gradient-based metric construction algorithmsbased on the work of Frey and Alauzet [5]. Algorithms also exist to derive an“implied” metric field based on a given mesh, which is the metric field thatreflects the existing mesh resolution. For this we use the per-element impliedmetric as described by Ibanez [17]. Finally, algorithms exist to intersect multiplemetric fields such that multiple factors can affect the resolution of the final mesh(e.g. bound discretization error of more than one field) [5, 18].

However, mesh resolution is also constrained by the size and shape of ma-terial regions, which can change arbitrarily in Lagrangian hydrodynamic sim-ulations. This can lead to an inconsistency between the constraints of regiongeometry and the metric field.

The particular example we focus on is that of the distance between twomaterial region boundaries being less than the resolution specified by the metricfield. In order to resolve this, we develop an algorithm to detect, based only onmesh information, the distance between two boundaries, and we then use thiscomputed distance to bound the metric field such that they do not conflict.

The algorithm to detect distance between two boundaries relies on the factthat it is only needed for the case when these boundaries are coming closer thanmesh resolution, so it focuses on the case where there is only one element ofmesh thickness between them. This also makes it computationally more effi-cient. It works by traversing all elements that touch two boundaries (actually,all mesh entities of each dimension, meaning mesh edges, triangles, and tetrahe-dra) and computing shortest-distance measures within those elements. Figure 3

16

Page 17: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Figure 3: Shortest-distance scenarios: (top left) an edge, (bottom left) vertex-edge across atriangle, (top right) edge-edge across a tetrahedron, (bottom right) vertex-triangle across atetrahedron.

illustrates the four different cases that are detected and the shortest paths thatare measured. It is important to measure more than just edge lengths, becauseboundaries may come together in a way that distorts elements and keeps edgessignificantly longer than the actual shortest distance between the boundaries.

7. Results

In this section, we exercise Alexa on a variety of shock hydrodynamic ex-amples. Note that it is not the purpose of this paper to provide a quantitativeanalysis of the numerical methods developed for Alexa, but rather to illustratethe effectiveness of tetrahedral adaptation in supporting a Lagrangian hydro-dynamic simulation when material regions undergo very large deformations.

Unless otherwise stated, all the simulations run below have zero-accelerationboundary conditions applied to all outer boundaries in the normal direction,meaning material can only move tangentially to the outer boundaries. Finally,all simulations were run with Cτ = 1, Cart;1 = 0.15 and Cart;1 = 1.2.

7.1. Saltzman Problem

We begin with a test of the Lagragian numerical method in the absenceof adaptivity. In particular, we demonstrate our VMS element formulationon a distorted mesh following Saltzman and Coella [19] (see also [8]). Thisproblem tests the ability of the numerical method to capture a planar wave as itpropagates through a non-ideal mesh. The problem is initialized as stationaryrectangular domain of ideal gas (γ = 5/3) with a density of 1 and internal energyof 10−12. At time, t, of zero the left boundary has a unit velocity along the axisof the gas domain with other boundaries as specified above.

Figure 4 shows density profile at t = 0.7. The coarse mesh results includesthe mesh used while the finer results do not include mesh lines to avoid obscuringthe density profiles. The coarse mesh was generated using a distored 40x4x4

17

Page 18: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Figure 4: Saltzman problem density profile at t = 0.7 for coarse, medium and fine meshes(top, middle and bottom figure respectively). Coarse mesh is also shown but omitted frommedium and fine meshes for clarity of results.

hexahedral mesh for which each hexahedral element was then subdivided by 24tet elements. The next finer meshes were similarly generated with 80x8x8 and160x16x16 hexahedral elements. The figure illustrates expected wall heating onthe left hand side of the image with post shock density of 4 and pre-shock of 1,again as expected.

Figure 5 shows a scatter plot of density at t = 0.7 as a function of axialdirection along the gas domain. Again, wall heating is evident at the left handside of the domain while density appears to converge to the analytical solution(solid black line).

18

Page 19: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

0.7 0.75 0.8 0.85 0.9 0.95 10

1

2

3

4

x

ρ

analyticcoarse

mediumfine

Figure 5: Scatter plot of density for coarse, medium and fine meshes at t = 0.7. Analyticalsolution (solid black line) included for comparison.

7.2. Air Blast

This test case, although conceptually two-dimensional, will be solved with atetrahedral mesh. The 2D domain is an 800m by 800m square, the 3D domainextrudes this square with a thickness of 80m. It is filled with a single materialwhich is an ideal gas with parameter γ = 5/3. An initial blast at x = 0m andy = 180m is created by setting initial mass density to

ρ0 = 1.22 + 30 exp

(−x

2 + (y − 180)2

2 ∗ (2.2)2

)kg m−3

and initial internal energy to:

ε0 = 1.23× 105 + 8.07× 1010 exp

(−x

2 + (y − 180)2

2 ∗ (2.2)2

)J kg−1

The initial mesh has edges of average length 10m, and the metric for adap-tation will be defined by the gradient of mass density. In particular, meshresolution at a point will be proportional to the magnitude of the gradient ofmass density at that point.

Figure 6 shows four states of this test case, including the initially very finemesh at t = 0s, and another state shortly thereafter where the mesh has coars-ened significantly in areas the wave has not reached yet, and remains refinednear the wave front. The color indicates mass density, with low density beingdark blue and high density being red. The latter two states show the interact-ing shocks resulting from the reflection of the initial shock off the lower domainboundary.

19

Page 20: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Figure 6: Air blast problem state at: (top left) t = 0s, (top right) t = 0.00625s, (bottom left)t = 0.05s (bottom right) t = 0.1s. Coloring is based on mass density.

20

Page 21: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Table 3: Material properties of Triple Point problem (unit-less values)

Region γ ρ εBottom Right (Blue) 1.5 0.1 2.5000Top Right (Grey) 1.4 1.0 0.3125Left (Red) 1.5 1.0 2.0000

7.3. Triple Point

Like the air blast case, this is conceptually a 2D problem. It consists of threeadjacent ideal gas material regions, with properties as listed in Table 3, whereγ is the parameter defining ideal gas behavior. This problem is unitless in thesense that the units are not necessarily SI units, it is only their ratios which areimportant. The domain is 7 by 3, with a thickness (z) of 0.25, and the divisionbetween left and right occurs at x = 1. The initial mesh resolution is edges oflength 0.4 on average.

Figure 7 shows the mesh (in the xy plane) colored by material region IDat times t = 0, t = 5, and t = 10. The main phenomenon of interest in thistest case is how the grey gas region is entrained between the other two, andshaped into a very thin tendril. This was our main driver for implementingthe proximity-based metric described in Section 6, which is able to increase themesh resolution in response to the decreasing width of this material region, theresult of which is visible in the bottom part of Figure 7.

Note that there is no refinement near shocks or contact discontinuities be-cause the metric is just a constant plus contributions based on interface prox-imity, nothing else.

7.4. Expanding Foil

In this properly three-dimensional problem, we begin with a large slab ofmaterial, modeled as a hyper-elastic solid with a Young’s Modulus of 4 ×10−9g µm−1

µs−2 and a Poisson’s ratio of 0.3. Beneath this slab, a thin foilfilled with ideal gas is inserted. This gas starts out with a large initial energy,causing it to rapidly expand and push upwards on the slab above it. The idealgas is modeled with parameter γ = 1.5. The initial conditions for the slab areρ = 10−12g µm−3 and ε = 10−4

µm2µs−2. The initial conditions for the gas foil

are ρ = 2.7× 10−15g µm−3 and ε = 1012µm2

µs−2.The problem is modeled with two-way symmetry, meaning we simulate one-

quarter of the actual geometry. Seen from above, the quarter of the slab is a625 µm by 625 µm square, and has a vertical thickness of 25 µm. The quarterof the foil is 125 µm by 125 µm, and has a thickness of 3 µm. The initial meshis constructed such that in each material there are approximately two elementsacross the thickness, with a smooth transition of resolution between the twomaterials. Unlike our other test problems, we only impose zero acceleration inthe normal direction for the bottom surface and the two symmetry planes. Theother three surfaces have no boundary conditions imposed.

21

Page 22: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Figure 7: Triple point problem state at: (top) t = 0, (middle) t = 5, (bottom) t = 10

22

Page 23: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Figure 8 shows a perspective view looking out of the corner of the symmetryplanes, at three different points in time, which is colored by material type (redbeing the foil). It is important to note that the volume of the foil material regionincreases by orders of magnitude, while the slab material above it is compressedinto a layer that is much thinner than anything in the initial geometry. It is thesetwo effects that guide our adaptivity metric. The proximity detection methodfrom Section 6 is used to refine the mesh in the thin upper part. The resolutionis also allowed to increase up to twice its current resolution at each adaptation,subject to gradation constraints (smooth variation of resolution over space), toallow a coarser discretization of the foil’s interior as its volume increases.

8. Closure

We present the use of tetrahedral mesh adaptation via local cavity modifica-tions as a mechanism for implementing the mesh repair and remap steps in anotherwise Lagrangian shock hydrodynamics simulation code. A linear tetrahe-dral finite element discretization is presented which is compatible with the meshadaptation mechanics as well as the desire to solve multi-material problems thatinclude elastic solids. Remap algorithms for each field and each type of meshmodification are developed with conservation requirements in mind. We are ableto explicitly track boundaries between materials and maintain single-materialelements in the presence of arbitrary deformation of material boundaries. Usingthree examples, we show that tetrahedral mesh adaptation is robust enough totrack large deformations of material regions in a multi-material setting, and isan effective approach to implementing the remesh and remap steps that allowa Lagrangian simulation to handle such cases.

9. Acknowledgements

Sandia National Laboratories is a multimission laboratory managed and op-erated by National Technology and Engineering Solutions of Sandia, LLC, awholly owned subsidiary of Honeywell International, Inc., for the U.S. Depart-ment of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

This paper describes objective technical results and analysis. Any subjec-tive views or opinions that might be expressed in the paper do not necessarilyrepresent the views of the U.S. Department of Energy or the United StatesGovernment.

[1] W. P. Crowley, Free-lagrange methods for compressible hydrodynamics intwo space dimensions, Springer Berlin Heidelberg, Berlin, Heidelberg, 1985,pp. 1–21.

[2] R. Loubere, P.-H. Maire, M. Shashkov, J. Breil, S. Galera,Reale: A reconnection-based arbitrary-Lagrangian-Eulerian method,Journal of Computational Physics 229 (12) (2010) 4724 – 4761.doi:https://doi.org/10.1016/j.jcp.2010.03.011.

23

Page 24: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

Figure 8: Expanding foil problem state at: (top) t = 0µs, (middle) t = 0.005µs, (bottom)t = 0.01µs

24

Page 25: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

[3] J. Grandy, Conservative remapping and region overlays by intersecting ar-bitrary polyhedra, Journal of Computational Physics 148 (2) (1999) 433 –466. doi:https://doi.org/10.1006/jcph.1998.6125.

[4] P. J. Frey, P.-L. George, Mesh modifications, in: Mesh Generation, ISTE,2010, pp. 559–589. doi:10.1002/9780470611166.ch10.

[5] P. Frey, F. Alauzet, Anisotropic mesh adaptation for CFD com-putations, Computer Methods in Applied Mechanics and Engineer-ing 194 (48) (2005) 5068 – 5082, unstructured Mesh Generation.doi:https://doi.org/10.1016/j.cma.2004.11.025.

[6] S. D. Pino, Metric-based mesh adaptation for 2d Lagrangian compress-ible flows, Journal of Computational Physics 230 (5) (2011) 1793 – 1821.doi:https://doi.org/10.1016/j.jcp.2010.11.030.

[7] E. Love, W. Rider, G. Scovazzi, Stability analysis of a predictor/multi-corrector method for staggered-grid lagrangian shock hydrodynam-ics, Journal of Computational Physics 228 (20) (2009) 7543 – 7564.doi:https://doi.org/10.1016/j.jcp.2009.06.042.

[8] G. Scovazzi, Lagrangian shock hydrodynamics on tetrahedralmeshes: A stable and accurate variational multiscale approach,Journal of Computational Physics 231 (24) (2012) 8029 – 8069.doi:https://doi.org/10.1016/j.jcp.2012.06.033.

[9] G. Scovazzi, B. Carnes, X. Zeng, S. Rossi, A simple, stable, and accuratelinear tetrahedral finite element for transient, nearly, and fully incompress-ible solid dynamics: a dynamic variational multiscale approach, Interna-tional Journal for Numerical Methods in Engineering 106 (10) (2015) 799–839. arXiv:https://onlinelibrary.wiley.com/doi/pdf/10.1002/nme.5138,doi:10.1002/nme.5138.URL https://onlinelibrary.wiley.com/doi/abs/10.1002/nme.5138

[10] B. M. Klingner, J. R. Shewchuk, Aggressive Tetrahedral Mesh Improve-ment, Springer Berlin Heidelberg, Berlin, Heidelberg, 2008, pp. 3–23.doi:10.1007/978-3-540-75103-8 1.

[11] A. Loseille, V. Menier, Serial and Parallel Mesh Modification Through aUnique Cavity-Based Primitive, Springer International Publishing, Cham,2014, pp. 541–558. doi:10.1007/978-3-319-02335-9 30.

[12] L. A. Freitag, C. Ollivier-Gooch, Tetrahedral mesh improvement usingswapping and smoothing, International Journal for Numerical Methods inEngineering 40 (21) (1997) 3979–4002.

[13] D. E. Burton, N. R. Morgan, M. R. J. Charest, M. A. Kenamond, J. Fung,Development of a compatible, energy conserving, bounds preserving remapof hydrodynamic fields in a generalized ale scheme, Tech. rep., Los AlamosNational Laboratory (LANL) (2017).

25

Page 26: Tetrahedral Mesh Adaptation for Lagrangian Shock …In order to help prevent element locking, we project pressure onto the nodes while including a stabilizing contribution from ne-scale

[14] D. Powell, T. Abel, An exact general remeshing scheme applied to physi-cally conservative voxelization, Journal of Computational Physics 297 (Sup-plement C) (2015) 340 – 356. doi:https://doi.org/10.1016/j.jcp.2015.05.022.

[15] W. J. Rider, E. Love, M. K. Wong, O. E. Strack, S. V. Petney, D. A.Labreche, Adaptive methods for multi-material ale hydrodynamics, Inter-national Journal for Numerical Methods in Fluids 65 (11-12) (2011) 1325–1337. doi:10.1002/fld.2365.

[16] M. Kucharik, R. V. Garimella, S. P. Schofield, M. J. Shashkov, A com-parative study of interface reconstruction methods for multi-material alesimulations, Journal of Computational Physics 229 (7) (2010) 2432 – 2452.doi:https://doi.org/10.1016/j.jcp.2009.07.009.

[17] D. A. Ibanez, Conformal mesh adaptation on heterogeneous supercomput-ers, Ph.D. thesis, Rensselaer Polytechnic Institute (2016).

[18] N. Barral, Time-accurate anisotropic mesh adaptation for three-dimensional moving mesh problems, Ph.D. thesis, Universite Pierre etMarie Curie-Paris VI (2015).

[19] J. Saltzman, P. Coella, LA-UR-85-67 unpublished, Tech. rep., Los AlamosNational Laboratory (LANL) (1985).

26