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

update self-consistent NSE SDC update with Tabular NSE #1569

Merged
merged 77 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
f495157
initial draft of RK2 update for consistent NSE sdc update
zhichen3 May 27, 2024
fd4876d
update
zhichen3 May 27, 2024
722cd5c
update compiler warnings
zhichen3 May 27, 2024
5f4958e
update tab issue
zhichen3 May 27, 2024
33294a7
more compiler warnings
zhichen3 May 27, 2024
2851e91
place y_e assignment after eos to avoid 0
zhichen3 May 27, 2024
eb59d35
initialize rho_dyedt to 0.0
zhichen3 May 28, 2024
b4708cb
update ye instead of rhoye
zhichen3 May 28, 2024
261bd1f
Merge branch 'development' into nse_sdc_update
zhichen3 Jun 5, 2024
c8f15ee
add advection terms for dyedt
zhichen3 Jun 5, 2024
c0ceb3a
new version that updates ye via Xn
zhichen3 Jun 7, 2024
8bdbbc1
fix redeclaration
zhichen3 Jun 7, 2024
cada9b0
fix variables
zhichen3 Jun 7, 2024
18a019d
morefix
zhichen3 Jun 7, 2024
28f144a
more fix
zhichen3 Jun 7, 2024
ff8614e
set up initial Temperature guess for eos
zhichen3 Jun 7, 2024
7b4d5ef
Merge branch 'nse_sdc_update' of github.com:zhichen3/Microphysics int…
zhichen3 Jun 10, 2024
e32809c
use rho_old to calculate mass fractions, which makes it more consistent
zhichen3 Jun 10, 2024
a7638a1
Merge branch 'nse_sdc_update' of github.com:zhichen3/Microphysics int…
zhichen3 Jun 11, 2024
74dcadc
change to update via ye and abar
zhichen3 Jun 13, 2024
0bdaaf0
Merge branch 'nse_sdc_update' of github.com:zhichen3/Microphysics int…
zhichen3 Jun 13, 2024
8b3300c
update with nse_eos
zhichen3 Jun 13, 2024
118c2ea
add missing brace
zhichen3 Jun 13, 2024
dbb4500
fix colon and initialization
zhichen3 Jun 13, 2024
ea49c2e
more fixes
zhichen3 Jun 13, 2024
bfe90c5
more fixes
zhichen3 Jun 13, 2024
3cdef18
initialize mu_p and mu_n
zhichen3 Jun 13, 2024
03b85a6
update mu_p and mu_n initialization
zhichen3 Jun 13, 2024
5328dd8
cleanup
zhichen3 Jun 14, 2024
7d0562d
fix unitialized variable
zhichen3 Jun 14, 2024
f315588
update dT to a smaller number
zhichen3 Jun 17, 2024
715af7e
use state.T as initial guess for EOS
zhichen3 Jun 17, 2024
9fc051a
change dabardT to central difference and rearrange osme terms in nse_…
zhichen3 Jun 17, 2024
0139a71
remove redundant print
zhichen3 Jun 17, 2024
74f9a8c
optimize some divsion
zhichen3 Jun 19, 2024
5acc534
precompute some factor
zhichen3 Jun 20, 2024
655acc4
Merge branch 'development' into nse_sdc_update
zhichen3 Jun 21, 2024
c4de4d2
Merge branch 'development' into nse_sdc_update
zhichen3 Jun 22, 2024
9c2c31f
Merge branch 'development' into nse_sdc_update
zhichen3 Jun 25, 2024
3ef7845
smaller dT
zhichen3 Jul 8, 2024
31c2a04
fix codespell
zhichen3 Jul 8, 2024
3a20e44
Merge branch 'development' into nse_sdc_update
zingale Jul 9, 2024
efe69f1
update rhoX for nse solver when doing sdc
zhichen3 Jul 9, 2024
ffebad4
update y if use sdc
zhichen3 Jul 9, 2024
3256404
convert to rhoX and discard strang
zhichen3 Jul 9, 2024
b2011bf
update unit_test
zhichen3 Jul 9, 2024
6ad5d9c
Missing comma
zhichen3 Jul 9, 2024
f4d2c36
fix fcn
zhichen3 Jul 9, 2024
983af20
update benchmakr
zhichen3 Jul 9, 2024
11a946a
update benchmakr and initial guess for make_table
zhichen3 Jul 9, 2024
ab6b283
update benchmark
zhichen3 Jul 9, 2024
5fd2369
Merge branch 'nse_sdc_update' of github.com:zhichen3/Microphysics int…
zhichen3 Jul 9, 2024
3fb01d6
Merge branch 'development' into nse_sdc_update
zhichen3 Jul 9, 2024
965642e
add _rt
zhichen3 Jul 9, 2024
5ef0c0a
Merge branch 'update_rhoX_nse_net' into nse_sdc_update
zhichen3 Jul 9, 2024
431ad46
work with xn during nse calculations, but also store rhoX in the end
zhichen3 Jul 9, 2024
2f1cd9d
Merge branch 'update_rhoX_nse_net' into nse_sdc_update
zhichen3 Jul 9, 2024
75851b9
update using precomputed y[SFS+n]
zhichen3 Jul 9, 2024
8840b17
change initial guess to avoid overflow
zhichen3 Jul 9, 2024
75e01c3
update benchmark
zhichen3 Jul 9, 2024
582be6e
Merge branch 'update_rhoX_nse_net' into nse_sdc_update
zhichen3 Jul 9, 2024
067c1b6
update all network to have get_ydot_weak
zhichen3 Jul 10, 2024
343212f
update network to reflect autodiff
zhichen3 Jul 10, 2024
ff97596
Revert "update network to reflect autodiff"
zhichen3 Jul 10, 2024
44fb51d
Revert "update all network to have get_ydot_weak"
zhichen3 Jul 10, 2024
33f3e81
update rhs only
zhichen3 Jul 10, 2024
af757d3
fix unused parameter warning
zhichen3 Jul 10, 2024
8cbf948
fix uninitialized error
zhichen3 Jul 10, 2024
61bd766
update rhs
zhichen3 Jul 10, 2024
60356be
add space
zhichen3 Jul 10, 2024
3b22613
revert png
zhichen3 Jul 10, 2024
5b85c2b
Merge branch 'development' into nse_sdc_update
zhichen3 Jul 11, 2024
41d26c8
Merge branch 'development' into nse_sdc_update
zhichen3 Jul 12, 2024
4f9b5d4
revert back to using 5-point stencil method for dabardT and lower tol…
zhichen3 Jul 13, 2024
8fc0224
revert nse_solver
zhichen3 Jul 13, 2024
de16afe
remove comment
zhichen3 Jul 13, 2024
c430959
remove redundant codes that have being commented out
zhichen3 Jul 14, 2024
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
363 changes: 234 additions & 129 deletions integration/nse_update_sdc.H

