**1. Introduction**

The boundary element method (BEM) has established itself as an important numerical technique for solving partial differential equations (PDEs) over the last half century [1, 2]. It distinguishes itself from competing methods, such as the finite element method (FEM) [3] in that the latter method requires a mesh of the domain, whereas the BEM only requires a mesh of the boundary (of the domain). The BEM is not as widely applicable as the FEM, particularly in that it is much more of a struggle to apply the BEM to non-linear problems. However, for problems to which the boundary element method is viable, the advantage of only requiring a boundary mesh is a significant one; the BEM is likely to be more efficient but also the relative simplicity of meshing, and the method is easier to use and is more accessible. This advantage is more notable for exterior problems; the domain is infinite, and 'domain methods'such as the FEM require special treatment, but for the BEM, only a (finite) boundary mesh is required. Computational methods may be combined or coupled [2].

The boundary element method is derived through the discretisation of an integral equation that is mathematically equivalent to the original partial differential equation. The essential reformulation of the PDE that underlies the BEM consists of an integral equation that is defined on the boundary of the domain and an integral that relates the boundary solution to the solution at points in the domain. The former is termed a boundary integral equation (BIE), and the BEM is often referred to as the boundary integral equation method or boundary integral method. There are two classes of boundary element method, termed the direct and indirect method. The direct method is based on Green's second theorem, whereas the indirect method is based on describing the solution in terms of layer potentials. In this work the direct boundary element method is developed.

The simplest partial differential equation that is amenable to the BEM is Laplace's equation:

$$\sum\_{i=1}^{N} \frac{\partial^2 \rho(\mathbf{p})}{\partial \mathbf{x}\_i^2} = \mathbf{0} \tag{1}$$

*α*ð Þ *p φ*ð Þþ *p β*ð Þ *p*

1 2 *φ q* � � <sup>¼</sup> ð *S*

� �*dSq* <sup>þ</sup> *<sup>φ</sup> <sup>q</sup>*

for two-dimensional Laplace problems, where *r* ¼ ∣*q* � *p*∣.

typical boundary value problem, we may be given <sup>φ</sup>(*q*), *<sup>∂</sup><sup>φ</sup>*ð Þ*<sup>q</sup>*

equation of the form:

*∂G p; q* � � *∂nq*

> ð *S*

The terminology *<sup>∂</sup>* <sup>∗</sup>

denoted by G and is defined as

*φ q* � �*dSq* <sup>þ</sup>

*DOI: http://dx.doi.org/10.5772/intechopen.86507*

*φ q*

*∂G p; q* � � *∂nq*

ð *S*

boundary data.

**5**

**2.2 Operator notation**

results from its discretisation.

the following operation to *ζ* for all points *p* on *Г*

ð Г

*G p; q* � �*ζ q*

function ζ to return the function μ. More simply we may write

*∂φ ∂np*

*A Pilot Fortran Software Library for the Solution of Laplace's Equation by the Boundary…*

In the direct BEM, Laplace's equation is replaced by an equivalent integral

� � <sup>¼</sup> ð *S*

respect to the unit outward normal at point *q* on the boundary. The function *G* is known as Green's function. Physically, *G(p, q)* represents the effect observed at point *p* of a unit source at point *q*. For the Laplace equation, Green's function is

*G*ð Þ¼� **p***;* **q**

such data on *S*. The boundary integral equation is a means of determining the unknown boundary function(s), followed by the domain solution from the given

*<sup>G</sup> <sup>p</sup>; <sup>q</sup>* � � *<sup>∂</sup><sup>φ</sup> <sup>q</sup>*

*<sup>∂</sup>nq* represents the partial derivative of the function\* with

1

Integral Eqs. (4) and (5) can be derived from the Laplace equation by applying Green's second theorem. The power of the formulation lies in the fact that Eq. (4) relates the potential *φ* and its derivative on the boundary alone; no reference is made to φ at points in the domain in this particular boundary integral equation. In a

Operator notation is a useful shorthand in writing integral equations. Moreover, it will be shown that it is a very powerful notation in that it clearly demonstrates the connection between the integral equation and the linear system of equations that

Integral equations can always be written in terms of integral operators. For example, if *ζ* is a function defined on a (closed or open) boundary *Г*, then applying

gives a function μ. This may be viewed as the application of an operator to the

In Eq. (8) *L* represents the integral operator, and the subscript (*Г*) refers to the domain of integration. *Г* is used as a variable, representing either a whole boundary

*<sup>G</sup> <sup>p</sup>; <sup>q</sup>* � � *<sup>∂</sup><sup>φ</sup> <sup>q</sup>*

� � *∂nq*

> � � *∂nq*

ð Þ¼ *p f*ð Þ *p* ð Þ *p*∈*S :* (3)

<sup>2</sup>*<sup>π</sup>* ln *<sup>r</sup>* (6)

� �*dSq* <sup>¼</sup> *<sup>μ</sup>*ð Þ *<sup>p</sup>* ð Þ *<sup>p</sup>*<sup>∈</sup> *<sup>S</sup>* (7)

f g *Lζ* <sup>Г</sup>ð Þ¼ **p** μð Þ **p** *:* (8)

*dSq*ð Þ *p*∈*S ,* (4)

*dSq*ð Þ *p*∈ *D :* (5)

*<sup>∂</sup>nq* or a combination of

where N is the dimension of the space or, more concisely,

$$
\nabla^2 \boldsymbol{\varphi} = \mathbf{0}.\tag{2}
$$

Laplace's equation therefore acts as a model problem for developing the BEM. Laplace's equation also has a number of applications; steady-state heat conduction, steady-state electric potential, gravitation and groundwater flow [4–13].

Initially, in this paper, the derivation of the direct boundary element method is introduced for the interior two-dimensional Laplace problem. The boundary element method is developed in Fortran for the 2D Laplace problem; then this is extended to axisymmetric three-dimensional problems and to both interior and exterior problems. The boundary element method can be extended to problems where the body being modelled is 'thin', like a screen or discontinuity, and these are also included. Test problems are applied to the codes, and the results are given for all problem classes. There are a number of studies on numerical error in the boundary element method [14–16].

There have been a number of works on coding the boundary element method [17–19]. The focus of this work is the algorithms and the software for solving Laplace problems by the BEM. As with the earlier works by the first author on Laplace and Helmholtz (acoustic) problems [20–24], this is about continuing with the development of a base library of methods and corresponding software. The codes and guides can be found on the first author's website [25].

The codes have been developed in Fortran 77, but the language is just used to provide a simple template for exploring the methods and the organisation of coding. The algorithms and coding for Laplace's equation considered in this work also provide a useful basis for the development of the BEM for other problems and add to the library of numerical software [26].
