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

[WIP[ Rename the various subch nets #1684

Closed
wants to merge 16 commits into from
Closed
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 removed networks/He-C-Fe-group/He-C-Fe-group.png
Binary file not shown.
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
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,55 +30,55 @@ 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 == O16) {
return 127.619296_rt;
return 127.6193154119992_rt;
}
else if constexpr (spec == Ne20) {
return 160.6448_rt;
return 160.64482384000075_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 == Fe52) {
return 447.697848_rt;
return 447.6996182639923_rt;
}
else if constexpr (spec == Ni56) {
return 483.995624_rt;
return 483.9956965919919_rt;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ void evaluate_rates(const burn_t& state, T& rate_eval) {

// Fill approximate rates

fill_approx_rates<do_T_derivatives, T>(tfactors, rate_eval);
fill_approx_rates<do_T_derivatives, T>(tfactors, state.rho, Y, rate_eval);

// Calculate tabular rates

Expand Down
Binary file added networks/he-burn/he-burn-18a/he-burn-18a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions networks/he-burn/he-burn-18a/he_burn_18a.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Network for He/C burning with key rates
# to bypass the C12(a,g)O16 rate.

import pynucastro as pyna
from pynucastro.networks import AmrexAstroCxxNetwork

import he_burn_core


DO_DERIVED_RATES = True


def doit():

subch = he_burn_core.get_core_library(include_n14_sequence=False,
include_zn=False,
do_detailed_balance=DO_DERIVED_RATES)

# these are the rates that we are going to allow to be optionally
# zeroed
r1 = subch.get_rate_by_name("c12(p,g)n13")
r2 = subch.get_rate_by_name("n13(he4,p)o16")

net = AmrexAstroCxxNetwork(libraries=[subch], symmetric_screening=False, disable_rate_params=[r1, r2])
net.make_ap_pg_approx(intermediate_nuclei=["cl35", "k39", "sc43", "v47", "mn51", "co55"])
net.remove_nuclei(["cl35", "k39", "sc43", "v47", "mn51", "co55"])

# finally, the aprox nets don't include the reverse rates for
# C12+C12, C12+O16, and O16+O16, so remove those

print(f"number of nuclei: {len(net.unique_nuclei)}")
print(f"number of rates: {len(net.rates)}")

comp = pyna.Composition(net.get_nuclei())
comp.set_all(0.1)
comp.set_nuc("he4", 0.95)
comp.normalize()

rho = 1.e6
T = 1.e9

net.plot(rho, T, comp, outfile="he-burn-18a.png",
rotated=True, hide_xalpha=True, curved_edges=True,
size=(1500, 450),
node_size=500, node_font_size=11, node_color="#337dff", node_shape="s",
Z_range=(1, 29))

net.write_network()


if __name__ == "__main__":
doit()
1 change: 1 addition & 0 deletions networks/he-burn/he-burn-18a/he_burn_core.py
Loading
Loading