A Corner and Dual Mesh ALE Remapping Algorithm for use with the

corner sums, and be consistent with computed mass fluxes. Monotonicity: ... Accuracy: Clearly we want the remap process to be as accurate as possible.
3MB taille 1 téléchargements 210 vues
Lawrence Livermore National Laboratory

A Corner and Dual Mesh ALE Remapping Algorithm for use with the Compatible Energy Lagrangian Discretization SIAM Conference on Computation Science and Engineering Advanced Discretization Techniques for Lagrangian Hydrodynamics Reno, NV

2011 February 28 – March 4

J. Michael Owen

M. Shashkov

LLNL

LANL

Lawrence Livermore National Laboratory, P. O. Box 808, Livermore, CA 94551 This work performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.

LLNL-PRES-457355

The problem. • The compatible energy staggered Lagrangian discretization [2]

introduces new Lagrangian subzonal volumes (corners) into the hydrodynamics algorithm. • The usual zonal and nodal masses are defined Zone

Corner

as the sum of the appropriate sets of these corner values: X mz = mc

Face

c(zone)

mn =

X

mc

c(node)

Dual Zone Dual Face

• The ALE needs to reconcile these three views of the mass in order to

maintain conservation and consistency.

LLNL-PRES-457355

2/28

Principles for remap. Conservation: Zonal and nodal masses should equal their respective corner sums, and be consistent with computed mass fluxes. Monotonicity: Remapping of zonal and nodal quantities should not introduce new extrema – we are less concerned about corner quantities themselves. Consistency of the mass and volume fluxes: The volume flux is computed by the swept geometry. The mass fluxes we derive should be tied in realistic ways to the volume fluxes. Accuracy: Clearly we want the remap process to be as accurate as possible. Consistency with Lagrange: The post-remap mass distributions should be consistent and plausible for use with the Lagrange discretization.

LLNL-PRES-457355

3/28

Why not just fit the corner densities to the zonal density profile? • Treating the corner densities as a higher order representation of the

zonal densities is inconsistent with the Lagrangian discretization. • Corner masses are Lagrangian, but we do not solve the Lagrangian hydro

equations on the subzonal level. • Any shape we establish for the corner densities in the zone becomes frozen

in for the Lagrange. • Similar issue for direct remapping of corner masses. 3

3.2

Zones Corners

2.8

Zones Corners

3 2.8

2.6

2.6

2.4

2.4

ρ

ρ

2.2 2

2.2 2

1.8

1.8

1.6

1.6

1.4

1.4 1.2

1.2 0

0.2

0.4

0.6 x

Initial Fit LLNL-PRES-457355

0.8

1

0

0.2

0.4

0.6

0.8

1

x

After Lagrangian Deformation 4/28

Definitions of the fluxes. δmf

• We take as given the the mass flux over

δmfc

δmec

the faces on the primary mesh δmf . δmec

• The corner-face components of the face

flux are simply scaled from the swept volume fluxes δmcf =

δmfc

2D mass fluxes

3D mass fluxes

δVcf δmf δV f

• The net dual mesh flux is the sum of

δmec

its corner components X δme = δmce c(edge)

δmec δme

3D edge flux sum 2D edge flux sum

• Our goal is to derive the new corner masses mc1 and the intra-zonal

fluxes between corners δmce .

• Note these quantities are not independent! LLNL-PRES-457355

5/28

Constraints required for conservation. • In order to achieve conservation we require that the various mass fluxes

all be consistent with the changes of the element masses. X X mz1 = mz0 + δmf = mc1 f(zone)

mn1 = mn0 +

X

c(zone)

δme =

e(node)

mc1 = mc0 +

X f(corner)

δmcf +

X

mc1

c(node)

X

ψzce δmce

e(corner)

• We implicitly sign the face fluxes such that positive values represent

influx and negative outflux. • ψzce is an integer sign matrix encoding the orientation of the the

intrazonal corner fluxes δmce . • ψzce ∈ [−1, 0, 1]

LLNL-PRES-457355

6/28

Deriving intrazonal corner fluxes δmce . • Several of the algorithms we consider specify a desired post-remap

corner mass mc1 . • The face fluxes δmf and their corner-wise components δmcf are specified by

the geometry. • Leaves the intrazonal corner fluxes δmce as the only unknowns.

• We treat the problem as a constrained optimization: specify physically

plausible reference fluxes δmce ref and try to minimize the function X 2 χ(δmce ) = (δmce − δmce ref ) . e(zone)

• The sum of the fluxes for the final corner mass becomes our relevant

constraint, which is re-expressed as X ψzce δmce = 0 Bc = Ac + e(corner)

Ac ≡ LLNL-PRES-457355

X f(corner)

δmcf − mc1 − mc0

 7/28

Deriving intrazonal corner fluxes δmce cont. • Applying the method of Lagrange multipliers

L(δmce , λc )

= χ(δmce ) +

X

λc Bc

c(zone)

! =

X e(zone)

2

(δmce − δmce ref ) +

X

λc

c(zone)

Ac +

X

ψzce δmce

e(zone)

• Setting ∂L/∂δmce = 0 we find

δmce = δmce ref −

1X λc ψzce 2 c(zone)

• Setting ∂L/∂λC = 0 yields (in matrix form)

Gλ = F • G ≡ ΨΨT and F ≡ 2(A + Ψδmref ). • G is an Nc × Nc singular matrix. LLNL-PRES-457355

8/28

Deriving intrazonal corner fluxes δmce cont. • G is singular =⇒ the solution for δmce is not unique! • Use SVD to to decompose G = UwVT . • Compute the pseudo-inverse G+ = Vw0 UT . • wc0 = 1/wc , with singular (zero) elements of wc zeroed. • Solve for λ = G+ F. • Finally we obtain the intrazonal corner fluxes from δmce (λc ).

• For a given zone type, we only need to compute the pseudo-inverse G+

once at problem setup.∗



Cylindrical (RZ) coordinates puts a wrinkle in this!

LLNL-PRES-457355

9/28

2D pentagonal zone example  ce ψpentagon

  =   

−1 1 0 0 0

0 0 0 1 −1 0 0 0 1 −1 0 0 0 1 −1 0 0 0 1 −1

2 −1  −1 2  0 −1 Gpentagon =    0 0 −1 0  2 0  0 2 1 + −1 0 Gpentagon =  5  −1 −1 0 −1 LLNL-PRES-457355

     

4

3

5

2



0 0 −1 −1 0 0   2 −1 0   −1 2 −1  0 −1 2  −1 −1 0 0 −1 −1   2 0 −1   0 2 0  −1 0 2

1 Edge Ordering

4 5

3 1

2

Corner Ordering

10/28

KULL’s “Classic” mode. • KULL has been using the compatible energy Lagrangian discretization

for its hydrodynamics package for years. • The ALE package used a fairly traditional remap of the zonal and nodal quantities. • Dual mesh mass flux interpolated from primary mesh. • At the end of the remap KULL’s ALE had conservative values for the new

zonal and nodal masses and linear momentum. • For any zone that was remapped we simply set the corner mass densities

equal to the remapped zonal density. • Destroys corner based hourglass control. • Nodal sum of corner masses does not correspond to the ALE’s remapped nodal mass. • KULL used the nodal remapped mass to renormalize momentum for

velocity, but in the end the nodal mass is defined by the corner mass sum. • Maintains monotonicity, but gives up nodal conservation. • We refer to this as the “Classic” algorithm.

LLNL-PRES-457355

11/28

The “Interpolated Flux” definition. • This algorithm interpolates the intrazonal

corner flux δmce from the corner face values δmcf for the two corners associated with the edge.  1 δmcf 1 + δmcf 2 δmce = 2

δmec δmfc2

δmfc1

• All mass fluxes associated with each corner are defined. • The corner mass constraint equation uniquely defines mc1 . • Conservation is ensured. • This option maintains good consistency with the geometric definition of

the mass flux. • No guarantee of monotonicity! • However, this flux is a good choice for the reference flux δmce ref required

for other methods.

LLNL-PRES-457355

12/28

The “Logical Corner” method. 7

4

• This method is due to Andy Barlow [1]. • Breaks up donor/acceptor zones into

donor/acceptor corners.

1

7

3 2

1

• Corners are associated by their logical

8

3

4

position in the zones

2

6 6

5 5

• For each donor face flux we break up the per corner fluxes according to

∆mc =

X  m0  c

f(zone)

mz0

δmf .

donor

• Conservation and flux consistencies are maintained well. • No guarantee of monotonicity! • As posed, not suitable for arbitrary zone types.

LLNL-PRES-457355

13/28

The “Flatten Total” mode. • This is a conservative version of the Classic model. • For any remapped zone we set ρ1c = ρ1z . • Apply the machinery described previously to find δmce consistent with the post-remap corner masses associated with this choice for the corner densities. • Maintains conservation and monotonicity. • Creates mass fluxes that may bear no resemblance to the mesh motion

and corresponding swept volume flux. • Tiny mesh displacements can result in large fluxes!

LLNL-PRES-457355

14/28

The “Flatten Delta” option. • This suggestion (so far as I know) was originally an idea due to Ed

Caramana. • Define the new corner masses as

∆mc =

mc0 Vc1 outflux ∆m + ∆mzinflux z mz0 Vz1

where P ∆mzinflux = f max(0, δmf ) ≥ 0

∆mzoutflux =

P

f

min(0, δmf ) ≤ 0

• Outflux such that each corner hits zero mass simultaneously. • Influx drives corners toward average zonal density.

• Mass fluxes computed using our minimization algorithm. • Conservation is maintained, and fluxes scale with mesh motion. • No guarantee of monotonicity or consistency with volume flux.

LLNL-PRES-457355

15/28

The “Variation Diminishing” option. • Aimed at monotonicity – always moves corners toward average zone

density. 1. Adjust corner densities by volume change: ρ0c = 2. Renormalize: ρ00c =

mz0 P

c(zone)

0 Vc1 ρc

Vz0 Vz1 ρc

ρ0c

3. Use fluxes in, out, or internal to the zone to move corners toward the new zonal density:   ∆mzint + ∆mzinflux − ∆mzoutflux fz ≡ min 1, ∈ [0, 1] mz0  P ∆mzint = ρ0z min Vz0 , ∆Vzint ≥ 0 ∆Vzint = e(zone) |δVce | ≥ 0 1 00 ρ000 c = (1.0 − fz )ρc + fz ρz

LLNL-PRES-457355

16/28

“Variation Diminishing” cont. 4. Renormalize one last time to conserve zonal mass: X 1 ∆mzrequired ≡ ρ1z Vz1 − ρ000 c Vc . c(zone)

 wc =

1 max(0, (ρ1z − ρ000 c ))Vc 000 1 max(0, (ρc − ρz ))Vc1

: ∆mzrequired ≥ 0, : ∆mzrequired < 0,

wc ∆mzrequired . ρ1c = ρ000 c + P Vc1 c wc • Use our optimization algorithm to compute the δmce fluxes for

consistency. • Variation Diminishing can guarantee conservation & monotonicity. • Should meet consistency with Lagrange expectation as well in so far as corner properties are never exacerbated. • Magnitude of mass fluxes will be consistent with geometric volume fluxes, but not necessarily direction! LLNL-PRES-457355

17/28

Aside: The importance of bi-directional fluxes. • Consider the following zero volume change to a zones geometry: ρ0

ρ0

=⇒ ρ0

ρ0

ρ0 − δρ ρ0 − δρ ρ0 + δρ ρ0 + δρ

• If we define the face fluxes δV f to be simply the net volume flux over

each face, then this test will have no fluxes over any face! • With no mass fluxes either, the post-remap corner densities will be the

volume scaled version of their pre-remap state. • Monotonicity violating!

• Corrected by accounting for bi-directional fluxes, i.e., both in and out

fluxes over each centering.

LLNL-PRES-457355

18/28

Example: Cyclic remapping of a cylindrical shell. • Consider a two material test case, with a cylinder shaped into a

background material.

Initial density

Initial velocity magnitude

• rshell ∈ [0.25, 0.45], ρshell = 1, vshell = 1.0 ˆ r • ρbackground = 0.1, vbackground = 0 LLNL-PRES-457355

19/28

The cyclic mesh motion definition. Velocity magnitudes

• Apply an analytic cyclic mesh displacement for remapping

(taken from [3]). xk (x0 , yo , τ )

= x0 + F (τ ) sin(2πτ x0 ) sin(2πτ y0 ),

yk (x0 , yo , τ ) l

= y0 + F (τ ) sin(2πτ x0 ) sin(2πτ y0 ),  0.2 τ : τ ∈ [0, 0.5], F (τ ) = 0.2 (1 − τ ) : τ ∈ (0.5, 1], k τ = . kmax

k/kmax = 1/2

• Mesh resolutions: nx ∈ [64, 128, 256]

• Remapping steps: kmax ∈ [320, 640, 1280] k/kmax = 1 LLNL-PRES-457355

20/28

Cyclic remapping of a cylindrical shell: conservation and monotonicity • As expected, the inconsistent “Classic” mode violates momentum

conservation. • All other options conserve momentum to roundoff by construction.

• Only Classic, Flatten Total, and Variation Diminishing maintain nodal

monotonicity. Classic Logical corner Interpolated flux 0.0005 Flatten Total Flatten Delta 0.0004 Variation diminishing

Classic Logical corner Interpolated flux Flatten Total Flatten Delta Variation diminishing

1.04

0.0006

1.02 ρnmin/ρnmax

Linear momentum magnitude

0.0007

0.0003 0.0002

1 0.98

0.0001 0

0.96

-0.0001 0

50

100

150 200 Remap cycle

Momentum evolution LLNL-PRES-457355

250

300

0

50

100

150 200 Remap cycle

250

300

max in shell Nodal ρmin n /ρn

21/28

Cyclic remapping of a cylindrical shell: accuracy • All methods converge at first order for the nodal density and velocity in

this discontinuous test. • No apparent loss of accuracy for maintaining conservation or monotonicity.

Classic

Logical corner

Interpolated flux

Flatten Delta

Flatten Total

Variation diminishing

LLNL-PRES-457355

nzones 64 × 64 128 × 128 256 × 256 64 × 64 128 × 128 256 × 256 64 × 64 128 × 128 256 × 256 64 × 64 128 × 128 256 × 256 64 × 64 128 × 128 256 × 256 64 × 64 128 × 128 256 × 256

px -0.00043 -0.00031 -0.00018 6.24e-17 -1.08e-14 6.90e-14 3.47e-17 -1.08e-14 6.90e-14 7.98e-17 -1.08e-14 6.89e-14 3.82e-17 -1.08e-14 6.90e-14 1.39e-17 -1.07e-14 6.90e-14

py -0.00042 -0.00031 -0.00018 -6.94e-17 -7.67e-15 -8.33e-15 6.24e-17 -7.53e-15 -8.38e-15 9.02e-17 -7.78e-15 -8.30e-15 1.11e-16 -7.55e-15 -8.37e-15 1.39e-16 -7.56e-15 -8.28e-15

L1 (ρn ) 0.0040 0.0022 0.0011 0.0040 0.0022 0.0011 0.0040 0.0022 0.0011 0.0041 0.0023 0.0012 0.0040 0.0022 0.0011 0.0040 0.0022 0.0011

L1 (vr ) 0.144 0.095 0.061 0.115 0.079 0.052 0.115 0.079 0.052 0.115 0.079 0.053 0.115 0.079 0.052 0.115 0.079 0.052

L1 (vt ) 0.0051 0.0021 0.00097 0.0049 0.0020 0.0010 0.0049 0.0020 0.0010 0.0049 0.0020 0.0011 0.0049 0.0020 0.0010 0.0049 0.0020 0.0010 22/28

Example: The Sedov-Taylor blastwave. • We want to examine a problem using these new ALE options in the

