Pdes Iii (Hyperbolic Equations) : Phys 535

Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

PDEs III

(Hyperbolic Equations)

Phys 535

r. ouyed 1
Recapitulation on PDEs :
2nd order model problems
au xx + bu xy + cu yy + du x + eu y + fu = g

• PDE classified by discriminant: b2-4ac.


– Negative discriminant = Elliptic PDE. Example
Laplace’s equation
u xx + u yy = 0

– Zero discriminant = Parabolic PDE. Example Heat


equation
ut ! u xx = 0

– Positive discriminant = Hyperbolic PDE. Example


Wave equation
u xx ! utt = 0
r. ouyed 2
Remember
This!

r. ouyed 3
Hyperbolic PDES

• Typically describe time evolution with no steady state.


– Model problem: Describe the time evolution of the wave
produced by plucking a string.

• Initial conditions have only local effect


– The constant usually appearing in the equation determines
the speed of wave propagation.

r. ouyed 4
The simplest case of a hyperbolic equation is the
one-dimensional first order wave equation:

• ❖1st-order wave equation:



!u !u Sometimes
= "a , a>0 (6.1)
c is used instead
!t !x of a

• (ⅰ) a linear equation for constant a


• (ⅱ) the characteristic lines: x-at=const
• (ⅲ) the quantity u is convected along these
• lines at speed a.
• (ⅳ) can be formulated in explicit or implicit form.

r. ouyed 5
Even simpler one-dimensional first order wave equation
(a=-1):

Which describes the ADVECTION of a quantity u(x,t)


at a constant velocity -1!

Given sufficiently smooth initial data u(x,0)=u0(x), the solution is:

This solution is unique. The propagation of energy at a finite speed


is characteristic of hyperbolic PDEs, but this example is atypical
in having all of the energy propagate at exactly the SAME finite speed.

r. ouyed 6
The second case of a hyperbolic equation is the
one-dimensional Schrodinger equation:

Which describes the PROPAGATION of the complex state


function in quantum mechanics.

Note the similarity to the HEAT equation:

However, unlike the heat equation, Schrodinger equation is


not DIFFUSIVE but DISPERSIVE! This means that rather than
decaying as t increases, solutions tend to break up into
oscillatory wave packets.

r. ouyed 7
Hat shaped
initial function

In (b), nothing has happened except ADVECTION.

In (c), strong DISSIPATION or DIFFUSION is evident: sharp corners have been smoothed.

In (d), DISPERSION appears: oscillations appeared in an an initially non-oscillatory problem

These 3 mechanisms (advection, dissipation, and dispersion)


are central to the behavior of PDEs and their discrete models,
and together account for most linear phenomena.
r. ouyed 8
Practice problem

First: derive the theoretical solution u(x,t) and plot


the evolution of u(x,t) in space and time.
u

t
r. ouyed 9
Practice problem

Second: solve it numerically by the Leap-frog formula:

Constant known as
MESH RATIO

With space and time steps:

Plot u(x,t) for:


and
r. ouyed 10
r. ouyed 11
von Neumann approach to stability

Fourier Analysis
&
Amplification Factors

(insert trial solution into finite-difference equation)

into STENCIL basically!

r. ouyed 12
Substituting into the finite-difference equation/stencil obtained
using an FTCS for the advection equation yields

A finite-difference scheme is stable if

Never satisfied for the FTCS stencil


r. ouyed 13
Let us go back to the leap-frog stencil and insert:

Largest values of
z occurs for

For , the roots z lie in symmetric positions on the unit circle

For , the roots move off the circle (one inside, one outside).
The one outside amounts to an amplification factor greater than
1 and causes instability. r. ouyed 14
There is a simple fix to the instability issue discussed above,

It is known as the

Lax-Wendroff method

r. ouyed 15
r. ouyed 16
Take the Lax-Wendroff stencil, perform the von Neumann
analysis and show that:

The above simply proves that the LW scheme is stable if

This is the well-known


Courant-Friedrichs-Lewy condition
for stability of time-explicit schemes
r. ouyed 17
CFL (Courant, Friedrichs, Lewy)
Condition

A necessary condition for an explicit finite difference scheme


for a hyperbolic PDE to be stable is that for each mesh point
the domain of dependence of the PDE must lie within the
discrete domain of dependence.

r. ouyed 18
More elaboration on the CFL condition

The Complete
Wave equation

r. ouyed 19
Wave equation (Infinite Domain)

Wave equation

