# Simulation of the Marangoni Effect and Phase Change Using the Particle Finite Element Method
## 2 Governing Equations and Solution Methods
### Weak Form, Discretization and Integration  
The PFEM was chosen as the underlying method due to its favorable properties, as briefly outlined in the introduction. Being based on the well-known finite element method (FEM), Equations (1), (7) and (18) are written in the weak form to reduce the differentiability requirements. We define  
\[\mathbf{v}\in\mathcal{S},\ \ \mathcal{S}=\left\{\mathbf{v}\in\mathbf{H}^{1}(\Omega)\ \Big{|}\ \mathbf{v}=\overline{\mathbf{v}}\ \text{on}\ \Gamma_{\text{v}}\right\} \tag{21}\]  
\[\mathbf{w}\in\mathcal{S}_{0},\ \ \mathcal{S}_{0}=\left\{\mathbf{w}\in\mathbf{H}^{1}( \Omega)\ \Big{|}\ \mathbf{w}=\mathbf{0}\ \ \text{on}\ \Gamma_{\text{v}}\right\} \tag{22}\]  
\[p\in\mathcal{Q},\ \ \mathcal{Q}=\left\{q\in L^{2}(\Omega)\right\} \tag{23}\]  
\[T\in\mathcal{R},\ \ \mathcal{R}=\left\{r\in L^{2}(\Omega)\right\} \tag{24}\]  
where \(\mathcal{S}\) is the space of vector trial functions for the velocity, \(\mathcal{S}_{0}\) is the space of vector test functions for the velocity, \(\mathcal{Q}\) is the space of scalar test functions for the pressure and \(\mathcal{R}\) is the space of scalar test function for the temperature. \(\mathbf{H}^{1}(\Omega)\) denotes the space of square integrable functions with square integrable first derivative and \(L^{2}(\Omega)\) denotes the space of square integrable functions over the domain \(\Omega\). By multiplying the equations by a smooth and kinematically admissible scalar test function \(q\) or a vector test function \(\mathbf{w}\), taking the integral over the volume, and then integrating by parts, the weak form is obtained. The weak forms of Equations (1), (7) and (18), respectively, are:  
\[\int_{\Omega}q\
abla\cdot\mathbf{v}\ dV=0\ \ \forall q\in\mathcal{Q} \tag{25}\]  
\[\int_{\Omega}\left(p\frac{d\mathbf{v}}{dt}\cdot\mathbf{w}\ +p\
abla\cdot\mathbf{w}-\mu \big{(}\
abla\ \mathbf{v}\ :\
abla\mathbf{w}+\
abla\mathbf{v}^{T}\ :\
abla\mathbf{w}\big{)}-\rho\mathbf{b}\cdot\mathbf{w}-\mathbf{s} \cdot\mathbf{w}\right)dV \tag{26}\]  
\[\int_{\Omega}\left(r\rho c_{p}\frac{dT}{dt}-r\
abla\cdot(\kappa\
abla T)-rQ-rL \right)dV+\int_{\Gamma_{t}}r\overline{q}\ dS=0\ \ \forall r\in\mathcal{R} \tag{27}\]  
and solve for \(v\in\mathcal{S}\times[t_{0},\,t_{end}]\), \(p\in\mathcal{Q}\times[t_{0},t_{end}]\) and \(T\in\mathcal{R}\times[t_{0},t_{end}]\). To solve the equations using discrete elements, the continuous solution variables of velocity \(\mathbf{v}(\mathbf{x},t)\)  
Figure 1: Total specific enthalpy \(h\) over temperature \(T\), showing the physically correct curve in solid black and regularized curve in dotted color. A regularized curve is tangential to the solid curve at both ends and has the freely chosen width \(\Delta T_{reg}\). (**a**) Isothermal phase change; (**b**) Non-isothermal phase change. pressure \(p(\mathbf{x},t)\) and temperature \(T(\mathbf{x},t)\) are discretized. This can be achieved with the [PERSON] method, where we use the approximations  
\[p(\mathbf{x},t) \approx\mathbf{N}_{s}^{T}(\mathbf{x})\;\mathbf{p}(t) \tag{28}\] \[v(\mathbf{x},t) \approx\mathbf{N}_{v}^{T}(\mathbf{x})\;\mathbf{v}(t)\] (29) \[\mathbf{w}\in\mathcal{S}_{0},\ \ \mathcal{S}_{0}=\left\{\mathbf{w}\in\mathbf{H}^{1}( \Omega)\ \Big{|}\ \mathbf{w}=\mathbf{0}\ \ \text{on}\ \Gamma_{\text{v}}\right\} \tag{22}\]0  
where \(\mathbf{p}\) is the vector of nodal pressures, \(\mathbf{v}\) is the vector of nodal velocities, \(\mathbf{T}\) is the vector of nodal temperatures and \(\mathbf{N}_{s}\) and \(\mathbf{N}_{v}\) are the vectors of linear shape functions. \(\mathbf{N}_{s}\) is used for scalar fields and its length equals the number of nodes \(n_{nodes}\), whereas \(\mathbf{N}_{v}\) is used for vector fields and its length is the \(n_{nodes}\cdot n_{dim}\), where \(n_{dim}\) is the number of dimensions (here, \(n_{dim}=2\)). Using an equal order shape function for both pressure and velocity interpolation is known to violate the Ladyzhenskaya-Babuska-Brezzi (LBB) condition, which allows more than one solution for the pressure field.