Deriving smoothing kernels 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?
 A: 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:

*

*Kernel normalization in Smoothed Particle Hydrodynamcs

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.
