3CO2_I_Handout

advertisement
PY 3CO2 Part I Partial Differential Equations 15 Lectures
Charles H. Patterson
Introduction
1
Introduction to PDE’s, boundary conditions and initial conditions
2
Coordinate Systems and Differential Operators
Survey of PDE’s in Physical Applications
3
Elliptic PDE’s
Poisson and Laplace Equations
Solution by Integral Transform
Poisson Equation in 1-D
4
Finite Difference Method for Differential Operators
Liebmann’s Method Applied to Poisson’s Equation
5
Parabolic PDE’s
Computer Modelling of Fluids
Advection and Diffusion
Continuity Equation
Diffusion Equation
Schrödinger Equation as a Diffusion Equation
6
Method of Separation of Variables
Solving Inhomogeneous PDE’s by Eigenfunction Expansion
7
Hyperbolic PDE’s
1-D Wave Equation
8
Finite Difference Methods for parabolic and Hyperbolic PDE’s
Explicit Method
Implicit Crank-Nicholson Method
9
Waves in Channels
10
Solution of Coupled Nonlinear Wave Equations by Finite Differences
Solitary Waves and the Korteweg deVries Equation
11
Classification of PDE’s
12
Stability of Numerical methods for PDE’s
Fourier Stability Method
Matrix Stability Method
Recommended Texts
Partial Differential Equations for Scientists and Engineers,
S.J. Farlow, Dover (1993) S-LEN 515.353 M23; 3
Partial Differential Equations for Scientists and Engineers,
G. Stephenson, Imperial College Press, (1996) 515.353 N8
Computational physics, problem solving with computers
R.H. Landau and M.J. Paez, Wiley (1997) 530.07 N7
2 Coordinate Systems and Differential Operators
Order, Class and Homogeneity of PDE’s
The general form of a linear PDE in 2 independent variables is
A u xx  B u xy  C u yy  D u x  E u y  Fu  G
The coefficients A, B, C, etc. may be constants or variables.
The order of a pde is the order of the highest partial derivative present. For example,
u t  u xx is second order.
In the general form above, u(x,y) is the dependent variable and x and y are the independent
variables.
Pde’s are linear if no products of the dependent variable or its derivatives, or functions such
as sine involving the dependent variable, are present. Otherwise the pde is nonlinear.
Generally, linear pde’s are much easier to solve, except for particular nonlinear pdes where
analytic solutions are known.
Pde’s may be classified according to whether they are:
Hyperbolic
B2 > 4AC
Vibrating systems, waves, etc.
Parabolic
B2 = 4AC
Heat flow, diffusion, etc.
Elliptic
B2 < 4AC
Equilibrium problems, electrostatics, etc.
Coordinate Systems and Differential Operators
Mathematical Methods in the Physical Sciences, M.L. Boas, 2nd Edition, pp 427 ff
Cylindrical Coordinate System
Scale Factors
Distance moved when a coordinate changes by an infinitesimal amount.
ds  h1 dx1 x1  h 2 dx 2 x 2  h 3 dx 3 x 3
ds  1 dx i  1 dy j  1 dz k
Cartesian Coordinate System
ds  1 dr e r  r d e  1 dz e z Cylindrica l Coordinate System
hi are the scale factors
Cartesian Vector Operators
 
u  
 x
.V 
2u 
V1
x1

u
z 

y

V2
x 2
 2u

V3
x 3
 2u  2u


x12 x 22 x 32
Gradient
Divergence x1  x x 2  y x 3  z
Laplacian
General Curvilinear Coordinates
x1 , x 2 x 3
Orthogonal Coordinate s
ds  e1 h1  e 2 h 2  e 3 h 3
ds 2   h i2 dx i2
i
Vector Operators in General Curvilinear Coordinates
1 u
i h i x i
 

1





.V 
h 2 h 3 V1  
h 3 h1V2  
h1h 2 V3 

h1h 2 h 3  x1
x 2
x 3

u  
2u 
1
h 1h 2 h 3
  

 h h 1 u   

2 3 h x  x
 x1 
1
1
2




 h h 1 u     h h 1 u 
 3 1 h x  x  1 2 h x 
2
2
3
3
3 

4 Finite Difference Approximations
Taylor Series Expansion Approximations to first and second derivatives of f(x)
The Taylor series expansion for a function of one variable about the point x is
f(x  h)  f(x)  h f ' (x) 
h2
f ' ' (x)  O(h 3 )
2!
The notation O(h3 ) indicates that the series, when truncated at the quadratic term in h,
contains errors that scale as h3 and higher powers of h.
We can immediately obtain an approximation to the derivative of f(x) from the first two
terms of the expansion.
f ' (x) 
f(x  h)  f(x)
 O(h1 )
