test problems for the 2d discrete laplace integral operators problems for...9 fortran codes for...

7
www.boundary-element-method.com Test problems for the 2D discrete Laplace Integral Operators In the development of an appropriate boundary element method 1 for the solution of Laplace’s Equation 2 the equation is first reformulated as an integral equation containing (the Laplace) integral operators 3 . The integral equation is then re-cast as a linear system of equations 4 by an integral equation method such as collocation. The integral operators thus replaced by a discrete analogue 5 , that is as a set of linear equations in which matrices are numerically determined.The vectors that repesent the boundary functions are determined either before or following the solution of the system. In this document, a set of test problems are developed for the module l2lc, which computes the discrete Laplace integral operators in 2D when the boundary is approximated by a set of straight line panels 6 and the boundary functions are approximated by a constant on each panel. The discrete forms of the Laplace integral operators 3 are defined as follows 5 : {} βˆ† () = ∫ (, ) βˆ† { } βˆ† () = ∫ (, ) βˆ† { } βˆ† (; )= ∫ (, ) βˆ† { } βˆ† (; )= ∫ (, ) βˆ† where (, ) = βˆ’ 1 2 ln in two dimensions In the latter two definitions above the derivative can be taken inside the integral: { } βˆ† (; )=∫ (, ) βˆ† and { } βˆ† (; )=∫ 2 (, ) βˆ† , 1 Boundary Element Method 2 Laplace’s Equation 3 The Laplace Integral Operators 4 Linear Systems of Equations 5 Discretization of the Laplace Integral Operators 6 Representation of a line by flat panels

Upload: others

Post on 31-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Test problems for the 2D discrete Laplace Integral Operators Problems for...9 Fortran codes for computing the discrete Helmholtz integral operators ... The discrete integral operators

www.boundary-element-method.com

Test problems for the 2D discrete Laplace Integral Operators

In the development of an appropriate boundary element method1 for the solution of Laplace’s Equation2 the equation is first reformulated as an integral equation containing (the Laplace) integral operators3. The integral equation is then re-cast as a linear system of equations4 by an integral equation method such as collocation. The integral operators thus replaced by a discrete analogue5, that is as a set of linear equations in which matrices are numerically determined.The vectors that repesent the boundary functions are determined either before or following the solution of the system. In this document, a set of test problems are developed for the module l2lc, which computes the discrete Laplace integral operators in 2D when the boundary is approximated by a set of straight line panels6 and the boundary functions are approximated by a constant on each panel.

The discrete forms of the Laplace integral operators3 are defined as follows5:

{𝐿𝑒}βˆ†π›€π‘—

(𝒑) = ∫ 𝐺(𝒑, 𝒒)π‘‘π‘†π‘žβˆ†π›€π‘—

{𝑀 𝑒}βˆ†π›€π‘—

(𝒑) = βˆ«πœ•πΊ(𝒑, 𝒒)

πœ•π‘›π‘ž π‘‘π‘†π‘ž

βˆ†π›€π‘—

{𝑀𝑑 𝑒}βˆ†π›€π‘—

(𝒑; 𝒗𝑝) =πœ•

πœ•π‘£π‘βˆ« 𝐺(𝒑, 𝒒)π‘‘π‘†π‘žβˆ†π›€π‘—

{𝑁 𝑒}βˆ†π›€π‘—

(𝒑; 𝒗𝑝) =πœ•

πœ•π‘£π‘βˆ«

πœ•πΊ(𝒑, 𝒒)

πœ•π‘›π‘ž π‘‘π‘†π‘ž

βˆ†π›€π‘—

where 𝐺(𝒑, 𝒒) = βˆ’1

2πœ‹ln π‘Ÿ in two dimensions

In the latter two definitions above the derivative can be taken inside the integral:

{𝑀𝑑 𝑒}βˆ†π›€π‘—

(𝒑; 𝒗𝑝) = βˆ«πœ•

πœ•π‘£π‘πΊ(𝒑, 𝒒) π‘‘π‘†π‘ž

βˆ†π›€π‘—

and

{𝑁 𝑒}βˆ†π›€π‘—

(𝒑; 𝒗𝑝) = ∫ πœ•2𝐺(𝒑, 𝒒)

πœ•π‘£π‘ πœ•π‘›π‘ž π‘‘π‘†π‘ž

βˆ†π›€π‘—

,

1 Boundary Element Method 2 Laplace’s Equation 3 The Laplace Integral Operators 4 Linear Systems of Equations 5 Discretization of the Laplace Integral Operators 6 Representation of a line by flat panels

Page 2: Test problems for the 2D discrete Laplace Integral Operators Problems for...9 Fortran codes for computing the discrete Helmholtz integral operators ... The discrete integral operators

www.boundary-element-method.com

except in the special case for the 𝑁 operator, when the observation point p lies on the panel βˆ†π›€π‘—

β€²,

and in this case the evaluation of the discrete form requires special treatment.

Let us now go on to derive geometrical integral expressions for the other operators. In two dimensions we have

πœ•πΊ

πœ•π‘Ÿ= βˆ’

1

2πœ‹ 1

π‘Ÿ

πœ•2𝐺

πœ•π‘Ÿ2=

1

2πœ‹ 1

π‘Ÿ2

We also have the following ,

πœ•π‘Ÿ

πœ•π‘›π‘ž=

𝒓. π’π‘ž

π‘Ÿ

πœ•π‘Ÿ

πœ•π‘£π‘= βˆ’

𝒓. 𝒗𝑝

π‘Ÿ

πœ•2π‘Ÿ

πœ•π‘£π‘πœ•π‘›π‘ž=

1

π‘Ÿ(𝒗𝑝. π’π‘ž +

πœ•π‘Ÿ

πœ•π‘£π‘

πœ•π‘Ÿ

πœ•π‘›π‘ž)

Using the chain rule allows us to derive expressions for the kernels of the M and Mt operators:

πœ•πΊ

πœ•π‘›π‘ž=

πœ•πΊ

πœ•π‘Ÿ

πœ•π‘Ÿ

πœ•π‘›π‘ž=

1

2πœ‹

𝒓. π’π‘ž

π‘Ÿ2 and

πœ•πΊ

πœ•π‘£π‘=

πœ•πΊ

πœ•π‘Ÿ

πœ•π‘Ÿ

πœ•π‘£π‘= βˆ’

1

2πœ‹

𝒓. 𝒗𝑝

π‘Ÿ2 .

Substituting these into the integrals gives the following expressions for the M and Mt operators:

{𝑀 𝑒}βˆ†π›€π‘—β€²(𝒑) = ∫

πœ•πΊ(𝒑, 𝒒)

πœ•π‘›π‘ž π‘‘π‘†π‘ž

βˆ†π›€π‘—β€²

=1

2πœ‹βˆ«

𝒓.π’π‘ž

π‘Ÿ2 π‘‘π‘†π‘žβˆ†π›€π‘—

β€² and

{𝑀𝑑 𝑒}βˆ†π›€π‘—β€²(𝒑; 𝒗𝑝) = ∫

πœ•πΊ(𝒑, 𝒒)

πœ•π‘£π‘ π‘‘π‘†π‘ž

βˆ†π›€π‘—β€²

= βˆ’1

2πœ‹βˆ«

𝒓. 𝒗𝑝

π‘Ÿ2 π‘‘π‘†π‘žβˆ†π›€π‘—

β€² .

(13)

The N operator has second derivatives in its definition. Using the following identity

Page 3: Test problems for the 2D discrete Laplace Integral Operators Problems for...9 Fortran codes for computing the discrete Helmholtz integral operators ... The discrete integral operators

www.boundary-element-method.com

πœ•2π‘Ÿ

πœ•π‘£π‘πœ•π‘›π‘ž= βˆ’

1

π‘Ÿ(𝒗𝑝. π’π‘ž +

πœ•π‘Ÿ

πœ•π‘£π‘

πœ•π‘Ÿ

πœ•π‘›π‘ž),

along with the results above, gives the following,

(15)

πœ•2𝐺

πœ•π‘£π‘πœ•π‘›π‘ž=

πœ•

πœ•π‘£π‘(πœ•πΊ

πœ•π‘Ÿ

πœ•π‘Ÿ

πœ•π‘›π‘ž) =

πœ•

πœ•π‘£π‘(πœ•πΊ

πœ•π‘Ÿ)

