Skip to content
Snippets Groups Projects
Commit 766363b0 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Corrections to the kernel definition TeX document

parent e38e33dc
No related branches found
No related tags found
1 merge request!138More physical definition of SPH kernel functions
......@@ -36,16 +36,16 @@ hence be written (in 3D) as
W(\vec{x},h) \equiv \frac{1}{H^3}f\left(\frac{|\vec{x}|}{H}\right),
\end{equation}
where $H(h)$ is defined below and $f(u)$ is a dimensionless function,
usually a low-order polynomial, such that $f(u \geq 1) = 0$ and
normalised such that
where $H=\gamma h$ is defined below and $f(u)$ is a dimensionless
function, usually a low-order polynomial, such that $f(u \geq 1) = 0$
and normalised such that
\begin{equation}
\int f(|\vec{u}|){\rm d}^3u = 1.
\end{equation}
$H$ is the kernel's support radius and is used as the ``smoothing
length'' in the Gadget code( {i.e.} $H(h)=h$). This definition is,
length'' in the Gadget code( {i.e.} $H=h$). This definition is,
however, not very physical and makes comparison of kernels at a
\emph{fixed resolution} difficult. A more sensible definition of the
smoothing length, related to the Taylor expansion of the
......@@ -64,8 +64,8 @@ The smoothing length is then:
\end{equation}
Each kernel, {\it i.e.} defintion of $f(u)$, will have a different
ratio $h/H$. So for a \emph{fixed resolution} $h$, one will have
different kernel support sizes, $H$, and different number of
ratio $\gamma = H/h$. So for a \emph{fixed resolution} $h$, one will
have different kernel support sizes, $H$, and a different number of
neighbours, $N_{\rm ngb}$ to interact with. One would typically choose
$h$ for a simulation as a multiple $\eta$ of the mean-interparticle
separation:
......@@ -87,9 +87,10 @@ useful quantity to use in implementations of SPH. It is defined as (in
Once the fixed ratio $\gamma= H/h$ is known (via equations
\ref{eq:sph:sigma} and \ref{eq:sph:h}) for a given kernel, the number
of neighbours only depends on the resolution $\eta$. For the usual
cubic spline kernel (see below), setting the simulation resolution to
$\eta=1.2348$ yields the commonly used value $N_{\rm ngb} = 48$.
of neighbours only depends on the resolution parameter $\eta$. For
the usual cubic spline kernel (see below), setting the simulation
resolution to $\eta=1.2348$ yields the commonly used value $N_{\rm
ngb} = 48$.
\section{Kernels available in \swift}
......@@ -130,35 +131,21 @@ The kernel function $f(u)$ reads:
\end{equation}
\subsubsection{Quartic spline ($M_5$) kernel}
In 3D, we have $C=\frac{15625}{512\pi}$ and $\gamma=H/h = 1.825742$.\\
The kernel function $f(u)$ reads:
\begin{equation}
M_4(u) = \left\lbrace\begin{array}{rcl}
3u^3 - 3u^2 + \frac{1}{2} & \mbox{if} & u<\frac{1}{2}\\
-u^3 + 3u^2 - 3u + 1 & \mbox{if} & u \geq \frac{1}{2}
\end{array}
\right.
\nonumber
\end{equation}
\subsubsection{Quartic spline ($M_5$) kernel}
In 3D, we have $C=\frac{15625}{512\pi}$ and $\gamma=H/h = 2.018932$.\\
The kernel function $f(u)$ reads:
\begin{equation}
M_5(u) = \left\lbrace\begin{array}{rcl}
\begin{align}
M_5(u) &= \nonumber\\
&\left\lbrace\begin{array}{rcl}
6u^4 - \frac{12}{5}u^2 + \frac{46}{125} & \mbox{if} & u < \frac{1}{5} \\
-4u^4 + 8u^3 - \frac{24}{5}u^2 + \frac{8}{25}u + \frac{44}{125} & \mbox{if} & \frac{1}{5} \leq u < \frac{3}{5}\\
u^4 - 4u^3 + 6u^2 - 4u + 1 & \mbox{if} & \frac{3}{5} \leq u \\
\end{array}
\right.
\nonumber
\end{equation}
\end{align}
\subsubsection{Quintic spline ($M_6$) kernel}
......@@ -166,15 +153,16 @@ The kernel function $f(u)$ reads:
In 3D, we have $C=\frac{2187}{40\pi}$ and $\gamma=H/h = 2.195775$.\\
The kernel function $f(u)$ reads:
\begin{equation}
M_6(u) = \left\lbrace\begin{array}{rcl}
\begin{align}
M_6(u) &= \nonumber\\
&\left\lbrace\begin{array}{rcl}
-10u^5 + 10u^4 - \frac{20}{9}u^2 + \frac{22}{81} & \mbox{if} & u < \frac{1}{3} \\
5u^5 - 15u^4 + \frac{50}{3}u^3 - \frac{70}{9}u^2 + \frac{25}{27}u + \frac{17}{81} & \mbox{if} & \frac{1}{3} \leq u < \frac{2}{3}\\
-1u^5 + 5u^4 - 10u^3 + 10u^2 - 5u + 1. & \mbox{if} & u \geq \frac{2}{3}
\end{array}
\right.
\nonumber
\end{equation}
\nonumber
\end{align}
\subsubsection{Wendland C2 kernel}
......@@ -194,7 +182,7 @@ In 3D, we have $C=\frac{495}{32\pi}$ and $\gamma=H/h = 2.207940$.\\
The kernel function $f(u)$ reads:
\begin{align}
\Psi_{i,j}(u) &= \frac{35}{3}u^8 - 64u^7 + 140u^6\\
\Psi_{i,j}(u) &= \frac{35}{3}u^8 - 64u^7 + 140u^6 \nonumber\\
& - \frac{448}{3}u^5 + 70u^4 - \frac{28}{3}u^2 + 1
\nonumber
\end{align}
......@@ -206,7 +194,7 @@ In 3D, we have $C=\frac{1365}{64\pi}$ and $\gamma=H/h = 2.449490$.\\
The kernel function $f(u)$ reads:
\begin{align}
\Psi_{i,j}(u) &= 32u^{11} - 231u^{10} + 704u^9 - 1155u^8\\
\Psi_{i,j}(u) &= 32u^{11} - 231u^{10} + 704u^9 - 1155u^8 \nonumber\\
& + 1056u^7 - 462u^6 + 66u^4 - 11u^2 + 1
\nonumber
\end{align}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment