Merge remote-tracking branch 'yardasol/prepare-0.13.1' into prepare-0.13.1

This commit is contained in:
Paul Romano 2022-08-16 21:58:43 -05:00
commit 409263b71f

View file

@ -272,15 +272,15 @@ class IndependentOperator(OpenMCOperator):
This class does not generate tallies, and instead stores cross sections
for each nuclide and transmutation reaction relevant for a depletion
calculation. The reaction rate is calculated by multiplying the flux by the
cross sections.
calculation. The reaction rate is calculated by multiplying the flux by
the cross sections.
Parameters
----------
op : openmc.deplete.IndependentOperator
Reference to the object encapsulate _IndependentRateHelper.
We pass this so we don't have to duplicate the :attr:`IndependentOperator.number` object.
We pass this so we don't have to duplicate the
:attr:`IndependentOperator.number` object.
Attributes
----------
@ -317,15 +317,14 @@ class IndependentOperator(OpenMCOperator):
"""
self._results_cache.fill(0.0)
volume = self._op.number.get_mat_volume(mat_id)
for i_nuc, i_react in product(nuc_index, react_index):
nuc = self.nuc_ind_map[i_nuc]
rxn = self.rxn_ind_map[i_react]
density = self._op.number.get_atom_density(mat_id, nuc)
# Sigma^j_i * V = sigma^j_i * rho * V
# Sigma^j_i * V = sigma^j_i * n_i * V = sigma^j_i * N_i
self._results_cache[i_nuc,i_react] = \
self._op.cross_sections[rxn][nuc] * density * volume
self._op.cross_sections[rxn][nuc] * \
self._op.number[mat_id, nuc]
return self._results_cache