Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
766363b0
Commit
766363b0
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Corrections to the kernel definition TeX document
parent
e38e33dc
No related branches found
No related tags found
1 merge request
!138
More physical definition of SPH kernel functions
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theory/kernel/kernel_definitions.tex
+21
-33
21 additions, 33 deletions
theory/kernel/kernel_definitions.tex
with
21 additions
and
33 deletions
theory/kernel/kernel_definitions.tex
+
21
−
33
View file @
766363b0
...
...
@@ -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{
equatio
n}
\end{
alig
n}
\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{
equatio
n}
\nonumber
\end{
alig
n}
\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}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment