# Artificial Viscosity

As usual in SPH 1 implementations, viscosity is rather an inter-particles pressure than a bulk pressure. It was shown that the use of 式 1 and 式 2 generates a substantial amount of entropy in regions of strong shear even if there is no compression.(1)
${\pi }_{ij}=\frac{-{q}_{b}\frac{{c}_{i}+{c}_{j}}{2}{\mu }_{ij}+{q}_{\alpha }{\mu }_{ij}^{2}}{\frac{\left({\rho }_{i}+{\rho }_{j}\right)}{2}}$
with (2)
${\mu }_{ij}=\frac{{d}_{ij}\left({v}_{i}-{v}_{j}\right)•\left({X}_{i}-{X}_{j}\right)}{{‖{X}_{i}-{X}_{j}‖}^{2}+\epsilon {d}_{ij}^{2}}$
Where, ${X}_{i}$ (resp. ${X}_{j}$ ) indicates the position of particle I (resp. $j$ ) and ${c}_{i}$ (resp ${c}_{j}$ ) is the sound speed at location $i$ (resp. $j$ ), and ${q}_{a}$ and ${q}_{b}$ are constants. This leads us to introduce 式 3 and 式 4. 2 The artificial viscosity is decreased in regions where vorticity is high with respect to velocity divergence.(3)
${\pi }_{ij}=\frac{-{q}_{b}\frac{{c}_{i}+{c}_{j}}{2}{\mu }_{ij}+{q}_{\alpha }{\mu }_{ij}^{2}}{\frac{\left({\rho }_{i}+{\rho }_{j}\right)}{2}}$
with (4)
${\mu }_{ij}=\frac{{d}_{ij}\left({v}_{i}-{v}_{j}\right)•\left({X}_{i}-{X}_{j}\right)}{{‖{X}_{i}-{X}_{j}‖}^{2}+\epsilon {d}_{ij}^{2}}\frac{\left({f}_{i}+{f}_{j}\right)}{2},{f}_{k}=\frac{‖{\nabla \cdot v|}_{k}‖}{‖{\nabla \cdot v|}_{k}‖+‖{\nabla ×v|}_{k}‖+{\epsilon }^{\prime }\frac{{c}_{k}}{{d}_{k}}}$

Default values for ${q}_{a}$ and ${q}_{b}$ are respectively set to 2 and 1.

1 Monaghan J.J., 「Smoothed Particle Hydrodynamics」, Annu.Rev.Astron.Astro-phys; Vol. 30; pp. 543-574, 1992.
2 Balsara D.S., 「Von Neumann Stability Analysis of Smoothed Particle Hydrodynamics Suggestions for Optimal Algorithms」, Journal of Computational Physics, Vol. 121, pp. 357-372, 1995.