We have successfully developed a generalized-geometry Boundary Element Method (BEM) technique for calculating vacuum magnetic fields and vector potentials in three dimensions by solving the boundary integral equations associated with the vector Laplace equation for fields or potentials. The technique is similar to an earlier technique that demonstrated solution of 3-D magnetostatic magnetic vector potentials 1 , but significantly extends the capability. The primary advantages of the chosen approach are the reduction of the dimensionality of the problem from three to two dimensions, and the avoidance of wasteful computation of fields and potentials away from conductor surfaces of interest. The resulting code can either be employed standalone, for design purposes, or in combination with existing magneto-hydrodynamic (MHD) or static magnetic diffusion codes based on finite-difference, finite-volume, finiteelement, or even time-domain BEM techniques. In this paper we describe the technique and show representative computational results for sample threedimensional benchmark problems.
The Boundary Element Method (BEM) lends itself well to an object-oriented implementation. Well-defined class hierarchies can reduce the size of a problem solution while improving the readability and maintainability of the solution. The BEM uses geometric elements, defined as collections of nodes, to model a surface. Boundary conditions, specified by the problem, are defined at each node. This suggests an object oriented solution that defines a base Element class that can be extended to define triangular elements and quadrilateral elements, and a base Node class that can be extended to define more specialized nodes, such as edge and corner nodes. Historically, BEM codes have been written in FORTRAN 90 and object oriented codes have been deemed too slow for such computationally intensive solutions. In this paper I will discuss the development and optimization of an object-oriented BEM code, written in C++, for solving the vector Laplace equation for the magnetic vector potential in three dimensions. The solution to the 3-D magnetic field problem was first written and tested in FORTRAN 90. Due to the complexity and size of the problem solution, the translation to C++ went through several stages. At each stage the code was tested for accuracy and speed. After optimization of the C++ code, which included optimization of memory allocation, optimization of class structures, optimization of functions required to build the discretized linear system of equations and optimization of the solver, the C++ code executed faster than the FORTRAN 90 code for all test problems.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.