Large diffs are not rendered by default.

80 changes: 78 additions & 2 deletions networks/CNO_extras/actual_rhs.H
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,87 @@ void evaluate_rates(const burn_t& state, T& rate_eval) {

[[maybe_unused]] amrex::Real rate, drate_dt, edot_nu, edot_gamma;

rate_eval.enuc_weak = 0.0;
rate_eval.enuc_weak = 0.0_rt;


}

#ifdef NSE_NET
AMREX_GPU_HOST_DEVICE AMREX_INLINE
void get_ydot_weak(const burn_t& state,
amrex::Array1D<amrex::Real, 1, neqs>& ydot_nuc,
amrex::Real& enuc_weak,
[[maybe_unused]] const amrex::Array1D<amrex::Real, 1, NumSpec>& Y) {
///
/// Calculate Ydots contribute only from weak reactions.
/// This is used to calculate dyedt and energy generation from
/// weak reactions for self-consistent NSE
///


// initialize ydot_nuc to 0

for (int i = 1; i <= neqs; ++i) {
ydot_nuc(i) = 0.0_rt;
}

rate_t rate_eval;

[[maybe_unused]] amrex::Real rate, drate_dt, edot_nu, edot_gamma;
[[maybe_unused]] amrex::Real rhoy = state.rho * state.y_e;

rate_eval.enuc_weak = 0.0_rt;

// Calculate tabular rates and get ydot_weak


ydot_nuc(H1) = 0.0_rt;

ydot_nuc(He4) = 0.0_rt;

ydot_nuc(C12) = 0.0_rt;

ydot_nuc(C13) = 0.0_rt;

ydot_nuc(N13) = 0.0_rt;

ydot_nuc(N14) = 0.0_rt;

ydot_nuc(N15) = 0.0_rt;

ydot_nuc(O14) = 0.0_rt;

ydot_nuc(O15) = 0.0_rt;

ydot_nuc(O16) = 0.0_rt;

ydot_nuc(O17) = 0.0_rt;

ydot_nuc(O18) = 0.0_rt;

ydot_nuc(F17) = 0.0_rt;

ydot_nuc(F18) = 0.0_rt;

ydot_nuc(F19) = 0.0_rt;

ydot_nuc(Ne18) = 0.0_rt;

ydot_nuc(Ne19) = 0.0_rt;

ydot_nuc(Ne20) = 0.0_rt;

ydot_nuc(Mg22) = 0.0_rt;

ydot_nuc(Mg24) = 0.0_rt;

ydot_nuc(Fe56) = 0.0_rt;

enuc_weak = rate_eval.enuc_weak;
}
#endif


AMREX_GPU_HOST_DEVICE AMREX_INLINE
void rhs_nuc(const burn_t& state,
amrex::Array1D<amrex::Real, 1, neqs>& ydot_nuc,
Expand Down Expand Up @@ -858,7 +934,7 @@ void rhs_nuc(const burn_t& state,
(screened_rates(k_He4_Ne20_to_Mg24)*Y(He4)*Y(Ne20)*state.rho + -screened_rates(k_Mg24_to_He4_Ne20)*Y(Mg24)) +
(screened_rates(k_C12_O16_to_He4_Mg24)*Y(C12)*Y(O16)*state.rho + -screened_rates(k_He4_Mg24_to_C12_O16)*Y(He4)*Y(Mg24)*state.rho);

ydot_nuc(Fe56) = 0.0;
ydot_nuc(Fe56) = 0.0_rt;

}

Expand Down
83 changes: 82 additions & 1 deletion networks/ECSN/actual_rhs.H
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ void evaluate_rates(const burn_t& state, T& rate_eval) {

[[maybe_unused]] amrex::Real rate, drate_dt, edot_nu, edot_gamma;

rate_eval.enuc_weak = 0.0;
rate_eval.enuc_weak = 0.0_rt;

tabular_evaluate(j_F20_O20_meta, j_F20_O20_rhoy, j_F20_O20_temp, j_F20_O20_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
Expand Down Expand Up @@ -312,6 +312,87 @@ void evaluate_rates(const burn_t& state, T& rate_eval) {

}

#ifdef NSE_NET
AMREX_GPU_HOST_DEVICE AMREX_INLINE
void get_ydot_weak(const burn_t& state,
amrex::Array1D<amrex::Real, 1, neqs>& ydot_nuc,
amrex::Real& enuc_weak,
[[maybe_unused]] const amrex::Array1D<amrex::Real, 1, NumSpec>& Y) {
///
/// Calculate Ydots contribute only from weak reactions.
/// This is used to calculate dyedt and energy generation from
/// weak reactions for self-consistent NSE
///


// initialize ydot_nuc to 0

for (int i = 1; i <= neqs; ++i) {
ydot_nuc(i) = 0.0_rt;
}

rate_t rate_eval;

[[maybe_unused]] amrex::Real rate, drate_dt, edot_nu, edot_gamma;
[[maybe_unused]] amrex::Real rhoy = state.rho * state.y_e;

rate_eval.enuc_weak = 0.0_rt;

// Calculate tabular rates and get ydot_weak

tabular_evaluate(j_F20_O20_meta, j_F20_O20_rhoy, j_F20_O20_temp, j_F20_O20_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_F20_to_O20) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(F20) * (edot_nu + edot_gamma);

tabular_evaluate(j_Ne20_F20_meta, j_Ne20_F20_rhoy, j_Ne20_F20_temp, j_Ne20_F20_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Ne20_to_F20) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Ne20) * (edot_nu + edot_gamma);

tabular_evaluate(j_O20_F20_meta, j_O20_F20_rhoy, j_O20_F20_temp, j_O20_F20_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_O20_to_F20) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(O20) * (edot_nu + edot_gamma);

tabular_evaluate(j_F20_Ne20_meta, j_F20_Ne20_rhoy, j_F20_Ne20_temp, j_F20_Ne20_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_F20_to_Ne20) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(F20) * (edot_nu + edot_gamma);

auto screened_rates = rate_eval.screened_rates;

ydot_nuc(H1) = 0.0_rt;

ydot_nuc(He4) = 0.0_rt;

ydot_nuc(O16) = 0.0_rt;

ydot_nuc(O20) =
(-screened_rates(k_O20_to_F20)*Y(O20) + screened_rates(k_F20_to_O20)*Y(F20));

ydot_nuc(F20) =
(screened_rates(k_O20_to_F20)*Y(O20) + -screened_rates(k_F20_to_O20)*Y(F20)) +
(-screened_rates(k_F20_to_Ne20)*Y(F20) + screened_rates(k_Ne20_to_F20)*Y(Ne20));

ydot_nuc(Ne20) =
(screened_rates(k_F20_to_Ne20)*Y(F20) + -screened_rates(k_Ne20_to_F20)*Y(Ne20));

ydot_nuc(Mg24) = 0.0_rt;

ydot_nuc(Al27) = 0.0_rt;

ydot_nuc(Si28) = 0.0_rt;

ydot_nuc(P31) = 0.0_rt;

ydot_nuc(S32) = 0.0_rt;

enuc_weak = rate_eval.enuc_weak;
}
#endif


AMREX_GPU_HOST_DEVICE AMREX_INLINE
void rhs_nuc(const burn_t& state,
amrex::Array1D<amrex::Real, 1, neqs>& ydot_nuc,
Expand Down
183 changes: 182 additions & 1 deletion networks/He-C-Fe-group/actual_rhs.H
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ void evaluate_rates(const burn_t& state, T& rate_eval) {

[[maybe_unused]] amrex::Real rate, drate_dt, edot_nu, edot_gamma;

rate_eval.enuc_weak = 0.0;
rate_eval.enuc_weak = 0.0_rt;

tabular_evaluate(j_Co55_Fe55_meta, j_Co55_Fe55_rhoy, j_Co55_Fe55_temp, j_Co55_Fe55_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
Expand Down Expand Up @@ -1377,6 +1377,187 @@ void evaluate_rates(const burn_t& state, T& rate_eval) {

}

#ifdef NSE_NET
AMREX_GPU_HOST_DEVICE AMREX_INLINE
void get_ydot_weak(const burn_t& state,
amrex::Array1D<amrex::Real, 1, neqs>& ydot_nuc,
amrex::Real& enuc_weak,
[[maybe_unused]] const amrex::Array1D<amrex::Real, 1, NumSpec>& Y) {
///
/// Calculate Ydots contribute only from weak reactions.
/// This is used to calculate dyedt and energy generation from
/// weak reactions for self-consistent NSE
///


// initialize ydot_nuc to 0

for (int i = 1; i <= neqs; ++i) {
ydot_nuc(i) = 0.0_rt;
}

rate_t rate_eval;

[[maybe_unused]] amrex::Real rate, drate_dt, edot_nu, edot_gamma;
[[maybe_unused]] amrex::Real rhoy = state.rho * state.y_e;

rate_eval.enuc_weak = 0.0_rt;

// Calculate tabular rates and get ydot_weak

tabular_evaluate(j_Co55_Fe55_meta, j_Co55_Fe55_rhoy, j_Co55_Fe55_temp, j_Co55_Fe55_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Co55_to_Fe55) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Co55) * (edot_nu + edot_gamma);

tabular_evaluate(j_Co56_Fe56_meta, j_Co56_Fe56_rhoy, j_Co56_Fe56_temp, j_Co56_Fe56_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Co56_to_Fe56) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Co56) * (edot_nu + edot_gamma);

tabular_evaluate(j_Co56_Ni56_meta, j_Co56_Ni56_rhoy, j_Co56_Ni56_temp, j_Co56_Ni56_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Co56_to_Ni56) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Co56) * (edot_nu + edot_gamma);

tabular_evaluate(j_Co57_Ni57_meta, j_Co57_Ni57_rhoy, j_Co57_Ni57_temp, j_Co57_Ni57_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Co57_to_Ni57) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Co57) * (edot_nu + edot_gamma);

tabular_evaluate(j_Fe55_Co55_meta, j_Fe55_Co55_rhoy, j_Fe55_Co55_temp, j_Fe55_Co55_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Fe55_to_Co55) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Fe55) * (edot_nu + edot_gamma);

tabular_evaluate(j_Fe55_Mn55_meta, j_Fe55_Mn55_rhoy, j_Fe55_Mn55_temp, j_Fe55_Mn55_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Fe55_to_Mn55) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Fe55) * (edot_nu + edot_gamma);

