Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
2d4599dd
Commit
2d4599dd
authored
Sep 29, 2016
by
Matthieu Schaller
Browse files
Wrote the section of the documentation on the EoS.
parent
1a8f00d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
theory/SPH/EoS/eos.tex
View file @
2d4599dd
aa
In
\swift
, all transformations between thermodynamical quantities are
computed using a pre-defined equation of state (EoS) for the gas. This
allows user to switch EoS without having to modify the equations of
SPH. The definition of the EoS takes the form of simple relations
between thermodynamic quantities. All of them must be specified even
when they default to constants.
%#######################################################################################################
\subsection
{
Ideal Gas
}
\label
{
sec:eos:ideal
}
This is the simplest and most common equation of state. It corresponds
to a gas obeying a pressure law
$
P
=
(
\gamma
-
1
)
\rho
u
$
, where
$
u
$
is
the gas' internal energy,
$
\rho
$
its density and
$
\gamma
$
the
(user defined) adiabatic index, often assumed to be
$
5
/
3
$
or
$
7
/
5
$
. For such a gas,
we have the following relations between pressure (
$
P
$
), internal energy
(
$
u
$
), density (
$
\rho
$
), sound speed (
$
c
$
) and entropic function (
$
A
$
):
\begin{align}
P
&
= P
_{
\rm
eos
}
(
\rho
, u)
\equiv
(
\gamma
-1)
\rho
u
\label
{
eq:eos:ideal:P
_
from
_
u
}
\\
c
&
= c
_{
\rm
eos
}
(
\rho
, u)
\equiv
\sqrt
{
\gamma
(
\gamma
-1)
u
}
\label
{
eq:eos:ideal:c
_
from
_
u
}
\\
A
&
= A
_{
\rm
eos
}
(
\rho
, u)
\equiv
(
\gamma
-1) u
\rho
^{
\gamma
-1
}
\label
{
eq:eos:ideal:A
_
from
_
u
}
\\
~
\nonumber\\
P
&
= P
_{
\rm
eos
}
(
\rho
, A)
\equiv
A
\rho
^{
\gamma
}
\label
{
eq:eos:ideal:P
_
from
_
A
}
\\
c
&
= c
_{
\rm
eos
}
(
\rho
, A)
\equiv
\sqrt
{
\gamma
\rho
^{
\gamma
-1
}
A
}
\label
{
eq:eos:ideal:c
_
from
_
A
}
\\
u
&
= u
_{
\rm
eos
}
(
\rho
, A)
\equiv
A
\rho
^{
\gamma
-1
}
/
(
\gamma
-1)
\label
{
eq:eos:ideal:u
_
from
_
A
}
\end{align}
Note that highly optimised functions to compute
$
x
^
\gamma
$
and other
useful powers of
$
\gamma
$
have been implemented in
\swift
for the most
commonly used values of
$
\gamma
$
.
%#######################################################################################################
\subsection
{
Isothermal Gas
}
\label
{
sec:eos:isothermal
}
An isothermal equation of state can be useful for certain test cases
or to speed-up the generation of glass files. This EoS corresponds to
a gas with contant (user-specified) thermal energy
$
u
_{
\rm
cst
}$
. For such a gas,
we have the following (trivial) relations between pressure (
$
P
$
), internal energy
(
$
u
$
), density (
$
\rho
$
), sound speed (
$
c
$
) and entropic function (
$
A
$
):
\begin{align}
P
&
= P
_{
\rm
eos
}
(
\rho
, u)
\equiv
(
\gamma
-1)
\rho
u
_{
\rm
cst
}
\label
{
eq:eos:isothermal:P
_
from
_
u
}
\\
c
&
= c
_{
\rm
eos
}
(
\rho
, u)
\equiv
\sqrt
{
\gamma
(
\gamma
-1)
u
_{
\rm
cst
}}
= c
_{
\rm
cst
}
\label
{
eq:eos:isothermal:c
_
from
_
u
}
\\
A
&
= A
_{
\rm
eos
}
(
\rho
, u)
\equiv
(
\gamma
-1) u
_{
\rm
cst
}
\rho
^{
\gamma
-1
}
\label
{
eq:eos:isothermal:A
_
from
_
u
}
\\
~
\nonumber\\
P
&
= P
_{
\rm
eos
}
(
\rho
, A)
\equiv
(
\gamma
-1)
\rho
u
_{
\rm
cst
}
\label
{
eq:eos:isothermal:P
_
from
_
A
}
\\
c
&
= c
_{
\rm
eos
}
(
\rho
, A)
\equiv
\sqrt
{
\gamma
(
\gamma
-1)
u
_{
\rm
cst
}}
= c
_{
\rm
cst
}
\label
{
eq:eos:isothermal:c
_
from
_
A
}
\\
u
&
= u
_{
\rm
eos
}
(
\rho
, A)
\equiv
u
_{
\rm
cst
}
\label
{
eq:eos:isothermal:u
_
from
_
A
}
\end{align}
theory/SPH/Flavours/sph_flavours.tex
View file @
2d4599dd
...
...
@@ -241,7 +241,7 @@ The prediction step is also identical to the \MinimalSPH case with the
entropic function replacing the thermal energy.
\begin{align}
\vec
{
x
}_
i
&
\rightarrow
\vec
{
x
}_
i +
\vec
{
v
}_
i
\Delta
t
\label
{
eq:sph:gadget2:drift
_
_
x
}
\\
\vec
{
x
}_
i
&
\rightarrow
\vec
{
x
}_
i +
\vec
{
v
}_
i
\Delta
t
\label
{
eq:sph:gadget2:drift
_
x
}
\\
h
_
i
&
\rightarrow
h
_
i
\exp\left
(
\frac
{
1
}{
h
_
i
}
\frac
{
dh
_
i
}{
dt
}
\Delta
t
\right
),
\label
{
eq:sph:gadget2:drift
_
h
}
\\
\rho
_
i
&
\rightarrow
\rho
_
i
\exp\left
(-
\frac
{
3
}{
h
_
i
}
\frac
{
dh
_
i
}{
dt
}
...
...
theory/SPH/Kernels/kernel_definitions.tex
View file @
2d4599dd
...
...
@@ -183,11 +183,13 @@ All kernels available in \swift are shown on Fig.~\ref{fig:sph:kernels}.
\includegraphics
[width=\columnwidth]
{
kernels.pdf
}
\caption
{
The kernel functions available in
\swift
for a mean
inter-particle separation
$
\langle
x
\rangle
=
1
.
5
$
and a resolution
$
\eta
=
1
.
2348
$
. The corresponding kernel support radii
$
H
$
(shown by
arrows) and number of neighours
$
N
_{
\rm
ngb
}$
are indicated on the
figure. A Gaussian kernel with the same smoothing length is shown
for comparison. Note that all these kernels have the
\emph
{
same
resolution
}
despite having vastly different number of neighbours.
}
$
\eta
=
1
.
2348
$
shown in linear (top) and log (bottom) units to
highlight their differences. The corresponding kernel support radii
$
H
$
(shown by arrows) and number of neighours
$
N
_{
\rm
ngb
}$
are
indicated on the figure. A Gaussian kernel with the same smoothing
length is shown for comparison. Note that all these kernels have
the
\emph
{
same resolution
}
despite having vastly different number of
neighbours.
}
\label
{
fig:sph:kernels
}
\end{figure}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment