1 Numerical Methods and Software for Partial Differential Equations Lecturer:Dr Yvonne Fryer...
-
Upload
brett-black -
Category
Documents
-
view
216 -
download
3
Transcript of 1 Numerical Methods and Software for Partial Differential Equations Lecturer:Dr Yvonne Fryer...
1
Numerical Methods and Software for Partial Differential
Equations
Lecturer: Dr Yvonne Fryer
Time: Mondays 10am-1pm
Location: QA210 / KW116 (Black)
2
Aim of Lecture• During this lecture we will discuss:
– Course outline– Partial differential equations
• Elliptic• Parabolic• Hyperbolic
– Numerical Methods• Finite Difference• Finite Volume• Finite Element
– Software : Excel, PDE-Toolbox
3
Components of Course
Partial Differential Equations
Numerical Methods
Software
4
Course Outline• 10 Week course + 2 other weeks• 1 Coursework• 1 Exam• Assessment 50:50 (Exam:CW)• Approximate times (lectures lengths vary):
– Lecture 10am – ~11:30am Queen Anne A210– Class work: ~11:30am – 12noon Queen Anne A210– Lab work: 12noon – 1pm King William W116 (Black)– Homework: finish off Class & Lab work
5
Textbooks
• Morton & Mayers, Numerical Solution of Partial Differential Equations (Cambridge University Press, 2005) is recommended if you want to do some background reading
• Burden & Faires, Numerical Analysis (Brooks Cole, 2001) has a good chapter on Numerical Methods for PDEs
• However you do not require either of these books – the lecture notes should suffice
6
Partial Differential Equations
• PDEs are used extensively to represent real world phenomena and processes.– Heat transfer in nuclear reactors.– Airflow around an aircraft.– Structural dynamics of a bridge.– Movement of money in financial markets.– Etc.
• Modelling & simulation of such processes requires solution of these PDEs.
7
Modelling in Industry: Automobiles
8
Modelling in Industry: Aerospace
9
Modelling in Industry: Electronics
10
Partial Differential Equations
• Ordinary Differential Equation
Describes rate of change in population (P) over time (t). Only one independent variable.
• Partial Differential Equations have more than one independent variable.
Pdt
dP05.0
11
Partial Differential Equations• Note the difference in the differential terms.
• The dependent variable f = f(t) is dependent on only time (t) for the ODE. For the PDE the dependent variable u is dependent on both directions x and y.
dt
df
y
u
x
u
Partial Differentials
Ordinary Differential
12
Introduction• Partial Differential Equations (PDEs) can be
used to represent, mathematically, a large amount of real-world phenomena.
• For example the heat conduction across the earth:
Where u(t,x,y,z) is temperature, K, , and are material properties and x, y, z and t are space locations and time.
2
2
2
2
2
2
z
u
y
u
x
uK
t
u
13
Partial Differential Equations• Example: Temperature on a
computer board.
02
2
2
2
k
Q
y
T
x
T
x
T=
T=
x
T
x
T
Heat Source Q
y
14
Terminology• For simplicity, we will deal only with only two
independent variables:– two space variables: x and y, or– one space variable and one time variable
denoted by x and t respectively.• The unknown function is denoted by u and its
partial derivatives:
• Mostly we shall use the longer form. However,
watch out for the short form in past exam papers.
2
22
x
uu
yx
uu
t
uu xxxyt
15
Terminology• In two dimensions the gradient (Grad) operator
is given by the vector:
• Divergence (Div) is given by the dot product • The Laplacian is given by:
y
x
2
2
2
22 .
yx
.
16
Classroom discussion• Consider the scalar function
and the vector function
i.e. is the component of u in the x direction• Calculate the following and state what the result
represents (e.g. vector, scalar)
.))Grad((Div
.)(Div
)(Grad
uu
),(
),(),(
2
1
yxu
yxuyxu
),( yx
1u
17
Classification of PDEs• The generalised 2nd order linear PDE can be written:
where a, b, c, d, e, f, g are constants (some may be 0).• A PDE in this form is said to be:
– Hyperbolic if : b2 – 4ac > 0 – Parabolic if : b2 – 4ac = 0 – Elliptic if : b2 – 4ac < 0
02
22
2
2
gfuy
ue
x
ud
y
uc
yx
ub
x
ua
18
Exercise• Classify the following PDEs
1)
2)
3)
4)
02
22
2
2
y
u
yx
u
x
u
0622
22
2
2
y
u
x
u
y
u
yx
u
x
u
0962
22
2
2
y
u
yx
u
x
u
yx
u
x
u
2
2
2
9
19
Elliptic PDEs• Elliptic PDEs represent phenomena that have already
reached a steady state and are, hence, time independent.• Two classic Elliptic Equations are:
– Laplace Equation
– Poisson's Equation
u(x,y) is independent variable and g is a constant
02
2
2
2
y
u
x
u
02
2
2
2
gy
u
x
u
20
Elliptic PDE - Example• Temperature, u(x,y)
profile around two computer chips on a printed circuit board.
• Q is the power source and K is the thermal conductivity
02
2
2
2
k
Q
y
u
x
uHeat Source Q
21
Further ExamplesPoisson’s equation can be used to model many different phenomena
02
2
2
2
gy
u
x
u
Flow in Porous Media
Current in extended bodies
Diffusion Torsion in a bar
constitutive law
g
Darcy HookeOhmFick
Du
V: Voltage
fluid supply
VDu cDu
D: conductivityD: permeability D: diffusion coeffs
rate of twistelectric chargeion supply
c: concentration : piezometric head
T
xyu
,
: Prandtl stress function
u
22
Parabolic PDEs• Parabolic PDEs describe time dependent
phenomena, such as conduction of heat, that are evolving towards steady state.
• Classical parabolic equation is the one dimensional heat or diffusion equation.
02
2
ax
ua
t
u
23
Parabolic PDE - Example
• One-dimensional heat diffusion along a pipe. Pipe is heated from one end.
2
2
10x
u
t
u
Tim
eInitial Conditions
Steady state conditions
24
Hyperbolic PDE - Example• A continuously-vibrating undamped Violin or
Guitar string.
• Example – wave equation
Tim
e
2
22
2
2
x
ua
t
u
25
Boundary and Initial Conditions• For a PDE based mathematical model of a
physical system to have a solution then we must have:– The PDE– The physical domain of interest– The boundary and initial conditions.
• Elliptic problems require boundary conditions
• Parabolic & Hyperbolic equations require both initial and boundary conditions.
26
Boundary and Initial Conditions• Two types of boundary condition may be given:
– Dirichlet : u(x,y) = c
– Neumann :
(and mixed : )
where c is a constant.
• Initial condition for u(x,t):
cx
u
cux
u
)()0,( xfxu
27
Boundary and Initial Conditions• For example consider the temperature, u(x,y), across
the following plate.
• Mathematical model to represent temperature u(x,y) is:
Insulated (0,0)
y
25o C
x
Insulated
100o C
(10,5)
50100),10(25),0(
1000)5,()0,(:(BCs)toSubject
50,100,0:Solve2
2
2
2
yyuyu
xxy
ux
y
u
yxy
u
x
u
28
Boundary and Initial Conditions
02
2
2
2
y
u
x
uu(
10,y
) =
100
u(0,
y) =
25
0)0,(
xy
u
0)5,(
xy
u
MODEL RESULT
Insulated
Insulated
100o C
25o C
(0,0)
(10,5)
REAL WORLD
29
Numerical Methods• Usually we cannot solve the PDEs by analytical
means. In this case numerical methods are used. • Such methods are:
– Finite Differences– Finite Volumes– Finite Elements
• These methods discretise the governing equations at discrete points in the domain.
• These discretised equations are then solved using computers.
• Microsoft Excel (standard spreadsheet software)• MATLAB (http://www.mathworks.com)
• Can solve PDEs
30
Numerical Software
31
Example• Simulate temperature between two rooms using
Laplace Equation• All external walls insulated
5 Meters3 Meters
Frid
ge (
-100
C)
Fire
Pla
ce (
40C
)
32
Results from Example