Skip to content

Commit

Permalink
add the new net with n and proton approximations
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Dec 11, 2024
1 parent a9f3f16 commit e37d3f6
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 133 deletions.
Binary file added networks/he-burn/he-burn-31anp/he-burn-31anp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 0 additions & 130 deletions networks/he-burn/he-burn-31anp/he-burn-31anp.py

This file was deleted.

55 changes: 55 additions & 0 deletions networks/he-burn/he-burn-31anp/he_burn_31anp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import pynucastro as pyna
from pynucastro.networks import AmrexAstroCxxNetwork

import he_burn_core


DO_DERIVED_RATES = True


def doit():

lib = he_burn_core.get_core_library(include_n14_sequence=True,
include_zn=False,
include_iron_peak=True,
include_low_ye=False,
do_detailed_balance=DO_DERIVED_RATES)

net = pyna.AmrexAstroCxxNetwork(libraries=[lib],
symmetric_screening=False)

# now we approximate some (alpha, p)(p, gamma) links

net.make_ap_pg_approx(intermediate_nuclei=["cl35", "k39", "sc43", "v47"])
net.remove_nuclei(["cl35", "k39", "sc43", "v47"])

net.make_nn_g_approx(intermediate_nuclei=["fe53", "fe55", "ni57"])
net.remove_nuclei(["fe53", "fe55", "ni57"])

# make all rates with A >= 48 use NSE protons
net.make_nse_protons(48)

print(f"number of nuclei = {len(net.unique_nuclei)}")
print(f"number of ReacLib rates = {len(net.reaclib_rates)}")
print(f"number of tabular rates = {len(net.tabular_rates)}")

# let's make a figure

comp = pyna.Composition(net.unique_nuclei)
comp.set_equal()

rho = 9.e7
T = 6.e9

fig = net.plot(rho, T, comp,
rotated=True, curved_edges=True, hide_xalpha=True,
size=(1800, 900),
node_size=500, node_shape="s", node_color="#337dff", node_font_size=10)

fig.savefig("he-burn-31anp.png")

net.write_network()


if __name__ == "__main__":
doit()
1 change: 1 addition & 0 deletions networks/he-burn/he-burn-31anp/he_burn_core.py
1 change: 1 addition & 0 deletions networks/he-burn/he-burn-36a/he_burn_36a.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def doit():
lib = he_burn_core.get_core_library(include_n14_sequence=True,
include_zn=True,
include_iron_peak=True,
include_low_ye=True,
do_detailed_balance=DO_DERIVED_RATES)

net = pyna.AmrexAstroCxxNetwork(libraries=[lib],
Expand Down
13 changes: 10 additions & 3 deletions networks/he-burn/he_burn_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def get_core_library(*,
include_n14_sequence=False,
include_zn=False,
include_iron_peak=False,
include_low_ye=False,
do_detailed_balance=False):

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

iron_peak = ["n", "p", "he4",
"mn51", "mn55",
"mn51",
"fe52", "fe53", "fe54", "fe55", "fe56",
"co55", "co56", "co57",
"ni56", "ni57", "ni58",
"cu59", "zn60"]
"ni56", "ni57", "ni58"]

if include_zn:
iron_peak += ["cu59", "zn60"]

if include_low_ye:
iron_peak += ["mn55"]


iron_reaclib = reaclib_lib.linking_nuclei(iron_peak)

Expand Down

0 comments on commit e37d3f6

Please sign in to comment.