Trefftz Spectral Method for Elliptic Equations of

3 downloads 0 Views 202KB Size Report
M. ∑ n=1. Unψn(x). (7). So, from the point of view of the representation of solution, the ... Nc. ∑ i=1. [l (u(xi|q1,...,qK)) − g(xi)]. 2}. (11). Here Nc > K collocation points xi are ... In the first publication it was called the Method of Equivalent Charges and ...... 0.60. 6.7 · 10-1. 5.5 · 10-1. 4.6 · 10-1. 5.6 · 10-3. 6.6 · 10-9. 0.65. 4.0 · 10-1.
Tre¤tz Spectral Method for Elliptic Equations of General Type. Sergiy Reutskiy Magnetohydrodynamics Laboratory, P.O. Box 136, Moskovski av., 199, 310037, Kharkov, Ukraine. e–mail: reutskiy@skynet:kharkov:com

Brunello Tirozzi Physics Department, University of Rome "La Sapienza", P.le A. Moro 2, 00185 Rome, Italy. e-mail: tirozzi@krishna:phys:uniroma1:it; tirozzi@mat:uniroma1:it

Abstract A new numerical method for 2D linear elliptic partial di¤erential equations in an arbitrary geometry is presented. It belongs to Tre¤tz methods. The special feature of the method presented is that the trial functions, which are used to approximate a solution satisfy the PDE only approximately. This reductions of the requirement to the trial functions extends the …eld of application of the method. The method is tested on several one–and two–dinensional problems. the responsible author

List of Tables 1

The C

expansions procedure. The maximal absolute error ea in approxima-

tion of the functions a(x); b(x); c(x) x 2 [0:3; 0:7]. . . . . . . . . . . . . . . . . 2

e j ) in the form of expansion shaped source function I(x

The normalized (1)

over 'n (x). The source is centered at the point 3

= 0:5. . . . . . . . . . . . .

0:5)2 ).The number of harmonics

M = 20. The number of terms in approximation of a(x), b(x), c(x) N = 20.

.

26

The maximal absolute error ea and the mean square root error esr in problems 1–12.

5

25

The maximal absolute errors. The di¤erent parameters of the solving procedure. The exact solution uex (x) = exp( 100(x

4

24

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

The maximal absolute error ea and the mean square root error esr in the approxi2 2 2 mate solution of PDE: 2 @ u2 + @ u +3 @ u2 + @u +3 @u 5 u = f (x; y) with di¤er@x @x@y @y @x @y

ent boundary conditions. The exact solution: uex (x; y) = 1+x+y +xy +x2 +y 2 . The number of sources: K = 50. The number of collocation points: Nc = 100. 6

28

The maximal absolute error ea as a function of the parameter l. The number of harmonics: M = 20; the number of sources: K = 50; the number of collocation points: Nc = 100. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.

29

Introduction

The goal of the work is to describe a new numerical method for solving elliptic boundary value problems in irregular regions. The main consideration is carried out for a general two– dimensional partial di¤erential equation (PDE) of the type: L(u) =

2 X @ @xi i;j=1

ai;j (x)

@u @xj

+

2 X j=1

bi (x)

@u + c(x)u = f (x); x 2 @xi

R2 ;

(1)

where we denote (x1 ; x2 )

x

(x; y):

We assume that: 1) a1;2 (x) = a2;1 (x); 2) ai;j (x), bi (x), c(x) and f (x) are analytic functions on

; 3)

is a simply connected domain bounded by a simple closed curve @ ; 4) the

coe¢ cients ai;j (x; y) satisfy: 2 X

ai;j (x)

p

i j

i;j=1

for some p > 0 and any

2 X

2 i;

x2

i=1

(2)

1; 2.

The boundary condition is: l(u) = (x)u + (x) where

@ @n

@u = g(x); @n

x2@ ;

(3)

is the outward normal derivative and (x), (x), g(x) are prescribed functions of

position. The method presented falls into the group of embedding methods. The basic idea is to solve a given PDE in a simple cartesian domain

in which the complex domain

0

is embedded.

The initial PDE (1) is replaced by the following one: (0)

L (u) = f

(0)

(x) +

K X k=1

qk I(xj k ); x 2

0;

k

2

0n

(4)

:

Here L (0)

(0)

(0)

=

2 X @ @xi i;j=1

(0) ai;j (x)

@ @xj

+

2 X

(0)

bi (x)

j=1

ai;j , bi , c(0) , f (0) are some extensions of ai;j , bi , c, f from c(0) , f (0) are analytic functions de…ned on

0.

@ + c(0) (x); @xi

to

0.

(5) (0)

(0)

This means that ai;j , bi ,

They are approximations of the corresponding

coe¢ cients of the initial PDE in the sense of the C( )–norm: kukC = max fju(x)jg

(6)

To obtain these extensions we use the technique of the so-called C

expansions developed

by Smelov [11]. In brief it is described in the next section ( see [10] for more details). Note that all the terms on the right hand side of (4), as well as a solution, are supposed to be analytic functions on

0.

To approximate them we write them in the form of truncated series

using an orthogonal complete system in L2 ( 0,

0)

of smooth global functions

n (x)

de…ned on

for example: u(x) =

M X

Un

(7)

n (x):

n=1

So, from the point of view of the representation of solution, the method presented belongs to the group of spectral methods. The additional term on the right hand side of (4) contains the -shaped source functions I(xj ) which essentially di¤er from zero only inside some neighbourhood of the source point . The general method of constructing such functions in the form of expansion over a broad class of complete orthogonal systems in L2 (

0)

is described in [10]. Some examples of such functions

are presented in Section 2. The coe¢ cients qk are the free parameters of the algorithm. They should be determined from the boundary conditions (3). As it follows from (4) an approximate solution can be written in the form of a linear combination: u (xjq1 ; : : : ; qK ) = v(x) +

K X

qk

(8)

k (x)

k=1

where v(x) is the particular integral and the trial functions L(0) (

k)

= I(xj k ); x 2

k (x)

satisfy the equation: (9)

0

or L( if it is regarded on

.

k)

= L

L(0) (

k)

def

+ I(xj k ) = (x);

x2

(10)

Note that if L(0) approximates L well and the source point

k

is removed from

, then

k kC is a small value. We get the parameters qk as a solution of the minimization problem: min qk

(N c X i=1

g(xi )]2

[l (u (xi jq1 ; : : : ; qK ))

)

(11)

:

Here Nc > K collocation points xi are distributed uniformly on the boundary @ . It follows from (8)–(11) that the method presented can also be regarded as some generalization of Tre¤tz methods [2], [13]–[15]. Recall that the main idea of Tre¤tz–type methods consists of looking for an approximate solution of the boundary value problem L(u) = f (x);

x2

(12)

l(u) = g(x);

x2@

(13)

in the form of a linear combination: u (x) = v(x) +

K X

qk

(14)

k (x):

k=1

Here the trial functions

k (x)

satisfy exactly the homogeneous PDE L(

k)

= 0 but do not

necessary satisfy the boundary condition (13). This condition is used to determine the unknowns qk . Comparing (8)–(11) and (12)–(14) we can conclude that the method presented follows the scheme of Tre¤tz methods. However, it uses the trial functions

k (x)

which satisfy the initial

PDE only approximately. It becomes a Tre¤tz method when (x) = 0, i.e. when L(0)

L and

I(xj k ) = 0 for x 2 . Just this reduction of the requirement to the trial functions extends a …eld of application of the method described because such trial functions can be found for a broad class of di¤erential operators (e.g. see [10]).

First, this method was suggested for studying magnetohydrodynamic ‡ows in a complex geometry [9]. In the …rst publication it was called the Method of Equivalent Charges and QTSM (Quasi Tre¤tz Spectral Method) in the next ones. QTSM has been used successfully for the solution of certain elliptic boundary value problems [5], initial value problems [6], problems with moving boundaries [7] and the Stokes problem [8]. A brief outline of the given paper is as follows. In Section 2 the C

expansions and the

source functions are described. The main algorithm and numerical results are considered in Section 3. Important particular cases when the basic algorithm can be simpli…ed considerably are discussed brie‡y in Section 4. A conclusion is given in Section 5.

2.

C-expansions and –shaped functions.

The …rst step in applying the method is to extend the coef…cients ai;j (x), bi (x), c(x) and the right hand side f (x) from

to

0.

We use a C

expansions procedure developed by Smelov

In one–dimensional case according to the C

expansions algorithm eigenfunctions 'n (x)

[11] to get these extensions.

of a Sturm

Liouville problem 8 > > < d (p(x)d ') x

> > :

1 '(A)

+

r(x)'; x 2 [A; B]

q(x)' =

x

1 dx '(A)

= 0;

2 '(B)

+

2 dx '(B)

(15) =0

de…ned in an interval [A; B] are used to approximate a smooth enough function f (x) de…ned in a smaller interval [ ; ]

[A; B].

It assumes a representation of the approximated functions in the form similar to Fourier series: f (x) =

1 X n=1

Fn 'n (x):

(16)

The coe¢ cients Fn are obtained as a solution of the minimization problem 1 X

min f (x) Fn

2

(17)

Fn 'n (x)

n=1

[ ; ]

because the functions 'n (x) are nonorthogonal on [ ; ]. Here k: : : k[

; ]

denotes some norm

de…ned on [ ; ]. As it was demonstrated in [11] and [10] a smooth enough function f (x), together with its derivatives de…ned on [ ; ], can be well approximated by the …nite sums f (x) ' f~(x j F1 ; : : : FN ) = using the algorithm of C

N X

Fn 'n (x)

(18)

n=1

expansions with a small number of terms.

In practical calculations to get Fn we write the collocation conditions f~(xi j F1 ; : : : FN ) =

N X

Fn 'n (xi ) = f (xi )

(19)

n=1

at the collocation points xi ; i = 1; : : : ; N1 > N which are distributed uniformly inside [ ; ]. As a result we get an overdetermined linear system

^ = f; A ^ = ('1 (x1 ) : : : 'N (x1 ) : : : : : : : : : '1 (xN1 ) : : : 'N (xN1 ); F = (F1 : : : FN ; f = (f (x1 ) : : : f (xN1 )(20) AF which is solved in the least squares sense: F:

^ min kAF

f k:

(21)

Here kzk denotes the euclidean norm of z. In this work we use the following two systems of orthogonal functions: (2) '(1) n (x) = sin(n x); and 'n (x) = cos((n

which are solutions of the Sturm (1)

(1)

(2)

1) x); n = 1; : : : ; +1

(22)

Liouville problems (15) with the boundary conditions (2)

'n (0) = 'n (1) = 0 and dx 'n (0) = dx 'n (1) = 0 correspondently.

As an example of such technique we present the results of applying of the C

expansions

procedure to the three functions a(x) = 1 + x2 ; b(x) = sin2 (x); c(x) = ex

(23)

de…ned on [ ; ] = [0:3; 0:7]. To estimate the accuracy we use the maximal absolute error de…ned as: ea = max

j=1;:::;N2

f (xj )

f~(xj j F1 ; : : : FN ) :

(24)

Here xj ; j = 1; : : : ; N2 are the checking points distributed uniformly inside [ ; ]. For this we decompose [ ; ] into N2 subintervals and place xj in the middle of each. In all the computations presented in Tables 1 we take N1 = 100 collocation points in (19) and N2 = 1000 checking points in the calculation of ea . It should be underlined that the C

expansions procedure provide such a high precision

inside the smaller interval [ ; ] only. For example, all the C

expansions which use sin(n x)

as a basis system become equal to zero at the endpoints of the interval [0; 1] independently of functions approximated. The same algorithm can also be applied in the two-dimensional case. For a more detailed information and numerical examples see [10]. Now let us consider –shaped source functions on the right hand side of (4). A general procedure of constructing such functions in the form of truncated series over a broad class of eigenfunctions is described in [10]. In particular, it is shown there that: If f'n (x);

ng

is a solution of a Sturm

Liouville problem (15) then a –shaped source

function can be represented in the form:

I(x j ) =

0( ) +

M X sin (n; M ) (n; M ) n=1

l n(

)'n (x);

(25)

where

n(

) = r( )'n ( )=gn ; gn =

ZB

r(x)'2n (x)dx;

A

p

(n; M ) =

n

n (M + 1)

;

= lim

n!1

p

n =n

:

When there is no zero eigenvalue then the …rst term in (25) is absent. It is shown in [10] that (25) can be regarded as a result of applying of the Riemann (R; l)–method of summation to the divergent series ( see [1]). (x

)=

1 X

n(

(26)

)'n (x):

n=0

(1)

In this paper we use the only othogonal system 'n (x) = sin(n x) to get source functions. In this particular case (25) passes on to Lanczos –factors method: I(x j ) =

M X

(27)

cn ( ) sin nx;

n=1

where 1 cn ( ) = rn (l; M ) sin n 2

(28)

and rn (l; M ) = ( where

n (M )

l n (M ))

;

n (M )

= sin

n (M + 1)

n ; (M + 1)

(29)

are Lanczos sigma–factors ( see [4]).

In Table 2 the normalized value ^ j ) = I(x j ) I(x I( j ) is presented for di¤erent parameters M and l. The source point I(x j ) really has a –shaped form.

(30) = 0. One can see that

With the help of (27), two–dimensional source function in (4) can be written as a product: I(x; y j ; ) = I(x j )I(y j ) =

M X

(31)

cnm ( ; ) sin(n x) sin(m y);

n;m=1

(32)

cnm ( ; ) = cn ( )cm ( ): A general method of constructing such source functions is presented in [10].

3.

Main algorithm

The material of this section is divided into two parts. In the …rst subsection we consider the case when the algorithm is applied to one–dimensional equations. The two–dimensional elliptic PDE (1) is treated in subsection 3.2.

3.1

One–dimensional problems

It is reasonable, for the sake of simplicity, to consider …rst the following two–point value problem: d2 u(x) du(x) a(x) + b(x) + c(x)u(x) = f (x); 0 < 2 dx dx

< 1;

(33)

6= 0 ; i = 1; 2:

(34)