13.07.2015 Views

Mathematical Methods for Physics and Engineering - Matematica.NET

Mathematical Methods for Physics and Engineering - Matematica.NET

Mathematical Methods for Physics and Engineering - Matematica.NET

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

27.8 PARTIAL DIFFERENTIAL EQUATIONSthan an interval divided into equal steps by the points at which solutions to theequations are to be found, a mesh of points in two or more dimensions has to beset up <strong>and</strong> all the variables given an increased number of subscripts.Considerations of the stability, accuracy <strong>and</strong> feasibility of particular calculationalschemes are the same as <strong>for</strong> the one-dimensional case in principle, but inpractice are too complicated to be discussed here.Rather than note generalities that we are unable to pursue in any quantitativeway, we will conclude this chapter by indicating in outline how two familiarpartial differential equations of physical science can be set up <strong>for</strong> numericalsolution. The first of these is Laplace’s equation in two dimensions,∂ 2 φ∂x 2 + ∂2 φ=0, (27.86)∂y2 the value of φ being given on the perimeter of a closed domain.A grid with spacings ∆x <strong>and</strong> ∆y in the two directions is first chosen, so that,<strong>for</strong> example, x i st<strong>and</strong>s <strong>for</strong> the point x 0 + i∆x <strong>and</strong> φ i,j <strong>for</strong> the value φ(x i ,y j ). Next,using a second central difference <strong>for</strong>mula, (27.86) is turned intoφ i+1,j − 2φ i,j + φ i−1,j(∆x) 2 + φ i,j+1 − 2φ i,j + φ i,j−1(∆y) 2 =0,(27.87)<strong>for</strong> i =0, 1,...,N <strong>and</strong> j =0, 1,...,M.If(∆x) 2 = λ(∆y) 2 then this becomes therecurrence relationshipφ i+1,j + φ i−1,j + λ(φ i,j+1 + φ i,j−1 )=2(1+λ)φ i,j . (27.88)The boundary conditions in their simplest <strong>for</strong>m (i.e. <strong>for</strong> a rectangular domain)mean thatφ 0,j , φ N,j , φ i,0 , φ i,M (27.89)have predetermined values. Non-rectangular boundaries can be accommodated,either by more complex boundary-value prescriptions or by using non-Cartesiancoordinates.To find a set of values satisfying (27.88), an initial guess of a complete set ofvalues <strong>for</strong> the φ i,j is made, subject to the requirement that the quantities listedin (27.89) have the given fixed values; those values that are not on the boundaryare then adjusted iteratively in order to try to bring about condition (27.88)everywhere. Clearly one scheme is to set λ = 1 <strong>and</strong> recalculate each φ i,j as themean of the four current values at neighbouring grid-points, using (27.88) directly,<strong>and</strong> then to iterate this recalculation until no value of φ changes significantlyafter a complete cycle through all values of i <strong>and</strong> j. This procedure is the simplestof such ‘relaxation’ methods; <strong>for</strong> a slightly more sophisticated scheme see exercise27.26 at the end of this chapter. The reader is referred to specialist books <strong>for</strong>fuller accounts of how this approach can be made faster <strong>and</strong> more accurate.1031

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!