mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Add documentation of collapse_rate functions
This commit is contained in:
parent
fba5f0cb9c
commit
b7df2d95e1
3 changed files with 31 additions and 1 deletions
|
|
@ -58,6 +58,12 @@ public:
|
|||
//! from probability tables.
|
||||
void calculate_urr_xs(int i_temp, Particle& p) const;
|
||||
|
||||
//! \brief Calculate reaction rate based on group-wise flux distribution
|
||||
//
|
||||
//! \param[in] MT ENDF MT value for desired reaction
|
||||
//! \param[in] energy Energy group boundaries in [eV]
|
||||
//! \param[in] flux Flux in each energy group (not normalized per eV)
|
||||
//! \return Reaction rate
|
||||
double collapse_rate(int MT, gsl::span<const double> energy, gsl::span<const double> flux) const;
|
||||
|
||||
// Data members
|
||||
|
|
|
|||
|
|
@ -27,7 +27,14 @@ public:
|
|||
//! \param[in] temperatures Desired temperatures for cross sections
|
||||
explicit Reaction(hid_t group, const std::vector<int>& temperatures);
|
||||
|
||||
double collapse_rate(gsl::span<const double> energy, gsl::span<const double> flux, const std::vector<double>& grid) const;
|
||||
//! \brief Calculate reaction rate based on group-wise flux distribution
|
||||
//
|
||||
//! \param[in] energy Energy group boundaries in [eV]
|
||||
//! \param[in] flux Flux in each energy group (not normalized per eV)
|
||||
//! \param[in] grid Nuclide energy grid
|
||||
//! \return Reaction rate
|
||||
double collapse_rate(gsl::span<const double> energy, gsl::span<const double> flux,
|
||||
const std::vector<double>& grid) const;
|
||||
|
||||
//! Cross section at a single temperature
|
||||
struct TemperatureXS {
|
||||
|
|
|
|||
|
|
@ -78,6 +78,23 @@ class Nuclide(_FortranObject):
|
|||
return name.value.decode()
|
||||
|
||||
def collapse_rate(self, MT, energy, flux):
|
||||
"""Calculate reaction rate based on group-wise flux distribution
|
||||
|
||||
Parameters
|
||||
----------
|
||||
MT : int
|
||||
ENDF MT value of the desired reaction
|
||||
energy : iterable of float
|
||||
Energy group boundaries in [eV]
|
||||
flux : iterable of float
|
||||
Flux in each energt group (not normalized per eV)
|
||||
|
||||
Returns
|
||||
-------
|
||||
float
|
||||
Reaction rate
|
||||
|
||||
"""
|
||||
energy = np.asarray(energy, dtype=float)
|
||||
flux = np.asarray(flux, dtype=float)
|
||||
xs = c_double()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue