Finite Difference Solutions For Advection Problems / Hyperbolic PDEs
EP711 Supplementary MaterialThursday, February 2, 2012
Jonathan B. Snively Embry-Riddle Aeronautical University
1
Contents
• Review of Conservation Laws• Basis for Finite Difference Solutions• The Lax and Lax-Wendroff Schemes
EP711 Supplementary MaterialThursday, February 2, 2012
2
Conservation Laws and Continuity EquationsThis more general advection equation can be considered a “continuity equation” or “conservation law” for a quantity Q that is conserved under all conditions – for example, mass density, momentum, or energy.
@Q
@t+r · (Q~v) = 0
Here, the quantity in parentheses is known as the “flux” f, such that the expression can be written as:
@Q
@t= �r · ~f
Although Q is here a scalar, it does not need to be!
3
Conservation of Mass DensityFor a scalar quantity (such as density), the “flux” f depends on Q(x,t), such that the expression can be written as:
@Q
@t= �r · ~f
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:
4
Conservation of MomentumAn example of a vector conservation law has already been presented. Momentum equations for each spatial direction (x, y, z for Cartesian coordinates) are here contained in one expression.
@
@t(⇢~v) = �r · (⇢vivj + p�ij)
This expression effectively describes Newton’s law. In one dimension, momentum conservation can be expressed:
@
@t
(⇢v) = � @
@x
(⇢v2 + p)
5
Conservation of EnergyEnergy is a scalar quantity (like density):
Here, it is important to define how E relates to other quantities via an equation of state – We will assume an ideal single-constituent gas.
@E
@t= �r · {(E + p)~v}
E = ⇢✏+1
2⇢(~v · ~v)
The internal energy is given by: ✏ = cvT =p
⇢(� � 1)
KineticInternal +
6
Model Equations of Motion:We model the atmosphere as a non-rotating, fully-nonlinear, compressible
gas:
⇧⌅
⇧t+⇧ · (⌅�v) = 0 (1)
⇧
⇧t(⌅�v) +⇧ · (⌅�v�v) = �⇧p� ⌅�g (2)
⇧E
⇧t+⇧ ·{ (E + p)�v} = �⌅gvz (3)
where the energy equation and the equation of state for an ideal gas are definedas:
E =p
(� � 1)+
12⌅(�v · �v) (4)
where ⌅ is density, p is pressure, �v is the fluid velocity, along with energy densityE. The Euler equations are coupled with equations for viscosity and thermalconduction:
⇧�v
⇧t= ⇤⇧2�v (5)
⇧T
⇧t= ⇥⇧2T (6)
Mass Density:
Momentum:
Energy:
State:
Viscosity:
Conduction:
7
Wave EquationsThe hyperbolic PDEs that we will investigate in this course yield wave equation solutions when manipulated in the appropriate context:
The wave equation can be described instead in terms of two advection equations with opposite speeds:
Physical systems that can be described in this way include Maxwell’s equations...
@
2u
@t
2� c
2 @
2u
@x
2= 0
@2u
@t2� c2r2u = 0
@u
@t
� c
@u
@x
= 0@u
@t
+ c
@u
@x
= 0
8
Maxwell’s Equations:
Another familiar example is the solution for waves on a string, or a simple acoustic wave solution. In these cases, two independent variables are incorporated (here, Ey and Bz).
9
Dispersion RelationsWave dispersion relations relate the effective wavenumber and frequency of waves within a system under the assumption of Fourier time-harmonic solutions of the form:
The resulting expression can be rewritten as:Which is an ideal dispersion relation for waves having phase velocity and group velocity equal to speed c.
NOTE: c is not the fluid velocity, but a characteristic speed of the physical system
@
2u
@t
2� c
2 @
2u
@x
2= 0
u(x, t) = U
o
e
j(!t�kx)
�!2 + c2k2 = 0
! = ck
10
Dispersion RelationsRecall that the dispersion relation for gravity waves indeed quite interesting! And, as we derived it, it also incorporated a solution for acoustic waves (acoustic branch):
Gravity waves are transverse wave motions below the Brunt-Vaisala fre-quency N and the acoustic cut-o� frequency �o.
Neglecting the acoustic terms, a convenient form for the incompressible dis-persion relation relates kx and kz via the wave vector angle � to the horizontal(see Figure) [e.g., Nappo, 2002, p. 32]:
� =kxN
(k2x + k2
z)1/2= N cos �.
k2z =
�2 � �2o
c2s
� �2 �N2
v2�x
As stated, the compressible dispersion relation is:
11
Contents
• Review of Conservation Laws• Basis for Finite Difference Solutions• The Lax and Lax-Wendroff Schemes
EP711 Supplementary MaterialThursday, February 2, 2012
12
Discretization of Systems in Space and Time
First, let’s discuss notation:
j j+1 j+2j-1j-2
n
n-1
n+1
x-axis domain
t-steppingevolution
13
j j+1 j+2j-1j-2
n
n-1
n+1
x-axis domain
t-steppingevolution
Where t=n*∆t, x=i*∆x, y=j*∆y, z=k*∆z
Indices are given by: n, i, j, k (i and j often interchanged...)
Spatial and Temporal Step Sizes are given by ∆t,∆x,∆y,∆z.
14
Derivatives on a Mesh
Recall that derivatives can be approximated on a mesh, i.e., the first order centered difference approximation:
dF
dx
⇠ Fj+1 � Fj�1
2�x
j j+1j-1
15
Boundary Conditions
For our first numerical experiments we will use the simplest possible boundary conditions: none. Our domains will be periodic, such that any perturbation can propagate out of one domain boundary and back into the other.
16
Contents
• Review of Conservation Laws• Basis for Finite Difference Solutions• The Lax and Lax-Wendroff Schemes
EP711 Supplementary MaterialThursday, February 2, 2012
17
Lax MethodThe well-known Lax method for solving hyperbolic PDEs is first order accurate, and based on a centered in space difference solution:
j j+1j-1
n
n+1
@u
@t
= �@F
@x
18
Lax-Wendroff MethodThe Lax-Wendroff method for solving hyperbolic PDEs is second order accurate, and is often implemented in a 2-step (“Richtmeyer”) form.
j j+1⁄2 j+1j-1⁄2j-1
n+1⁄2
n
n+1Two-stept-steppingevolution
19
Lax-Wendroff MethodThe Lax-Wendroff method for solving hyperbolic PDEs is second order accurate, and is often implemented in a 2-step (“Richtmeyer”) form.
This apparently simple approach has numerous pitfalls, many of which can be well-controlled given appropriate choices of time-steps and filtering / stabilizing viscosity.
20
Courant-Friedrichs-Lewy Stability Conditions
For finite difference solutions of advection problems, the non-dimensional Courant-Friedrichs-Lewy (CFL) number must be kept below 1 to ensure stability for most schemes.
However, note that for many schemes the behavior may be far more complex than “stable” or “unstable”, exhibiting either dispersion or diffusion.
CFL = c
�t
�x
Solutions stable for:
Here, c is the fastest propagation velocity on the grid (where both wave speeds and advective flows contribute!)
�t �x
c
21
Top Related