-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into update_unit_test_docs
- Loading branch information
Showing
8 changed files
with
128 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. _neutrino_loss: | ||
|
||
*************** | ||
Neutrino Losses | ||
*************** | ||
|
||
We model thermal neutrino losses (plasma, photo-, pair-, | ||
recombination, and Bremsstrahlung) using the method described in | ||
:cite:`itoh:1996`. This neutrino loss term is included in all of the | ||
reaction networks by default, and modifies the energy equation to have | ||
the form (for Strang splitting): | ||
|
||
.. math:: | ||
\frac{de}{dt} = \epsilon - \epsilon_\nu | ||
where $\epsilon_\nu$ are the thermal neutrino losses. | ||
|
||
.. note:: | ||
|
||
Thermal neutrino losses can be disabled at compile time by setting the make | ||
variable ``USE_NEUTRINOS = FALSE``. | ||
|
||
The interface for the neutrino loss function is: | ||
|
||
.. code:: c++ | ||
|
||
template <int do_derivatives> | ||
AMREX_GPU_HOST_DEVICE AMREX_INLINE | ||
void sneut5(const amrex::Real temp, const amrex::Real den, | ||
const amrex::Real abar, const amrex::Real zbar, | ||
amrex::Real& snu, amrex::Real& dsnudt, amrex::Real& dsnudd, | ||
amrex::Real& dsnuda, amrex::Real& dsnudz) | ||
|
||
Here, the template parameter, ``do_derivatives``, can be used to disable the code | ||
the computes the derivatives of the neutrino loss, for example, if a numerical Jacobian | ||
is used. The output is | ||
|
||
* ``snu`` : $\epsilon_\nu$, the neutrino loss in erg/g/s | ||
|
||
* ``dsnudt`` : $d\epsilon_\nu/dT$ | ||
|
||
* ``dsnudd`` : $d\epsilon_\nu/d\rho$ | ||
|
||
* ``dsnuda`` : $d\epsilon_\nu/d\bar{A}$ | ||
|
||
* ``dsnudz`` : $d\epsilon_\nu/d\bar{Z}$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
****************************** | ||
Helper Functions and Libraries | ||
****************************** | ||
|
||
The ``util/`` directory contains a number of external libraries and simple | ||
utilities that are used by the different components of Microphysics. | ||
|
||
* ``approx_math/`` : these are a set of headers that implement | ||
approximations to ``atan()``, ``exp()``, ``log()``, and ``pow()``. | ||
These can be much faster than the C++ library versions, especially | ||
on GPUs. | ||
|
||
* ``autodiff/`` : this is a clone of the C++ autodiff library from | ||
https://github.com/autodiff/autodiff | ||
|
||
The header ``microphysics_autodiff.H`` provides a set of interfaces | ||
for working with the AMReX datatypes and interfacing with the | ||
autodiff library. | ||
|
||
* ``build_scripts/`` : a set of python scripts used during the build | ||
process to parse the runtime parameters. | ||
|
||
* ``cj_detonation/`` : a simple routine to compute the Chapman-Jouguet | ||
detonation speed for one of our networks. | ||
|
||
* ``esum.H`` : an implementation of the exact sum algorithm based on the | ||
msum algorithm by Raymond Hettinger. It is generated automatically | ||
by the ``esum_cxx.py`` script and creates implementations for exact | ||
numbers of terms (``esum3()``, ``esum4()``, ...) | ||
|
||
* ``gcem/`` : a templated math library that provides implementations of | ||
the standard library math functions that can be used in ``constexpr`` | ||
expressions. This is from https://github.com/kthohr/gcem | ||
|
||
Some of the constants are redefined in 64-bit floating point in | ||
``microphysics_math.H`` to avoid ``long double`` issues on some | ||
architectures. | ||
|
||
* ``hybrj/`` : a C++ port of the MINPACK hybrid Powell minimization function | ||
to zero a set of functions. | ||
|
||
* ``linpack.H`` : a C++ port of the LINPACK ``dgesl`` and ``dgefa`` LU | ||
decomposition Gaussian elimination routines. | ||
|
||
* ``microphysics_sort.H`` : a set of sorting routines for | ||
``amrex::Array1D`` data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters