• Keine Ergebnisse gefunden

Implementation in the Software Package ESPResSo

3 Enhanced Fully-Coupled Modeling of Air Filtration Processes

0 0.5 1 1.5 2 2.5

−3

−2

−1 0 1

distancekrk/ [x]

q1= 8 [q], q2=−6 [q]

UCin [E]

FCin[E]/[x]

Figure 3.7: Example of an attractive Coulomb potentialUC and the resulting Coulomb force valueFC over the distancekrkbetween the interacting point charges. The values for the charges are arbitrarily chosen as q1= 8 [q]andq2=−6 [q]. All information is given in the reduced units defined in Tab. 3.1.

Since the potential is approaching zero very slowly (∝krk1 ), the Coulomb energy is referred to as a long-range potential. Hence, it is effective and must be considered even for large distances. Besides the slow decay, the Coulomb potential is singular atkrk= 0. As a result, it is difficult to handle in terms of computational effort.

The algorithm used in the software package ESPResSo is explained in the following section.

By assigning charges to the auxiliary fiber particles introduced in Fig. 3.6, the method offers the possibility of arbitrarily distributing electrostatic fiber charges.

Hence, electrostatic fiber-particle interactions can be taken into account in addition to particle-particle interactions.

3.3 Implementation in the Software Package ESPResSo

By means of coarse-graining, ESPResSo enables simulations with diverse length scales on a mesoscopic level. That also allows for yoking molecules together to dust particles in the size of micrometers as they occur in real aerosols used for testing air filter media. Therefore, ESPResSo does not specify a defined system of units, but allows the user to choose suitable length, time and energy scales. All remaining units such as the mass and electrostatic charge scale are derived from these three basic choices. Table 3.1 presents the system of so-called reduced units used in this work.

reduced unit SI unit

Length scale [x] 1·10−5m

Time scale [t] 1·10−6s

Energy scale [E] 1.76·10−8J

Mass scale [m] 1.76·10−10kg

Electrostatic charge scale [q] 1.60·10−19C Table 3.1: Specification of the reduced units used in this work.

The following paragraphs provide an insight into the specific implementation of the LBM, the short-range MD and long-range electrostatic MD interactions.

LBM in ESPResSo. The software package ESPResSo uses a D3Q19 model as presented in Fig. 3.2 for discretization. The fluid particle densitiesfiin Eq. (3.2) are located in the cell centers of the lattice. Different collision operators are available to relax the velocity populations towards their equilibrium distributionfieq. In addition to the simple BGK model where all velocity components are relaxed linearly with the same relaxation parameter, a multiple relaxation concept (MRT) is implemented [5]. It allows defining individual relaxation parameters for different linear combinations of the velocity populations [55]. This way, the fixed ratio between shear and bulk viscosity from the BGK model are overcome.

For modeling the flow domain and obstacles in the domain, the software package ESPResSo provides different shapes such as spheres, cylinders or walls. Moreover, ESPResSo allows importing external files to simulate hydrodynamics in more com-plex geometries such as filter structures. Zero velocity boundaries are implemented

66

3 Enhanced Fully-Coupled Modeling of Air Filtration Processes

using the bounce back algorithm [114]. Setting movable LBM boundaries is also supported by adapting the reflected velocity populations [95].

Parallelization of the LBM is implemented via domain decomposition and the MPI communication interface. The subdomains are distributed among the respective CPU ranks. Besides the CPU version, ESPResSo can also employ GPU acceleration.

The implementation for a GPU uses the CUDA programming model [86].

Short-Range MD in ESPResSo. A direct calculation of all pairwise interac-tions requires a high computational effort ofO(N2), which increases quadratically with the number N of particles. In order to reduce the computational effort, ESPResSo applies different algorithms depending on the effective range of the potential energy. Short-range potentials have the advantage of decreasing very quickly with an increasing particle distancekrk. Ford-dimensional problems, short-range potentials consist of a linear combination of terms∝r1p withp > d[20].

This property allows considering the potential energy solely within a defined sphere with the radiusrcutoff. In combination with the linked-cell algorithm illustrated in Fig. 3.8, the computational effort is reduced to linear complexityO(N).

rcutoff

Figure 3.8: Schematic representation of the linked-cell algorithm. The interaction partners of the particle of interest are located in the so-called half-shell neighbored cells (red). By applying Newton’s third law, calculating the interactions with the particles located in the area marked in green can be omitted.

3.3 Implementation in the Software Package ESPResSo

The idea of the algorithm is to sort all particles into cubic cells with the edge lengthrcutoff according to their spatial position. Applying Newton’s third law, each pairwise particle interaction has to be calculated only once. Therefore, the consideration of interaction partners in half of the neighboring cells (half-shell neighbors) is sufficient for the force calculation. This further reduces the computational effort. In order to parallelize the linked-cell algorithm, the cells are subdivided equally among the respective ranks. Cuboid sub-volumes are used for the domain decomposition.

The implementation of long-range potentials is presented specifically in the following section using the example of electrostatic particle interactions.

Electrostatics in ESPResSo. The long-range Coulomb potential introduced in Sec. 3.2.3 is slowly decaying withkrkand, therefore, must not be cut off. To calculate the computationally very expensive electrostatic interactions, ESPResSo uses the particle-particle-particle mesh (P3M) algorithm [21, 64] initially proposed by Hockney and Eastwood [43]. The algorithm is based on the Ewald summation, in which the calculation of the Coulomb energy is split into two parts with

1

krk= f(krk)

| {z }krk

long−range

+1−f(krk)

| krk{z }

short−range

, (3.13)

wheref is the Gaussian error functionerfand(1−f)is the complementary error functionerf c[25]. The short-range particle-particle (P2) potential can be tackled in real space based on a cutoff radius and the linked-cell algorithm introduced above. The long-range potential is handled in Fourier space. In this particle-mesh (PM) method, the particles or charge points are interpolated onto a grid. If the long-range part is smooth everywhere and regular at the origin, the summation over all particle pairs can be replaced by pointwise multiplication in Fourier space.

The separate consideration of the singularity at each particle position and the slow decay for large distances solves both challenges. TheP3Malgorithm leads to a very high accuracy and a computational effort ofO(N logN)[25, 26]. Thus, the method scales nearly linear with the numberN of particles.

68

3 Enhanced Fully-Coupled Modeling of Air Filtration Processes