Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
125 views26 pages

Numerical Methods For Partial Differential Equations: CAAM 452 Spring 2005 Instructor: Tim Warburton

The document discusses numerical methods for solving partial differential equations (PDEs) of a general conservation law form. It begins with an overview of the goal PDE and examples of physical systems it models. It then outlines a strategy of breaking the problem into simpler pieces by first considering reduced forms of the PDE that are easier to solve, before combining methods to solve the full problem.

Uploaded by

Aqib Siddique
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views26 pages

Numerical Methods For Partial Differential Equations: CAAM 452 Spring 2005 Instructor: Tim Warburton

The document discusses numerical methods for solving partial differential equations (PDEs) of a general conservation law form. It begins with an overview of the goal PDE and examples of physical systems it models. It then outlines a strategy of breaking the problem into simpler pieces by first considering reduced forms of the PDE that are easier to solve, before combining methods to solve the full problem.

Uploaded by

Aqib Siddique
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Numerical Methods for Partial

Differential Equations

CAAM 452
Spring 2005
Instructor: Tim Warburton
Overview
• Our final goal is to be able to solve PDE’s of the form:
∂u
+ ∇ f = ∇ ( A∇u ) + g
∂t
u = u ( x, y , t ) ( x, y ) ∈ Ω
f = f ( u , x, y , t ) t ∈ [t0 , T ]

g = g ( u , x, y , t )
A = A ( x, y )
• This is a conservation law with some form of dissipation
(under assumptions on A)

• We will discuss boundary conditions, solution domain Ω, and


suitable solution spaces for this equation later.
CAAM 452 Spring 2005
Physical Examples

∂u
+ ∇ f = ∇ ( A∇u ) + g
∂t
• These and similar equations and vector analogs are
pervasive:
– Fluid mechanics (Euler equations, compressible Navier-Stokes
equations, magnetohydrodynamics).
– Electromagnetics (Maxwell’s equations)
– Heat equation
– Shallow water equations
– Atmospheric models
– Ocean models
– Bio-population models (morphogenesis, predator prey, epidemiology)
– …..

CAAM 452 Spring 2005


Divide and Conquer
• It is highly non-trivial to solve these equations analytically
(i.e. with smarts, pen and paper).

• We can forget the idea of writing down closed form solutions


for the general case.

• We will consider the component parts of the equations and


discuss techniques to solve the reduced equations.

• Some very reduced models admit exact solutions which


allow us to check how well we are doing.

• Finally we will put different methods together and aim for the
big prize.
CAAM 452 Spring 2005
Simplification

• Let’s choose a simple example, namely the


1D advection diffusion equation.

∂u ∂u ∂ 2u
−c = d 2
∂t ∂x ∂x

• This PDE is first order in time and second


order in space.

CAAM 452 Spring 2005


Further Simplification

• We can simplify even further by dropping the


second order diffusion or dissipation term:

∂u ∂u
−c = 0
∂t ∂x

• This PDE is first order in time and first order


in space.

• Volunteer to solve this equation analytically?.


CAAM 452 Spring 2005
Necessary Information to Solve The IBVP

• The Initial, Boundary, Value Problem


represented by the PDE ∂∂ut − c ∂∂ux = 0
requires some extra information in order to
to be solvable.

• What do we need?.

CAAM 452 Spring 2005


Answer
In this case, because of the hyperbolic nature of the PDE
(solution travels from right to left with increasing time), we
need to supply:
a) Extent of solution domain
b) What is the solution at start of the solution process: u(x,0)
c) Boundary data: u(b,t)
d) Final integration time.
t

As we just saw
we also need to
specify inflow
data

x=a x=b
x
Need to specify the solution at t=0
CAAM 452 Spring 2005
Brief Summary

• There is a checklist of conditions we will


need to consider to obtain a hopefully
unique solution of a PDE

1) The PDE (duh)