context of a hydrodynamics problem. • Here we model the Sedov-Taylor blastwave on a 128 × 128 zone unit mesh. • Halted when shock is analytically predicted to be at r = 0.4.

• The Caramana et al. edge viscosity causes some distortion along the

principle directions aligned with the mesh.

Lagrange LLNL-PRES-457355

ALE: Classic

ALE: Variation diminishing 23/28

Sedov-Taylor blastwave: accuracy. • Interestingly the Classic mode retards the shock a bit. • All other options maintain the Lagrange shock position accurately. • The new consistent and conservative ALE options are most accurate. Lagrange Classic Logical corner Interpolated flux Flatten Delta Flatten Total Variation diminishing

Mass density Mass density (solution)

6

ρ

px -8.305e-17 -8.622e-07 -9.410e-17 -1.262e-16 -1.404e-16 -1.110e-16 1.640e-16

py 6.028e-17 -3.976e-07 -1.060e-16 1.973e-17 1.832e-16 2.233e-17 -1.840e-16

L1 (ρz ) 0.17913 0.20197 0.09386 0.09335 0.09304 0.09349 0.09376

Mass density Mass density (solution)

6

L1 (Pz ) 0.032600 0.073019 0.018369 0.018313 0.018312 0.018496 0.018561

5

5

4

4

4

3

3

3

2

2

2

1

1

1

0 0

0.05

0.1

0.15

0.2

0.25

Lagrange LLNL-PRES-457355

0.3

0.35

0.4

Mass density Mass density (solution)

6

5

L1 (vr ) 0.0363163 0.0340878 0.0325066 0.0319927 0.0319955 0.0319842 0.0320808

0

0 0

0.05

0.1

0.15

0.2

0.25

0.3

ALE: Classic

0.35

0.4

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

ALE: Variation diminishing 24/28

Sedov-Taylor blastwave: polygonal example. • Here we see that the Variation Diminishing algorithm functions on an

arbitrary polygonal mesh. • The inhomogeneities evident around

the shock front are largely due to the Lagrange discretization (primarily the artificial viscosity) reacting to the unstructured mesh.

Mass Density profile LLNL-PRES-457355

Mass Density on mesh @ rshock = 0.4 25/28

Idealized ICF shell implosion in RZ geometry. • There are issues in cylindrical coordinates with the standard formalism!

Initial conditions

Lagrange Final

Variation Diminishing, whoops!

• This can be handled by doing our optimizations in mass fluxes per r : i.e.

working in δ m ˜ ce ≡ δmce /rce , δ m ˜ ce ref ≡ δmce ref /rce , etc.

• rce is the value for the centroid of the swept advection volumes. • This work is still in progress, but effectively

results in altering G ≡ ΨRRΨT and F ≡ 2(A + Ψδ m ˜ ce ref ), where R is a diagonal matrix of the rce radii: R ee = δ ee rce .

LLNL-PRES-457355

Variation Diminishing corrected

26/28

Summary and Conclusions. • We have derived a framework for computing subzonal (corner) mass

fluxes that ensure the post-remap masses of the zones, nodes, and corners are all consistent. • This idea maintains conservation and consistency through the ALE step for

nodally remapped quantities. • The new conservative methods are at least as accurate as our original

methods in problems we have tested. • Currently we would recommend the Variation Diminishing algorithm, as

it ensures both conservation and monotonicity and tries to tie the fluxes to the actual mesh motion. • The standard formalism described here needs modification in order to

handle cylindrical coordinates. • We have such modifications available, and are still investigating some

details of these modfications.

LLNL-PRES-457355

27/28

References. A. J. Barlow, Presented at the 2007 Numerical Methods for Multi-material Fluid Flows Conference, Prague, CZ http://www-troja.fjfi.cvut.cz/~multimat07/ presentations/monday/Barlow/Barlow.ppt (2007) E. J. Caramana, D. E. Burton, M. J. Shashkov, and P. P. Whalen, J. Comp. Phys., 146, 227 (1998) R. Liska, M. Shashkov, P. V´achal, and B. Wendroff, J. Comp. Phys., 229, 1467 (2010)

LLNL-PRES-457355

28/28