IISPH: Implicit Incompressible SPH
Method

\[\mathbf{F}_i^p(t) = -m_i \sum_j m_j \left( \frac{p_i(t)}{\rho_i^2(t)} + \frac{p_j(t)}{\rho_j^2(t)} \right) \nabla W_{ij}(t).\]
Predict Advection
\[\frac{\rho_i(t+\Delta t)-\rho_i(t)}{\Delta t}=\sum_j m_j \mathbf{v}_{ij}(t+\Delta t)\nabla W_{ij}(t).\]Here, \(\mathbf{v}_{ij} = \mathbf{v}_i - \mathbf{v}_j\) is the still-unknown relative velocity. Applying the semi-implicit Euler scheme to compute and update \(\mathbf{v}_{ij}(t + \Delta t)\) gives
\[\mathbf{v}_i(t + \Delta t) = \mathbf{v}_i(t) + \Delta t \frac{\mathbf{F}^{adv}_{i}(t) + \mathbf{F}^{p}_{i}(t)}{m_i}\]At this point, the pressure force and non-pressure force can be separated.
The goal is to fill in with \(\rho^p\) the difference between the compression of density caused by \(\rho^{adv}\) (which should not induce any density change) and the rest density \(\rho_0\), i.e., to derive \(\rho_0 - \rho^{adv}\).
When this is done, the non-pressure force can act more freely without worrying about abnormal compression.
To this end, separating out the velocity due to the non-pressure force yields the following,
\[\mathbf{v}^{adv}_i(t + \Delta t) = \mathbf{v}i(t) + \Delta t \frac{\mathbf{F}^{adv}_{i}(t)}{m_i}\]and computing \(\mathbf{v}^{adv}_{ij}\):
\[\mathbf{v}^{adv}_{ij} = \Delta t \left( \frac{\mathbf{F}_{p_i}(t)}{m_i} - \frac{\mathbf{F}_{p_j}(t)}{m_j} \right)\]The corresponding density is then derived as follows:
\[\rho_i^{adv} = \rho_i(t) + \Delta t \sum_j m_j \mathbf{v}_{ij}^{adv} \nabla W_{ij}(t)\]Since the target state of the density is \(\rho_0\), setting \(\rho_i(t + \Delta t) =\rho_0\) gives
\[\frac{\rho_i(t + \Delta t) - \rho^{adv}_i(t)}{\Delta t} = \sum_j m_j \mathbf{v}_{ij}(t + \Delta t) \nabla W_{ij}(t) \quad \\\\ = \frac{\rho_0 - \rho^{adv}_i(t)}{\Delta t} = \sum_j m_j \mathbf{v}_{ij}(t + \Delta t) \nabla W_{ij}(t) \\\\ \Leftrightarrow \rho_0 - \rho^{adv}_i(t) = \Delta t^2 \sum_j m_j \left( \frac{\mathbf{F}^{p}_{i}(t)}{m_i} - \frac{\mathbf{F}^{p}_{j}(t)}{m_j} \right) \nabla W_{ij}(t)\]That is, the difference between the rest density and the density due to the non-pressure force is expressed in terms of the pressure force, mass, and the gradient of the kernel!
Here, substituting the equation for \(\mathbf{F}^p_i\), the finally derived equation becomes a linear system for the pressure of the i-th particle,
\(\mathbf{A}(t)\mathbf{p}(t) = \mathbf{b}(t)\):
\[\begin{aligned} \Delta t^2 \frac{\mathbf{F}_i^p}{m_i} &= -\Delta t^2 \sum_j m_j \left( \frac{p_i}{\rho_i^2} + \frac{p_j}{\rho_j^2} \right) \nabla W_{ij} \\ &= \underbrace{\left( -\Delta t^2 \sum_j \frac{m_j}{\rho_i^2} \nabla W_{ij} \right)}_{\mathbf{d}_{ii}} p_i + \sum_j \underbrace{-\Delta t^2 \frac{m_j}{\rho_j^2} \nabla W_{ij}}_{\mathbf{d}_{ij}} p_j, \end{aligned}\] \[\rho_0 - \rho_i^{adv} = \sum_j m_j \left( \mathbf{d}_{ii} p_i + \sum_j \mathbf{d}_{ij} p_j - \mathbf{d}_{jj} p_j - \sum_k \mathbf{d}_{jk} p_k \right) \nabla W_{ij}.\] \[\sum_k \mathbf{d}_{jk} p_k = \sum_{k \neq i} \mathbf{d}_{jk} p_k + \mathbf{d}_{ji} p_i.\] \[\begin{aligned} \rho_0 - \rho_i^{adv} &= p_i \sum_j m_j \left( \mathbf{d}_{ii} - \mathbf{d}_{ji} \right) \nabla W_{ij} + \\ &\quad \sum_j m_j \left( \sum_j \mathbf{d}_{ij} p_j - \mathbf{d}_{jj} p_j - \sum_{k \neq i} \mathbf{d}_{jk} p_k \right) \nabla W_{ij}. \end{aligned}\] \[a_{ii} = \sum_j m_j \left( \mathbf{d}_{ii} - \mathbf{d}_{ji} \right) \nabla W_{ij},\]⇒ The pressure solve step via the Solver
Pressure Solve
The paper uses the relaxed Jacobi method. Using what was derived above,
\[p_i^{l+1} = (1-\omega)p_i^l + \omega\frac{\rho_0 - \rho_i^{adv} - \sum_{j\neq i} a_{ij}p_j^l}{a_{ii}},\] \[p_i^{l+1} = (1-\omega)p_i^l + \omega\frac{1}{a_{ii}}\left(\rho_0 - \rho_i^{adv} - \sum_j m_j\left(\sum_j \mathbf{d}_{ij}p_j^l - \mathbf{d}_{jj}p_j^l - \sum_{k\neq i}\mathbf{d}_{jk}p_k^l\right)\nabla W_{ij}\right).\]- \(\mathbf{d}_{ii}, a_{ii}\) is precomputed and reused
- \(\omega = 0.5\)
- The termination condition ends when the compression drops below a certain threshold