An SPH framework for fluid–solid and contact interaction problems including thermo-mechanical coupling and reversible phase transitions

The present work proposes an approach for fluid–solid and contact interaction problems including thermo-mechanical coupling and reversible phase transitions. The solid field is assumed to consist of several arbitrarily-shaped, undeformable but mobile rigid bodies, that are evolved in time individually and allowed to get into mechanical contact with each other. The fluid field generally consists of multiple liquid or gas phases. All fields are spatially discretized using the method of smoothed particle hydrodynamics (SPH). This approach is especially suitable in the context of continually changing interface topologies and dynamic phase transitions without the need for additional methodological and computational effort for interface tracking as compared to mesh- or grid-based methods. Proposing a concept for the parallelization of the computational framework, in particular concerning a computationally efficient evaluation of rigid body motion, is an essential part of this work. Finally, the accuracy and robustness of the proposed framework is demonstrated by several numerical examples in two and three dimensions, involving multiple rigid bodies, two-phase flow, and reversible phase transitions, with a focus on two potential application scenarios in the fields of engineering and biomechanics: powder bed fusion additive manufacturing (PBFAM) and disintegration of food boluses in the human stomach. The efficiency of the parallel computational framework is demonstrated by a strong scaling analysis.


Introduction
In many applications in science and engineering, like for example in some areas of biomechanics, fluid-solid and contact interaction problems characterized by a large number of solid bodies immersed in a fluid flow and undergoing reversible phase transitions, are of great interest. Often, explicitly considering the deformation of solid bodies can be neglected, which reduces the complexity of the problem to the treatment of unde-formable but mobile rigid bodies, in favor of simplified modeling. Most current mesh-or grid-based methods, e.g., the finite element method (FEM), the finite difference method (FDM), or the finite volume method (FVM), require substantial methodological and computational efforts to model the motion of rigid bodies in fluid flow. To overcome those issues, several approaches, e.g., based on the particle finite element method (PFEM) [1][2][3], on the discrete element method (DEM) [4][5][6][7], or on smoothed particle hydrodynamics (SPH) [8][9][10][11][12][13][14], have been proposed. SPH as a mesh-free discretization scheme is, due to its Lagrangian nature, very well suited for flow problems involving multiple phases, dynamic and reversible phase transitions, and complex interface topologies. This makes SPH very appropriate for a wide range of applications in engineering, e.g., in metal additive manufacturing melt pool modeling [15,16], or in biomechanics, e.g., for modeling the digestion of food in the human stomach [17]. For the former application, an SPH formulation for thermo-capillary phase transition problems involving solid, liquid, and gaseous phases has recently been proposed [18], amongst others, focusing on evaporation-induced recoil pressure forces, temperature-dependent surface tension and wetting forces, Gaussian laser beam heat sources, and evaporation-induced heat losses. However, for simplicity, this and also other current state-of-the-art approaches, e.g., [19,20] are restricted to immobile powder grains.
All aforementioned SPH formulations for modeling rigid body motion in fluid flow have in common, that rigid bodies are fully resolved, that is spatially discretized as clusters of particles. It is generally accepted that advanced boundary particle methods, e.g., based on the extrapolation of field quantities from fluid to boundary particles [21][22][23], are beneficial, because one can model the fluid field close to the boundary with high accuracy. In many of the aforementioned applications, an exact representation of the fluid-solid interface plays an important role. Therefore, herein a formulation of this kind proposed in [23] is utilized. To the best of the authors' knowledge none of the aforementioned SPH formulations modeling rigid body motion in fluid flow simultaneously consider thermal conduction, reversible phase transitions, and multiple (liquid and gas) phases.
To help close this gap, this contribution proposes a fully resolved smoothed particle hydrodynamics framework for fluid-solid and contact interaction problems including thermo-mechanical coupling and reversible phase transitions. The solid field is assumed to consist of several arbitrarily-shaped, undeformable but mobile rigid bodies, that are evolved in time individually. Based on a temperature field, provided by solving the heat equation, reversible phase transitions, i.e., melting and solidification, are evaluated between the fluid and the solid field. As a result, the shape and the total number of rigid bodies may vary over time. In addition, contact between rigid bodies is considered by employing a spring-dashpot model. Note that some characteristic phenomena for thermocapillary flow [24,25] and, especially, for metal PBFAM melt pool modeling [18][19][20][26][27][28] are not addressed in this work, thus, referring to the literature.
While parallel implementation aspects along with detailed scalability studies are not in the focus of the aforementioned references, in this work, a concept for the parallelization of the computational framework is proposed, setting the focus in particular on an efficient evaluation of rigid body motion. The parallel behavior is demonstrated, confirming that detailed studies at a large scale become possible. It shall be noted, that the parallel implementation of such a computational framework is far from trivial but indispensable when examining numerical examples that are of practical relevance. Note that the introduced concept for the parallelization of the computational framework is applicable not only when using SPH as a discretization scheme, but also for other particle-based methods, e.g., discrete element method (DEM), or molecular dynamics (MD). The remainder of this work is organized as follows: To begin with, the governing equations for a fluid-solid and contact interaction problem including thermo-mechanical coupling and reversible phase transition are outlined. Next, the numerical methods are presented and the details of the computational framework are discussed. Finally, the accuracy and robustness of the proposed formulation is demonstrated by several numerical examples.

Governing equations
Consider a domain of a fluid-solid interaction problem that consists at each time t ∈ [0, T ] of the non-overlapping fluid domain f and solid domain s that share a common interface fs , with = f ∪ s and f ∩ s = fs . In general, the fluid domain f may consist of multiple (liquid and gas) phases. For ease of notation, in the following it will not be distinguished between the different fluid phases. The solid domain s is composed of several non-overlapping sub-domains s k , which represent rigid bodies k, such that s = k s k . In the event of contact between two rigid bodies k andk, a common interface ss k,k = s k ∩ sk exists, separating the two solid sub-domains s k and sk . A detailed illustration of the problem is given in Fig. 1. In the following the (standard) governing equations of the fluid and the solid field as well as the respective coupling conditions are briefly given. In addition, reversible phase transitions between the fluid and the solid field, e.g., temperature-induced melting and solidification, may occur. For this reason, the temperature field is modeled solving the heat equation.

Fluid field
The fluid field is governed by the instationary Navier-Stokes equations in the domain f , which consist in convective form of the mass continuity equation and the momentum equation with viscous force f ν and body force b f each per unit mass. For a Newtonian fluid the viscous force is f ν = ν f ∇ 2 u f with kinematic viscosity ν f . The mass continuity equation (1) and the momentum equation (2) represent a system of d + 1 equations with the d + 2 unknowns, velocity u f , density ρ f , and pressure p f , in d-dimensional space. The system of equations is closed with an equation of state p f = p f (ρ f ) relating fluid density ρ f and pressure p f . The Navier-Stokes equations (1) and (2) are subject to the following initial conditions with initial density ρ f 0 and initial velocity u f 0 . In addition, Dirichlet and Neumann boundary conditions are applied on the fluid boundary f = ∂ f \ fs resembling a no-slip boundary condition and ensuring equilibrium of fluid and solid traction across the interface fs . Herein, u fs k and t fs k denote the velocity respectively traction of a rigid body k on the fluid-solid interface fs k .

