Professional Documents
Culture Documents
Introduction To The Boundary Element Method Boundary Element Solution of Laplace Problems: BEMLAP Fortran Package
Introduction To The Boundary Element Method Boundary Element Solution of Laplace Problems: BEMLAP Fortran Package
net/publication/326259056
CITATIONS READS
0 511
1 author:
Stephen Kirkup
University of Central Lancashire
453 PUBLICATIONS 517 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
The choice of the weighting parameter in the solution of the exterior Helmholtz/acoustic problems by advanced boundary element methods View project
The condition number of the BEM-matrices arising from the Helmholtz equation View project
All content following this page was uploaded by Stephen Kirkup on 11 October 2018.
1. Introductiontion
This is an on-line manual for the Fortran library for solving Laplace' equation by the
Boundary Element Method. This includes the core codes L2LC.FOR (2D), L3LC.FOR
(3D) and L3ALC.FOR (3D axisymmentric). And the operational codes LIBEM2.FOR
(2D, interior), LBEM3.FOR (3D, interior/exterior), LBEMA.FOR (3D axisymmetric
interior/exterior) and The document below gives an introduction to the boundary
element method.
Computer software that implements the BEM for Laplaces equation is described in this
manual. The codes can be directly downloaded. The codes are written in Fortran 77
and it is recommended that users have a working knowledge of this programming
language to obtain full benefit from the codes. The are three main subroutines that
deal with computing the discrete Laplace operators in each dimensional space:
For each of the codes a test problem is implemented. i The main programs L2LC_T
(in file L2LC_TESTS.FOR ) solves the two-dimensional problem with the boundary of
a circle. L3LC_T (in file L3LC_TESTS.FOR ) solves the three-dimensional problem
with the boundary a cube. L3ALC_T (in file L3ALC_TESTS.FOR ) solves the
axisymmetric three-dimensional problem with the boundary a sphere. Further details
on the test problems and the results are given in Chapter 3.
These are the core codes. The codes for the three problem domains are covered in
subsequent chapters.
www.boundary-element-method.com
2. Boundary Representation
The boundary element method can be a versatile method only if it includes the ability
to represent any boundary in the given class of two-, three- or axisymmetric three-
dimensional space. In general this is carried out by the facility of defining the surface
as a set of panels, each having the same characteristic form (or a set of two or three
characteristic forms in more advanced software). For example a closed two-
dimensional boundary in two dimensions can be represented by a set of straight lines,
as illustrated earlier in Figure 2.1.
In the subroutine that solve Laplace problems in two dimensions ( LIBEM2) the
boundaries must be represented in the form illustrated in the figure below. In order
that the normal to the boundary points outward rather than inward, the two nodes that
define each element must be listed in the clockwise direction around the boundary.
The program LIBEM2_T solves Laplace problems in which the boundary under
consideration is that of a square of side 0.1. The boundary is represented by 32
uniform panels and also has 32 vertices, as illustrated in the square in the following
linked document.
In the subroutines that solve Laplace problems in three dimensions ( LBEM3, and
LSEM3) the boundaries must be represented in the form of a set of planar triangles.
In order that the normal to the boundary points outward rather than inward the three
nodes that define each element must be listed in the anti-clockwise direction when it
is viewed from just outside the surface. The programs LBEM3_IT and LBEM3_ET
each solve Laplace problems in which the boundary under consideration is that of a
www.boundary-element-method.com
sphere of unit radius. In LSEM3_T the boundary consists of two flat plates, a distance
apart. A potential is placed on each plate and the potential gradient between them
forms a test problem.
Discussion
In this section it has been shown how boundaries in each dimensional setting can be
represented by two data structures. The square as a set of straight line panels and the
sphere represented by triangles and axisymmetric cone panel are used throughout the
remainder of this series to demonstrate the boundary element methods. In the
subsequent work in this series the two data structures that represent the relevant
structure are passed as array parameters to the subroutines. By setting the validation
parameter LVALID=.TRUE. in the subroutines a check is also made to ensure that the
boundaries are closed in the BEM.
The subdivision of the square and the sphere into triangles enables us to simulate
general Laplace problems in two- and three- dimensions. However, the axisymmetric
elements are uniform when rotated about the z-axis. Conical elements should only be
used when the Laplace field as well as the surface is known to be axisymmetric.
As a general rule, the element sizes for general two- and three-dimensional
boundaries should be as close to uniform as possible across the boundary. Moreover,
in the three-dimensional case, the triangles should not deviate too far from the
equilateral shape. For axisymmetric surfaces, the lengths of the generator of the
elements should be as close to uniform size as possible. If the validation parameter is
set LVALID=.TRUE. then the input panels are checked to ensure that their sizes are
reasonably uniform and the input boundary is checked to ensure it does not contain
sharp angles.
In some cases it is wise to overrule the general guidelines of the previous paragraph.
For example if a boundary has an intricate shape in a localised area it would be
beneficial to use more elements in that region. In other cases it may be known that the
potential is strongly varying in some areas of the surface - for example in the
neighbourhood of a sharp corner the potential can be singular - and in these regions
it is often beneficial to increase the number of elements.
www.boundary-element-method.com
The approximation methods used are very simple, but each is sufficient to approximate
the boundaries in each class of domain. For less straightforward geometries, the
boundary would be better represented by curved panels but these are not considered
in this series.
Figure 3.1. The straight line, planar triangle and conical elements.
For each particular case of boundary division, the discrete form of the operators is
computed using the subroutines L2LC (two-dimensional), L3LC (three-dimensional)
and L3ALC (axisymmetric three-dimensional). The subroutines are thus useful for the
solution of the interior or exterior Laplace via integral equation methods; the
subroutines compute the matrix elements in the linear systems of equations that arise.
Each subroutine is meant to be used as a tool that will be called many times within a
main program.
The objective here is to describe the underlying methods employed in computing the
discrete form of the integral operators, to outline the Fortran subroutines and explain
how the subroutines may be utilised and to demonstrate the subroutines. The
subroutines have been written to the Fortran 77 standard and employ double-precision
arithmetic.
www.boundary-element-method.com
In this section we consider methods for evaluating the discrete forms of the Laplace
integral operators L, M, Mt and N . The boundary function is replaced by its
equivalent on the approximate boundary. The representative boundary function is then
replaced by a constant on each panel.
The interior Laplace problem involves the solution of the Laplace equation in a domain
that is bounded by a closed surface in 3D or a closed boundary in 2D. An illustration
of the problem is shown in figure 3.2.
www.boundary-element-method.com
where npi is the unit outward normal to S' at pi. This gives the four n ×n matrices Lk,
Mk, Mkt and Nk. The approximate boundary functions can be approximated by a vector
The application of collocation to the above equation give the following linear systems
of approximations
1
( Mk - I ) Lk v
2
where vj = v(pj) for j = 1,...,n. Hence the primary stage of the boundary element method
entails the solution of the following linear system of equations:
1 ^
( Mk - I ) = Lk v
2
which yields an approximations to (pj), for j = 1,...,n.
www.boundary-element-method.com
The secondary stage of the boundary element method requires the calculation of the
approximation to (p) where p is a point in the approximate exterior domain E. For this
the discrete forms are substituted into (3) to give
n
^ ^
(p) = [ { M e' }S'j(p) j -{ L e' }S'j(p) vj] (p E' ).
j=1
Note that the secondary stage requires the evaluation of only two integral operators in
contrast with the primary stage which requires all four. Note also that the special
evaluation techniques of subtracting out the singularity are required only for the
diagonal components of the matrices Lk and Nk. This latter point is a typical property
of integral equation methods, the outcome of which is that the generally greater cost
of evaluating the discrete forms when p lies on the element is not important when
assessing the overall computational cost.
Subroutine L2LC
In this section the Fortran subroutine L2LC is described. The subroutine computes the
discrete form of the two-dimensional Laplace integral operators. Details of the
methods employed in the subroutine are given. The subroutine is used to calculate the
discrete operators. The program is tested for the problem where the boundary is a
circle and the results are given.
The regular integrals that arise are approximated by a standard quadrature rule such
as a Gauss-Legendre rule which is specified in the parameter list to the subroutines.
Tables of Gauss-Legendre rules are given in Stroud and Secrest [23] and can also
generated from the NAG library [22]. The non-regular integrals that arise are computed
via the following methods. See Jaswon and Symm [14] for the background to these
methods.
The M0 and M0t operators have regular kernels, hence the aim is to find expressions
for:
{ L0 e' }'(p) = G0(p,q) dSq ,
'
G0
{ N0 e' }'(p; vp) = (p,q) dSq ,
vp nq
'
where ' is a straight line element, p ' (though not on an edge or corner of the
element). Let it be assumed that the element ' has length a+b with q = q(x) and p =
q(0) for x [-a,b]. This gives the following formulae.
www.boundary-element-method.com
1
{ L0 e' }'(p) = [ a + b - a loga -b logb ] ,
2
1 1 1
{ N0 e' }'(p; vp) = - [ + ].
2 a b
The program in file L2LC_TESTS.FOR is a test for the subroutine L2LC. It computes
the solution to the Laplace problem interior to a circle. In order to use L2LC, the circle
is approximated by a regular polygon with each side being one panel. The boundary
functions are approximated by a constant at the centre of each panel.
Simple changes in the program allow the set up of the following data the choice of
quadrature rule, the radius of the circle, the number of elements (sides on the
approximating polygon), the boundary condidition and the exact solution if applicable,
the points in the interior where the solution is sought.
During execution, the program gives the solution at the collocation points (the points
at the centre of each element) and the solution at the selected interior points. The
program also give the exact solution at the same points so that computed and exact
solutions may be compared.
The output from the program shows the exact and computed solution at the collocation
points on the boundary. The solution at the selected interior point is given: the exact
solution at (0.0,0.5) is 0.5, the computed solution is 0.500403 to six decimal places.
Subroutine L3LC
In this section the Fortran subroutine L3LC is described. The subroutine computes the
discrete form of the three-dimensional Laplace integral operators. Details of the
background methods employed by the subroutines are given. The subroutine is
applied to the a test problem where the boundary is a cube, using the method in
Subsection 3.5.2 and results are given.
The regular integrals that arise are approximated by a quadrature rule defined on a
triangle. Laursen and Gellert [21] contains a selection of Gauss-Legendre quadrature
rules for the triangle. The non-regular integrals that arise are computed by the
following methods. See Jaswon and Symm [14], Terai [24], Banerjee and Butterfield
[2] for the background to these methods.
The M0 and M0t operators have regular kernels, hence the aim is to find expressions
for:
www.boundary-element-method.com
{ L0 e' }'(p) = G0(p,q) dSq ,
'
G0
{ N0 e' }'(p; vp) = (p,q) dSq ,
vp nq
'
where ' is a planar triangular element, p ' (though not on an edge or corner of
the element). Let R() be the distance from p to the edge of the element for [0, 2
], as illustrated in figure 3.3.
Figure 3.3.
1 2
{ L0 e' }[()] (p) = R() d ,
0
4
1 2 1
{ N0 e' }[()] (p; vp) = - d.
0
4 R()
In order to evaluate the integrals, a similar technique to that described in Guermond
[10] is followed. The triangular element [()] is divided into three 1, 2 and 3 by
joining the point p to the vertices. The resulting triangles have the form of figure 3.4.
After some elementary analysis, we obtain
1 B+A B
{L0 e' }S' (p) = 4
R(0) sinB( logtan(
2
) - logtan
2
) and
1, 2, 3
1 cos(B+A) - cosB
{N0 e' }S' (p; vp) = 4 R(0) sinB
.
1, 2, 3
www.boundary-element-method.com
Figure 3.4.
In this section the subroutine L3LC.FOR is introduced and demonstrated through the
test problem L3LC_TESTS.FOR .
The program in file L3LC_TESTS.FOR is a test for subroutine L3LC. It computes the
solution to the Laplace problem interior to a cube. In order to use L3LC, the cube is
represented by 24 uniform triangles. The boundary functions are approximated by a
constant on each triangular panel.
Simple changes in the program allow the set up of the following data: the choice of
quadrature rule, the geometry of the surface (of the approximating polyhedron), the
boundary condition and the exact solution, the points in the interior where the solution
is sought.
During execution, the program gives the solution at the collocation points (the points
at the centre of each element) and the solution at the selected interior point. The
program also give the exact solution at the same points so that computed and exact
solutions may be compared.
In L3LC_TESTS.FOR results are computed for the test problem of a cube, bounded
by x,y,z = 1. The cube is approximated by 24 uniform elements. The integrals are
computed by a 7 point Gaussian quadrature rule for triangles.
The analytic problem that is considered is (p) = p3. The computed and exact results
are compared at the collocation points in the output to the program. The solutions are
also compared at (0,0,0.5); the exact solution is 0.5, the computed solution is 0.490392
to six decimal places.
Subroutine L3ALC
In this section the subroutine L3ALC is described. The subroutine computes the
discrete form of the axisymmetric three-dimensional Laplace integral operators.
Details of the methods employed by the subroutine are given. The subroutine is used
to compute the discrete operators and the method outlined in Subsection 3.5.2 is
applied. In the test problem the boundary is a sphere with a Neumann boundary
condition and results are given.
The M0 and M0t operators have regular kernels, hence the aim is to find expressions
for the following:
{ L0 e' }'(p) = G0(p,q) dSq , (*)
'
G0
{ N0 e' }'(p; vp) = (p,q) dSq , (**)
vp nq
'
where ' is a conical element, p ' (though not on an edge of the element).
The integral in (*) is evaluated through dividing the integral with respect to the
generator direction into two parts at p and transforming the integral through changing
the power of the variable, as introduced in Duffy [9]. The resulting regular integral on
both parts is computed via the quadrature rule supplied to the routine.
The integral in (**) is evaluated by using the result that if the surface of integration in
(48) is extended to enclose a three-dimensional volume then the integral vanishes. As
each element is a truncated right circular cone, as illustrated in figure 3.1, a 45o right
circular cone is added to each flat side of the element. The integrals over the two 45 o
cones are regular and are computed by a composite rule based on the quadrature rule
supplied to the subroutine. The solution is thus equal to minus the sum of the integrals
over the two 45o cones.
In this section the subroutine L3ALC is introduced and demonstrated through the test
problem L3ALC_TESTS .
This program in file L3ALC.FOR is a test for the subroutine L3ALC. The program
computes the solution of the Laplace problem exterior to a sphere centred at the origin
and with an axisymmetric solution via the integral equation (M+I/2) = L v. The
boundary condition and solution are assumed to be independent of theta (ie
axisymmetric).
In order to use L3ALC , the sphere is approximated by a set of conical elements. Each
element is decribed by a straight line on the generator (R-z plane) swept through 2
(in the theta direction). The boundary functions are approximated by a constant at the
centre of each element.
During execution the program gives the solution at the collocation points (the points at
the centre of each element) and the solution at the selected interior points. The
program also give the exact solution at the same points so that computed and exact
solutions may be compared.
the output to the program. The solutions are also compared at (0,0,0.5); the exact
solution is 0.5, the computed solution is 0.501790 to six decimal places.
Discussion
Integral equation methods such as the boundary element method are becoming
increasingly popular as methods for the numerical solution of linear elliptic partial
differential equations such as the Laplace equation. The application of (discrete)
collocation to the integral equation formulation requires the computation of the discrete
operators. Fortran subroutines for the evaluation of the discrete Laplace integral
operators resulting from the use of constant elements and the most simple boundary
approximation to two-dimensional, three-dimensional and axisymmetric problems
have been described and demonstrated.
The subroutines have been designed to be easy-to-use, flexible, reliable and efficient.
It is the intention that the subroutines are to be used as a `black box' which can be
utilised either for further analysis of integral equation methods or in software for the
solution of practical physical problems which are governed by the Laplace equation.
Download: Fortran subroutines for computing the solution of the Interior Laplace
problem
The subroutines LIBEM2 , LBEM3 and LBEMA . are demonstrated through invoking
them from a main program and comparing the results with analytic solutions. The
corresponding main programs are LIBEM2_T , LBEM3_IT and LBEMA_IT . The test
problems are described in detail in the introduction to the main programs. Results are
listed in LIBEM2_T output , LBEM3_IT output and LBEMA_IT output .
To run the 2D interior BEM Laplace software the files that need to be linked are the main
subroutine LIBEM2 , a main program, such as LIBEM2_T , the core module L2LC , the
supporting modules in the files GLRULES.FOR, GEOM2D.FOR, GLS2.FOR, LUFAC.FOR,
LUFBSUBS.FOR, VGEOM2.FOR, VGEOM2A.FOR, and VG2LC.FOR.
www.boundary-element-method.com
To run the 3D interior BEM Laplace software the files that need to be linked are the main
subroutine LBEM3 , a main program, such as LBEM3_IT , the core module L3LC , the
supporting modules in the files GLT7.FOR, GLT25.FOR, GEOM3D.FOR, GLS2.FOR,
LUFAC.FOR, LUFBSUBS.FOR, VGEOM3.FOR, and VG3LC.FOR.
To run the 3D axisymmetric interior BEM Laplace software the files that need to be linked are
the main subroutine LBEMA , a main program, such as LBEMA_IT , the core module L3ALC
, the supporting modules in the files GLRULES.FOR, GEOM2D.FOR, GEOM3D.FOR,
GLS2.FOR, LUFAC.FOR, LUFBSUBS.FOR, VGEOMA.FOR, VGEOM2A.FOR, and
VG2LC.FOR.
Download: Fortran subroutines for computing the solution of the Exterior Laplace
problem
The subroutines LBEM3 and LBEMA . are demonstrated through invoking them from
a main program and comparing the results with analytic solutions. The corresponding
main programs are LBEM3_ET and LBEMA_ET . The test problems are described in
detail in the introduction to the main programs. Results are listed in LBEM3_ET
outputand LBEMA_ET output .
To run the 3D exterior BEM Laplace software the files that need to be linked are the main
subroutine LBEM3 , a main program, such as LBEM3_ET , the core module L3LC , the
supporting modules in the files GLT7.FOR, GLT25.FOR, GEOM3D.FOR, GLS2.FOR,
LUFAC.FOR, LUFBSUBS.FOR, VGEOM3.FOR, and VG3LC.FOR.
To run the 3D axisymmetric interior BEM Laplace software the files that need to be linked are
the main subroutine LBEMA , a main program, such as LBEMA_ET , the core module L3ALC
, the supporting modules in the files GLRULES.FOR, GEOM2D.FOR, GEOM3D.FOR,
GLS2.FOR, LUFAC.FOR, LUFBSUBS.FOR, VGEOMA.FOR, VGEOM2A.FOR, and
VG2LC.FOR.
The subroutines LSEM3 and LSEMA . are demonstrated through invoking them from
a main program and comparing the results with analytic solutions. The corresponding
main programs are LSEM3_T and LSEMA_T . The test problems are described in
detail in the introduction to the main programs. Results are listed in LSEM3 output and
LSEMA_T output .
To run the 3D exterior BEM Laplace software the files that need to be linked are the main
subroutine LSEM3 , a main program, such as LSEM3_T , the core module L3LC , the
supporting modules in the files GLT7.FOR, GLT25.FOR, GEOM3D.FOR, GLS2.FOR,
LUFAC.FOR, LUFBSUBS.FOR, VGEOM3.FOR, and VG3LC.FOR.
To run the 3D axisymmetric interior BEM Laplace software the files that need to be linked are
the main subroutine LSEMA , a main program, such as LSEMA_T , the core module L3ALC
, the supporting modules in the files GLRULES.FOR, GEOM2D.FOR, GEOM3D.FOR,
GLS2.FOR, LUFAC.FOR, LUFBSUBS.FOR, VGEOMA.FOR, VGEOM2A.FOR, and
VG2LC.FOR.
Bibliography
[1] C. T. H. Baker (1977). The Numerical Treatment of Integral Equations, Clarendon
Press, Oxford.
[2] P. K. Banerjee and R. Butterfield (1981). Boundary Element Methods in
Engineering Science, McGraw-Hill.
[3] C. A. Brebbia (1978). The Boundary Element Method for Engineers, Pentech
Press.
[4] A. J. Burton (1973). The Solution of Helmholtz Equation in Exterior Domains using
Integral Equations. NPL Report NAC30, National Physical Laboratory, Teddington,
Middlesex, UK.
[5] A. J. Burton (1976). Numerical Solution of Acoustic Radiation Problems, NPL
Report OC5/535, National Physical Laboratory, Teddington, Middlesex, UK.
[6] G. Chen and J. Zhou (1992), Boundary Element Methods, Academic Press.
[7] P. A. Davis and P. Rabinowitz (1984). Methods of Numerical Integration, Academic
Press, Oxford.
[8] L. M. Delves and J. L. Mohamed (1985) Computational Methods for Integral
Equations, Cambridge University Press.
[9] M. Duffy (1982). Quadrature over a pyramind or cube of integrands with a
singularity at a vertex, SIAM Journal of Numerical Analysis, 19, 1260-1262.
[10] J. L. Guermond (1992). Numerical quadratures for layer potentials over curved
domains in R3. SIAM Journal of Numerical Analysis 29, 1347-1369,
[11] W. S. Hall (1994) The Boundary Element Method, Kluwer Academic Publishers
Group, The Netherlands.
[12] MATH/LIBRARY - Fortran routines for mathematical applications (1987). MALB-
USM-PERFECT-1.0, IMSL, Houston.
[13] Library of Boundary Element Methods.
[14] M. A. Jaswon and G. T. Symm (1977). Integral Equation Methods in Potential
Theory and Elastostatics, Academic Press.
www.boundary-element-method.com
Return to boundary-element-method.com/laplace
Return to boundary-element-method.com