Skip to content

Commit e37d3f6

Browse files
committed
add the new net with n and proton approximations
1 parent a9f3f16 commit e37d3f6

File tree

6 files changed

+67
-133
lines changed

6 files changed

+67
-133
lines changed
Loading

networks/he-burn/he-burn-31anp/he-burn-31anp.py

-130
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import pynucastro as pyna
2+
from pynucastro.networks import AmrexAstroCxxNetwork
3+
4+
import he_burn_core
5+
6+
7+
DO_DERIVED_RATES = True
8+
9+
10+
def doit():
11+
12+
lib = he_burn_core.get_core_library(include_n14_sequence=True,
13+
include_zn=False,
14+
include_iron_peak=True,
15+
include_low_ye=False,
16+
do_detailed_balance=DO_DERIVED_RATES)
17+
18+
net = pyna.AmrexAstroCxxNetwork(libraries=[lib],
19+
symmetric_screening=False)
20+
21+
# now we approximate some (alpha, p)(p, gamma) links
22+
23+
net.make_ap_pg_approx(intermediate_nuclei=["cl35", "k39", "sc43", "v47"])
24+
net.remove_nuclei(["cl35", "k39", "sc43", "v47"])
25+
26+
net.make_nn_g_approx(intermediate_nuclei=["fe53", "fe55", "ni57"])
27+
net.remove_nuclei(["fe53", "fe55", "ni57"])
28+
29+
# make all rates with A >= 48 use NSE protons
30+
net.make_nse_protons(48)
31+
32+
print(f"number of nuclei = {len(net.unique_nuclei)}")
33+
print(f"number of ReacLib rates = {len(net.reaclib_rates)}")
34+
print(f"number of tabular rates = {len(net.tabular_rates)}")
35+
36+
# let's make a figure
37+
38+
comp = pyna.Composition(net.unique_nuclei)
39+
comp.set_equal()
40+
41+
rho = 9.e7
42+
T = 6.e9
43+
44+
fig = net.plot(rho, T, comp,
45+
rotated=True, curved_edges=True, hide_xalpha=True,
46+
size=(1800, 900),
47+
node_size=500, node_shape="s", node_color="#337dff", node_font_size=10)
48+
49+
fig.savefig("he-burn-31anp.png")
50+
51+
net.write_network()
52+
53+
54+
if __name__ == "__main__":
55+
doit()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../he_burn_core.py

networks/he-burn/he-burn-36a/he_burn_36a.py

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def doit():
1212
lib = he_burn_core.get_core_library(include_n14_sequence=True,
1313
include_zn=True,
1414
include_iron_peak=True,
15+
include_low_ye=True,
1516
do_detailed_balance=DO_DERIVED_RATES)
1617

1718
net = pyna.AmrexAstroCxxNetwork(libraries=[lib],

networks/he-burn/he_burn_core.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def get_core_library(*,
88
include_n14_sequence=False,
99
include_zn=False,
1010
include_iron_peak=False,
11+
include_low_ye=False,
1112
do_detailed_balance=False):
1213

1314
reaclib_lib = pyna.ReacLibLibrary()
@@ -71,11 +72,17 @@ def get_core_library(*,
7172
# ReacLib and weak / tabular rates linking these.
7273

7374
iron_peak = ["n", "p", "he4",
74-
"mn51", "mn55",
75+
"mn51",
7576
"fe52", "fe53", "fe54", "fe55", "fe56",
7677
"co55", "co56", "co57",
77-
"ni56", "ni57", "ni58",
78-
"cu59", "zn60"]
78+
"ni56", "ni57", "ni58"]
79+
80+
if include_zn:
81+
iron_peak += ["cu59", "zn60"]
82+
83+
if include_low_ye:
84+
iron_peak += ["mn55"]
85+
7986

8087
iron_reaclib = reaclib_lib.linking_nuclei(iron_peak)
8188

0 commit comments

Comments
 (0)