Formulation - YuriOku/1D_SPH GitHub Wiki
There are several ways to formulate the time evolution equations in the SPH method. The following two systems of equations are implemented in 1D_SPH. These methods are derived and explained in detail in Rosswog (2009). Please refer to Rosswog (2009) if you are interested.
Vanilla ice
The standard method to obtain the time evolution equation for SPH particles is to discretize the system of fluid equations expressed in Lagrange form by a kernel approximation. In the SPH method, the motion of the SPH particle represents the fluid flow, so the conservation of mass is automatically satisfied, and the continuity equation is not needed. The equation of motion and energy equation is
,where is velocity, is pressure, is density and is internal energy per unit mass. The spatial derivative is calculated using the kernel approximation. Under the kernel approximation, the physical quantity is expressed as
,where is the kernel function for the particle spread. When this is discretized using the volume element of each SPH particle, it becomes
.
The volume element is obtained from the physical quantity of the SPH particle and the corresponding continuous quantity as , where is used as standard. For more information, please see the volume element page. The spatial derivative of is expressed as
.
For the calculation of , see Kernel Interpolation Method. Before applying eq. (3) to the right-hand side of the equation of motion, we use the relation
(Monaghan 1992) so that the equation is antisymmetric for the exchange of i, j where is a constant. Traditionally, the form for the case is used, which is naturally obtained from the derivative of , but 1D_SPH uses to suppress the noise that is generated when there are SPH particles of different masses (Ritchie & Thomas 2001). The form with is used in GASOLINE2 (Wadsley et al. 2017) and MAGMA2 (Rosswog 2020). The SPH system of equations then becomes
Here, .
Lagrangian
Another way to derive the SPH equation is to start with the Lagrangian and use the variational principle. The Lagrangian of the SPH particle system is
.
This is substituted into the Euler-Lagrange equation
.
The first term is the left-hand side of the equation of motion. Substituting the Lagrangian into the second term, we obtain
.
Now, using the first law of thermodynamics for isentropic flow
, the Euler-Lagrange equation becomes
.
When we formulate the SPH equations from the density (the case with ), substitute
into eq. (8). Then the derivative of the density becomes
, where
is a term to take into account changes in the smoothing length Called the "grad-h-term". The equation of motion
can be obtained by transforming the equation, paying attention to the subscripts.
The time derivative of the energy is
From the first law of thermodynamics.
For the case with a general volume element, we substitute
into Euler-Lagrange eq. (8) and obtain
.
References
- Monaghan, J. J., “Smoothed particle hydrodynamics.”, Annual Review of Astronomy and Astrophysics, vol. 30, pp. 543–574, 1992. doi:10.1146/annurev.aa.30.090192.002551.
- Ritchie, B. W. and Thomas, P. A., “Multiphase smoothed-particle hydrodynamics”, Monthly Notices of the Royal Astronomical Society, vol. 323, no. 3, pp. 743–756, 2001. doi:10.1046/j.1365-8711.2001.04268.x.
- Rosswog, S., ``Astrophysical smooth particle hydrodynamics'', New Astronomy Reviews, vol. 53, no. 4–6, pp. 78–104, 2009. doi:10.1016/j.newar.2009.08.007.
- Rosswog, S., “The Lagrangian hydrodynamics code MAGMA2”, Monthly Notices of the Royal Astronomical Society, vol. 498, no. 3, pp. 4230–4255, 2020. doi:10.1093/mnras/staa2591.
- Wadsley, J. W., Keller, B. W., and Quinn, T. R., “Gasoline2: a modern smoothed particle hydrodynamics code”, Monthly Notices of the Royal Astronomical Society, vol. 471, no. 2, pp. 2357–2369, 2017. doi:10.1093/mnras/stx1643.