From 9e2e17b5b21e1da05d44ee6de834ee2a9b17b5e4 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Thu, 6 Jul 2023 12:52:43 -0400 Subject: [PATCH 01/10] fix a few clang compiler warnings (#1260) --- integration/RKC/rkc.H | 4 ++-- integration/utils/rkc_util.H | 18 +++++++++--------- unit_test/burn_cell_sdc/burn_cell.H | 10 ---------- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/integration/RKC/rkc.H b/integration/RKC/rkc.H index fb5597d496..37c698ef43 100644 --- a/integration/RKC/rkc.H +++ b/integration/RKC/rkc.H @@ -125,8 +125,8 @@ int rkclow (BurnT& state, RkcT& rstate) // note: the original Fortran code only had a single rtol, so // I needed to generalize this - int mmax = std::round(std::sqrt(std::max(rstate.rtol_spec, rstate.rtol_enuc) / - (10.0_rt * UROUND))); + int mmax = static_cast(std::round(std::sqrt(std::max(rstate.rtol_spec, + rstate.rtol_enuc) / (10.0_rt * UROUND)))); mmax = std::max(mmax, 2); bool newspc = true; bool jacatt = false; diff --git a/integration/utils/rkc_util.H b/integration/utils/rkc_util.H index 572628c203..6ff3da7fa9 100644 --- a/integration/utils/rkc_util.H +++ b/integration/utils/rkc_util.H @@ -3,7 +3,7 @@ template AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE -Real rkc_init_dt (BurnT& state, IntT& rstate, const Real max_dt, const Real sprad) +Real rkc_init_dt (BurnT& state, IntT& rstate, const Real max_timestep, const Real sprad) { // estimate the initial timestep @@ -11,11 +11,11 @@ Real rkc_init_dt (BurnT& state, IntT& rstate, const Real max_dt, const Real spra // this requires that yn hold the initial state and fn the corresponding RHS // it also requires temporary space yjm1 and yjm2 // finally, we require the initial spectral radius, sprad, and the maximum - // timestep (tout - tstart), max_dt. + // timestep (tout - tstart), max_timestep. - Real hmin = 10.0_rt * UROUND * std::max(std::abs(rstate.t), max_dt); + Real hmin = 10.0_rt * UROUND * std::max(std::abs(rstate.t), max_timestep); - Real absh = max_dt; + Real absh = max_timestep; if (sprad * absh > 1.0_rt) { absh = 1.0_rt / sprad; @@ -53,10 +53,10 @@ Real rkc_init_dt (BurnT& state, IntT& rstate, const Real max_dt, const Real spra } est = absh * std::sqrt(est / INT_NEQS); - if (0.1_rt * absh < max_dt * std::sqrt(est)) { + if (0.1_rt * absh < max_timestep * std::sqrt(est)) { absh = std::max(0.1_rt * absh / std::sqrt(est), hmin); } else { - absh = max_dt; + absh = max_timestep; } return absh; @@ -65,7 +65,7 @@ Real rkc_init_dt (BurnT& state, IntT& rstate, const Real max_dt, const Real spra template AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE -int rkcrho (BurnT& state, IntT& rstate, const Real max_dt, Real& sprad) +int rkcrho (BurnT& state, IntT& rstate, const Real max_timestep, Real& sprad) { // RKCRHO attempts to compute a close upper bound, SPRAD, on @@ -85,7 +85,7 @@ int rkcrho (BurnT& state, IntT& rstate, const Real max_dt, Real& sprad) // rstate.fn to the RHS called with yn for nsteps == 0 // rstate.sprad to the previous eigenvector for nsteps > 0 // - // max_dt is the maximum timestep, typically tout - tbegin + // max_timestep is the maximum timestep, typically tout - tbegin // // we use rstate.yjm1 and rstate.yjm2 as internal storage @@ -94,7 +94,7 @@ int rkcrho (BurnT& state, IntT& rstate, const Real max_dt, Real& sprad) // sprad smaller than small = 1/hmax are not // interesting because they do not constrain the step size. - Real small = 1.0_rt / max_dt; + Real small = 1.0_rt / max_timestep; // The initial slope is used as guess when nsteps = 0 and // thereafter the last computed eigenvector. Some care diff --git a/unit_test/burn_cell_sdc/burn_cell.H b/unit_test/burn_cell_sdc/burn_cell.H index 94a4e98969..78705a9bdd 100644 --- a/unit_test/burn_cell_sdc/burn_cell.H +++ b/unit_test/burn_cell_sdc/burn_cell.H @@ -293,11 +293,6 @@ void burn_cell_c() burn_state.T_fixed = -1.0; - - // output initial burn type data - Real time = 0.0_rt; - - std::ofstream state_over_time("state_over_time.txt"); // we will divide the total integration time into nsteps that are @@ -317,11 +312,6 @@ void burn_cell_c() dlogt = (std::log10(tmax) - std::log10(tfirst)) / (nsteps - 1); } - // save the initial state -- we'll use this to determine - // how much things changed over the entire burn - - burn_t state_in = burn_state; - // output the data in columns, one line per timestep state_over_time << std::setw(10) << "# Time"; From d5726e5b8e31295c949c23ab6ddc7c571a599eae Mon Sep 17 00:00:00 2001 From: Max Katz Date: Thu, 6 Jul 2023 14:45:00 -0400 Subject: [PATCH 02/10] Migrate ignition_simple to the new network implementation (#1255) This change involves roundoff-level differences due to the different implementation of the RHS and Jacobian. --- networks/ignition_simple/Make.package | 2 +- networks/ignition_simple/actual_network.H | 111 ++++++++++- networks/ignition_simple/actual_rhs.H | 180 ------------------ networks/ignition_simple/actual_rhs_data.cpp | 11 -- .../ci-benchmarks/ignition_simple.out | 2 +- 5 files changed, 109 insertions(+), 197 deletions(-) delete mode 100644 networks/ignition_simple/actual_rhs_data.cpp diff --git a/networks/ignition_simple/Make.package b/networks/ignition_simple/Make.package index f2ee53d848..abe522a4f2 100644 --- a/networks/ignition_simple/Make.package +++ b/networks/ignition_simple/Make.package @@ -4,8 +4,8 @@ ifeq ($(USE_REACT),TRUE) CEXE_sources += actual_network_data.cpp CEXE_headers += actual_network.H - CEXE_sources += actual_rhs_data.cpp CEXE_headers += actual_rhs.H + USE_RATES = TRUE USE_SCREENING = TRUE endif diff --git a/networks/ignition_simple/actual_network.H b/networks/ignition_simple/actual_network.H index b436fc5c07..c820871c71 100644 --- a/networks/ignition_simple/actual_network.H +++ b/networks/ignition_simple/actual_network.H @@ -1,13 +1,17 @@ #ifndef actual_network_H #define actual_network_H +#define NEW_NETWORK_IMPLEMENTATION + #include #include +using namespace amrex; + #include #include - -using namespace amrex; +#include +#include void actual_network_init(); @@ -21,8 +25,107 @@ namespace network namespace Rates { - const int NumRates = 1; - const int NumGroups = 2; + enum NetworkRates + { + C12_C12_to_Mg24 = 1, + NumRates = C12_C12_to_Mg24 + }; } +namespace RHS +{ + AMREX_GPU_HOST_DEVICE AMREX_INLINE + constexpr rhs_t rhs_data (int rate) + { + using namespace Species; + using namespace Rates; + + rhs_t data{}; + + data.species_A = -1; + data.species_B = -1; + data.species_C = -1; + data.species_D = -1; + data.species_E = -1; + data.species_F = -1; + + data.number_A = 0; + data.number_B = 0; + data.number_C = 0; + data.number_D = 0; + data.number_E = 0; + data.number_F = 0; + + data.exponent_A = 0; + data.exponent_B = 0; + data.exponent_C = 0; + data.exponent_D = 0; + data.exponent_E = 0; + data.exponent_F = 0; + + data.forward_branching_ratio = 1.0_rt; + data.reverse_branching_ratio = 1.0_rt; + + data.apply_identical_particle_factor = 1; + + data.rate_can_be_tabulated = 1; + + data.screen_forward_reaction = 1; + data.screen_reverse_reaction = 1; + + data.additional_reaction_1 = -1; + data.additional_reaction_2 = -1; + data.additional_reaction_3 = -1; + + switch (rate) { + + case C12_C12_to_Mg24: + data.species_A = C12; + data.species_D = Mg24; + + data.number_A = 2; + data.number_D = 1; + + data.exponent_A = 2; + data.exponent_D = 1; + + // This network doesn't allow the reverse reaction + data.reverse_branching_ratio = 0.0_rt; + break; + } + + return data; + } + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + void evaluate_analytical_rate (const rhs_state_t& state, rate_t& rates) + { + using namespace Species; + using namespace Rates; + + if constexpr (rate == C12_C12_to_Mg24) { + rate_c12c12(state.tf, 1.0_rt, rates.fr, rates.frdt, rates.rr, rates.rrdt); + } + } + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + void postprocess_rate (const rhs_state_t& state, rate_t& rates, + rate_t& rates1, [[maybe_unused]] rate_t& rates2, [[maybe_unused]] rate_t& rates3) + { + using namespace Species; + using namespace Rates; + + // Nothing to do for this network. + } + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + Real ener_gener_rate (Real const& dydt) + { + return dydt * network::mion(spec) * C::Legacy::enuc_conv2; + } +} // namespace RHS + #endif diff --git a/networks/ignition_simple/actual_rhs.H b/networks/ignition_simple/actual_rhs.H index 5daf9de7dd..2cf0ad127e 100644 --- a/networks/ignition_simple/actual_rhs.H +++ b/networks/ignition_simple/actual_rhs.H @@ -1,186 +1,6 @@ #ifndef actual_rhs_H #define actual_rhs_H -#include #include -#include -#include -#include - -using namespace amrex; -using namespace network; - -void actual_rhs_init (); - -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void evaluate_rates(burn_t& state, Array1D& rr) -{ - using namespace Species; - - Real temp = state.T; - Real dens = state.rho; - - // screening wants molar fractions - Array1D y; - for (int i = 1; i <= NumSpec; ++i) { - y(i) = state.xn[i-1] * aion_inv[i-1]; - } - - // call the screening routine - plasma_state_t pstate; - fill_plasma_state(pstate, temp, dens, y); - - Real sc1212, dsc1212dt, dsc1212dd; - - int jscr = 0; - screen(pstate, jscr, - zion[C12-1], aion[C12-1], zion[C12-1], aion[C12-1], - sc1212, dsc1212dt, dsc1212dd); - - // compute some often used temperature constants - Real T9 = temp / 1.e9_rt; - Real dT9dt = 1.0_rt / 1.e9_rt; - Real T9a = T9 / (1.0_rt + 0.0396_rt * T9); - Real dT9adt = (T9a / T9 - (T9a / (1.0_rt + 0.0396_rt * T9)) * 0.0396_rt) * dT9dt; - - // compute the CF88 rate - Real scratch = std::pow(T9a, (1.0_rt / 3.0_rt)); - Real dscratchdt = (1.0_rt / 3.0_rt) * std::pow(T9a, (-2.0_rt / 3.0_rt)) * dT9adt; - - Real a = 4.27e26_rt * std::pow(T9a, (5.0_rt / 6.0_rt)) * std::pow(T9, -1.5e0_rt); - Real dadt = (5.0_rt / 6.0_rt) * (a / T9a) * dT9adt - 1.5e0_rt * (a / T9) * dT9dt; - - Real b = std::exp(-84.165e0_rt / scratch - 2.12e-3_rt * T9 * T9 * T9); - Real dbdt = (84.165e0_rt * dscratchdt / (scratch * scratch) - 3.0_rt * 2.12e-3_rt * T9 * T9 * dT9dt) * b; - - Real rate = a * b; - Real dratedt = dadt * b + a * dbdt; - - // Save the rates - - rr(1).rates(1) = sc1212 * rate; - rr(2).rates(1) = dsc1212dt * rate + sc1212 * dratedt; -} - - -// Computes the instantaneous energy generation rate - -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void ener_gener_rate (const Real& dydt, Real& enuc) -{ - using namespace Species; - using namespace C::Legacy; - using namespace network_rp; - - // This is basically e = m c**2 - - // Note that since we don't explicitly evolve Mg24 - // in this network, we need to explicitly add its - // contribution in this routine. We can factor out - // the common factor of dydt(C12), we just need to - // account for a factor of aion(C12) / aion(Mg24) - // for the second term to make the expression work. - - enuc = dydt * (mion(C12) - mion(Mg24) / 2) * enuc_conv2; -} - - -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void actual_rhs (burn_t& state, Array1D& ydot) -{ - using namespace Species; - - Array1D rr; - evaluate_rates(state, rr); - - // Now get the data from the state. - - Real temp = state.T; - Real dens = state.rho; - - Real rate = rr(1).rates(1); - - // The change in number density of C12 is - // d(n12)/dt = - 2 * 1/2 (n12)**2 - // - // where is the average of the relative velocity times the cross - // section for the reaction, and the factor accounting for the total number - // of particle pairs has a 1/2 because we are considering a reaction involving - // identical particles (see Clayton p. 293). Finally, the -2 means that for - // each reaction, we lose 2 carbon nuclei. - // - // The corresponding Mg24 change is - // d(n24)/dt = + 1/2 (n12)**2 - // - // note that no factor of 2 appears here, because we create only 1 Mg nuclei. - // - // Switching over to mass fractions, using n = rho X N_A/A, where N_A is - // Avogadro's number, and A is the mass number of the nucleon, we get - // - // d(X12)/dt = -2 *1/2 (X12)**2 rho N_A / A12 - // - // d(X24)/dt = + 1/2 (X12)**2 rho N_A (A24/A12**2) - // - // these are equal and opposite. - // - // The quantity [N_A ] is what is tabulated in Caughlin and Fowler. - - Real xc12tmp = amrex::max(state.xn[C12-1], 0.0_rt); - ydot(C12) = -(1.0_rt / 12.0_rt) * dens * rate * xc12tmp * xc12tmp; - ydot(O16) = 0.0_rt; - ydot(Mg24) = (1.0_rt / 12.0_rt) * dens * rate * xc12tmp * xc12tmp; - - // Convert back to molar form - - for (int i = 1; i <= NumSpec; ++i) { - ydot(i) = ydot(i) * aion_inv[i-1]; - } - - ener_gener_rate(ydot(C12), ydot(net_ienuc)); -} - - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void actual_jac (burn_t& state, MatrixType& jac) -{ - using namespace Species; - - Array1D rr; - evaluate_rates(state, rr); - - // Get data from the state - - Real dens = state.rho; - - Real rate = rr(1).rates(1); - Real dratedt = rr(2).rates(1); - Real xc12tmp = amrex::max(state.xn[C12-1], 0.0_rt); - - // initialize - jac.zero(); - - // carbon jacobian elements - jac(C12, C12) = -(1.0_rt / 6.0_rt) * dens * rate * xc12tmp; - jac(Mg24, C12) = -0.5_rt * jac(C12, C12); - - // add the temperature derivatives: df(y_i) / dT - Real jac_C12_T = -(1.0_rt / 12.0_rt) * (dens * dratedt * xc12tmp * xc12tmp); - - // Convert back to molar form - // Note that the factor of 1/A cancels in the (C12,C12) Jacobian element, - // so this conversion is necessarily only for the temperature derivative. - jac_C12_T *= aion_inv[C12-1]; - - // Now store as df(y_i) / de - jac(C12, net_ienuc) = temperature_to_energy_jacobian(state, jac_C12_T); - jac(Mg24, net_ienuc) = temperature_to_energy_jacobian(state, -0.5_rt * jac_C12_T); - - // Energy generation rate Jacobian elements with respect to species - ener_gener_rate(jac(C12, C12), jac(net_ienuc, C12)); - - // Energy generation rate Jacobian element with respect to energy - ener_gener_rate(jac(C12, net_ienuc), jac(net_ienuc, net_ienuc)); -} #endif diff --git a/networks/ignition_simple/actual_rhs_data.cpp b/networks/ignition_simple/actual_rhs_data.cpp deleted file mode 100644 index 506321fcdf..0000000000 --- a/networks/ignition_simple/actual_rhs_data.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include - -void actual_rhs_init () -{ - using namespace Species; - - screening_init(); - - int jscr = 0; - add_screening_factor(jscr++, zion[C12-1], aion[C12-1], zion[C12-1], aion[C12-1]); -} diff --git a/unit_test/test_rhs/ci-benchmarks/ignition_simple.out b/unit_test/test_rhs/ci-benchmarks/ignition_simple.out index 6249285494..5925c9c79b 100644 --- a/unit_test/test_rhs/ci-benchmarks/ignition_simple.out +++ b/unit_test/test_rhs/ci-benchmarks/ignition_simple.out @@ -21,7 +21,7 @@ J_carbon-12_magnesium-24 0 0 J_oxygen-16_magnesium-24 0 0 J_magnesium-24_magnesium-24 0 0 - J_E_magnesium-24 0 0 + J_E_magnesium-24 -0 -0 J_carbon-12_E -3.0258460306e-08 -5.079112025e-85 J_oxygen-16_E 0 0 J_magnesium-24_E 2.5395560125e-85 1.5129230153e-08 From a1d3dac37021dc6b773814f34413a895ba040db0 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Fri, 7 Jul 2023 02:31:38 -0400 Subject: [PATCH 03/10] Remove rate_type.H from files that don't use rate_t (#1264) --- integration/QSS/actual_integrator.H | 1 - networks/general_null/actual_rhs.H | 1 - networks/ignition_chamulak/actual_rhs.H | 1 - 3 files changed, 3 deletions(-) diff --git a/integration/QSS/actual_integrator.H b/integration/QSS/actual_integrator.H index 5b3fd9a44a..916930fdde 100644 --- a/integration/QSS/actual_integrator.H +++ b/integration/QSS/actual_integrator.H @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/networks/general_null/actual_rhs.H b/networks/general_null/actual_rhs.H index b8ceaba088..c34a544071 100644 --- a/networks/general_null/actual_rhs.H +++ b/networks/general_null/actual_rhs.H @@ -4,7 +4,6 @@ #include #include #include -#include using namespace amrex; using namespace network_rp; diff --git a/networks/ignition_chamulak/actual_rhs.H b/networks/ignition_chamulak/actual_rhs.H index a5398e2608..3fd9ba2cd6 100644 --- a/networks/ignition_chamulak/actual_rhs.H +++ b/networks/ignition_chamulak/actual_rhs.H @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include From b0b5c193b79634bec86c382a3e93e4dd712ff60f Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 7 Jul 2023 17:45:15 -0400 Subject: [PATCH 04/10] silence an unused var warning (#1262) --- EOS/helmholtz/actual_eos.H | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EOS/helmholtz/actual_eos.H b/EOS/helmholtz/actual_eos.H index 884437c9bc..f8a6ac845c 100644 --- a/EOS/helmholtz/actual_eos.H +++ b/EOS/helmholtz/actual_eos.H @@ -1486,6 +1486,8 @@ template AMREX_GPU_HOST_DEVICE AMREX_INLINE bool is_input_valid (I input) { + amrex::ignore_unused(input); + static_assert(std::is_same::value, "input must be an eos_input_t"); bool valid = true; From 39bd40b4ddf5c4677197169907dc41af5d335689 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 7 Jul 2023 17:46:05 -0400 Subject: [PATCH 05/10] update the docs regarding scale_system and use_circle_theorem (#1263) --- sphinx_docs/source/integrators.rst | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sphinx_docs/source/integrators.rst b/sphinx_docs/source/integrators.rst index 198230da73..77c59767df 100644 --- a/sphinx_docs/source/integrators.rst +++ b/sphinx_docs/source/integrators.rst @@ -360,17 +360,26 @@ the allowed options are: and nuclear reactions. However, this integrator has difficulty near NSE, so we don't recommend its use in production for nuclear astrophysics. +.. index:: integrator.use_circle_theorem + * ``RKC``: a stabilized explicit Runge-Kutta-Chebyshev integrator based on :cite:`sommeijer_rkc_1998`. This does not require a Jacobian, but does need to estimate the spectral radius of the system, which is done internally. This works for moderately stiff problems. + The spectral radius is estimated by default using the power method, + built into RKC. Alternately, by setting ``integrator.use_circle_theorem=1``, + the `Gershgorin circle theorem `_ + is used instead. + * ``VODE``: the VODE :cite:`vode` integration package. We ported this integrator to C++ and removed the non-stiff integration code paths. We recommend that you use the VODE solver, as it is the most robust. +.. index:: integrator.scale_system + .. important:: The integrator will not abort if it encounters trouble. Instead it will @@ -379,10 +388,12 @@ robust. .. note:: - For Strang split integration, the runtime parameter ``integrator.scale_system`` + The runtime parameter ``integrator.scale_system`` will scale the internal energy that the integrator sees by the initial value of :math:`e` to make the system :math:`\mathcal{O}(1)`. The value - of ``atol_enuc`` will likewise be scaled. + of ``atol_enuc`` will likewise be scaled. This works for both Strang + and simplified-SDC. For the ``RKC`` integrator, this is enabled by + default. For most integrators this algebraic change should not affect the output to more than roundoff, but the option is included to allow for some From c04000480d42541987c32fe200f24570f23c3dcd Mon Sep 17 00:00:00 2001 From: "Eric T. Johnson" Date: Fri, 7 Jul 2023 19:45:51 -0400 Subject: [PATCH 06/10] Make operator<< work for any subclass of eos_base_t (#1266) --- interfaces/eos_type.H | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/interfaces/eos_type.H b/interfaces/eos_type.H index eb78600c6f..b378dd4e22 100644 --- a/interfaces/eos_type.H +++ b/interfaces/eos_type.H @@ -375,10 +375,7 @@ std::ostream& print_state (std::ostream& o, T const& eos_state) return o; } -template ::value || - std::is_same::value || - std::is_same::value - >::type> +template ::value>::type> inline std::ostream& operator<< (std::ostream& o, T const& eos_state) { From 4bea489acd72ecdec9ae2a20d37e45a7fe6081da Mon Sep 17 00:00:00 2001 From: Max Katz Date: Sat, 8 Jul 2023 10:41:18 -0400 Subject: [PATCH 07/10] Expand test_rhs CI coverage to more networks (#1268) --- .github/workflows/test_rhs.yml | 119 ++++ unit_test/test_rhs/ci-benchmarks/aprox13.out | 229 ++++++++ unit_test/test_rhs/ci-benchmarks/aprox19.out | 445 +++++++++++++++ unit_test/test_rhs/ci-benchmarks/aprox21.out | 533 ++++++++++++++++++ unit_test/test_rhs/ci-benchmarks/iso7.out | 85 +++ unit_test/test_rhs/ci-benchmarks/powerlaw.out | 29 + unit_test/test_rhs/ci-benchmarks/rprox.out | 148 +++++ .../ci-benchmarks/triple_alpha_plus_cago.out | 40 ++ 8 files changed, 1628 insertions(+) create mode 100644 unit_test/test_rhs/ci-benchmarks/aprox13.out create mode 100644 unit_test/test_rhs/ci-benchmarks/aprox19.out create mode 100644 unit_test/test_rhs/ci-benchmarks/aprox21.out create mode 100644 unit_test/test_rhs/ci-benchmarks/iso7.out create mode 100644 unit_test/test_rhs/ci-benchmarks/powerlaw.out create mode 100644 unit_test/test_rhs/ci-benchmarks/rprox.out create mode 100644 unit_test/test_rhs/ci-benchmarks/triple_alpha_plus_cago.out diff --git a/.github/workflows/test_rhs.yml b/.github/workflows/test_rhs.yml index d9937b1aa1..5fc11c8edb 100644 --- a/.github/workflows/test_rhs.yml +++ b/.github/workflows/test_rhs.yml @@ -47,3 +47,122 @@ jobs: run: | cd unit_test/test_rhs diff test.out ci-benchmarks/ignition_simple.out + + - name: Compile, test_rhs (VODE, iso7) + run: | + cd unit_test/test_rhs + make realclean + make NETWORK_DIR=iso7 -j 4 + + - name: Run test_rhs (VODE, iso7) + run: | + cd unit_test/test_rhs + ./main3d.gnu.ex inputs_iso7 + ../../external/amrex/Tools/Plotfile/fextrema.gnu.ex react_iso7_test_rhs.VODE > test.out + + - name: Compare to stored output (VODE, iso7) + run: | + cd unit_test/test_rhs + diff test.out ci-benchmarks/iso7.out + + - name: Compile, test_rhs (VODE, aprox13) + run: | + cd unit_test/test_rhs + make realclean + make NETWORK_DIR=aprox13 -j 4 + + - name: Run test_rhs (VODE, aprox13) + run: | + cd unit_test/test_rhs + ./main3d.gnu.ex inputs_aprox13 + ../../external/amrex/Tools/Plotfile/fextrema.gnu.ex react_aprox13_test_rhs.VODE > test.out + + - name: Compare to stored output (VODE, aprox13) + run: | + cd unit_test/test_rhs + diff test.out ci-benchmarks/aprox13.out + + - name: Compile, test_rhs (VODE, aprox19) + run: | + cd unit_test/test_rhs + make realclean + make NETWORK_DIR=aprox19 -j 4 + + - name: Run test_rhs (VODE, aprox19) + run: | + cd unit_test/test_rhs + ./main3d.gnu.ex inputs_aprox19 + ../../external/amrex/Tools/Plotfile/fextrema.gnu.ex react_aprox19_test_rhs.VODE > test.out + + - name: Compare to stored output (VODE, aprox19) + run: | + cd unit_test/test_rhs + diff test.out ci-benchmarks/aprox19.out + + - name: Compile, test_rhs (VODE, aprox21) + run: | + cd unit_test/test_rhs + make realclean + make NETWORK_DIR=aprox21 -j 4 + + - name: Run test_rhs (VODE, aprox21) + run: | + cd unit_test/test_rhs + ./main3d.gnu.ex inputs_aprox21 + ../../external/amrex/Tools/Plotfile/fextrema.gnu.ex react_aprox21_test_rhs.VODE > test.out + + - name: Compare to stored output (VODE, aprox21) + run: | + cd unit_test/test_rhs + diff test.out ci-benchmarks/aprox21.out + + - name: Compile, test_rhs (VODE, rprox) + run: | + cd unit_test/test_rhs + make realclean + make NETWORK_DIR=rprox -j 4 + + - name: Run test_rhs (VODE, rprox) + run: | + cd unit_test/test_rhs + ./main3d.gnu.ex inputs_rprox + ../../external/amrex/Tools/Plotfile/fextrema.gnu.ex react_rprox_test_rhs.VODE > test.out + + - name: Compare to stored output (VODE, rprox) + run: | + cd unit_test/test_rhs + diff test.out ci-benchmarks/rprox.out + + - name: Compile, test_rhs (VODE, powerlaw) + run: | + cd unit_test/test_rhs + make realclean + make NETWORK_DIR=powerlaw -j 4 + + - name: Run test_rhs (VODE, powerlaw) + run: | + cd unit_test/test_rhs + ./main3d.gnu.ex inputs_powerlaw + ../../external/amrex/Tools/Plotfile/fextrema.gnu.ex react_powerlaw_test_rhs.VODE > test.out + + - name: Compare to stored output (VODE, powerlaw) + run: | + cd unit_test/test_rhs + diff test.out ci-benchmarks/powerlaw.out + + - name: Compile, test_rhs (VODE, triple_alpha_plus_cago) + run: | + cd unit_test/test_rhs + make realclean + make NETWORK_DIR=triple_alpha_plus_cago -j 4 + + - name: Run test_rhs (VODE, triple_alpha_plus_cago) + run: | + cd unit_test/test_rhs + ./main3d.gnu.ex inputs_triple_alpha_plus_cago + ../../external/amrex/Tools/Plotfile/fextrema.gnu.ex react_triple_alpha_plus_cago_test_rhs.VODE > test.out + + - name: Compare to stored output (VODE, triple_alpha_plus_cago) + run: | + cd unit_test/test_rhs + diff test.out ci-benchmarks/triple_alpha_plus_cago.out diff --git a/unit_test/test_rhs/ci-benchmarks/aprox13.out b/unit_test/test_rhs/ci-benchmarks/aprox13.out new file mode 100644 index 0000000000..2a3cb6c119 --- /dev/null +++ b/unit_test/test_rhs/ci-benchmarks/aprox13.out @@ -0,0 +1,229 @@ + plotfile = react_aprox13_test_rhs.VODE + time = 0 + variables minimum value maximum value + density 10000 100000000 + temperature 50000000 5000000000 + Ydot_helium-4 -30809612.994 474449259.45 + Ydot_carbon-12 -956103606.19 9145.5276887 + Ydot_oxygen-16 -3265216.2303 347453.339 + Ydot_neon-20 -4148875.4732 476086411.61 + Ydot_magnesium-24 -3475643.2761 1331020.2308 + Ydot_silicon-28 -5.4945559263e-34 14776547.569 + Ydot_sulfur-32 -980118.13864 34347.458535 + Ydot_argon-36 -38373.510896 1202018.2467 + Ydot_calcium-40 7.1596308155e-63 1791319.6008 + Ydot_titanium-44 -1158728.5383 6934.0759084 + Ydot_chromium-48 -860.04224989 335984.71822 + Ydot_iron-52 -367.27197733 574799.22612 + Ydot_nickel-56 -189.61128985 389870.10719 + Xold_helium-4 0.1 0.7 + Xold_carbon-12 0.1 0.7 + Xold_oxygen-16 0.1 0.7 + Xold_neon-20 0.01 0.06 + Xold_magnesium-24 0.01 0.06 + Xold_silicon-28 0.01 0.06 + Xold_sulfur-32 0.01 0.06 + Xold_argon-36 0.01 0.06 + Xold_calcium-40 0.01 0.06 + Xold_titanium-44 0.01 0.06 + Xold_chromium-48 0.01 0.06 + Xold_iron-52 0.01 0.06 + Xold_nickel-56 0.01 0.06 + Edot -2.890426471e+24 2.1721336915e+27 + J_helium-4_helium-4 -664444633.55 -1.3294669516e-25 + J_carbon-12_helium-4 -28171110.966 156807.51874 + J_oxygen-16_helium-4 -52302104.587 20217503.172 + J_neon-20_helium-4 -202663479.54 23163626.162 + J_magnesium-24_helium-4 -54526939.077 22062163.287 + J_silicon-28_helium-4 -8.3726566496e-33 231422295.59 + J_sulfur-32_helium-4 -16251946.165 27097.960541 + J_argon-36_helium-4 1.5791654947e-53 19683072.148 + J_calcium-40_helium-4 2.8638523262e-61 25578402.515 + J_titanium-44_helium-4 -15928914.677 116933.95033 + J_chromium-48_helium-4 6.8935846419e-69 5498823.3125 + J_iron-52_helium-4 5.1159900994e-72 9496238.1457 + J_nickel-56_helium-4 1.2369463711e-79 6465258.5107 + J_E_helium-4 -37.96418269 5.6963666435e+27 + J_helium-4_carbon-12 -549068.13437 16350655002 + J_carbon-12_carbon-12 -32736863803 -4.3536076636e-25 + J_oxygen-16_carbon-12 -215702563.02 53050483.792 + J_neon-20_carbon-12 6.6311977338e-70 16346498290 + J_magnesium-24_carbon-12 0 113943720.24 + J_silicon-28_carbon-12 0 113943720.24 + J_sulfur-32_carbon-12 0 0 + J_argon-36_carbon-12 0 0 + J_calcium-40_carbon-12 0 0 + J_titanium-44_carbon-12 0 0 + J_chromium-48_carbon-12 0 0 + J_iron-52_carbon-12 0 0 + J_nickel-56_carbon-12 0 0 + J_E_carbon-12 -7.4476136442e+22 7.3277248697e+28 + J_helium-4_oxygen-16 -196341285.62 116442916.35 + J_carbon-12_oxygen-16 -295329776.6 144805.77929 + J_oxygen-16_oxygen-16 -328244197.95 -5.8277893387e-34 + J_neon-20_oxygen-16 5.8277893387e-34 216650817.95 + J_magnesium-24_oxygen-16 0 147748545.89 + J_silicon-28_oxygen-16 1.527080985e-120 148091467.44 + J_sulfur-32_oxygen-16 8.1067562967e-121 280375.31056 + J_argon-36_oxygen-16 0 0 + J_calcium-40_oxygen-16 0 0 + J_titanium-44_oxygen-16 0 0 + J_chromium-48_oxygen-16 0 0 + J_iron-52_oxygen-16 0 0 + J_nickel-56_oxygen-16 0 0 + J_E_oxygen-16 -9.7641101938e+23 3.501361507e+27 + J_helium-4_neon-20 -10923354794 114705723.28 + J_carbon-12_neon-20 0 0 + J_oxygen-16_neon-20 0 144408911.44 + J_neon-20_neon-20 -11187893085 -1.6233097414e-40 + J_magnesium-24_neon-20 1.6233097414e-40 11055623939 + J_silicon-28_neon-20 0 0 + J_sulfur-32_neon-20 0 0 + J_argon-36_neon-20 0 0 + J_calcium-40_neon-20 0 0 + J_titanium-44_neon-20 0 0 + J_chromium-48_neon-20 0 0 + J_iron-52_neon-20 0 0 + J_nickel-56_neon-20 0 0 + J_E_neon-20 -5.2300550712e+26 9.8749094391e+28 + J_helium-4_magnesium-24 -17156241408 -2.3984168017e-49 + J_carbon-12_magnesium-24 0 0 + J_oxygen-16_magnesium-24 0 0 + J_neon-20_magnesium-24 0 194831.2025 + J_magnesium-24_magnesium-24 -17156590564 -2.3984168017e-49 + J_silicon-28_magnesium-24 2.3984168017e-49 17156415986 + J_sulfur-32_magnesium-24 0 0 + J_argon-36_magnesium-24 0 0 + J_calcium-40_magnesium-24 0 0 + J_titanium-44_magnesium-24 0 0 + J_chromium-48_magnesium-24 0 0 + J_iron-52_magnesium-24 0 0 + J_nickel-56_magnesium-24 0 0 + J_E_magnesium-24 -65676.173201 1.652673424e+29 + J_helium-4_silicon-28 -2556508974.5 20661.78792 + J_carbon-12_silicon-28 0 0 + J_oxygen-16_silicon-28 0 0 + J_neon-20_silicon-28 0 0 + J_magnesium-24_silicon-28 0 64178.19333 + J_silicon-28_silicon-28 -2556627254.1 -2.0843713716e-46 + J_sulfur-32_silicon-28 2.0843713716e-46 2556568114.3 + J_argon-36_silicon-28 0 0 + J_calcium-40_silicon-28 0 0 + J_titanium-44_silicon-28 0 0 + J_chromium-48_silicon-28 0 0 + J_iron-52_silicon-28 0 0 + J_nickel-56_silicon-28 0 0 + J_E_silicon-28 -2.904944194e+23 1.7139561264e+28 + J_helium-4_sulfur-32 -4251265603.3 8881309.5672 + J_carbon-12_sulfur-32 0 0 + J_oxygen-16_sulfur-32 0 0 + J_neon-20_sulfur-32 0 0 + J_magnesium-24_sulfur-32 0 0 + J_silicon-28_sulfur-32 0 11526828.516 + J_sulfur-32_sulfur-32 -4272159577.8 -1.2633324187e-51 + J_argon-36_sulfur-32 1.2633324187e-51 4261712590.6 + J_calcium-40_sulfur-32 0 0 + J_titanium-44_sulfur-32 0 0 + J_chromium-48_sulfur-32 0 0 + J_iron-52_sulfur-32 0 0 + J_nickel-56_sulfur-32 0 0 + J_E_sulfur-32 -5.95586278e+25 2.7240027744e+28 + J_helium-4_argon-36 -2892726250.5 30633239.377 + J_carbon-12_argon-36 0 0 + J_oxygen-16_argon-36 0 0 + J_neon-20_argon-36 0 0 + J_magnesium-24_argon-36 0 0 + J_silicon-28_argon-36 0 0 + J_sulfur-32_argon-36 0 40439706.196 + J_argon-36_argon-36 -2965434382.2 -2.5799600631e-59 + J_calcium-40_argon-36 2.5799600631e-59 2929080316.4 + J_titanium-44_argon-36 0 0 + J_chromium-48_argon-36 0 0 + J_iron-52_argon-36 0 0 + J_nickel-56_argon-36 0 0 + J_E_argon-36 -1.9628665054e+26 1.9664622402e+28 + J_helium-4_calcium-40 -517936627.01 8473576.1372 + J_carbon-12_calcium-40 0 0 + J_oxygen-16_calcium-40 0 0 + J_neon-20_calcium-40 0 0 + J_magnesium-24_calcium-40 0 0 + J_silicon-28_calcium-40 0 0 + J_sulfur-32_calcium-40 0 0 + J_argon-36_calcium-40 0 11266824.525 + J_calcium-40_calcium-40 -538142466.26 -2.7699660932e-62 + J_titanium-44_calcium-40 2.7699660932e-62 528039546.63 + J_chromium-48_calcium-40 0 0 + J_iron-52_calcium-40 0 0 + J_nickel-56_calcium-40 0 0 + J_E_calcium-40 -5.7630012735e+25 2.5421375524e+27 + J_helium-4_titanium-44 -2037370550.4 116917980.35 + J_carbon-12_titanium-44 0 0 + J_oxygen-16_titanium-44 0 0 + J_neon-20_titanium-44 0 0 + J_magnesium-24_titanium-44 0 0 + J_silicon-28_titanium-44 0 0 + J_sulfur-32_titanium-44 0 0 + J_argon-36_titanium-44 0 0 + J_calcium-40_titanium-44 0 191193384.41 + J_titanium-44_titanium-44 -2350257203.1 -7.5885706953e-67 + J_chromium-48_titanium-44 7.5885706953e-67 2193813876.8 + J_iron-52_titanium-44 0 0 + J_nickel-56_titanium-44 0 0 + J_E_titanium-44 -5.716897929e+26 1.5516206497e+28 + J_helium-4_chromium-48 -1754432181.5 1140460.0824 + J_carbon-12_chromium-48 0 0 + J_oxygen-16_chromium-48 0 0 + J_neon-20_chromium-48 0 0 + J_magnesium-24_chromium-48 0 0 + J_silicon-28_chromium-48 0 0 + J_sulfur-32_chromium-48 0 0 + J_argon-36_chromium-48 0 0 + J_calcium-40_chromium-48 0 0 + J_titanium-44_chromium-48 0 2145917.7202 + J_chromium-48_chromium-48 -1757850930.2 -6.1391882677e-70 + J_iron-52_chromium-48 6.1391882677e-70 1756141555.8 + J_nickel-56_chromium-48 0 0 + J_E_chromium-48 -8.4643789308e+24 1.3446027863e+28 + J_helium-4_iron-52 -762816796.01 493425.16888 + J_carbon-12_iron-52 0 0 + J_oxygen-16_iron-52 0 0 + J_neon-20_iron-52 0 0 + J_magnesium-24_iron-52 0 0 + J_silicon-28_iron-52 0 0 + J_sulfur-32_iron-52 0 0 + J_argon-36_iron-52 0 0 + J_calcium-40_iron-52 0 0 + J_titanium-44_iron-52 0 0 + J_chromium-48_iron-52 0 984752.87698 + J_iron-52_iron-52 -764364597.03 -1.6080302824e-77 + J_nickel-56_iron-52 1.6080302824e-77 763590696.52 + J_E_iron-52 -3.7811463572e+24 5.8873347529e+27 + J_helium-4_nickel-56 0 381082.60535 + J_carbon-12_nickel-56 0 0 + J_oxygen-16_nickel-56 0 0 + J_neon-20_nickel-56 0 0 + J_magnesium-24_nickel-56 0 0 + J_silicon-28_nickel-56 0 0 + J_sulfur-32_nickel-56 0 0 + J_argon-36_nickel-56 0 0 + J_calcium-40_nickel-56 0 0 + J_titanium-44_nickel-56 0 0 + J_chromium-48_nickel-56 0 0 + J_iron-52_nickel-56 0 381082.60535 + J_nickel-56_nickel-56 -381082.60535 0 + J_E_nickel-56 -2.9411320544e+24 8.0628253938e+14 + J_helium-4_E -1.375359511e-10 9.1794090251e-09 + J_carbon-12_E -1.8412378137e-08 6.8308749195e-13 + J_oxygen-16_E -4.9194133409e-11 4.971951643e-12 + J_neon-20_E -4.6430504619e-11 9.1783465851e-09 + J_magnesium-24_E -6.0204564564e-11 1.6123698407e-11 + J_silicon-28_E -1.4316194399e-47 1.0943806936e-10 + J_sulfur-32_E -8.1615057672e-12 1.9374252323e-13 + J_argon-36_E -1.9700446203e-13 1.0246858574e-11 + J_calcium-40_E 1.4195780746e-76 1.5856622607e-11 + J_titanium-44_E -2.6048922729e-11 5.661944513e-14 + J_chromium-48_E -3.6253518502e-16 6.1323626171e-12 + J_iron-52_E -5.1009751059e-17 9.6775165976e-12 + J_nickel-56_E -1.9973940644e-17 7.5873160427e-12 + J_E_E -1577162.6812 41552909100 + diff --git a/unit_test/test_rhs/ci-benchmarks/aprox19.out b/unit_test/test_rhs/ci-benchmarks/aprox19.out new file mode 100644 index 0000000000..201258eb2d --- /dev/null +++ b/unit_test/test_rhs/ci-benchmarks/aprox19.out @@ -0,0 +1,445 @@ + plotfile = react_aprox19_test_rhs.VODE + time = 0 + variables minimum value maximum value + density 10000 100000000 + temperature 50000000 5000000000 + Ydot_hydrogen-1 8.6607464632e-05 1.3073380344e+12 + Ydot_helium-3 -1.3076161972e+12 -8.6943749398e-05 + Ydot_helium-4 4.3237314804e-05 6.538087849e+11 + Ydot_carbon-12 -1105871714.6 1868.0861291 + Ydot_nitrogen-14 1.1710238604e-08 428182473.08 + Ydot_oxygen-16 -3263960.7002 215410.42728 + Ydot_neon-20 -214378.44247 471897155.17 + Ydot_magnesium-24 -2133700.013 795800.16674 + Ydot_silicon-28 -4.5791259789e-34 9150205.4652 + Ydot_sulfur-32 -598698.53661 21457.453377 + Ydot_argon-36 -23974.653095 737283.94347 + Ydot_calcium-40 4.4918913518e-63 1093914.701 + Ydot_titanium-44 -687488.87328 4118.0078318 + Ydot_chromium-48 -537.21545078 201278.43884 + Ydot_iron-52 -2343451623.5 0.00034738039312 + Ydot_iron-54 0 2342933126.8 + Ydot_nickel-56 -164526.66442 10019113.905 + Ydot_neutron -10507267292 0.00037724206306 + Ydot_proton -5821424853.9 329070.23969 + Xold_hydrogen-1 0.00625 0.0375 + Xold_helium-3 0.00625 0.0375 + Xold_helium-4 0.1 0.7 + Xold_carbon-12 0.1 0.7 + Xold_nitrogen-14 0.00625 0.0375 + Xold_oxygen-16 0.1 0.7 + Xold_neon-20 0.00625 0.0375 + Xold_magnesium-24 0.00625 0.0375 + Xold_silicon-28 0.00625 0.0375 + Xold_sulfur-32 0.00625 0.0375 + Xold_argon-36 0.00625 0.0375 + Xold_calcium-40 0.00625 0.0375 + Xold_titanium-44 0.00625 0.0375 + Xold_chromium-48 0.00625 0.0375 + Xold_iron-52 0.00625 0.0375 + Xold_iron-54 0.00625 0.0375 + Xold_nickel-56 0.00625 0.0375 + Xold_neutron 0.00625 0.0375 + Xold_proton 0.00625 0.0375 + Edot 7.5242949946e+14 8.1592675307e+30 + J_hydrogen-1_hydrogen-1 -59732766098 -3.7590547944e-06 + J_helium-3_hydrogen-1 2.586350502e-16 0.04958554103 + J_helium-4_hydrogen-1 5.2975868011e-09 0.07375836734 + J_carbon-12_hydrogen-1 -29866383049 -1.8712851999e-06 + J_nitrogen-14_hydrogen-1 1.8736381767e-06 29866383049 + J_oxygen-16_hydrogen-1 -0.073499950597 -2.352976721e-09 + J_neon-20_hydrogen-1 0 0 + J_magnesium-24_hydrogen-1 0 0 + J_silicon-28_hydrogen-1 0 0 + J_sulfur-32_hydrogen-1 0 0 + J_argon-36_hydrogen-1 0 0 + J_calcium-40_hydrogen-1 0 0 + J_titanium-44_hydrogen-1 0 0 + J_chromium-48_hydrogen-1 0 0 + J_iron-52_hydrogen-1 0 0 + J_iron-54_hydrogen-1 0 0 + J_nickel-56_hydrogen-1 0 0 + J_neutron_hydrogen-1 0 0 + J_proton_hydrogen-1 0 0 + J_E_hydrogen-1 2.1237371823e+13 3.3757896591e+29 + J_hydrogen-1_helium-3 0.083240790137 2.0921859156e+14 + J_helium-3_helium-3 -2.0921859156e+14 -0.08339092966 + J_helium-4_helium-3 0.041808069473 1.0460929578e+14 + J_carbon-12_helium-3 0 0 + J_nitrogen-14_helium-3 0 0 + J_oxygen-16_helium-3 0 0 + J_neon-20_helium-3 0 0 + J_magnesium-24_helium-3 0 0 + J_silicon-28_helium-3 0 0 + J_sulfur-32_helium-3 0 0 + J_argon-36_helium-3 0 0 + J_calcium-40_helium-3 0 0 + J_titanium-44_helium-3 0 0 + J_chromium-48_helium-3 0 0 + J_iron-52_helium-3 0 0 + J_iron-54_helium-3 0 0 + J_nickel-56_helium-3 0 0 + J_neutron_helium-3 0 0 + J_proton_helium-3 0 0 + J_E_helium-3 2.4825899081e+17 1.2979583538e+33 + J_hydrogen-1_helium-4 -0.448 -8.9368763863e-07 + J_helium-3_helium-4 -0.448 -8.9368763863e-07 + J_helium-4_helium-4 -573505840.55 0.896 + J_carbon-12_helium-4 -28066508.652 151095.37704 + J_nitrogen-14_helium-4 -107832532.98 -3.5509584119e-31 + J_oxygen-16_helium-4 -52056348.745 20152253.695 + J_neon-20_helium-4 -12286729.026 52983269.386 + J_magnesium-24_helium-4 -34296533.677 12906424.87 + J_silicon-28_helium-4 -7.7090004295e-33 141685715.9 + J_sulfur-32_helium-4 -9835400.4459 16660.495136 + J_argon-36_helium-4 9.9042743017e-54 11975985.306 + J_calcium-40_helium-4 1.7967565407e-61 15619377.371 + J_titanium-44_helium-4 -9361896.5392 68917.659029 + J_chromium-48_helium-4 4.3276804664e-69 3274334.9838 + J_iron-52_helium-4 3.2126910763e-72 5583494.7706 + J_iron-54_helium-4 0 237098.17075 + J_nickel-56_helium-4 2.0673829201e-80 3548434.8158 + J_neutron_helium-4 0 3.1564509005e-05 + J_proton_helium-4 0 474196.3415 + J_E_helium-4 -1.6030606197e+21 4.9109161152e+27 + J_hydrogen-1_carbon-12 -39962772073 -2.8113415685e-06 + J_helium-3_carbon-12 0 0 + J_helium-4_carbon-12 -543156.94794 16180581376 + J_carbon-12_carbon-12 -35134377022 -1.4056707843e-06 + J_nitrogen-14_carbon-12 1.4056707843e-06 19981386036 + J_oxygen-16_carbon-12 -213352240.2 53074767.477 + J_neon-20_carbon-12 6.6617503464e-70 16176558290 + J_magnesium-24_carbon-12 0 112747484.61 + J_silicon-28_carbon-12 0 112747484.61 + J_sulfur-32_carbon-12 0 0 + J_argon-36_carbon-12 0 0 + J_calcium-40_carbon-12 0 0 + J_titanium-44_carbon-12 0 0 + J_chromium-48_carbon-12 0 0 + J_iron-52_carbon-12 0 0 + J_iron-54_carbon-12 0 0 + J_nickel-56_carbon-12 0 0 + J_neutron_carbon-12 0 0 + J_proton_carbon-12 0 0 + J_E_carbon-12 1.5888261025e+13 2.2585115235e+29 + J_hydrogen-1_nitrogen-14 -0.0072356687898 -8.2449082243e-08 + J_helium-3_nitrogen-14 0 0 + J_helium-4_nitrogen-14 -9931595737.1 0.0036154520694 + J_carbon-12_nitrogen-14 4.1195173483e-08 0.0036171427558 + J_nitrogen-14_nitrogen-14 -6621063824.7 -4.1224541121e-08 + J_oxygen-16_nitrogen-14 2.9367638379e-11 3.030348403e-06 + J_neon-20_nitrogen-14 2.1311329405e-29 6621063824.7 + J_magnesium-24_nitrogen-14 0 0 + J_silicon-28_nitrogen-14 0 0 + J_sulfur-32_nitrogen-14 0 0 + J_argon-36_nitrogen-14 0 0 + J_calcium-40_nitrogen-14 0 0 + J_titanium-44_nitrogen-14 0 0 + J_chromium-48_nitrogen-14 0 0 + J_iron-52_nitrogen-14 0 0 + J_iron-54_nitrogen-14 0 0 + J_nickel-56_nitrogen-14 0 0 + J_neutron_nitrogen-14 0 0 + J_proton_nitrogen-14 0 0 + J_E_nitrogen-14 5.9750004427e+11 8.652296644e+28 + J_hydrogen-1_oxygen-16 -0.021 -4.7101488189e-09 + J_helium-3_oxygen-16 0 0 + J_helium-4_oxygen-16 -195322494.35 114944489.09 + J_carbon-12_oxygen-16 -292026948.66 144782.33033 + J_nitrogen-14_oxygen-16 2.3550744095e-09 0.0105 + J_oxygen-16_oxygen-16 -324774925.64 -2.3550744095e-09 + J_neon-20_oxygen-16 5.7760583394e-34 215365497.14 + J_magnesium-24_oxygen-16 0 146096821.29 + J_silicon-28_oxygen-16 1.5794165192e-120 146436244.76 + J_sulfur-32_oxygen-16 8.1194979519e-121 277698.85665 + J_argon-36_oxygen-16 0 0 + J_calcium-40_oxygen-16 0 0 + J_titanium-44_oxygen-16 0 0 + J_chromium-48_oxygen-16 0 0 + J_iron-52_oxygen-16 0 0 + J_iron-54_oxygen-16 0 0 + J_nickel-56_oxygen-16 0 0 + J_neutron_oxygen-16 0 0 + J_proton_oxygen-16 0 0 + J_E_oxygen-16 -9.7626002308e+23 3.4631188925e+27 + J_hydrogen-1_neon-20 0 0 + J_helium-3_neon-20 0 0 + J_helium-4_neon-20 -10842213493 114679554.74 + J_carbon-12_neon-20 0 0 + J_nitrogen-14_neon-20 0 0 + J_oxygen-16_neon-20 0 141150418.69 + J_neon-20_neon-20 -11105182362 -1.627191889e-40 + J_magnesium-24_neon-20 1.627191889e-40 10973697928 + J_silicon-28_neon-20 0 0 + J_sulfur-32_neon-20 0 0 + J_argon-36_neon-20 0 0 + J_calcium-40_neon-20 0 0 + J_titanium-44_neon-20 0 0 + J_chromium-48_neon-20 0 0 + J_iron-52_neon-20 0 0 + J_iron-54_neon-20 0 0 + J_nickel-56_neon-20 0 0 + J_neutron_neon-20 0 0 + J_proton_neon-20 0 0 + J_E_neon-20 -5.2288622401e+26 9.8016437163e+28 + J_hydrogen-1_magnesium-24 0 0 + J_helium-3_magnesium-24 0 0 + J_helium-4_magnesium-24 -17061733008 -2.4050867849e-49 + J_carbon-12_magnesium-24 0 0 + J_nitrogen-14_magnesium-24 0 0 + J_oxygen-16_magnesium-24 0 0 + J_neon-20_magnesium-24 0 189351.49204 + J_magnesium-24_magnesium-24 -17062079576 -2.4050867849e-49 + J_silicon-28_magnesium-24 2.4050867849e-49 17061906292 + J_sulfur-32_magnesium-24 0 0 + J_argon-36_magnesium-24 0 0 + J_calcium-40_magnesium-24 0 0 + J_titanium-44_magnesium-24 0 0 + J_chromium-48_magnesium-24 0 0 + J_iron-52_magnesium-24 0 0 + J_iron-54_magnesium-24 0 0 + J_nickel-56_magnesium-24 0 0 + J_neutron_magnesium-24 0 0 + J_proton_magnesium-24 0 0 + J_E_magnesium-24 -65836.025628 1.6435693578e+29 + J_hydrogen-1_silicon-28 0 0 + J_helium-3_silicon-28 0 0 + J_helium-4_silicon-28 -2539600300.1 20658.714693 + J_carbon-12_silicon-28 0 0 + J_nitrogen-14_silicon-28 0 0 + J_oxygen-16_silicon-28 0 0 + J_neon-20_silicon-28 0 0 + J_magnesium-24_silicon-28 0 62826.383461 + J_silicon-28_silicon-28 -2539717927.9 -2.0909309921e-46 + J_sulfur-32_silicon-28 2.0909309921e-46 2539659114 + J_argon-36_silicon-28 0 0 + J_calcium-40_silicon-28 0 0 + J_titanium-44_silicon-28 0 0 + J_chromium-48_silicon-28 0 0 + J_iron-52_silicon-28 0 0 + J_iron-54_silicon-28 0 0 + J_nickel-56_silicon-28 0 0 + J_neutron_silicon-28 0 0 + J_proton_silicon-28 0 0 + J_E_silicon-28 -2.9044184049e+23 1.7026200525e+28 + J_hydrogen-1_sulfur-32 0 0 + J_helium-3_sulfur-32 0 0 + J_helium-4_sulfur-32 -4220786865.5 8879079.2827 + J_carbon-12_sulfur-32 0 0 + J_nitrogen-14_sulfur-32 0 0 + J_oxygen-16_sulfur-32 0 0 + J_neon-20_sulfur-32 0 0 + J_magnesium-24_sulfur-32 0 0 + J_silicon-28_sulfur-32 0 11234964.127 + J_sulfur-32_sulfur-32 -4241542657.2 -1.2677471336e-51 + J_argon-36_sulfur-32 1.2677471336e-51 4231164761.4 + J_calcium-40_sulfur-32 0 0 + J_titanium-44_sulfur-32 0 0 + J_chromium-48_sulfur-32 0 0 + J_iron-52_sulfur-32 0 0 + J_iron-54_sulfur-32 0 0 + J_nickel-56_sulfur-32 0 0 + J_neutron_sulfur-32 0 0 + J_proton_sulfur-32 0 0 + J_E_sulfur-32 -5.9543671037e+25 2.7044733201e+28 + J_hydrogen-1_argon-36 0 0 + J_helium-3_argon-36 0 0 + J_helium-4_argon-36 -2871392441.7 30624092.876 + J_carbon-12_argon-36 0 0 + J_nitrogen-14_argon-36 0 0 + J_oxygen-16_argon-36 0 0 + J_neon-20_argon-36 0 0 + J_magnesium-24_argon-36 0 0 + J_silicon-28_argon-36 0 0 + J_sulfur-32_argon-36 0 39333079.324 + J_argon-36_argon-36 -2943579408.5 -2.5898327239e-59 + J_calcium-40_argon-36 2.5898327239e-59 2907485925.1 + J_titanium-44_argon-36 0 0 + J_chromium-48_argon-36 0 0 + J_iron-52_argon-36 0 0 + J_iron-54_argon-36 0 0 + J_nickel-56_argon-36 0 0 + J_neutron_argon-36 0 0 + J_proton_argon-36 0 0 + J_E_argon-36 -1.9623297152e+26 1.951959903e+28 + J_hydrogen-1_calcium-40 0 0 + J_helium-3_calcium-40 0 0 + J_helium-4_calcium-40 -511042434.21 8468831.5659 + J_carbon-12_calcium-40 0 0 + J_nitrogen-14_calcium-40 0 0 + J_oxygen-16_calcium-40 0 0 + J_neon-20_calcium-40 0 0 + J_magnesium-24_calcium-40 0 0 + J_silicon-28_calcium-40 0 0 + J_sulfur-32_calcium-40 0 0 + J_argon-36_calcium-40 0 10952305.89 + J_calcium-40_calcium-40 -531099309.79 -2.7814503101e-62 + J_titanium-44_calcium-40 2.7814503101e-62 521070872 + J_chromium-48_calcium-40 0 0 + J_iron-52_calcium-40 0 0 + J_iron-54_calcium-40 0 0 + J_nickel-56_calcium-40 0 0 + J_neutron_calcium-40 0 0 + J_proton_calcium-40 0 0 + J_E_calcium-40 -5.7585187243e+25 2.5081885365e+27 + J_hydrogen-1_titanium-44 0 0 + J_helium-3_titanium-44 0 0 + J_helium-4_titanium-44 -2006561529.1 116221511.63 + J_carbon-12_titanium-44 0 0 + J_nitrogen-14_titanium-44 0 0 + J_oxygen-16_titanium-44 0 0 + J_neon-20_titanium-44 0 0 + J_magnesium-24_titanium-44 0 0 + J_silicon-28_titanium-44 0 0 + J_sulfur-32_titanium-44 0 0 + J_argon-36_titanium-44 0 0 + J_calcium-40_titanium-44 0 181478549.16 + J_titanium-44_titanium-44 -2315318935.6 -7.6223719572e-67 + J_chromium-48_titanium-44 7.6223719572e-67 2160940232.3 + J_iron-52_titanium-44 0 0 + J_iron-54_titanium-44 0 0 + J_nickel-56_titanium-44 0 0 + J_neutron_titanium-44 0 0 + J_proton_titanium-44 0 0 + J_E_titanium-44 -5.6918163887e+26 1.5282318204e+28 + J_hydrogen-1_chromium-48 0 0 + J_helium-3_chromium-48 0 0 + J_helium-4_chromium-48 -1726640404.6 1139754.1617 + J_carbon-12_chromium-48 0 0 + J_nitrogen-14_chromium-48 0 0 + J_oxygen-16_chromium-48 0 0 + J_neon-20_chromium-48 0 0 + J_magnesium-24_chromium-48 0 0 + J_silicon-28_chromium-48 0 0 + J_sulfur-32_chromium-48 0 0 + J_argon-36_chromium-48 0 0 + J_calcium-40_chromium-48 0 0 + J_titanium-44_chromium-48 0 2022830.318 + J_chromium-48_chromium-48 -1730007924.3 -6.1683669063e-70 + J_iron-52_chromium-48 6.1683669063e-70 1728324164.5 + J_iron-54_chromium-48 0 0 + J_nickel-56_chromium-48 0 0 + J_neutron_chromium-48 0 0 + J_proton_chromium-48 0 0 + J_E_chromium-48 -8.4591399197e+24 1.3233031089e+28 + J_hydrogen-1_iron-52 0 0 + J_helium-3_iron-52 0 0 + J_helium-4_iron-52 -750492512.68 493083.08482 + J_carbon-12_iron-52 0 0 + J_nitrogen-14_iron-52 0 0 + J_oxygen-16_iron-52 0 0 + J_neon-20_iron-52 0 0 + J_magnesium-24_iron-52 0 0 + J_silicon-28_iron-52 0 0 + J_sulfur-32_iron-52 0 0 + J_argon-36_iron-52 0 0 + J_calcium-40_iron-52 0 0 + J_titanium-44_iron-52 0 0 + J_chromium-48_iron-52 0 924843.3013 + J_iron-52_iron-52 -3.2495862514e+12 -4.3001564738e-78 + J_iron-54_iron-52 0 3.2495862514e+12 + J_nickel-56_iron-52 4.3001564738e-78 552709472.84 + J_neutron_iron-52 -6.4991725027e+12 0 + J_proton_iron-52 0 431335119.97 + J_E_iron-52 -2.3084042815e+11 7.5442123176e+31 + J_hydrogen-1_iron-54 0 0 + J_helium-3_iron-54 0 0 + J_helium-4_iron-54 0 14675163.343 + J_carbon-12_iron-54 0 0 + J_nitrogen-14_iron-54 0 0 + J_oxygen-16_iron-54 0 0 + J_neon-20_iron-54 0 0 + J_magnesium-24_iron-54 0 0 + J_silicon-28_iron-54 0 0 + J_sulfur-32_iron-54 0 0 + J_argon-36_iron-54 0 0 + J_calcium-40_iron-54 0 0 + J_titanium-44_iron-54 0 0 + J_chromium-48_iron-54 0 0 + J_iron-52_iron-54 0 14675163.348 + J_iron-54_iron-54 -14333994760 0 + J_nickel-56_iron-54 0 14319319597 + J_neutron_iron-54 0 604.52588062 + J_proton_iron-54 -28667989521 0 + J_E_iron-54 -6.4881996912e+21 1.6907715174e+29 + J_hydrogen-1_nickel-56 0 0 + J_helium-3_nickel-56 0 0 + J_helium-4_nickel-56 0 334649.39629 + J_carbon-12_nickel-56 0 0 + J_nitrogen-14_nickel-56 0 0 + J_oxygen-16_nickel-56 0 0 + J_neon-20_nickel-56 0 0 + J_magnesium-24_nickel-56 0 0 + J_silicon-28_nickel-56 0 0 + J_sulfur-32_nickel-56 0 0 + J_argon-36_nickel-56 0 0 + J_calcium-40_nickel-56 0 0 + J_titanium-44_nickel-56 0 0 + J_chromium-48_nickel-56 0 0 + J_iron-52_nickel-56 0 334649.39629 + J_iron-54_nickel-56 0 247477828.38 + J_nickel-56_nickel-56 -247479689.06 0 + J_neutron_nickel-56 0 0 + J_proton_nickel-56 0 494955656.77 + J_E_nickel-56 -2.9211034564e+27 1.0288702015e+17 + J_hydrogen-1_neutron 0 0 + J_helium-3_neutron 0 0 + J_helium-4_neutron 0 1.5520970787e+11 + J_carbon-12_neutron 0 0 + J_nitrogen-14_neutron 0 0 + J_oxygen-16_neutron 0 0 + J_neon-20_neutron 0 0 + J_magnesium-24_neutron 0 0 + J_silicon-28_neutron 0 0 + J_sulfur-32_neutron 0 0 + J_argon-36_neutron 0 0 + J_calcium-40_neutron 0 0 + J_titanium-44_neutron 0 0 + J_chromium-48_neutron 0 0 + J_iron-52_neutron -1.2498408659e+11 0 + J_iron-54_neutron 0 1.2498408659e+11 + J_nickel-56_neutron 0 0 + J_neutron_neutron -5.6038758893e+11 -2.9818540515e-259 + J_proton_neutron -3.1041941575e+11 0.019849381604 + J_E_neutron 0.0031960758414 7.1390811757e+30 + J_hydrogen-1_proton 0 0 + J_helium-3_proton 0 0 + J_helium-4_proton 0 1.5520970787e+11 + J_carbon-12_proton 0 0 + J_nitrogen-14_proton 0 0 + J_oxygen-16_proton 0 0 + J_neon-20_proton 0 0 + J_magnesium-24_proton 0 0 + J_silicon-28_proton 0 0 + J_sulfur-32_proton 0 0 + J_argon-36_proton 0 0 + J_calcium-40_proton 0 0 + J_titanium-44_proton 0 0 + J_chromium-48_proton 0 0 + J_iron-52_proton 0 543524.56827 + J_iron-54_proton -530888694.83 0 + J_nickel-56_proton 0 530345170.26 + J_neutron_proton -3.1041941575e+11 0.01005978836 + J_proton_proton -3.1047599221e+11 -2.3827182398e-87 + J_E_proton -7.593501065e+15 4.237794952e+30 + J_hydrogen-1_E 2.0563926691e-19 5.7718078776e-06 + J_helium-3_E -5.7716864292e-06 -2.0648367761e-19 + J_helium-4_E 1.026556653e-19 2.885937043e-06 + J_carbon-12_E -1.7761025826e-08 3.1733884044e-10 + J_nitrogen-14_E -3.3419345218e-10 9.9166452811e-09 + J_oxygen-16_E -4.8278139961e-11 2.1225767505e-12 + J_neon-20_E -7.3202938181e-14 8.8914523939e-09 + J_magnesium-24_E -3.3222436154e-11 1.7090590032e-11 + J_silicon-28_E -7.495337146e-48 6.2608476694e-11 + J_sulfur-32_E -4.6637773178e-12 1.1717119105e-13 + J_argon-36_E -1.1893314146e-13 5.8730727453e-12 + J_calcium-40_E 8.5459256525e-77 8.7687490767e-12 + J_titanium-44_E -1.403639735e-11 2.7728502274e-14 + J_chromium-48_E -2.243083211e-16 3.3407361859e-12 + J_iron-52_E 1.5974660508e-87 2.3037918659e-09 + J_iron-54_E -2.326130085e-09 9.817842728e-15 + J_nickel-56_E -1.41049225e-12 3.8177441789e-11 + J_neutron_E 0 1.1761800714e-07 + J_proton_E -5.6936091804e-14 1.1296574697e-07 + J_E_E 2.092537071 3.5786987301e+13 + diff --git a/unit_test/test_rhs/ci-benchmarks/aprox21.out b/unit_test/test_rhs/ci-benchmarks/aprox21.out new file mode 100644 index 0000000000..bc513f9e62 --- /dev/null +++ b/unit_test/test_rhs/ci-benchmarks/aprox21.out @@ -0,0 +1,533 @@ + plotfile = react_aprox21_test_rhs.VODE + time = 0 + variables minimum value maximum value + density 10000 100000000 + temperature 50000000 5000000000 + Ydot_hydrogen-1 -4219179576.2 1.0316760608e+12 + Ydot_helium-3 -1.0331595558e+12 -6.7832225696e-05 + Ydot_helium-4 3.3710523725e-05 5.1667697447e+11 + Ydot_carbon-12 -3487533699.9 -1.8356613712e-07 + Ydot_nitrogen-14 1.8357874205e-07 2974640611.6 + Ydot_oxygen-16 -36005.322458 632549.00147 + Ydot_neon-20 -190506.43179 467665144.55 + Ydot_magnesium-24 -1989215.309 698040.98844 + Ydot_silicon-28 -2.2145802894e-33 8033137.439 + Ydot_sulfur-32 -531520.6344 19073.225565 + Ydot_argon-36 -21310.778001 654595.28372 + Ydot_calcium-40 4.1649974968e-63 972830.3732 + Ydot_titanium-44 -612289.25501 3666.4289701 + Ydot_chromium-48 -477.52396979 179248.20303 + Ydot_chromium-56 0 5.0042611413e-09 + Ydot_iron-52 -1851616097.6 0.00031799399098 + Ydot_iron-54 -16440988162 0 + Ydot_iron-56 0 17977050575 + Ydot_nickel-56 -146290.43607 7891059.8132 + Ydot_neutron -41729973115 0.00049040309492 + Ydot_proton -4497320514.3 292606.50287 + Xold_hydrogen-1 0.1 0.7 + Xold_helium-3 0.0055555555556 0.033333333333 + Xold_helium-4 0.1 0.7 + Xold_carbon-12 0.1 0.7 + Xold_nitrogen-14 0.0055555555556 0.033333333333 + Xold_oxygen-16 0.0055555555556 0.033333333333 + Xold_neon-20 0.0055555555556 0.033333333333 + Xold_magnesium-24 0.0055555555556 0.033333333333 + Xold_silicon-28 0.0055555555556 0.033333333333 + Xold_sulfur-32 0.0055555555556 0.033333333333 + Xold_argon-36 0.0055555555556 0.033333333333 + Xold_calcium-40 0.0055555555556 0.033333333333 + Xold_titanium-44 0.0055555555556 0.033333333333 + Xold_chromium-48 0.0055555555556 0.033333333333 + Xold_chromium-56 0.0055555555556 0.033333333333 + Xold_iron-52 0.0055555555556 0.033333333333 + Xold_iron-54 0.0055555555556 0.033333333333 + Xold_iron-56 0.0055555555556 0.033333333333 + Xold_nickel-56 0.0055555555556 0.033333333333 + Xold_neutron 0.0055555555556 0.033333333333 + Xold_proton 0.0055555555556 0.033333333333 + Edot 5.8765130693e+14 6.8107090088e+30 + J_hydrogen-1_hydrogen-1 -59494588148 -3.6818237055e-06 + J_helium-3_hydrogen-1 4.1248545523e-15 0.10494648684 + J_helium-4_hydrogen-1 2.6882623706e-09 0.00030487244657 + J_carbon-12_hydrogen-1 -29747294074 -1.8356613712e-06 + J_nitrogen-14_hydrogen-1 1.8357874205e-06 29747294074 + J_oxygen-16_hydrogen-1 -0.0002187335324 -1.2604934407e-10 + J_neon-20_hydrogen-1 0 0 + J_magnesium-24_hydrogen-1 0 0 + J_silicon-28_hydrogen-1 0 0 + J_sulfur-32_hydrogen-1 0 0 + J_argon-36_hydrogen-1 0 0 + J_calcium-40_hydrogen-1 0 0 + J_titanium-44_hydrogen-1 0 0 + J_chromium-48_hydrogen-1 0 0 + J_chromium-56_hydrogen-1 0 0 + J_iron-52_hydrogen-1 0 0 + J_iron-54_hydrogen-1 0 0 + J_iron-56_hydrogen-1 0 0 + J_nickel-56_hydrogen-1 0 0 + J_neutron_hydrogen-1 0 0 + J_proton_hydrogen-1 0 0 + J_E_hydrogen-1 2.0815071597e+13 3.3623290626e+29 + J_hydrogen-1_helium-3 0.073036477167 1.8596872004e+14 + J_helium-3_helium-3 -1.8596872004e+14 -0.07318469489 + J_helium-4_helium-3 0.036703510738 9.298436002e+13 + J_carbon-12_helium-3 0 0 + J_nitrogen-14_helium-3 0 0 + J_oxygen-16_helium-3 0 0 + J_neon-20_helium-3 0 0 + J_magnesium-24_helium-3 0 0 + J_silicon-28_helium-3 0 0 + J_sulfur-32_helium-3 0 0 + J_argon-36_helium-3 0 0 + J_calcium-40_helium-3 0 0 + J_titanium-44_helium-3 0 0 + J_chromium-48_helium-3 0 0 + J_chromium-56_helium-3 0 0 + J_iron-52_helium-3 0 0 + J_iron-54_helium-3 0 0 + J_iron-56_helium-3 0 0 + J_nickel-56_helium-3 0 0 + J_neutron_helium-3 0 0 + J_proton_helium-3 0 0 + J_E_helium-3 1.8838546949e+17 1.1537199057e+33 + J_hydrogen-1_helium-4 -0.39822222222 -7.842207602e-07 + J_helium-3_helium-4 -0.39822222222 -7.842207602e-07 + J_helium-4_helium-4 -502897744.49 0.79644444444 + J_carbon-12_helium-4 -27977366.316 146014.40756 + J_nitrogen-14_helium-4 -95845076.964 -3.1070673892e-31 + J_oxygen-16_helium-4 -705164.28103 27539882.999 + J_neon-20_helium-4 -15594386.661 15582983.233 + J_magnesium-24_helium-4 -30472604.343 11469958.881 + J_silicon-28_helium-4 -8.8583211576e-32 125934632.43 + J_sulfur-32_helium-4 -8741685.7613 14784.927971 + J_argon-36_helium-4 9.1500572429e-54 10644417.287 + J_calcium-40_helium-4 1.6659989987e-61 13882321.551 + J_titanium-44_helium-4 -8320466.9383 61265.0721 + J_chromium-48_helium-4 4.0405077575e-69 2911547.4785 + J_chromium-56_helium-4 0 0 + J_iron-52_helium-4 3.0093677466e-72 4962363.0603 + J_iron-54_helium-4 -247471.79681 0.0018236776357 + J_iron-56_helium-4 0 482628.21672 + J_nickel-56_helium-4 1.9427222337e-80 3128320.9725 + J_neutron_helium-4 0 3.1570367276e-05 + J_proton_helium-4 0 1435569.2733 + J_E_helium-4 -1.4249427731e+21 4.3383246754e+27 + J_hydrogen-1_carbon-12 -6.9959804335e+11 -4.4117322214e-05 + J_helium-3_carbon-12 0 0 + J_helium-4_carbon-12 -536900.29748 16026654461 + J_carbon-12_carbon-12 -3.4979961811e+11 -2.2058661107e-05 + J_nitrogen-14_carbon-12 2.2058661107e-05 3.4979902168e+11 + J_oxygen-16_carbon-12 3.9085046604e-25 80480625.791 + J_neon-20_carbon-12 7.0087323622e-70 16037385368 + J_magnesium-24_carbon-12 0 5729731.7711 + J_silicon-28_carbon-12 0 5729731.7711 + J_sulfur-32_carbon-12 0 0 + J_argon-36_carbon-12 0 0 + J_calcium-40_carbon-12 0 0 + J_titanium-44_carbon-12 0 0 + J_chromium-48_carbon-12 0 0 + J_chromium-56_carbon-12 0 0 + J_iron-52_carbon-12 0 0 + J_iron-54_carbon-12 0 0 + J_iron-56_carbon-12 0 0 + J_nickel-56_carbon-12 0 0 + J_neutron_carbon-12 0 0 + J_proton_carbon-12 0 0 + J_E_carbon-12 2.4932848392e+14 3.953771269e+30 + J_hydrogen-1_nitrogen-14 -0.0072356687898 -1.2913553654e-06 + J_helium-3_nitrogen-14 0 0 + J_helium-4_nitrogen-14 -9886915460.6 0.0036154521359 + J_carbon-12_nitrogen-14 6.4521771326e-07 0.0036171427558 + J_nitrogen-14_nitrogen-14 -6591276973.8 -6.4567768269e-07 + J_oxygen-16_nitrogen-14 4.5996943032e-10 3.030348403e-06 + J_neon-20_nitrogen-14 1.9825500117e-29 6591276973.8 + J_magnesium-24_nitrogen-14 0 0 + J_silicon-28_nitrogen-14 0 0 + J_sulfur-32_nitrogen-14 0 0 + J_argon-36_nitrogen-14 0 0 + J_calcium-40_nitrogen-14 0 0 + J_titanium-44_nitrogen-14 0 0 + J_chromium-48_nitrogen-14 0 0 + J_chromium-56_nitrogen-14 0 0 + J_iron-52_nitrogen-14 0 0 + J_iron-54_nitrogen-14 0 0 + J_iron-56_nitrogen-14 0 0 + J_nickel-56_nitrogen-14 0 0 + J_neutron_nitrogen-14 0 0 + J_proton_nitrogen-14 0 0 + J_E_nitrogen-14 9.3583199109e+12 8.6133716801e+28 + J_hydrogen-1_oxygen-16 -0.021 -7.3655780882e-08 + J_helium-3_oxygen-16 0 0 + J_helium-4_oxygen-16 -194680123.51 113526631.94 + J_carbon-12_oxygen-16 -289566165.89 144779.56473 + J_nitrogen-14_oxygen-16 3.6827890441e-08 0.0105 + J_oxygen-16_oxygen-16 -321464729.54 -3.6827890441e-08 + J_neon-20_oxygen-16 5.4812856041e-34 214258554.46 + J_magnesium-24_oxygen-16 0 144866165.19 + J_silicon-28_oxygen-16 9.6005747551e-122 144884920.42 + J_sulfur-32_oxygen-16 4.8354126896e-122 14031.739069 + J_argon-36_oxygen-16 0 0 + J_calcium-40_oxygen-16 0 0 + J_titanium-44_oxygen-16 0 0 + J_chromium-48_oxygen-16 0 0 + J_chromium-56_oxygen-16 0 0 + J_iron-52_oxygen-16 0 0 + J_iron-54_oxygen-16 0 0 + J_iron-56_oxygen-16 0 0 + J_nickel-56_oxygen-16 0 0 + J_neutron_oxygen-16 0 0 + J_proton_oxygen-16 0 0 + J_E_oxygen-16 -9.7659032624e+23 3.4310278853e+27 + J_hydrogen-1_neon-20 0 0 + J_helium-3_neon-20 0 0 + J_helium-4_neon-20 -10772430939 114679471.85 + J_carbon-12_neon-20 0 0 + J_nitrogen-14_neon-20 0 0 + J_oxygen-16_neon-20 0 141140214.1 + J_neon-20_neon-20 -11034048192 -1.6707972112e-40 + J_magnesium-24_neon-20 1.6707972112e-40 10903239565 + J_silicon-28_neon-20 0 0 + J_sulfur-32_neon-20 0 0 + J_argon-36_neon-20 0 0 + J_calcium-40_neon-20 0 0 + J_titanium-44_neon-20 0 0 + J_chromium-48_neon-20 0 0 + J_chromium-56_neon-20 0 0 + J_iron-52_neon-20 0 0 + J_iron-54_neon-20 0 0 + J_iron-56_neon-20 0 0 + J_nickel-56_neon-20 0 0 + J_neutron_neon-20 0 0 + J_proton_neon-20 0 0 + J_E_neon-20 -5.2288584619e+26 9.7386338408e+28 + J_hydrogen-1_magnesium-24 0 0 + J_helium-3_magnesium-24 0 0 + J_helium-4_magnesium-24 -16980332208 -2.480142759e-49 + J_carbon-12_magnesium-24 0 0 + J_nitrogen-14_magnesium-24 0 0 + J_oxygen-16_magnesium-24 0 0 + J_neon-20_magnesium-24 0 189334.38053 + J_magnesium-24_magnesium-24 -16980676551 -2.480142759e-49 + J_silicon-28_magnesium-24 2.480142759e-49 16980504379 + J_sulfur-32_magnesium-24 0 0 + J_argon-36_magnesium-24 0 0 + J_calcium-40_magnesium-24 0 0 + J_titanium-44_magnesium-24 0 0 + J_chromium-48_magnesium-24 0 0 + J_chromium-56_magnesium-24 0 0 + J_iron-52_magnesium-24 0 0 + J_iron-54_magnesium-24 0 0 + J_iron-56_magnesium-24 0 0 + J_nickel-56_magnesium-24 0 0 + J_neutron_magnesium-24 0 0 + J_proton_magnesium-24 0 0 + J_E_magnesium-24 -71759.536816 1.6357279567e+29 + J_hydrogen-1_silicon-28 0 0 + J_helium-3_silicon-28 0 0 + J_helium-4_silicon-28 -2525055183.6 20658.704958 + J_carbon-12_silicon-28 0 0 + J_nitrogen-14_silicon-28 0 0 + J_oxygen-16_silicon-28 0 0 + J_neon-20_silicon-28 0 0 + J_magnesium-24_silicon-28 0 62822.149462 + J_silicon-28_silicon-28 -2525172250 -2.1648816441e-46 + J_sulfur-32_silicon-28 2.1648816441e-46 2525113716.8 + J_argon-36_silicon-28 0 0 + J_calcium-40_silicon-28 0 0 + J_titanium-44_silicon-28 0 0 + J_chromium-48_silicon-28 0 0 + J_chromium-56_silicon-28 0 0 + J_iron-52_silicon-28 0 0 + J_iron-54_silicon-28 0 0 + J_iron-56_silicon-28 0 0 + J_nickel-56_silicon-28 0 0 + J_neutron_silicon-28 0 0 + J_proton_silicon-28 0 0 + J_E_silicon-28 -2.9044167997e+23 1.6928685775e+28 + J_hydrogen-1_sulfur-32 0 0 + J_helium-3_sulfur-32 0 0 + J_helium-4_sulfur-32 -4194578244.6 8879072.2185 + J_carbon-12_sulfur-32 0 0 + J_nitrogen-14_sulfur-32 0 0 + J_oxygen-16_sulfur-32 0 0 + J_neon-20_sulfur-32 0 0 + J_magnesium-24_sulfur-32 0 0 + J_silicon-28_sulfur-32 0 11234052.42 + J_sulfur-32_sulfur-32 -4215215169.1 -1.317608267e-51 + J_argon-36_sulfur-32 1.317608267e-51 4204896706.9 + J_calcium-40_sulfur-32 0 0 + J_titanium-44_sulfur-32 0 0 + J_chromium-48_sulfur-32 0 0 + J_chromium-56_sulfur-32 0 0 + J_iron-52_sulfur-32 0 0 + J_iron-54_sulfur-32 0 0 + J_iron-56_sulfur-32 0 0 + J_nickel-56_sulfur-32 0 0 + J_neutron_sulfur-32 0 0 + J_proton_sulfur-32 0 0 + J_E_sulfur-32 -5.954362367e+25 2.6876799724e+28 + J_hydrogen-1_argon-36 0 0 + J_helium-3_argon-36 0 0 + J_helium-4_argon-36 -2853040810.1 30624066.343 + J_carbon-12_argon-36 0 0 + J_nitrogen-14_argon-36 0 0 + J_oxygen-16_argon-36 0 0 + J_neon-20_argon-36 0 0 + J_magnesium-24_argon-36 0 0 + J_silicon-28_argon-36 0 0 + J_sulfur-32_argon-36 0 39329625.171 + J_argon-36_argon-36 -2924779627.7 -2.7015388365e-59 + J_calcium-40_argon-36 2.7015388365e-59 2888910218.9 + J_titanium-44_argon-36 0 0 + J_chromium-48_argon-36 0 0 + J_chromium-56_argon-36 0 0 + J_iron-52_argon-36 0 0 + J_iron-54_argon-36 0 0 + J_iron-56_argon-36 0 0 + J_nickel-56_argon-36 0 0 + J_neutron_argon-36 0 0 + J_proton_argon-36 0 0 + J_E_argon-36 -1.9623280151e+26 1.9394847991e+28 + J_hydrogen-1_calcium-40 0 0 + J_helium-3_calcium-40 0 0 + J_helium-4_calcium-40 -506622433.99 8468817.4529 + J_carbon-12_calcium-40 0 0 + J_nitrogen-14_calcium-40 0 0 + J_oxygen-16_calcium-40 0 0 + J_neon-20_calcium-40 0 0 + J_magnesium-24_calcium-40 0 0 + J_silicon-28_calcium-40 0 0 + J_sulfur-32_calcium-40 0 0 + J_argon-36_calcium-40 0 10951323.307 + J_calcium-40_calcium-40 -526551169.53 -2.9116206719e-62 + J_titanium-44_calcium-40 2.9116206719e-62 516586801.76 + J_chromium-48_calcium-40 0 0 + J_chromium-56_calcium-40 0 0 + J_iron-52_calcium-40 0 0 + J_iron-54_calcium-40 0 0 + J_iron-56_calcium-40 0 0 + J_nickel-56_calcium-40 0 0 + J_neutron_calcium-40 0 0 + J_proton_calcium-40 0 0 + J_E_calcium-40 -5.7585056884e+25 2.4864533365e+27 + J_hydrogen-1_titanium-44 0 0 + J_helium-3_titanium-44 0 0 + J_helium-4_titanium-44 -1987762514.2 116219312.23 + J_carbon-12_titanium-44 0 0 + J_nitrogen-14_titanium-44 0 0 + J_oxygen-16_titanium-44 0 0 + J_neon-20_titanium-44 0 0 + J_magnesium-24_titanium-44 0 0 + J_silicon-28_titanium-44 0 0 + J_sulfur-32_titanium-44 0 0 + J_argon-36_titanium-44 0 0 + J_calcium-40_titanium-44 0 181482415.76 + J_titanium-44_titanium-44 -2293862912 -8.0061639081e-67 + J_chromium-48_titanium-44 8.0061639081e-67 2140812713.1 + J_chromium-56_titanium-44 0 0 + J_iron-52_titanium-44 0 0 + J_iron-54_titanium-44 0 0 + J_iron-56_titanium-44 0 0 + J_nickel-56_titanium-44 0 0 + J_neutron_titanium-44 0 0 + J_proton_titanium-44 0 0 + J_E_titanium-44 -5.6917371175e+26 1.5139434019e+28 + J_hydrogen-1_chromium-48 0 0 + J_helium-3_chromium-48 0 0 + J_helium-4_chromium-48 -1710038391 1139751.9261 + J_carbon-12_chromium-48 0 0 + J_nitrogen-14_chromium-48 0 0 + J_oxygen-16_chromium-48 0 0 + J_neon-20_chromium-48 0 0 + J_magnesium-24_chromium-48 0 0 + J_silicon-28_chromium-48 0 0 + J_sulfur-32_chromium-48 0 0 + J_argon-36_chromium-48 0 0 + J_calcium-40_chromium-48 0 0 + J_titanium-44_chromium-48 0 2022622.1181 + J_chromium-48_chromium-48 -1713374544.8 -6.5002343746e-70 + J_chromium-56_chromium-48 0 0 + J_iron-52_chromium-48 6.5002343746e-70 1711706467.9 + J_iron-54_chromium-48 0 0 + J_iron-56_chromium-48 0 0 + J_nickel-56_chromium-48 0 0 + J_neutron_chromium-48 0 0 + J_proton_chromium-48 0 0 + J_E_chromium-48 -8.4591233389e+24 1.310579281e+28 + J_hydrogen-1_chromium-56 0 0 + J_helium-3_chromium-56 0 0 + J_helium-4_chromium-56 0 0 + J_carbon-12_chromium-56 0 0 + J_nitrogen-14_chromium-56 0 0 + J_oxygen-16_chromium-56 0 0 + J_neon-20_chromium-56 0 0 + J_magnesium-24_chromium-56 0 0 + J_silicon-28_chromium-56 0 0 + J_sulfur-32_chromium-56 0 0 + J_argon-36_chromium-56 0 0 + J_calcium-40_chromium-56 0 0 + J_titanium-44_chromium-56 0 0 + J_chromium-48_chromium-56 0 0 + J_chromium-56_chromium-56 0 0 + J_iron-52_chromium-56 0 0 + J_iron-54_chromium-56 0 0 + J_iron-56_chromium-56 0 0 + J_nickel-56_chromium-56 0 0 + J_neutron_chromium-56 0 0 + J_proton_chromium-56 0 0 + J_E_chromium-56 -1.8093693678e+15 2.256453157e+17 + J_hydrogen-1_iron-52 0 0 + J_helium-3_iron-52 0 0 + J_helium-4_iron-52 -743179296.84 493082.01674 + J_carbon-12_iron-52 0 0 + J_nitrogen-14_iron-52 0 0 + J_oxygen-16_iron-52 0 0 + J_neon-20_iron-52 0 0 + J_magnesium-24_iron-52 0 0 + J_silicon-28_iron-52 0 0 + J_sulfur-32_iron-52 0 0 + J_argon-36_iron-52 0 0 + J_calcium-40_iron-52 0 0 + J_titanium-44_iron-52 0 0 + J_chromium-48_iron-52 0 924600.73939 + J_chromium-56_iron-52 0 0 + J_iron-52_iron-52 -2.8885211124e+12 -4.5459700269e-78 + J_iron-54_iron-52 0 2.8885211123e+12 + J_iron-56_iron-52 0 0 + J_nickel-56_iron-52 4.5459700269e-78 539742599.12 + J_neutron_iron-52 -5.7770422246e+12 0 + J_proton_iron-52 0 463978849.94 + J_E_iron-52 -2.4561809471e+11 6.7059665045e+31 + J_hydrogen-1_iron-54 0 0 + J_helium-3_iron-54 0 0 + J_helium-4_iron-54 -416714108.26 89938.022334 + J_carbon-12_iron-54 0 0 + J_nitrogen-14_iron-54 0 0 + J_oxygen-16_iron-54 0 0 + J_neon-20_iron-54 0 0 + J_magnesium-24_iron-54 0 0 + J_silicon-28_iron-54 0 0 + J_sulfur-32_iron-54 0 0 + J_argon-36_iron-54 0 0 + J_calcium-40_iron-54 0 0 + J_titanium-44_iron-54 0 0 + J_chromium-48_iron-54 0 0 + J_chromium-56_iron-54 0 0 + J_iron-52_iron-54 0 12937759.031 + J_iron-54_iron-54 -2.922305487e+13 0 + J_iron-56_iron-54 0 2.9210433228e+13 + J_nickel-56_iron-54 0 12628008866 + J_neutron_iron-54 -5.8420788754e+13 0 + J_proton_iron-54 -25242800365 49264281.385 + J_E_iron-54 -2.5384087204e+11 5.7722247891e+32 + J_hydrogen-1_iron-56 0 0 + J_helium-3_iron-56 0 0 + J_helium-4_iron-56 0 1.0853220404e+11 + J_carbon-12_iron-56 0 0 + J_nitrogen-14_iron-56 0 0 + J_oxygen-16_iron-56 0 0 + J_neon-20_iron-56 0 0 + J_magnesium-24_iron-56 0 0 + J_silicon-28_iron-56 0 0 + J_sulfur-32_iron-56 0 0 + J_argon-36_iron-56 0 0 + J_calcium-40_iron-56 0 0 + J_titanium-44_iron-56 0 0 + J_chromium-48_iron-56 0 0 + J_chromium-56_iron-56 0 1.4604850504e-05 + J_iron-52_iron-56 0 0 + J_iron-54_iron-56 0 1.085322043e+11 + J_iron-56_iron-56 -1.085322043e+11 0 + J_nickel-56_iron-56 0 0 + J_neutron_iron-56 0 23694197.517 + J_proton_iron-56 -2.1706440807e+11 0 + J_E_iron-56 -2.3404754837e+26 8.1895811426e+29 + J_hydrogen-1_nickel-56 0 0 + J_helium-3_nickel-56 0 0 + J_helium-4_nickel-56 0 331907.48224 + J_carbon-12_nickel-56 0 0 + J_nitrogen-14_nickel-56 0 0 + J_oxygen-16_nickel-56 0 0 + J_neon-20_nickel-56 0 0 + J_magnesium-24_nickel-56 0 0 + J_silicon-28_nickel-56 0 0 + J_sulfur-32_nickel-56 0 0 + J_argon-36_nickel-56 0 0 + J_calcium-40_nickel-56 0 0 + J_titanium-44_nickel-56 0 0 + J_chromium-48_nickel-56 0 0 + J_chromium-56_nickel-56 0 0 + J_iron-52_nickel-56 0 331907.48224 + J_iron-54_nickel-56 0 247302068 + J_iron-56_nickel-56 0 0.14604850504 + J_nickel-56_nickel-56 -247303719.77 0 + J_neutron_nickel-56 0 0 + J_proton_nickel-56 0 494604136 + J_E_nickel-56 -2.9190272674e+27 3.8630535107e+17 + J_hydrogen-1_neutron 0 0 + J_helium-3_neutron 0 0 + J_helium-4_neutron 0 1.3482425469e+11 + J_carbon-12_neutron 0 0 + J_nitrogen-14_neutron 0 0 + J_oxygen-16_neutron 0 0 + J_neon-20_neutron 0 0 + J_magnesium-24_neutron 0 0 + J_silicon-28_neutron 0 0 + J_sulfur-32_neutron 0 0 + J_argon-36_neutron 0 0 + J_calcium-40_neutron 0 0 + J_titanium-44_neutron 0 0 + J_chromium-48_neutron 0 0 + J_chromium-56_neutron 0 0 + J_iron-52_neutron -1.1109696586e+11 0 + J_iron-54_neutron -9.8984600482e+11 0 + J_iron-56_neutron 0 1.0818664584e+12 + J_nickel-56_neutron 0 0 + J_neutron_neutron -2.5037983869e+12 -2.7518382457e-292 + J_proton_neutron -2.6964850938e+11 0.01990199797 + J_E_neutron 0.001081498578 2.6133983736e+31 + J_hydrogen-1_proton 0 0 + J_helium-3_proton 0 0 + J_helium-4_proton 0 1.3489464877e+11 + J_carbon-12_proton 0 0 + J_nitrogen-14_proton 0 0 + J_oxygen-16_proton 0 0 + J_neon-20_proton 0 0 + J_magnesium-24_proton 0 0 + J_silicon-28_proton 0 0 + J_sulfur-32_proton 0 0 + J_argon-36_proton 0 0 + J_calcium-40_proton 0 0 + J_titanium-44_proton 0 0 + J_chromium-48_proton 0 0 + J_chromium-56_proton 0 0 + J_iron-52_proton 0 479176.26021 + J_iron-54_proton -772.41963194 3407966935.8 + J_iron-56_proton -3876150144.1 0 + J_nickel-56_proton 0 467704032.09 + J_neutron_proton -2.6964850938e+11 0.034588911424 + J_proton_proton -2.6983923086e+11 -2.7428164302e-87 + J_E_proton -2.6108991385e+16 3.6817330507e+30 + J_hydrogen-1_E -1.0006504976e-07 4.2872891104e-06 + J_helium-3_E -4.2866803458e-06 -7.5769167747e-20 + J_helium-4_E 3.7850094111e-20 2.1441607162e-06 + J_carbon-12_E -5.3556320773e-08 1.4041391721e-09 + J_nitrogen-14_E -1.9393729314e-09 5.3556258717e-08 + J_oxygen-16_E -3.4898941611e-13 6.2789315765e-12 + J_neon-20_E -5.4766490446e-14 7.8881018505e-09 + J_magnesium-24_E -2.8806377836e-11 6.0822823452e-12 + J_silicon-28_E -1.1890029175e-47 4.9870670049e-11 + J_sulfur-32_E -3.8208112387e-12 1.0309012065e-13 + J_argon-36_E -1.0500184777e-13 4.8091121388e-12 + J_calcium-40_E 3.9290415609e-77 7.2692172339e-12 + J_titanium-44_E -1.1654007519e-11 2.2093254979e-14 + J_chromium-48_E -1.9929177309e-16 2.7730616134e-12 + J_chromium-56_E 0 0 + J_iron-52_E -2.5386320075e-21 1.6281833883e-09 + J_iron-54_E -1.6592791826e-08 1.8373331376e-09 + J_iron-56_E -2.4764036009e-09 1.4948856055e-08 + J_nickel-56_E -1.3650886568e-12 2.7798205721e-11 + J_neutron_E -4.0660804174e-09 5.9256825143e-08 + J_proton_E -3.9082377477e-10 8.5866665712e-08 + J_E_E 0.65500458025 2.6535626445e+13 + diff --git a/unit_test/test_rhs/ci-benchmarks/iso7.out b/unit_test/test_rhs/ci-benchmarks/iso7.out new file mode 100644 index 0000000000..f77f18f11e --- /dev/null +++ b/unit_test/test_rhs/ci-benchmarks/iso7.out @@ -0,0 +1,85 @@ + plotfile = react_iso7_test_rhs.VODE + time = 0 + variables minimum value maximum value + density 1000000 1000000000 + temperature 10000000 10000000000 + Ydot_helium-4 -1.449054786e+35 1.2075557854e+11 + Ydot_carbon-12 -2.1724935626e+11 1652417096.1 + Ydot_oxygen-16 -2320781791 7443447072.8 + Ydot_neon-20 -8670526694.1 95743655997 + Ydot_magnesium-24 -466938778.57 4609542630.2 + Ydot_silicon-28 -2.0700782658e+34 5132352183.5 + Ydot_nickel-56 -4262672.8111 2.0700782658e+34 + Xold_helium-4 0.1 0.8 + Xold_carbon-12 0.02 0.14 + Xold_oxygen-16 0.02 0.14 + Xold_neon-20 0.02 0.14 + Xold_magnesium-24 0.02 0.14 + Xold_silicon-28 0.1 0.8 + Xold_nickel-56 0.02 0.14 + Edot -6.044165493e+28 9.86535083e+53 + J_helium-4_helium-4 -7.2452739302e+35 -4.6962830873e-44 + J_carbon-12_helium-4 -7261572451.1 44107428.922 + J_oxygen-16_helium-4 -98386819.587 5254883556.1 + J_neon-20_helium-4 -20174626970 192413.80802 + J_magnesium-24_helium-4 -4.6598486093e-09 14984957882 + J_silicon-28_helium-4 -1.0350391329e+35 7196378096.4 + J_nickel-56_helium-4 0 1.0350391329e+35 + J_E_helium-4 -87.837947379 4.932675415e+54 + J_helium-4_carbon-12 -46065373.422 1.8369106708e+13 + J_carbon-12_carbon-12 -3.6773326651e+13 -7.0444246309e-43 + J_oxygen-16_carbon-12 -7.4641202755e+11 25858392627 + J_neon-20_carbon-12 1.718366539e-122 1.7996739913e+13 + J_magnesium-24_carbon-12 0 3.8098629152e+11 + J_silicon-28_carbon-12 0 3.8098629152e+11 + J_nickel-56_carbon-12 0 0 + J_E_carbon-12 -8.5802504661e+27 8.8927115389e+31 + J_helium-4_oxygen-16 -7086646175.8 8.2473988743e+11 + J_carbon-12_oxygen-16 -8.0901233708e+11 2.0687351068e+11 + J_oxygen-16_oxygen-16 -1.4597290308e+12 -4.5677120939e-57 + J_neon-20_oxygen-16 4.5677120939e-57 42021199725 + J_magnesium-24_oxygen-16 0 5.0798172203e+11 + J_silicon-28_oxygen-16 1.3883833787e-206 6.2352223476e+11 + J_nickel-56_oxygen-16 0 0 + J_E_oxygen-16 -1.4290976876e+30 1.1195222346e+31 + J_helium-4_neon-20 -3.5148528673e+11 1.3227020395e+12 + J_carbon-12_neon-20 0 0 + J_oxygen-16_neon-20 0 1.3227611326e+12 + J_neon-20_neon-20 -1.890792458e+12 -4.5485780315e-68 + J_magnesium-24_neon-20 4.5485780315e-68 5.6803132544e+11 + J_silicon-28_neon-20 0 0 + J_nickel-56_neon-20 0 0 + J_E_neon-20 -6.0374029364e+30 3.492372841e+30 + J_helium-4_magnesium-24 -1.572868485e+11 90212607511 + J_carbon-12_magnesium-24 0 0 + J_oxygen-16_magnesium-24 0 0 + J_neon-20_magnesium-24 0 90234303812 + J_magnesium-24_magnesium-24 -3.0659099535e+11 -1.620760274e-210 + J_silicon-28_magnesium-24 1.620760274e-210 2.1635669154e+11 + J_nickel-56_magnesium-24 0 0 + J_E_magnesium-24 -8.1069374231e+29 1.5273018291e+30 + J_helium-4_silicon-28 -4.0573534009e+37 15808924738 + J_carbon-12_silicon-28 0 0 + J_oxygen-16_silicon-28 0 0 + J_neon-20_silicon-28 0 0 + J_magnesium-24_silicon-28 0 15808924738 + J_silicon-28_silicon-28 -5.7962191442e+36 0 + J_nickel-56_silicon-28 0 5.7962191442e+36 + J_E_silicon-28 -1.5228843728e+29 2.7622982324e+56 + J_helium-4_nickel-56 0 70000000000 + J_carbon-12_nickel-56 0 0 + J_oxygen-16_nickel-56 0 0 + J_neon-20_nickel-56 0 0 + J_magnesium-24_nickel-56 0 0 + J_silicon-28_nickel-56 0 10000000000 + J_nickel-56_nickel-56 -10000000000 0 + J_E_nickel-56 -4.7656897776e+29 3.4603369325e+17 + J_helium-4_E -5.2043289985e-09 1.0072596721e+20 + J_carbon-12_E -8.1026490435e-07 6.1135331864e-10 + J_oxygen-16_E -1.0316135993e-08 2.5415462665e-08 + J_neon-20_E -1.379618092e-08 3.5556715497e-07 + J_magnesium-24_E -6.1614211527e-10 2.247549785e-08 + J_silicon-28_E -5.4772628635e-09 1.4389423887e+19 + J_nickel-56_E -1.4389423887e+19 0 + J_E_E -6.8575530322e+38 1.9477832709e+12 + diff --git a/unit_test/test_rhs/ci-benchmarks/powerlaw.out b/unit_test/test_rhs/ci-benchmarks/powerlaw.out new file mode 100644 index 0000000000..e825f78b6d --- /dev/null +++ b/unit_test/test_rhs/ci-benchmarks/powerlaw.out @@ -0,0 +1,29 @@ + plotfile = react_powerlaw_test_rhs.VODE + time = 0 + variables minimum value maximum value + density 0.1 2 + temperature 50000 700000 + Ydot_fuel -1.94481e+23 -1.25e+16 + Ydot_ash 6.25e+15 9.72405e+22 + Ydot_inert 0 0 + Xold_fuel 0.2 0.9 + Xold_ash 0.05 0.4 + Xold_inert 0.05 0.4 + Edot 2.5e+17 3.88962e+24 + J_fuel_fuel 0 0 + J_ash_fuel 0 0 + J_inert_fuel 0 0 + J_E_fuel 0 0 + J_fuel_ash 0 0 + J_ash_ash 0 0 + J_inert_ash 0 0 + J_E_ash 0 0 + J_fuel_inert 0 0 + J_ash_inert 0 0 + J_inert_inert 0 0 + J_E_inert 0 0 + J_fuel_E 0 0 + J_ash_E 0 0 + J_inert_E 0 0 + J_E_E 0 0 + diff --git a/unit_test/test_rhs/ci-benchmarks/rprox.out b/unit_test/test_rhs/ci-benchmarks/rprox.out new file mode 100644 index 0000000000..43bb74b5e0 --- /dev/null +++ b/unit_test/test_rhs/ci-benchmarks/rprox.out @@ -0,0 +1,148 @@ + plotfile = react_rprox_test_rhs.VODE + time = 0 + variables minimum value maximum value + density 10000 100000000 + temperature 50000000 5000000000 + Ydot_carbon-12 -2689976777.2 -2.2647400918e-07 + Ydot_oxygen-14 -3246931195.7 2634119282 + Ydot_oxygen-15 -609201.88638 419.94711256 + Ydot_oxygen-16 -2421136.2355 51434568737 + Ydot_flourine-17 -51434453798 196024.9692 + Ydot_magnesium-22 -1475440763.7 25312115.628 + Ydot_sulfur-30 0.00065007215007 1430454150.9 + Ydot_nickel-56 3.1746031746e-05 60518774.874 + Ydot_helium-4 -6975669692.8 245.05717819 + Ydot_hydrogen-1 -5100045421.6 53447641280 + Xold_carbon-12 0.1 0.7 + Xold_oxygen-14 0.014285714286 0.085714285714 + Xold_oxygen-15 0.014285714286 0.085714285714 + Xold_oxygen-16 0.014285714286 0.085714285714 + Xold_flourine-17 0.014285714286 0.085714285714 + Xold_magnesium-22 0.014285714286 0.085714285714 + Xold_sulfur-30 0.014285714286 0.085714285714 + Xold_nickel-56 0.014285714286 0.085714285714 + Xold_helium-4 0.1 0.7 + Xold_hydrogen-1 0.1 0.7 + Edot -2.9794525831e+28 1.8892805658e+28 + J_carbon-12_carbon-12 -3.1862098756e+11 -2.7218972368e-05 + J_oxygen-14_carbon-12 2.7218972368e-05 3.1862098756e+11 + J_oxygen-15_carbon-12 0 0 + J_oxygen-16_carbon-12 0 0 + J_flourine-17_carbon-12 0 0 + J_magnesium-22_carbon-12 0 0 + J_sulfur-30_carbon-12 0 0 + J_nickel-56_carbon-12 0 0 + J_helium-4_carbon-12 0 0 + J_hydrogen-1_carbon-12 -6.3724197512e+11 -5.4437944736e-05 + J_E_carbon-12 1.7253581313e+14 2.0196769528e+30 + J_carbon-12_oxygen-14 0 0 + J_oxygen-14_oxygen-14 -1.515255513e+12 -0.0098122860493 + J_oxygen-15_oxygen-14 0.0098122860493 0.0098122860493 + J_oxygen-16_oxygen-14 0 0 + J_flourine-17_oxygen-14 6.8941493002e-28 1.515255513e+12 + J_magnesium-22_oxygen-14 0 0 + J_sulfur-30_oxygen-14 0 0 + J_nickel-56_oxygen-14 0 0 + J_helium-4_oxygen-14 -1.515255513e+12 -6.8941493002e-28 + J_hydrogen-1_oxygen-14 -0.0098122860493 1.515255513e+12 + J_E_oxygen-14 1.2520091653e+17 1.7435951417e+30 + J_carbon-12_oxygen-15 3.6829858138e-07 0.0056703751467 + J_oxygen-14_oxygen-15 0 0 + J_oxygen-15_oxygen-15 -267937919.85 -3.6829858138e-07 + J_oxygen-16_oxygen-15 2.4566136254e-32 0.0062135007783 + J_flourine-17_oxygen-15 0 0 + J_magnesium-22_oxygen-15 2.3951912684e-42 267937919.84 + J_sulfur-30_oxygen-15 0 0 + J_nickel-56_oxygen-15 0 0 + J_helium-4_oxygen-15 -267937919.83 0.0056703751467 + J_hydrogen-1_oxygen-15 -803813759.53 -3.6829858138e-07 + J_E_oxygen-15 3.0211782378e+12 7.3223202274e+27 + J_carbon-12_oxygen-16 0 0 + J_oxygen-14_oxygen-16 0 0 + J_oxygen-15_oxygen-16 0 0 + J_oxygen-16_oxygen-16 -91770003272 -3.7153786054e-08 + J_flourine-17_oxygen-16 3.7153786054e-08 91746552396 + J_magnesium-22_oxygen-16 1.4549834167e-33 162827922.7 + J_sulfur-30_oxygen-16 0 0 + J_nickel-56_oxygen-16 0 0 + J_helium-4_oxygen-16 -162827922.7 -1.4549834167e-33 + J_hydrogen-1_oxygen-16 -91793454148 -3.7153786054e-08 + J_E_oxygen-16 21523113227 5.3435048489e+28 + J_carbon-12_flourine-17 0 0 + J_oxygen-14_flourine-17 0 0 + J_oxygen-15_flourine-17 0.010748168075 216161.6113 + J_oxygen-16_flourine-17 2.0768791021e-64 1.0201190769e+13 + J_flourine-17_flourine-17 -1.0226691359e+13 -0.010748168075 + J_magnesium-22_flourine-17 0 25500589865 + J_sulfur-30_flourine-17 0 0 + J_nickel-56_flourine-17 0 0 + J_helium-4_flourine-17 -25500589865 139802.05938 + J_hydrogen-1_flourine-17 -3179709985.5 1.0201190432e+13 + J_E_flourine-17 -5.909525285e+30 8.5318636188e+28 + J_carbon-12_magnesium-22 0 0 + J_oxygen-14_magnesium-22 0 0 + J_oxygen-15_magnesium-22 0 0 + J_oxygen-16_magnesium-22 0 0 + J_flourine-17_magnesium-22 0 0 + J_magnesium-22_magnesium-22 -1.05 9.5386428892e+11 + J_sulfur-30_magnesium-22 -9.5386428892e+11 1.05 + J_nickel-56_magnesium-22 0 0 + J_helium-4_magnesium-22 -0 -0 + J_hydrogen-1_magnesium-22 -8.4 7.6309143114e+12 + J_E_magnesium-22 -6.9126493307e+31 7.6093443077e+19 + J_carbon-12_sulfur-30 0 0 + J_oxygen-14_sulfur-30 0 0 + J_oxygen-15_sulfur-30 0 0 + J_oxygen-16_sulfur-30 0 0 + J_flourine-17_sulfur-30 0 0 + J_magnesium-22_sulfur-30 0 0 + J_sulfur-30_sulfur-30 -0.066666666667 50658972120 + J_nickel-56_sulfur-30 -50658972120 0.066666666667 + J_helium-4_sulfur-30 -0 -0 + J_hydrogen-1_sulfur-30 -1.7333333333 1.3171332751e+12 + J_E_sulfur-30 -1.1745909663e+31 1.5457491761e+19 + J_carbon-12_nickel-56 0 0 + J_oxygen-14_nickel-56 0 0 + J_oxygen-15_nickel-56 0 0 + J_oxygen-16_nickel-56 0 0 + J_flourine-17_nickel-56 0 0 + J_magnesium-22_nickel-56 0 0 + J_sulfur-30_nickel-56 0 0 + J_nickel-56_nickel-56 0 0 + J_helium-4_nickel-56 0 0 + J_hydrogen-1_nickel-56 -0 -0 + J_E_nickel-56 0 0 + J_carbon-12_helium-4 7.314141482e-32 142926.91777 + J_oxygen-14_helium-4 -56717144756 -2.7938921413e-29 + J_oxygen-15_helium-4 -9737803.5071 -9.2918568894e-34 + J_oxygen-16_helium-4 -5332924.3385 3.0455688646e-07 + J_flourine-17_helium-4 2.7938921413e-29 56717144756 + J_magnesium-22_helium-4 -23891379754 2471145.424 + J_sulfur-30_helium-4 0 22917545851 + J_nickel-56_helium-4 0 984025417.26 + J_helium-4_helium-4 -56727337313 -2.8993248893e-29 + J_hydrogen-1_helium-4 -1.6010532786e+11 3284595971.1 + J_E_helium-4 3.3676822941e-11 2.0257660358e+30 + J_carbon-12_hydrogen-1 -26899767827 -2.2647400918e-06 + J_oxygen-14_hydrogen-1 2.2682476973e-06 26899767827 + J_oxygen-15_hydrogen-1 -0.00024222000826 1695.5964262 + J_oxygen-16_hydrogen-1 -723321717.93 -3.3173023263e-10 + J_flourine-17_hydrogen-1 -14133036.661 533399243.58 + J_magnesium-22_hydrogen-1 2.1616356901e-44 189922474.35 + J_sulfur-30_hydrogen-1 0 0 + J_nickel-56_hydrogen-1 0 0 + J_helium-4_hydrogen-1 -189922474.35 927.47530764 + J_hydrogen-1_hydrogen-1 -53877537415 -4.5403436538e-06 + J_E_hydrogen-1 1.440700152e+13 1.7081017075e+29 + J_carbon-12_E -63.63763642 0.9574584339 + J_oxygen-14_E -16.885124406 63.634574488 + J_oxygen-15_E -0.0078799579401 0.0012865310157 + J_oxygen-16_E -0.09149619414 375.43326461 + J_flourine-17_E -368.62408276 0.0050664564906 + J_magnesium-22_E -16.81079726 0.25807276418 + J_sulfur-30_E 0 15.814632043 + J_nickel-56_E 0 1.0194733271 + J_helium-4_E -16.774596076 1.6099986774e-10 + J_hydrogen-1_E -127.29567481 315.95611859 + J_E_E -3.817199984e+19 1.3169333038e+21 + diff --git a/unit_test/test_rhs/ci-benchmarks/triple_alpha_plus_cago.out b/unit_test/test_rhs/ci-benchmarks/triple_alpha_plus_cago.out new file mode 100644 index 0000000000..3830310865 --- /dev/null +++ b/unit_test/test_rhs/ci-benchmarks/triple_alpha_plus_cago.out @@ -0,0 +1,40 @@ + plotfile = react_triple_alpha_plus_cago_test_rhs.VODE + time = 0 + variables minimum value maximum value + density 10000 100000000 + temperature 50000000 5000000000 + Ydot_helium-4 -711999.15989 -8.6944350433e-26 + Ydot_carbon-12 -711987.1533 9507.8187509 + Ydot_oxygen-16 8.694434872e-26 711990.15495 + Ydot_iron-56 0 0 + Xold_helium-4 0.1 0.7 + Xold_carbon-12 0.1 0.7 + Xold_oxygen-16 0.1 0.7 + Xold_iron-56 0.1 0.6 + Edot 6.0080639566e-07 4.9200445345e+24 + J_helium-4_helium-4 -28480686.791 -3.0746353512e-24 + J_carbon-12_helium-4 -28479246 163043.85402 + J_oxygen-16_helium-4 3.0746274159e-24 28479606.198 + J_iron-56_helium-4 0 0 + J_E_helium-4 2.1246434586e-05 1.968034669e+26 + J_helium-4_carbon-12 -83750353.203 -1.0043548971e-23 + J_carbon-12_carbon-12 -83750353.203 -1.0043548971e-23 + J_oxygen-16_carbon-12 1.0043548971e-23 83750353.203 + J_iron-56_carbon-12 0 0 + J_E_carbon-12 6.9403342548e-05 5.7873511331e+26 + J_helium-4_oxygen-16 0 0 + J_carbon-12_oxygen-16 0 0 + J_oxygen-16_oxygen-16 0 0 + J_iron-56_oxygen-16 0 0 + J_E_oxygen-16 0 0 + J_helium-4_iron-56 0 0 + J_carbon-12_iron-56 0 0 + J_oxygen-16_iron-56 0 0 + J_iron-56_iron-56 0 0 + J_E_iron-56 0 0 + J_helium-4_E -9.2068265904e-12 2.9771882829e-13 + J_carbon-12_E -9.2068599038e-12 7.2504009603e-13 + J_oxygen-16_E -2.4841469758e-19 9.2068515755e-12 + J_iron-56_E 0 0 + J_E_E -691898.93303 63621503.552 + From 04ff2a3e3578134387c2cf2bb740b6823e967f76 Mon Sep 17 00:00:00 2001 From: Zhi Chen <62574124+zhichen3@users.noreply.github.com> Date: Mon, 10 Jul 2023 13:31:54 -0400 Subject: [PATCH 08/10] update adsurl for refs.bib (#1270) --- sphinx_docs/source/refs.bib | 110 ++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/sphinx_docs/source/refs.bib b/sphinx_docs/source/refs.bib index 015e4d2b08..d10c1b5398 100644 --- a/sphinx_docs/source/refs.bib +++ b/sphinx_docs/source/refs.bib @@ -19,7 +19,7 @@ @ARTICLE{colglaz volume = 59, pages = {264-289}, doi = {10.1016/0021-9991(85)90146-9}, - adsurl = {http://adsabs.harvard.edu/abs/1985JCoPh..59..264C}, + adsurl = {http://ui.adsabs.harvard.edu/abs/1985JCoPh..59..264C}, } @ARTICLE{castro_I, @@ -118,7 +118,7 @@ @ARTICLE{timmes:1999 volume = 125, pages = {277-294}, doi = {10.1086/313271}, - adsurl = {http://adsabs.harvard.edu/abs/1999ApJS..125..277T}, + adsurl = {http://ui.adsabs.harvard.edu/abs/1999ApJS..125..277T}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @@ -132,7 +132,7 @@ @ARTICLE{timmes:2000 volume = 126, pages = {501-516}, doi = {10.1086/313304}, - adsurl = {http://adsabs.harvard.edu/abs/2000ApJS..126..501T}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2000ApJS..126..501T}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @@ -168,7 +168,7 @@ @ARTICLE{millercolella:2002 volume = 183, pages = {26-82}, doi = {10.1006/jcph.2002.7158}, - adsurl = {http://adsabs.harvard.edu/abs/2002JCoPh.183...26M}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2002JCoPh.183...26M}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @@ -192,7 +192,7 @@ @ARTICLE{chamulak:2008 volume = 677, pages = {160-168}, doi = {10.1086/528944}, - adsurl = {http://adsabs.harvard.edu/abs/2008ApJ...677..160C}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2008ApJ...677..160C}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @@ -208,7 +208,7 @@ @ARTICLE{lowMach4 volume = 704, pages = {196-210}, doi = {10.1088/0004-637X/704/1/196}, - adsurl = {http://adsabs.harvard.edu/abs/2009ApJ...704..196Z}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2009ApJ...704..196Z}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @@ -224,7 +224,7 @@ @ARTICLE{wdconvect eid = {8}, pages = {8}, doi = {10.1088/0004-637X/740/1/8}, - adsurl = {http://adsabs.harvard.edu/abs/2011ApJ...740....8Z}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2011ApJ...740....8Z}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @@ -242,7 +242,7 @@ @ARTICLE{raskin:2010 volume = 724, pages = {111-125}, doi = {10.1088/0004-637X/724/1/111}, - adsurl = {http://adsabs.harvard.edu/abs/2010ApJ...724..111R}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2010ApJ...724..111R}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @@ -261,7 +261,7 @@ @ARTICLE{xrb:III eid = {60}, pages = {60}, doi = {10.1088/0004-637X/807/1/60}, - adsurl = {http://adsabs.harvard.edu/abs/2015ApJ...807...60Z}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2015ApJ...807...60Z}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @@ -280,26 +280,22 @@ @ARTICLE{xrb:II eid = {115}, pages = {115}, doi = {10.1088/0004-637X/788/2/115}, - adsurl = {http://adsabs.harvard.edu/abs/2014ApJ...788..115M}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2014ApJ...788..115M}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{wallacewoosley:1981, - author = {{Wallace}, R.~K. and {Woosley}, S.~E.}, - title = "{Explosive hydrogen burning}", - journal = {\apjs}, - keywords = {ABUNDANCE, ASTROPHYSICS, HYDROGEN, METALLIC STARS, - NUCLEAR FUSION, REACTION KINETICS, STELLAR - EVOLUTION, GAMMA RAYS, HIGH TEMPERATURE, ISOTOPES, - NEUTRON STARS, NOVAE, RESONANCE, SUPERMASSIVE STARS, - X RAY SOURCES}, - year = 1981, - month = feb, - volume = 45, - pages = {389-420}, - doi = {10.1086/190717}, - adsurl = {http://adsabs.harvard.edu/abs/1981ApJS...45..389W}, - adsnote = {Provided by the SAO/NASA Astrophysics Data System} + author = {{Wallace}, R.~K. and {Woosley}, S.~E.}, + title = "{Explosive hydrogen burning}", + journal = {\apjs}, + keywords = {Abundance, Astrophysics, Hydrogen, Metallic Stars, Nuclear Fusion, Reaction Kinetics, Stellar Evolution, Gamma Rays, High Temperature, Isotopes, Neutron Stars, Novae, Resonance, Supermassive Stars, X Ray Sources, Astrophysics}, + year = 1981, + month = feb, + volume = {45}, + pages = {389-420}, + doi = {10.1086/190717}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1981ApJS...45..389W}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @article{ReacLib, @@ -324,7 +320,7 @@ @BOOK{NR title = "{Numerical recipes in FORTRAN. The art of scientific computing}", publisher = {Cambridge: University Press, |c1992, 2nd ed.}, year = 1992, - adsurl = {http://adsabs.harvard.edu/abs/1992nrfa.book.....P}, + adsurl = {http://ui.adsabs.harvard.edu/abs/1992nrfa.book.....P}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @@ -389,43 +385,45 @@ @ARTICLE{ma:2013 adsnote = {Provided by the SAO/NASA Astrophysics Data System} } - @ARTICLE{graboske:1973, - author = {{Graboske}, H.~C. and {Dewitt}, H.~E. and {Grossman}, A.~S. and {Cooper}, M.~S.}, - title = "{Screening Factors for Nuclear Reactions. 11. Intermediate Screen-Ing and Astrophysical Applications}", - journal = {\apj}, - year = 1973, - month = apr, - volume = 181, - pages = {457-474}, - adsurl = {http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1973ApJ...181..457G&db_key=AST}, - adsnote = {Provided by the Smithsonian/NASA Astrophysics Data System} + author = {{Graboske}, H.~C. and {Dewitt}, H.~E. and {Grossman}, A.~S. and {Cooper}, M.~S.}, + title = "{Screening Factors for Nuclear Reactions. II. Intermediate Screen-Ing and Astrophysical Applications}", + journal = {\apj}, + year = 1973, + month = apr, + volume = {181}, + pages = {457-474}, + doi = {10.1086/152062}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1973ApJ...181..457G}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{alastuey:1978, - author = {{Alastuey}, A. and {Jancovici}, B.}, - title = "{Nuclear reaction rate enhancement in dense stellar matter}", - journal = {\apj}, - year = 1978, - month = dec, - volume = 226, - pages = {1034-1040}, - doi = {10.1086/156681}, - adsurl = {http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1978ApJ...226.1034A&db_key=AST}, - adsnote = {Provided by the Smithsonian/NASA Astrophysics Data System} + author = {{Alastuey}, A. and {Jancovici}, B.}, + title = "{Nuclear reaction rate enhancement in dense stellar matter.}", + journal = {\apj}, + keywords = {Astrophysics, Magnetohydrodynamics, Nuclear Astrophysics, Reaction Kinetics, Thermonuclear Reactions, Correlation, Nuclei (Nuclear Physics), Perturbation Theory, Potential Theory, Quantum Mechanics, Astrophysics, Nuclear Reactions:Stellar Interiors}, + year = 1978, + month = dec, + volume = {226}, + pages = {1034-1040}, + doi = {10.1086/156681}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1978ApJ...226.1034A}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{itoh:1979, - author = {{Itoh}, N. and {Totsuji}, H. and {Ichimaru}, S. and {Dewitt}, H.~E.}, - title = "{Enhancement of thermonuclear reaction rate due to strong screening. II - Ionic mixtures}", - journal = {\apj}, - year = 1979, - month = dec, - volume = 234, - pages = {1079-1084}, - doi = {10.1086/157590}, - adsurl = {http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1979ApJ...234.1079I&db_key=AST}, - adsnote = {Provided by the Smithsonian/NASA Astrophysics Data System} + author = {{Itoh}, N. and {Totsuji}, H. and {Ichimaru}, S. and {Dewitt}, H.~E.}, + title = "{Enhancement of thermonuclear reaction rate due to strong screening. II - Ionic mixtures}", + journal = {\apj}, + keywords = {Nonuniform Plasmas, Reaction Kinetics, Thermonuclear Reactions, Astrophysics, Binary Mixtures, Dense Plasmas, Monte Carlo Method, Astrophysics}, + year = 1979, + month = dec, + volume = {234}, + pages = {1079-1084}, + doi = {10.1086/157590}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1979ApJ...234.1079I}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{chugunov:2007, From ffe836cf6a5f6ce67e522cfaba9d1ae1377ca294 Mon Sep 17 00:00:00 2001 From: Zhi Chen <62574124+zhichen3@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:24:09 -0400 Subject: [PATCH 09/10] make self-consistent nse compatible with non-neutron networks. (#1231) Due to the missing neutron rates, it is difficult to group isotopes together into a single group. This pr mainly adds another logic of defining a single_group for non-neutron networks. If isotopes fail to form a single group and there is no neutron in the network, then use a second check where we consider nse if isotopes past Z=14(Si) that have odd N or even N form two distinct groups. Most of the line changes are code formatting. --- nse_solver/nse_check.H | 312 ++++++++++++++++++++++--------------- nse_solver/nse_solver.H | 117 +++++++------- sphinx_docs/source/nse.rst | 25 +-- 3 files changed, 262 insertions(+), 192 deletions(-) diff --git a/nse_solver/nse_check.H b/nse_solver/nse_check.H index eaea987bd9..ad7d3ca888 100644 --- a/nse_solver/nse_check.H +++ b/nse_solver/nse_check.H @@ -21,25 +21,23 @@ // First check to see if we're in the ballpark of nse state AMREX_GPU_HOST_DEVICE AMREX_INLINE -void check_nse_molar(burn_t& state, const burn_t& nse_state, bool& nse_check){ +void check_nse_molar(burn_t& state, const burn_t& nse_state, bool& nse_check) { // This function gives the first estimate whether we're in the nse or not // it checks whether the molar fractions of n,p,a are approximately in NSE - int count = 0; amrex::Real r = 1.0_rt; amrex::Real r_nse = 1.0_rt; - // Check if neutron, proton, and helium are present in the network - for (int n = 0; n < NumSpec; ++n){ - if (n == NSE_INDEX::p_index || n == NSE_INDEX::n_index|| n == NSE_INDEX::he4_index){ - ++count; - } - } + nse_check = false; - if (count < 3){ - amrex::Error("Current network does not include the proton, neutron, or helium-4, thus cannot proceed with ASE."); + // raise error if no proton or helium-4 in the network. + + if (NSE_INDEX::p_index == -1 || NSE_INDEX::he4_index == -1) { + amrex::Error("Need proton and helium-4 in the network for NSE_NET to work"); } + + // If there are proton, or helium in the network // Check if n,p,a are in equilibrium // these two ratios are defined in the ASE paper to determine whether network is in equilibrium @@ -60,24 +58,29 @@ void check_nse_molar(burn_t& state, const burn_t& nse_state, bool& nse_check){ // equilibrium condition: if pass proceed with ase if not proceed with regular eos integration // Eq. 14 in Kushnir paper - if (std::abs((r - r_nse) / r_nse) < 0.5_rt){ + // if there is neutron in the network + + if ((std::abs((r - r_nse) / r_nse) < 0.5_rt) && (NSE_INDEX::n_index != -1)) { nse_check = true; } - else{ - nse_check = false; + + // if there is no neutron in the network + + if ((std::abs((r - r_nse) / r_nse) < 0.25_rt) && (NSE_INDEX::n_index == -1)) { + nse_check = true; } } AMREX_GPU_HOST_DEVICE AMREX_INLINE -void find_max_nucs(int& max_nucs, const int current_nuc_ind){ +void find_max_nucs(int& max_nucs, const int current_nuc_ind) { // Find max number of nucs possible in a reaction step given a nuclei index. // used to determine the size of reaction array max_nucs = 0; - for (int n = NumSpec-1; n > NSE_INDEX::he4_index; --n){ + for (int n = NumSpec-1; n > NSE_INDEX::he4_index; --n) { if ( (aion[n] == aion[current_nuc_ind]-1 && (zion[n] == zion[current_nuc_ind] || zion[n] == zion[current_nuc_ind]-1)) @@ -86,7 +89,7 @@ void find_max_nucs(int& max_nucs, const int current_nuc_ind){ (zion[n] == zion[current_nuc_ind]+1 || zion[n] == zion[current_nuc_ind]+2)) || (aion[n] == aion[current_nuc_ind]+4 && zion[n] == zion[current_nuc_ind]+2) - ){ + ) { ++max_nucs; } @@ -102,7 +105,7 @@ void find_max_nucs(int& max_nucs, const int current_nuc_ind){ (aion[n] == aion[current_nuc_ind]-2 && (zion[n] == zion[current_nuc_ind]-2 || zion[n] == zion[current_nuc_ind]-1 || zion[n] == zion[current_nuc_ind])) - ){ + ) { ++max_nucs; } @@ -117,7 +120,7 @@ void find_max_nucs(int& max_nucs, const int current_nuc_ind){ || (aion[n] == aion[current_nuc_ind]-3 && (zion[n] == zion[current_nuc_ind]-1 || zion[n] == zion[current_nuc_ind]-2)) - ){ + ) { ++max_nucs; } @@ -127,7 +130,7 @@ void find_max_nucs(int& max_nucs, const int current_nuc_ind){ (zion[n] == zion[current_nuc_ind] || zion[n] == zion[current_nuc_ind]+1)) || (aion[n] == aion[current_nuc_ind]-4 && zion[n] == zion[current_nuc_ind]-2) - ){ + ) { ++max_nucs; } @@ -137,7 +140,7 @@ void find_max_nucs(int& max_nucs, const int current_nuc_ind){ AMREX_GPU_HOST_DEVICE AMREX_INLINE void get_rate_by_nuc(int& rate_index, amrex::Array1D reactants_indices, - amrex::Array1D products_indices){ + amrex::Array1D products_indices) { rate_index = -1; bool found_index = false; @@ -150,18 +153,18 @@ void get_rate_by_nuc(int& rate_index, amrex::Array1D reactants_indice // check for which rate matches these input indices // fill in the corresponding rate_index by providing array of reactants and products indices - for (int i = 1; i <= Rates::NumRates; ++i){ - for (int j = 1; j <= 3; ++j){ - if (NSE_INDEX::rate_indices(i, j) == reactants_indices(j) && NSE_INDEX::rate_indices(i, j+3) == products_indices(j)){ + for (int i = 1; i <= Rates::NumRates; ++i) { + for (int j = 1; j <= 3; ++j) { + if (NSE_INDEX::rate_indices(i, j) == reactants_indices(j) && NSE_INDEX::rate_indices(i, j+3) == products_indices(j)) { found_index = true; } - else{ + else { found_index = false; break; } } - if (found_index){ + if (found_index) { rate_index = i; return; } @@ -173,7 +176,7 @@ void get_rate_by_nuc(int& rate_index, amrex::Array1D reactants_indice AMREX_GPU_HOST_DEVICE AMREX_INLINE void find_fast_reaction_cycle(const int current_nuc_ind, const amrex::Array1D& Y, const amrex::Array1D& screened_rates, - const burn_t& state, const amrex::Real& t_s, bool& found_fast_reaction_cycle){ + const burn_t& state, const amrex::Real& t_s, bool& found_fast_reaction_cycle) { // This function finds the fast reaction cycle of a given nuclei. // This is done to satisfy Section 4.4.3 of Kushnir @@ -201,8 +204,8 @@ void find_fast_reaction_cycle(const int current_nuc_ind, const amrex::Array1D NSE_INDEX::he4_index; --n){ + for (int n = NumSpec-1; n > NSE_INDEX::he4_index; --n) { if ( (aion[n] == aion[current_nuc_ind]-1 && @@ -231,7 +234,7 @@ void find_fast_reaction_cycle(const int current_nuc_ind, const amrex::Array1D& group_ind){ + const amrex::Array1D& group_ind) { // This function returns the root index of the nuclei // by providing the nuclei index [0, NumSpec-1], and group indices, group_ind @@ -595,14 +598,14 @@ int get_root_index(const int nuc_ind, int root_index; int scratch_ind = nuc_ind; - while(true){ + while(true) { root_index = group_ind(scratch_ind + 1); - if (root_index != scratch_ind + 1){ + if (root_index != scratch_ind + 1) { scratch_ind = root_index - 1; } - else{ + else { return root_index; } } @@ -611,7 +614,7 @@ int get_root_index(const int nuc_ind, AMREX_GPU_HOST_DEVICE AMREX_INLINE -void nse_union(const int nuc_ind_a, const int nuc_ind_b, amrex::Array1D& group_ind){ +void nse_union(const int nuc_ind_a, const int nuc_ind_b, amrex::Array1D& group_ind) { // This function joins the two group of the two nuc indices:nuc_ind_a and nuc_ind_b // The smaller group is joined to the larger group. @@ -619,7 +622,7 @@ void nse_union(const int nuc_ind_a, const int nuc_ind_b, amrex::Array1D= group_b_size){ + if (group_a_size >= group_b_size) { group_ind(root_index_b) = group_ind(root_index_a); } - - else{ + else { group_ind(root_index_a) = group_ind(root_index_b); } } AMREX_GPU_HOST_DEVICE AMREX_INLINE -int get_pair_rate_index(const int& rate_index){ +int get_pair_rate_index(const int& rate_index) { // This function finds the pair rate index given a rate. // For example given forward rate index, return reverse rate index, vice versa @@ -662,14 +664,14 @@ int get_pair_rate_index(const int& rate_index){ // if all -1 then return, since its an invalid rate - for (int n = 1; n <= 6; ++n){ - if (NSE_INDEX::rate_indices(rate_index, n) != -1){ + for (int n = 1; n <= 6; ++n) { + if (NSE_INDEX::rate_indices(rate_index, n) != -1) { valid_rate = true; break; } } - if (!valid_rate){ + if (!valid_rate) { return pair_rate_index; } @@ -698,31 +700,76 @@ int get_pair_rate_index(const int& rate_index){ AMREX_GPU_HOST_DEVICE AMREX_INLINE -bool in_single_group(const amrex::Array1D& group_ind){ +bool in_single_group(const amrex::Array1D& group_ind) { // This function checks whether all isotopes are either in the LIG group // or in another single group. + + int LIG_root_index = get_root_index(NSE_INDEX::he4_index, group_ind); int nonLIG_index = -1; - int LIG_root_index = get_root_index(NSE_INDEX::he4_index, group_ind); + + int oddN_group = -1; + int evenN_group = -1; - for (int n = 0; n < NumSpec; ++n){ + bool in_single_group = true; - if (get_root_index(n, group_ind) == LIG_root_index){ + // Consider NSE when there is a single group with an optional LIG group + + for (int n = 0; n < NumSpec; ++n) { + if (get_root_index(n, group_ind) == LIG_root_index) { continue; } - if (nonLIG_index == -1){ + if (nonLIG_index == -1) { nonLIG_index = get_root_index(n, group_ind); + continue; } - else if (get_root_index(n, group_ind) != nonLIG_index){ - return false; + if (get_root_index(n, group_ind) != nonLIG_index) { + in_single_group = false; + break; } + + } + + // If there no neutrons are in the network and original condition failed + // Consider a looser condition by looking at nuclei heavier than Si28 + // There seems to be two big groups after Si28 in NSE: + // 1) isotopes with even N + // 2) isotopes with odd N + + if (NSE_INDEX::n_index == -1 && !in_single_group) { + + in_single_group = true; + for (int n = 0; n < NumSpec; ++n) { + + if (zion[n] >= 14) { + + // Get even N group index + if (evenN_group == -1 && std::fmod(aion[n] - zion[n], 2) == 0.0_rt) { + evenN_group = get_root_index(n, group_ind); + continue; + } + + // Get odd N group index + if (oddN_group == -1 && std::fmod(aion[n] - zion[n], 2) == 1.0_rt) { + oddN_group = get_root_index(n, group_ind); + continue; + } + + if ((std::fmod(aion[n] - zion[n], 2) == 0.0_rt && evenN_group != get_root_index(n, group_ind)) || + (std::fmod(aion[n] - zion[n], 2) == 1.0_rt && oddN_group != get_root_index(n, group_ind))) { + in_single_group = false; + break; + } + } + + } } - return true; + return in_single_group; } @@ -756,7 +803,10 @@ void is_fastest_rate(amrex::Array1D& merge_indices, // there can be at most 2 nonNPA isotopes in a reaction for it to be valid amrex::Array1D nonNPA_ind = {-1, -1}; - int m = 1; // m is counts the number of nonNPA isotope detected. + + // m is counts the number of nonNPA isotope detected. + + int m = 1; // find the reverse rate index of the current rate @@ -764,11 +814,11 @@ void is_fastest_rate(amrex::Array1D& merge_indices, // Check if there are > 2 isotopes or 0 isotopes in LIG (light isotope group) in this reaction - for (int k = 1; k <= 6; ++k){ + for (int k = 1; k <= 6; ++k) { // skip if current isotope is -1, which means null - if (NSE_INDEX::rate_indices(current_rate, k) == -1){ + if (NSE_INDEX::rate_indices(current_rate, k) == -1) { continue; } @@ -779,11 +829,11 @@ void is_fastest_rate(amrex::Array1D& merge_indices, // Determine number of nonLIG isotopes // also check whether nonLIG isotopes are already merged - if (root_index != get_root_index(NSE_INDEX::he4_index, group_ind)){ + if (root_index != get_root_index(NSE_INDEX::he4_index, group_ind)) { ++num_nonLIG; - if (root_index != nonLIG_root){ + if (root_index != nonLIG_root) { nonLIG_root = root_index; } @@ -798,17 +848,18 @@ void is_fastest_rate(amrex::Array1D& merge_indices, // let LIG group use their own Y instead of Y_group. (not sure if this is true) - if (root_index == get_root_index(NSE_INDEX::he4_index, group_ind)){ + if (root_index == get_root_index(NSE_INDEX::he4_index, group_ind)) { Y_group(k) = Y(NSE_INDEX::rate_indices(current_rate, k) + 1); } - else{ - for (int n = 0; n < NumSpec; ++n){ + else { + + for (int n = 0; n < NumSpec; ++n) { // if nuclei have the same root_index, then they are the same group - if (get_root_index(n, group_ind) == root_index){ + if (get_root_index(n, group_ind) == root_index) { Y_group(k) += Y(n + 1); } @@ -820,11 +871,11 @@ void is_fastest_rate(amrex::Array1D& merge_indices, if (NSE_INDEX::rate_indices(current_rate, k) != NSE_INDEX::p_index && NSE_INDEX::rate_indices(current_rate, k) != NSE_INDEX::n_index && NSE_INDEX::rate_indices(current_rate, k) != NSE_INDEX::he4_index - ){ + ) { // return if there are more than 2 nonNPA nuclei involved in the network - if (m > 2){ + if (m > 2) { return; } @@ -845,7 +896,7 @@ void is_fastest_rate(amrex::Array1D& merge_indices, || (NSE_INDEX::rate_indices(current_rate, 4) != -1) || (num_nonLIG > 2) || (num_nonLIG == 0) - ){ + ) { return; } @@ -857,18 +908,18 @@ void is_fastest_rate(amrex::Array1D& merge_indices, b_f = screened_rates(current_rate) * Y(NSE_INDEX::rate_indices(current_rate, 3) + 1); b_r = screened_rates(pair_rate_index) * Y(NSE_INDEX::rate_indices(current_rate, 6) + 1); - if (NSE_INDEX::rate_indices(current_rate, 2) != -1){ + if (NSE_INDEX::rate_indices(current_rate, 2) != -1) { - if (NSE_INDEX::rate_indices(current_rate, 2) == NSE_INDEX::rate_indices(current_rate, 3)){ + if (NSE_INDEX::rate_indices(current_rate, 2) == NSE_INDEX::rate_indices(current_rate, 3)) { b_f *= 0.5_rt; } b_f *= Y(NSE_INDEX::rate_indices(current_rate, 2) + 1) * state.rho; } - if (NSE_INDEX::rate_indices(current_rate, 5) != -1){ + if (NSE_INDEX::rate_indices(current_rate, 5) != -1) { - if (NSE_INDEX::rate_indices(current_rate, 5) == NSE_INDEX::rate_indices(current_rate, 6)){ + if (NSE_INDEX::rate_indices(current_rate, 5) == NSE_INDEX::rate_indices(current_rate, 6)) { b_r *= 0.5_rt; } @@ -878,13 +929,13 @@ void is_fastest_rate(amrex::Array1D& merge_indices, // Find the timescale of the rate, See Eq. 17 and Eq. 11 in Kushnir amrex::Real scratch_t = Y_group(nonNPA_ind(1)) / amrex::min(b_f, b_r); - if (nonNPA_ind(2) != -1){ + if (nonNPA_ind(2) != -1) { scratch_t = amrex::min(scratch_t, Y_group(nonNPA_ind(2)) / amrex::min(b_f, b_r)); } // return if current rate timescale is larger than previous time scale - if (fastest_t < scratch_t){ + if (fastest_t < scratch_t) { return; } @@ -899,14 +950,14 @@ void is_fastest_rate(amrex::Array1D& merge_indices, // get merge indices for nonNPA isotopes - for (int n = 1; n <= 2; ++n){ + for (int n = 1; n <= 2; ++n) { // If nonNPA index is -1, meaning null, then use LIG index - if (nonNPA_ind(n) == -1){ + if (nonNPA_ind(n) == -1) { merge_indices(n) = get_root_index(NSE_INDEX::he4_index, group_ind); } - else{ + else { merge_indices(n) = NSE_INDEX::rate_indices(current_rate, nonNPA_ind(n)); } } @@ -920,20 +971,23 @@ AMREX_GPU_HOST_DEVICE AMREX_INLINE void nse_grouping(amrex::Array1D& group_ind, const burn_t& state, const amrex::Array1D& Y, const amrex::Array1D& screened_rates, - const amrex::Real& t_s){ + const amrex::Real& t_s) { // This function groups all the nuclei using group_ind // which contains the node # // fill in initial group_ind, group_ind go from 1 to NumSpec - for (int i = 1; i <= NumSpec; ++i){ + for (int i = 1; i <= NumSpec; ++i) { group_ind(i) = i; // let n,p,a form the same group (LIG) initially, let 1 be index of LIG if (i == NSE_INDEX::p_index + 1 || i == NSE_INDEX::n_index + 1 - || i == NSE_INDEX::he4_index + 1){ + || i == NSE_INDEX::he4_index + 1) { + + // group_ind(i) = NSE_INDEX::he4_index; + group_ind(i) = 1; } } @@ -943,7 +997,7 @@ void nse_grouping(amrex::Array1D& group_ind, const burn_t& stat // Go through each reaction and perform grouping - while(true){ + while(true) { merge_indices(1) = -1; merge_indices(2) = -1; @@ -951,7 +1005,7 @@ void nse_grouping(amrex::Array1D& group_ind, const burn_t& stat // Find the fastest time scale of the available reaction - for (int n = 1; n <= Rates::NumRates; ++n){ + for (int n = 1; n <= Rates::NumRates; ++n) { // Check if current rate is the faster rate than previous rate @@ -960,7 +1014,7 @@ void nse_grouping(amrex::Array1D& group_ind, const burn_t& stat // if there are no reaction satisfy conditions, break - if (merge_indices(1) == -1 && merge_indices(2) == -1){ + if (merge_indices(1) == -1 && merge_indices(2) == -1) { break; } @@ -983,7 +1037,7 @@ bool in_nse(burn_t& current_state, bool skip_molar_check=false) { current_state.nse = false; - if (current_state.T < 2.0e9_rt) { + if (current_state.T < 2.5e9_rt) { return current_state.nse; } @@ -1016,7 +1070,7 @@ bool in_nse(burn_t& current_state, bool skip_molar_check=false) { // Note we only do this after the first check, which should tell us whether // our current mass fractions are in the ballpark of NSE mass fractions. - if (nse_molar_independent) { + if (nse_molar_independent || skip_molar_check) { state = nse_state; state.dx = current_state.dx; #ifndef STRANG @@ -1032,7 +1086,7 @@ bool in_nse(burn_t& current_state, bool skip_molar_check=false) { amrex::Array1D Y; amrex::Array1D ydot; - for (int n = 1; n <= NumSpec; ++n){ + for (int n = 1; n <= NumSpec; ++n) { Y(n) = state.xn[n-1] * aion_inv[n-1]; ydot(n) = 0.0_rt; } @@ -1076,27 +1130,33 @@ bool in_nse(burn_t& current_state, bool skip_molar_check=false) { amrex::Real sneut, dsneutdt, dsneutdd, snuda, snudz; sneut5(state.T, state.rho, state.abar, state.zbar, sneut, dsneutdt, dsneutdd, snuda, snudz); #else - amrex::Real sneut = 0.0_rt, dsneutdt =0.0_rt , dsneutdd = 0.0_rt, snuda = 0.0_rt, snudz = 0.0_rt; + amrex::Real sneut = 0.0_rt; #endif // fill in energy generation rate to ydot ydot(NumSpec + 1) = enuc - sneut; + + bool found_fast_reaction_cycle = true; + + // Additional constraint if there is neutron in the network: // Now we look through the network and see if there are fast reaction cycles // Need to separate forward and reverse rate and determine each step is fast enough. - // use vectors for now - bool found_fast_reaction_cycle = false; + if (NSE_INDEX::n_index != -1) { + found_fast_reaction_cycle = false; - // Do a reverse for loop to start from heaviest nuclei + // Do a reverse for loop to start from heaviest nuclei - for (int n = NumSpec-1; n >= 0; --n){ - if (found_fast_reaction_cycle){ - break; + for (int n = NumSpec-1; n >= 0; --n) { + if (found_fast_reaction_cycle) { + break; + } + + find_fast_reaction_cycle(n, Y, rate_eval.screened_rates, state, t_s, found_fast_reaction_cycle); } - find_fast_reaction_cycle(n, Y, rate_eval.screened_rates, state, t_s, found_fast_reaction_cycle); } // Do nse grouping if found fast reaction cycle. @@ -1108,10 +1168,10 @@ bool in_nse(burn_t& current_state, bool skip_molar_check=false) { // if not found_fast_reaction_cycle, state not in nse - if (!found_fast_reaction_cycle){ + if (!found_fast_reaction_cycle) { current_state.nse = false; } - else{ + else { // Do nse grouping if found_fast_reaction_cycle @@ -1121,7 +1181,7 @@ bool in_nse(burn_t& current_state, bool skip_molar_check=false) { current_state.nse = false; - if (in_single_group(group_ind)){ + if (in_single_group(group_ind)) { current_state.nse = true; } } diff --git a/nse_solver/nse_solver.H b/nse_solver/nse_solver.H index 87de4a7476..4f4829bf1f 100644 --- a/nse_solver/nse_solver.H +++ b/nse_solver/nse_solver.H @@ -21,12 +21,12 @@ using namespace nse_rp; AMREX_INLINE void find_rate_indices(amrex::Array1D& reactant_indices, - amrex::Array1D& product_indices, const std::string& rate_name){ + amrex::Array1D& product_indices, const std::string& rate_name) { // fill the corresponding reactant and product indices of a given rate name // used during initialization - for (int n = 1; n <= 3; ++n){ + for (int n = 1; n <= 3; ++n) { reactant_indices(n) = -1; product_indices(n) = -1; } @@ -39,10 +39,10 @@ void find_rate_indices(amrex::Array1D& reactant_indices, size_t pos; - while (true){ + while (true) { pos = rate_name_mod.find("p_"); - if (pos == std::string::npos){ + if (pos == std::string::npos) { break; } @@ -80,7 +80,7 @@ void find_rate_indices(amrex::Array1D& reactant_indices, // Find the index of reactants and products in short_spec_names int i = 1; - while ((pos = reactant_names.find('_')) != std::string::npos){ + while ((pos = reactant_names.find('_')) != std::string::npos) { _temp = reactant_names.substr(0, pos); // aprox network need capitalize @@ -88,8 +88,8 @@ void find_rate_indices(amrex::Array1D& reactant_indices, // cap_first_letter(reactant); - for (int n = 0; n < NumSpec; ++n){ - if (short_spec_names_cxx[n] == _temp){ + for (int n = 0; n < NumSpec; ++n) { + if (short_spec_names_cxx[n] == _temp) { reactant_indices(i) = n; ++i; } @@ -99,21 +99,20 @@ void find_rate_indices(amrex::Array1D& reactant_indices, } // cap_first_letter(reactant_names); - for (int n = 0; n < NumSpec; ++n){ - if (short_spec_names_cxx[n] == reactant_names){ + for (int n = 0; n < NumSpec; ++n) { + if (short_spec_names_cxx[n] == reactant_names) { reactant_indices(i) = n; } } - i = 1; - while ((pos = product_names.find('_')) != std::string::npos){ + while ((pos = product_names.find('_')) != std::string::npos) { _temp = product_names.substr(0, pos); // cap_first_letter(product); - for (int n = 0; n < NumSpec; ++n){ - if (short_spec_names_cxx[n] == _temp){ + for (int n = 0; n < NumSpec; ++n) { + if (short_spec_names_cxx[n] == _temp) { product_indices(i) = n; ++i; } @@ -124,8 +123,8 @@ void find_rate_indices(amrex::Array1D& reactant_indices, // cap_first_letter(product_names); - for (int n = 0; n < NumSpec; ++n){ - if (short_spec_names_cxx[n] == product_names){ + for (int n = 0; n < NumSpec; ++n) { + if (short_spec_names_cxx[n] == product_names) { product_indices(i) = n; } } @@ -142,13 +141,14 @@ AMREX_INLINE void init_nse_net() { // Initialization for nse, check whether network is valid and stores indices - for (int n = 0; n < NumSpec; ++n){ + for (int n = 0; n < NumSpec; ++n) { // store index of photoionization proton by looking for Z=1 but // exclude h1 which is always at index=0 for aprox networks + #ifdef NEW_NETWORK_IMPLEMENTATION - if (zion[n] == 1 && aion[n] == 1){ - if (n == 0){ + if (zion[n] == 1 && aion[n] == 1) { + if (n == 0) { NSE_INDEX::h1_index = n; } else { @@ -156,14 +156,14 @@ void init_nse_net() { } } #else - if (zion[n] == 1 && aion[n]== 1){ + if (zion[n] == 1 && aion[n]== 1) { NSE_INDEX::p_index = n; } #endif - else if (zion[n] == 0){ + else if (zion[n] == 0) { NSE_INDEX::n_index = n; } - else if (zion[n] == 2 && aion[n] == 4){ + else if (zion[n] == 2 && aion[n] == 4) { NSE_INDEX::he4_index = n; } } @@ -171,18 +171,19 @@ void init_nse_net() { // Check if network results in singular jacobian first, require at // least one nuclei that nuclei.Z != nuclei.N. Some examples include // aprox13 and iso7. If use hybrj solver, this is no longer an issue. - if (!use_hybrid_solver){ + + if (!use_hybrid_solver) { bool singular_network = true; - for (int n = 0; n < NumSpec; ++n){ - if (n == NSE_INDEX::h1_index){ + for (int n = 0; n < NumSpec; ++n) { + if (n == NSE_INDEX::h1_index) { continue; } - if (zion[n] != aion[n] - zion[n]){ + if (zion[n] != aion[n] - zion[n]) { singular_network = false; } } - if (singular_network == true){ + if (singular_network == true) { amrex::Error("This network always results in singular jacobian matrix, thus can't find nse mass fraction using nr!"); } } @@ -197,7 +198,7 @@ void init_nse_net() { amrex::Array1D product_indices; std::string current_rate_name; - for (int n = 1; n <= Rates::NumRates; ++n){ + for (int n = 1; n <= Rates::NumRates; ++n) { // get current name of the rate current_rate_name = Rates::rate_names[n]; @@ -206,19 +207,13 @@ void init_nse_net() { find_rate_indices(reactant_indices, product_indices, current_rate_name); // fill in rate_indices - for (int i = 1; i <= 3; ++i){ + for (int i = 1; i <= 3; ++i) { NSE_INDEX::rate_indices(n, i) = reactant_indices(i); NSE_INDEX::rate_indices(n, i+3) = product_indices(i); } } #endif - - // make sure nse_molar_independent is used if nse_skip_molar is enabled - - if (nse_skip_molar) { - nse_molar_independent = true; - } NSE_INDEX::initialized = true; } @@ -267,8 +262,8 @@ T get_nse_state(const T& state) auto tfactors = evaluate_tfactors(T_in); #endif - for (int n = 0; n < NumSpec; ++n){ - if (n == NSE_INDEX::h1_index){ + for (int n = 0; n < NumSpec; ++n) { + if (n == NSE_INDEX::h1_index) { nse_state.xn[n] = 0.0; continue; } @@ -316,8 +311,8 @@ T get_nse_state(const T& state) nse_state.y_e = 0.0_rt; - for (int n = 0; n < NumSpec; ++n){ - if (n == NSE_INDEX::h1_index){ + for (int n = 0; n < NumSpec; ++n) { + if (n == NSE_INDEX::h1_index) { continue; } @@ -351,8 +346,8 @@ void fcn(Array1D& x, Array1D& fvec, fvec(1) = -1.0_rt; - for (int n = 0; n < NumSpec; ++n){ - if (n == NSE_INDEX::h1_index){ + for (int n = 0; n < NumSpec; ++n) { + if (n == NSE_INDEX::h1_index) { continue; } @@ -392,8 +387,8 @@ void jcn(Array1D& x, Array2D& fjac, Real T_in = state.T_fixed > 0.0_rt ? state.T_fixed : state.T; - for (int n = 0; n < NumSpec; ++n){ - if (n == NSE_INDEX::h1_index){ + for (int n = 0; n < NumSpec; ++n) { + if (n == NSE_INDEX::h1_index) { continue; } @@ -439,13 +434,13 @@ void nse_hybrid_solver(T& state, amrex::Real eps=1.0e-10_rt) { // fine tuning initial guesses - for (int i = 0; i < 20; ++i){ + for (int i = 0; i < 20; ++i) { dx = 0.5_rt; inner_x(1) = outer_x(1); inner_x(2) = outer_x(2); - for (int j = 0; j < 20; ++j){ + for (int j = 0; j < 20; ++j) { hj.x(1) = inner_x(1); hj.x(2) = inner_x(2); @@ -455,25 +450,25 @@ void nse_hybrid_solver(T& state, amrex::Real eps=1.0e-10_rt) { fcn(hj.x, f, state, flag); - if (std::abs(f(1)) < eps && std::abs(f(2)) < eps){ + if (std::abs(f(1)) < eps && std::abs(f(2)) < eps) { state.mu_p = hj.x(1); state.mu_n = hj.x(2); return; } - if (f(1) > 0.0_rt && f(2) > 0.0_rt){ + if (f(1) > 0.0_rt && f(2) > 0.0_rt) { is_pos_new = true; } else{ is_pos_new = false; } - if (is_pos_old != is_pos_new){ + if (is_pos_old != is_pos_new) { dx *= 0.8_rt; } - if (is_pos_new){ + if (is_pos_new) { inner_x(1) -= dx; inner_x(2) -= dx; } @@ -492,6 +487,13 @@ void nse_hybrid_solver(T& state, amrex::Real eps=1.0e-10_rt) { // if (hj.info != 1) { // amrex::Error("failed to solve"); // } +#ifndef AMREX_USE_GPU + std::cout << "NSE solver failed with these conditions: " << std::endl; + std::cout << "Temperature: " << state.T << std::endl; + std::cout << "Density: " << state.rho << std::endl; + std::cout << "Ye: " << state.y_e << std::endl; + std::cout << "Initial mu_p and mu_n: " << state.mu_p << ", " << state.mu_n << std::endl; +#endif amrex::Error("failed to solve"); } @@ -514,7 +516,7 @@ void nse_nr_solver(T& state, amrex::Real eps=1.0e-10_rt) { x(2) = state.mu_n; jcn(x, jac, state, flag); - fcn(x, f, state,flag); + fcn(x, f, state, flag); amrex::Real det; // store determinant for finding inverse jac amrex::Array2D inverse_jac; // store inverse jacobian @@ -522,12 +524,12 @@ void nse_nr_solver(T& state, amrex::Real eps=1.0e-10_rt) { amrex::Real d_mu_n = std::numeric_limits::max(); // difference in chemical potential of neutron // begin newton-raphson - for (int i = 0; i < max_nse_iters; ++i){ + for (int i = 0; i < max_nse_iters; ++i) { // check if current state fulfills constraint equation if (std::abs(d_mu_p) < eps * std::abs(x(1)) && - std::abs(d_mu_n) < eps * std::abs(x(2))){ + std::abs(d_mu_n) < eps * std::abs(x(2))) { converged = true; state.mu_p = x(1); state.mu_n = x(2); @@ -540,7 +542,7 @@ void nse_nr_solver(T& state, amrex::Real eps=1.0e-10_rt) { // if jacobians are small, then no need for scaling - if (scale_fac < 1.0e150){ + if (scale_fac < 1.0e150) { scale_fac = 1.0_rt; } @@ -550,7 +552,7 @@ void nse_nr_solver(T& state, amrex::Real eps=1.0e-10_rt) { // check if determinant is 0 - if (det == 0.0_rt){ + if (det == 0.0_rt) { amrex::Error("Jacobian is a singular matrix! Try a different initial guess!"); } @@ -568,7 +570,7 @@ void nse_nr_solver(T& state, amrex::Real eps=1.0e-10_rt) { // if diff goes beyond 1.0e3_rt, likely that its not making good progress.. - if (std::abs(d_mu_p) > 1.0e3_rt || std::abs(d_mu_n) > 1.0e3_rt){ + if (std::abs(d_mu_p) > 1.0e3_rt || std::abs(d_mu_n) > 1.0e3_rt) { amrex::Error("Not making good progress, breaking"); } @@ -579,7 +581,7 @@ void nse_nr_solver(T& state, amrex::Real eps=1.0e-10_rt) { // check whether solution results in nan - if (std::isnan(x(1)) || std::isnan(x(2))){ + if (std::isnan(x(1)) || std::isnan(x(2))) { amrex::Error("Nan encountered, likely due to overflow in digits or not making good progress"); } @@ -589,7 +591,7 @@ void nse_nr_solver(T& state, amrex::Real eps=1.0e-10_rt) { fcn(x, f, state, flag); } - if (!converged){ + if (!converged) { amrex::Error("NSE solver failed to converge!"); } } @@ -598,7 +600,7 @@ void nse_nr_solver(T& state, amrex::Real eps=1.0e-10_rt) { template AMREX_GPU_HOST_DEVICE AMREX_INLINE T get_actual_nse_state(T& state, amrex::Real eps=1.0e-10_rt, - bool input_ye_is_valid=false){ + bool input_ye_is_valid=false) { // Check whether initialized or not if (!NSE_INDEX::initialized) { @@ -627,6 +629,7 @@ T get_actual_nse_state(T& state, amrex::Real eps=1.0e-10_rt, for (int n = 0; n < NumSpec; ++n) { state.y_e += state.y[SFS+n] * zion[n] * aion_inv[n] / state.rho; } + #endif } diff --git a/sphinx_docs/source/nse.rst b/sphinx_docs/source/nse.rst index e38dc36b50..fbede0efc3 100644 --- a/sphinx_docs/source/nse.rst +++ b/sphinx_docs/source/nse.rst @@ -249,7 +249,7 @@ There are 3 main criteria discussed in the :cite:`Kushnir_2020`. participated in this step, where :math:`b_f` and :math:`b_r` are the forward and reverse rate of the reaction, :math:`\epsilon` is a tolerance which has a default value of :math:`0.1`, and :math:`t_s` is the sound crossing time of a - simulation cell. + simulation cell. Note: we skip this check when there is no neutron involved in the network. An example of such reaction cycle would be: @@ -258,12 +258,12 @@ There are 3 main criteria discussed in the :cite:`Kushnir_2020`. \isotm{S}{32} (\gamma, p)(\gamma, p)(\gamma, n)(\gamma, n) \isotm{Si}{28} (\alpha, \gamma) \isotm{S}{32} - The general approach to this is to start iterations from the heavy to the light nuclei to - use them as the starting point of the cycle. Then the algorithm checks if isotopes involved - in the network can actually form a cycle using the combination reactions above. If such cycle - is formed, then we check the rates of these reactions to see if they satisfy the condition - mention previously. If there are no isotope present in the network that would form - a closed-cycle, we move on to the next nuclei. We break out of the iteration once we found + The general approach to this is to start iterations from the heaviest to the lightest + nuclei. Then the algorithm checks if isotopes involved in the network can actually form + a cycle using the combination reactions above. If such cycle is formed, then we check the + rates of these reactions to see if they satisfy the condition mention previously. + If there are no isotope present in the network that would form a closed-cycle, + we move on to the next nuclei. We break out of the iteration once we found a fast reaction cycle. * If the previous two check pass, we proceed to nuclei grouping. Initially, @@ -284,7 +284,7 @@ There are 3 main criteria discussed in the :cite:`Kushnir_2020`. t_{i,k} < \epsilon t_s - * + * .. math:: @@ -312,10 +312,17 @@ There are 3 main criteria discussed in the :cite:`Kushnir_2020`. This means that the non-LIG nuclei have already merged. And the iteration stops once there are no reactions that can satisfy the above criteria. - At the end of the iterations, we define that the current state have reached NSE + At the end of the iterations, we define that the current state have reached NSE when there is only a single group left, or there are two groups left where 1 of them is the light-isotope-group. + When there is no neutron in the network, it can be difficult for isotopes to form + a single group due to the missing neutron rates. Therefore, there is an alternative + criteria of defining a "single group" when neutron is not present in the network: + for isotopes, :math:`Z >= 14`, isotopes with odd and even :math:`N` form two + distinct groups. + + Additional Options ------------------ From a74734006fc2fb63886bad6e1ee9ddfea1ce710c Mon Sep 17 00:00:00 2001 From: Zhi Chen <62574124+zhichen3@users.noreply.github.com> Date: Tue, 11 Jul 2023 07:38:47 -0400 Subject: [PATCH 10/10] typo fix (#1272) --- util/hybrj/hybrj_dogleg.H | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/hybrj/hybrj_dogleg.H b/util/hybrj/hybrj_dogleg.H index 5f3b340d19..0bc5822b13 100644 --- a/util/hybrj/hybrj_dogleg.H +++ b/util/hybrj/hybrj_dogleg.H @@ -157,9 +157,9 @@ void dogleg(amrex::Array1D& r, temp = (bnorm/gnorm)*(bnorm/qnorm)*(sgnorm/delta); temp = temp - (delta/qnorm) * std::pow(sgnorm/delta, 2.0_rt) + std::sqrt(std::pow(temp-(delta/qnorm), 2.0_rt) - + (1.0_rt-std::pow(delta/qnorm, 2/0_rt)) * + + (1.0_rt-std::pow(delta/qnorm, 2.0_rt)) * (1.0_rt-std::pow(sgnorm/delta, 2.0_rt))); - alpha = ((delta/qnorm)*(1.0_rt - std::pow(sgnorm/delta, 2/0_rt))) / temp; + alpha = ((delta/qnorm)*(1.0_rt - std::pow(sgnorm/delta, 2.0_rt))) / temp; } }