Consistency issues on SPH energy conservation when simulating viscous flows around solid bodies
J. L. Cercos-Pita
M. Antuono
A. Colagrossi
A. Souto-Iglesias
<jl.cercos@upm.es>
S.P. Singh, S. Mittal
Vortex-induced oscillations at low Reynolds numbers: Hysteresis and vortex-shedding modes
* Let's consider the flow around a cylinder which may oscillate...
* If we depict the total energy variation of the fluid, and the total energy variation of the cylinder, we can see something like that...
* Oh! SPH is awesome!
* However, if we make zoom...
* ...we can see something like that
hmmm...
Suspicious...
* Hey! What's going on?...
Bah! Probably I have a bug in my code...
Let's go back home and relax!
As an engineer...
* However... As an engineer...
Fluid extensions
* So, let's try to see what is going on...
* Herein we are just considering fluid extensions
$$\boldsymbol{u}_j \stackrel{\mathrm{¯\backslash\_(ツ)\_/¯}}{\longleftrightarrow} \boldsymbol{u}_{Bj}$$
* That's critical, because an arbitrary relation can be set between the field values at the fluid extension and the field values at the boundary
* They can even become not related at all!
$\dot{\mathcal{E}}^{SPH}_M + \dot{\mathcal{E}}^{SPH}_C - \mathcal{P}^{SPH}_V =
\mathcal{P}_s^V + \mathcal{P}_s^p + \mathcal{P}_s^C$
M. Antuono, S. Marrone, A. Colagrossi, and B. Bouscasse, "Energy balance in the $\delta$-SPH scheme", Computer Methods in Applied Mechanics and Engineering , vol. 289, pp. 209–226, 2015
$$\mathcal{P}^{SPH}_V = - \frac{\mu}{2} \sum_i^{*} \sum_j^{*} V_i \, V_j \, \pi_{ij} \left(\boldsymbol{u}_j - \boldsymbol{u}_i\right) \, \nabla_i W_{ij} \le 0$$
* Following the work of Antuono, we can expand the total energy variation of the fluid in this way...
* where $\mathcal{E}^{SPH}_M$ is the mechanical energy...
* $\mathcal{E}^{SPH}_C$ is the internal energy due to the compressibility...
* $\mathcal{P}^{SPH}_V$ is the viscous dissipation function, which can be demonstrated that is actually dissipating energy
* Take care! The summations with an asterisks refer just to the fluid particles, while the summations with a bar refer just to the dummy/ghost particles
$$\dot{\mathcal{E}}^{SPH}_M + \dot{\mathcal{E}}^{SPH}_C - \mathcal{P}^{SPH}_V =
\mathcal{P}_s^V + \mathcal{P}_s^p + \mathcal{P}_s^C$$
$$\mathcal{P}_s^V = + \sum_i^{*} \overline{\sum_j} V_i \, V_j \, \mu \, \color{red}{\pi_{ij}} \, \nabla_i W_{ij} \cdot \boldsymbol{u}_i$$
$$\mathcal{P}_s^p = - \sum_i^{*} \overline{\sum_j} V_i \, V_j \, \left(p_i + \color{red}{p_j}\right) \, \nabla_i W_{ij} \cdot \boldsymbol{u}_i$$
$$\mathcal{P}_s^C = - \sum_i^{*} \overline{\sum_j} V_i \, V_j \, p_i \, \left(\color{red}{\boldsymbol{u}_j} - \boldsymbol{u}_i\right) \cdot \nabla_i W_{ij}$$
* And the terms of the right hand side are the energy variations due to the interactions with the boundary, conveniently split into viscous, pressure, and compressibility components
* We have highlighted in red the terms which are depending on the extension model applied, i.e. the terms we can control in someway
* Indeed, this expression is stating that the total variation of the fluid energy, the left hand side, is caused by the interactions with the boundary...
* So now the question mark is...
$$\mathcal{P}_s^V + \mathcal{P}_s^p + \mathcal{P}_s^C \stackrel{\color{red}{\boldsymbol{?}}}{=} \mathcal{P}^{SPH}_{body/fluid}$$
Are these terms equal to the energy variation of the solid?, $\mathcal{P}^{SPH}_{body/fluid}$
$$\mathcal{P}^{SPH}_{body/fluid} = \mathcal{P}^{p \, SPH}_{body/fluid} + \mathcal{P}^{V \, SPH}_{body/fluid}$$
$$\mathcal{P}^{p \, SPH}_{body/fluid} = - \sum_i^{*} \overline{\sum_j} V_i \, V_j \, \left(p_i + \color{red}{p_j}\right) \, \nabla_i W_{ij} \cdot \color{green}{\boldsymbol{u}_{Bj}}$$
$$\mathcal{P}^{V \, SPH}_{body/fluid} = \mu \, \sum_i^{*} \overline{\sum_j} V_i \, V_j \, \color{red}{\pi_{ij}} \, \nabla_i W_{ij} \cdot \color{green}{\boldsymbol{u}_{Bj}}$$
* To know it, we can split the mechanical energy of the solid in a similar way...
* Such that imposing momentum conservation we can achieve that...
* Effectively it is not equal to the fluid energy variation
* Again, the red terms are related to the fluid extension model, while the green terms are the actual velocity of the solid, which is out of our control
* Anyway, let's add and substrac these terms to the fluid energy variation!
$$\begin{array}{lcl} \dot{\mathcal{E}}^{SPH}_M + \dot{\mathcal{E}}^{SPH}_C - \mathcal{P}^{SPH}_V
& = & \mathcal{P}^{p \, SPH}_{body/fluid} + \mathcal{P}^{V \, SPH}_{body/fluid} \\
& + & \Delta \mathcal{P}^V + \Delta \mathcal{P}^p + \Delta \mathcal{P}^C
\end{array}$$
$$\Delta \mathcal{P}_s^V = \, \sum_i^{*} \overline{\sum_j} V_i \, V_j \, \mu \, \color{red}{\pi_{ij}} \, \left(\boldsymbol{u}_i - \color{green}{\boldsymbol{u}_{Bj}}\right) \cdot \nabla_i W_{ij}$$
$$\Delta \mathcal{P}_s^p = - \sum_i^{*} \overline{\sum_j} V_i \, V_j \, \left(p_i + \color{red}{p_j}\right) \, \left(\boldsymbol{u}_i - \color{green}{\boldsymbol{u}_{Bj}}\right) \cdot \nabla_i W_{ij}$$
$$\Delta \mathcal{P}_s^C = \, \sum_i^{*} \overline{\sum_j} V_i \, V_j \, p_i \, \left(\boldsymbol{u}_i - \color{red}{\boldsymbol{u}_j}\right) \cdot \nabla_i W_{ij}$$
* As it can be apreciated, we can express the total energy variation of the fluid as the energy variation of the solid, plus 3 extra energy terms...
* which we can patially control trough the extension model
* So the questionmark now is...
Are these terms,
$\Delta \mathcal{P}^V, \Delta \mathcal{P}^p, \Delta \mathcal{P}^C$,
pretending to be extra energy dissipation terms?
* Are these extra terms pretending to be extra dissipation terms?
* Ufff! Let's relax a bit making a numerical investigation.
Moving cylinder inside a viscous fluid
* For instance, we can consider the moving cylinder into a viscous fluid practical application
* Here we have the extra term due to the viscosity
* As it can be appreciated, is always negative, becoming in fact an extra energy dissipation
* Regarding the extra pressure driven term, becoming negative almost everytime, it may take positive values
* Therefore it cannot be considered as an extra dissipation energy
* Something similar happens with the extra energy term due to the compressibility
* However, this time is even worse, because it take positive values during a large part of the simulation
* Fortunatelly, both evil terms tends to cancel each other
* And converge relatively fast to zero
* We can also integrate the power terms, pointing out that the effect of $\Delta P^V$ is not neglectible at all
The extra terms can pump energy into the system depending on the mirroring model
* Therefore, 3 extra energy terms arise from the interaction with the boundaries
* These evil extra terms may pump spurious energy into the system
* Depending on the extension model considered!