Skip to content

Commit

Permalink
Merge branch 'development' into urca_again
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Oct 24, 2023
2 parents 152b2a0 + 5dd1a91 commit c9b02e3
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
15 changes: 15 additions & 0 deletions networks/ignition_reaclib/URCA-simple/actual_network.H
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,18 @@ namespace Rates
k_C12_C12_to_n_Mg23 = 2,
k_C12_C12_to_p_Na23 = 3,
k_He4_C12_to_O16 = 4,
<<<<<<< HEAD
k_n_to_p_weak_wc12 = 5,
k_Na23_to_Ne23 = 6,
k_Ne23_to_Na23 = 7,
NumRates = k_Ne23_to_Na23
>>>>>>> development
=======
k_Na23_to_Ne23 = 5,
k_Ne23_to_Na23 = 6,
k_n_to_p = 7,
k_p_to_n = 8,
NumRates = k_p_to_n
>>>>>>> development
};

Expand Down Expand Up @@ -74,9 +82,16 @@ namespace Rates
"C12_C12_to_n_Mg23", // 2,
"C12_C12_to_p_Na23", // 3,
"He4_C12_to_O16", // 4,
<<<<<<< HEAD
"n_to_p_weak_wc12", // 5,
"Na23_to_Ne23", // 6,
"Ne23_to_Na23" // 7,
>>>>>>> development
=======
"Na23_to_Ne23", // 5,
"Ne23_to_Na23", // 6,
"n_to_p", // 7,
"p_to_n" // 8,
>>>>>>> development
};

Expand Down
38 changes: 38 additions & 0 deletions networks/ignition_reaclib/URCA-simple/actual_rhs.H
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,22 @@ void evaluate_rates(const burn_t& state, T& rate_eval) {
rate_eval.enuc_weak += C::Legacy::n_A * Y(Ne23) * (edot_nu + edot_gamma);
>>>>>>> development

tabular_evaluate(j_n_p_meta, j_n_p_rhoy, j_n_p_temp, j_n_p_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_n_to_p) = rate;
if constexpr (std::is_same<T, rate_derivs_t>::value) {
rate_eval.dscreened_rates_dT(k_n_to_p) = drate_dt;
}
rate_eval.enuc_weak += C::Legacy::n_A * Y(N) * (edot_nu + edot_gamma);

tabular_evaluate(j_p_n_meta, j_p_n_rhoy, j_p_n_temp, j_p_n_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_p_to_n) = rate;
if constexpr (std::is_same<T, rate_derivs_t>::value) {
rate_eval.dscreened_rates_dT(k_p_to_n) = drate_dt;
}
rate_eval.enuc_weak += C::Legacy::n_A * Y(H1) * (edot_nu + edot_gamma);


}

Expand All @@ -194,6 +210,7 @@ void rhs_nuc(const burn_t& state,
using namespace Rates;

ydot_nuc(N) =
<<<<<<< HEAD
<<<<<<< HEAD
-screened_rates(k_n_to_p)*Y(N) +
screened_rates(k_p_to_n)*Y(H1) +
Expand All @@ -205,12 +222,21 @@ void rhs_nuc(const burn_t& state,
-screened_rates(k_p_to_n)*Y(H1);
=======
-screened_rates(k_n_to_p_weak_wc12)*Y(N) +
=======
-screened_rates(k_n_to_p)*Y(N) +
screened_rates(k_p_to_n)*Y(H1) +
>>>>>>> development
0.5*screened_rates(k_C12_C12_to_n_Mg23)*std::pow(Y(C12), 2)*state.rho;

ydot_nuc(H1) =
0.5*screened_rates(k_C12_C12_to_p_Na23)*std::pow(Y(C12), 2)*state.rho +
<<<<<<< HEAD
screened_rates(k_n_to_p_weak_wc12)*Y(N);
>>>>>>> development
=======
screened_rates(k_n_to_p)*Y(N) +
-screened_rates(k_p_to_n)*Y(H1);
>>>>>>> development

ydot_nuc(He4) =
0.5*screened_rates(k_C12_C12_to_He4_Ne20)*std::pow(Y(C12), 2)*state.rho +
Expand Down Expand Up @@ -299,25 +325,37 @@ void jac_nuc(const burn_t& state,
scratch = -screened_rates(k_n_to_p);
jac.set(N, N, scratch);

<<<<<<< HEAD
<<<<<<< HEAD
scratch = screened_rates(k_p_to_n);
jac.set(N, H1, scratch);

scratch = 1.0*screened_rates(k_c12_c12_to_n_mg23)*Y(C12)*state.rho;
=======
=======
scratch = screened_rates(k_p_to_n);
jac.set(N, H1, scratch);

>>>>>>> development
scratch = 1.0*screened_rates(k_C12_C12_to_n_Mg23)*Y(C12)*state.rho;
>>>>>>> development
jac.set(N, C12, scratch);

scratch = screened_rates(k_n_to_p);
jac.set(H1, N, scratch);

<<<<<<< HEAD
<<<<<<< HEAD
scratch = -screened_rates(k_p_to_n);
jac.set(H1, H1, scratch);

scratch = 1.0*screened_rates(k_c12_c12_to_p_na23)*Y(C12)*state.rho;
=======
=======
scratch = -screened_rates(k_p_to_n);
jac.set(H1, H1, scratch);

>>>>>>> development
scratch = 1.0*screened_rates(k_C12_C12_to_p_Na23)*Y(C12)*state.rho;
>>>>>>> development
jac.set(H1, C12, scratch);
Expand Down

0 comments on commit c9b02e3

Please sign in to comment.