I'm watching a video on smoothed particle hydrodynamics it just blindly claims that these smoothing kernels are pretty good.

$$W(r-r_b,h)\equiv\dfrac{315}{64\pi h^9}\left(h^2-|r-r_b|^2\right)^3$$ $$\nabla W(r-r_b,h)\equiv\dfrac{-45}{\pi h^6}\left(h-|r-r_b|\right)^2\left(\dfrac{r-r_b}{|r-r_b|}\right)$$ $$\nabla^2W\equiv\dfrac{45}{\pi h^6}\left(h-|r-r_b|\right)$$

However, it provides no citation, nor does it explain how each of these terms are derived.

Where do these come from?

  • $\begingroup$ Have you looked at Wikipedia? For instance Kernel smoother, Kernel (statistics), etc. $\endgroup$
    – Kyle Kanos
    Feb 19, 2023 at 3:13
  • $\begingroup$ I hadn't, but I just have and neither of your links seem to show where these particular values come from... I'm not asking what a smoothing kernel is... I'm asking where the values for this one come from $\endgroup$ Feb 19, 2023 at 3:19
  • $\begingroup$ Looks pretty close to the quartic biweights to me, but what do I know. $\endgroup$
    – Kyle Kanos
    Feb 19, 2023 at 3:25
  • $\begingroup$ Does it? The Quartic Biweight in the link is $K(u)=\dfrac{15}{16}}(1-u^2)^2$ admittedly, I could be missing some important information to join the dots here, SPH is very new to me $\endgroup$ Feb 19, 2023 at 3:31
  • $\begingroup$ Whoops, I should have said the tri-weight, not biweight. Either way, the information you're missing is in the articles. $\endgroup$
    – Kyle Kanos
    Feb 19, 2023 at 3:36

1 Answer 1


To be clear, there is only one kernel listed in that trio of equations, $$W(r-r_b,\,h)\sim h^{-9}\left(h^2-\vert r-r_b\vert^2\right)^3.\tag{1}$$ The latter two equations are the gradient (first derivative) and laplacian (second derivative) of the kernel, $W(r-r_b,\,h)$. In this kernel, $r$ and $r_b$ are the centroids of the computational particles while $h$ is the scale distance such that if $||r-r_b||>h$, the kernel yields zero (which would physically mean that the two particles are separated by such a distance so as to not interact).

If you define $u=\vert r-r_b\vert/h$, then we can write Eq (1) as, $$W(u)\sim h^{-3}\left(1-u^2\right)^3$$ which takes the form of the tri-weight kernel listed in the first Wikipedia link. In order to make it fully equal, you need to use the fact that kernels are normalized over all space, $$\int W(r-r_b,\,h)\,\mathrm{d}V\equiv1,$$ (as well as symmetric about the centroid, but I think that's nothing to worry about right here). If you apply this normalization condition in the correct geometry (I'm assuming 3D spherical coordinates), you should arrive at the same formula the source lists for you.

See also:

In terms of deriving a function $W(r,\,h)$, you must satisfy the two properties of the kernel function (symmetry & normalization), but it is also useful to ensure that,

  • it is compactly supported (i.e., its domain is $[-h,\,h]$ such that $W(r,\,h)=0$ for $|r|>h$.
  • it is strictly positive ($W(r,\,h)\geq0$ for all $r$) with (at least) two continuous derivatives
  • it is monotonically decreasing from the centroid ($r=0$)
  • it should approach the Dirac delta as $h\to0$

For use in numerical codes, you also want something that can be efficiently computed, since this function would be invoked many times for each time step in the evolution, with each operation in the function adding time to the simulation runtime.
In this case, I imagine that the author's made the claim because the cubic function performs well enough that higher-order functions are less common, though I've not been involved in any SPH research work for a long time.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.