**3.2 LBEM3 and L3LC modules, test problems and results**

The LBEM3 and L3LC subroutines implement the boundary element method for general three-dimensional problems. As with the two-dimensional and axisymmetric codes, the component module L3LC computes the integrals over the panels. The L3LC subroutine is called as follows:

```
SUBROUTINE L3LC(P,VECP,QA,QB,QC,LPONEL,LVALID,EGEOM,LFAIL,
 * NEEDL,NEEDM,NEEDMT,NEEDN,DISL,DISM,DISMT,DISN)
```
The parameters follow a similar purpose as did in the L2LC, except that the points and vectors have three values. QA, QB and QC are the coordinates of the vertices of the triangular panel.

The LBEM3 module solves Laplace's equation in a general interior or exterior three-dimensional domain and is called as follows:

LBEM3(MAXNODES,NNODE,NODES,MAXPANELS,NPANEL,PANELS,


As with LIBEM2 and LBEMA, NODES and PANELS define the boundary. However, in this case, NODES lists the three coordinates of each surface node, and PANELS lists the three nodal indices that make up each triangular panel.

### *Numerical Modeling and Computer Simulation*


#### **Table 4.**

*The results from the three-dimensional interior problem.*


#### **Table 5.**

*The results from the three-dimensional exterior problem.*

The interior test problem is that of a unit sphere approximated by 36 triangular panels. The exact solution that is applied as a Dirichlet boundary condition is

$$
\rho = \mathfrak{x} + \mathfrak{y} + \mathfrak{z}.\tag{27}
$$

quantities of difference and average of the potential and its normal derivative across

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

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

� � � *<sup>φ</sup> <sup>p</sup>*<sup>þ</sup>

� � <sup>þ</sup> *<sup>φ</sup> <sup>p</sup>*<sup>þ</sup>

� � � *<sup>v</sup> <sup>p</sup>*<sup>þ</sup>

� � <sup>þ</sup> *<sup>v</sup> <sup>p</sup>*<sup>þ</sup>

The integral equation formulations for the Laplace equation in the exterior domain can now be written using the operator notation introduced earlier:

� �ð Þ *<sup>p</sup>*∈*<sup>Γ</sup> ,* (29)

� �ð Þ *<sup>p</sup>*∈*<sup>Γ</sup> ,* (31)

� � � � ð Þ *<sup>p</sup>*∈*<sup>Γ</sup> ,* (30)

� � � � ð Þ *<sup>p</sup>*∈*<sup>Γ</sup> :* (32)

*φ*ð Þ¼ *p* f g *Mδ <sup>Γ</sup>*ð Þ� *p* f g *Lν <sup>Γ</sup>*ð Þ *p* ð Þ *p*∈*E ,* (33) *Φ*ð Þ¼ *p* f g *Mδ <sup>Γ</sup>*ð Þ� *p* f g *Lν <sup>Γ</sup>*ð Þ *p* ð Þ *p*∈*Γ ,* (34) *<sup>V</sup>*ð Þ¼ *<sup>p</sup>* f g *<sup>N</sup><sup>δ</sup> <sup>Γ</sup>*ð Þ� *<sup>p</sup> <sup>M</sup><sup>t</sup>* f g*<sup>ν</sup> <sup>Γ</sup>*ð Þ *<sup>p</sup>* ð Þ *<sup>p</sup>*∈*<sup>Γ</sup> :* (35)

*α*ð Þ *p δ*ð Þþ *p β*ð Þ *p ν*ð Þ¼ *p f*ð Þ *p* ð Þ *p*∈*Γ ,* (36) *A*ð Þ *p Φ*ð Þþ *p β*ð Þ *p V*ð Þ¼ *p F*ð Þ *p* ð Þ *p*∈*Γ :* (37)

^*<sup>Γ</sup>* � *LEΓν*^*Γ,* (38)

^*<sup>Γ</sup>* � *<sup>L</sup>ΓΓν*^*Γ,* (39)

*ΓΓν*^*Γ:* (40)

*<sup>δ</sup>*ð Þ¼ *<sup>p</sup> <sup>φ</sup> <sup>p</sup>*<sup>þ</sup>

1 <sup>2</sup> *<sup>φ</sup> <sup>p</sup>*<sup>þ</sup>

*<sup>ν</sup>*ð Þ¼ *<sup>p</sup> <sup>v</sup> <sup>p</sup>*<sup>þ</sup>

1 <sup>2</sup> *<sup>v</sup> <sup>p</sup>*<sup>þ</sup>

The boundary condition may be expressed in the following form:

*φ*^*<sup>E</sup>* ¼ *MEΓδ*

*<sup>Φ</sup>*^ *<sup>Γ</sup>* <sup>¼</sup> *<sup>M</sup>ΓΓδ*

*V*b *<sup>Γ</sup>* ¼ *NΓΓδ*

LSEMA routine is demonstrated through solving a test problem.

^*<sup>Γ</sup>* � *<sup>M</sup><sup>t</sup>*

The LSEMA subroutine computes the solution of Laplace's equation surrounding thin shells or discontinuities. As with the LBEMA, the subroutine relies on L3ALC to compute the matrix components in the systems (38)–(40). In this subsection, the

*Φ*ð Þ¼ *p*

*V*ð Þ¼ *p*

The discrete equivalents of Eq. (21) are as follows:

**4.2 LSEMA module, test problem and results**

the surface:

*A hemispherical shell.*

**Figure 2.**

**13**

The results at four interior points are given in **Table 4**.

The exterior test problem is that of a unit sphere approximated by 36 triangular panels, as in the previous test. The exact solution that is applied as a Dirichlet boundary condition is

$$
\rho = \frac{1}{r},
\tag{28}
$$

where *r* is the distance from 0ð Þ *;* 0*;* 0*:*5 *:* The results at four exterior points are given in **Table 5**.
