Flux Form Finite Difference / Flux Limiters

Post on 03-Jul-2022

28 views 0 download

Transcript of Flux Form Finite Difference / Flux Limiters

Flux Form Finite Difference / Flux Limiters

EP711 Supplementary MaterialTuesday, February 28, 2012

Jonathan B. Snively Embry-Riddle Aeronautical University

1

Contents

• Flux Form Finite Difference Methods• Flux Limiters

EP711 Supplementary MaterialTuesday, February 28, 2012

2

“Flux Form” (for Conservative Advection) For a scalar quantity (such as density), the “flux” f depends on q(x,t). The continuity equation can be written as:

Perhaps the best-known conservation law is the continuity equation for neutral mass density:

@⇢

@t= �r · (⇢~v)

@⇢

@t

= � @

@x

(⇢v) = �v

@⇢

@x

� ⇢

@v

@x

In 1-Dimension:

@q

@t= �r · ~f

3

Conservation Laws and Continuity Equations

Qfx fx + (∂fx/∂x) dx

dx

In 1D

@q

@t= �r · ~f

@q

@t

= �@f(q)@x

4

Finite Volume Methods

QiFi-1/2 Fi+1/2

xi xi+1/2xi-1/2

Qi is a cell average of quantity q at a given time step tn:

Fi+1/2 is the flux through the lateral cell interface at tn.

Q

n

i

' 1�x

Zxi+1/2

xi�1/2

q(x, t

n

)dx

d

dt

Zxi+1/2

xi�1/2

q(x, t)dx = f(q(xi�1/2, t))� f(q(x

i+1/2, t))

tn

5

Finite Volume Methods

QiFi-1/2 Fi+1/2

xi xi+1/2xi-1/2

Qi is a cell average of quantity q at a given time step tn:

Fi+1/2 is the flux through the lateral cell interface at tn.

Q

n

i

' 1�x

Zxi+1/2

xi�1/2

q(x, t

n

)dx

tn

Q

n+1i = Q

ni �

�t

�x

(Fni+1/2 � F

ni�1/2)

Finite Volume Methods are based on difference approximations of this form.

6

Finite Volume MethodsRecall Qi is a cell average of quantity q at a time step tn:

Q

n

i

' 1�x

Zxi+1/2

xi�1/2

q(x, t

n

)dx

Q

n+1i = Q

ni �

�t

�x

(Fni+1/2 � F

ni�1/2)

Finite volume methods seek to approximate “Fluxes” F, to obtain an average of fluxes at the cell interfaces occurring over a single time step:

F

ni�1/2 '

1�t

Z tn+1

tn

f(q(xi�1/2, t))dt

7

Flux Form Finite DifferencingFinite difference methods can also be expressed in the same flux form:

Q

n+1i = Q

ni �

�t

�x

(Fni+1/2 � F

ni�1/2)

In this case, the fluxes F can be derived directly from difference method solutions (i.e., for Lax, Lax-Wendroff, Upwind, etc.).

The many benefits of this approach will be seen shortly!

8

Upwind Method for Advection

The flux form of the Upwind Method can be defined:

The Upwind solution for the constant coefficient advection equation (Conservation Law) can be written as:

Q

n+1i = Q

ni �

�t

�x

(Fni+1/2 � F

ni�1/2)

Q

n+1i = Q

ni �

u�t

�x

(Qni �Q

ni�1)

Fni�1/2 = uQn

i�1 That was easy...

9

Lax-Friedrichs (Flux Form)

A flux form of the Lax-Friedrichs Method can be defined:

F

ni�1/2 =

12[f(Qn

i�1 + f(Qni )]� �x

2�t

(Qni �Q

ni�1)

Spatial Average Diffusive Flux

Q

n+1i =

12(Qn

i�1 + Q

ni+1)�

�t

2�x

[f(Qni+1)� f(Qn

i�1)]

The Lax-Friedrichs solution for the continuity equation (Conservation Law) can be written as:

Q

n+1i = Q

ni �

�t

�x

(Fni+1/2 � F

ni�1/2)

10

Lax-Wendroff (Flux Form)

A flux form of the Lax-Wendroff Method can be defined:

The Lax-Wendroff solution for the advection equation can be written as:

Q

n+1i = Q

ni �

�t

�x

(Fni+1/2 � F

ni�1/2)

F

ni�1/2 =

12c(Qn

i�1 + Q

ni )� 1

2�t

�x

c

2(Qni �Q

ni�1)

Q

ni = Q

ni �

c�t

2�x

(Qni+1 �Q

ni�1) +

12

(c�t)2

(�x)2(Qn

i�1 � 2Q

ni + Q

ni+1)

11

Richtmeyer Method

Recall the Lax-Wendroff method as it is often implemented in a 2-step (“Richtmeyer”) form:

Now, we can see that the method explicitly calculates numerical fluxes via the initial half-step.

u

n+1/2j+1/2 =

12(un

j + u

nj+1)�

�t

2�x

(fnj+1 � f

nj )

F

n+1/2j+1/2 = f(un+1/2

j+1/2 )

u

n+1j = u

nj �

�t

�x

(Fn+1/2j+1/2 � F

n+1/2j�1/2 )

12

Contents

• Dimensional Splitting• Flux Limiters

EP711 Supplementary MaterialTuesday, February 28, 2012

13

Flux Limited MethodsBy defining flux form methods, we can construct special “flux corrected” and “flux limited” methods, which combine the best features of low-order and high-order methods [e.g., Durran, 2010; LeVeque, 2002].

We will focus first on Flux-Limited flux form finite difference methods, using fluxes defined by combinations of low (FL ) and high (FH) order flux approximations.

Fi�1/2 = FLi�1/2 + �i�1/2(FH

i�1/2 � FLi�1/2)

Here, the “flux limiter” is given by phi.

14

Calculations for Flux Limiter

The flux limiter function will be dependent on the ratio of solution slopes across an interface between two cells:

The flux limiter value phi is a function of theta...

✓ni+1/2 =

Qni �Qn

i�1

Qni+1 �Qn

i

�(✓ni+1/2)

Let’s investigate this experimentally, then discuss the stability consequences and TVD criteria on Thursday!

15