2) Boundary values (also known as boundary
conditions)
3) Initial values (if there is a time-like variable)
4) Solution domain

CAAM 452 Spring 2005


Periodic Case
• Suppose we remove the inflow and imagine that the
interval [a,b) is periodic.
• Further suppose we wish to solve for the solution at
some non-negative time T.
• We can indicate this by the following specification:
1) Find u ( x, t ) such that ∀x ∈ [ a, b ) , t ∈ [ 0, T ]
∂u ∂u
−c = 0
∂t ∂x
given
u ( x,0) = uo ( x ) ∀x ∈ [ a, b )
u ( a, t ) = u ( b, t ) ∀t ∈ [0, T ]
2) Evalute u ( x, T ) ∀x ∈ [ a, b )
CAAM 452 Spring 2005
Analytical Solution

• Volunteer: 1) Find u ( x, t ) such that ∀x ∈ [ a, b ) , t ∈ [ 0, T ]


∂u ∂u
−c = 0
∂t ∂x
given
u ( x,0) = uo ( x ) ∀x ∈ [ a, b )
u ( a, t ) = u ( b, t ) ∀t ∈ [0, T ]
2) Evalute u ( x, T ) ∀x ∈ [ a, b )

• For this PDE to make sense we should


discuss something about u0, what?

CAAM 452 Spring 2005


Fourier Series Representation (p4 GKO)
Theorem:
Assume that f ∈ C1 ( −∞, ∞ ) is 2π periodic.Then
f has a Fourier series representation:
ω =∞
1
f (x) = fˆ (ω ) e iω x
2π ω =−∞

where the Fourier coefficients fˆ (ω ) are given by



ˆf (ω ) = 1 e − iω x f ( x ) dx
2π 0

Finally, the series converges uniformly to f ( x )


In other words, we can express a sufficiently smooth function in terms of an infinite
trigonometric polynomial. The fhats are the Fourier coefficients of the polynomial.

CAAM 452 Spring 2005


Returning to the Advection Equation

• We wills start with a specific Fourier mode as the


initial condition:
1) Find 2π -periodic u ( x, t ) such that ∀x ∈ [ 0, 2π ) , t ∈ [ 0, T ]
∂u ∂u
−c = 0
∂t ∂x
given
1 iω x ˆ
u ( x,0) = f ( x ) = e f (ω ) ∀x ∈ [ 0, 2π )

where f is a smooth 2π -periodic function of one frequency ω

• We try to find a solution of the same type:


1 iω x
u ( x, t ) = e uˆ (ω , t )
2π CAAM 452 Spring 2005
cont

• Substituting in this type of solution the PDE:


∂u ∂u
−c = 0
∂t ∂x
• Becomes an ODE:
∂u ∂u ∂ ∂ 1 iω x 1 iω x duˆ
−c = −c e uˆ (ω , t ) = e − iωcuˆ
∂t ∂x ∂t ∂x 2π 2π dt
duˆ
− iωcuˆ = 0
dt
• With initial condition
û (ω ,0 ) = fˆ (ω )
CAAM 452 Spring 2005
cont

• We have Fourier transformed the PDE into an ODE.


• We can solve the ODE:
duˆ
− iωcuˆ = 0
dt uˆ (ω , t ) = eiωct uˆ (ω ,0 ) = eiωct fˆ (ω )
uˆ (ω ,0 ) = fˆ (ω )
• And it follows that the PDE solution is:

1 iω x
ansatz : u ( x, t ) = e uˆ (ω , t )

1 iω ( x+ct ) ˆ
solution : uˆ (ω , t ) = eiωct fˆ (ω ) u ( x, t ) = e f (ω ) = f ( x + ct )

1 iω x ˆ
initial condition: f ( x ) = e f (ω )

CAAM 452 Spring 2005


Note on Fourier Modes

• Note that since the function should be 2pi