utt ! c 2u xx = 0 ( x, t ) $ (#!, !) " (0, !)

Initial Conditions
u ( x,0) = f ( x)
ut ( x,0) = g ( x)
Solution (verify)
x + ct
1 1
u ( x, t ) = [ f ( x " ct ) + f ( x + ct )] + g ( y )dy
2 2c x "!ct

r. ouyed 20
Practice problem

Simplest case:

utt ! u xx = 0 ( x, t ) $ (#!, !) " (0, !)

Initial Conditions

u ( x,0) = exp(! x 2 )
ut ( x,0) = 0

r. ouyed 21
t=.01 t=.1

t=1 t=10
r. ouyed 22
Characteristic curves

x+ct=constant x-ct=constant
t 1 1
x + ct
u ( x, t ) = [ f ( x " ct ) + f ( x + ct )] + ! g ( y )dy
2 2c x "ct

(x,t) The point (x,t) is influenced


only by initial conditions
bounded by characteristic
curves.

r. ouyed 23
Domain of dependence

x+ct=constant x-ct=constant
t

(x,t) The region bounded by the


characteristics is called the
domain of dependence of the
PDE.

r. ouyed 24
CFL Condition

Unstable: part of domain of dependence of PDE is outside


discrete domain of dependence

x+ct=constant x-ct=constant

t
x h
r. ouyed 25
CFL Condition

Possibly stable: domain of dependence of PDE is inside


discrete domain of dependence

x+ct=constant x-ct=constant

t
x h
r. ouyed 26
CFL Condition
Boundary of instability: domain of dependence of PDE is
discrete domain of dependence

x+ct=constant x-ct=constant

t
x h
r. ouyed 27
CFL Condition

Boundary of unstable: domain of dependence of PDE is


discrete domain of dependence

x+ct=constant x-ct=constant

k/h=1/c

t
x h
r. ouyed 28
CFL&vonNeumann Stability condition for finite difference schemes

r = cmax dt/dx
Von Neumann

(explicit)
(explicit)
(explicit)
(explicit)
(explicit)
(explicit)
(implicit)
(implicit)
(implicit)

r. ouyed 29
A few words about

NUMERICAL DISSIPATION
(artificial viscosity)

In computational fluid dynamics one encounters the


more dramatic term artificial viscosity!
r. ouyed 30
r. ouyed 31
Artificial dispersion or artificial viscosity
Even though a PDE may conserved energy, its FD models
will often lose energy as t increases, especially in the wave
numbers comparable to the grid size

This property is NUMERICAL DISSIPATION, and it is often


advantageous, since it tends to combat instability and
unwanted oscillations.

In fact artificial dissipation is often added to otherwise


non-dissipative formulae to achieve these ends.

The problem with it, it introduces fairly large dissipations at


short wavelengths

r. ouyed 32
Lax celebrated theorem:
Lax Equivalence Theorem

A consistent finite-difference formula


is convergent if and only if it is stable!

Consistency: Truncation error vanishes as mesh is refined

Leap-Frog stencil is consistent for any ,


but it is only stable for .

r. ouyed 33
The Theorem does NOT apply to non-linear systems!

r. ouyed 34
ADVECTION EQUATION

r. ouyed 35
Viscosity

r. ouyed 36
Nonlinear Problem (Burgers equation)
!u !u
= "u (6.21)
!t !x

• The inviscid Burgers equ:

!u ! ( u2 % !u !E
= " && ## or =" (6.22)
!t !x ' 2 $ !t !x
u2
where E =
2

• u(x,0)=1 0≤x≤2.0
• u(x,0)=0 2.0≤x≤4.0

r. ouyed 37
Burgers equation
• ⑴ The Lax method
• (ⅰ)explicit uin +1 " uin Ein+1 " Ein"1
="
!t 2!x

• (ⅱ) Replace 1 n
u = (ui +1 ! uin!1 )
n
i
2
2
• (ⅲ) 0 (( !t ), ( !x ) )
• FDE:
n +1 1 n n "t
u i = (ui +1 ! ui !1 ) ! ( Ein+1 ! Ein!1 ) or
2 2"x
1 n "t
uin +1 n
= (ui +1 ! ui !1 ) ! [(uin+1 ) 2 ! (uin!1 ) 2 ]
2 4"x
r. ouyed 38
Burgers equation
"t
umax ! 1 (CFL
6.23)
"x

• Stable:

The sharp gradient slowly dissipates and the solution decays to zero
r. ouyed 39
Now let us use the Lax-Wendroff method
n +1 n "t
u i =u !i ( Ein+1 ! Ein!1 )
2"x
("t ) 2 n +1 n n n n n n n
+ 2
((u i + u i )( E i +1 ! Ei !1 ) ! (u i + u i !1 )( Ei ! Ei !1 ))
8("x)

r. ouyed 40
Additional Topics

Dispersion relations for PDEs

r. ouyed 41
Any time-dependent scalar, linear PDE with constant coefficients,
on an unbounded space domain admits plane wave solutions:

where is the wave number and is the frequency.

Second order
wave equation

r. ouyed 42
r. ouyed 43
Discrete approximations to PDE also admit plane wave
solutions (at least if the grid is uniform). As such, they
too have dispersion relations!

If we discretize only in space (x) for the standard centered


scheme, we get

The above formula are obtained by (i) substituting


into the finite difference formulae representative of the 4 formulae
listed previously; (ii) replacing x by xj .
r. ouyed 44
r. ouyed 45
Stop for a moment and think about the previous slide (figures)!

The semi-discrete dispersion relation is an accurate


approximation when is small which corresponds
to many grid points per wavelength .

In general, the dispersion relation for a PDE is a


polynomial relation between and , while
a discrete model amounts to a trigonometric
approximation.

Solutions are improved by matching the trigonometric


function to the polynomial to as high a degree as
Possible!
r. ouyed 46
Orders

Dispersion relations for semi-discrete centered difference


approximations to ut = ux and ut = iuxx
r. ouyed 47
Summary of finite-difference schemes

First order wave equation

r. ouyed 48
Explicit schemes

r. ouyed 49
Explicit schemes … cont.

r. ouyed 50
Implicit
Schemes

r. ouyed 51
End of PDE III (Hyperbolic)

r. ouyed 52
Many thanks for your attention and patience!

It has been fun guys!

End of Phys 535

r. ouyed 53

You might also like