h
Note that, even though we neglect terms of O(h 2 ) in the expansion, since we divide through
by h to obtain the derivative expression the approximation is correct to O(h1) only. Note
that there is an asymmetry in this approximation to the derivative at x, since the function at x
and x+h occur, but not the function at x-h. This is therefore referred to as a forward
difference approximation. It is possible to expand f(x) in the negative direction in the
Taylor expansion and hence to obtain a backward difference approximation
f(x  h)  f(x)  h f ' (x) 
f ' (x) 
h2
f ' ' (x)  O(h 3 )
2!
f(x)  f(x - h)
 O(h1 )
h
By combining forward and backward difference approximations it is possible to obtain a
central difference approximation to the derivative of f(x) at x that contains errors of order
O(h 2 ) . Note the difference in scaling of errors for the central difference approximation
when compared with the forward and backward difference approximations.
h2
f ' ' (x)  O(h 3 )
2!
h2
f(x  h)  f(x)  h f ' (x) 
f ' ' (x)  O(h 3 )
2!
f(x  h)  f(x)  h f ' (x) 
f(x  h) - f(x - h)  2 h f ' (x)  2
f ' (x) 
h3
f ' ' (x)  O(h 4 )
3!
f(x  h) - f(x - h)
 O(h 2 )
2h
By retaining terms in the Taylor series to order h3 we can obtain an approximation for the
second derivative which contains errors of order h2
h2
h3
f ' ' (x) 
f ' ' ' (x)  O(h 4 )
2!
3!
h2
h3
f(x  h)  f(x)  h f ' (x) 
f ' ' (x) 
f ' ' ' (x)  O(h 4 )
2!
3!
f(x  h)  f(x)  h f ' (x) 
add these expansions to obtain
h 2f ' ' (x)  f(x  h)  2 f(x)  f(x  h)  O(h 4 )
f ' ' (x) 
f(x  h)  2 f(x)  f(x  h)
h
2
 O(h 2 )
Taylor series expansions in more than one dimension
A PDE contains at least two independent variables and so we need to approximate
differential operators in at least two dimensions. This is done using Taylor series expansions
in more than one dimension. Suppose
u = u(x,y)
The Taylor series expansion of u about the point (x,y) is
u(x  h, y  k)  u(x, y)  h u x (x, y)  k u y (x, y) 
h2
2hk
k2
3
u xx (x, y) 
u xy (x, y) 
u yy (x, y)  O( h )
2!
2!
2!
h
h   
k
The vector notation for this expansion is
u( x  h)  u( x)  h T . u (x) 
1 T
3
h . u (x) . h  O( h )
2!
h
x
2
h    h T  h k  x     
x i x j
k
 y
Returning to the long-hand notation, the expansion of u(x,y) in the x direction is
u(x  h, y)  u(x, y)  h u x (x, y) 
h2
u xx (x, y)  O(h 3 )
2!
u(x  h, y)  u(x, y)  h u x (x, y) 
h2
u xx (x, y)  O(h 3 )
2!
If we subtract these two equations and rearrange to make ux the subject of the equation we
find that the central difference approximation to ux is
u x (x, y) 
u(x  h, y)  u(x - h, y)
 O(h 2 )
2h
We can also obtain forward and backward difference approximations which contain errors
of order O(h1) from the Taylor series expansion in either direction.
Computational Molecules
It is convenient to write the function u at points on a grid for numerical solution with
subscripted indices rather than arguments. Thus we make the equivalence
u(x, y  k)  u i1, j
k is the stepsize or distance between gridpoints in the y direction in the numerical solution.
Perversely, Farlow reverses the order of the arguments/indices in going over to the gridpoint
index. We will do the same to maintain consistency with Farlow. The indicial representation
of the first and second order partial derivatives is given below and illustrated by
corresponding ‘computational molecules’.




u x (x, y) 
1
u i, j1 - u i, j1  O(h 2 )
2h
u y (x, y) 
1
u
-u
 O(k 2 )
2k i1, j i-1, j




1
u xx (x, y)  2 u i, j1 - 2u i, j  u i, j-1  O(h 2 )
h
1
u yy (x, y)  2 u i1, j - 2u i, j  u i-1, j  O(k 2 )
k
Provided that the stepsizes in the two directions (h and k) are equal, then we obtain the
following approximation for the Laplacian operator in 2 dimensions


1
 2 u (x, y)  2 u i1, j  u i-1, j  u i, j1  u i, j-1 - 4 u i, j  O(h 2 ) .
h
Liebmann’s Method
Example: Elliptic PDE with Dirichlet Boundary Conditions (p303 Farlow)
Consider the electrostatic problem where the potential is to be determined in a square region
of unit dimension in the xy plane. The potential on the boundary is sin(x) along the bottom
of the region and zero on the sides and top.
PDE
BC
u xx  u yy  0
u(x, y)  0
0  x  1, 0  y  1
0  x  1, y  1
x  0, 0  y  1
x  1, 0  y  1
u(x, y)  sin( x)
0  x  1, y  0
When we apply the numerical approximation for the Laplacian operator to the problem, a set
of inhomogeneous linear equations (with dimension equal to the number of internal
gridpoints) is generated. For a large number of gridpoints, the number of equations
generated may require a very large amount of memory (especially so when the problem is in
3 dimensions or more). Fortunately a simple method known as Liebmann’s method allows
even a very large system of equations to be solved.
The grid consists of points lying on the boundaries (boundary points, where values are
specified according to the Dirichlet boundary conditions) and internal points where we seek
the values of the potential. The method is very simple:
Step 1. Initialise values of the internal points
Step 2. Update each internal point using the approximation to the 2 dimensional Laplacian
given above. Repeat step 2 until the solution converges (ceases to change) to within some
specified tolerance.
8 Explicit and Implicit Methods of Finite Difference Solution
These marching methods can be applied to parabolic and hyperbolic PDE’s. In explicit finite
difference methods each new value of the solution as time advances is given explicitly in
terms of values of the solution at earlier times. In implicit finite difference methods the
values of the solution as time advances are obtained by solving sets of linear equations
containing already determined values of the solution and several values yet to be determined.
Example: Heat Flow in 1-D Solved by Explicit Method (p309 Farlow)
Consider the problem of heat flow in 1-D where Dirichlet BC are used at one end of a bar of
unit length and mixed BC are used at the other end.
BC
u t  u xx
0  x  1, 0  t  
u(0, t)  1
0t
u x (1, t)  - u(1, t) - g(t) 
IC
u(x,0)  0
PDE
0  x 1
Discretise according to x j  j h, t i  i k . h and k are the spatial and temporal stepsizes,
respectively, and j and i are integers denoting the particular space and time gridpoint.
Specification of BC
u(0, t)  1
becomes u i,1  1 i  2,3, ..., m
1
u x (1, t)  - u(1, t) - g(t)  becomes u i, n - u i, n -1  - u i, n - g i
h
u i, n-1  h g i
u i, n 
1 h

 
 i  2,3,..., m; g
i
 g(ik)
Approximation to PDE


1
u
-u
k i1, j i, j
1
u xx (x, t) is approximat ed by 2 u i, j1 - 2 u i, j  u i, j1
h
u t (x, t) is approximat ed by


Equating the two numerical approximations we obtain the following PDE approximation



1
1
u i1, j - u i, j  2 u i, j1 - 2 u i, j  u i, j1
k
h
k
u i1, j  u i, j  2 u i, j1 - 2 u i, j  u i, j1
h



Algorithm
Step 1. Update internal points
Step 2. Update boundary points. Repeat steps 1 and 2 until required time has elapsed.
Example: Heat Flow in 1-D Solved by Implicit Method (p317 Farlow)
Consider the problem of heat flow in 1-D where Dirichlet BC are used at either end of a bar
of unit length.
BC
u t  u xx
u(0, t)  0
IC
u(1, t)  0
u(x,0)  1
PDE
FDE



0  x  1, 0  t  
0t
0  x 1


1

1- 
u i1, j  u i, j  2 u i1, j1 - 2 u i1, j  u i1, j1  2 u i, j1 - 2 u i, j  u i, j1
k
h
h

Rearrange so that all terms with timestep i+1 appear on the left hand side
-  r u i1, j1  1  2r  u i1, j  ru i1, j1  1 -   r u i, j1  1 - 2 1 -   r  u i, j  1 -   r u i, j1
k
r 2
h
In an implicit method this set of equations is solved at each timestep. The number of
equations is the number of internal gridpoints at a single time. The time stepsize can be
larger in an implicit method and it can therefore be worth the extra computational work to
use an implicit rather than an explicit method.
Algorithm
Choose  = 0.5 (Crank-Nicholson), h = 0.2, k = 0.08 => r = 2, r = 1, 1+2  r = 3, r(1-) =
1. Number of space gridpoints, including 2 boundary grid points = 6. j ranges from 1 to 6, j
= 1, j = 6 are boundary points. At each time step the value of the solution at the four internal
grid points is solved for in terms of the value of the solution at the six (internal plus
boundary) grid points at the previous time step. The resulting system of linear equations for
the first time step is
 u 21 


  1 3  1 0 0 0   u 22  1

 
  
 0  1 3  1 0 0   u 23  1
 0 0  1 3  1 0  .  u   1
24


 
 0 0 0  1 3  1  u  1

  25   
u 
 26 
Given the BC chosen in this problem, u21 = u26 = 0 and so the equations reduce to
 3  1 0 0   u 22  1
  

 
u

1
3

1
0



23  1
 0  1 3  1 .  u   1

  24   
 0 0  1 3   u  1

  25   