tabular_evaluate(j_Fe56_Co56_meta, j_Fe56_Co56_rhoy, j_Fe56_Co56_temp, j_Fe56_Co56_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Fe56_to_Co56) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Fe56) * (edot_nu + edot_gamma);

tabular_evaluate(j_Mn55_Fe55_meta, j_Mn55_Fe55_rhoy, j_Mn55_Fe55_temp, j_Mn55_Fe55_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Mn55_to_Fe55) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Mn55) * (edot_nu + edot_gamma);

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;
rate_eval.enuc_weak += C::Legacy::n_A * Y(N) * (edot_nu + edot_gamma);

tabular_evaluate(j_Ni56_Co56_meta, j_Ni56_Co56_rhoy, j_Ni56_Co56_temp, j_Ni56_Co56_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Ni56_to_Co56) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Ni56) * (edot_nu + edot_gamma);

tabular_evaluate(j_Ni57_Co57_meta, j_Ni57_Co57_rhoy, j_Ni57_Co57_temp, j_Ni57_Co57_data,
rhoy, state.T, rate, drate_dt, edot_nu, edot_gamma);
rate_eval.screened_rates(k_Ni57_to_Co57) = rate;
rate_eval.enuc_weak += C::Legacy::n_A * Y(Ni57) * (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;
rate_eval.enuc_weak += C::Legacy::n_A * Y(H1) * (edot_nu + edot_gamma);

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);

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

