A discontinuous Galerkin method for Lagrangian hydrodynamics

Then, we apply a variational formula- tion, with e i k as the test function, to our equation on that cell, with f(u) is the chosen numerical flux : K. ∑ l=0. ∂tu i l ∫Ci.
406KB taille 1 téléchargements 385 vues
A discontinuous Galerkin method for Lagrangian hydrodynamics F. Vilar, P.-H. Maire and R. Abgrall CELIA, Universit´e Bordeaux I, CNRS, CEA 1 1.1

2

Discontinuous Galerkin (DG) introduction with scalar conservation laws

2.1

Gas dynamics in Lagrangian formalism

Discretization Our goal is to approximate our solution with polynomials on each cells without imposing continuity between them. For that, we set {ej }j=1..K a basis of our approximation space PK (Ci) and our K X approach solution uih = uij (t)eij (x) on Ci.

∂u ∂f (u) + =0 ∂t ∂x u(x, 0) = u0(x)

j=0

Then, we apply a variational formulation, with eik as the test function, to our equation on that cell, with f (u) is the chosen numerical flux :

K X

∂tuil

l=0

Z

Ci

xi+ 1 i i i (el , ek )dx + [f (u)ek ]xi− 21 − 2

Z

Ci

f (uih)∂xeik dx = 0

