• Aucun résultat trouvé

2 Conservative schemes

N/A
N/A
Protected

Academic year: 2022

Partager "2 Conservative schemes"

Copied!
5
0
0

Texte intégral

(1)

PW #2: Burgers equation

Given a scalar conservation law, there exist several schemes to solve the equation. But the solutions provided by these algorithms are not equivalent. For instance, it is relevant to compare accuracy on equiv- alent meshes, computational costs and time, stability or consistency conditions, and so on. This work is thus devoted to comparing some numerical schemes when solving theBurgersequation:

tu+xF(u)=0, (1a)

with:

F(u)=u2

2 . (1b)

This problem is restricted to theperiodic boundary condition casein the present work.

Let us introduce the homogeneous cartesian meshxj = jxfor a given mesh size∆x. The natural framework for solving Syst. (1) consists in defining cells of whichxjis the middle. Consequently, we note xj+1/2

j+12¢

x such thatxj is the middle ofIj =]xj−1/2,xj+1/2[. Likewise, the time discretization is denoted bytn=nt,∆t>0. The approximation of the solutionuatxj andtnisunj (the unknowns are located in the center of the cells).

1 Non-conservative schemes

Provided that the solutionuis smooth enough, Eq. (1a) may be rewritten as:

tu+u∂xu=0. (2)

On the one hand, given this new formulation, we can derive a natural scheme aiming at solving Eq. (2):

unj+1unj

t +unj

unjunj1

x =0, if unj ≥0, (3a) un+1junj

t +unj

unj+1unj

x =0, if unj <0. (3b) This scheme will be referred to as theupwind non-conservative scheme.

On the other hand, Eq. (2) may be considered as a transport equation for which the velocity field is unknown. Themethod of characteristics(MOC) provides a classical scheme for this kind of equations. It consists in tracking particules in their motion due to the velocity field (characteristic curves) in order to keep track of relevant values. More precisely, we introduce the characteristic flow as the solution to the

ODE: dX

dt =u¡

t,X(t;s,x)¢

, X(s;s,x)=x.

This flow represents the position at time t of a particule located in x at times. Under smoothness as- sumptions onu, the existence (and uniqueness) of the solutionX is guaranteed by the Cauchy-Lipschitz

(2)

The MOC relies on the following remark. Ifuis a solution to Syst. (1), then:

d dt

£u¡

t,X(t;s,x)¢¤

=0.

This means thatuis constant along characteristic curves:

u¡

t,X(t;s,x)¢

=u(s,x).

This leads to the scheme (takingt=tn,s=tn+1andx=xj):

unj+1=uˆnnj), ξnj ≈X(tn;tn+1,xj). (4a) This scheme hence consists in two steps:

Time step: resolution of the ODE forX on [tn,tn+1]. A 1st-order approximation is:

ξnj =xjunjt. (4b)

Space step: after localizingξnj in the interval [xk,xk+1), this step is based on a spatial interpolation using valuesunk andunk+1. More precisely:

un+1j =

xk+1ξnj

x unk+1+ξnjxk

x unk. (4c)

This scheme is nonlinear but unconditionally stable.

2 Conservative schemes

Among schemes solving Syst. (1), there exists a class called “conservative schemes” due to aL1-norm con- servation principle. They read:

un+1junj

t +

Fnj+1/2Fjn1/2

x =0, (5a)

whereFj+1/2n is the numerical flux. This term comes from the finite volume framework. Indeed, when integrating Eq. (1a) over [tn,tn+1]×[xj−1/2,xj+1/2], we get:

Un+1j −Unj + Z tn+1

tn

£F¡

