Skip to content

Commit

Permalink
Add subch base network (#1393)
Browse files Browse the repository at this point in the history
This network is a further simplification of subch_simple by
excluding N14, F18, Ne21, and Na22.

These nuclei were added to include n14(a, g)f18(a, p)ne21 rate sequence,
which allows an enhancement to the c12(p, g)n13(a, p)o16 rate due to the
proton release. However, we find that the effect is not very significant,
and they also caused an artificial endpoint at Na22.
  • Loading branch information
zhichen3 authored Nov 22, 2023
1 parent e9e31f4 commit 4533640
Show file tree
Hide file tree
Showing 16 changed files with 8,217 additions and 2 deletions.
14 changes: 14 additions & 0 deletions networks/subch_base/Make.package
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CEXE_headers += network_properties.H

ifeq ($(USE_REACT),TRUE)
CEXE_sources += actual_network_data.cpp
CEXE_headers += actual_network.H
CEXE_headers += tfactors.H
CEXE_headers += partition_functions.H
CEXE_headers += actual_rhs.H
CEXE_headers += reaclib_rates.H
CEXE_headers += table_rates.H
CEXE_sources += table_rates_data.cpp
USE_SCREENING = TRUE
USE_NEUTRINOS = TRUE
endif
8 changes: 8 additions & 0 deletions networks/subch_base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# subch_base

This network is a further simplification of subch_simple by
excluding N14, F18, Ne21, and Na22.
These nuclei were added to include n14(a, g)f18(a, p)ne21 rate sequence,
which allows an enhancement to the c12(p, g)n13(a, p)o16 rate due to the
proton release. However, we find that the effect is not very significant,
and they also caused an artificial endpoint at Na22.
4 changes: 4 additions & 0 deletions networks/subch_base/_parameters
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@namespace: network

disable_p_C12_to_N13 int 0
disable_He4_N13_to_p_O16 int 0
233 changes: 233 additions & 0 deletions networks/subch_base/actual_network.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
#ifndef actual_network_H
#define actual_network_H

#include <AMReX_REAL.H>
#include <AMReX_Array.H>

#include <fundamental_constants.H>
#include <network_properties.H>

using namespace amrex;

void actual_network_init();

const std::string network_name = "pynucastro-cxx";

namespace network
{
extern AMREX_GPU_MANAGED amrex::Array1D<amrex::Real, 1, NumSpec> bion;
extern AMREX_GPU_MANAGED amrex::Array1D<amrex::Real, 1, NumSpec> mion;
}

namespace Rates
{

enum NetworkRates
{
k_p_C12_to_N13 = 1,
k_He4_C12_to_O16 = 2,
k_He4_O16_to_Ne20 = 3,
k_He4_Ne20_to_Mg24 = 4,
k_p_Na23_to_Mg24 = 5,
k_He4_Mg24_to_Si28 = 6,
k_p_Al27_to_Si28 = 7,
k_He4_Si28_to_S32 = 8,
k_p_P31_to_S32 = 9,
k_C12_C12_to_p_Na23 = 10,
k_C12_C12_to_He4_Ne20 = 11,
k_He4_N13_to_p_O16 = 12,
k_C12_O16_to_p_Al27 = 13,
k_C12_O16_to_He4_Mg24 = 14,
k_O16_O16_to_p_P31 = 15,
k_O16_O16_to_He4_Si28 = 16,
k_p_Na23_to_He4_Ne20 = 17,
k_p_Al27_to_He4_Mg24 = 18,
k_p_P31_to_He4_Si28 = 19,
k_He4_He4_He4_to_C12 = 20,
k_C12_C12_to_Mg24_modified = 21,
k_O16_O16_to_S32_modified = 22,
k_C12_O16_to_Si28_modified = 23,
k_He4_S32_to_Ar36_removed = 24,
k_p_Cl35_to_Ar36_removed = 25,
k_p_Cl35_to_He4_S32_removed = 26,
k_He4_Ar36_to_Ca40_removed = 27,
k_p_K39_to_Ca40_removed = 28,
k_p_K39_to_He4_Ar36_removed = 29,
k_He4_Ca40_to_Ti44_removed = 30,
k_p_Sc43_to_Ti44_removed = 31,
k_p_Sc43_to_He4_Ca40_removed = 32,
k_He4_Ti44_to_Cr48_removed = 33,
k_He4_Ti44_to_p_V47_removed = 34,
k_p_V47_to_Cr48_removed = 35,
k_He4_Cr48_to_Fe52_removed = 36,
k_He4_Cr48_to_p_Mn51_removed = 37,
k_p_Mn51_to_Fe52_removed = 38,
k_He4_Fe52_to_Ni56_removed = 39,
k_He4_Fe52_to_p_Co55_removed = 40,
k_p_Co55_to_Ni56_removed = 41,
k_S32_He4_to_Ar36_approx = 42,
k_Ar36_to_S32_He4_approx = 43,
k_Ar36_He4_to_Ca40_approx = 44,
k_Ca40_to_Ar36_He4_approx = 45,
k_Ca40_He4_to_Ti44_approx = 46,
k_Ti44_to_Ca40_He4_approx = 47,
k_Ti44_He4_to_Cr48_approx = 48,
k_Cr48_to_Ti44_He4_approx = 49,
k_Cr48_He4_to_Fe52_approx = 50,
k_Fe52_to_Cr48_He4_approx = 51,
k_Fe52_He4_to_Ni56_approx = 52,
k_Ni56_to_Fe52_He4_approx = 53,
k_N13_to_p_C12_derived = 54,
k_O16_to_He4_C12_derived = 55,
k_Ne20_to_He4_O16_derived = 56,
k_Mg24_to_p_Na23_derived = 57,
k_Mg24_to_He4_Ne20_derived = 58,
k_Si28_to_p_Al27_derived = 59,
k_Si28_to_He4_Mg24_derived = 60,
k_S32_to_p_P31_derived = 61,
k_S32_to_He4_Si28_derived = 62,
k_C12_to_He4_He4_He4_derived = 63,
k_p_O16_to_He4_N13_derived = 64,
k_He4_Ne20_to_p_Na23_derived = 65,
k_He4_Mg24_to_p_Al27_derived = 66,
k_He4_Si28_to_p_P31_derived = 67,
k_He4_S32_to_p_Cl35_derived_removed = 68,
k_Ar36_to_He4_S32_derived_removed = 69,
k_Ar36_to_p_Cl35_derived_removed = 70,
k_He4_Ar36_to_p_K39_derived_removed = 71,
k_Ca40_to_He4_Ar36_derived_removed = 72,
k_Ca40_to_p_K39_derived_removed = 73,
k_He4_Ca40_to_p_Sc43_derived_removed = 74,
k_Ti44_to_He4_Ca40_derived_removed = 75,
k_Ti44_to_p_Sc43_derived_removed = 76,
k_Cr48_to_He4_Ti44_derived_removed = 77,
k_Cr48_to_p_V47_derived_removed = 78,
k_p_V47_to_He4_Ti44_derived_removed = 79,
k_Fe52_to_He4_Cr48_derived_removed = 80,
k_Fe52_to_p_Mn51_derived_removed = 81,
k_p_Mn51_to_He4_Cr48_derived_removed = 82,
k_Ni56_to_He4_Fe52_derived_removed = 83,
k_Ni56_to_p_Co55_derived_removed = 84,
k_p_Co55_to_He4_Fe52_derived_removed = 85,
NumRates = k_p_Co55_to_He4_Fe52_derived_removed
};

// number of reaclib rates

const int NrateReaclib = 73;

// number of tabular rates

const int NrateTabular = 0;

// rate names -- note: the rates are 1-based, not zero-based, so we pad
// this vector with rate_names[0] = "" so the indices line up with the
// NetworkRates enum

static const std::vector<std::string> rate_names = {
"", // 0
"p_C12_to_N13", // 1,
"He4_C12_to_O16", // 2,
"He4_O16_to_Ne20", // 3,
"He4_Ne20_to_Mg24", // 4,
"p_Na23_to_Mg24", // 5,
"He4_Mg24_to_Si28", // 6,
"p_Al27_to_Si28", // 7,
"He4_Si28_to_S32", // 8,
"p_P31_to_S32", // 9,
"C12_C12_to_p_Na23", // 10,
"C12_C12_to_He4_Ne20", // 11,
"He4_N13_to_p_O16", // 12,
"C12_O16_to_p_Al27", // 13,
"C12_O16_to_He4_Mg24", // 14,
"O16_O16_to_p_P31", // 15,
"O16_O16_to_He4_Si28", // 16,
"p_Na23_to_He4_Ne20", // 17,
"p_Al27_to_He4_Mg24", // 18,
"p_P31_to_He4_Si28", // 19,
"He4_He4_He4_to_C12", // 20,
"C12_C12_to_Mg24_modified", // 21,
"O16_O16_to_S32_modified", // 22,
"C12_O16_to_Si28_modified", // 23,
"He4_S32_to_Ar36_removed", // 24,
"p_Cl35_to_Ar36_removed", // 25,
"p_Cl35_to_He4_S32_removed", // 26,
"He4_Ar36_to_Ca40_removed", // 27,
"p_K39_to_Ca40_removed", // 28,
"p_K39_to_He4_Ar36_removed", // 29,
"He4_Ca40_to_Ti44_removed", // 30,
"p_Sc43_to_Ti44_removed", // 31,
"p_Sc43_to_He4_Ca40_removed", // 32,
"He4_Ti44_to_Cr48_removed", // 33,
"He4_Ti44_to_p_V47_removed", // 34,
"p_V47_to_Cr48_removed", // 35,
"He4_Cr48_to_Fe52_removed", // 36,
"He4_Cr48_to_p_Mn51_removed", // 37,
"p_Mn51_to_Fe52_removed", // 38,
"He4_Fe52_to_Ni56_removed", // 39,
"He4_Fe52_to_p_Co55_removed", // 40,
"p_Co55_to_Ni56_removed", // 41,
"S32_He4_to_Ar36_approx", // 42,
"Ar36_to_S32_He4_approx", // 43,
"Ar36_He4_to_Ca40_approx", // 44,
"Ca40_to_Ar36_He4_approx", // 45,
"Ca40_He4_to_Ti44_approx", // 46,
"Ti44_to_Ca40_He4_approx", // 47,
"Ti44_He4_to_Cr48_approx", // 48,
"Cr48_to_Ti44_He4_approx", // 49,
"Cr48_He4_to_Fe52_approx", // 50,
"Fe52_to_Cr48_He4_approx", // 51,
"Fe52_He4_to_Ni56_approx", // 52,
"Ni56_to_Fe52_He4_approx", // 53,
"N13_to_p_C12_derived", // 54,
"O16_to_He4_C12_derived", // 55,
"Ne20_to_He4_O16_derived", // 56,
"Mg24_to_p_Na23_derived", // 57,
"Mg24_to_He4_Ne20_derived", // 58,
"Si28_to_p_Al27_derived", // 59,
"Si28_to_He4_Mg24_derived", // 60,
"S32_to_p_P31_derived", // 61,
"S32_to_He4_Si28_derived", // 62,
"C12_to_He4_He4_He4_derived", // 63,
"p_O16_to_He4_N13_derived", // 64,
"He4_Ne20_to_p_Na23_derived", // 65,
"He4_Mg24_to_p_Al27_derived", // 66,
"He4_Si28_to_p_P31_derived", // 67,
"He4_S32_to_p_Cl35_derived_removed", // 68,
"Ar36_to_He4_S32_derived_removed", // 69,
"Ar36_to_p_Cl35_derived_removed", // 70,
"He4_Ar36_to_p_K39_derived_removed", // 71,
"Ca40_to_He4_Ar36_derived_removed", // 72,
"Ca40_to_p_K39_derived_removed", // 73,
"He4_Ca40_to_p_Sc43_derived_removed", // 74,
"Ti44_to_He4_Ca40_derived_removed", // 75,
"Ti44_to_p_Sc43_derived_removed", // 76,
"Cr48_to_He4_Ti44_derived_removed", // 77,
"Cr48_to_p_V47_derived_removed", // 78,
"p_V47_to_He4_Ti44_derived_removed", // 79,
"Fe52_to_He4_Cr48_derived_removed", // 80,
"Fe52_to_p_Mn51_derived_removed", // 81,
"p_Mn51_to_He4_Cr48_derived_removed", // 82,
"Ni56_to_He4_Fe52_derived_removed", // 83,
"Ni56_to_p_Co55_derived_removed", // 84,
"p_Co55_to_He4_Fe52_derived_removed" // 85,
};

}

#ifdef NSE_NET
namespace NSE_INDEX
{
constexpr int H1_index = 0;
constexpr int N_index = -1;
constexpr int He4_index = 1;

// Each row corresponds to the rate in NetworkRates enum
// First 3 row indices for reactants, followed by 3 product indices
// last index is the corresponding reverse rate index.

extern AMREX_GPU_MANAGED amrex::Array2D<int, 1, Rates::NumRates, 1, 7, Order::C> rate_indices;
}
#endif

#endif
Loading

0 comments on commit 4533640

Please sign in to comment.