πœ•π‘Ÿ

πœ•π‘›π‘ž+

πœ•πΊ

πœ•π‘Ÿ

πœ•2π‘Ÿ

πœ•π‘£π‘πœ•π‘›π‘ž

=πœ•2𝐺

πœ•π‘Ÿ2

πœ•π‘Ÿ

πœ•π‘£π‘

πœ•π‘Ÿ

πœ•π‘›π‘žβˆ’

πœ•πΊ

πœ•π‘Ÿ

1

π‘Ÿ(𝒗𝑝. π’π‘ž +

πœ•π‘Ÿ

πœ•π‘£π‘

πœ•π‘Ÿ

πœ•π‘›π‘ž)

=1

2πœ‹ 1

π‘Ÿ2 πœ•π‘Ÿ

πœ•π‘£π‘

πœ•π‘Ÿ

πœ•π‘›π‘ž+

1

2πœ‹ 1

π‘Ÿ2(𝒗𝑝. π’π‘ž +

πœ•π‘Ÿ

πœ•π‘£π‘

πœ•π‘Ÿ

πœ•π‘›π‘ž)

=1

πœ‹ 1

π‘Ÿ2 πœ•π‘Ÿ

πœ•π‘£π‘

πœ•π‘Ÿ

πœ•π‘›π‘ž+

1

2πœ‹ 1

π‘Ÿ2𝒗𝑝. π’π‘ž = βˆ’

1

πœ‹ 1

π‘Ÿ4 (𝒓. π’π‘ž)(𝒓. 𝒗𝑝) +

1

2πœ‹ 1

π‘Ÿ2𝒗𝑝. π’π‘ž.

Substituting the above into the definition of the N operator gives the following result,

note that this is not applicable when the point p lies on the panel βˆ†π›€π‘— :

{𝑁𝑒}βˆ†π›€π‘—

(𝒑) = βˆ’1

πœ‹βˆ«

1

π‘Ÿ4 (𝒓. π’π‘ž)(𝒓. 𝒗𝑝)βˆ†π›€π‘—

𝑑𝑆 +1

2πœ‹π’—π‘. π’π‘ž ∫

1

π‘Ÿ2βˆ†π›€π‘—

𝑑𝑆

In the following tests particular values of the disrete Laplace integral operators are found using

vector geometry7 and analytic integration8.

Test(s) 1

Let 𝒑 = (0,0), and let the edges of the panel be π’’π‘Ž = (1,0) and 𝒒𝑏 = (1.5,0) with the

normal to the panel being π’π‘ž = (01), as illustrated in the following diagram. The length

of the panel is |π’’π‘Žπ’’

𝒃⃗⃗ βƒ—βƒ— βƒ—βƒ— βƒ—βƒ— βƒ—βƒ— | = 1.

7 Vector Arithmetic and Geometry 8 Integration

π’’π‘Ž p 𝒒𝑏

𝒏𝒒

0 1 1.5

Page 4: Test problems for the 2D discrete Laplace Integral Operators Problems for...9 Fortran codes for computing the discrete Helmholtz integral operators ... The discrete integral operators

www.boundary-element-method.com

{𝐿𝑒′}βˆ†π›€π‘—β€²(𝒑) = ∫ βˆ’

1

2πœ‹ln(π‘₯) 𝑑π‘₯ = βˆ’

1

2πœ‹[π‘₯ lnπ‘₯ βˆ’ π‘₯]1

1.5 = βˆ’1

2πœ‹(1.5ln1.5 βˆ’ 0.5)

1.5

1

= βˆ’0.01722 (5 𝑑. 𝑝. ),

For Test 1A , let 𝒗𝑝 = (01). Since 𝒓 = 𝒑𝒒⃗⃗⃗⃗ βƒ— , then for any point 𝒒 on the panel, 𝒓 is

perpendicular to π’π‘žand 𝒗𝑝 and hence {𝑀 𝑒′}βˆ†π›€π‘—β€²(𝒑) and {𝑀𝑑 𝑒′}βˆ†π›€π‘—

β€²(𝒑; 𝒗𝑝) are both zero. Since

πœ•π‘Ÿ

πœ•π‘£π‘= 0 and

πœ•π‘Ÿ

πœ•π‘›π‘ž= 0, then {𝑁𝑒′}βˆ†π›€π‘—

β€²(𝒑) =1

2πœ‹βˆ«

1

π‘Ÿ2 𝑑𝑆 =1

2πœ‹βˆ«

1

π‘₯2

1.5

1 𝑑π‘₯ = βˆ’

1

2πœ‹[1

π‘₯]1

1.5=

βˆ’1

2πœ‹(

1

1.5βˆ’

1

1)=

1

6πœ‹ .

For Test 1B, let us vary the direction of the vector so that 𝒗𝒑 = (βˆ’10

). Changing 𝒗𝑝 does not

alter {𝐿𝑒′}βˆ†π›€π‘—β€²(𝒑) or {𝑀 𝑒′}βˆ†π›€π‘—

β€²(𝒑). Since π’π‘žand 𝒗𝑝 are perpendicular and πœ•π‘Ÿ

πœ•π‘›π‘ž= 0 it follows that

{𝑁𝑒′}βˆ†π›€π‘—β€²(𝒑) = 0.

{𝑀𝑑 𝑒′}βˆ†π›€π‘—β€²(𝒑; 𝒗𝑝)=βˆ’

1

2πœ‹βˆ«

𝒓.𝒗𝑝

π‘Ÿ2 =βˆ†π›€π‘—

β€² βˆ’1

2πœ‹βˆ«

βˆ’π‘₯

π‘₯2

1.5

1 𝑑π‘₯ =

1

2πœ‹βˆ«

1

π‘₯

1.5

1𝑑π‘₯ =

1

2πœ‹[+ ln(π‘₯)]1

1.5 =

1

2πœ‹[ln(1.5)]1

1.5.

For Test 1B let us vary the direction of the vector so that 𝒗𝒑 = (0.60.8

). Changing 𝒗𝑝 does not alter

{𝐿𝑒′}βˆ†π›€π‘—β€²(𝒑) or {𝑀 𝑒′}βˆ†π›€π‘—

β€²(𝒑). Since π’π‘ž. 𝒗𝑝 = 0.8 are perpendicular and πœ•π‘Ÿ

πœ•π‘›π‘ž= 0 it follows that

{𝑁𝑒′}βˆ†π›€π‘—β€²(𝒑) = 0.

{𝑀𝑑 𝑒′}βˆ†π›€π‘—β€²(𝒑; 𝒗𝑝)=βˆ’

1

2πœ‹βˆ«

𝒓.𝒗𝑝

π‘Ÿ2 =βˆ†π›€π‘—

β€² βˆ’1

2πœ‹βˆ«

0.6π‘₯

π‘₯2

1.5

1 𝑑π‘₯ = βˆ’

0.6

2πœ‹βˆ«

1

π‘₯

1.5

1𝑑π‘₯ = βˆ’

0.6

2πœ‹[+ ln(π‘₯)]1

1.5 =

βˆ’0.6

2πœ‹[ln(1.5)]1

1.5. {𝑁𝑒}βˆ†π›€π‘—β€²(𝒑) = 0.8 β¨―

1

6πœ‹

Test 2

In this test let 𝒑 = (0,0), 𝒏𝑝 = (βˆ’10

),𝒒𝒂 = (2,0) and 𝒒𝒃 = (2,1), and hence π’π‘ž = (βˆ’10

).

The points and vectors are illustrated in the following diagram.

π’’π‘Ž p

𝒒𝑏

2

1

𝒏𝒒

0

Page 5: Test problems for the 2D discrete Laplace Integral Operators Problems for...9 Fortran codes for computing the discrete Helmholtz integral operators ... The discrete integral operators

www.boundary-element-method.com

In order to find the values of the discrete operators, in this case, let y vary from 0 to 1;

from 𝒒𝒂 to 𝒒𝒃, so that 𝒒 = (2, 𝑦). Hence, we may write 𝒓 = 𝒑𝒒⃗⃗⃗⃗ βƒ— = (2𝑦) and π‘Ÿ = |𝒓| =

√4 + 𝑦2. Substituting these expressions into the definition of the L operator returns the

following result:

{𝐿𝑒′}βˆ†π›€π‘—β€²(𝒑) = ∫ βˆ’