u(t,xj+1/2

−F¡

u(t,xj−1/2)¢¤

dt=0,

where the fluxes at the boundary of the cells appear. We get intersted in the sequel in numerical fluxes of the type:

Fnj+1/2=F(unj,unj+1), (5b) for every fluxFsatisfying the consistency conditionF(u,u)=F(u).

(3)

Here are several possible fluxes:

Upwind conservative scheme:

Fupw(unj,unj+1)=

F(unj) ifunj ≥0, F(unj+1) ifunj <0.

Lax-Friedrichs:

FLF(unj,unj+1)=1 2

¡F(unj)+F(unj+1

− ∆t 2∆x

¡unj+1unj¢ .

Richtmyer-Lax-Wendroff:

FLW(unj,unj+1)=F(un+1/2j+1/2), whereun+1/2j+1/2 =1 2

¡unj+1+unj¢

− ∆t 2∆x

¡F(unj+1)−F(unj)¢ .

MacCormack:

FMcC(unj,unj+1)=1 2

hF(unj+1)+F(un+1/2j )i

, whereun+1/2j =unj−∆t

x

¡F(unj+1)−F(unj)¢ .

Godunov: the idea of the Godunov scheme relies on a piecewise constant approximation over cells.

More precisely, we consider at timetnthe function ˆunsuch that ˆun(tn,x)=Unj ifxIj.Ujndenotes the mean value of the approached solution ˆun at timetn over the cellIj. To progress in time, we introduce Riemann problems at each interfacexj+1/2. Letwbe the solution to the Riemann model problem:

tw+xF(w)=0, w(0,x;uL,uR)=

uL ifx<0, uR ifx>0.

Integrating Eq. (1a) over [tn,tn+1Ij, the Godunov scheme writes as (5a) with:

F(unj,unj+1)= 1

t Z tn+1

tn F¡ ˆ

un(t,xj+1/2

dt=F¡ ˆ

un(tn+1,xj+1/2)¢ ,

for ˆun(tn+1,xj+1/2)=w(t, 0;Unj,Unj+1). For theBurgersequation, the solution to the Riemann prob- lem is a similarity solution and readsw(t,x;uL,uR)=wˆ³x

t;uL,uR

´ where:

w(ξ;ˆ uL,uR)=









uL ifξuL, ξ ifuL<ξ<uR, uR ifξuR, ifuLuRand:

ˆ

w(ξ;uL,uR)=

uL ifξσ, uR ifξ>σ,

(4)

3 Kinetic scheme

A scheme may be obtained by considering Syst. (1) as the limit of the following kinetic equation when ε→0:

tf +a(v)∂xf =1 ε

¡χu(v)−f¢

, (6a)

with:

a(v)=F0(v). (6b)

The functionχu(v) is defined by:

χu(v)=





1 if 0<v<u,

−1 ifu<v<0, 0 otherwise,

(7)

and the unknows of Syst. (1) and Syst. (6) are linked by the relationship:

u(x,t)= Z

Rf(x,v,t)d v. (8)

We use a spliting scheme to approach the solution of Syst. (6):

Step 1: Linear transport step

tf +a(v)∂xf =0. (9)

We consider here an upwind scheme:

fn+

1 2

j (v)=fjn(v)−∆t

x

ha+(v)³

fjn(v)−fj−1n (v)´

a(v)³

fj+1n (v)−fjn(v)´i

(10) wherea+(v)=max(a(v), 0) anda(v)=max(−a(v), 0).

Step 2: Collision step

tf =1 ε

¡χuf¢

. (11)

Whenε→0, this step reduces to f =χuand thus, the second step of the scheme consists in solving:

fjn+1(v)=χ

un+

1 2 j

(v), (12)

whereun+

1 2

j =

Z

Rfn+

1 2

j (v)d v. Noting thatun+1j =

Z

Rfjn+1(v)d v = Z

Rχ

un+

12 j

(v)d v=un+

1 2

j , we can now return to variables of interest, that isunj. Integrating Eq. (10) with respect tov∈Ryields an equation of the form (5a) where the fluxFjn+1/2 is defined by:

Fj+1/2n = Z

Ra+(v)χunja(v)χunj+1d v.

(5)

4 Directions

You may consider the periodic domain [0, 2] and three initial conditions for theBurgersequation:

u01(x)=x;

u02(x)=1[1/4,3/4](x);

u03(x)=exp

µ−(x−1/2)2 x(1x)

1(0,1)(x).

You may implement 1 non-conservative scheme, 3 conservative schemes and the kinetic scheme. In each case, try to highlight theCFL condition.

Eventually, compare the solutions to Syst. (1) and the ones to:

tv+xFˆ(v)=0,

withv=u2and ˆF(v)=23v3/2. These equations are equivalent in the smooth case.

You may deliver your results electronically at latest onFebruary 6, 2011.

([email protected]@inria.fr)

Références

Documents relatifs

Controlling the numerical dif- fusion associated with the average step of Roe-type path conservative schemes, and more generally of any Godunov-type scheme, is a key point

This conjecture, which is similar in spirit to the Hodge conjecture, is one of the central conjectures about algebraic independence and transcendental numbers, and is related to many

L’accès à ce site Web et l’utilisation de son contenu sont assujettis aux conditions présentées dans le site LISEZ CES CONDITIONS ATTENTIVEMENT AVANT D’UTILISER CE SITE WEB.

Connaître les unités de mesure du temps et leur rapport en elles.. Identifier les 5 périodes historiques avec des

We propose a class of conservative finite-volume type schemes to approximate weak solutions of conservation laws that contain undercompressive shock waves.. We prove the convergence

The scheme has the following properties: it preserves constant velocity and pressure at the two-fluid interface, it preserves a perfectly sharp interface and it is fully

In particular, in [10] and [3], the authors define a conservative scheme which is based on in-cell discontinuous reconstructions of non classical shocks for approximating the

For a model of nonlinear elastodynamics, we construct a finite volume scheme which is able to capture nonclassical shocks (also called undercompressive shocks).. Those shocks verify