3.6  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 in Subsection 3.5.2 for the problem where the boundary is a circle and the results are given.

3.6.1  Background Methods

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
}DG'(p) =

 G0(p,q)   dSq  ,

{ N0
}DG'(p; vp) =

(p,q)  dSq   ,
where DG' is a straight line element, p DG' (though not on an edge or corner of the element). Let it be assumed that the element DG' has length a+b with q = q(x) and p = q(0) for x [-a,b]. This gives the following formulae for (41) and (42).

{ L0
}DG'(p) = 1
2 p
[ a + b - a loga -b logb ] ,

{ N0
}DG'(p; vp) = - 1
2 p
[ 1
+ 1
] .

3.6.2  Subroutine L2LC

In this section the subroutine L2LC is introduced and demonstrated through the test problem L2LC_T .

3.6.3  Test Problem and Results

The program in file L2LC_T.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 particular test problem consists of a circle of radius 1, approximated by 64 elements. An 8 point Gaussian quadrature rule is used to compute the discrete integrals. A Dirichlet boundary condition is applied such that f(p) = cos(q) = p2. This has the analytic solution f(p) = r cos(q) = p2.

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.

Return to boundary-element-method.com/laplace
Return to boundary-element-method.com