These equations can be solved rapidly and effectively using the LU decomposition method.
9 Wave motion in channels
We derive coupled partial differential equations representing conservation of mass and
conservation of momentum for water in a channel of width, b. Approximate forms for the
conservation equations lead to the wave equation when the wave amplitude is small
compared to the mean water depth. We then investigate finite difference methods for solving
the coupled pde’s in two dependent variables, the water velocity, u, and the height of the
water column, h. (See Mathematics for dynamic modeling, E. Beltrami, Academic Press
(1987), 125 ff ARTS 330.18 M79).
Conservation of mass
The continuity equation is applied to water in the channel which has width, b, height, h(x,t),
thickness, x, and is moving parallel to the x direction at velocity u(x,t). The water density
is .
Mass of slice = volume . density = b x h 

b Δx h(x, t) ρ    b Δx h(x, t) ρ u(x, t)   0
t
x


 h(x, t) u(x, t)   0
h(x, t) 
t
x
h
h
u
u
h
0
t
x
x
Conservati on of Mass
Conservation of Momentum
If we consider a slice where the height of the slice varies within the slice, then there is a
pressure difference across the slice which tends to accelerate the slice in the x direction. We
must compute the pressure difference across the slice, recognize that this corresponds to a
force, F(x,t), and substitute this force into the conservation of momentum equation
d
(momentum)  F(x, t)
dt
The instantaneous momentum of the slice is
x (t)
2
 ρ b h(x, t) u(x, t) dx
x2(t) – x1(t) = x
x (t)
1
In differentiating this integral with respect to time we must use Leibniz’ rule as the limits of
integration depend on the differentiation variable. Thus
x (t)
x (t)
2
.
.
d 2

h(x,
t)
u(x,
t)
dx

(h(x,
t)
u(x,
t)
)
dx

x
2 (t) h(x 2 , t) u(x 2 , t) - x 1 (t)h(x 1 , t) u(x 1 , t)

dt x (t)
x (t) t
1
1
.
x 1 (t)  u(x 1 , t)
u(x 1 , t)
 O(x) 2
x
h(x 1 , t)
h(x 2 , t)  h(x 1 , t)  (x 2 - x 1 )
 O(x) 2
x
substituti ng these relations we find
.
x 2 (t)  u(x 2 , t)  u(x 1 , t)  (x 2 - x 1 )
x (t)
d 2
u 
 u
h(x, t) u(x, t) dx  h   u  x  O(x) 2

dt x (t)
x 
 t
1
(see Tutorial sheet for details of steps)
The water pressure at depth, h – z, measured from the water surface is g (h – z). The
pressure force averaged over a slice at (x1, t) is
h(x ,t)
F(x1 , t)  ρg
 h(x 1 , t) - z dz b
1
0
The difference in pressure force across a slice, of width x, by Taylor series expansion is
h(x ,t)

d  1
h(x 1 , t) - z dz bΔx  O(x) 2
F(x 2 , t) - F(x1 , t)  ρg
dx  0


h(x1,t)

h(x 1 , t)

 ρg 
dz b Δx  O(x) 2



x
0


 ρg h
h
b x  O(x) 2
x
The rate of change of momentum of the slice is
u 
 u
ρbh  u  Δx  O(x) 2
x 
 t
The net force on the slice in the positive x direction is
- ρbh g
h
Δx  O(x) 2
x
Equating these two and dividing by common factors yields
u
u
h
u
g
0
t
x
x
Conservati on of Momentum
h
h
u
u
h
0
t
x
x
Conservati on of Mass
We now have two coupled, nonlinear pde’s which can only be solved by numerically.
However, before proceeding to the numerical problem, we make an approximation which
shows that the solution to these equations is approximately the solution to the wave equation
under certain conditions.
Wave equation
Express the height of the water column as
_
h  h 
_
where h is the mean water height and  is the difference from the mean height. Assume
that  is small compared to h and that the wavelength is small compared to the wave
amplitude so that
η
u

and u
is small. It can also be shown that the terms u
may be
x
x
x
neglected under these conditions. Then the mass and momentum conservation equations can
be approximated by
 << h and
u

g
t
x
0
 _ u
h
0
t
x
Conservati on of Momentum (approxima te)
Conservati on of Mass (approxima te)
Differentiation of the first equation wrt x and the second wrt t allows the equations to be
combined to give
 2
1  2

0
_
x 2 g h x 2
_
Wave equation w ith veloci ty g h
10 Solution of coupled, nonlinear pde’s by finite difference method
We begin by considering an explicit finite difference scheme for the linear approximations to
the conservation equations. In finite difference schemes it is conventional to stagger the grid
for the independent variables. We update one of the variables and then substitute results
from that update into the other finite difference equation. These methods are therefore
known as leapfrog methods.
A central finite difference scheme yields
h ij1  h ij1
2t
u ij1  u ij1
2t
u ij1  u ij-1
h
0
2x
Mass Conservati on
h ij1  h ij-1
g
0
2x
Momentum Conservati on
_
Solving for the updates to h and u we obtain


Mass Conservati on