periodic we are able to deduce: ω ∈
• We can also use the superposition principle
for the more general case when the initial
condition contains multiple Fourier modes:
1 ω =∞ iω x ˆ
f ( x) = e f (ω )
2π ω =−∞
1 ω =∞ iω ( x+ct ) ˆ
u ( x, t ) = e f (ω ) = f ( x + t )
2π ω =−∞

CAAM 452 Spring 2005


cont

• Let’s back up a minute – the crucial part was


when we reduced the PDE to an ODE:
∂u ∂u duˆ
−c = 0 − iωcuˆ = 0
∂t ∂x dt
• The advantage is: we know how to solve
ODE’s both analytically and numerically
(more about this later on).

CAAM 452 Spring 2005


Add Diffusion Back In

• So we have a good handle on the advection


equation, let’s reintroduce the diffusion term:
∂u ∂u ∂ 2u
−c = d 2
∂t ∂x ∂x
• Again, let’s assume 2-pi periodicity and
assume the same ansatz:
1 iω x
u= e uˆ (ωt )

• This time:
∂u ∂u ∂u 2
duˆ duˆ
−c = d 2 − iωcuˆ = −dω 2uˆ = ( icω − dω 2 ) uˆ
∂t ∂x ∂x dt dt
CAAM 452 Spring 2005
cont

• Again, we can solve this trivial ODE:


duˆ
= ( iω c − dω 2 ) uˆ
dt

( icω −dω 2 )t
uˆ = uˆ (ω ,0 ) e

u = uˆ (ω ,0 ) e iω ( ct + x ) − d ω 2t
e

CAAM 452 Spring 2005


cont

• The solution tells a story:

u = uˆ (ω ,0 ) e iω ( ct + x ) − dω 2t
e

• The original profile travels in the direction of


decreasing x (first exponential term)

• As the profile travels it decreases in


amplitude (second exponential term)
CAAM 452 Spring 2005
What Did Diffusion Do??

• Advection: ∂u − c ∂u = 0 duˆ
− iωcuˆ = 0
∂t ∂x dt

• Diffusion: ∂u ∂u ∂ 2u duˆ
−c = d 2 = ( iωc − dω 2 ) uˆ
∂t ∂x ∂x dt

• Adding the diffusion term shifted the multiplier


on the right hand side of the Fourier
transformed PDE (i.e. the ODE) into the left
half plane.
• We summarize the role of the multiplier…
CAAM 452 Spring 2005
Categorizing a Linear ODE

duˆ Im ( µ )
= µuˆ uˆ = uˆ ( 0 ) e µt
dt

Increasingly
oscillatory
Re ( µ )
Exponential decay Exponential growth

oscillatory
Increasingly

Here we plot the behavior of the solution to the top right ODE for mu in the complex plane
CAAM 452 Spring 2005
Solving the Scalar ODE Numerically

• We know the solution to the scalar ODE


duˆ
= µuˆ
dt
• However, it is also reasonable to ask if we can
solve it approximately.

• We have now simplified as far as possible.

• Once we can solve this model problem numerically,


we will apply this technique using the method of
lines to approximate the solution of the PDE.
CAAM 452 Spring 2005
ODE Prototype

• We will consider ODE’s of the kind

du
= f (u )
dt
u ( 0) = u0

CAAM 452 Spring 2005


ODE Time Stepping Topics

We will cover the following details on time stepping


the ODE.
– Stability of time stepping
– Stability regions in the complex plane
– Accuracy of time stepping
– Convergence of time stepping method with decreasing
time step
– Examples of explicit time stepping methods:
• Euler forward
• Leap-frog
• Adams-Bashford
• Runge-Kutta

CAAM 452 Spring 2005


Reading for Next Week
• Study: Gustaffson-Kreiss-Oliger (GKO) p3-17 and p38-39

• Brush up your programming and PDE knowledge – there will be frequent


implementation exercises.

CAAM 452 Spring 2005

You might also like