From c5099a88e609567a5884b38f3f888ea8b802150b Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 6 Jan 2025 14:08:49 -0500 Subject: [PATCH 1/3] Add neutrino docs (#1692) --- Docs/source/index.rst | 1 + Docs/source/integrators.rst | 8 +- Docs/source/networks.rst | 8 +- Docs/source/neutrinos.rst | 47 ++ Docs/source/refs.bib | 13 + Docs/source/runtime_parameters.rst | 746 +++++++++++++++++++++-------- Docs/source/sdc.rst | 2 +- 7 files changed, 624 insertions(+), 201 deletions(-) create mode 100644 Docs/source/neutrinos.rst diff --git a/Docs/source/index.rst b/Docs/source/index.rst index c0e9fc762..55300f869 100644 --- a/Docs/source/index.rst +++ b/Docs/source/index.rst @@ -60,6 +60,7 @@ of state routines. networks templated_networks screening + neutrinos .. toctree:: :maxdepth: 1 diff --git a/Docs/source/integrators.rst b/Docs/source/integrators.rst index 80fa229d0..5d110b9bb 100644 --- a/Docs/source/integrators.rst +++ b/Docs/source/integrators.rst @@ -14,13 +14,13 @@ The equations we integrate to do a nuclear burn are: :label: eq:spec_integrate .. math:: - \frac{de}{dt} = f(\rho,X_k,T) + \frac{de}{dt} = \epsilon(\rho,X_k,T) :label: eq:enuc_integrate Here, :math:`X_k` is the mass fraction of species :math:`k`, :math:`e` is the specific nuclear energy created through reactions. Also needed are density :math:`\rho`, temperature :math:`T`, and the specific -heat. The function :math:`f` provides the energy release from +heat. The function :math:`\epsilon` provides the energy release from reactions and can often be expressed in terms of the instantaneous reaction terms, :math:`\dot{X}_k`. As noted in the previous section, this is implemented in a network-specific manner. @@ -46,7 +46,7 @@ energy. This allows us to easily call the EOS during the burn to obtain the temp :label: eq:spec_n_integrate .. math:: - \frac{de}{dt} = f(\rho,n_k,T) + \frac{de}{dt} = \epsilon(\rho,n_k,T) :label: eq:enuc_n_integrate The effect of this flag in the integrators is that we don't worry @@ -355,7 +355,7 @@ with the initial temperature, density, and composition: As the system is integrated, :math:`e` is updated to account for the nuclear energy release (and thermal neutrino losses), -.. math:: e(t) = e_0 + \int_{t_0}^t f(\dot{Y}_k) dt +.. math:: e(t) = e_0 + \int_{t_0}^t \epsilon(\dot{Y}_k) dt .. note:: diff --git a/Docs/source/networks.rst b/Docs/source/networks.rst index 660054d3a..908a6ee20 100644 --- a/Docs/source/networks.rst +++ b/Docs/source/networks.rst @@ -26,10 +26,10 @@ is stored as ``mion(:)`` in the network. The energy release per gram is converted from the rates as: -.. math:: \edot = -N_A c^2 \sum_k \frac{dY_k}{dt} M_k - \edotnu +.. math:: \epsilon = -N_A c^2 \sum_k \frac{dY_k}{dt} M_k - \epsilon_\nu where :math:`N_A` is Avogadro’s number (to convert this to “per gram”) -and :math:`\edotnu` is the neutrino loss term. +and :math:`\edotnu` is the neutrino loss term (see :ref:`neutrino_loss`). ``general_null`` @@ -137,7 +137,7 @@ network is interpolated based on the density. It is stored as the binding energy (ergs/g) *per nucleon*, with a sign convention that binding energies are negative. The energy generation rate is then: -.. math:: \edot = q \frac{dX(\isotm{C}{12})}{dt} = q A_{\isotm{C}{12}} \frac{dY(\isotm{C}{12})}{dt} +.. math:: \epsilon = q \frac{dX(\isotm{C}{12})}{dt} = q A_{\isotm{C}{12}} \frac{dY(\isotm{C}{12})}{dt} (this is positive since both :math:`q` and :math:`dY/dt` are negative) @@ -244,7 +244,7 @@ Finally, for the energy generation, we take our reaction to release a specific energy, :math:`[\mathrm{erg~g^{-1}}]`, of :math:`\qburn`, and our energy source is -.. math:: \edot = -\qburn \frac{dX_f}{dt} +.. math:: \epsilon = -\qburn \frac{dX_f}{dt} There are a number of parameters we use to control the constants in this network. This is one of the few networks that was designed diff --git a/Docs/source/neutrinos.rst b/Docs/source/neutrinos.rst new file mode 100644 index 000000000..28deab6ab --- /dev/null +++ b/Docs/source/neutrinos.rst @@ -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 + 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}$ diff --git a/Docs/source/refs.bib b/Docs/source/refs.bib index 9e8cd982b..67eb16774 100644 --- a/Docs/source/refs.bib +++ b/Docs/source/refs.bib @@ -688,3 +688,16 @@ @article{langanke:2001 abstract = {The weak interaction rates in stellar environments are computed for pf-shell nuclei in the mass range A=45–65 using large-scale shell-model calculations. The calculated capture and decay rates take into consideration the latest experimental energy levels and log ft-values. The rates are tabulated at the same grid points of density and temperature as those used by Fuller, Fowler, and Newman for densities ρY e =10–1011 g/cm3 and temperatures T=107–1011 K, and hence are relevant for both types of supernovae (Type Ia and Type II). Effective 〈ft〉 values for capture rates and average neutrino (antineutrino) energies are also given to facilitate the use of interpolated rates in stellar evolution codes.} } +@ARTICLE{itoh:1996, + author = {{Itoh}, Naoki and {Hayashi}, Hiroshi and {Nishikawa}, Akinori and {Kohyama}, Yasuharu}, + title = "{Neutrino Energy Loss in Stellar Interiors. VII. Pair, Photo-, Plasma, Bremsstrahlung, and Recombination Neutrino Processes}", + journal = {\apjs}, + keywords = {DENSE MATTER, ELEMENTARY PARTICLES, RADIATION MECHANISMS: NONTHERMAL, STARS: INTERIORS, METHODS: NUMERICAL}, + year = 1996, + month = feb, + volume = {102}, + pages = {411}, + doi = {10.1086/192264}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1996ApJS..102..411I}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} diff --git a/Docs/source/runtime_parameters.rst b/Docs/source/runtime_parameters.rst index ba81d3fd4..7e08a889b 100644 --- a/Docs/source/runtime_parameters.rst +++ b/Docs/source/runtime_parameters.rst @@ -99,6 +99,221 @@ namespace: ``eos`` +**EOS_DIR=metal_chem:** + ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| parameter | description | default value | ++=======================================+=========================================================+==============================+ +| ``eos_gamma_default`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_1_name`` | define the specie names, and their masses and gammas | "co_total" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_1_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_1_mass`` | | 0.0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_2_name`` | | "h2o_total" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_2_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_2_mass`` | | 0.0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_3_name`` | | "elec" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_3_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_3_mass`` | | 9.10938188e-28 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_4_name`` | | "hp" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_4_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_4_mass`` | | 1.67262158e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_5_name`` | | "h" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_5_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_5_mass`` | | 1.67353251819e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_6_name`` | | "hm" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_6_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_6_mass`` | | 1.67444345638e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_7_name`` | | "dp" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_7_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_7_mass`` | | 3.34512158e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_8_name`` | | "d" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_8_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_8_mass`` | | 3.34603251819e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_9_name`` | | "h2p" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_9_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_9_mass`` | | 3.34615409819e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_10_name`` | | "dm" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_10_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_10_mass`` | | 3.34694345638e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_11_name`` | | "h2" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_11_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_11_mass`` | | 3.34706503638e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_12_name`` | | "hdp" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_12_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_12_mass`` | | 5.01865409819e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_13_name`` | | "hd" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_13_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_13_mass`` | | 5.01956503638e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_14_name`` | | "hepp" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_14_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_14_mass`` | | 6.69024316e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_15_name`` | | "hep" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_15_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_15_mass`` | | 6.69115409819e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_16_name`` | | "he" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_16_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_16_mass`` | | 6.69206503638e-24 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_17_name`` | | "cp" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_17_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_17_mass`` | | 2.007528417094e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_18_name`` | carbon cannot be declared as c because it conflicts | "carbon" | +| | with namespace C used for physical constants | | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_18_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_18_mass`` | | 2.0076195109128e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_19_name`` | | "ch" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_19_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_19_mass`` | | 2.1749727627316e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_20_name`` | | "ch2" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_20_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_20_mass`` | | 2.3423260145503998e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_21_name`` | | "ch3" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_21_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_21_mass`` | | .5096792663692e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_22_name`` | | "op" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_22_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_22_mass`` | | 2.6767349207316e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_23_name`` | | "o" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_23_gamma`` | | 5./3. | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_23_mass`` | | 2.6768260145504e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_24_name`` | | "ch4" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_24_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_24_mass`` | | 2.677032518188e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_25_name`` | | "ohp" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_25_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_25_mass`` | | 2.8440881725504e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_26_name`` | | "oh" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_26_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_26_mass`` | | 2.8441792663692003e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_27_name`` | | "h2op" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_27_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_27_mass`` | | 3.0114414243692e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_28_name`` | | "h2o" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_28_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_28_mass`` | | 3.011532518188e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_29_name`` | | "h3op" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_29_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_29_mass`` | | 3.178794676188e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_30_name`` | | "cop" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_30_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_30_mass`` | | 4.6843544316444e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_31_name`` | | "co" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_31_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_31_mass`` | | 4.6844455254632e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_32_name`` | | "o2p" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_32_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_32_mass`` | | 5.353560935282e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_33_name`` | | "o2" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_33_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_33_mass`` | | 5.3536520291008e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_34_name`` | | "co2" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_34_gamma`` | | 1.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``species_34_mass`` | | 7.3612715400136e-23 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ + + + **EOS_DIR=multigamma:** +---------------------------------------+---------------------------------------------------------+------------------------------+ @@ -144,89 +359,89 @@ namespace: ``eos`` +=======================================+=========================================================+==============================+ | ``eos_gamma_default`` | | 1.4 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_a_name`` | define the specie names, and their masses and gammas | "elec" | +| ``species_1_name`` | define the specie names, and their masses and gammas | "elec" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_a_gamma`` | | 5./3. | +| ``species_1_gamma`` | | 5./3. | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_a_mass`` | | 9.10938188e-28 | +| ``species_1_mass`` | | 9.10938188e-28 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_b_name`` | | "hp" | +| ``species_2_name`` | | "hp" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_b_gamma`` | | 5./3. | +| ``species_2_gamma`` | | 5./3. | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_b_mass`` | | 1.67262158e-24 | +| ``species_2_mass`` | | 1.67262158e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_c_name`` | | "h" | +| ``species_3_name`` | | "h" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_c_gamma`` | | 5./3. | +| ``species_3_gamma`` | | 5./3. | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_c_mass`` | | 1.67353251819e-24 | +| ``species_3_mass`` | | 1.67353251819e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_d_name`` | | "hm" | +| ``species_4_name`` | | "hm" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_d_gamma`` | | 5./3. | +| ``species_4_gamma`` | | 5./3. | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_d_mass`` | | 1.67444345638e-24 | +| ``species_4_mass`` | | 1.67444345638e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_e_name`` | | "dp" | +| ``species_5_name`` | | "dp" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_e_gamma`` | | 5./3. | +| ``species_5_gamma`` | | 5./3. | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_e_mass`` | | 3.34512158e-24 | +| ``species_5_mass`` | | 3.34512158e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_f_name`` | | "d" | +| ``species_6_name`` | | "d" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_f_gamma`` | | 5./3. | +| ``species_6_gamma`` | | 5./3. | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_f_mass`` | | 3.34603251819e-24 | +| ``species_6_mass`` | | 3.34603251819e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_g_name`` | | "h2p" | +| ``species_7_name`` | | "h2p" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_g_gamma`` | | 1.4 | +| ``species_7_gamma`` | | 1.4 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_g_mass`` | | 3.34615409819e-24 | +| ``species_7_mass`` | | 3.34615409819e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_h_name`` | | "dm" | +| ``species_8_name`` | | "dm" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_h_gamma`` | | 5./3. | +| ``species_8_gamma`` | | 5./3. | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_h_mass`` | | 3.34694345638e-24 | +| ``species_8_mass`` | | 3.34694345638e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_i_name`` | | "h2" | +| ``species_9_name`` | | "h2" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_i_gamma`` | | 1.4 | +| ``species_9_gamma`` | | 1.4 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_i_mass`` | | 3.34706503638e-24 | +| ``species_9_mass`` | | 3.34706503638e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_j_name`` | | "hdp" | +| ``species_10_name`` | | "hdp" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_j_gamma`` | | 1.4 | +| ``species_10_gamma`` | | 1.4 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_j_mass`` | | 5.01865409819e-24 | +| ``species_10_mass`` | | 5.01865409819e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_k_name`` | | "hd" | +| ``species_11_name`` | | "hd" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_k_gamma`` | | 1.4 | +| ``species_11_gamma`` | | 1.4 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_k_mass`` | | 5.01956503638e-24 | +| ``species_11_mass`` | | 5.01956503638e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_l_name`` | | "hepp" | +| ``species_12_name`` | | "hepp" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_l_gamma`` | | 5./3. | +| ``species_12_gamma`` | | 5./3. | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_l_mass`` | | 6.69024316e-24 | +| ``species_12_mass`` | | 6.69024316e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_m_name`` | | "hep" | +| ``species_13_name`` | | "hep" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_m_gamma`` | | 5./3. | +| ``species_13_gamma`` | | 5./3. | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_m_mass`` | | 6.69115409819e-24 | +| ``species_13_mass`` | | 6.69115409819e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_n_name`` | | "he" | +| ``species_14_name`` | | "he" | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_n_gamma`` | | 5./3. | +| ``species_14_gamma`` | | 5./3. | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``species_n_mass`` | | 6.69206503638e-24 | +| ``species_14_mass`` | | 6.69206503638e-24 | +---------------------------------------+---------------------------------------------------------+------------------------------+ @@ -341,14 +556,15 @@ namespace: ``integrator`` | ``retry_swap_jacobian`` | do we swap the Jacobian (from analytic to numerical or | 1 | | | vice versa) on a retry? | | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``retry_rtol_spec`` | Tolerances for the solver (relative and absolute), for | 1.e-12 | -| | the species and energy equations. | | +| ``retry_rtol_spec`` | Tolerances for the solver (relative and absolute), for | -1 | +| | the species and energy equations. If set to < 0, then | | +| | the same value as the first attempt is used. | | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``retry_rtol_enuc`` | | 1.e-6 | +| ``retry_rtol_enuc`` | | -1 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``retry_atol_spec`` | | 1.e-8 | +| ``retry_atol_spec`` | | -1 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``retry_atol_enuc`` | | 1.e-6 | +| ``retry_atol_enuc`` | | -1 | +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``do_species_clip`` | in the clean_state process, do we clip the species such | 1 | | | that they are in [0, 1]? | | @@ -358,15 +574,10 @@ namespace: ``integrator`` +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``subtract_internal_energy`` | flag for tuning on the subtraction of internal energy | 1 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``sdc_burn_tol_factor`` | SDC iteration tolerance adjustment factor | 1.e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ | ``scale_system`` | do we scale the ODE system we integrate to make it | 0 | | | O(1)? for Strang, this simply means scaling e by the | | | | initial energy? | | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``nse_iters`` | for the NSE update predictor-corrector, how many | 3 | -| | iterations do we take to get the new time NSE state | | -+---------------------------------------+---------------------------------------------------------+------------------------------+ | ``nse_deriv_dt_factor`` | for SDC+NSE, when estimating the derivatives of the NSE | 0.05 | | | table quantities, what fraction of dt do we use for the | | | | finite-difference estimate | | @@ -384,8 +595,6 @@ namespace: ``integrator`` +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ -| ``maximum_timestep_change_factor`` | Maximum amount any quantity can change by in a timestep | 1.01 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ | ``max_iter`` | Maximum number of iterations for the Newton solve | 25 | +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``tol`` | tolerance for the Newton solve | 1.e-10 | @@ -521,6 +730,10 @@ namespace: ``network`` +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``He_Fe_nse`` | | 0.88 | +---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``T_always_nse`` | temperature above which we always assume NSE, | 9.e9 | +| | regardless of composition note: rho_nse is still | | +| | considered. | | ++---------------------------------------+---------------------------------------------------------+------------------------------+ | ``nse_relax_factor`` | factor (< 1) by which to relax the criteria for | 1.0 | | | entering NSE. This is only applied after a failed burn. | | +---------------------------------------+---------------------------------------------------------+------------------------------+ @@ -530,7 +743,7 @@ namespace: ``network`` -**NETWORK_DIR=ase:** +**NETWORK_DIR=CNO_He_burn:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | @@ -542,64 +755,108 @@ namespace: ``network`` -**NETWORK_DIR=powerlaw:** +**NETWORK_DIR=ase:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ -| ``rtilde`` | the coefficient for the reaction rate | 1.e0 | +| ``disable_p_C12_to_N13`` | | 0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``nu`` | exponent for the temperature | 4.e0 | +| ``disable_He4_N13_to_p_O16`` | | 0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``specific_q_burn`` | reaction specific q-value (in erg/g) | 10.e0 | + + + +**NETWORK_DIR=he-burn.bak/he-burn-18a:** + +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``T_burn_ref`` | reaction thresholds (for the power law) | 1.0e0 | +| parameter | description | default value | ++=======================================+=========================================================+==============================+ +| ``disable_p_C12_to_N13`` | | 0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``rho_burn_ref`` | | 1.0e0 | +| ``disable_He4_N13_to_p_O16`` | | 0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``f_act`` | | 1.0e0 | + + + +**NETWORK_DIR=he-burn.bak/he-burn-22a:** + ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| parameter | description | default value | ++=======================================+=========================================================+==============================+ +| ``disable_p_C12_to_N13`` | | 0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``disable_He4_N13_to_p_O16`` | | 0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -**NETWORK_DIR=primordial_chem:** +**NETWORK_DIR=metal_chem:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ | ``small_x`` | cutoff for species mass fractions | 1.e-100 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``redshift`` | assumed redshift for primordial chem (Pop III star | 30e0 | -| | formation) | | +| ``redshift`` | redshift for metal chem (Pop II/I star formation) | 0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``metallicity`` | metallicity for metal chem (Pop II/I star formation) | 1e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``dust2gas_ratio`` | dust to gas ratio relative to solar | 1e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``crate`` | Cosmic ray ionization rate (per s) | 0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``Av`` | Av | 0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``ionH`` | H ionization rate (per s) | 0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``ionH2`` | H2 ionization rate (per s) | 0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``dissH2`` | H2 dissociation rate (per s) | 0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``ionC`` | C ionization rate (per s) | 0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``ionO`` | O ionization rate (per s) | 0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``dissCO`` | CO dissociation rate (per s) | 0e0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -**NETWORK_DIR=subch_approx:** +**NETWORK_DIR=powerlaw:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ -| ``disable_p_C12_to_N13`` | | 0 | +| ``rtilde`` | the coefficient for the reaction rate | 1.e0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``disable_He4_N13_to_p_O16`` | | 0 | +| ``nu`` | exponent for the temperature | 4.e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``specific_q_burn`` | reaction specific q-value (in erg/g) | 10.e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``T_burn_ref`` | reaction thresholds (for the power law) | 1.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``rho_burn_ref`` | | 1.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``f_act`` | | 1.0e0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -**NETWORK_DIR=subch_base:** +**NETWORK_DIR=primordial_chem:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ -| ``disable_p_C12_to_N13`` | | 0 | +| ``small_x`` | cutoff for species mass fractions | 1.e-100 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``disable_He4_N13_to_p_O16`` | | 0 | +| ``redshift`` | assumed redshift for primordial chem (Pop III star | 30e0 | +| | formation) | | +---------------------------------------+---------------------------------------------------------+------------------------------+ -**NETWORK_DIR=subch_full:** +**NETWORK_DIR=subch_base:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | @@ -875,6 +1132,106 @@ namespace: ``unit_test`` +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``skip_initial_normalization`` | | 0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``init_species_all_equal`` | | 0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ + + + +**unit_test/burn_cell_metal_chem:** + ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| parameter | description | default value | ++=======================================+=========================================================+==============================+ +| ``run_prefix`` | | "burn_cell_metal_chem" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``small_temp`` | floor values of temperature and density | 1.e1 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``small_dens`` | | 1.e-30 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``tmax`` | the final time to integrate to | 1.e20 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``tff_reduc`` | tff_reduc reduces the calculated freefall time to | 1.e-1 | +| | accordingly increase the density during the single zone | | +| | burn | | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``tfirst`` | first output time -- we will output in nsteps | 0.0 | +| | logarithmically spaced steps between [tfirst, tmax] | | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``nsteps`` | number of steps for the single zone burn | 1000 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``ninit`` | initial number density and temperature | 1e-1 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``temperature`` | | 1e2 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_1`` | list of species and their number densities used in the | 1.0e0 | +| | network (39 if including deuterium) | | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_2`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_3`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_4`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_5`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_6`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_7`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_8`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_9`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_10`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_11`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_12`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_13`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_14`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_15`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_16`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_17`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_18`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_19`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_20`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_21`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_22`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_23`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_24`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_25`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_26`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_27`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_28`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_29`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_30`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_31`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_32`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_33`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``primary_species_34`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ @@ -1068,138 +1425,69 @@ namespace: ``unit_test`` -**unit_test/nse_table_cell:** +**unit_test/jac_cell:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ +| ``run_prefix`` | | "" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_temp`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_dens`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``density`` | | 1.23e9 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``temperature`` | | 5.18e9 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``ye`` | | 0.472 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ - - - -**unit_test/test_aprox_rates:** - -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| parameter | description | default value | -+=======================================+=========================================================+==============================+ -| ``dens_min`` | | 1.e6 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``dens_max`` | | 1.e9 | +| ``tmax`` | the final time to integrate to | 1.e-2 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``temp_min`` | | 1.e6 | +| ``tfirst`` | first output time -- we will output in nsteps | 0.0 | +| | logarithmically spaced steps between [tfirst, tmax] | | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``temp_max`` | | 1.e12 | +| ``nsteps`` | number of steps (logarithmically spaced) | 100 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``metalicity_max`` | | 0.1e0 | +| ``density`` | | 1.e7 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``small_temp`` | | 1.e4 | +| ``temperature`` | | 3.e9 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``small_dens`` | | 1.e-4 | +| ``skip_initial_normalization`` | | 0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -**unit_test/test_ase:** +**unit_test/nse_table_cell:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ -| ``run_prefix`` | | "" | -+---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_temp`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_dens`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``density`` | | 1.e7 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``temperature`` | | 3.e9 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``ye`` | | 0.75 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``mu_p`` | | -3.0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``mu_n`` | | -12.0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X1`` | | 1.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X2`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X3`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X4`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X5`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X6`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X7`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X8`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X9`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X10`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X11`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X12`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X13`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X14`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X15`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X16`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X17`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X18`` | | 0.0e0 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X19`` | | 0.0e0 | +| ``density`` | | 1.23e9 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X20`` | | 0.0e0 | +| ``temperature`` | | 5.18e9 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``X21`` | | 0.0e0 | +| ``ye`` | | 0.472 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -**unit_test/test_ase/make_table:** +**unit_test/test_aprox_rates:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ -| ``small_dens`` | | 1.e5 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``small_temp`` | | 1.e5 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``rho_min`` | | 1.e6 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``rho_max`` | | 1.e10 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``nrho`` | | 5 | +| ``dens_min`` | | 1.e6 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``T_min`` | | 4.0e9 | +| ``dens_max`` | | 1.e9 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``T_max`` | | 1.e10 | +| ``temp_min`` | | 1.e6 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``nT`` | | 10 | +| ``temp_max`` | | 1.e12 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``Ye_min`` | | 0.4 | +| ``metalicity_max`` | | 0.1e0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``Ye_max`` | | 0.7 | +| ``small_temp`` | | 1.e4 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``nye`` | | 7 | +| ``small_dens`` | | 1.e-4 | +---------------------------------------+---------------------------------------------------------+------------------------------+ @@ -1308,65 +1596,121 @@ namespace: ``unit_test`` -**unit_test/test_nse:** +**unit_test/test_nse_interp:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ -| ``run_prefix`` | | "" | -+---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_temp`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_dens`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``density`` | | 1.e7 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``temperature`` | | 3.e9 | -+---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``mu_p`` | | -3.0 | +| ``density`` | | 1.23e9 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``mu_n`` | | -12.0 | +| ``temperature`` | | 5.18e9 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``y_e`` | | 0.5 | +| ``ye`` | | 0.472 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -**unit_test/test_nse_interp:** +**unit_test/test_nse_net:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ +| ``run_prefix`` | | "" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_temp`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_dens`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``density`` | | 1.23e9 | +| ``density`` | | 1.e7 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``temperature`` | | 5.18e9 | +| ``temperature`` | | 3.e9 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``ye`` | | 0.472 | +| ``ye`` | | 0.75 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``mu_p`` | | -3.0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``mu_n`` | | -12.0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X1`` | | 1.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X2`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X3`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X4`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X5`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X6`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X7`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X8`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X9`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X10`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X11`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X12`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X13`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X14`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X15`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X16`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X17`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X18`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X19`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X20`` | | 0.0e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``X21`` | | 0.0e0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -**unit_test/test_part_func:** +**unit_test/test_nse_net/make_table:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | +=======================================+=========================================================+==============================+ +| ``small_dens`` | | 1.e5 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_temp`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``small_dens`` | | 1.e5 | +| ``rho_min`` | | 1.e6 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``density`` | | 1.e9 | +| ``rho_max`` | | 1.e10 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``temperature`` | | 5.e9 | +| ``nrho`` | | 5 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``T_min`` | | 4.0e9 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``T_max`` | | 1.e10 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``nT`` | | 10 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``Ye_min`` | | 0.4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``Ye_max`` | | 0.7 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``nye`` | | 7 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -**unit_test/test_react:** +**unit_test/test_parameters:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | @@ -1377,22 +1721,34 @@ namespace: ``unit_test`` +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``temp_min`` | | 1.e6 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``temp_max`` | | 1.e15 | +| ``temp_max`` | | 1.e12 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``uniform_xn`` | | 0 | +| ``small_temp`` | | 1.e4 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``tmax`` | | 0.1e0 | +| ``small_dens`` | | 1.e-4 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``test_string`` | | "test" | ++---------------------------------------+---------------------------------------------------------+------------------------------+ + + + +**unit_test/test_part_func:** + +---------------------------------------+---------------------------------------------------------+------------------------------+ +| parameter | description | default value | ++=======================================+=========================================================+==============================+ | ``small_temp`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_dens`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``do_acc`` | | 1 | +| ``density`` | | 1.e9 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``temperature`` | | 5.e9 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -**unit_test/test_rhs:** +**unit_test/test_react:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | @@ -1407,14 +1763,18 @@ namespace: ``unit_test`` +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``uniform_xn`` | | 0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``tmax`` | | 0.1e0 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_temp`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_dens`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``do_acc`` | | 1 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ -**unit_test/test_screening:** +**unit_test/test_rhs:** +---------------------------------------+---------------------------------------------------------+------------------------------+ | parameter | description | default value | @@ -1425,13 +1785,13 @@ namespace: ``unit_test`` +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``temp_min`` | | 1.e6 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``temp_max`` | | 1.e12 | +| ``temp_max`` | | 1.e15 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``metalicity_max`` | | 0.1e0 | +| ``uniform_xn`` | | 0 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``small_temp`` | | 1.e4 | +| ``small_temp`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ -| ``small_dens`` | | 1.e-4 | +| ``small_dens`` | | 1.e5 | +---------------------------------------+---------------------------------------------------------+------------------------------+ @@ -1455,6 +1815,8 @@ namespace: ``unit_test`` +---------------------------------------+---------------------------------------------------------+------------------------------+ | ``small_dens`` | | 1.e-4 | +---------------------------------------+---------------------------------------------------------+------------------------------+ +| ``loops`` | | 1 | ++---------------------------------------+---------------------------------------------------------+------------------------------+ diff --git a/Docs/source/sdc.rst b/Docs/source/sdc.rst index 38821a2a1..1d9b52e29 100644 --- a/Docs/source/sdc.rst +++ b/Docs/source/sdc.rst @@ -147,7 +147,7 @@ The reactions don’t modify the total density, :math:`\rho`, or momentum, \Adv{\rho X_k}^{n+1/2} \\ \Adv{\rho e}^{n+1/2} \\ \end{array} \right ) + \left ( - \begin{array}{c} \rho \omegadot_k \\ \rho \Sdot \end{array} + \begin{array}{c} \rho \omegadot_k \\ \rho \epsilon \end{array} \right ) Here the advective terms are piecewise-constant (in time) From 139905be777b44bb0cd492e55512945e6358f842 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 6 Jan 2025 14:46:12 -0500 Subject: [PATCH 2/3] make sure the breakout EOS is used with a aux that is 1/mu defined (#1694) now we check this in the eos_init and use the proper aux index when accessing aux[] --- EOS/breakout/actual_eos.H | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/EOS/breakout/actual_eos.H b/EOS/breakout/actual_eos.H index ac0ba24bc..a4b511388 100644 --- a/EOS/breakout/actual_eos.H +++ b/EOS/breakout/actual_eos.H @@ -21,6 +21,10 @@ void actual_eos_init () gamma_const = 5.0_rt / 3.0_rt; } + // this EOS assumes that has a 1/mu entry -- make sure that is valid + if (aux_names_cxx[AuxZero::iinvmu] != "invmu") { + amrex::Error("invalid aux state for breakout EOS"); + } } template @@ -52,7 +56,7 @@ void actual_eos (I input, T& state) // Calculate mu. This is the only difference between // this EOS and gamma_law. - state.mu = 1.0_rt / state.aux[1]; + state.mu = 1.0_rt / state.aux[AuxZero::iinvmu]; switch (input) { From 4f35896022dca36a9884b66963ecee71ca85051e Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 6 Jan 2025 14:46:53 -0500 Subject: [PATCH 3/3] document the util/ directory (#1700) --- Docs/source/index.rst | 7 +++++++ Docs/source/util.rst | 46 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 Docs/source/util.rst diff --git a/Docs/source/index.rst b/Docs/source/index.rst index 55300f869..b4ca4e7f1 100644 --- a/Docs/source/index.rst +++ b/Docs/source/index.rst @@ -72,6 +72,13 @@ of state routines. nse sdc +.. toctree:: + :maxdepth: 1 + :caption: Util / external libraries + :hidden: + + util + .. toctree:: :maxdepth: 1 :caption: Unit tests diff --git a/Docs/source/util.rst b/Docs/source/util.rst new file mode 100644 index 000000000..1ac479819 --- /dev/null +++ b/Docs/source/util.rst @@ -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.