EnergyConsistentDGSchemefortheNavier-Stokes- Allen-Cahn … › 2014 › ... ·...

Preview:

Citation preview

Energy Consistent DG Scheme for the Navier-Stokes-Allen-Cahn System

Albert-Ludwigs-Universität Freiburg

Mirko KränkelAAM Freiburg9th DFG-CNRS WORKSHOPMicro-Macro Modeling and Simulation of Liquid-Vapor Flows25.2.-27.2.2014

Outline

Introduction

The Numerical-Method

Numerical Experiments

Summary and Outlook

February 26, 2014 Mirko Kränkel – 2 / 30

Goal: Simulation of two phase flow using a phase field approach.Diffuse interface model: Small positive width of the phaseboundary. No explicit interface conditions needed.Additional variable ϕ which indicates the phases.ϕ ≈ 0 : phase 1,ϕ ≈ 1 : phase 2

δ → 0O(δ)

February 26, 2014 Mirko Kränkel – 3 / 30

We want to use a phase field type model, where the thickness ofthe interface can be easily controlled.This should allow to artificially increase the transition layerbetween the two phases in numerical calculations.The small size of the interfacial layer is one main difficulty for thenumerical treatment.In [1, Witterstein] and [2, Alt Witterstein] a compressible phasefield model was derived where the Young-Laplace-Law wasrecovered in the sharp interface limit.

February 26, 2014 Mirko Kränkel – 4 / 30

Governing Equations

The model from [1, Witterstein1] consists of the compressibleNavier-Stokes and an Allen-Cahn like equation for the phase fieldparameter ϕ.

∂tρ + ∇ ·ρv = 0, (1)∂t(ρv) + ∇ · (ρv⊗v) + ∇P(ρ,ϕ,∇ϕ) + ∇ · (D(∇v)) = 0, (2)

ρ(∂tϕ + v ·∇ϕ) =−ηδFδϕ

. (3)

for x ∈ Ω⊂ Rd , t > 0.with a free energy F = F(ρ,ϕ,∇ϕ) = 1

δh1(ρ)W(ϕ) + ψ(ρ,ϕ) + δh2(ρ) |∇ϕ|2

2and η > 0.

February 26, 2014 Mirko Kränkel – 5 / 30

Governing Equations

The free Energy has the form

F(ρ,ϕ,∇ϕ) :=1δh1(ρ)W (ϕ) + ψ(ρ,ϕ) + δh2(ρ)

|∇ϕ|22 .

The function ψ models the physics inthe pure phases.

ψ(ρ,ϕ) := ν(ϕ)f2(ρ)+(1−ν(ϕ))f1(ρ).

W(ϕ) is double-well function withrespect to ϕ and possibly differentheights of the minima.

February 26, 2014 Mirko Kränkel – 6 / 30

In the momentum equation

∂t(ρv) + ∇ · (ρv⊗v) + ∇P(ρ,ϕ,∇ϕ) + ∇ · (D(∇v)) = 0,

the pressure and stress tensor P,D are given

P := P(ρ,ϕ,∇ϕ) = (−F + ρFρ )I+ δ (h2(ρ)∇ϕ⊗∇ϕ)

andD(∇v) := µ1∇ ·vI+ µ2(

12 (∇v + (∇v))T − 1

d ∇ ·vI)

with µ1,µ2 > 0 so that D(∇v) ·∇v > 0.The source term in the phase field equation reads:

δFδϕ

=1δh1(ρ)Wϕ (ϕ) + ψϕ (ρ,ϕ)−δ∇ · (h2(ρ)∇ϕ).

February 26, 2014 Mirko Kränkel – 7 / 30

Energy Inequality

Proposition (G.Witterstein [1])If the boundary values are chosen so that v = 0 and ∇ϕ ·n = 0 on ∂ Ωthan

ddt E(ρ,ϕ,v,∇ϕ) =

ddt

∫ΩF(ρ,ϕ) +h2(ρ)

|∇ϕ|22 + ρ

