Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Boundary Element Methods for Engineers:

Part I: Potential Problems

Boundary Element Analysis of Potential Problems

3 Constant Boundary Element


Program for Potential Problems
In this chapter a computer program to implement the constant boundary element formulation for twodimensional potential problems developed in Chapter 2 is presented and described in detail. It is then
used to solve some typical problems to demonstrate the capabilities of the method, particularly problems
where exact analytical solutions are available for direct comparison.
The programming language used is Fortran, whose name is derived from Formula translation, and which
is particularly suitable for engineering and scientific applications. Despite being somewhat unfashionable,
the fact remains that the majority of engineering computer programs currently in use are written in
Fortran. The programs presented here were run using a Fortran 95 compiler. While more recent versions
of Fortran have been published, the enhancements they offer are not of significance to the type of simple
programming of numerical computation procedures employed here.
For readers who prefer to use Matlab, a translation is provided in Appendix C.
Digital computers, whether desktop or laptop, work in binary arithmetic. Both numbers and characters
are represented and stored as a number of binary digits or bits, and these bits are grouped together in
bytes (1 byte = 8 bits). Individual numbers are usually represented by either 32 bits (4 bytes) or 64 bits
(8 bytes) depending on both the computer and whether the double precision option is selected in the
Fortran program. If the number of bits is small the precision of stored numbers is relatively low and
significant roundoff errors may be accumulated in the course of a calculation, depending on the method
of calculation used. All the case studies described in this book were run using 64-bit number storage.
The style of writing programs should be such as to make the coding straightforward to follow and
check, and at the same time efficient in terms of execution time and memory. With these requirements
in mind the programs in this book use variable names which are readily identifiable with the physical
or mathematical quantities they represent. Whenever possible the same names are used throughout,
their definitions being listed at the beginning of the book. The programs are divided into relatively short
subprograms which can be written, developed and tested separately. Also, comment statements are used
liberally, both to explain the coding and to separate successive sets of statements for improved readability.
For the same reason, a uniform system of statement numbering is used within each subprogram, input
and output FORMAT statements being numbered from 51 and 61 respectively. This last convention is a
hangover from the Fortran tradition in which the (magnetic tape) unit number for input was 5, while that
for output was 6, the same digits being used to start the corresponding FORMAT statement numbers.

71
Download free eBooks at bookboon.com

You might also like