MASS_correction_DivergenceVelocity

Mass Correction for weakly compressible flow problems

Default: MASS_correction_DivergenceVelocity = 'NON' It only works for the LIQUID solver and for problems with pressure dependent densities! Furthermore at the moment an inflow and/or outflow boundary condition is required to determine the target mass! The idea is to add a source term \( \tilde{q}\) to the continuity equation \begin{align} \frac{D \varrho}{D t} + \varrho \, \nabla \cdot \mathbf{v} = \tilde{q} \end{align} in order to compensate the mass loss resp. the gain in mass. Hence the desired divergence of velocity for the CorrectionPressureAlgorithm (see DesiredAndNominalDivergenceOfVelocity) is computed by \begin{align} \nabla \cdot \mathbf{v} = -\frac{1}{\varrho} \left(\frac{D \varrho}{D t} - \tilde{q}\right) \end{align} This is also used for the computation of the dynamic pressure (see FLIQUID_ConsistentPressure_Version, ClassicalDPA, RegularizeDPA, AlternativeDPA). Therefore it can be interpreted as a correction method of the dynamic pressure as well. For the computation of the source term \( \tilde{q}\) the relative error \( \mathrm{err}\) of target mass \begin{align} M_{t} = \int\limits_{t^0}^{t^n} \int\limits_{\partial\Omega_{\mathrm{in/out}}} \varrho(t) \big({\bf v}(t) \cdot {\bf n}(t)\big) \, dA \, dt \approx \sum_{k=0}^{n} \sum_{i \in P} \varrho_{i}(t^k) \big({\bf v}_i(t^k) \cdot {\bf n}_i(t^k)\big) A_i \end{align} and current mass \begin{align} M_{c} = \int\limits_{\Omega} \varrho \, dV - \int\limits_{\Omega} \varrho^{(\mathrm{start})} \, dV \approx \sum_{i \in P} \varrho_{i} \cdot V_i - \sum_{i \in P} \varrho_{i}^{(\mathrm{start})} \cdot V_i \end{align} is computed by \begin{align} \mathrm{err} = \frac{M_t - M_c}{M_t}. \end{align} Moreover the relative error \( \mathrm{err}\) is weighted with a coefficient \( d \in [1,1200]\), which depends on the absolute error, the smaller the mass difference the higher \( d\). But overall the product \( \mathrm{coeff} = d \cdot \mathrm{err}\) is limited by \begin{align} -12 \leq \mathrm{coeff} \leq 12. \end{align} This results in the source term
\( \tilde{q} = \mathrm{coeff} \cdot \tilde{\varrho} = d \, \dfrac{M_t - M_c}{M_t} \, \tilde{\varrho},\)
where \begin{align} \tilde{\varrho} = \frac{1}{N} \sum_{i = 1}^{N} \varrho_{i} \end{align} is the average density.
This item is referenced in:
MASS_correction_DivergenceVelocity Mass Correction for weakly compressible flow problems