ydot_nuc(He4) = 0.0_rt;

ydot_nuc(C12) = 0.0_rt;

ydot_nuc(N13) = 0.0_rt;

ydot_nuc(N14) = 0.0_rt;

ydot_nuc(O16) = 0.0_rt;

ydot_nuc(F18) = 0.0_rt;

ydot_nuc(Ne20) = 0.0_rt;

ydot_nuc(Ne21) = 0.0_rt;

ydot_nuc(Na22) = 0.0_rt;

ydot_nuc(Na23) = 0.0_rt;

ydot_nuc(Mg24) = 0.0_rt;

ydot_nuc(Al27) = 0.0_rt;

ydot_nuc(Si28) = 0.0_rt;

ydot_nuc(P31) = 0.0_rt;

ydot_nuc(S32) = 0.0_rt;

ydot_nuc(Ar36) = 0.0_rt;

ydot_nuc(Ca40) = 0.0_rt;

ydot_nuc(Ti44) = 0.0_rt;

ydot_nuc(Cr48) = 0.0_rt;

ydot_nuc(Mn51) = 0.0_rt;

ydot_nuc(Mn55) =
(screened_rates(k_Fe55_to_Mn55)*Y(Fe55) + -screened_rates(k_Mn55_to_Fe55)*Y(Mn55));

ydot_nuc(Fe52) = 0.0_rt;

ydot_nuc(Fe53) = 0.0_rt;

ydot_nuc(Fe54) = 0.0_rt;

ydot_nuc(Fe55) =
(screened_rates(k_Co55_to_Fe55)*Y(Co55) + -screened_rates(k_Fe55_to_Co55)*Y(Fe55)) +
(-screened_rates(k_Fe55_to_Mn55)*Y(Fe55) + screened_rates(k_Mn55_to_Fe55)*Y(Mn55));

ydot_nuc(Fe56) =
(screened_rates(k_Co56_to_Fe56)*Y(Co56) + -screened_rates(k_Fe56_to_Co56)*Y(Fe56));

ydot_nuc(Co55) =
(-screened_rates(k_Co55_to_Fe55)*Y(Co55) + screened_rates(k_Fe55_to_Co55)*Y(Fe55));

ydot_nuc(Co56) =
(-screened_rates(k_Co56_to_Fe56)*Y(Co56) + screened_rates(k_Fe56_to_Co56)*Y(Fe56)) +
(screened_rates(k_Ni56_to_Co56)*Y(Ni56) + -screened_rates(k_Co56_to_Ni56)*Y(Co56));

ydot_nuc(Co57) =
(screened_rates(k_Ni57_to_Co57)*Y(Ni57) + -screened_rates(k_Co57_to_Ni57)*Y(Co57));

ydot_nuc(Ni56) =
(-screened_rates(k_Ni56_to_Co56)*Y(Ni56) + screened_rates(k_Co56_to_Ni56)*Y(Co56));

ydot_nuc(Ni57) =
(-screened_rates(k_Ni57_to_Co57)*Y(Ni57) + screened_rates(k_Co57_to_Ni57)*Y(Co57));

ydot_nuc(Ni58) = 0.0_rt;

ydot_nuc(Cu59) = 0.0_rt;

ydot_nuc(Zn60) = 0.0_rt;

enuc_weak = rate_eval.enuc_weak;
}
#endif


AMREX_GPU_HOST_DEVICE AMREX_INLINE
void rhs_nuc(const burn_t& state,
amrex::Array1D<amrex::Real, 1, neqs>& ydot_nuc,
Expand Down
Loading
Loading