Solid field
The solid field is assumed to consist of several mobile rigid bodies k each represented by a sub-domain s k embedded in the fluid domain f . Thus, the interface of a rigid body k with contacting rigid bodiesk, cf. Fig. 1. The kinematics of each rigid body k are uniquely defined by three respectively six degrees of freedom in two-and three-dimensional space, i.e., the position of the center of mass r s k and the orientation ψ s k . As a result, the equations of motion of an individual rigid body k are described by the balance of linear and angular momentum . Finally, the body force b s k given per unit mass is contributing to the balance of linear momentum.

Remark 2
The orientation ψ s k is expressed by a (pseudo-)vector whose direction and magnitude represent the axis and angle of rotation. Note that in general, the angular velocity ω s k of a rigid body k is different from the time derivative of the orientation ψ s k , i.e., ω s k = dψ s k /dt, due to the non-additivity of large rotations [29][30][31][32]. Direct evolution of the orientation ψ s k of a rigid body k requires a special class of time integration schemes, so-called Lie group time integrators [33,34].

Thermal conduction
Thermal conduction in the combined fluid and solid domain = f ∪ s in the absence of heat sources or heat sinks (which are neglected herein for simplicity) is governed by the heat equation with temperature T and heat flux q = −κ φ ∇T . The material parameters heat capacity c φ p and thermal conductivity κ φ are in general different for fluid and solid field, and hence for clarity are denoted by the index (·) φ with φ ∈ {f, s}. The heat equation (8) is subject to the following initial condition with initial temperature T 0 . In addition, Dirichlet and Neumann boundary conditions are required on the domain boundary = ∂ T =T on D and q =q on N , with prescribed boundary temperatureT and boundary heat fluxq, where = D ∪ N and D ∩ N = ∅.

Reversible phase transition
Reversible phase transitions, i.e., melting and solidification, are considered between the solid and the fluid field. Within this publication, solid material points that exceed a transition temperature T t undergo a phase transition to a fluid material point and vice versa, cf. Remark 3. Consequently, the shape of a rigid body k, i.e., its sub-domain s k , is changing due to a loss or gain of material points resulting in a varying mass m k , center of mass position r k , and mass moment of inertia I k .
Remark 3 For the sake of simplicity, only temperature-independent parameters are considered herein, and latent heat is neglected. Latent heat could be included by an apparent capacity scheme relying on an increased heat capacity c p within a finite temperature interval [35] in a straightforward manner.

Remark 4
The proposed framework is general enough to model also chemically-induced phase transitions based on a concentration field. For this purpose, the diffusion equation dC/dt = 1/ρ φ ∇(D φ ∇C) with diffusivity D φ modeling the transport of a concentration C is solved. Considering the similarity between the heat equation (8) and the diffusion equation, the latter can be discretized following a similar SPH discretization [36,37] as applied for the heat equation. Similarly, modeling phase transitions a transition concentration C t is defined.

Numerical methods and parallel computational framework
This section presents the methods applied for discretization and numerical solution of fluid-solid and contact interaction problems including thermo-mechanical coupling and reversible phase transitions. The presented parallel computational framework is implemented in the in-house parallel multiphysics research code BACI (Bavarian Advanced Computational Initiative) [38] using the Message Passing Interface (MPI) for distributedmemory parallel programming.

Spatial discretization via smoothed particle hydrodynamics
For the spatial discretization smoothed particle hydrodynamics (SPH) is used, allowing for a straightforward particle-based evaluation of fluid-solid coupling conditions. In the following, the basics of this method are recapitulated briefly.

Approximation of field quantities applying a smoothing kernel
The fundamental concept of SPH is based on the approximation of a field quantity f via a smoothing operation and on the discretization of the domain with discretization points, so-called particles j, each occupying a volume V j . Introducing a smoothing kernel W (r, h) that fulfills certain consistency properties [36,39], cf. Remark 5, leads to an approximation of the field quantity f based on summation of contributions from all particles j in the domain which includes a smoothing error and a discretization error [40].

Remark 5
The smoothing kernel W (r, h) is a monotonically decreasing, smooth function that depends on a distance r and a smoothing length h. The smoothing length h together with a scaling factor κ define the support radius r c = κh of the smoothing kernel. Compact support, i.e., W (r, h) = 0 for r > r c , as well as positivity, i.e., W (r, h) ≥ 0 for r ≤ r c , are typical properties of standard smoothing kernels W (r, h). In addition, the normalization property requires that W (|r − r |, h)dr = 1. The Dirac delta function property lim h→0 W (r, h) = δ(r) ensures an exact representation of a field quantity f in the limit h → 0.
A straightforward approach in SPH to determine the gradient of a quantity f follows directly by differentiation of (11) resulting in Note that this (simple) gradient approximation shows some particular disadvantages. Hence, more advanced approximations for gradients are given in the literature [36] and will also be applied in the following. In sum, the concept of SPH allows to reduce partial differential equations to a system of coupled ordinary differential equations (with as many equations as particles) that is solved in the domain . Thereby, all field quantities are evaluated at and associated with particle positions, meaning each particle carries its corresponding field quantities. Finally, in a post-processing step a continuous field quantity f is recovered from the discrete quantities f (r j ) of particles j in the domain using the approximation (11) and the commonly known Shepard filter Note that the denominator typically takes on values close to one inside the fluid domain and is mainly relevant for boundary regions with reduced support due to a lack of neighboring particles.

Remark 6
In the following, a quantity f evaluated for particle i at position r i is written as f i = f (r i ). The short notation W ij = W (r ij , h) denotes the smoothing kernel W evaluated for particle i at position r i with neighboring particle j at position r j , where r ij = |r ij | = |r i − r j | is the absolute distance between particles i and j. The derivative of the smoothing kernel W with respect to the absolute distance r ij is denoted by ∂W /∂r ij = ∂W (r ij , h)/∂r ij .

Remark 7
Herein, a quintic spline smoothing kernel W (r, h) as defined in [21] with smoothing length h and compact support of the smoothing kernel with support radius r c = κh and scaling factor κ = 3 is used.

Initial particle spacing
Within this contribution, the domain is initially filled with particles located on a regular grid with particle spacing x, thus in the d-dimensional space each particle initially occupies an effective volume V eff = ( x) d . A particle in the fluid domain f is called a fluid particle i, whereas a particle in the solid domain s k of a rigid body k is called a rigid particle r. It follows, that each rigid body is fully resolved being spatially discretized as clusters of particles. Naturally, the choice of the particle spacing x influences the accuracy of the interface representation between fluid and solid domain. The mass of a particle is initially assigned using the reference density of the respective phase, i.e., ρ f 0 for the fluid phase and ρ s 0 for the solid phase, and the effective volume V eff .
Remark 8 Within this work, the smoothing length h of the smoothing kernel W (r, h), cf. Remark 7, is set equal to the initial particle spacing x. Consequently, in a convergence analysis with decreasing particle spacing x the ratio x/h remains constant [40].

Parallelization via spatial decomposition of the domain
For the problems studied herein, an efficient parallel computational framework capable of handling systems constituted of a large number of particles is required. This requires addressing in particular two aspects, namely, an efficient particle neighbor pair detection, and a parallel load distribution strategy while keeping the communication overhead at an acceptable level. In the literature, several approaches for parallel computational frameworks utilizing particle-based methods have been proposed, e.g., [41][42][43][44][45][46][47]. In the present work, a spatial decomposition approach with neighbor pair detection utilizing a combination of cell-linked lists and Verlet-lists based on [42] is applied. The general idea of the spatial decomposition approach is briefly explained in the following, however, for detailed information, the interested reader is referred to the original publication [42]. In addition, the concept is extended herein to consider the motion of rigid bodies spatially discretized as clusters of particles. The evaluation of particle interactions in SPH requires knowledge of neighboring particles within a geometrically limited interaction distance, i.e., within the support radius r c of the smoothing kernel. Thus, the computational domain is divided into several cubic cells forming a uniform lattice, while each particle is uniquely assigned to one of those cells according to its current spatial position, cf. Fig. 2. The size of the cells is chosen such that neighboring particles are either located in the same cell or in adjacent cells, i.e., the size of the cells is at least equal to the support radius r c of the smoothing kernel.
Following a spatial decomposition approach, the cells together with assigned particles are distributed over all involved processors, i.e., forming so-called processor domains. To keep the computational load balanced between all processors and to minimize the communication overhead, cubic processor domains are defined such that each contains (nearly) the same number of particles. The cells occupied by each processor are called owned cells. On each processor the position of particles located in its processor domain, i.e., the position of so-called owned particles, is evolved. This requires the evaluation of interactions of owned particles with their neighboring particles. However, the correct evaluation of particle interactions close to processor domain boundaries requires that each processor has information not only about its owned particles but also about particles in cells adjacent to its processor domain. To this end, each processor is provided full information not only about its own domain but additionally about a layer of ghosted cells (with ghosted particles) around its own domain. Keeping the information about ghosted cells and particles continuously updated requires communication between processors.

Remark 9
To exemplify the cost of communication overhead, consider a perfectly cubic processor domain occupying n o owned cells. Consequently, assuming one layer of ghosted cells surrounding the processor domain, a total of n g = ( 3 √ n o + 2) 3 − n o cells are ghosted. That is, the communication overhead scales with the ratio n g /n o of ghosted cells n g to owned cells n o . Furthermore, the (average) number of particles per cell, and, consequently, also the communication overhead, scale with the ratio r c / x of the support radius r c and the initial particle spacing x.
As a consequence of the spatial decomposition approach, the affiliated rigid particles r of a rigid body k might be distributed over several processors, cf. Fig. 2. However, note that the balance of linear and angular momentum, cf. Eqs. (6)- (7), describing the motion of a rigid body k are given with respect to the center of mass position r s k . Thus, the evaluation of mass quantities, i.e., mass m k , center of mass position r s k , and mass moment of inertia I k , as well as the evaluation of resultant force f k and torque m k acting on a rigid body k, requires special communication between all processors hosting rigid particles r belonging to rigid body k and the single processor owning rigid body k.

Modeling fluid flow using weakly compressible SPH
For modeling fluid flow using SPH, several different formulations each with its own characteristics and benefits can be derived. Here, the instationary Navier-Stokes equations (1) and (2) are discretized by a weakly compressible approach [36,39,48]. This section gives a brief overview of this formulation applied already in [18,49]. For ease of notation, in the following the index (·) f denoting fluid quantities is dropped.

Density summation
The density of a particle i is determined via summation of the respective smoothing kernel contributions of all neighboring particles j within the support radius r c (14) with mass m i of particle i. This approach is typically denoted as density summation and results in an exact conservation of mass in the fluid domain, which can be shown in a straightforward manner considering the commonly applied normalization of the smoothing kernel to unity. It shall be noted that the density field may alternatively be obtained by discretization and integration of the mass continuity equation (1) [39].

Momentum equation
The momentum equation (2) is discretized following [23,50] including a transport velocity formulation to suppress the problem of tensile instability. It will be briefly recapitulated in the following. The transport velocity formulation relies on a constant background pressure p b that is applied to all particles and results in a contribution to the particle accelerations for in general disordered particle distributions. However, these additional acceleration contributions vanish for particle distributions fulfilling the partition of unity of the smoothing kernel, thus fostering these desirable configurations. For the sake of brevity, the definition of the modified advection velocity and the additional terms in the momentum equation from the aforementioned transport velocity formulation are not discussed in the following and the reader is referred to the original publication [50]. Altogether, the acceleration a i = du i /dt of a particle i results from summation of all acceleration contributions due to interaction with neighboring particles j and a body force as and density-weighted inter-particle averaged pressure and interparticle averaged viscositỹ In the following, the acceleration contribution of a neighboring particle j to particle i is, for ease of notation, denoted as a ij , where a i = j a ij + b i . The above given momentum equation (15) exactly conserves linear momentum due to pairwise anti-symmetric particle forces which follows from the property ∂W /∂r ij = ∂W /∂r ji of the smoothing kernel.

Equation of state
Following a weakly compressible approach, the density ρ i and pressure p i of a particle i are linked via the equation of state with reference density ρ 0 , reference pressure p 0 = ρ 0 c 2 and artificial speed of sound c. Note that this commonly applied approach can only capture deviations from the reference pressure, i.e., p i (ρ 0 ) = 0, and not the total pressure. To limit density fluctuations to an acceptable level, while still avoiding too severe time step restrictions, cf. Eq. (41), strategies are discussed in [21] how to choose a reasonable value for the artificial speed of sound c. Accordingly, in this work the artificial speed of sound c is set allowing an average density variation of approximately 1%.

Boundary and coupling conditions
Herein, both rigid wall boundary conditions as well as rigid body coupling conditions, are modeled following [23]. In the former case, at least q = floor(r c / x) layers of boundary particles b are placed parallel to the fluid boundary f D with a distance of x/2 outside of the fluid domain f in order to maintain full support of the smoothing kernel. In the latter case, rigid particles r of rigid bodies k are considered, while naturally describing the fluid-solid interface fs . In both cases, a boundary particle b or a rigid particle r contribute to the density summation (14) and to the momentum equation (15) evaluated for a fluid particle i considered as neighboring particle j. The respective quantities of boundary Fig. 3 Orientation of a rigid body k with rigid particles r and their relative position r rk described via a unit quaternion q k at different times particles b respectively rigid particles r are extrapolated from the fluid field based on a local force balance as described in [23]. Consequently, striving for conservation of linear momentum, cf. Eq. (17), the force acting on a rigid particle r stemming from interaction with fluid particle i, cf. Eq. (15), is given as Remark 10 The floor operator is defined by floor(x) := max {k ∈ Z | k ≤ x} and returns the largest integer that is less than or equal to its argument x.

Modeling the motion of rigid bodies discretized by particles
Within this formulation, each rigid body k is composed of several rigid particles r that are fixed relative to a rigid body frame, i.e., there is no relative motion among rigid particles of a rigid body. Thus, the rigid particles of a rigid body are not evolved in time individually, but follow the motion of the rigid body described by the balance of linear and angular momentum, cf. Eqs. (6)- (7). As a consequence of the spatial decomposition approach, special communication between all processors hosting rigid particles r of a rigid body k in terms of the evaluation of mass quantities, or resultant forces and torques, is required. For ease of notation, in the following the index (·) s denoting solid quantities is dropped.

Orientation of rigid bodies
The orientation ψ k of a rigid body k, described by one respectively three degrees of freedom in two-and three-dimensional space, is previously introduced without explicitly defining a specific parameterization of the underlying rotation, e.g., via Euler angles or Rodriguez parameters. Moreover, as stated in Remark 2, explicit evolution of the orientation ψ k requires special Lie group time integrators. A straightforward approach to overcome aforementioned issues is to describe the orientation of a rigid body via quaternion algebra, cf. Remark 12. Consequently, in the following it is assumed that at all times the orientation ψ k of a rigid body k can be uniquely described by a unit quaternion q k , cf. Fig. 3. Once a local rigid body frame is defined, this allows to transform the relative position of rigid particles r rk , cf. Remark 11, from that rigid body frame to the reference frame, e.g., a global cartesian system.

Remark 11
Note that the relative position of rigid particles r rk expressed in the rigid body frame is, in general, a known (and constant) quantity, that only needs to be updated in case the center of mass position r k changes, i.e., due to phase transitions.

Remark 12
For the sake of brevity, the principals of quaternion algebra are not delineated herein. It remains the definition of operator • denoting quaternion multiplication as used in the following.

Parallel evaluation of mass-related quantities
In a first step, on each processor p the processor-wise mass p m k and center of mass position p r k of a rigid body k are computed as p m k = r m r and p r k = r m r r r r m r (20) considering the mass m r and position r r of all affiliated rigid particles r being located in the computational domain of processor p, cf. Fig. 4 for an illustration. Accordingly, the processor-wise mass moment of inertia p I k of a rigid body k follows componentwise (in index notation) as with mass m r and mass moment of inertia I r of a rigid particle r, cf. Remark 13, and Kronecker delta δ ij , cf. Remark 14. The computed processor-wise quantities, i.e., mass p m k , center of mass position p r k , and mass moment of inertia p I k , are communicated to the owning processor of rigid body k. In a second step, on the owning processor the total mass m k and center of mass position r k of rigid body k are computed over all processors p as m k = p p m k and r k = p p m k p r k p p m k (22) making use of the received processor-wise quantities. Similar to (21) the mass moment of inertia I k of rigid body k follows componentwise (in index notation) as again considering the received processor-wise quantities. Finally, the determined global quantities, i.e., mass m k , center of mass position r k , and mass moment of inertia I k , are communicated from the owning processor to all hosting processors of rigid body k.

Remark 13
The mass moment of inertia I r of a rigid particle r with mass m r is computed based on the effective volume V eff = ( x) d with initial particle spacing x.
In two-dimensional space (d = 2) assuming circular disk-shaped particles results in I r = 0.5m r r eff with effective radius r eff = x/ √ π. Accordingly, in three-dimensional space (d = 3) assuming spherical-shaped particles results in I r = 0.4m r r eff with effective radius r eff = 3 √ 0.75/π x.  21) and (23) to compute the mass

Remark 15
The computation of the mass moment of inertia, cf. Eqs. (21) respectively (23), is based on the Huygens-Steiner theorem, also called parallel axis theorem.

Parallel evaluation of resultant force and torque
To begin with, the resultant coupling and contact force acting on a rigid particle r of rigid body k is given as with coupling forces f ri stemming from interaction with neighboring fluid particles i, cf. Eq. (19), and contact forces f rr stemming from interaction with rigid particlesr of contacting rigid bodiesk, cf. Eq. (27). Similar to the computation of mass-related quantities as described previously, the resultant force f k and torque m k acting on a rigid body k are determined considering the parallel distribution of the affiliated rigid particles r on hosting processors p, cf. Fig. 4. Thus, in a first step the processor-wise resultant force p f k and torque p m k acting on rigid body k are computed as Remark 16 In the case of a computation on a single processor, the evaluation of mass m k , center of mass position r k , and mass moment of inertia I k of a rigid body k follow directly from Eqs. (20) and (21), while the resultant force f k and torque m k directly follow from Eq. (25), in each case without the need for special communication.

Contact evaluation between neighboring rigid bodies
For the modeling of frictionless contact between neighboring rigid bodies k andk, a contact normal force law based on a spring-dashpot model, similar to [29], is employed. The contact force is acting between pairs of neighboring rigid particles r andr of contacting rigid bodies, i.e., for distances r rr < x with r rr = |r rr | = |r r − rr|. Accordingly, the contact force acting on a particle r of rigid body k due to contact with a particler of neighboring rigid bodyk is given as with unit vector e rr = r rr /r rr , stiffness constant k c , and damping constant d c . The min operator in Eq. (27) ensures that only repulsive forces between the rigid particles are considered, also known as tension cut-off.

Remark 17
Contact between a rigid body k and a rigid wall is modeled similar to Eq. (27) considering rigid particles r of a rigid body k and boundary particles b of a discretized rigid wall.

Remark 18
The applied contact evaluation between rigid bodies is for simplicity based on a contact normal force law evaluated between rigid particles while neglecting frictional effects. Generally, following a macroscopic approach of contact mechanics with non-penetration constraint, the normal distance between the contacting bodies, typically determined via closest point projections, is the contact-relevant kinematic quantity. Accordingly, the concept applied in this work, can be interpreted as a microscale approach based on a repulsive/steric interaction potential [51] defined between pairs of rigid particles of contacting rigid bodies. In the current work, this approach has been chosen for reasons of simplicity and numerical robustness. An extension to a macroscale approach, i.e., a normal distance-based contact interaction [12,52,53], is possible in a straightforward manner. In addition, also a momentum-based energy tracking method [54] was recently applied for collision modeling of fully resolved rigid bodies [55,56].

Discretization of the heat equation using SPH
Thermal conduction in the combined fluid and solid domain governed by the heat equation (8) is discretized using smoothed particle hydrodynamics following a formulation proposed by Cleary and Monaghan [57] c p,a dT a dt with volume V b = m b /ρ b of particle b and temperature difference T ab = T a −T b between particle a and particle b. The discretization of the conductive term is especially suited for problems involving a different thermal conductivity among the fields [57]. In the equation above, the index (·) φ with φ ∈ {f, s} for fluid and solid field is dropped for ease of notation. Accordingly, the particles a and b may denote fluid particles i as well as rigid particles r, respectively.

Modeling thermally driven reversible phase transitions
Due to the Lagrangian nature of SPH, each (material) particle carries its phase information. This allows for direct evaluation of the discretized heat equation (28) for fluid and rigid particles with corresponding phase-specific parameters of the particle a itself and of neighboring particles b. Phase transitions in the form of melting of a rigid body occurs, in case the temperature T r of a rigid particle r exceeds the transition temperature T t . The former rigid particle r changes phase to become a fluid particle i. Conversely, phase transitions in form of solidification occurs, in case the temperature T i of a fluid particle i falls below the transition temperature T t and the former fluid particle i becomes a rigid particle r. Consequently, each time a rigid body k is subject to phase transition, its mass m k , center of mass position r k , and mass moment of inertia I k are updated. In addition, the velocity u k after phase transition is determined based on quantities prior to phase transition indicated by index (·) as following rigid body motion with (unchanged) angular velocity ω k .

