36
Partial Differential Equations 3066 (15 Lectures) 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

Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

Partial Differential Equations 3066 (15 Lectures)

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’sPoisson and Laplace EquationsSolution by Integral TransformPoisson Equation in 1-D

4 Finite Difference Method for Differential Operators Liebmann’s Method Applied to Poisson’s Equation

5 Parabolic PDE’sComputer Modelling of Fluids

Advection and DiffusionContinuity EquationDiffusion EquationSchrödinger Equation as a Diffusion Equation

6 Method of Separation of VariablesSolving Inhomogeneous PDE’s by Eigenfunction Expansion

7 Hyperbolic PDE’s1-D Wave Equation

8 Finite Difference Methods for parabolic and Hyperbolic PDE’sExplicit MethodImplicit 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’sFourier Stability MethodMatrix Stability Method

Page 2: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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 computersR.H. Landau and M.J. Paez, Wiley (1997) 530.07 N7

Page 3: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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

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, 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

Page 4: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

Scale Factors

Distance moved when a coordinate changes by an infinitesimal amount.

hi are the scale factors

Cartesian Vector Operators

General Curvilinear Coordinates

Vector Operators in General Curvilinear Coordinates

Page 5: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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

The notation 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.

Note that, even though we neglect terms of in the expansion, since we divide through by h to obtain the derivative expression the approximation is correct to 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

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

. Note the difference in scaling of errors for the central difference approximation when compared with the forward and backward difference approximations.

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

Page 6: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

add these expansions to obtain

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

The vector notation for this expansion is

Returning to the long-hand notation, the expansion of u(x,y) in the x direction is

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

Page 7: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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

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’.

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

.

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.

Page 8: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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.

Page 9: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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.

Discretise according to . 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

Approximation to PDE

Equating the two numerical approximations we obtain the following PDE approximation

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.

Page 10: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

Rearrange so that all terms with timestep i+1 appear on the left hand side

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

Given the BC chosen in this problem, u21 = u26 = 0 and so the equations reduce to

These equations can be solved rapidly and effectively using the LU decomposition method.

Page 11: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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

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

Page 12: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

The instantaneous momentum of the slice is

x2(t) – x1(t) = x

In differentiating this integral with respect to time we must use Leibniz’ rule as the limits of integration depend on the differentiation variable. Thus

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

The difference in pressure force across a slice, of width x, by Taylor series expansion is

The rate of change of momentum of the slice is

The net force on the slice in the positive x direction is

Page 13: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

Equating these two and dividing by common factors yields

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

where 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

<< h and is small. It can also be shown that the terms may be

neglected under these conditions. Then the mass and momentum conservation equations can be approximated by

Differentiation of the first equation wrt x and the second wrt t allows the equations to be combined to give

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.

Page 14: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

A central finite difference scheme yields

Solving for the updates to h and u we obtain

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

Solving for the updates to h and u we obtain

Page 15: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

Solitary Waves and the Korteweg deVries equation

The following extract from John Scott Russell’s ‘Report on waves’ is available athttp://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 (1808-1882) 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

Page 16: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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

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

Travelling wave solutions have the form

c is the wave velocity

Substituting for u in the KdV equation we obtain

Integrate twice wrt

A and B are constants of integration. In order to have a localised traveling wave packet, we impose boundary conditions: all tend to zero as || goes to infinity. One way of ensuring these conditions is to have A = B = 0. Solutions also exist at zeros of the polynomial in f. The solution with A = B = 0 obeys

Real solutions exist when 2f + c > 0. Rearrange to

Page 17: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

Make the substitution of variable

last term is a constant of integration

Hence one solution to KdV equation is

xo is the peak position at t = 0.

Korteweg and deVries’ solution to the water solitary wave equation

Korteweg and deVries showed that

U(,t) is the wave function, is a coordinate chosen to move with the wave

, g is the acceleration due to gravity, h is the mean water depth. Using

the change of variables U(,t) = u(X,t), , this equation can be transformed into

the conventional KdV equation

In the moving frame, , ut is zero and so

Integrate this equation twice wrt to obtain

By substitution it is possible to verify that

Page 18: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

provided and

The wave speed is

Also

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 , 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 sech-squared 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.

Page 19: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

Two solitons colliding

Initial sin(kx) condition evolves into a soliton train after some time

http://www.usf.uni-osnabrueck.de/~kbrauer/solitons/soli1.htmlhttp://www.math.h.kyoto-u.ac.jp/~takasaki/soliton-lab/gallery/solitons/index-e.html

Page 20: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

11 Classification of PDE’s

The general form for a second order pde is

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

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 dux = u x + u x

uxx = (u x + u x)x

By generating these derivatives and replacing them in the original equation we obtain

with coefficients given by

Suppose we choose the transformation such that vanishes:

This is equivalent to the quadratic equation with solution

. Note that there are two roots when B2 ≠ 4AC and one when B2 =

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 is equivalent to that for and so the two characteristic coordinates are obtained using the two choices of

sign in the solution to the quadratic equation for .

Along a characteristic coordinate line (i.e. = constant or = constant) d = 0 or d = 0.

Page 21: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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

and d = 0 implies x dx + y dy = 0 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

Hence the pde in characteristic coordinates is:

Page 22: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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

The analytic solution is

The explicit finite difference equation is

Substitute the analytic solution to obtain

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

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.

Since is the relative amount by which the analytic solution decays in a single time

step and this is approximated by , the solution can oscillate and increase

exponentially rather than decaying. This will be the case when

Page 23: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

is not satisfied. This condition is equivalent to the Fourier Stability Criterion

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 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

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)

Multiply by –2/r and rearrange to

Adopt BC such that ui,j = 0 when j = 1 or j = n. The finite difference equation above may then be represented as

A = C – 2/r I

B = - C –2/r I I is the 4x4 unit matrix

Page 24: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

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.

is the nth eigenvalue of P and 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

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.

Hence becomes

Eigenvalues of P are related to eigenvalues of C by

Page 25: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

The eigenvalues of C are

The eigenvalues of P are therefore

The eigenvectors of P and C are both

By expanding

It can be shown that this leads to proper exponential decay of the solution.

Page 26: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

Problem Sheet for JS 3066 Partial Differential Equations

1. (F8.3) Solve

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

were made in advance?

2. Show that the second order linear, wave equation in polar coordinates is

c is the wave velocity. Assume a solution of the form and show that this leads to a solution in which R(r) satisfies

Bessels’ Equation

and and T are given by

and +n2 are constants introduced in separating variables.

3. The finite difference approximation to 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 and 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

Hence explain why a larger time step can be used with the Crank-Nicholson method with = ½ c.f. the explicit marching method.

is a constant introduced in separation of variables.

Page 27: Syllabus for 3066 and 4066 - Trinity College Dublin€¦ · Web viewSolving Inhomogeneous PDE’s by Eigenfunction Expansion 7 Hyperbolic PDE’s 1-D Wave Equation 8 Finite Difference

6. Derive the conservation of mass equation for the problem of waves of height, h(x,t), moving in a narrow, flat channel

by writing the density of the fluid as . 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

equation, , and using the following properties of the step function

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

8. Obtain the results

By differentiating wrt x and hence generate the transformation of the second order pde in section 11 of the course.