|v|22 dx ≤ 0. (4)

February 26, 2014 Mirko Kränkel – 8 / 30

The Energy consistent DG-Method

The scheme presented in this talk is a direct extension for theNavier-Stokes-Allen-Cahn System of the scheme developed byJ. Giesselmann et. al. for the Navier-Stokes-Korteweg system.It can be shown that the scheme fulfills a discrete Version of theenergy inequality (4).Implemented using the DUNE and DUNE-FEM softwareenviroment: http://dune.mathematik.uni-freiburg.de/

J. Giesselmann, C. Makridakis, T. PryerEnergy consistent DG methods for the Navier-Stokes-KortewegsystemMathematics of Computation, 2014

February 26, 2014 Mirko Kränkel – 9 / 30

Nonconservative Mixed Form

To derive an energy consistent numerical method we introduce theauxilliary variables τ,µ,σ

τ = Fϕ + δ∇ · (h2(ρ)σ),

µ = Fρ −12 |v|

2

σ = ∇ϕ.

and noting that

∇ ·P(ρ,ϕ,∇ϕ) = ∇ ·[(−F + ρF |ρ )I +h2(ρ)∇ϕ⊗∇ϕ

]= ρ∇µ +

12ρ∇|v|2−∇ϕ(Fϕ −δ∇ · (h2(ρ)σ)

we can rewrite the Navier-Stokes-Allen-Cahn-System in the followingmixed form:

February 26, 2014 Mirko Kränkel – 10 / 30

Find ρ,v,ϕ,τ,µ,σ so that

∂tρ + ∇ ·ρv = 0,

ρ∂t(v) + ∇ · (ρv⊗v)−∇ · (ρv)v + ρ∇µ− τ∇ϕ− 12ρ∇|v|2−∇ · (D(∇v)) = 0,

∂tϕ + ∇ϕ ·v + ητ

ρ= 0,

τ−Fϕ + δ∇ ·σ = 0,

µ−Fρ −12 |v|

2 = 0,

σ −∇ϕ = 0.

February 26, 2014 Mirko Kränkel – 11 / 30

Let T be a triangulation of Ω. Then we define the Discontinuous GalerkinSpace by

Vh := u ∈ L2(Ω) : u|E ∈ Pk for all E ∈ T (5)where Pk is the space of polynomials of degree ≤ K .The mean value of ϕ on the edge e is defined by:

ϕ=12 (ϕ

+ + ϕ−).

The jump operators on e are given by:

[[v]] = v+⊗n+ + v−⊗n−,[[ϕ]] = ϕ

+n+ + ϕ−n−.

Where ϕ,v take values in R,Rd .The set of all edges in the triangulation T is denoted by

Γ :=⋃

E,E ′∈TE ∩E′.

February 26, 2014 Mirko Kränkel – 12 / 30

Mean values and Jumps

E+

[[φ]]

E− ν−ν+

φ

February 26, 2014 Mirko Kränkel – 13 / 30

Notation

Let t0 = 0< t1 < t2 < · · ·< tN = T a subdivision of the timeinterval [0,T ] and ∆tn := tn− tn−1 the n-th time step.The backward difference quotient for a time dependent functionΦ is denoted by dtΦn :=

Φ(·,tn)−Φ(·,tn−1)

∆tn

Φn− 12 :=

Φ(·,tn)+Φ(·,tn−1)

2Define Vh := Vh×Vd

h ×Vh×Vh×Vh×Vdh

and Unh := (ρn,vn,ϕn,τn,µn,σn) ∈ Vh

February 26, 2014 Mirko Kränkel – 14 / 30

We test the continuity equation with a testfunction ψ ∈ Vh

∑E∈T

∫E

(∂tρ + ∇ ·ρv)ψdx ≈ ∑E∈T

∫E

∂tρψ−ρv ·∇ψdx

+∫

∂EG(ρ

+v+,ρ−v−) ·n+ψ

+ds

= ∑E∈T

∫E

(∂tρ + ∇ ·ρv)ψ

−∫

∂Eρ

+v+ ·n+ψ

+ds

+∫

∂EG(ρ

+v+,ρ−v−) ·n+ψ

+ds

(6)

If we set G(ρ+v+ρ−,ρ−v−) = ρv one can check:

−∫

∂Eρ

+v+ ·n+ψ

+ds+∫

∂EG(ρ

+v+,ρ−v−) ·n+ψ

+ds

=−∫

Γ[[ρv]]ψds

(7)

February 26, 2014 Mirko Kränkel – 15 / 30

Fully Discrete System

Given U0h ∈ Vh find a sequence (Un

h)i=1···N so that:

0 = ∑E∈T

∫E

(dtρn + ∇ · (ρ

n− 12 vn−

12 ))

ψdx−∫

Γ[[ρn− 1

2 vn− 12 ]]ψds =: 〈F1(Un

h),ψ〉,

0 = ∑E∈T

∫E

(ρn− 1

2 dt(vn) + ∇ · (ρn− 1

2 vn−12 ⊗vn−

12 )−∇ · (ρ

n− 12 vn−

12 )vn−

12

−12ρ

n− 12 ∇|vn− 1

2 |2 + ρn− 1

2 ∇µn− 1

2 − τn− 1

2 ∇ϕn)

χdx

−∫

Γ[[µn− 1

2 ]]ρn− 12 χ− [[ϕn− 1

2 ]]τn− 12 χds+B(vn−

12 ,χ) =: 〈F2(Un

h),χ〉,

0 = ∑E∈T

∫E

(dtϕn + ∇ϕ

n ·vn− 12 +

τn− 1

2

ρn− 1

2

)θdx−

∫Γ

[[ϕn− 12 ]]θvn− 1

2 ds

=: 〈F3(Unh),θ〉,

February 26, 2014 Mirko Kränkel – 16 / 30

Fully Discrete System

0 = ∑E∈T

∫E

n− 12 − Ψ(ρn−1,ϕn)−Ψ(ρn−1,ϕn−1)

ϕn−ϕn−1 + δ∇ ·σn− 12

)ζdx

