SPH Kernels¶
Definition of some SPH kernel functions
-
class
pysph.base.kernels.
CubicSpline
(dim=1)[source]¶ Bases:
object
Cubic Spline Kernel: [Monaghan1992]
\[\begin{split}W(q) = \ &\sigma_3\left[ 1 - \frac{3}{2}q^2\left( 1 - \frac{q}{2} \right) \right], \ & \textrm{for} \ 0 \leq q \leq 1,\\ = \ &\frac{\sigma_3}{4}(2-q)^3, & \textrm{for}\ 1 < q \leq 2,\\ = \ &0, & \textrm{for}\ q>2, \\\end{split}\]where \(\sigma_3\) is a dimensional normalizing factor for the cubic spline function given by:
\[\begin{split}\sigma_3 = \ & \frac{2}{3h^1}, & \textrm{for dim=1}, \\ \sigma_3 = \ & \frac{10}{7\pi h^2}, \ & \textrm{for dim=2}, \\ \sigma_3 = \ & \frac{1}{\pi h^3}, & \textrm{for dim=3}. \\\end{split}\]References
[Monaghan1992] J. Monaghan, Smoothed Particle Hydrodynamics, “Annual Review of Astronomy and Astrophysics”, 30 (1992), pp. 543-574.
-
class
pysph.base.kernels.
Gaussian
(dim=2)[source]¶ Bases:
object
Gaussian Kernel: [Liu2010]
\[\begin{split}W(q) = \ &\sigma_g e^{-q^2}, \ & \textrm{for} \ 0\leq q \leq 3,\\ = \ & 0, & \textrm{for} \ q>3,\\\end{split}\]where \(\sigma_g\) is a dimensional normalizing factor for the gaussian function given by:
\[\begin{split}\sigma_g = \ & \frac{1}{\pi^{1/2} h^1}, \ & \textrm{for dim=1}, \\ \sigma_g = \ & \frac{1}{\pi h^2}, \ & \textrm{for dim=2}, \\ \sigma_g = \ & \frac{1}{\pi^{3/2} h^3}, & \textrm{for dim=3}. \\\end{split}\]References
[Liu2010] (1, 2) M. Liu, & G. Liu, Smoothed particle hydrodynamics (SPH): an overview and recent developments, “Archives of computational methods in engineering”, 17.1 (2010), pp. 25-76.
-
class
pysph.base.kernels.
QuinticSpline
(dim=2)[source]¶ Bases:
object
Quintic Spline SPH kernel: [Liu2010]
\[\begin{split}W(q) = \ &\sigma_5\left[ (3-q)^5 - 6(2-q)^5 + 15(1-q)^5 \right], \ & \textrm{for} \ 0\leq q \leq 1,\\ = \ &\sigma_5\left[ (3-q)^5 - 6(2-q)^5 \right], & \textrm{for} \ 1 < q \leq 2,\\ = \ &\sigma_5 \ (3-q)^5 , & \textrm{for} \ 2 < q \leq 3,\\ = \ & 0, & \textrm{for} \ q>3,\\\end{split}\]where \(\sigma_5\) is a dimensional normalizing factor for the quintic spline function given by:
\[\begin{split}\sigma_5 = \ & \frac{120}{h^1}, & \textrm{for dim=1}, \\ \sigma_5 = \ & \frac{7}{478\pi h^2}, \ & \textrm{for dim=2}, \\ \sigma_5 = \ & \frac{3}{359\pi h^3}, & \textrm{for dim=3}. \\\end{split}\]Raises: NotImplementedError
– Quintic spline currently only supports 2D kernels.