From a9ebadaecc378953745a02a27e72dd4b301bd6ce Mon Sep 17 00:00:00 2001 From: agnelson Date: Mon, 9 Nov 2020 15:59:23 -0600 Subject: [PATCH] Fixing comments per the review by @paulromano --- openmc/mgxs/library.py | 18 +++++++++--------- openmc/mgxs/mgxs.py | 11 +++++------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/openmc/mgxs/library.py b/openmc/mgxs/library.py index 0d8373592..5c7072033 100644 --- a/openmc/mgxs/library.py +++ b/openmc/mgxs/library.py @@ -946,10 +946,10 @@ class Library: apply_domain_chi : bool This parameter sets whether (True) or not (False) the domain-averaged values of chi, chi-prompt, and chi-delayed are to - be applied to each of the nuclidic fission energy spectra of a - domain. In effect, if this is True, then every nuclide in the + be applied to each of the nuclide-dependent fission energy spectra + of a domain. In effect, if this is True, then every nuclide in the domain receives the same flux-weighted Chi. This is useful for - downstream multigroup solvers that pre-compute a material-specific + downstream multigroup solvers that precompute a material-specific chi before the transport solve provides group-wise fluxes. Defaults to False. @@ -1242,10 +1242,10 @@ class Library: apply_domain_chi : bool This parameter sets whether (True) or not (False) the domain-averaged values of chi, chi-prompt, and chi-delayed are to - be applied to each of the nuclidic fission energy spectra of a - domain. In effect, if this is True, then every nuclide in the + be applied to each of the nuclide-dependent fission energy spectra + of a domain. In effect, if this is True, then every nuclide in the domain receives the same flux-weighted Chi. This is useful for - downstream multigroup solvers that pre-compute a material-specific + downstream multigroup solvers that precompute a material-specific chi before the transport solve provides group-wise fluxes. Defaults to False. @@ -1354,10 +1354,10 @@ class Library: apply_domain_chi : bool This parameter sets whether (True) or not (False) the domain-averaged values of chi, chi-prompt, and chi-delayed are to - be applied to each of the nuclidic fission energy spectra of a - domain. In effect, if this is True, then every nuclide in the + be applied to each of the nuclide-dependent fission energy spectra + of a domain. In effect, if this is True, then every nuclide in the domain receives the same flux-weighted Chi. This is useful for - downstream multigroup solvers that pre-compute a material-specific + downstream multigroup solvers that precompute a material-specific chi before the transport solve provides group-wise fluxes. Defaults to False. diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index ef6c3de1c..0f1bf56a1 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -47,8 +47,8 @@ MGXS_TYPES = ( # support and test (like inelastic levels), remoev those from consideration _BAD_SCORES = ["(n,misc)", "(n,absorption)", "(n,total)", "fission"] _BAD_SCORES += [REACTION_NAME[mt] for mt in FISSION_MTS] -ARBITRARY_VECTOR_TYPES = [k for k in REACTION_MT.keys() if k not in _BAD_SCORES] -ARBITRARY_VECTOR_TYPES = tuple(ARBITRARY_VECTOR_TYPES) +ARBITRARY_VECTOR_TYPES = tuple(k for k in REACTION_MT.keys() + if k not in _BAD_SCORES) ARBITRARY_MATRIX_TYPES = [] for rxn in ARBITRARY_VECTOR_TYPES: # Preclude the fission channels from being treated as a matrix @@ -1237,12 +1237,11 @@ class MGXS: # Determine which flux to obtain # Step through in order of usefulness - tally = None for key in ['flux', 'flux (tracklength)', 'flux (analog)']: if key in self.tally_keys: tally = self.tallies[key] break - if tally is None: + else: msg = "MGXS of Type {} do not have an explicit weighting flux!" raise ValueError(msg.format(self.__name__)) @@ -4021,7 +4020,7 @@ class ArbitraryXS(MGXS): \sigma_X (r, E) \psi (r, E, \Omega)}{\int_{r \in V} dr \int_{4\pi} d\Omega \int_{E_g}^{E_{g-1}} dE \; \psi (r, E, \Omega)} - where :math:`_\sigma_X` is the requested reaction type of interest. + where :math:`\sigma_X` is the requested reaction type of interest. Parameters ---------- @@ -4152,7 +4151,7 @@ class ArbitraryMatrixXS(MatrixMGXS): g} \phi \rangle}{\langle \phi \rangle} \end{aligned} - where :math:`_\sigma_X` is the requested reaction type of interest. + where :math:`\sigma_X` is the requested reaction type of interest. Parameters ----------