Difference schemes for Poisson's equation in polar, cylindrical and spherical coordinate systems

Difference schemes for Poisson's equation in polar, cylindrical and spherical coordinate systems

DIFFERENCE SCHEMES FOR POISSON’S EQUATION IN POLAR, CYLINDRICAL AND SPHERICAL COORDINATE SYSTEMS* 1.V. FRYAZINOV Moscow (Receiued 9 March 1971) SCH...

602KB Sizes 1 Downloads 58 Views

DIFFERENCE SCHEMES FOR POISSON’S EQUATION IN POLAR, CYLINDRICAL AND SPHERICAL

COORDINATE SYSTEMS* 1.V. FRYAZINOV Moscow (Receiued

9 March 1971)

SCHEMES of the second order of accuracy for Poisson’s equation in polar, cylin-

drical and spherical coordinate systems are constructed. Schemes for an equation with variable coefficients are also considered. Schemes for the solution of the axially symmetric D&hlet Laplace

problem for

and Poisson equations have been studied previously in a number of

papers, a list of which can be found in 111. Schemes for the exterior Dirichlet

problem for Laplace’s equation on a polar net were constructed in [21. Schemes for the solution of the fist and third boundaryvalue problem in a circle, cylinder and sphere on the corresponding nets are constructed below. 1. Formulation of the problem 1. Schemes in polar and cylindrical coordinates systems. Let fl be a circle of radius R, r its boundary, G = 62lJ I?.

We will seek

a solution continuous in 5 of the problem Lu = -f(r,

cp),

0 < cp& 2n;

O
(1.1) ~(4 VP)= vW,

0 G cp< 2%

where LU =L,u+Lpu,

L.u=++

(rz),

Ld.a=-$$-,

f, v are specified functions. We assume that there exists a unique solution of

fZh.

uychisl.

Mat. mat.

Fiz.,11, 5. 1219-1228, 1971.

153

154

I. V. Fryazinov

problem (Ll),

possessing

continuous fourth derivatives with respect to the corres-

ponding Cartesian variables (x, and x,1 in the closed region.

Similar assumptions

will be made about the solutions of all the problems considered below.

We introduce the nets wr and w9 with the steps hr and hqrespectively: tfr=

(n+O.S)h,,

{r,=

n=0,1,...,N,h,=R/(N+0.5)},

aq= {cpnx = m~,m=0,1,...,M,h,=2n/~}. We introduce in fi the net

a =3,

x

co,== ouy,

where we denote by o and y the sets of nodes x = x,,, ,,, =

(r,, cp,) of the We will denote the net function at the

net w, belonging to !J and I’, respectively.

In what follows one or both the node z=G,,,,, by y=y,,,=y(r,,cpA. subscripts n and nawill be omitted. Everywhere below we will assume that

and also 3% -i = y, M--i,

Yn, M+l = Yn, i.

We introduce the difference relations (1.2)

Yr, n =

(Y,+* -

%?) / hT,

(1.3)

YV,~= bm+i--urn) I&,

!/Y$n =

(I/, -

y,-.J

/h,,

s:rn= (ym-ym-i)/h..

Put

r, = Fo =

7,-y* = r_$ =

0.5(r,

+ r,_,),

n=

1,2 )...).

‘v,

0.

With the differential operators Lr, Lq we associate

the difference operators

iiF and A,: +(eQ,, (L4)

(&Y>Tl = !

We associate (1.5)

n’

AY

$

0 f

(G;

27

n#O, 72= 0;

A&+_.

PIP

with the original problem (1.1) the difference problem =

-f,

XE w;

Y =

v,

x E

y.

Here A = A, + Arp is the difference analog of the operator L = On the boundary r let the boundary condition of the third kind

L,+ Lq.

Difference

-

(1.6)

schemes

equation

155

al.4 dr

be specified,

a(,)~

-

+

(l.l),

0,

v(r) =

r =

R,

where a(,) = const > 0. (1.6) with accuracy UP to 0(hr2 -!- hz).

We approximate equation equation

for Poisson’s

Using

we have

We put (hi-y),

= & N’

(-

‘NY;, N - ‘++r) y,),

&y)N f,

(‘y),

=

&y),

+

&‘y),9

f’=

f++ I

T

= +

y&N;

5 E

0,

5 E

y.

In the case of the third boundary value problem we write the difference the form Ay =

(1.8)

-f’,

ZE

Q.

We consider the problem for Poisson’s (0< z < I) with the boundary l? ~,u+L,u+L,u

(1.9)

Here L,u= Pu/ iW, k = 0. 1, . . . ( K, h,=

=

scheme in

equation in the cylinder

-f(x),

z E

Q;

u =

v,

Q = Sz X

2 E

r.

3 = (r', cp, 2). We take the net ~3~= (ZR= kh,, l/K} andthenetG3=GT Xl0.X G~=oIJY,

o=anQ,y=anI'. We establish operator A :

a correspondence

between the operator Lz and the difference

z

Azy = We establish problem (1.10) Here =

(rn,

(yk+, -

a correspondence

Ay=-f,

n=A,+&+Az, zh) .

(pm,

2yk +

zEo;

YR--i) / kL

=

YG.

between problem (1.9) and the difference

y =

Y=Y

v,

5 E y.

n, m, k = y (% m. h) t

x

=

xn,

m.

h.

I. V. Fryazinov

156

On the lateral surface of the cylinder l’, (0 < z < I) let the boundary condition of the third kind (1.6) be specified. The corresponding difference scheme has the form

fly =

-f’,

x E 0 UyFL;

Here YR = G fl FR, t&Y)

0,

z =

Y = y,

2

1.

=

and f ’ for 2 E ‘YR are defined by formulas (1.7),

N

A = A, + n, + AZ. On the ends of the cylinder for z = 0, z = 1 let there also be specified the boundary conditions of the third kind -

-

a2 au --$-

where a{$

=

q!;h+

0,

Y(*) =

O(!;‘U + Y(z)

-

COnSta>

0,

=

u =

0,

2 =

0,

z = 1,

1, 2.

We introduce the notation @zY)?a. m,0 = ; KY),, &Y)

(Y;. 1 -

“z m, g = h, (% m. k =

z = 0;

d{@J

Y;, g -

Y;. I, k,

2 = 1;

o{;]YK)’

0

<

&I

<

1.

We determine the operators A,, A9 by formulas (1.4), (1.7).

f’ = f,

We put

I E 0;

r=f+$,

r =

Ocz-cl

R,

(rN=R);

r

r=r++

O
2=

0,

2 =

1;

z

r = r, = R,

We establish a correspondence

2=

0,

2=

1;

between the third boundary value problem

and the difference boundary value problem (1.11)

AY =

-P,

XE

Q.

In considering the schemes of solution of the second boundary value problem it

Difference

schemes

for Poisson’s

equation

157

is necessary to add to the right sides of the equations corrections ensuring the solvability of the problems, as in [31. 2. Schemes in the spherical coordinate system. In the sphere of radius R with boundary I’ we consider the problem (1.12)

Lu = L,u + L,u + L,u = -f(x), u = 4%

e),

z =

(I”,cp,61 E a,

~=uvP,Q)Er,

where lPl&

1 fsin’07+

As before we define the net oq and the nets &jT,~6, of,

“g =(& (1.13)

cij,=

= (i+O.qke,

{r,=(n$-l)h,,

i=o,

1, 2,-..,

n=0,1,2,...,N,

putting I,

ktl = %V+

Jb=w(N+w

a=G3s,Xo,Xoe=~Uy, wherew=@fl&

Y=@

f!r-

We introduce the notation F*= 0,

F, = 1-’(rJ?%-i))

8, = 0,

B,+*= =,

n = 1,2,.

. . , N,

(1.14) i=

1,2,..

Bj = 9j-n = 0.5 (0, + Oi-l) 3

.,I,

and also put (1.15)

I/i, i = ($/i- y&-i)fa8,

We approximatethe operators L, A%,LO by the following difference operators (see [41)n#O, (1.17)

WrYIn=

LY== n=

0;

NV

158

1. I

(1.18)

(h@Y)i=

V. Fryazinov

1 sinC),yB 1, P sin Behe

(&

i = 0, O
CSingYij),, p 1

-

i = I.

sinBly5 r,

r2 sin Orhe

,

We establish a correspondence between the original problem (1.12) and the difference problem, putting A = A, -I- II, -I- Ae : (1.19)

ny=-f(s),

XEO,

y=

Y(Z),

z=y.

Let a boundary condition of the third kind (1.6) be specified on r. the expression (&Y) N at the nodes x E y. We put (&Y)N = +

N

r

(-

iN2YF

N

-

We redefine

'N2Q)YJ'

We define the expressions A+y and Aey for x E y, as before, by formulas (1.18), (1.19). We denote by f’ the function f’=

f,

XE

0,

f&f+?,

x E y. r

With the third boundary value problem we associate (1.20)

RY =

the difference problem

XEcSj.

-f’

3. Schemes for equations with variable coefficients. The schemes for the first and third boundary value problems for the equation with variable coefficients k and q will be written in div(k grad U) - qn = -f the form iry-qy

=

-f,

Y =

xf=ffJ,

y,

xE

Y,

or (in the case of the third boundary value problem) in the form RY -

qy =

-f’,

i.r E

a.

Here the operator i corresponds to the operator A considered above, and the expression x y is obtained from A y by the replacement of y;, ,,, y,-, ,,,, Y,-3it where an , am etc., is the differY;, k by a&, n, amY;, m, aiYz, iy ah&, h,

Difference

ence analog

where

of the thermal

grn = 6.5 (9,

In addition was replaced

for Poisson’s

conductivity

coefficient

+ CPM),

zk

=

2sin (he /2) 2sin h,,.

by ft,’ =

k, q, f have discontinuities their difference

with the recommendations

1.

The approximation

error.

above.

h,’ =

(1.18) the step h, of the steps

accuracy.

(and smooth)

Apparently,

only with the method of on the surfaces

(lines)

a, d, 4 must be chosen

analogs

in

of [41.

accuracy

of the schemes

by

with variable

with second-order

proof. If the coefficients r = const, z = const,

The accuracy

were replaced

to prove convergence

h,',la,', A,' is connected

The

are defined

and in (1.16),

of the steps

2.

For example,

It was only with this choice

h:, h,‘, ft,’ coefficients in the net norm of W,‘(o)

accordance

k.

h9 and h,

respectively,

that it was possible

this choice

159

equation

(zk + zk--1)) i;,, 6i

0.5

in (1.3), (1.15) the steps

(h, / 2)) he’ =

2sin

schemes

of the schemes

Some properties

considered

above

of the difference is defined

operators.

by the value

of the

difference z=y--, where u is the solution difference boundary

problem. value

of the original

problem,

We will study the accuracy

problems.

Substituting

and y that of the corresponding of the schemes for the first in the difference equations,

u = z + u

we have for the error z

(2.1) where

AZ=--$, II, =

Au +

or x = (r, 4, 8).

2 =

5 EO,

f

0,

II: E y,

error, x = (r, 4). or x = (r, $, z)

is the approximation

We will study the error of approximation

We first consider

the approximation

of the operator

formula for asufficiently smooth function spherical cases, we have

n,u =

L,uj-

0

hr2

of the function L,.

u in the polar,

Using

I/J.

Taylor’s

cylindrical

and

( ) -

r

.

If the function u = u(r, 4, 8) possesses sphere 5, we can write

six continuous

derivatives

in the

1. V. Fryazinov

160

(2.2)

5 E 0.

A.u=Lru+~Lr2u+0(~).

In the spherical case it is easy to verify that

and consequently,

770= 0,

v = ry,

Ary = +,,

(2.3)

in the case of the first boundary value problem the eigenvalues

of the operator Ar are identical with the eigenvalues of the operator A:

Au =

Equation (2.3) is the analog of the corresponding relation for the differen-

%* tial operator.

In the cylindrical (polar) case the operator Ar could be introduced somewhat differently:

where r”, = (F,,+g-,,+s -

i;,= (

+ln-11 r

r,-,

,...,

N--l.

n=l,2

--i

n #O;

?,,rn-y2)l 2h,, 1

,

F. = (hra)/2h,,

= 0.5 (r, + m--J,

r,-s

Here the approximation (2.2) is also valid for problems in a coaxial cylinder andring(for

r < R

O(&<

1. Combining (2.4), (1.171, (1.4), we write

the expression Ary in the form

(kY)n = (R,y)o =

d-l (_-”

nt,rRt~2-

C( I8

F,”

‘2

mar,_

)

_* ( rn+i

Yn+i

Yn

h,

Yn

-

Fn”

-

Yn-i

h,

,

y’; y” ) , r

where s = 1 corresponds to the polar case,

s = 2 to the spherical case (s = 0 is

the plane case). Using Taylor’s formula, in the case of polar and cylindrical coordinate systems we have A& = L,u + 0 ( h2Jr),

)

A,u = L,u + O(h,Z).

Difference

schemes

for Poisson’s

161

equation

In the spherical case A,u =

l&u + 0 (hk/r

sin 0))

A,u. = Lou + 0(he2/r sin 0). It follows from this that the approximation errors of equations (l.l),

(1.91,

(1.12) axe the quantities

respectively,

and may be majorized by the functions

&,

a =I,

2, 3:

(a) in the polar coordinate system

llhll” = hr2 + h,2;

(2.5) (b) in the cylindrical

coordinate system

(2.6) (c)

llhl12 = h,’ + h,2 + hz’;

in spherical coordinates

llhl12= h,’ + h,” + he’.

(2.7)

Here and helow we denote by the one letter M all the constants independent of the steps of the net, without indicating their structures. 2. Accuracy of the difference schemes. Ry = (2.8)

-f

(1.51, (l.lO), A(c)y(s)=

Each of the difference equations

(1.19) considered above, can be written in the form [41 z E 0,

CBW)Y(5)+f(z), 1E ZP,

y(x) where m(z) 5: B(z)

=

=v,

z=y,

is the set of nodes of the pattern LIZ(z) , ILl(s) \s.

not containing

It is then the case that D (z) = A (5) -

2 B (2, r;) 29, EEZ W

and with these conditions the comparison theorem is valid.

Let y he the solu-

A(x)>%

B (z, E) > 9,

tion of equation (2.8) with right side Fand boundary condition 7 = y. If we have ly(s) I
162

I. V. Fryazinov

f E 0.

The estimate Il!/ll”, c <

is satisfied,

IIYIIV.-2,

where

IIYII~,~= maxI&) xc3 Using

the maximum principle

of convergence

and the comparison

of the schemes

From the comparison satisfies

IIYII~,~= maxI +) x63

I7

(1.5), (l.lO),

theorem,

theorem

we estimate

the rate

(1.19).

the error z, the solution

of problem

El),

the estimate lz(+G%r).

(2.9)

Here > is the solution

(2.10)

of the problem

Ai=-*,

where the functions

z= 0, r E Y,

32~0, $ =

&, a =

1, 2, 3,

For problem (1.5) in the polar coordinate solution

I.

are defined

system

by formulas

(2.5M2.7).

Q = +I = Nllh!i2/r.

The

of problem (2.10) is given by the formula

i= Mjlhl12(R - r) (z, like &,, is independent we have the following

We represent (2.12)

From this and from (2.9)

of the scheme

(1.5)

in the form i = MllhllZ(R

the solution

-

r)+ u,

llf412= k2 + h,2+ hz2.

of problem (2.10) for F = I,&, independent system).

Au=O,

The function 5E0,

From the maximum principle

MlW(~

cp, A,5 = 0).

of the accuracy

II4l0, c< J4l~ll”.

(2.11)

coordinate

of the angle

estimate

u is the solution

of C$(in the cylindrical of the problem

u = --IMllhllZ(R - r), we obtain

u ,( 0.

II: E y.

Since z > 0, we have

- r). From (2.9) there follows the estimate

(2.11),

2 &

where the step

Difference

// h // is defined

by formula

In the sphere

schemes

equation

163

(2.12).

dl case

A,Z + AeZ = -$2 We construct

for Poisson’s

the majorant

= -Mllhl12/rsin6,

r=o,

xE@,

XEY.

function

w=M,(R-rsine)+iMz(R-rr),

(2.13)

where M, and M, are positive

constants.

It is easy to verify that

A,r = %,

(2.14)

where sin(hfJ2)

X=

It follows

sin h0

he/2

h,

1 < x < n2/4 12.



from (2.14) that w is the solution R,w + Aew =

-9,

of the problem w =

x E o,

MiR(i -sinEI),

XEY,

where

Putting

M, = Mllh!lz,

(2.15) we find that

$3 <

$

Mz =(x

(2.9) and the inequality

where

llhll” =

boundary (2.16)

value

Z<

bra -I- hq2-I- he”*

and in estimating

we succeed the accuracy

problems

1)Mllhl12,

and by the comparison

(2.15),

maximum principle,

-

Z<

W.

From (2.13),

w we arrive at the estimate (2.11), Using the comparison theorem and the

in constructing of the schemes

( otrj >

theorem

0, o(#‘) >

the majorant considered 6).

functions

2 and w

above for the third

The estimate

112IL, ; = my I 28(4 I G M IIh ll29 XEW

was obtained where !lhl12= llh112 = h,2 + k2 + hea.

hqzi- hr2,

or

llhl12= hw2+ h,.’ + hr2,

or

1. V. Fryazinov

164

Theorem The difference schemes (1.51, (1.81, (l.IO), (l.ll), (1.191, L20) for the solution of the first and third boundaryvalue problems for Poisson’s equation in polar, cylindrical and spherical coordinates converge with the second order of accuracy in the net normC. In the case of variable coefficients with the steps iz,‘, he’, ft,’ selected above (see section 1, paragraph3) the approximationerrors of the operators A, and Au have magnitudes 0 (lao”) and o(he’) respectively (and not 0(hV2/t) This enables the methodof power inequalior O(h.a/r sin e), O&‘/r sin 9)). ties to be applied and convergence in the net normof W*l(~) for W~‘~~~f of the schemes at the rate 0 (#hll”) to be established. For example, for the first boundaryvalue problem in a circle

where

The norms in W,’ are ~o~espondingly introduced in the remainingcases also. Note. We note that the introductionof the steps &‘, he’, Ae’ gives rise to the fact that the result of the calculation of the difference ratios of the functions sin cp,,cos rp, sin 0, cos 0 is the same as the corresponding differentiation. We put PO,Y), = e4n+l -2Y,

+ ym,)/&)2 sinf$Yp

&

Y)i =

1 9

m Y?* $ = (Yi - Yi-I)& . . i =O;

sin ii Bg) (sin %l/, Yp, i+l - sin %~ yZ, i), i = I. I - sin61-ll,~,, IT

Then (sin cp)& = (2.17)

= Y&,

AeD sin 6 -

-sin cp, Leo sine



O
(cos cp)& = --cos cp,

= -&-

-

2 sin 0,

he0 cos 6 = L@O cos 8 = -2 cos 8, and also x = 1 Here

(see (2.141, where A, must be replaced by (1 I r2)Aeo).

Difference

a

i Leo =

-_

sin6

a6

schemes

sine-.

for Poisson’s

equation

165

a ae

On the special net “, chosen in the spherical case (2.18)

h,r

=

L,r

--

Apr2 =

2 / r,

Lrr2 =

6.

In the cylindrical (polar) case (2.19)

A,r

=

L,r =

A,r2

I / r,

=

Obviously, the relations (2.17M2.19) schemes considered (a decrease

L,r2 =

4.

must lead to increased accuracy of the

in the constant in the estimates

(2.11),

(2.161

with the operators

Ae =

Ae”,

f

A,,

or

&=&ho.

In conclusion I thank A. A. Samarskii for discussing advice and supervision.

the results,

Translated

and for his J. Berry

by

REFERENCES 1.

DAVIDENKO,

D. F.

A method of constructing

difference

equations

for the solution

by the net method of the axisymmetric Dirichlet problem for Laplace and Poisson equations. In: Numerical Methods of Solving Problems of Mathematical Physics (Chislennye 2.

VOLKOV, Mat.

3.

E. A.

ANDREEV,

SAMARSKII, teorii

6, 3, 503611,

V. B. Zh.

zafach

matem. fiz),

18-54,

The network method for the external

mat. Fiz.,

problem, 4.

metody resheniya

A. A.

raznostnykh

Mat.

Lectures skhem),

Dirichlet

Moscow,

problem,

Zh.

1966. v$hisZ.

1966.

Uniform convergence

&hisZ.

“Nauka”,

of difference

mat. Fiz.,

on the Theory VTs.

Akad.

schemes

9, 2, 1285-1298, of Difference

for the Neumann

1969. Schemes

Nauk SSSR, Moscow,

(Lektsii 1969.

po