# A Comparative Study on Violent Sloshing with Complex Baffles Using the ISPH Method
## 2 ISPH Methodology  
The standard SPH approach (i.e., weakly compressible SPH) has quite a few appealing advantages; it is easy to program and does not involve the pressure boundary problem. However, it can cause substantial spurious pressure fluctuations unless some additional correction schemes are used to overcome the issue. An alternative ISPH numerical scheme has emerged as a result. It essentially projects the intermediate velocity of particles onto a divergence-free space or their intermediate density onto a density-invariance field by solving a pressure Poisson equation based on strict hydrodynamic formulations [23]. The ISPH model is based on the semi-Lagrangian form of the continuity equation and momentum equations, in which fluid density is considered to be a constant, and thus the governing equations are written as follows:  
\[\
abla\cdot\mathbf{u}=0 \tag{1}\]  
\[\frac{D\mathbf{u}}{Dt}=-\frac{1}{\rho}\
abla P+\mathbf{g}+\
u_{0}\
abla^{2}\mathbf{u} \tag{2}\]  
where \(\rho\) is the fluid density; \(\mathbf{u}\) is the particle velocity; \(t\) is the time; \(P\) is the particle pressure; \(\mathbf{g}\) is the gravitational acceleration; and \(\
u_{0}\) is the kinematic viscosity. A two-step projection method is used to solve the velocity and pressure fields of Equations (1) and (2). The first step is the prediction of velocity in the time domain without considering the pressure term. The intermediate particle velocity \(\mathbf{u}^{*}\) and position \(\mathbf{r}^{*}\) are obtained by  
\[\mathbf{u}^{*}=\mathbf{u}^{t}+\Delta\mathbf{u}^{*}, \tag{3}\]  
\[\Delta\mathbf{u}^{*}=\left(\mathbf{g}+\
u_{0}\
abla^{2}\mathbf{u}\right)\Delta t, \tag{4}\]  
\[\mathbf{r}^{*}=\mathbf{r}^{t}+\mathbf{u}^{*}\Delta t \tag{5}\]  
where \(\mathbf{u}^{t}\) and \(\mathbf{r}^{t}\) are the velocity and position at time \(t\); \(\Delta t\) is the time step; \(\Delta\mathbf{u}^{*}\) is the velocity increment; and \(\mathbf{u}^{*}\) and \(\mathbf{r}^{*}\) are the intermediate velocity and position of the particle.  
The second step is the correction step in which the incompressibility is imposed, and \(\Delta\mathbf{u}^{**}\) is the change of velocity in the correction step  
\[\Delta\mathbf{u}^{**}=-\frac{1}{\rho}\
abla P^{t+\Delta t}\Delta t \tag{6}\]  
The following \(\mathbf{u}^{t+\Delta t}\) and \(\mathbf{r}^{t+\Delta t}\) represent the velocity and position of the particle at the next time step  
\[\mathbf{u}^{t+\Delta t}=\mathbf{u}^{*}+\Delta\bm  
where \(\alpha\) is a tuning coefficient and a value of 0.01 is adopted in this paper based on the computational experience. More advanced PPEs with the error-compensating source term (ECS) are documented by [24; 25]. The treatment of free surface and solid boundary conditions follows the study of [PERSON] et al. [26].  
For the tuning coefficient \(\alpha\), it should be noted that in the ISPH computation, if this value is too large, the left term on the RHS equation dominates. Therefore, the density-invariance effect is larger and the incompressibility of fluid is better conserved. However, this may lead to substantial pressure noises and particle randomness. On the other hand, if this tuning value is too small, the right term on the RHS of Equation (11) dominates and the flow is more controlled by the velocity divergence-free criterion. As a result, a more smooth and stable velocity and pressure field can be achieved, but the incompressibility of the fluids may be violated. A delicate balance should be found depending on a variety of influence factors such as the particle resolution and application case. We tried different values of this coefficient to achieve the best match with benchmark data in our previous work. It has been found that a value of around 0.01 is more or less suitable for violent flow processes such as dam break or liquid sloshing with a large deformation of the free surface.