# Simulation of the Marangoni Effect and Phase Change Using the Particle Finite Element Method
## 2 Governing Equations and Solution Methods
### Phase Change and Solid Flow Resistance  
To model the changes in the momentum equation for the two phases, we must first define the phase fraction \(f_{p}\) that indicates the resulting phase as a function of temperature, where \(f_{p}=1\) marks a liquid, \(f_{p}=0\) marks a solid and \(0<f_{p}<1\) marks the mushy zone. We use the following definition for \(f_{p}\):  
\[f_{p}=\left\{\begin{array}{cl}1&\text{for }T\geq T_{l}\\ \frac{T-T_{s}}{T_{l}-T_{s}}&\text{for }T_{l}>T>T_{l}\\ 0&\text{for }T\leq T_{s}\end{array}\right., \tag{12}\]  
where \(T_{l}\) and \(T_{s}\) are the liquidus and solidus temperatures that form the phase change interval with a linear distribution inside this interval. Note that more realistic transitions are possible (see for example [25]). In the case of isothermal phase change, both temperatures are equal and there is only the melting temperature, \(T_{m}\). There, the transition of the liquid fraction in Equation (12) collapses into a step function. In the context of numerical methods, such discontinuities can cause instabilities; however, none were observed here and no special treatment was necessary (compare Section 2.7).  
When using the Navier-Stokes equations, the treatment of the solid and semi-solid or mushy phases is not straightforward. Instead of changing the constitutive equation for the non-fluid phases, we continue to use the Newtonian fluid law, but add the sink term \(s\) to the momentum equation. The purpose of this sink term is to remove momentum locally wherever the material is not fully in the liquid phase. This effectively adds a resistance to the flow as the material freezes. When fully frozen, the sink term removes all momentum and a particle remains fixed. This is a modelling approach that is widely used in the context of phase change simulations with fluid solvers at this length scale [6]. In the literature, the choice of model for the sink term \(s\) is often the well-known Carman-Kozeny equation (e.g., [26; 27; 28]):  
\[s=-C\frac{\left(1-f_{p}\right)^{2}}{\varepsilon+f_{p}^{3}}v \tag{13}\]  
where \(C\) is the drag coefficient, which must be large, and \(\varepsilon\) is a small coefficient that is used to avoid division by zero. This equation is normally used to describe the pressure drop of a flow through a porous medium, which may not accurately represent the mushy zone in a welding or additive manufacturing application. However, it appears that the equation is widely used because it is a reasonable approximation of the physics without being prohibitively complicated. According to [PERSON] and [PERSON] [6], the parameters are usually arbitrarily chosen to be on the order of \(C=10^{5}\) kg m\({}^{-3}\) s\({}^{-1}\) and \(\varepsilon=10^{-5}\), although different sources use different values without explaining their specific choice.  
To summarize, this term subtracts momentum from a particle as it approaches the solid state. When fully solid (i.e., \(f_{p}=0\)), the velocity is nearly zero. Conversely, when fully liquid (i.e., \(f_{p}=1\)), this entire term becomes zero and the regular Navier-Stokes equations are recovered.