4.2.1: Motivation
Now that we have a BEM solver in place, we need to provide it with discretized boundary systems. The task of constructing a navigable and discretizable geometry is deceptively tricky: one must strike a balance between a faithful representation of the system to be modeled and a generated system that is computationally approachable. Additionally, the modeling software must be sufficiently flexible to work in concert with our BEM solver, allowing for seamless integration into larger, more complex simulation software. There are many preexisting software packages designed to accomplish the goals of navigation and discretization (various CAD modeling applications, CGAL (53), and Gmsh (40), for example). After considering the implementation of an external geometry package, we were unable to find available software that provided us with the right amount of control over the generated mesh that would be easily implementable into a larger simulation framework. To solve this problem, we have constructed geometry modeling software in C++ calledKGeoBag.
4.2.2: Overview
KGeoBag is a software package for designing generic 3-dimensional models for physics simulations, and
has been designed around the fundamental concept of providing users with the ability to naturally extend its functionality to suit their needs by the use of extensible C++ templates. The underlying idea behind
KGeoBag is straightforward: in order to construct a model, we first decompose it into parametrically
defined shapes that are geometrically easy to describe. We then provide navigation and discretization methods for each of these shapes. Finally, we compose our systems from a discrete set of these shapes, and assign user-defined information to each shape (e.g. BEM boundary type and value, visualization color, etc.). The description of the shapes, parameters and other information that comprise our system can be constructed directly in C++, or can be provided as inputs in an XML document.
The active elements of a KGeoBag geometry are KGSurfaces and KGSpaces. Instances of these two
element types are associated with one of a multitude of KGAreas and KGVolumes, respectively. Conceptu- ally, a KGArea and KGVolume provide a description of the physical aspects of a shape, while a KGSurface
and KGSpace represent the actual implementation of these shapes in a simulation. Instances of KGSpace
and KGSurfacecan be placed within a parent KGSpaceto form a recursive geometry tree, facilitating the construction of complex geometry assemblies while maintaining a minimal memory footprint.
An important feature ofKGeoBag that applies to its implementation as an input generator forKEM-
derivation of the BEM in Chapter 2 implies a constant solution value across each of our discretized ele- ments. It is therefore critical that the size of our discretized elements conform to our solution profile. In the case of electrostatics, we knowa priori that charge densities vary most greatly near sharp gradients in a surface’s curvature (e.g. surface edges, sharp corners, etc.). The discretization of surfaces inKGeoBag
is therefore parametrized to facilitate a reduction in element size near surface edges. This provides us with tunable parameters with which we can tailor the generated mesh specifically for use in the electrostatic BEM computation.
Section 4.3: Conclusion
KEMField is a software package written in C++ designed to implement the BEM as described in
Chapters 2 and 3, and subsequently compute the associated scalar and vector fields in all space. While its primary use-case is the application to electrostatic simulations,KEMField exploits the extensibility of
C++ templates to provide a natural extension to a broad range of BEM physics simulations. Additionally,
KEMField has been designed to non-intrusively incorporate third-party software to enable users to easily
extend its available features. This aspect of its design is successfully demonstrated by the incorporation of hybrid CPU and GPU-enabled parallel acceleration techniques to facilitate the application of the BEM to large-scale simulations, and by the inclusion of the geometry modeling software KGeoBag to model
sophisticated problems in electrostatics. Both KEMField and KGeoBag are currently in use by the
KATRIN collaboration to model the complex electrostatic and magnetostatic fields intrinsic to its mass spectrometers and detector system, described in greater detail in Chapter 5.
CHAPTER 5: Development and Application of Simulation Software for the KATRIN Experiment
Section 5.1: Introduction
Figure 5.1: A side-by-side comparison of a photograph looking downstream inside KATRIN’s main spec- trometer (left) and its representation inKGeoBag(right).
Electrostatics and magnetostatics play critical roles in the tasks of particle transport, mass spectroscopy and background suppression in the KATRIN experiment. As a consequence, we have devoted a large amount of time and effort towards acquiring a deep understanding of the electromagnetic fields throughout the entire KATRIN assembly, from both a computational and experimental viewpoint. This chapter describes some of the work that has been performed to simulate the electromagnetic fields present in KATRIN’s focal plane detector (FPD) system and main spectrometer, and to understand the effects these fields may have on the efficacy of the experiment’s scientific goals.