version 4.2 authored by Udo Ziegler's avatar Udo Ziegler
...@@ -1445,9 +1445,6 @@ below category PHYSICS SPECIFICATIONS. ...@@ -1445,9 +1445,6 @@ below category PHYSICS SPECIFICATIONS.
### User-defined coefficient for ambipolar diffusion ### User-defined coefficient for ambipolar diffusion
The module `APdiffusionCoeffUser.c` serves as template for a
user-defined ambipolar diffusion coefficient.
Ambipolar diffusion enters the induction equation and energy equation as Ambipolar diffusion enters the induction equation and energy equation as
a field contribution given by a field contribution given by
...@@ -1455,8 +1452,7 @@ a field contribution given by ...@@ -1455,8 +1452,7 @@ a field contribution given by
where *η*<sub>*AD*</sub> in units \[V⋅m⋅A<sup>−1</sup>⋅T<sup>−2</sup>\] where *η*<sub>*AD*</sub> in units \[V⋅m⋅A<sup>−1</sup>⋅T<sup>−2</sup>\]
denotes the ambipolar diffusion coefficient. denotes the ambipolar diffusion coefficient.
The prefactor *η*<sub>*AD*</sub>/*μ* has units
The prefactor* *η*<sub>*AD*</sub>/*μ* has units
m<sup>2</sup>⋅s<sup>−1</sup>⋅T<sup>−2</sup>. m<sup>2</sup>⋅s<sup>−1</sup>⋅T<sup>−2</sup>.
A user-defined coefficients, *η*<sub>*AD*</sub>, A user-defined coefficients, *η*<sub>*AD*</sub>,
...@@ -1490,8 +1486,8 @@ found in testproblem `/nirvana/testproblems/APDIFF/problem1`. ...@@ -1490,8 +1486,8 @@ found in testproblem `/nirvana/testproblems/APDIFF/problem1`.
### User-defined body force ### User-defined body force
The module `forceUser.c` serves as template for a user-defined The module `forceUser.c` serves as template for a user-defined
*specific* body force $\mathbf{f}$ (force per mass in units *specific* body force **f** (force per mass in units N⋅kg<sup>−1</sup>).
N$\cdot$kg$^{-1}$). The body force enters the momentum equation and The body force enters the momentum equation and
energy equation as source term. energy equation as source term.
A user body force has to be defined in the function A user body force has to be defined in the function
...@@ -1526,12 +1522,13 @@ be found in testproblem `/nirvana/testproblems/MHD/problem21`. ...@@ -1526,12 +1522,13 @@ be found in testproblem `/nirvana/testproblems/MHD/problem21`.
The modules `sourceCoolingUser.c` and `sourceHeatingUser.c` serve as The modules `sourceCoolingUser.c` and `sourceHeatingUser.c` serve as
templates for coding a user-defined cooling function, templates for coding a user-defined cooling function,
$L_\mathrm{cool}\le 0$, and heating function, $L_\mathrm{heat}\ge 0$, *L*<sub>*cool*</sub>≤0, and heating function, *L*<sub>*heat*</sub>≥0,
respectively. Both functions are allowed to depend on temperature $T$ respectively. Both functions are allowed to depend on temperature
and density $\varrho$. The net heatloss, i.e. the sum *T* and density 𝜚. The net heatloss, i.e. the sum
$L_\mathrm{cool}(T,\varrho)+L_\mathrm{heat}(T,\varrho)$, enters as *L*<sub>*cool*</sub>(*T*,𝜚)+*L*<sub>*heat*</sub>(*T*,𝜚), enters as
source term in the energy equation. $L_\mathrm{cool}$ and source term in the energy equation.
$L_\mathrm{heat}$ are measured in units J$\cdot$s$^{-1}\cdot$m$^{-3}$. *L*<sub>*cool*</sub> and *L*<sub>*heat*</sub> are measured
in units J⋅s<sup>−1</sup>⋅m<sup>−3</sup>.
User-defined cooling/heating rates are to be defined in the functions User-defined cooling/heating rates are to be defined in the functions
...@@ -1541,11 +1538,10 @@ User-defined cooling/heating rates are to be defined in the functions ...@@ -1541,11 +1538,10 @@ User-defined cooling/heating rates are to be defined in the functions
taking arguments `T`, the temperature, `rho`, the gas density, the taking arguments `T`, the temperature, `rho`, the gas density, the
pointer `deriv`, a flag to tell the calling function whether the user pointer `deriv`, a flag to tell the calling function whether the user
provides the derivatives $\partial L_\mathrm{cool}\partial\varrho$, provides the derivatives ∂*L*<sub>*cool*</sub>/∂𝜚,
$\partial L_\mathrm{cool}\partial T$ to be stored in the 2-element *L*<sub>*cool*</sub>/∂*T* to be stored in the 2-element
vector `dfc[0], dfc[1]` and the derivatives vector `dfc[0], dfc[1]` and the derivatives ∂*L*<sub>*heat*</sub>/∂𝜚,
$\partial L_\mathrm{heat}\partial\varrho$, *L*<sub>*heat*</sub>/∂*T* to be stored in the 2-element
$\partial L_\mathrm{heat}\partial T$ to be stored in the 2-element
vector `dfh[0], dfh[1]`. The default value is preset to `deriv=YES` in vector `dfh[0], dfh[1]`. The default value is preset to `deriv=YES` in
both functions. The user may avoid to explicitely calculating both functions. The user may avoid to explicitely calculating
derivatives by setting `deriv=NO`. Then, derivatives are computed by the derivatives by setting `deriv=NO`. Then, derivatives are computed by the
... ...
......