1

2πœ‹ln (√4 + 𝑦2) 𝑑𝑦 =

1

0

βˆ’1

πœ‹ ∫ ln(4 + 𝑦2) 𝑑𝑦 =

1

0

βˆ’1

πœ‹[𝑦(ln(4 + 𝑦2) βˆ’ 2) + 4 tanβˆ’1 (

𝑦

2)]

0

1

= βˆ’1

πœ‹(ln(5) βˆ’ 2 + 4 tanβˆ’1 (

1

2))

= βˆ’0.116503674 (9 d. p. ) .

For the other operators, we note that 𝒓. π’π‘ž = βˆ’2, 𝒓. 𝒗𝑝 = βˆ’2 and 𝒗𝑝. π’π‘ž = 1. Hence

{𝑀 𝑒}βˆ†π›€π‘—β€²(𝒑) =

1

2πœ‹βˆ«

𝒓.π’π‘ž

π‘Ÿ2 π‘‘π‘†π‘ž = βˆ’1

πœ‹βˆ«

𝟏

π‘Ÿ2 π‘‘π‘†π‘ž = βˆ’1

πœ‹βˆ«

𝟏

4 + 𝑦2 𝑑𝑦 = βˆ’1

2πœ‹[tanβˆ’1 (

𝑦

2)]

0

11

0βˆ†π›€π‘—β€²βˆ†π›€π‘—

β€²

= βˆ’1

2πœ‹tanβˆ’1

1

2= βˆ’0.073791809 (9 d. p. ) .

Similarly, {𝑀𝑑 𝑒}βˆ†π›€π‘—β€²(𝒑; 𝒗𝑝) = βˆ’0.073791809 (9 d. p. ) .

{𝑁𝑒}βˆ†π›€π‘—β€²(𝒑) = βˆ’

1

πœ‹βˆ«

1

π‘Ÿ4 (𝒓.π’π‘ž)(𝒓. 𝒗𝑝) 𝑑𝑆 +1

2πœ‹π’—π‘. π’π‘ž ∫

1

π‘Ÿ2 𝑑𝑆

= βˆ’4

πœ‹βˆ«

1

π‘Ÿ4 𝑑𝑆 +1

2πœ‹βˆ«

1

π‘Ÿ2 𝑑𝑆 = βˆ’4

πœ‹βˆ«

1

(4 + 𝑦2)2

1

0

𝑑𝑦 +1

2πœ‹βˆ«

1

4 + 𝑦2

1

0

𝑑𝑦

= βˆ’1

4πœ‹[

2𝑦

4 + 𝑦2]0

1

=1

10πœ‹= 0.031830989 (9 d. p. ) .

Test 3

For the final test we consider the special case when the point p lies on the panel.

Formulae9 for the discrete operators are as follows:

{𝐿𝑒}βˆ†π›€π‘—

(𝒑) =1

2πœ‹[π‘Ž + 𝑏 βˆ’ π‘Ž lnπ‘Ž βˆ’ 𝑏 ln 𝑏],

{𝑀 𝑒}βˆ†π›€π‘—

(𝒑) = 0 ,

{𝑀𝑑 𝑒}βˆ†π›€π‘—

(𝒑; 𝒗𝑝) = 0 and

{𝑁𝑒}βˆ†π›€π‘—

(𝒑; 𝒗𝑝) =1

2 πœ‹[1

π‘Ž+

1

𝑏] ,

9 Fortran codes for computing the discrete Helmholtz integral operators

Page 6: Test problems for the 2D discrete Laplace Integral Operators Problems for...9 Fortran codes for computing the discrete Helmholtz integral operators ... The discrete integral operators

www.boundary-element-method.com

where a is the distance from 𝒒𝒂 to p and b is the distance from 𝒒𝒃 to p. The derivation of the expression for {𝐿𝑒}

βˆ†π›€π‘—(𝒑) 𝑐an be derived by integration, as before. The expression for

{𝑁𝑒}βˆ†π›€π‘—

(𝒑) is derived by maintaining the πœ•

πœ•π‘£π‘ outside the integral and taking the limiting

value as the point p reached the boundary10.

