Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regenerate the subch family nets with the latest pynucastro #1685

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified networks/CNO_He_burn/CNO_He_burn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions networks/CNO_He_burn/Make.package
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ifeq ($(USE_REACT),TRUE)
CEXE_headers += actual_network.H
CEXE_headers += tfactors.H
CEXE_headers += partition_functions.H
CEXE_sources += partition_functions_data.cpp
CEXE_headers += actual_rhs.H
CEXE_headers += reaclib_rates.H
CEXE_headers += table_rates.H
Expand Down
64 changes: 32 additions & 32 deletions networks/CNO_He_burn/actual_network.H
Original file line number Diff line number Diff line change
Expand Up @@ -30,100 +30,100 @@ namespace network
return 0.0_rt;
}
else if constexpr (spec == He4) {
return 28.29566_rt;
return 28.295662457999697_rt;
}
else if constexpr (spec == C12) {
return 92.16172800000001_rt;
return 92.16173498399803_rt;
}
else if constexpr (spec == C13) {
return 97.108037_rt;
return 97.10804378399916_rt;
}
else if constexpr (spec == N13) {
return 94.105219_rt;
return 94.10522604799917_rt;
}
else if constexpr (spec == N14) {
return 104.65859599999999_rt;
return 104.65860734799753_rt;
}
else if constexpr (spec == N15) {
return 115.4919_rt;
return 115.49190414799887_rt;
}
else if constexpr (spec == O14) {
return 98.731892_rt;
return 98.73189611199996_rt;
}
else if constexpr (spec == O15) {
return 111.95538_rt;
return 111.95539521199862_rt;
}
else if constexpr (spec == O16) {
return 127.619296_rt;
return 127.6193154119992_rt;
}
else if constexpr (spec == O17) {
return 131.76237600000002_rt;
return 131.76239561199873_rt;
}
else if constexpr (spec == O18) {
return 139.807746_rt;
return 139.8077658120019_rt;
}
else if constexpr (spec == F17) {
return 128.21957600000002_rt;
return 128.21958437599824_rt;
}
else if constexpr (spec == F18) {
return 137.369484_rt;
return 137.36950247599816_rt;
}
else if constexpr (spec == F19) {
return 147.801342_rt;
return 147.80136567599766_rt;
}
else if constexpr (spec == Ne18) {
return 132.142626_rt;
return 132.14265544000227_rt;
}
else if constexpr (spec == Ne19) {
return 143.779517_rt;
return 143.7795235400008_rt;
}
else if constexpr (spec == Ne20) {
return 160.6448_rt;
return 160.64482384000075_rt;
}
else if constexpr (spec == Ne21) {
return 167.405973_rt;
return 167.40598973999658_rt;
}
else if constexpr (spec == Na22) {
return 174.144674_rt;
return 174.14457080400098_rt;
}
else if constexpr (spec == Na23) {
return 186.56433900000002_rt;
return 186.56435240400242_rt;
}
else if constexpr (spec == Mg22) {
return 168.58074200000001_rt;
return 168.58082376800303_rt;
}
else if constexpr (spec == Mg24) {
return 198.25701600000002_rt;
return 198.2570479679962_rt;
}
else if constexpr (spec == Al27) {
return 224.951931_rt;
return 224.95193723199915_rt;
}
else if constexpr (spec == Si28) {
return 236.536832_rt;
return 236.53684539599638_rt;
}
else if constexpr (spec == P31) {
return 262.91617699999995_rt;
return 262.9161999600037_rt;
}
else if constexpr (spec == S32) {
return 271.78012800000005_rt;
return 271.78016372399725_rt;
}
else if constexpr (spec == Ar36) {
return 306.716724_rt;
return 306.7167469519991_rt;
}
else if constexpr (spec == Ca40) {
return 342.05212000000006_rt;
return 342.05218528000114_rt;
}
else if constexpr (spec == Ti44) {
return 375.47488000000004_rt;
return 375.47496160800074_rt;
}
else if constexpr (spec == Cr48) {
return 411.46891200000005_rt;
return 411.4679399359957_rt;
}
else if constexpr (spec == Fe52) {
return 447.697848_rt;
return 447.6996182639923_rt;
}
else if constexpr (spec == Ni56) {
return 483.995624_rt;
return 483.9956965919919_rt;
}


Expand Down
17 changes: 9 additions & 8 deletions networks/CNO_He_burn/partition_functions.H
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ namespace part_fun {

// interpolation routine

template <int npts>
template <typename T>
AMREX_GPU_HOST_DEVICE AMREX_INLINE
void interpolate_pf(const amrex::Real t9, const amrex::Real (&temp_array)[npts], const amrex::Real (&pf_array)[npts],
void interpolate_pf(const amrex::Real t9, const T& temp_array, const T& pf_array,
amrex::Real& pf, amrex::Real& dpf_dT) {

if (t9 >= temp_array[0] && t9 < temp_array[npts-1]) {
if (t9 >= temp_array.lo() && t9 < temp_array.hi()) {

// find the largest temperature element <= t9 using a binary search

int left = 0;
int right = npts;
int left = temp_array.lo();
int right = temp_array.hi();

while (left < right) {
int mid = (left + right) / 2;
if (temp_array[mid] > t9) {
if (temp_array(mid) > t9) {
right = mid;
} else {
left = mid + 1;
Expand All @@ -44,11 +44,12 @@ namespace part_fun {

// construct the slope -- this is (log10(pf_{i+1}) - log10(pf_i)) / (T_{i+1} - T_i)

amrex::Real slope = (pf_array[idx+1] - pf_array[idx]) / (temp_array[idx+1] - temp_array[idx]);
amrex::Real slope = (pf_array(idx+1) - pf_array(idx)) /
(temp_array(idx+1) - temp_array(idx));

// find the PF

amrex::Real log10_pf = pf_array[idx] + slope * (t9 - temp_array[idx]);
amrex::Real log10_pf = pf_array(idx) + slope * (t9 - temp_array(idx));
pf = std::pow(10.0_rt, log10_pf);

// find the derivative (with respect to T, not T9)
Expand Down
14 changes: 14 additions & 0 deletions networks/CNO_He_burn/partition_functions_data.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <AMReX_Array.H>
#include <string>
#include <table_rates.H>
#include <AMReX_Print.H>

#include <partition_functions.H>

using namespace amrex;

namespace part_fun {


}

Binary file modified networks/He-C-Fe-group/He-C-Fe-group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions networks/He-C-Fe-group/Make.package
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ifeq ($(USE_REACT),TRUE)
CEXE_headers += actual_network.H
CEXE_headers += tfactors.H
CEXE_headers += partition_functions.H
CEXE_sources += partition_functions_data.cpp
CEXE_headers += actual_rhs.H
CEXE_headers += reaclib_rates.H
CEXE_headers += table_rates.H
Expand Down
68 changes: 34 additions & 34 deletions networks/He-C-Fe-group/actual_network.H
Original file line number Diff line number Diff line change
Expand Up @@ -33,106 +33,106 @@ namespace network
return 0.0_rt;
}
else if constexpr (spec == He4) {
return 28.29566_rt;
return 28.295662457999697_rt;
}
else if constexpr (spec == C12) {
return 92.16172800000001_rt;
return 92.16173498399803_rt;
}
else if constexpr (spec == N13) {
return 94.105219_rt;
return 94.10522604799917_rt;
}
else if constexpr (spec == N14) {
return 104.65859599999999_rt;
return 104.65860734799753_rt;
}
else if constexpr (spec == O16) {
return 127.619296_rt;
return 127.6193154119992_rt;
}
else if constexpr (spec == F18) {
return 137.369484_rt;
return 137.36950247599816_rt;
}
else if constexpr (spec == Ne20) {
return 160.6448_rt;
return 160.64482384000075_rt;
}
else if constexpr (spec == Ne21) {
return 167.405973_rt;
return 167.40598973999658_rt;
}
else if constexpr (spec == Na22) {
return 174.144674_rt;
return 174.14457080400098_rt;
}
else if constexpr (spec == Na23) {
return 186.56433900000002_rt;
return 186.56435240400242_rt;
}
else if constexpr (spec == Mg24) {
return 198.25701600000002_rt;
return 198.2570479679962_rt;
}
else if constexpr (spec == Al27) {
return 224.951931_rt;
return 224.95193723199915_rt;
}
else if constexpr (spec == Si28) {
return 236.536832_rt;
return 236.53684539599638_rt;
}
else if constexpr (spec == P31) {
return 262.91617699999995_rt;
return 262.9161999600037_rt;
}
else if constexpr (spec == S32) {
return 271.78012800000005_rt;
return 271.78016372399725_rt;
}
else if constexpr (spec == Ar36) {
return 306.716724_rt;
return 306.7167469519991_rt;
}
else if constexpr (spec == Ca40) {
return 342.05212000000006_rt;
return 342.05218528000114_rt;
}
else if constexpr (spec == Ti44) {
return 375.47488000000004_rt;
return 375.47496160800074_rt;
}
else if constexpr (spec == Cr48) {
return 411.46891200000005_rt;
return 411.4679399359957_rt;
}
else if constexpr (spec == Mn51) {
return 440.32237200000003_rt;
return 440.321747199996_rt;
}
else if constexpr (spec == Mn55) {
return 482.07621_rt;
return 482.07635959999607_rt;
}
else if constexpr (spec == Fe52) {
return 447.697848_rt;
return 447.6996182639923_rt;
}
else if constexpr (spec == Fe53) {
return 458.386347_rt;
return 458.38633636399754_rt;
}
else if constexpr (spec == Fe54) {
return 471.76462799999996_rt;
return 471.76475446399854_rt;
}
else if constexpr (spec == Fe55) {
return 481.06272499999994_rt;
return 481.06287256399816_rt;
}
else if constexpr (spec == Fe56) {
return 492.2598239999999_rt;
return 492.2599506639962_rt;
}
else if constexpr (spec == Co55) {
return 476.82899_rt;
return 476.82912552799826_rt;
}
else if constexpr (spec == Co56) {
return 486.91081599999995_rt;
return 486.91094362799777_rt;
}
else if constexpr (spec == Co57) {
return 498.287274_rt;
return 498.28746172798856_rt;
}
else if constexpr (spec == Ni56) {
return 483.995624_rt;
return 483.9956965919919_rt;
}
else if constexpr (spec == Ni57) {
return 494.2431810000001_rt;
return 494.2434146919986_rt;
}
else if constexpr (spec == Ni58) {
return 506.45942199999996_rt;
return 506.4596327920008_rt;
}
else if constexpr (spec == Cu59) {
return 509.878_rt;
return 509.8782038560021_rt;
}
else if constexpr (spec == Zn60) {
return 514.983_rt;
return 514.9831749199948_rt;
}


Expand Down
2 changes: 1 addition & 1 deletion networks/He-C-Fe-group/actual_network_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace NSE_INDEX
-1, -1, 26, -1, -1, 22, 89,
-1, -1, 27, -1, -1, 29, -1,
-1, -1, 22, -1, -1, 26, -1,
-1, -1, 0, -1, -1, 1, -1,
-1, -1, 0, -1, -1, 1, 93,
-1, -1, 31, -1, -1, 29, 84,
-1, -1, 32, -1, -1, 30, 85,
-1, -1, 1, -1, -1, 0, -1,
Expand Down
12 changes: 4 additions & 8 deletions networks/He-C-Fe-group/actual_rhs.H
Original file line number Diff line number Diff line change
Expand Up @@ -1468,12 +1468,10 @@ void get_ydot_weak(const burn_t& state,
auto screened_rates = rate_eval.screened_rates;

ydot_nuc(N) =
-screened_rates(k_n_to_p)*Y(N) +
screened_rates(k_p_to_n)*Y(H1);
(-screened_rates(k_n_to_p)*Y(N) + screened_rates(k_p_to_n)*Y(H1));

ydot_nuc(H1) =
screened_rates(k_n_to_p)*Y(N) +
-screened_rates(k_p_to_n)*Y(H1);
(screened_rates(k_n_to_p)*Y(N) + -screened_rates(k_p_to_n)*Y(H1));

ydot_nuc(He4) = 0.0_rt;

Expand Down Expand Up @@ -1585,8 +1583,7 @@ void rhs_nuc(const burn_t& state,
(-screened_rates(k_n_Ni58_to_He4_Fe55)*Y(Ni58)*Y(N)*state.rho + screened_rates(k_He4_Fe55_to_n_Ni58_derived)*Y(Fe55)*Y(He4)*state.rho) +
(-screened_rates(k_n_Cu59_to_He4_Co56)*Y(Cu59)*Y(N)*state.rho + screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(Co56)*Y(He4)*state.rho) +
(-screened_rates(k_n_Zn60_to_He4_Ni57)*Y(Zn60)*Y(N)*state.rho + screened_rates(k_He4_Ni57_to_n_Zn60_derived)*Y(He4)*Y(Ni57)*state.rho) +
-screened_rates(k_n_to_p)*Y(N) +
screened_rates(k_p_to_n)*Y(H1);
(-screened_rates(k_n_to_p)*Y(N) + screened_rates(k_p_to_n)*Y(H1));

ydot_nuc(H1) =
(-screened_rates(k_p_C12_to_N13)*Y(C12)*Y(H1)*state.rho + screened_rates(k_N13_to_p_C12_derived)*Y(N13)) +
Expand Down Expand Up @@ -1624,8 +1621,7 @@ void rhs_nuc(const burn_t& state,
(-screened_rates(k_p_Co57_to_He4_Fe54)*Y(Co57)*Y(H1)*state.rho + screened_rates(k_He4_Fe54_to_p_Co57_derived)*Y(Fe54)*Y(He4)*state.rho) +
(screened_rates(k_n_Ni56_to_p_Co56)*Y(Ni56)*Y(N)*state.rho + -screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(Co56)*Y(H1)*state.rho) +
(screened_rates(k_n_Ni57_to_p_Co57)*Y(Ni57)*Y(N)*state.rho + -screened_rates(k_p_Co57_to_n_Ni57_derived)*Y(Co57)*Y(H1)*state.rho) +
screened_rates(k_n_to_p)*Y(N) +
-screened_rates(k_p_to_n)*Y(H1);
(screened_rates(k_n_to_p)*Y(N) + -screened_rates(k_p_to_n)*Y(H1));

ydot_nuc(He4) =
(-screened_rates(k_He4_C12_to_O16)*Y(C12)*Y(He4)*state.rho + screened_rates(k_O16_to_He4_C12_derived)*Y(O16)) +
Expand Down
Loading
Loading