# Mass conservation approximation#

First, we have to choose how to approximate the conservation of mass: $$\nabla \cdot (\rho \mathbf u) = 0$$ (see Equation (2)). We provide the following options, which can be selected in the parameter file in the subsection Formulation/Mass conservation (see also Parameter name: Mass conservation):

• “incompressible”:

$\nabla \cdot \textbf{u} = 0,$
• “isothermal compression”:

$\nabla \cdot \textbf{u} = -\rho \beta \textbf{g} \cdot \textbf{u},$

where $$\beta = \frac{1}{\rho} \frac{\partial \rho}{\partial p}$$ is the compressibility, and is defined in the material model. Despite the name, this approximation can be used either for isothermal compression (where $$\beta = \beta_T$$) or isentropic compression (where $$\beta = \beta_S$$). The material model determines which compressibility is used. This is an explicit compressible mass equation where the velocity $$\textbf{u}$$ on the right-hand side is an extrapolated velocity from the last timesteps.

• “hydrostatic compression”:

$\nabla \cdot \textbf{u} = - \left( \frac{1}{\rho} \left( \frac{\partial \rho}{\partial p} \right)_{T} \rho \textbf{g} + \frac{1}{\rho} \left( \frac{\partial \rho}{\partial T} \right)_{p} \nabla T \right) \cdot \textbf{u} = - \left( \beta_T \rho \textbf{g} - \alpha \nabla T \right) \cdot \textbf{u}$

where $$\beta_T = \frac{1}{\rho} \left(\frac{\partial \rho}{\partial p} \right)_{T}$$ is the isothermal compressibility, $$\alpha = - \frac{1}{\rho} \left(\frac{\partial \rho}{\partial T} \right)_{p}$$ is the thermal expansion coefficient, and both are defined in the material model. The approximation made here is that $$\nabla p = \rho \textbf{g}$$.

• “reference density profile”:

$\nabla \cdot \textbf{u} = -\frac{1}{\bar{\rho}} \frac{\partial \bar{\rho}}{\partial z} \frac{\textbf{g}}{\|\textbf{g}\|} \cdot \textbf{u},$

where the reference profiles for the density $$\bar{\rho}$$ and the density gradient $$\frac{\partial \bar{\rho}}{\partial z}$$ provided by the adiabatic conditions model (Initial conditions and the adiabatic pressure/temperature) are used. Note that the gravity is assumed to point downwards in depth direction. This is the explicit mass equation where the velocity $$\textbf{u}$$ on the right-hand side is an extrapolated velocity from the last timesteps.

• “implicit reference density profile”:

$\nabla \cdot \textbf{u} + \frac{1}{\bar{\rho}} \frac{\partial \bar{\rho}}{\partial z} \frac{\textbf{g}}{\|\textbf{g}\|} \cdot \textbf{u} = 0,$

which uses the same approximation for the density as “reference density profile,” but implements this term on the left-hand side instead of the right-hand side of the mass conservation equation. This effectively uses the current velocity $$\textbf{u}$$ instead of an explicitly extrapolated velocity from the last timesteps.

• “ask material model,” which uses “isothermal compression” if the material model reports that it is compressible and “incompressible” otherwise.

The stress tensor approximation

If a medium is incompressible, that is, if the mass conservation equation reads $$\nabla \cdot \textbf{u} = 0$$, then the shear stress in the momentum and temperature equation simplifies from

$\tau = 2\eta\left(\varepsilon\left(u\right) - \frac{1}{3}\left(\nabla\cdot\textbf{u}\right)1\right)$

to

$\tau = 2\eta\varepsilon\left(\textbf{u}\right)$