In order to provide a test problem, let 𝒒𝒂 = (1,3) and 𝒒𝒃 = (1.3,2.4), and hence π’π‘ž =

(βˆ’0.80.6

). Let 𝒑 = (1.15,2.2) and since 𝒑 lies on the panel 𝒗𝑝 = π’π‘ž = (βˆ’0.80.6

).

The length of the panel is 0.5 and the lengths π‘Ž = 𝑏 = 0.25 and hence the non-zero

valued discrete operators are as follows:

{𝐿𝑒}βˆ†π›€π‘—

(𝒑) =1

2πœ‹[0.25 + 0.25 βˆ’ 0.25 ln 0.25 βˆ’ 0.25 ln 0.25] = 0.189895272 (9 d. p. ),

{𝑁𝑒}βˆ†π›€π‘—

(𝒑; 𝒗𝑝) =1

2 πœ‹[

1

0.25+

1

0.25] = 1.273239545 (9 d. p. ) ,

Test 4

This set of tests repeat the problem in Test 3. However, when the β€˜l2lc’ routine is called logical

parameters are given the value of β€˜true’ if the discrete operator value is required and β€˜false’ if the

discrete operator value is not required. In the case where the value of the discrete operator is

not required, a zero is returned. This set of tests goes through every variation of the logical

parameters and verifies that the same result to Test 3 is returned when they are β€˜true’ and a

zero is returned when they are β€˜false’.

Test 5

In this test the observation point p is not on the panel. The discrete integral operators are

evaluated for a particular panel. The panel is then split in two and the sum of the discrete

integral operators over the two panels is compared to the initial discrete integral operators. If

they are the same then the test is passed.

Test 6

This test is similar to Test 5, except this time the observation point p is at the centre of the

original panel. The discrete integral operators are again evaluated for a particular panel. The

panel is then split in to three equal parts, with p lying at the centre of the middle panel. The sum

of the discrete integral operators over the three panels is compared to the initial discrete

integral operators. If they are the same then the test is passed.

10 Solution of exterior acoustic problems by the boundary element method

Page 7: Test problems for the 2D discrete Laplace Integral Operators Problems for...9 Fortran codes for computing the discrete Helmholtz integral operators ... The discrete integral operators

www.boundary-element-method.com

Test 7

This test verifies the evaluation of the discrete M and N operators by utilising the equations

{ 𝑀1}𝑆 (𝒑) + 1 = 0 (𝒑 ∈ 𝐷) ,

{ 𝑀1}𝑆 (𝒑) +1

2 = 0 (𝒑 ∈ 𝑆, 𝑆 is smooth at 𝒑) ,

{ 𝑀1}𝑆 (𝒑) = 0 (𝒑 ∈ 𝐸) .

{ 𝑁1}𝑆 (𝒑) = 0 (𝒑 ∈ 𝐷 βˆͺ 𝑆 βˆͺ 𝐸) .

where S is a closed boundary and β€˜1’ represents the unit function. The boundary is that of the

unit square and the point p takes values of (-0.5,0.5) (in E), (0,0.5) (on S) and (0.5,0.5) (in D).

Test Problem

In the final test the discrete operators are calculated for a closed boundary, for which the

boundary condition and solution is known, and it is shown that two integral equations for the

interior laplace problems are approximately satisfied. The boundary is the unit square divided

into 32 panels.

The unit square domain and the 32 panels.

The simple solution of Laplace’s equation is assumed in which πœ‘ = 1 + 𝑦. The boundary

solution for Ο† is clear. It can also be deduced that πœ•πœ‘

πœ•π‘›= 𝑣 = 0 on the vertical boundaries when

𝑦 = 0, 1 and πœ•πœ‘

πœ•π‘›= 𝑣 = βˆ’1 on the lower boundary when π‘₯ = 0 and

πœ•πœ‘

πœ•π‘›= 𝑣 = 1 on the upper

boundary when π‘₯ = 0. This data is fed in to show that they are solutions to the integral

equations {(𝑀 +1

2 𝐼) πœ‘} (𝒑) = {𝐿𝑣}(𝒑) and its derivative {π‘πœ‘}(𝒑) = {(𝑀𝑑 βˆ’

1

2 𝐼) 𝑣} (𝒑). Hence

tis verifies all four discrete operators.