Changes
Page history
version 4.2
authored
Oct 29, 2025
by
Udo Ziegler
Show whitespace changes
Inline
Side-by-side
3-NIRVANA-user-guide/3.2-User-interfaces.md
View page @
9ced7c9a
...
...
@@ -415,12 +415,10 @@ possible values or a numeric range.
Jeans-length-based mesh refinement criterion allowing a
systematic reduction of the Jeans threshold with increasing
refinement level $l$ according to the expression
Jeans length becomes gradually higher resolved with increasing $l$.
`_C.amr_dJeans` must be positiv. $y=10^{-7}$ $y=10^{-7}$
`_C.amr_Jeans`$-l*$`_C.amr_dJeans`, i.e., the local
Jeans length becomes gradually higher resolved with increasing $l$.
`_C.amr_dJeans` must be positiv.
$y=10^{-7}$
**Important**: `_C.amr_dJeans` must be chosen with care such
that the actual Jeans threshold never becomes too small or
negative at some refinement level. Otherwise it will trigger
...
...
@@ -454,7 +452,6 @@ possible values or a numeric range.
-
`06`
(
`_C.flag[0-7]`
)
- `_C.flag[0-7]`: freely usable parameter of `int` type.
$y=10^{-7}$
**SOLVER SPECIFICATIONS**
:
...
...
@@ -540,7 +537,7 @@ possible values or a numeric range.
- `_C.reactions_max_changeX` (typical value: $<0.1$): allowed
maximal relative change of species number densities (or total
number density) in the time integration of the chemo-thermal
rate equations.
$y=10^{-7}$
rate equations.
**Important:** The macro `SXN` in module `solveNCCM.c` is a
linear weight applying `_C.reactions_max_change` to a combined
...
...
@@ -580,8 +577,8 @@ possible values or a numeric range.
from the momentum equation and the induction equation is not
solved.
- `_C.permeability_rel`: relative magnetic permeability
$\mu_{rel}$
($=\mu/\mu_0,\,\mu_0=4\pi\cdot10^{-7}\mathtt{V}\cdot\mathtt{m}^{-1}\cdot\mathtt{A}^{-1}\cdot\mathtt{s}^{-1}$).
- `_C.permeability_rel`: relative magnetic permeability
$\mu_{rel}$
($=\mu/\mu_0,\,\mu_0=4\pi\cdot10^{-7}\mathtt{V}\cdot\mathtt{m}^{-1}\cdot\mathtt{A}^{-1}\cdot\mathtt{s}^{-1}$).
**Important:** The Gaussian unit system can be mimicked by
choosing a value ${\tt \_C.permeability\_rel}=10^7$ so that
...
...
@@ -623,7 +620,7 @@ possible values or a numeric range.
`_C.conduction_coeff` (and `_C.conduction_coeff_perp` in the
anisotropic case) described below. U enables thermal conduction
with a user-defined conduction coefficient as coded in the user
interface function
**
conductionCoeffUser()
**
(cf. [Thermal
interface function
`
conductionCoeffUser()
`
(cf. [Thermal
conduction](#thermal-conduction)). S enables thermal conduction
using the standard Spitzer conductivity model predefined in
NIRVANA (cf. [physics
...
...
@@ -650,8 +647,7 @@ possible values or a numeric range.
described below. U enables ambipolar diffusion with a
user-defined anbipolar diffusion coefficient as coded in the
user interface function **APdiffusionCoeffUser()** (cf.
[Ambipolar
diffusion](#user-defined-coefficient-for-ambipolar-diffusion)).
[Ambipolar diffusion](#user-defined-coefficient-for-ambipolar-diffusion)).
N disables ambipolar diffusion.
- `_C.APdiffusion_coeff`: constant ambipolar diffusion
...
...
@@ -731,8 +727,8 @@ possible values or a numeric range.
adiabatic index is not a freely selectable parameter but is
approximated by the expression
$\gamma=\left[5(n_\mathrm{H}+n_\mathrm{He}+n_\mathrm{e})+7n_{\mathrm{H}_2}\right]
/\left[3(n_\mathrm{H}+n_\mathrm{He}+n_\mathrm{e})+5n_{\mathrm{H}_2}\right]$.
$
$\gamma=\left[5(n_\mathrm{H}+n_\mathrm{He}+n_\mathrm{e})+7n_{\mathrm{H}_2}\right]
/\left[3(n_\mathrm{H}+n_\mathrm{He}+n_\mathrm{e})+5n_{\mathrm{H}_2}\right]$
$
.
- `_C.polytropic_constant`: polytropic constant in the polytropic
EOS.
...
...
@@ -815,10 +811,10 @@ energy density $e$ is irrelevant since no energy equation is solved. In
HD simulations, the assignment of the magnetic field is redundant, of
course, and would lead to an error because arrays for the magnetic field
components are not allocated in the HD case. Likewise, arrays for tracer
and species, $C_
\m
c$ and $n_
\m
s$, are not declared unless the parameters
and species, $C_c$ and $n_s$, are not declared unless the parameters
`_C.tracer`
$>0$ respective ${
\t
t
\_
C.species}>0$. If the TESTFIELDS
infrastructure is used (
`_C.testfields`
$>0$) testfields fluctuation
variables, $
\m
athbf{b}_
\m
t,
\,
\m
t=0,{
\t
t
\_
C.testfields}-1$, are also
variables, $
\m
athbf{b}_t,
\,
t=0,{
\t
t
\_
C.testfields}-1$, are also
considered as primary variables and must be assigned by the user. The
parameter
`_C.testfields`
denotes the number of testfields.
...
...
@@ -851,7 +847,7 @@ structure](#mesh-data-structure).
There are two types of mesh variables: cell-averaged variables and
face-averaged variables. Cell-averaged variables are
$
\v
arrho,m_x,m_y,m_z,n_
\m
s,C_
\m
c$. It are described by cell-centroid
$
\v
arrho,m_x,m_y,m_z,n_s,C_c$. It are described by cell-centroid
coordinates. Face-averaged variables are the magnetic field components
$B_x,B_y,B_z$ (and testfields). It are described by cell face-centroid
coordinates.
...
...
@@ -950,13 +946,13 @@ divergence-free setup:
components by exact integration of given analytical expressions. For a
grid cell (,,) on superblock
`g`
the discretized components would then
read
$$
\m
athtt{g->bx
[
iz
][
iy
]
[ix]}=
\f
rac{1}{
\d
\m
athcal{A}_x}
\i
nt
$$
\m
athtt{g->bx
[
iz
][
iy
]
[ix]}=
\f
rac{1}{
\d
elta
\m
athcal{A}_x}
\i
nt
\l
imits_
\m
athtt{g->y[iy]}^
\m
athtt{g->y[iy+1]}
\i
nt
\l
imits_
\m
athtt{g->z[iz]}^
\m
athtt{g->z[iz+1]} B_x(
\m
athtt{g->x[ix]},y,z)h_yh_zdydz$$
$$
\m
athtt{g->by
[
iz
][
iy
]
[ix]}=
\f
rac{1}{
\d
\m
athcal{A}_y}
\i
nt
$$
\m
athtt{g->by
[
iz
][
iy
]
[ix]}=
\f
rac{1}{
\d
elta
\m
athcal{A}_y}
\i
nt
\l
imits_
\m
athtt{g->x[ix]}^
\m
athtt{g->x[ix+1]}
\i
nt
\l
imits_
\m
athtt{g->z[iz]}^
\m
athtt{g->z[iz+1]} B_y(x,
\m
athtt{g->y[iy]},z)h_zdxdz$$
$$
\m
athtt{g->bz
[
iz
][
iy
]
[ix]}=
\f
rac{1}{
\d
\m
athcal{A}_z}
\i
nt
$$
\m
athtt{g->bz
[
iz
][
iy
]
[ix]}=
\f
rac{1}{
\d
elta
\m
athcal{A}_z}
\i
nt
\l
imits_
\m
athtt{g->x[ix]}^
\m
athtt{g->x[ix+1]}
\i
nt
\l
imits_
\m
athtt{g->y[iy]}^
\m
athtt{g->y[iy+1]} B_z(x,y,
\m
athtt{g->z[iz]})h_ydxdy$$
where the numerical expressions for the cell faces are:
...
...
@@ -974,23 +970,23 @@ integration over cell faces turns out to be too complicated.
The face-averaged magnetic field components are then obtained from the
integral form of $
\m
athbf{B}=
\n
abla
\t
imes
\m
athbf{A}$:
`g->bx[iz][iy][ix]`
$=
\l
eft[h_y
\D
elta_
\m
iy (h_{zy}
\h
at{A}_z)
-h_y
\D
elta_
\m
iz
\h
at{A}_y
\r
ight]/
\d
\m
athcal{A}_x$
`g->bx[iz][iy][ix]`
$=
\l
eft[h_y
\D
elta_
{
iy
}
(h_{zy}
\h
at{A}_z)
-h_y
\D
elta_
{
iz
}
\h
at{A}_y
\r
ight]/
\d
elta
\m
athcal{A}_x$
`g->by[iz][iy][ix]`
$=
\l
eft[
\D
elta_
\m
iz
\h
at{A}_x
-h_{zy}
\D
elta_
\m
ix (h_y
\h
at{A}_z)
\r
ight]/
\d
\m
athcal{A}_y$
`g->by[iz][iy][ix]`
$=
\l
eft[
\D
elta_
{
iz
}
\h
at{A}_x
-h_{zy}
\D
elta_
{
ix
}
(h_y
\h
at{A}_z)
\r
ight]/
\d
elta
\m
athcal{A}_y$
`g->bz[iz][iy][ix]`
$=
\l
eft[
\D
elta_
\m
ix (h_y
\h
at{A}_y)
-
\D
elta_
\m
iy
\h
at{A}_x
\r
ight]/
\d
\m
athcal{A}_z$
`g->bz[iz][iy][ix]`
$=
\l
eft[
\D
elta_
{
ix
}
(h_y
\h
at{A}_y)
-
\D
elta_
{
iy
}
\h
at{A}_x
\r
ight]/
\d
elta
\m
athcal{A}_z$
where the difference operators $
\D
elta_
\m
ix$, $
\D
elta_
\m
iy$ and
$
\D
elta_
\m
iz$ are given by
where the difference operators $
\D
elta_
{
ix
}
$, $
\D
elta_
{
iy
}
$ and
$
\D
elta_
{
iz
}
$ are given by
$
\D
elta_{
\m
ix}X=X(
\m
athtt{ix+1,iy,iz})-X(
\m
athtt{ix,iy,iz})$,
$
\D
elta_{ix}X=X(
\m
athtt{ix+1,iy,iz})-X(
\m
athtt{ix,iy,iz})$,
$
\D
elta_{
\m
iy}X=X(
\m
athtt{ix,iy+1,iz})-X(
\m
athtt{ix,iy,iz})$,
$
\D
elta_{iy}X=X(
\m
athtt{ix,iy+1,iz})-X(
\m
athtt{ix,iy,iz})$,
$
\D
elta_{
\m
iz}X=X(
\m
athtt{ix,iy,iz+1})-X(
\m
athtt{ix,iy,iz})$
$
\D
elta_{iz}X=X(
\m
athtt{ix,iy,iz+1})-X(
\m
athtt{ix,iy,iz})$
and $(
\h
at{A}_x,
\h
at{A}_y,
\h
at{A}_z)$ are the cell-edge integrals
...
...
@@ -1436,7 +1432,7 @@ by the appropriate choice of parameter `_C.conduction` in file
Ohmic diffusion enters the induction equation and energy equation as a
field contribution given by
$
\m
athbf{E}_
\m
athrm{D}=
\e
ta_
\m
athrm{D}
\n
abla
\t
imes
\m
athbf{B}$
$
$
\m
athbf{E}_
\m
athrm{D}=
\e
ta_
\m
athrm{D}
\n
abla
\t
imes
\m
athbf{B}$
$
where $
\e
ta_
\m
athrm{D}$ in units
\[
m$^2
\c
dot$s$^{-1}$
\]
is the diffusion
coefficient.
...
...
@@ -1475,8 +1471,8 @@ user-defined ambipolar diffusion coefficient.
Ambipolar diffusion enters the induction equation and energy equation as
a field contribution given by
$
\m
athbf{E}_
\m
athrm{AD}=
\e
ta_
\m
athrm{AD}/
\m
u
\m
athbf{B}
\t
imes
\l
eft[(
\n
abla
\t
imes
\m
athbf{B})
\t
imes
\m
athbf{B}
\r
ight]$
$
$
\m
athbf{E}_
\m
athrm{AD}=
\e
ta_
\m
athrm{AD}/
\m
u
\m
athbf{B}
\t
imes
\l
eft[(
\n
abla
\t
imes
\m
athbf{B})
\t
imes
\m
athbf{B}
\r
ight]$
$
where $
\e
ta_
\m
athrm{AD}$
\[
V$
\c
dot$m$
\c
dot$A$^{-1}
\c
dot$T$^{-2}$
\]
denotes the ambipolar diffusion coefficient. The prefactor
...
...
...
...