Time integration following a velocity-Verlet scheme
The discretized fluid and solid field are both integrated in time applying an explicit velocity-Verlet time integration scheme in kick-drift-kick form, also denoted as leapfrog scheme, that is of second order accuracy and reversible in time when dissipative effects are absent [36]. Again, for ease of notation, in the following the indices (·) f and (·) s denoting fluid respectively solid quantities are dropped. Altogether, for the fluid field the positions r i of fluid particles i are evolved in time, while for the solid field the center of mass positions r k and the orientations ψ k of all rigid bodies k are evolved in time. However, the positions r r of rigid particles r are not evolved in time but directly follow the motion of corresponding affiliated rigid bodies k.
In a first kick-step, the accelerations a n i = (du i /dt) n , as determined in the previous time step n, are used to compute the intermediate velocities of fluid particles i, where t is the time step size. Similar, for rigid bodies k the linear and angular accelerations a n k = (d 2 r k /dt 2 ) n respectively α n k = (dω k /dt) n are used to compute the intermediate linear and angular velocities u n+1/2 k = u n k + t 2 a n k and ω The orientations of rigid bodies k are updated making use of quaternion algebra. First, the angular orientation increments from time step n to time step n + 1 are determined using the intermediate angular velocities of rigid bodies k following φ n,n+1 Next, the angular orientation increments are described by so-called transition quaternions q n,n+1 k . Finally, quaternion multiplication, cf. Remark 12, gives the updated orientations of rigid bodies k at time step n + 1 Once the updated orientations (and thus also the updated rigid body frames) are known, the relative positions of rigid particles r n+1 rk can be transformed from the rigid body frame to the reference frame. The velocities and the positions of rigid particles r are updated, considering the underlying rigid body motion of the corresponding rigid bodies k, in consistency with the applied time integration scheme following  (7). In a final kick-step, the velocities of fluid particles i at time step n + 1 are computed as while the linear and angular velocities of rigid bodies k are Accordingly, the velocities of rigid particles r are determined following the motion of the corresponding rigid bodies k to To maintain stability of the time integration scheme, the time step size t is restricted by the Courant-Friedrichs-Lewy (CFL) condition, the viscous condition, the body force condition, the contact condition, and the conductivity condition, refer to [21,50,58,59] for more details, with maximum fluid velocity u max and maximum body force b max .

Numerical examples
The purpose of this section is to investigate the proposed numerical formulation for solv-

Spatial discretization of a rigid circular disk
In the following, a rigid circular disk of diameter D = 2.5 × 10 −3 with density ρ s = 1.0 × 10 3 , motivated by two subsequent examples, is discretized with different values of the initial particle spacing x. The mass m s and the mass moment of inertia I s (with respect to the axis of symmetry) of the circular disk are computed with the proposed formulation and shown in Fig. 5. With decreasing initial particle spacing x the values for mass m s and mass moment of inertia I s converge to the analytical solution confirming the proposed formulation. To illustrate, the resulting spatial discretizations of the circular disk with rigid particles are shown in Fig. 6. Clearly, the approximation of the circular shape of the disk is of better accuracy for decreasing initial particle spacing x. To keep the computational effort at a feasible level, in the two subsequent examples the domain is discretized with an initial particle spacing of x = 2.0 × 10 −4 and x = 1.0 × 10 −4 . For the fluid phase, an artificial speed of sound c = 0.25 is chosen, resulting in a reference pressure p 0 = 62.5 of the weakly compressible model. The background pressure p b of the transport velocity formulation is set equal to the reference pressure p 0 . The motion of the bottom and top channel walls is modeled using moving boundary particles. The problem is solved for different values of the initial particle spacing x for times t ∈ [0, 60.0] with time step size t obeying respective conditions (41).

Remark 19
Imposing a periodic boundary condition in a specific spatial direction allows for particle interaction evaluation across opposite domain borders. Moreover, particles leaving the domain on one side are re-entering on the opposite side.

Case 1: Migration of a floating rigid circular disk to the center line of a channel
This case is based on studies [60,61] stating that a rigid circular disk floating in a shear flow in a channel migrates to the center line of the channel independent of its initial position and initial velocity. Herein, the rigid circular disk is initially at rest placed at vertical position r y = 2.5 × 10 −3 in the channel, cf. Fig. 7. The channel walls move in opposite direction with a velocity magnitude of u w /2 = 0.01 resulting in the Reynolds number Re = 0.625 of the problem.
The obtained vertical position r y and the horizontal velocity u x of the center of the circular disk in the channel over time t are displayed in Fig. 8 for two different values of the initial particle spacing x. The circular disk migrates to the center line of the channel as expected, showing no significant difference between the results obtained with different initial particle spacings x. In addition, a comparison to the results of [8] shows very good agreement for the dynamics of the solution.

Case 2: Interaction of a floating rigid circular disk with a fixed rigid circular disk
In the presence of a rigid circular disk that is fixed at the center line of the channel, a rigid circular disk floating in a shear flow migrates to a specific position of equilibrium independent of its initial position and velocity as stated in [62]. Herein, the fixed and the floating rigid circular disks are initially placed on the center line of the channel at horizontal position r x = ±3.75 × 10 −3 , cf. Fig. 7. The channel walls move in opposite direction with a velocity magnitude of u w /2 = 0.012 resulting in the Reynolds number Re = 0.75 of the problem.  Figure 9 shows the obtained trajectory, i.e., vertical position r y over horizontal position r x , and horizontal velocity u x of the center of the floating circular disk in the channel for two different values of the initial particle spacing x. The results obtained with initial particle spacing x = 1.0×10 −4 are in good agreement to the reference solution [8]. However, the results obtained with initial particle spacing x = 2.0 × 10 −4 show fluctuations of the horizontal velocity u x , which is why also the trajectory deviates from the reference solution [8]. This can be explained with disturbances of the density field due to relative particle movement [21], that are more pronounced with a coarser spatial discretization, i.e., with larger initial particle spacing x.

A rigid circular disk falling in a fluid column
A rigid circular disk of diameter D = 2.5 × 10 −3 with density ρ s = 1.25 × 10 3 is initially at rest placed on the y-axis at vertical position r y = 1.0 × 10 −2 in a closed rectangular box of height H = 6.0 × 10 −2 and width W = 2.0 × 10 −2 , cf. Fig. 10. The remainder of the box is occupied by a Newtonian fluid with density ρ f = 1.0 × 10 3 and kinematic viscosity ν f = 1.0 × 10 −5 . A gravitational acceleration of magnitude |g| = 9.81 shall act on both the fluid and solid field in negative y-direction. Following [8] this is modeled considering the buoyancy effect, i.e., body force b s = (ρ s − ρ f )/ρ s g is acting on the solid field while no body force b f = 0.0 is applied on the fluid field (each per unit mass). It is worth noting that, naturally, it would also be possible to directly set the gravitational acceleration for the fluid and solid field. For validation, the results obtained with the proposed formulation are compared to [8] also applying SPH to discretize the fluid and the solid field.
For the fluid phase, an artificial speed of sound c = 0.5 is chosen, resulting in a reference pressure p 0 = 250.0 of the weakly compressible model. The background pressure p b of the transport velocity formulation is set equal to the reference pressure p 0 . The stiffness and damping constant applied for contact evaluation are set to k c = 1.0 × 10 8 and d c = 1.0 × 10 2 . The walls of the box are modeled using boundary particles. The problem is solved for different values of the initial particle spacing x for times t ∈ [0, 0.8] with time step size t obeying respective conditions (41).
The obtained vertical velocity and horizontal position of the center of the circular disk in the box over time t are displayed in Fig. 11 for two different values of the initial particle spacing x compared to the reference solution [8]. The results obtained with different initial particle spacing x show only minor differences. The terminal velocity of the rigid  circular disk is slightly smaller than given in the reference solution [8]. It shall be noted that, in contrast to [8], contact of the rigid circular disk and the wall of the box is explicitly considered. Consequently, the rigid circular disk comes at rest when approaching the bottom wall of the box.

Melting and solidification of powder grains in a melt pool
In metal powder bed fusion additive manufacturing (PBFAM), structural components are created utilizing a laser or electron beam to melt and fuse metal powder, layer per layer, to form the final part. PBFAM has the potential to enable new paradigms of product design, manufacturing and supply chains. However, due to the complexity of PBFAM processes, the interplay of process parameters is not completely understood, creating the need for further research, amongst others in the field of computational melt pool modeling [15,16]. For this purpose, an SPH formulation for thermo-capillary phase transition problems with a focus on metal PBFAM melt pool modeling has recently been proposed [18]. For simplicity, this and other state-of-the-art approaches [18][19][20] in the field consider powder grains that are spatially fixed. In the real physical process, however, it is observed that, depending on the processing conditions, melt evaporation and thereby induced vapor and gas flows in the build chamber may result in powder grains entrainment and ejection, i.e., a considerable degree of material re-distribution during the melting process. On the one hand, this effect considerably affects process stability and mechanisms of defect creation, on the other hand, it can not be represented by state-of-the-art approaches restricted to immobile powder grains [18][19][20]. In the following, a two-and a three-dimensional example each with different geometry, boundary conditions, and material parameters are considered. The purpose of these examples is not to study PBFAM in detail but to showcase the general applicability of the proposed formulation to capture the dynamics of mobile powder grains undergoing temperature-induced phase transitions, i.e., melting and solidification, while being exposed to gravitational acceleration and gas flow. To this end, surface tension and wetting effects as well as the influence of evaporation-induced recoil pressure, as discussed in [18], are neglected. The focus is set on the investigation of highly dynamic motion and interaction of powder grains with each other, the liquid melt phase and a surrounding gas phase, undergoing reversible phase transitions, i.e., melting and solidification.

Powder grains exposed to a highly dynamic gas flow
This two-dimensional example is solely intended to demonstrate the model capabilities for this type of application, while keeping the overall example simple in this method-focused contribution. For this reason, non-physical parameter values and boundary conditions are chosen in the following. The initial positions of the powder grains can, e.g., be obtained in a pre-processing step based on the discrete element method (DEM) and a cohesive powder model [29,63]. The remainder of the box is initially filled with a gas phase (Newtonian fluid, density ρ g = 0.1, kinematic viscosity ν g = 100.0, heat capacity c g p = 0.01, thermal conductivity κ g = 0.1). The temperature is initialized to T s 0 = 25.0 within the solid metal phase and to T g 0 = 50.0 within the gas phase. In the upper half of the box walls the temperature is fixed toT = 50.0 at all times. In the lower half of the box walls the temperature is set toT = 100.0 until time t ≤ 0.5, and toT = 0.0 for time t > 0.5. Refer to Figs. 12 and 13 containing an illustration of the initial configuration. Reversible phase transitions between solid metal phase and liquid metal phase (Newtonian fluid, density ρ l = 1.0, kinematic viscosity ν l = 100.0, heat capacity c l p = 1.0, thermal conductivity κ l = 10.0) is assumed to occur at a transition temperature of T t = 50.0. With the goal to evoke drag forces acting on the powder grains, for times t > 0.25 a parabolic inflow respectively outflow of the gas phase with mean velocity 420.0 is prescribed at the inlet and outlet of the box. A gravitational acceleration of magnitude |g| = 1.0 × 10 4 is acting downwards, set as body force (per unit mass) of all involved phases.
For both fluid phases (liquid metal and gas), the reference pressure of the weakly compressible model is set to p 0 = 16.0 × 10 6 , and the background pressure p b of the transport velocity formulation is set equal to the reference pressure p 0 . The stiffness and damping constant applied for contact evaluation are set to k c = 1.0 × 10 8 and d c = 1.0 × 10 2 . The wall of the box is modeled using boundary particles. The inflow and outflow conditions are modeled similar as described in [49]. The problem is solved with initial particle spacing x = 0.1 for times t ∈ [0, 0.75] with a time step size of t = 0.625 × 10 −5 .
A time series of illustrations of the obtained results is given in Figs. 12 and 13. The solid metal phase is visualized in gray color. The particles discretizing the liquid metal phase Fig. 12 Powder grains exposed to a highly dynamic gas flow: time series of the obtained results with temperature field ranging from 0.0 (blue) to 100.0 (red) Fig. 13 Powder grains exposed to a highly dynamic gas flow: time series of the obtained results with magnitude of the velocity field ranging from 0.0 (blue) to 600.0 (red) are displayed in black color. In the background, the temperature respectively velocity field of the combined liquid metal and gas phase are displayed. Thereto, both fields were post-processed applying SPH approximation (13) and visualized by a color code. In Fig. 12 additionally the temperature of the walls is shown. First, the powder grains are heated and gradually start melting into liquid metal where in close contact to the hot wall. Eventually, after time t = 0.25, powder grains are subjected to the gas flow through the box. Some (partially melted) powder grains are swept into the right chamber of the box, where melting after contact with the hot wall continues. A non-smooth and strongly distorted interface topology between liquid metal and gas phase develops, especially in the right chamber of the box, because surface tension and wetting effects are neglected. Finally, with the temperature in the lower half of the box set toT = 0.0 after time t = 0.5, the liquid metal phase is cooled down drastically and eventually resolidifies.

Three-dimensional powder melting setup with representative material parameters
In this example, the focus is set on a three-dimensional setup while considering representative material parameters for stainless steel and the surrounding gas phase taken from [18] with the purpose to demonstrate the general applicability of the proposed formulation for metal PBFAM melt pool modeling. However, note that some characteristic phenomena relevant for the latter, e.g., surface tension and wetting effects, are still neglected.
Powder grains of a solid metal phase (density ρ s = 7430 kg m −3 , heat capacity c s p = 965 J kg −1 K −1 , thermal conductivity κ s = 35.95 W m −1 K −1 ) with diameters between 16 µm and 20 µm are placed initially at rest inside a cuboid box with dimensions of 50 µm×50 µm×30 µm. The initial positions of the powder grains can, e.g., be obtained in a pre-processing step based on the discrete element method (DEM) and a cohesive powder model [29,63]. The remainder of the box is initially filled with a gas phase (Newtonian fluid, density ρ g = 74.3 kg m −3 , dynamic viscosity η g = 6.0e − 4 kg m −1 s −1 , heat capacity c g p = 10 J kg −1 K −1 , thermal conductivity κ g = 2.6 × 10 −2 W m −1 K −1 ). The temperature is initialized to T s 0 = 500 K and T g 0 = 500 K within the solid metal phase and the gas phase. In all box walls the temperature is set toT = 1800 K until time t ≤ 0.15 ms, and toT = 500 K for time t > 0.15 ms. Refer to Fig. 14 containing an illustration of the initial configuration. Reversible phase transitions between solid metal phase and liquid metal phase (Newtonian fluid, density ρ l = 7430 kg m −3 , dynamic viscosity η l = 6.0 × 10 −3 kg m −1 s −1 , heat capacity c l p = 965 J kg −1 K −1 , thermal conductivity κ l = 35.95 W m −1 K −1 ) is assumed to occur at a transition temperature of T t = 1700 K. A gravitational acceleration of magnitude |g| = 9.81 ms −2 is acting downwards, set as body force (per unit mass) of all involved phases.
For both fluid phases (liquid metal and gas), the reference pressure of the weakly compressible model is set to p 0 = 1.0 × 10 7 N m −2 and the background pressure of the transport velocity formulation to p b = 5p 0 . The stiffness and damping constant applied for contact evaluation are set to k c = 1.0 kg s −2 and d c = 1.0 × kg s −1 . The wall of the box is modeled using boundary particles. The complete domain is discretized by particles with initial particle spacing x = 1.0 µm resulting in a total of approximately 1.13 × 10 5 particles. The problem is solved for times t ∈ [0, 0.175] ms with a time step size of t = 5.0 × 10 −7 ms. A time series of illustrations of the obtained results is given in Fig. 14. The particles discretizing the solid metal phase are displayed in gray color. The particles discretizing the liquid metal phase are colored based on the temperature field with transition temperature T t = 1700 K as lower value and temperature of the hot box wallsT = 1800 K as upper value. In the background, the temperature field of the combined liquid metal and gas phase is post-processed applying SPH approximation (13) and visualized by a color code until time t ≤ 0.15 ms. The powder grains in close contact to the hot box walls are heated and gradually start melting into liquid metal. Under the influence of gravity the (partially melted) powder grains are gradually displacing the liquid metal. A non-smooth and strongly distorted interface topology between the liquid metal and gas phase develops. This can be explained by the fact that surface tension and wetting effects are neglected in this specific example. After time t = 0.15 ms the temperature of the box walls is suddenly set toT = 500 K. As a consequence, the liquid metal close to the cool box walls rapidly resolidifies.
In sum, both examples demonstrates that highly dynamic motion of arbitrarily-shaped powder grains as relevant, e.g., for metal PBFAM melt pool modeling, can be captured along with melting and solidification by the proposed formulation in a robust manner. Consequently, the proposed formulation can be recommended as a useful extension of the SPH formulation for mesoscale melt pool modeling [18], or other current state-of-the-art approaches, e.g., [19,20], allowing for more detailed studies of PBFAM processes.

Gastric disintegration of food boluses
Examination of gastric fluid mechanics plays an important role for modeling digestion of food in the human stomach. The digesta are characterized by a multiphasic nature consisting of fluid (gastric juice and chyme) and solid (food boluses) phases [17]. Intragastric fluid motion is driven by the propagation of so-called antral contraction waves (ACWs), i.e., circular constrictions of the gastric wall due to smooth muscle contractions [64]. The ACWs are initiated at the pacemaker region of the stomach and travel along the greater curvature towards the pylorus both mixing and grinding the digesta. Concurrently, absorption of gastric juice fosters chemical and mechanical breakdown of food boluses into chyme [65]. At low viscosity, i.e., following intragastric dilution of the digesta with gastric juice, retropulsive jet-like fluid motion between the ACWs can be observed [66][67][68].
This example aims to demonstrate the capability of the proposed formulation to replicate typical gastric flow patterns including phase transitions. As compared to this complex application scenario, the configuration of the example is kept simple to focus on the principal effects. Consequently, non-physiological parameter values and boundary conditions are applied. Consider a rectangular box of width 40.0 and height 16.0 (coordinate system in the center) with a mobile constriction. A total of 60 food boluses (density ρ s = 1.0, diffusivity D s = 0.25), represented by mobile rigid bodies with diameters between 1.6 and 2.8, are placed at random positions inside the box. The remainder of the box is initially filled with gastric juice (Newtonian fluid, density ρ g = 1.0, kinematic viscosity ν g = 100.0, diffusivity D g = 1.0). Both the food boluses and the gastric juice are initially at rest. The initial configuration of the example is contained in Fig. 15. Over time, food boluses disintegrate into chyme (Newtonian fluid, density ρ c = 1.0, kinematic viscosity ν c = 200.0, diffusivity D c = 0.25). Herein, this is modeled considering the transport of a concentration C within the food boluses and chyme, resembling some kind of moisture penetration, by solving a diffusion equation, cf. Remark 4. Accordingly, the concentration within the food boluses is initialized with C 0 = 0.0, while the concentration within the gastric juice is fixed toĈ = 1.0 at all times. Phase transitions from food boluses to chyme is assumed to occur at a transition concentration of C t = 0.8. The propagation of an ACW is modeled by the movement of the mobile constriction in the box with a time dependent horizontal velocity of −14.5π sin(πt) from horizontal position 14.5 to −14.5, cf. Fig. 15.
For both fluid phases (gastric juice and chyme), an artificial speed of sound c = 1.0×10 3 is chosen, resulting in a reference pressure p 0 = 1.0 × 10 6 of the weakly compressible model, with background pressure of the transport velocity formulation set to p b = 5p 0 . The stiffness and damping constant applied for contact evaluation are set to k c = 1.0×10 8 and d c = 1.0 × 10 2 . The wall of the box and the mobile constriction are modeled using (moving) boundary particles. The problem is solved with initial particle spacing x = 0.1 for times t ∈ [0, 1.0] with a time step size of t = 1.25 × 10 −5 . Figure 15 shows a time series of illustrations of the obtained results. The food boluses are visualized in gray color. The particles discretizing the chyme are displayed in black color. In the background, the velocity field of both gastric juice and chyme is post-processed applying SPH approximation (13) and visualized by a color code. Clearly, the typical retropulsive jet-like fluid motion induced by the moving constriction can be observed. As a consequence, the food boluses are entrained with the fluid flow through the opening while coming into contact with each other. At the same time, disintegration of food boluses into chyme gradually takes place. After time t = 0.875 some food boluses are completely dissolved. A detailed view of the region at the mobile constriction is given in Fig. 16 for selected points in time. Here, the particles discretizing the food boluses and the chyme are colored based on the concentration field, for distinction, utilizing two different color maps with transition concentration C t as upper respectively lower value. A progressive mixing of gastric juice and chyme can be observed primarily driven by the fluid motion.
Note that the main purpose of this example is to show the robustness of the proposed formulation in the context of highly dynamic fluid flow and phase transitions, e.g., as occurring in the form of retropulsive jet-like fluid motion during digestion of food in the human stomach. For the sake of simplicity, non-physiological parameter values are applied. Amongst others, the time scales of ACW propagation and disintegration of food boluses are in a mismatch. In addition, the employed phenomenological digestion model does not explicitly resolve the influence of chemical and mechanical breakdown taking place in reality. In conclusion, this example demonstrates that typical gastric flow patterns including phase transitions are fully captured in a stable and robust manner.  16 Gastric disintegration of food boluses: detailed view of region at the mobile constriction for selected points in time. The concentration C is ranging from 0.0 (black) to C t = 0.8 (white) within the food boluses and from C t = 0.8 (blue) to 1.0 (red) within the chyme. In the background, the magnitude of the velocity field is ranging from 0.0 (blue) to 120.0 (red)

Strong scaling analysis of parallel computational framework
The purpose of this example is to demonstrate the capability and efficiency of the proposed parallel computational framework in handling systems constituted of a large number of particles. To this end, a three-dimensional example consisting of a total of approximately 3.79 × 10 6 particles is examined on two different parallel systems. Conclusions are drawn concerning the parallel behavior of the parallel computational framework in three dimensions.
A total of 216 spherical-shaped mobile rigid bodies with diameter D = 2.5 and density ρ s = 10.0 are placed on a regular grid in a cubic box of edge length L = 30.0. The rigid bodies are initially at rest and not in contact with each other or the walls of the box. The remainder of the box is occupied by a Newtonian fluid initially at rest with density ρ f = 1.0 and kinematic viscosity ν f = 1.0. A gravitational acceleration of magnitude |g| = 1.0 is acting in downward direction, i.e., the body forces (per unit mass) of fluid and solid field are given to b f = g and b s = g.
For the fluid phase, an artificial speed of sound c = 50.0 is chosen, resulting in a reference pressure p 0 = 2.5 × 10 3 of the weakly compressible model, with background pressure p b of the transport velocity formulation set equal to the reference pressure p 0 . The stiffness and damping constant applied for contact evaluation are set to k c = 1.0×10 3 and d c = 1.0×10 2 . The wall of the box is modeled using boundary particles. The complete domain is discretized by particles with initial particle spacing x = 0.2 resulting in a total of approximately 3.79 × 10 6 particles, thereof 3.15 × 10 6 fluid particles, 2.20 × 10 5 rigid particles, and 4.21 × 10 5 boundary particles. Following a spatial decomposition approach, the computational domain is divided into 48 × 48 × 48 cubic cells of edge length 0.65 resulting in approximately 34 particles per cell. The problem is solved for times t ∈ [0, 30.0] with a time step size of t = 1.0 × 10 −3 .
For the purposes of illustration, the spherical-shaped rigid bodies within the box are shown in Fig. 17 for the initial setup at t = 0.0 and later points in time. In addition, the velocity field of the surrounding fluid is post-processed applying SPH approximation (13) and visualized by a color code with opacity. The rigid bodies are falling freely in the viscous fluid under gravity due to density ratio ρ s /ρ f = 10.0 until contact with the bottom wall of the box occurs, as first observed after t ≈ 2.5, or with neighboring rigid bodies, as first To showcase the capability and efficiency of the parallel computational framework, a strong scaling analysis is performed utilizing two different parallel systems: The first one consisting of 32 nodes with 2 × 12 cores (Intel Xeon E5-2680 v3 Haswell, 2.5 GHz) and the second one consisting of 8 nodes with 2 × 8 cores (Intel Xeon E5-2630 v3 Haswell, 2.4 GHz). The parallel behavior of the proposed computational framework is given in Fig. 18, illustrating the obtained solver time per time step and the parallel efficiency given in percent of linear scaling. The parallel efficiency is computed as t 1 /(n · t n ) · 100%, where t 1 and t n are the times to solve the problem on one node respectively n nodes.
The parallel computational framework scales almost linearly on both parallel systems for up to 128 cores respectively 192 cores. In this regime a parallel efficiency of more than 60% can be observed. For larger numbers of cores, the scalability deteriorates and the parallel efficiency drops to under 50%. This can be explained with an increasing communication overhead, cf. Remark 9. Comparable results of a strong scaling analysis for an SPH implementation are given, e.g., in [45] (r c / x = 2.5) and [69] (r c / x = 2.4), however, in contrast to this example (r c / x = 3.0) with a smaller ratio of the support radius r c and the initial particle spacing x, resulting in a lower influence on the communication overhead, cf. Remark 9. As a conclusion one can state that the parallel computational framework is capable of efficiently solving systems constituted of a large number of parti-cles in three dimensions on multiple cores. Looking at the parallel behavior, the obtained results confirm that the proposed framework meets all requirements necessary for detailed and accordingly computationally expensive studies.

Conclusion
In this work, an approach for fluid-solid and contact interaction problems including thermo-mechanical coupling and reversible phase transitions is presented. All fields are spatially discretized using smoothed particle hydrodynamics (SPH). Being a mesh-free discretization scheme, SPH is, compared to mesh-based methods, especially suitable in the context of continually changing interface topologies and dynamic phase transitions by avoiding additional methodological and computational effort to capture such phenomena. A detailed concept for the parallelization of the computational framework, especially for an efficient evaluation of rigid body motion, is an essential part of this work.
The accuracy and robustness of the proposed formulation are demonstrated by several numerical examples studying a single rigid body in fluid flow. The obtained numerical results are in very good agreement with the literature. Also two complex examples close to potential applications scenarios in the fields of engineering and biomechanics were studied. First, motivated by metal PBFAM melt pool modeling, melting and solidification of powder grains subject to highly dynamic fluid motion was simulated. Second, inspired by multiphysics modeling of the human stomach, gastric disintegration of food boluses is considered. Both examples confirm that highly dynamic motion of arbitrarily-shaped rigid bodies embedded in a complex fluid flow and including reversible phase transitions can be captured by the proposed framework in a stable and robust manner. Finally, the parallel computing abilities of the proposed computational framework were demonstrated by a strong scaling analysis of a three-dimensional example with 3.79 × 10 6 particles revealing a parallel efficiency of more than 60% on up to 192 cores.
To the best of the authors' knowledge, the proposed parallel computational framework is the first of its kind modeling rigid body motion while simultaneously considering thermal conduction, reversible phase transitions, and multiple (liquid and gas) phases. For the sake of simplicity, some characteristic phenomena for thermo-capillary flow and, especially, for metal PBFAM melt pool modeling are not yet addressed in this work, however, straightforward to include considering the authors' previous work. Besides, the applied contact evaluation between rigid bodies is based on a contact normal force law evaluated between rigid particles while neglecting frictional and adhesive effects. An extension to a more sophisticated contact evaluation is part of ongoing research. In summary, the proposed formulation has the ability to accurately model a host of complex multiphysics problems, and it can thus be expected to become a valuable tool for detailed studies in engineering, e.g., metal additive manufacturing, and biomechanics, e.g., digestion of food in the human stomach.