Momentum Conservati on
h ij1  h ij1 - h
t i
u j1  u ij-1
x
u ij1  u ij1 - g
t i
h j1  h ij-1
x
_
Both of these schemes require knowledge of the initial conditions at two separate times. They
also require boundary conditions in which one independent variable is specified at the left
hand boundary and the other at the right. Which appears on each side depends on the
staggering of the grid. In order to avoid the need to specify initial conditions at two different
times we can adopt a modified scheme where time derivatives are approximated using a
forward difference scheme. A forward finite difference scheme yields
h ij1  h ij
t
u ij1  u ij
t
u ij1  u ij-1
h
0
2x
Mass Conservati on
h ij11  h ij-11
g
0
2x
Momentum Conservati on
_
Solving for the updates to h and u we obtain


Mass Conservati on


Momentum Conservati on
h ij1  h ij - h
t i
u j1  u ij-1
2x
u ij1  u ij - g
t i1
h j1  h ij-11
2x
_
Solitary Waves and the Korteweg deVries equation
The following extract from John Scott Russell’s ‘Report on waves’ is available at
http://www.ma.hw.ac.uk/solitons/index.html
John Scott Russell and the solitary wave
Over one hundred and fifty years ago, while conducting experiments to determine the most
efficient design for canal boats, a young Scottish engineer named John Scott Russell (18081882) made a remarkable scientific discovery. As he described it in his "Report on Waves":
(Report of the fourteenth meeting of the British Association for the Advancement of Science,
York, September 1844 (London 1845), pp 311-390).
“I was observing the motion of a boat which was rapidly drawn along a narrow channel by a pair of horses,
when the boat suddenly stopped - not so the mass of water in the channel which it had put in motion; it
accumulated round the prow of the vessel in a state of violent agitation, then suddenly leaving it behind, rolled
forward with great velocity, assuming the form of a large solitary elevation, a rounded, smooth and well-defined
heap of water, which continued its course along the channel apparently without change of form or diminution of
speed. I followed it on horseback, and overtook it still rolling on at a rate of some eight or nine miles an hour,
preserving its original figure some thirty feet long and a foot to a foot and a half in height. Its height gradually
diminished, and after a chase of one or two miles I lost it in the windings of the channel. Such, in the month of
August 1834, was my first chance interview with that singular and beautiful phenomenon which I have called
the Wave of Translation”.
Mathematicians from Heriot-Watt University recreate a solitary wave in the Union canal near
Edinburgh on the centenary of the Korteweg-deVries equation (1995).
By experimenting with solitary waves in a wave trough, Russell was able to deduce that the
wave velocity, c, was related to the wave amplitude,  , and the mean water height, h, and the
acceleration due to gravity, g, through
c 2  g(h  η)
The mathematical history of the equation describing Russell’s solitary waves begins with
Boussinesq (1871) and Rayleigh (1876). By considering the equation of motion for an
inviscid, incompressible fluid they were able to deduce this relationship for the wave
velocity, provided the wave width was much greater than the mean water height. They also
determined the wave amplitude to be
u(x, t)  ηsech 2 βx  ct 
β2 
3η
4h (h  η)
2
η  h
Neither Boussinesq nor Rayleigh obtained the wave equation that has sech2 as its solution.
This step was taken by Korteweg and de Vries in 1895.
General Solution of the KdV Equation

The conventional form for the KdV equation is
u t - 6uu x  u xxx  0

Travelling wave solutions have the form
u(x, t)  f( )
  x - ct
c is the wave velocity

Substituting for u in the KdV equation we obtain
- cf  - 6ff   f   0

Integrate twice wrt 
 d - cf  - 6ff   f    0
- cf - 3f 2  f   A
 df  - cf - 3f
2

 f    df  A
c
1
2
- f 2 - f 3  f    Af  B
2
2
1
f  2  f 3  c f 2  Af  B
2
2
A and B are constants of integration. In order to have a localised traveling wave packet, we
impose boundary conditions: f, f  , f  all tend to zero as || goes to infinity. One way of
ensuring these conditions is to have A = B = 0.
polynomial in f. The solution with A = B = 0 obeys
f 2  f 2 2f  c
Real solutions exist when 2f + c > 0.


Solutions also exist at zeros of the
Rearrange to
df
 f 2f  c    d
Make the substitution of variable f  -

2
sech   
e  e 
df
 f 2f  c becomes  d

c
sech 2
2
d
sech   - sech  tanh 
d
c sech 2 tanh 
-
c
sech 2
2
-
c tanh 2 
2
c
 d
2
x
    o last term is a constant of integration
c
c
c
  - x o 
2


f
Hence one solution to KdV equation is
 c

