pynucastro package#
pynucastro is a python library that allows for the creation and interactive exploration of nuclear reaction networks for astrophysical environments. It has methods for selecting rates from various sources, approximating rates, solving for nuclear statistical equilibrium, and exporting networks for simulation codes.
Several different submodules provide the data structures needed to interpret rates and build networks.
constants
#
constants
provides the physical
constants used throughout pynucastro.
eos
#
eos
provides core routines needed to build
an equation of state describing stellar matter.
networks
#
networks
provides classes and
functions for organizing collection of rates, including:
Composition
: this is a container ofNucleus
objects along with associated mass fractions. This is used for evaluating rates when doing interactive exploration with pynucastro.RateCollection
: this is a collection of nuclei and the reaction rates that link them together. It serves as the most basic network and provides methods to evaluate and visualize the rates and more.Explorer
: this an explorer takes aRateCollection
andComposition
and produces an interactive visualization that can be explored in Jupyter notebooks.NSENetwork
: this extends theRateCollection
to allow for solving for the nuclear statistical equilibrium state of a collection of nuclei.NumpyNetwork
: this extends theRateCollection
to allow evaluating reaction rates using vectorized NumPy arrays, which may be more efficient for some applications.
and the network classes intended for outputting the righthand side of the ODE system for use in python or other applications:
PythonNetwork
: this extends theRateCollection
to enable output of python code that can be used with ODE integrators to solve a network.BaseCxxNetwork
: this extends theRateCollection
to enable output of C++ code. It is not intended to be used directly, but rather serves as the base class for the other C++ network types.AmrexAstroCxxNetwork
: this extends theRateCollection
to enable output of C++ code that can be used to add a network to the hydrodynamics codes Castro and MAESTROeX via the AMReX-Astro Microphysics repository.SimpleCxxNetwork
: this extends theRateCollection
to enable output of basic C++ code that can be as the starting point for incorporating a pynucastro network into a non-AMReX simulation code.FortranNetwork
: this is a set of wrappers aroundSimpleCxxNetwork
that provide a Fortran interface.
neutrino_cooling
#
neutrino_cooling
provides
functions for modeling thermal neutrino losses (photo-, plasma-,
pair-, and Bremsstralung neutrinos). Included are:
NeutrinoCooling
: a simply wrapper class that allows for the visualization of the neutrino cooling terms.
nucdata
#
nucdata
provides nuclear properties.
While there are a large number of classes here, most interaction
is done through Nucleus
.
The nuclear data is derived from the Atomic Mass Evaluations
2020
rates
#
rates
provides classes and functions for interpreting individual
reaction rates. The main core rate classes are:
Rate
: the base class for all rates.ReacLibRate
: a temperature-depended rate from the ReacLib library, including methods to visualize and evaluate it.TabularRate
: a tabulated (temperature and electron density) weak reaction rate), with methods to visualize and evaluate it.Tfactors
: a container class that holds common temperature factors.
and collections of rates are a library, described in the following classes:
Library
: a container that stores multiple rates and allows for filtering based on a set of rules.RateFilter
: a class implementing search constraints to look up a desired rate or group of rates from aLibrary
.
with some specialized library collections available as:
ReacLibLibrary
: read in the entire collection of ReacLib rates.TabularLibrary
: read in all known tabular reaction rates.
reduction
#
reduction
provides tools for directed
relation graph with error propagation reduction of reaction networks.
screening
#
screening
provides electron screening
routines for modifying the reaction rates.
Subpackages#
- pynucastro.constants package
- pynucastro.eos package
- pynucastro.networks package
- Submodules
- pynucastro.networks.amrexastro_cxx_network module
- pynucastro.networks.base_cxx_network module
- pynucastro.networks.fortran_network module
- pynucastro.networks.helper module
- pynucastro.networks.nse_network module
- pynucastro.networks.numpy_network module
- pynucastro.networks.python_network module
- pynucastro.networks.rate_collection module
- pynucastro.networks.simple_cxx_network module
- pynucastro.networks.sympy_network_support module
- Submodules
- pynucastro.neutrino_cooling package
- pynucastro.nucdata package
- pynucastro.rates package
load_rate()
- Submodules
- pynucastro.rates.alternate_rates module
- pynucastro.rates.approximate_rates module
- pynucastro.rates.derived_rate module
- pynucastro.rates.files module
- pynucastro.rates.known_duplicates module
- pynucastro.rates.library module
- pynucastro.rates.modified_rate module
- pynucastro.rates.rate module
- pynucastro.rates.reaclib_rate module
- pynucastro.rates.tabular_rate module
- pynucastro.reduction package
- pynucastro.screening package