−∫

Γδ [[σn− 1

2 ]]ζds =: 〈F4(Unh),ζ 〉,

0 = ∑E∈T

∫E

(µn− 1

2 − Ψ(ρm,ϕm)−Ψ(ρm−1,ϕm)

ρm−ρm−1 − 14 (|vn|2 + |vn−1|2)

)ηds

=: 〈F5(Unh),η〉,

0 = ∑E∈T

∫E

(σn−∇ϕ

n)ξdx +

∫Γ

[[ϕn]]ξds =: 〈F6(Unh),ξ 〉.

(8)

for all ψ,χ,θ ,ζ ,η ,ξ .

February 26, 2014 Mirko Kränkel – 17 / 30

The interior penalty bilinear form

The diffusion part of the momentum balance equation is discretizedthe bilinear form

B(v,w) := ∑E∈T

∫ED(∇v)∇wdx−∑

e∈Γ

∫eD(∇v)[[w]] +D(∇w)[[v]]

+ ∑e∈Γ

∫e

α

|e| [[v]][[w]]ds.

(9)

Which is coercive if the penalty parameter α > 0 is large enough.

D. Arnold, F. Brezzi, B. Cockburn, D. Marini Unified analysisof discontinuous Galerkin methods for elliptic problems.SIAM J. Numer. Anal. ,2002

February 26, 2014 Mirko Kränkel – 18 / 30

Proposition

The scheme (8) conserves mass∫Ω

ρnhdx =

∫Ω

ρ0h 0≤ n≤ N (10)

and dissipates energy.∫

ΩF(ρ

nh ,ϕ

nh ) +

|σnh |22 + ρ

nh|vn

h|22 dx

−∫

ΩF(ρ

n−1h ,ϕn−1

h ) +|σn−1

h |22 + ρ

n−1h|vn−1

h |22 dx

=− (τn− 1

2h )2

