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