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 of Nucleus 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 a RateCollection and Composition and produces an interactive visualization that can be explored in Jupyter notebooks.

  • NSENetwork : this extends the RateCollection to allow for solving for the nuclear statistical equilibrium state of a collection of nuclei.

  • NumpyNetwork : this extends the RateCollection 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 the RateCollection to enable output of python code that can be used with ODE integrators to solve a network.

  • BaseCxxNetwork : this extends the RateCollection 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 the RateCollection 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 the RateCollection 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 around SimpleCxxNetwork 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 a Library.

with some specialized library collections available as:

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#

Submodules#