Finally, we found this compact equation, after projecting R i , ei)dx, i = (e f (uih) on the chosen basis and setting Mkl Ci k l i )T and B i(x)=(ei0(x), ..., eil(x), ..., eiK (x))T , F i=(f0i, ..., fli, ..., fK U i=(ui0, ..., uil, ..., uiK )T our unknown vector. In our studi ies, we used local Taylor basis {e } where e j j=1..K k =  x − xi k x − xi k 1 ( ) −( ) with xi is the centroid of the cell Ci. k! ∆xi ∆xi

h ix 1 d i+ 2 i i i M U + f (u)(x)B (x) − D iF i = 0 dt xi− 1 2

Numerical flux and L2 stability

1.2

dt du 0 ρ dt dE 0 ρ dt

2.2

∂X ∂p + = 0 ∂X ∂pu + = 0 ∂X

xi+ 1 xi+ 1 u2h d 2 dx + [f (u)uh]xi− 1 − [F (uh)]xi− 21 = 0 dt Ci 2 2 2

Z

Z X X u2h d dx + Ri = 0 dt Ci 2

xi+ 1 xi+ 1 We set Ri = [f (u)uh]xi− 21 − [F (uh)]xi− 21 and we sum on all

i,cells

2

cells. And to assure th e stability, we want :

X

Acoustic

The acoustic equations derived from the linearization by small perturbations of the gas dynamics system, around a steady flow. Now, the system variables are the pressure and the velocity. We noticed that if we just perform the limitation on the system unknowns, some oscillations remain. It is due to the fact that these quantities are related by the equations. But, by diagonalizing the system, we get around this constraint. And we see this time, if we limit the Riemann invariants, our solution is perfectly monotone. For the acoustic system, it is quite simple because these invariants can be found explicitly (due to the linear property Influence of the orders without Influence of the object of the of this system) but for the other cases, it isn’t so obvious. limitation limitation 1.1

0.6

solution 1st order 2nd order 3rd order

0.5

solution p and u limitation Riemann invariants limitation

1

0.4

0.9

0.3

0.8

0.2

0.7

0.1

0.6

0

0.5

0.4

0.1

0.2

0.3

2.2.2

0.4

0.5

0.6

0.7

0.8

0.9

1

0.2

1 Ri = f (u)du (ug − ud) f (u)(xi+ 1 ) − 2 u d − u g ug i,cells i,nodes Z ud 1 f (u)du − Ci+ 1 (ud − ug ) f (u)(xi+ 1 ) = 2 2 u d − u g ug X

X

1.3

i,cells

Ri ≥ 0 ⇒ ||uh(tn+1)||L2 ≤ ||uh(tn)||L2

2

|a| • upwind scheme for Ci+ 1 = 2 2

0.8

0.6

Burgers

1

0.95

0.9

0.9

0.8

0.85

0.7

0.3

0.8

0.6

0.75

0.5

0.2 0.1 0 -1

-0.5

0

0.5

1

1.5

0.7 -0.2

3rd order DG for a rarefaction wave into vacuum problem solution h and u limitation Riemann invariants limitation

0.4 0

0.2

0.4

0.6

0.8

1

1.2

3rd order DG for a double rarefaction waves problem

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

3rd order DG for a dam break problem

As before, if we apply our limitation on the intrinsic system variables, some oscillations remain. The problem is this equations system is unlinear, and so we have only informations on the differential of the Riemann invariants. In order to access to this quantities, we’ve tested two different options :

0.74

0.735

0.73

0.725

• these differentials being quite simple, we were able to integrate and differentiate them and so, perform our limitation on the Riemann invariants. • we linearize, on each cells, the equations and thus, we obtain linear approximation of the Riemann invariants on each cells. Then, the limitation is easy.

L1

L2

L∞

1st order

0.94

0.94

0.94

2nd order

2.05

2.05

2.05

2nd order lim

2.37

2.05

1.61

3rd order

3.00

3.00

2.89

3rd order lim

3.32

3.10

2.59

1st order

0.86

0.68

0.23

2nd order

2.00

1.99

1.91

4.5

1.7

2nd order lim

2.12

1.99

1.57

4

1.6

3rd order

2.88

2.91

2.65

3.5

1.5

3rd order lim

2.87

2.89

2.62 3

1.4

2.5

1.3

0.4

0.2

1

0.4

0.715

Linear advection

solution 3rd order

0.7

1.2

0.8

1.1 solution 3rd order

0.72

1

0.8

0.9

0.745

∆xi • Lax-Friedrichs scheme with Ci+ 1 = 2 2∆t a2 ∆t • Lax-Wendroff scheme when Ci+ 1 = . 2 2 ∆xi

We notice that, as expected, the third order method is the most accurate. We also note that the first order solution is totally dissipated. Contrary to the first-order method, high-order ones are not monotonic. In order to inforce it, we perform a vertex based slope limitation [4], which can be generalized to high orders and conserve smooth extrema. Influence of the orders without limitation

0.7

1.05

0.6

solution 1st order 2nd order 3rd order

0.6

1

ter having switch the summation from cells to nodes. And so, we found a sufficient condition on f (u) with Ci+ 1 ≥ 0, to have Ri ≥ 0 .

Numerical results

0.5

solution 3rd order

with ug = uh(x− 1 ), ud = uh(x+ 1 ) and afi+ 2 i+ 2

For linear advection, for example, f (u)(xi+ 1 ) = a2 (ug +ud)− 2 Ci+ 1 (ud −ug ). And, according to the choice of Ci+ 1 , we rec2 2 ognize different kind of well known schemes :

0.4

To get the shallow water equations, we start from the gas dynamics system, making some additional hypothesis. We consider that we have a small water height, an incompressible fluid and a sliding condition at the bottom. We also average the equations on the water height. The system variable are, now, the water height and the velocity.

0.5

Z ud

0.3

Shallow water

1.1

i,cells

!

with ρ the density of the fluid, ρ0 its initial density, u its velocity and E its total energy. For a thermodynamical closure of this system, 2 u we introduce an equation of state p = p(ρ, ε) with ε = E − 2 . We may, for example, use the ideal gas law : p = ρ(γ − 1)ε.

Numerical results

2.2.1

0

0

2

d(1/ρ) ∂u 0 ρ − = 0

-0.1

In order to access to the L2 norm of our solution, we apply a variational formulation with uh for our test function. Supposing thatZf is integrable and its derivative smooth enough u f (s)ds, we obtain : as F (u) =

Lagrangian hydrodynamics

0.71 0.3

0.4

0.5

0.6

0.7

0.8

Influence of the object of the limitation 2.2.3

Gas dynamics

5

1.8

1.1

solution 3rd order

solution2 3rd order

solution 3rd order 1 0.9

0

-0.2

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0.8 0.7 0.6

Numerical order of our methods

0.5 2

1.2 0.4

1.5

1.1

1

1

0.5

0.3 0.2

0.9 -5

-4

-3

-2

-1

0

1

2

3

4

5

3rd order DG for a oscillating tube problem

0.1 0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

3rd order DG for a uniformly accelerated piston problem

2

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

3rd order DG for a shock Sod tube problem

0.3 solution 3rd order 3rd order limited 0.29

We see that the oscillations are quite strong at the shock front, without any limitation. So, to keep our solution monotone, as we did for the shallow water equations, we linearize the system on each cells and obtain linear quantities on which we can perform our limitation. The problem is how can we limit our last unknown, E, the total energy. We have tested different ways but at the end, some little oscillations still remain.

0.28

0.27

2D solid body rotation solution

1.4

Limitation

0.8

0.6

0.4

0.2

0

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

2D solid body rotation with a 2nd order discontinuous Galerkin method

0.26

0.25

0.24

solution 2nd order 3rd order

1

2D solid body rotation with a finite volumes method

0.6

0.8

1

Influence of the orders with limitation

To inforce monotonicity, we want the extrapolated value at a generic node to be bounded by the minimum and maximum averaged values taken over the cells surrounding this node. For the i 2nd order, we have uih = ui0 +αl ui1 x−x ∆xi with αl ∈ [0, 1], the correction factor. This method is easily generalized for higher orders with an hierarchical process. For example, for the 3rd order, we (2) (2) ui1 ∂ i i . set : ui = ∂x uh = ∆x + αl ui2 x−x 2 ∆x i

i

(2)

And we choose αl with the identical process than before. Then, we do (1) (1) i the same with ui = ui0 + αl ui1 x−x ∆xi . In order to avoid the loss of accuracy (1) = at smooth extrema, we set αl (1)

0.23 0.65

0.7

0.75

0.8

0.85

0.9

Influence of the limitation

3

Prospects

(2)

max(αl , αl ). For high order, we calculate a nondecreasing sequence of (q) (p) correction factors αl = max(αl ),

(q) q ≥ p, that means, as soon as αl = 1

is encountered, we stop the limitation.

With the presented work, we could validate our DG methods and so, observe order influence on the accuracy of our solutions for simple physical problems like linear advection and also for others, more complicated, as gas dynamics in lagrangian formalism. We also noticed the difficulties residing in limitating unlinear systems. From now on, we will go further in our multidimensional studies, starting with polygonal mesh in 2 dimensions, for the same physical problems presented before.

References [1] B. Cockburn, Discontinuous Galerkin methods. School of Mathematics, University of Minesota, 2003. [2] B. Cockburn, S.-Y. Lin and C.-W. Shu, TVB Runge-Kutta local projection discontinuous Galerkin finite element method for conservation laws II : one-dimentional J. of Comp. Phys. 84:90-113, 1989. [3] B. Cockburn and C.-W. Shu, TVB Runge-Kutta local projection discontinuous Galerkin finite element method for conservation laws II : general framework. Math. Comput. 52:411-435, 1989. [4] D. Kuzmin A vertex-based hierarchical slope limiter for p-adaptive discontinuous Galerkin methods J. of Comp. Appl. Math. doi:10.1016/j.cam.2009.05.028. [5] M. Yang and Z.J. Yang A parameter-free generalized moment limiter for high-order methods on unstructured grids. Adv. Appl. Math. Mech. 1(4):451-480,2009.