Changes
Page history
Update 3.2 User interfaces
authored
Jan 09, 2021
by
Udo Ziegler
Show whitespace changes
Inline
Side-by-side
3-NIRVANA-user-guide/3.2-User-interfaces.md
View page @
c464ed55
...
@@ -14,7 +14,7 @@ CONTENTS
...
@@ -14,7 +14,7 @@ CONTENTS
[
Specification of NCCM parameters
](
3.2-User-interfaces#specification-of-NCCM-parameters
)
[
Specification of NCCM parameters
](
3.2-User-interfaces#specification-of-NCCM-parameters
)
[
User-controllable macros
](
3.2-User-interfaces#user-controllable-macros
)
[
User-controllable macros
](
3.2-User-interfaces#user-controllable-macros
)
##
#
Overview
## Overview
User interfaces are certain code modules in order to generate and
User interfaces are certain code modules in order to generate and
customize a simulation problem. There are three different types of user
customize a simulation problem. There are three different types of user
...
@@ -69,7 +69,7 @@ necessary for a problem setup.
...
@@ -69,7 +69,7 @@ necessary for a problem setup.
-
`User.h`
– freely available header file
-
`User.h`
– freely available header file
##
#
Specification of main simulation parameters
## Specification of main simulation parameters
NIRVANA requires the parameter file
`nirvana.par`
as input. In this file
NIRVANA requires the parameter file
`nirvana.par`
as input. In this file
the user specifies main parameters which characterize the properties of
the user specifies main parameters which characterize the properties of
...
@@ -168,22 +168,22 @@ for the type of coordinate system.
...
@@ -168,22 +168,22 @@ for the type of coordinate system.
- `_C.freq_log`: interval in units of timestep cycles at which the
- `_C.freq_log`: interval in units of timestep cycles at which the
NIRVANA log file `nirvana.log` (cf.
NIRVANA log file `nirvana.log` (cf.
\
[here
\
](3.3-Output-data
\
#log-file)) and monitoring file
[here](3.3-Output-data#log-file)) and monitoring file
`nirvana.mon` (cf.
\
[here
\
](3.3-Output-data
\
#monitoring-file))
`nirvana.mon` (cf. [here](3.3-Output-data#monitoring-file))
is updated.
is updated.
- `_C.freq_nir`: interval in units of timestep cycles at which
- `_C.freq_nir`: interval in units of timestep cycles at which
NIRVANA snapshots (cf.
NIRVANA snapshots (cf.
\
[here
\
](3.3-Output-data
\
#snapshot-files)) are produced.
[here](3.3-Output-data#snapshot-files)) are produced.
- `_C.freq_ana`: interval in units of timestep cycles at which the
- `_C.freq_ana`: interval in units of timestep cycles at which the
user interface function `analysisUser()` is called for
user interface function `analysisUser()` is called for
user-specific analysis tasks (cf.
user-specific analysis tasks (cf.
\
[here
\
](3.5-Data-analysis
\
#runtime-data-analysis)).
[here](3.5-Data-analysis#runtime-data-analysis)).
- `_C.freq_walltime`: interval in seconds at which the special
- `_C.freq_walltime`: interval in seconds at which the special
snapshot `NIRLAST.#` (cf.
snapshot `NIRLAST.#` (cf.
\
[here
\
](3.3-Output-data
\
#snapshot-files)) is renewed
[here](3.3-Output-data#snapshot-files)) is renewed
overwriting existing older files.
overwriting existing older files.
`GEOMETRY`
:
`GEOMETRY`
:
...
@@ -349,7 +349,7 @@ for the type of coordinate system.
...
@@ -349,7 +349,7 @@ for the type of coordinate system.
concerning MPI and AMR.*
concerning MPI and AMR.*
- `U`: user-defined boundary conditions (cf.
- `U`: user-defined boundary conditions (cf.
\
[here
\
](3.2-User-interfaces
\
#defining-boundary-conditions)).
[here](3.2-User-interfaces#defining-boundary-conditions)).
`MESH REFINEMENT`
:
`MESH REFINEMENT`
:
...
@@ -364,7 +364,7 @@ for the type of coordinate system.
...
@@ -364,7 +364,7 @@ for the type of coordinate system.
- `_C.imr` (≤`MAXLEVEL`): maximal requested refinement level in a
- `_C.imr` (≤`MAXLEVEL`): maximal requested refinement level in a
user-defined initially refined mesh (cf.
user-defined initially refined mesh (cf.
\
[here
\
](3.2-User-interfaces
\
#user-defined-initial/restricted-mesh)).
[here](3.2-User-interfaces#user-defined-initial/restricted-mesh)).
`_C.imr` cannot be larger than the macro `MAXLEVEL` defined in
`_C.imr` cannot be larger than the macro `MAXLEVEL` defined in
the header file `nirvanaUser.h`.
the header file `nirvanaUser.h`.
...
@@ -379,7 +379,7 @@ for the type of coordinate system.
...
@@ -379,7 +379,7 @@ for the type of coordinate system.
field strength (`_C.amr_eps[3]`) and tracer variables
field strength (`_C.amr_eps[3]`) and tracer variables
(`_C.amr_eps[4]`) in the derivatives-based mesh refinement
(`_C.amr_eps[4]`) in the derivatives-based mesh refinement
criterion (cf.
criterion (cf.
\
[here
\
](3.1-Code-basics
\
#adaptive-mesh-refinement)). A zero or
[here](3.1-Code-basics#adaptive-mesh-refinement)). A zero or
negative value means that the respective component is disabled
negative value means that the respective component is disabled
for a mesh refinement check.
for a mesh refinement check.
...
@@ -426,12 +426,12 @@ for the type of coordinate system.
...
@@ -426,12 +426,12 @@ for the type of coordinate system.
- `_C.amr_Jeans` (typical value: 0.2): threshold in the
- `_C.amr_Jeans` (typical value: 0.2): threshold in the
Jeans-length-based mesh refinement criterion (cf.
Jeans-length-based mesh refinement criterion (cf.
\
[here
\
](3.1-Code-basics
\
#adaptive-mesh-refinement)). The value
[here](3.1-Code-basics#adaptive-mesh-refinement)). The value
`_C.amr_Jeans` defines the fraction of local Jeans length to be
`_C.amr_Jeans` defines the fraction of local Jeans length to be
resolved by at least one grid cell. A zero or negative value
resolved by at least one grid cell. A zero or negative value
means that the Jeans-length-based criterion is disabled.
means that the Jeans-length-based criterion is disabled.
- `_C.amr_dJeans` (
≥
0): tuning parameter for the
- `_C.amr_dJeans` (
≥
0): tuning parameter for the
Jeans-length-based mesh refinement criterion allowing a
Jeans-length-based mesh refinement criterion allowing a
systematic reduction of the Jeans threshold with increasing
systematic reduction of the Jeans threshold with increasing
refinement level *l* according to the expression `_C.amr_Jeans`
refinement level *l* according to the expression `_C.amr_Jeans`
...
@@ -443,7 +443,7 @@ for the type of coordinate system.
...
@@ -443,7 +443,7 @@ for the type of coordinate system.
- `_C.amr_Field` (typical value: 0.2): threshold in the
- `_C.amr_Field` (typical value: 0.2): threshold in the
Field-length-based mesh refinement criterion (cf.
Field-length-based mesh refinement criterion (cf.
\
[here
\
](3.1-Code-basics
\
#adaptive-mesh-refinement)). The value
[here](3.1-Code-basics#adaptive-mesh-refinement)). The value
`_C.amr_Field` defines the fraction of the local Field length to
`_C.amr_Field` defines the fraction of the local Field length to
be resolved by at least one grid cell. A zero or negative value
be resolved by at least one grid cell. A zero or negative value
means that the Field-length-based criterion is disabled.
means that the Field-length-based criterion is disabled.
...
@@ -546,13 +546,13 @@ for the type of coordinate system.
...
@@ -546,13 +546,13 @@ for the type of coordinate system.
-
`06`
(
`_C.heatloss_max_change`
)
-
`06`
(
`_C.heatloss_max_change`
)
- `_C.heatloss_max_change` (typical value:
≤
0.1): maximal
- `_C.heatloss_max_change` (typical value:
≤
0.1): maximal
allowed relative change in temperature due to the heatloss
allowed relative change in temperature due to the heatloss
source term.
source term.
-
`07`
(
`_C.reactions_max_changeX`
,
`_C.reactions_max_changeT`
)
-
`07`
(
`_C.reactions_max_changeX`
,
`_C.reactions_max_changeT`
)
- `_C.reactions_max_changeX` (typical value:
≤
0.1): maximal
- `_C.reactions_max_changeX` (typical value:
≤
0.1): maximal
relative change of species number densities (or total number
relative change of species number densities (or total number
density) in the time integration of the chemo-thermal rate
density) in the time integration of the chemo-thermal rate
equations.
equations.
...
@@ -561,7 +561,7 @@ for the type of coordinate system.
...
@@ -561,7 +561,7 @@ for the type of coordinate system.
weight in applying the parameter `_C.reactions_max_change` to
weight in applying the parameter `_C.reactions_max_change` to
individual number densities and to the total number density.*
individual number densities and to the total number density.*
- `_C.reactions_max_changeT` (typical value:
≤
0.1): maximal
- `_C.reactions_max_changeT` (typical value:
≤
0.1): maximal
relative change of temperature in the time integration of the
relative change of temperature in the time integration of the
chemo-thermal rate equations.
chemo-thermal rate equations.
...
@@ -599,8 +599,8 @@ for the type of coordinate system.
...
@@ -599,8 +599,8 @@ for the type of coordinate system.
*Note: The Gaussian unit system can be mimicked by choosing a
*Note: The Gaussian unit system can be mimicked by choosing a
value
value
`_``C
``.``p``e``r``m``e``a``b``i``l``i``t``y``_``r``e``l` =
10<sup>7</sup>
`_``C
.permeability_rel`=
10<sup>7</sup>
so that the magnetic permeability is *μ*
=
4*π*.*
so that the magnetic permeability is *μ*
=
4*π*.*
-
`02`
(
`_C.viscosity`
,
`_C.viscosity_coeff`
)
-
`02`
(
`_C.viscosity`
,
`_C.viscosity_coeff`
)
...
@@ -642,7 +642,7 @@ for the type of coordinate system.
...
@@ -642,7 +642,7 @@ for the type of coordinate system.
`_C.conduction_coeff_perp` in the anisotropic case) described
`_C.conduction_coeff_perp` in the anisotropic case) described
next. The value U enables thermal conduction with a user-defined
next. The value U enables thermal conduction with a user-defined
conduction coefficient as coded in the user interface
conduction coefficient as coded in the user interface
**
conductionCoeffUser.c
**
. The value S refers to the standard
`
conductionCoeffUser.c
`
. The value S refers to the standard
Spitzer conductivity model (cf. physics guide
Spitzer conductivity model (cf. physics guide
[Wiki](https://gitlab.aip.de/ziegler/NIRVANA/-/wikis/A-PhysicsGuide),
[Wiki](https://gitlab.aip.de/ziegler/NIRVANA/-/wikis/A-PhysicsGuide),
[PDF](https://gitlab.aip.de/ziegler/NIRVANA/doc/pdf/PhysicsGuide.pdf)).
[PDF](https://gitlab.aip.de/ziegler/NIRVANA/doc/pdf/PhysicsGuide.pdf)).
...
@@ -737,11 +737,11 @@ for the type of coordinate system.
...
@@ -737,11 +737,11 @@ for the type of coordinate system.
- USER: user-defined analytic EOS. This choice requires the
- USER: user-defined analytic EOS. This choice requires the
specification of special macros (cf.
specification of special macros (cf.
\
[here
\
](3.2-User-interfaces
\
#user-defined-equation-of-state))
[here](3.2-User-interfaces#user-defined-equation-of-state))
- TAB: user-defined tabulated EOS. This choice requires the
- TAB: user-defined tabulated EOS. This choice requires the
generation of look-up tables (cf.
generation of look-up tables (cf.
\
[here
\
](3.2-User-interfaces
\
#user-defined-equation-of-state)).
[here](3.2-User-interfaces#user-defined-equation-of-state)).
*Note: The choice of an isothermal EOS or polytropic EOS is not
*Note: The choice of an isothermal EOS or polytropic EOS is not
compatible with solving for an energy equation.*
compatible with solving for an energy equation.*
...
@@ -753,7 +753,7 @@ for the type of coordinate system.
...
@@ -753,7 +753,7 @@ for the type of coordinate system.
freely selectable parameter but is approximated by the
freely selectable parameter but is approximated by the
expression*
expression*
*γ*
=
\[5(*n*<sub>*H*</sub>+*n*<sub>*H**e*</sub>+*n*<sub>*e*</sub>)+7*n*<sub>*H*<sub>2</sub></sub>\]/\[3(*n*<sub>*H*</sub>+*n*<sub>*H**e*</sub>+*n*<sub>*e*</sub>)+5*n*<sub>*H*<sub>2</sub></sub>\]
*γ*
=
\[5(*n*<sub>*H*</sub>+*n*<sub>*H**e*</sub>+*n*<sub>*e*</sub>)+7*n*<sub>*H*<sub>2</sub></sub>\]/\[3(*n*<sub>*H*</sub>+*n*<sub>*H**e*</sub>+*n*<sub>*e*</sub>)+5*n*<sub>*H*<sub>2</sub></sub>\]
- `_C.polytropic_constant`: polytropic constant in the polytropic
- `_C.polytropic_constant`: polytropic constant in the polytropic
EOS.
EOS.
...
@@ -771,9 +771,9 @@ for the type of coordinate system.
...
@@ -771,9 +771,9 @@ for the type of coordinate system.
[PDF](https://gitlab.aip.de/ziegler/NIRVANA/doc/pdf/PhysicsGuide.pdf)).
[PDF](https://gitlab.aip.de/ziegler/NIRVANA/doc/pdf/PhysicsGuide.pdf)).
The value U enables the heatloss term assuming a user-defined
The value U enables the heatloss term assuming a user-defined
cooling/heating function coded in the interfaces
cooling/heating function coded in the interfaces
**
sourceCoolingUser.c
**
for cooling and
**
sourceHeatingUser.c
**
`
sourceCoolingUser.c
`
for cooling and
`
sourceHeatingUser.c
`
for heating (cf.
for heating (cf.
\
[here
\
](3.2-User-interfaces
\
#user-defined-cooling/heating-function)).
[here](3.2-User-interfaces#user-defined-cooling/heating-function)).
-
`11`
(
`_C.tracer`
)
-
`11`
(
`_C.tracer`
)
...
...
...
...