## 2 Characteristics, Principles, and a Case Study of SPH
### A Case Study of SPH  
The formulation of smoothed particle hydrodynamics (SPH) equations is derived from the Navier-Stokes (N-S) equations. In the context of generalized fluid mechanics, both kernel and particle approximation methods are employed to spatially discretize these equations. This results in the development of SPH equations that are applicable to a broad range of fluid mechanics scenarios. The process yields a set of time-dependent ordinary differential equations that can be solved using time integration techniques. Consequently, the application of the SPH approximation method facilitates the spatial discretization of the Navier-Stokes equations, leading to the following representation of the SPH equation. 1. Mass conservation: Density method: \[\rho_{i}=\sum_{j=1}^{N}m_{j}W_{\bar{i}j}\] (27) \[\rho_{i}=\frac{\sum_{j=1}^{N}m_{j}W_{\bar{i}j}}{\sum_{j=1}^{N}\left(\frac{m_{ j}}{\rho_{i}}\right)W_{\bar{i}j}}\] (28) Continuity density method: \[\frac{d\rho_{i}}{dt}=\rho_{i}\sum_{j=1}^{N}\frac{m_{j}}{\rho_{j}}\left({v_{i}} ^{\beta}-{v_{j}}^{\beta}\right)\bullet\frac{\partial W_{\bar{i}j}}{\partial x_{ i}\bar{P}}\] (29) \[\frac{d\rho_{i}}{dt}=\sum_{j=1}^{N}m_{j}\left({v_{i}}^{\beta}-{v_{j}}^{\beta} \right)\bullet\frac{\partial W_{\bar{i}j}}{\partial x_{i}\bar{P}}\] (30) 2. Momentum conservation: \[\frac{d{v_{i}^{\alpha}}}{dt}=\sum_{j=1}^{N}m_{j}\left(\frac{\sigma_{i}^{ \alpha\beta}}{\rho_{i}^{2}}+\frac{\sigma_{j}^{\alpha\beta}}{\rho_{j}^{2}} \right)\frac{\partial W_{\bar{i}j}}{\partial_{i}^{\beta}}\] (31) 3. Energy conservation: \[\frac{de_{i}}{dt}=\frac{1}{2}\sum_{j=1}^{N}m_{j}\frac{P_{i}+P_{j}}{\rho_{i} \rho_{j}}\
u_{\bar{i}}^{\beta}\frac{\partial W_{\bar{i}j}}{\partial x_{i}^{ \beta}}+\frac{u_{i}}{2\rho_{i}}\epsilon_{i}{}^{\alpha\beta}\epsilon_{j}^{ \alpha\beta}\] (32) \[\frac{de_{i}}{dt}=\frac{1}{2}\sum_{j=1}^{N}m_{j}\left(\frac{P_{i}}{\rho_{i}^{2 }}+\frac{P_{j}}{\rho_{j}^{2}}\right)\
u_{\bar{i}}^{\beta}\frac{\partial W_{ \bar{i}j}}{\partial x_{i}^{\beta}}+\frac{u_{i}}{2\rho_{i}}\epsilon_{i}{}^{ \alpha\beta}\epsilon_{j}^{\alpha\beta}\] (33)  
The simulation steps of smoothed particle hydrodynamics (SPH) are depicted in Figure 6. Initially, fundamental properties such as position, velocity, mass, and other relevant parameters are assigned to each particle. Subsequently, neighboring particles are identified for each particle, with neighbors determined based on a specified distance using the kernel function. The density of each particle is then calculated by considering the mass and position of its neighboring particles, typically achieved through the accumulation of their contributions via the kernel function. Using the equation of state, the pressure for each particle is derived from the computed density. The pressure gradient is then employed to calculate the forces between particles, ensuring the effective simulation of fluid dynamic interactions. Additionally, to account for fluid viscosity, the internal friction effects are captured by evaluating the additional forces introduced by the gradient of the velocity. After calculating the internal forces, an external force, such as gravity, is applied to update the total force acting on each particle. Based on this total force, a time integration method is employed to update the velocity and position of the particles, ensuring that the simulationevolves accurately over time. Finally, upon completing a round of calculations, a decision is made regarding whether to continue the simulation. Depending on the established conditions, it is determined whether to conclude the simulation or return to the neighbor identification stage for the next round of calculations. Through this series of steps, the SPH method effectively simulates the dynamic behavior of fluids. The simulation algorithm is outlined in Algorithm 1.