c
 ( x - ct - x o 
sech 2 
2
 2

xo is the peak position at t = 0.
Korteweg and deVries’ solution to the water solitary wave equation
Korteweg and deVries showed that
1/2
3g
Ut   
2h

 2ε

 U χ  UU χ  U χχχ 
3
 3

U(,t) is the wave function,  is a coordinate chosen to move with the wave
  x - gh (1 - /h)t , g is the acceleration due to gravity, h is the mean water depth. Using
g
t , this equation can be transformed into
h
the change of variables U(,t) = u(X,t), X    
the conventional KdV equation
1/2
3g
ut   
2h




 uu X  u XXX 
3


In the moving frame,  , ut is zero and so
2ε

U χ  UU χ  U χχχ  0
3
3
 Integrate this equation twice wrt  to obtain
 2  0
2ε U 2  U 3   U χ

By substitution it is possible to verify that
U(  )   sech 2 ( x) provided
  4  2


1 

u(x, t)   sech 2 
x - gh (1 - /h)t 
2 

The wave speed is
 

c  gh 1  
 2h 
2
2
 
 

   

c  gh 1    gh 1   O 
 h
 2h 
 h  

2
c 2  g(h   )
Also  2 
3
4h 2

and
h3
3
  - 2  2

h
 1
The former of the last two results is a prediction of the result observed by Russell. Note that
the wave velocity of an infinitesimal wave is c  gh or c 2  gh , and so the solitary wave
travels faster than the infinitesimal wave to an extent determined by , the wave amplitude.
Note that the half width of the wave is inversely proportional to  . In other words, taller
waves travel faster and are narrower.
Soliton properties of solutions to the Korteweg deVries equation
Linear combinations of solutions of linear differential equations are also solutions to the
parent differential equation. However, solutions to nonlinear differential equations do not
share this property. This is illustrated by the fact that the wave velocity in the solution to the
Korteweg-deVries equation appears both in the phase and the amplitude factors of the
solution. Simple scaling of the solution by a constant factor is not allowed. Solutions to the
Korteweg-deVries equation containing more than one solitary wave are possible, however.
The figure below shows two solitary waves moving to the right. The taller one, initially to
the left, moves faster as it has larger amplitude and eventually emerges to the right of the
smaller solitary wave. After the solitary waves have moved apart they have the same sechsquared profile that they had before their collision. However, unlike simple linear
superposition of solutions of linear differential equations, solitary wave solutions of this type
have a shift in their path as a result of the collision, although their shapes are fully recovered
once they separate again. This type of behaviour is refereed to as a soliton property of the
solutions – they have an essentially particle-like behaviour. When the initial conditions for
the Korteweg-deVries are very different from a solitary wave solution, the initial state breaks
up into a soliton train.
Two solitons colliding
Initial sin(kx) condition evolves into a soliton train after some time
http://www.usf.uni-osnabrueck.de/~kbrauer/solitons/soli1.html
http://www.math.h.kyoto-u.ac.jp/~takasaki/soliton-lab/gallery/solitons/index-e.html
11 Classification of PDE’s
The general form for a second order pde is A u xx  B u xy  C u yy  D u x  E u y  Fu  G
The coefficients A, B, C, etc. may be constants or variables. For many physical applications
with constant coefficients (A, B, C), it is possible to bring the pde to a canonical (or standard)
form which allows us to classify the pde and decide the appropriate way to solve it. The new
variables,  and , which bring the pde to its canonical form are known as characteristic
coordinates. The number and type of these coordinates is decided by the sign of the
discriminant, B2 – 4AC. From the theory of conic sections, a curve of the form
A x 2  B xy  C y 2  D x  E y  F  0
is a parabola, an ellipse or a hyperbola if the discriminant is zero, negative or positive,
respectively. Hence the nomenclature for the pde classes. The change of variables is carried
out as follows:
If the dependent variable u is a function of the characteristic coordinates (which in turn are
functions of the original coordinates, x and y) then the exact differential
du = u d + u d
ux = u x + u x
uxx = (u x + u x)x
By generating these derivatives and replacing them in the original equation we obtain
A u   B u   C u   D u   E u   Fu  G
with coefficients given by
A  A  x2  B  x  y  C  y2
B  2A  x  x  B ( x  y   y  x )  2C  y  y
C  A  x2  B  x y  C  y2
D  A  xx  B xy  C yy  D x  E y
E  A  xx  B xy  C yy  D x  E y
FF
G G
Suppose we choose the transformation such that A vanishes: A  x2  B  x  y  C  y2  0

This is equivalent to the quadratic equation A  x

 y
2


  B  x



 y

  C  0 with solution


 x - B  B 2 - 4AC

. Note that there are two roots when B2 ≠ 4AC and one when B2 =
y
2A
4AC (parabolic). If B2 > 4AC (hyperbolic) there are two real roots and if B2 < 4AC (elliptic)
there is a complex conjugate pair of roots. Note also that the equation for C is equivalent to
that for A and so the two characteristic coordinates are obtained using the two choices of
sign in the solution to the quadratic equation for
x
.
y
Along a characteristic coordinate line (i.e.  = constant or  = constant) d = 0 or d = 0.
d = x dx + y dy since  =  (x, y)
d = x dx +y dy since  =  (x, y)
Hence d = 0 implies x dx + y dy = 0 and
x
dy - B  B 2 - 4AC

y
dx
2A
d = 0 implies x dx + y dy = 0 and
x
dy - B  B 2 - 4AC

y
dx
2A
and
These equations may be used to solve for the characteristic coordinates.
Example: Wave Equation c2 uxx – utt = 0
A = c2 B = 0 C = -1
B2 – 4AC = 4/c2 > 0 => hyperbolic
x
dt - B  B 2 - 4AC
1


 x - ct  constant ( )
t
dx
2A
c
x
dt - B  B 2 - 4AC
1


 x  ct  constant ( )
t
dx
2A
c
B  2A  x x  B ( x y   y x )  2C  y y  4
Hence the pde in characteristic coordinates is:
4 u   0
D' Alembert' s solution
u( , )  f( )  g( )  f(x - ct)  g(x  ct)
12 Fourier Stability Analysis
Solutions to pde’s can frequently be expressed in terms of functions that are complex or real
exponentials and therefore possess a wavelength or decay constant. So far we have not
explored the necessary conditions for a numerical solution to a pde to be a reasonably
accurate solution to the finite difference equation. Fourier stability analysis allows us to
determine appropriate step sizes for an accurate solution when the wavelength or decay
constant (which is given in terms of parameters such as a diffusion constant or wave velocity
in the pde) has a certain value. Fourier stability analysis does not take boundary conditions
for a specific problem into account.
Fourier stability analysis is performed by substituting the analytic solution to a pde into the
numerical finite difference equation. This results in several conditions which must be met in
order for the solution to be an accurate solution to the finite difference equation.
Example: Heat Equation in 1-D
u t   2 u xx
PDE
The analytic solution is
2 2
u(x, t)  e -  t e ix
The explicit finite difference equation is

u i1, j  u i, j   2 r u i, j1 - 2 u i, j  u i, j1

Substitute the analytic solution to obtain
2 2
e -  k  1   2 r (e ih - 2  e -ih )
 h 
 1 - 4  2 r sin 2  
 2 
e -  k is the relative amount by which the analytic solution decays in a time step of length
k. The function on the right hand side is approximately equal to this quantity provided
certain conditions on h and k are met. By expanding the exponential and the sine in power
series we find that this condition is satisfied provided
2 2
2 2 k  1
h  1
i.e. the spatial step size is much less than the wavelength and the temporal step size is much
less than the temporal decay constant.
2 2
Since e -  k is the relative amount by which the analytic solution decays in a single time
 h 
step and this is approximated by 1 - 4  2 r sin 2   , the solution can oscillate and increase
 2 
exponentially rather than decaying. This will be the case when
 h 
1 - 4  2 r sin 2    1
 2 
is not satisfied. This condition is equivalent to the Fourier Stability Criterion
 2r 
1
2
Matrix Stability Analysis
This method of analysis may be applied to implicit finite difference schemes such as the
Crank-Nicholson scheme. One obtains a matrix operator P which, when applied to the
marching solution to a pde at one time step, will generate the marching solution at the
following time step
Vi1  P . Vi
Vi is a vector containing the elements ui,j j = 1,2, …, n
We will apply this method to the heat equation and hence are looking for solutions that decay
exponentially in time. The matrix P is a constant matrix, depending only on the integration
scheme. The solution advanced by one time step is
Vi1  P . Vi
The key feature of this analysis (when it is applied to a pde with exponentially decaying
solutions in time, such as the heat equation) is that the matrix P must have all its eigenvalues
less than unity in magnitude, otherwise the solution will diverge exponentially in time.
Crank-Nicholson formula ( = 0.5)
r
r
r
r
u i1, j1  1  r  u i1, j  u i1, j1 
u i, j1  1 - r  u i, j  u i, j1
2
2
2
2
k
r 2
h
-
Multiply by –2/r and rearrange to
u i1, j1  2 u i1, j  u i1, j1 -
2
2
u i1, j  - u i, j1  2 u i, j - u i, j1  u i, j
r
r
Adopt BC such that ui,j = 0 when j = 1 or j = n. The finite difference equation above may
then be represented as
A .Vi1  B . Vi
A = C – 2/r I
B = - C –2/r I
I is the 4x4 unit matrix
0
0 
 2 1


0 
 1 2 1
C
0
1 2 1 


 0
0
1  2 

Vi1  A -1 .B . Vi  P . Vi
P  A -1.B
Eigenvector decomposition of P
P possesses a set of eigenvalues and eigenvectors. If all eigenvalues of P are less than unity
then the solution will decay exponentially in time, otherwise it will grow exponentially in
time and may also oscillate as it grows.
P . vn  n vn
 n is the nth eigenvalue of P and v n is its nth eigenvector. The initial condition for the pde
can be decomposed into a linear combination of eigenvectors of P. Iteration of V1 to find
Vi+1 shows that
Vi1   n  n  V1
i
n
From this equation, it is obvious that the solution will grow exponentially (rather than decay,
as it should) if the modulus of any of the eigenvalues exceeds unity.
It is possible to find the eigenvalues of P analytically and therefore find a condition which
determines whether the solution to the pde is stable or not.
P.v   v
A -1B . v   v
B . v   A. v
B   A. v  0
2
2
I B-C- I
r
r
2
B -  A  - C(1   ) I - (1 -  ) I
r
Hence P . v   v becomes
AC-
2


 C(1   ) I  r (1 -  ) I . v  0

2 (  - 1) 
 C  r (   1) I . v  0


C -  I. v  0
2 (  - 1)

r (   1)
Eigenvalues of P are related to eigenvalues of C by
n 
2   nr
2  nr
The eigenvalues of C are
 nh 

 2 
 n  - 4 sin 2 
n  1, 2, 3, ....
The eigenvalues of P are therefore
 nh 
1 - 2 r sin 2 

2 

n 
 nh 
1  2 r sin 2 

 2 
n  1, 2, 3, ....
The eigenvectors of P and C are both
 sin(n h) 
sin(2n h) 

vn  


...


 sin(N h) 
By expanding

2  nh  
1 - 2 r sin  2  



n

h


2
1  2 r sin  2  


i
It can be shown that this leads to proper exponential decay of the solution.
Problem Sheet for PY 3CO2 Part I Partial Differential Equations
1. (F8.3) Solve
BC
u t  u xx - u
u(0, t)  0
0t
IC
u(1, t)  0
u(x,0)  sin( x)
0  x 1
PDE
0  x  1, 0  t  
directly by separation of variables, without making any preliminary transformation of
variables. Does your solution agree with the solution you would obtain if the transformation
u(x, t)  e -t w(x, t)
were made in advance?
2. Show that the second order linear, wave equation in polar coordinates is
1
1
u tt  c 2 (u rr  u r  2 u )
r
r
c is the wave velocity. Assume a solution of the form u(r,  , t)  R(r) ( )T(t) and show that
this leads to a solution in which R(r) satisfies
r 2 R' ' (r)  r R' (r)  (r 2 2 - n 2 )R(r)  0
Bessels’ Equation
and  and T are given by
( )  A sin(n  )  Bcos (n )
T(t)  C sin( ct)  D cos (ct)
 2 and +n2 are constants introduced in separating variables.
3. The finite difference approximation to u xx to order h2 contains function values at x-h, x
and x+h. By including additional function values at x-2h and x+2h, obtain the finite
difference approximations to u x and u xx which are correct to order h4.
4. Find finite difference equations equivalent to the second order linear, wave equation .
5. Perform a Fourier stability analysis for the diffusion equation using the implicit finite
difference method and show that the point of instability is given by the condition
 2 r (1 - 2 ) 
1
2
Hence explain why a larger time step can be used with the Crank-Nicholson method with  =
½ c.f. the explicit marching method.
PDE
u t   2 u xx
2 2
solution u(x, t)  e-  t eix
-  2 is a constant introduced in separation of variables.
6. Derive the conservation of mass equation for the problem of waves of height, h(x,t),
moving in a narrow, flat channel
h
h
u
u
h
0
t
x
x
by writing the density of the fluid as  (x, z, t)    (h(x, t) - z) . x and z are horizontal and
vertical coordinates and u(x,t) is the water velocity parallel to the x coordinate. The
derivation is carried out by substituting the specified form for the density into the continuity

 .j(x, t)  0 , and using the following properties of the step function
equation,
t
 (h(x, t) - z)  1 x  0
 (h(x, t) - z)  0 x  0
d
  (x)
dx
7. Complete the steps in the derivation of the conservation of momentum equation in section
1.3 (Conservation of Momentum) omitted in the lecture handout. The rate of change of
momentum equation is
x (t)
x (t)
2
.
.
d 2

h(x,
t)
u(x,
t)
dx

(h(x, t) u(x, t) ) dx  x 2 (t) h(x 2 , t) u(x 2 , t) - x 1 (t)h(x 1 , t) u(x 1 , t)


dt x (t)
x (t) t
1
1
.
x 1 (t)  u(x 1 , t)
u(x 1 , t)
 O(x) 2
x
h(x 1 , t)
h(x 2 , t)  h(x 1 , t)  (x 2 - x 1 )
 O(x) 2
x
The desired relation t o be proved is
.
x 2 (t)  u(x 2 , t)  u(x 1 , t)  (x 2 - x 1 )
x (t)
d 2
u 
 u
h(x, t) u(x, t) dx  h   u  x  O(x) 2

dt x (t)
x 
 t
1
8. Obtain the results
u xx  u  x2  2u  x  x  u  x2  u  xx  u xx
u xy  u  x  y  u  x  y   y x   u  x y  u  xy  u xy
By differentiating u x  u  x  u x wrt x and hence generate the transformation of the
second order pde in section 11 of the course.
Download