ρh−B(∇vn− 1

2h ,∇vn− 1

2h )

(11)

February 26, 2014 Mirko Kränkel – 19 / 30

Approximate Jacobian

With

〈F1(Unh),ψ〉= ∑

E∈T

∫E

(dtρn + ∇ · (ρ

n− 12 vn− 1

2 ))

ψdx−∫

Γ[[ρn− 1

2 vn− 12 ]]ψds,

〈F2(Unh),χ〉= · · ·· · ·

(12)

the scheme defines a mapping

F : Vh→V∗hLet V = (ψ,χ,θ ,ζ ,η ,ξ ) ∈ Vh

〈F(Uh),V〉= 〈F1(Unh),ψ〉+ 〈F2(Un

h),χ〉+ 〈F1(Unh),θ〉

+ 〈F4(Unh),ζ 〉+ 〈F5(Un

h),η〉+ 〈F5(Unh),ξ 〉

February 26, 2014 Mirko Kränkel – 20 / 30

Approximate Jacobian

Writing Unh as

Unh =

dimVh

∑i=1

uni ϕi

the discrete Operator

F : RdimVh → RdimVh

is defined byF(u1 · · ·udimVh)j = 〈F(Un

h),ϕj〉.In each time step we have to solve an equation of the form

F(un1 · · ·unk) = 0. (13)

February 26, 2014 Mirko Kränkel – 21 / 30

Approximate Jacobian

To use Newton’s method we need the Jacobian JF(u) := DF(u)

Matrix free method:Only the application

JF(u)v

is calculated.standard preconditioning methods are not applicable.Therefore the we compute the components of the Jacobianmatrix by finite differences:

(JF(u))i,j = (∂uiF(u)j)≈1ε

[〈F(uh + εϕj),ϕi〉−〈F(uh),ϕi〉

](14)

The DG basisfunctions vanish outside of one mesh element.The matrix can be computed traversing each element and it’sneighbors for the flux part.

February 26, 2014 Mirko Kränkel – 22 / 30

Numerical Experiments

µ1 and µ2 are chosen so that ∇ ·D(∇v) = ε∆v with ε = 0.01.h1 = h2 = 1 are constant.GMRES with ILU preconditioning for the linear subproblem of theNewton solver.∆t = 1e−3.320 cells in 1d .200×200 cells in 2d.

February 26, 2014 Mirko Kränkel – 23 / 30

Numerical Experiments

δ = 0.025,ρ0 = 2.5

February 26, 2014 Mirko Kränkel – 24 / 30

Numerical Experiments

δ = 0.025,ρ0 = 4

February 26, 2014 Mirko Kränkel – 25 / 30

Total and Kinetic Energy

February 26, 2014 Mirko Kränkel – 26 / 30

Total and Kinetic Energy

February 26, 2014 Mirko Kränkel – 27 / 30

Numerical Experiments

δ = 0.025,ρ0 = 2.2

February 26, 2014 Mirko Kränkel – 28 / 30

A energy consistent numerical method was presented.Using an approximated Jacobian Matrix in the Newton-Methodallows for general preconditioning methods.Because of the preconditioning the use of the approximatedmatrix is more efficient than the matrix free version.

February 26, 2014 Mirko Kränkel – 29 / 30

G.WittersteinSharp Interface Limit of Phase Change Flows,Adv. Math. Sci. Appl.,2010

H.W.Alt,G.WittersteinDistributional equation in in the limit of phase transition for fluids,Interfaces and Boundaries.,2011

J. Giesselmann, C. Makridakis, T. PryerEnergy consistent DG methods for the Navier-Stokes-Korteweg systemMathematics of Computation, 2014

Y. SaadIterative Methods for Sparse Linear SystemsPWS Publishing Company, Boston,1996

D. Arnold, F. Brezzi, B. Cockburn, D. Marini Unified analysis ofdiscontinuous Galerkin methods for elliptic problems.SIAM J. Numer. Anal. ,2002

February 26, 2014 Mirko Kränkel – 30 / 30

Recommended