SPH Kernels

Definition of some SPH kernel functions

class pysph.base.kernels.CubicSpline(dim=1)[source]

Bases: object

Cubic Spline Kernel: [Monaghan1992]

W(q)= σ3[132q2(1q2)], for 0q1,= σ34(2q)3,for 1<q2,= 0,for q>2,

where σ3 is a dimensional normalizing factor for the cubic spline function given by:

σ3= 23h1,for dim=1,σ3= 107πh2, for dim=2,σ3= 1πh3,for dim=3.

References

get_deltap()[source]
gradient(xij=[0.0, 0, 0], rij=1.0, h=1.0, grad=[0, 0, 0])[source]
gradient_h(xij=[0.0, 0, 0], rij=1.0, h=1.0)[source]
kernel(xij=[0.0, 0, 0], rij=1.0, h=1.0)[source]
class pysph.base.kernels.Gaussian(dim=2)[source]

Bases: object

Gaussian Kernel: [Liu2010]

W(q)= σgeq2, for 0q3,= 0,for q>3,

where σg is a dimensional normalizing factor for the gaussian function given by:

σg= 1π1/2h1, for dim=1,σg= 1πh2, for dim=2,σg= 1π3/2h3,for dim=3.

References

get_deltap()[source]
gradient(xij=[0.0, 0, 0], rij=1.0, h=1.0, grad=[0.0, 0, 0])[source]
gradient_h(xij=[0.0, 0.0, 0.0], rij=1.0, h=1.0)[source]
kernel(xij=[0.0, 0, 0], rij=1.0, h=1.0)[source]
class pysph.base.kernels.QuinticSpline(dim=2)[source]

Bases: object

Quintic Spline SPH kernel: [Liu2010]

W(q)= σ5[(3q)56(2q)5+15(1q)5], for 0q1,= σ5[(3q)56(2q)5],for 1<q2,= σ5 (3q)5,for 2<q3,= 0,for q>3,

where σ5 is a dimensional normalizing factor for the quintic spline function given by:

σ5= 120h1,for dim=1,σ5= 7478πh2, for dim=2,σ5= 3359πh3,for dim=3.
Raises:NotImplementedError – Quintic spline currently only supports 2D kernels.
get_deltap()[source]
gradient(xij=[0.0, 0, 0], rij=1.0, h=1.0, grad=[0.0, 0, 0])[source]
gradient_h(xij=[0.0, 0, 0], rij=1.0, h=1.0)[source]
kernel(xij=[0.0, 0, 0], rij=1.0, h=1.0)[source]
class pysph.base.kernels.WendlandQuintic(dim=2)[source]

Bases: object

get_deltap()[source]
gradient(xij=[0.0, 0, 0], rij=1.0, h=1.0, grad=[0, 0, 0])[source]
gradient_h(xij=[0.0, 0, 0], rij=1.0, h=1.0)[source]
kernel(xij=[0.0, 0, 0], rij=1.0, h=1.0)[source]
pysph.base.kernels.get_compiled_kernel(kernel)[source]

Given a kernel, return a high performance wrapper kernel.

pysph.base.kernels.get_correction(kernel, h0)[source]