diff --git a/openmc/cell.py b/openmc/cell.py index 2ff1d5fcd..feba18da5 100644 --- a/openmc/cell.py +++ b/openmc/cell.py @@ -193,7 +193,7 @@ class Cell(IDManagerMixin): def atoms(self): if self._atoms is None: if self._volume is None: - msg = ('Cannot calculate atom content becouse no volume ' + msg = ('Cannot calculate atom content because no volume ' 'is set. Use Cell.volume to provide it or perform ' 'a stochastic volume calculation.') raise ValueError(msg) @@ -350,7 +350,7 @@ class Cell(IDManagerMixin): self._volume = volume # Info about atom content can now be invalid - # (sice volume has just changed) + # (since volume has just changed) self._atoms = None def add_volume_information(self, volume_calc): diff --git a/openmc/cmfd.py b/openmc/cmfd.py index 080e558be..54c43f333 100644 --- a/openmc/cmfd.py +++ b/openmc/cmfd.py @@ -262,7 +262,7 @@ class CMFDRun: Attributes ---------- tally_begin : int - Batch number at which CMFD tallies should begin accummulating + Batch number at which CMFD tallies should begin accumulating solver_begin: int Batch number at which CMFD solver should start executing ref_d : list of floats @@ -271,13 +271,13 @@ class CMFDRun: Dictionary indicating which CMFD results to output. Note that CMFD k-effective will always be outputted. Acceptable keys are: - * "balance" - Whether to output RMS [%] of the resdiual from the + * "balance" - Whether to output RMS [%] of the residual from the neutron balance equation on CMFD tallies (bool) * "dominance" - Whether to output the estimated dominance ratio from the CMFD iterations (bool) * "entropy" - Whether to output the *entropy* of the CMFD predicted fission source (bool) - * "source" - Whether to ouput the RMS [%] between the OpenMC fission + * "source" - Whether to output the RMS [%] between the OpenMC fission source and CMFD fission source (bool) downscatter : bool @@ -315,7 +315,7 @@ class CMFDRun: adjoint_type : {'physical', 'math'} Stores type of adjoint calculation that should be performed. ``run_adjoint`` must be true for an adjoint calculation to be - perfomed. Options are: + performed. Options are: * "physical" - Create adjoint matrices from physical parameters of CMFD problem @@ -887,7 +887,7 @@ class CMFDRun: information. """ - # Finalize simuation + # Finalize simulation openmc.lib.simulation_finalize() if openmc.lib.master(): @@ -1431,7 +1431,7 @@ class CMFDRun: nx, ny, nz, ng = self._indices n = self._mat_dim - # Compute cmfd_src in a vecotorized manner by phi to the spatial + # Compute cmfd_src in a vectorized manner by phi to the spatial # indices of the actual problem so that cmfd_flux can be multiplied by # nfissxs diff --git a/openmc/element.py b/openmc/element.py index 0d37ab726..1473bd63e 100644 --- a/openmc/element.py +++ b/openmc/element.py @@ -54,8 +54,8 @@ class Element(str): percent_type : {'ao', 'wo'} 'ao' for atom percent and 'wo' for weight percent enrichment : float, optional - Enrichment of an enrichment_taget nuclide in percent (ao or wo). - If enrichment_taget is not supplied then it is enrichment for U235 + Enrichment of an enrichment_target nuclide in percent (ao or wo). + If enrichment_target is not supplied then it is enrichment for U235 in weight percent. For example, input 4.95 for 4.95 weight percent enriched U. Default is None (natural composition). enrichment_target: str, optional @@ -149,7 +149,7 @@ class Element(str): mutual_nuclides = sorted(list(mutual_nuclides)) absent_nuclides = sorted(list(absent_nuclides)) - # If all naturally ocurring isotopes are present in the library, + # If all naturally occurring isotopes are present in the library, # add them based on their abundance if len(absent_nuclides) == 0: for nuclide in mutual_nuclides: @@ -277,7 +277,7 @@ class Element(str): tail_fraction = 1.0 - enrichment / 100.0 # Enrich all nuclides - # Do bogus operation for enrichment target but overwrite immediatly + # Do bogus operation for enrichment target but overwrite immediately # to avoid if statement in the loop for nuclide, fraction in abundances.items(): abundances[nuclide] = tail_fraction * fraction / non_enriched diff --git a/openmc/filter.py b/openmc/filter.py index 65255bd3d..792e8e5cf 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -89,7 +89,7 @@ class Filter(IDManagerMixin, metaclass=FilterMeta): ---------- bins : Integral or Iterable of Integral or Iterable of Real The bins for the filter. This takes on different meaning for different - filters. See the docstrings for sublcasses of this filter or the online + filters. See the docstrings for subclasses of this filter or the online documentation for more details. filter_id : int Unique identifier for the filter @@ -177,7 +177,7 @@ class Filter(IDManagerMixin, metaclass=FilterMeta): filter_id = int(group.name.split('/')[-1].lstrip('filter ')) # If the HDF5 'type' variable matches this class's short_name, then - # there is no overriden from_hdf5 method. Pass the bins to __init__. + # there is no overridden from_hdf5 method. Pass the bins to __init__. if group['type'][()].decode() == cls.short_name.lower(): out = cls(group['bins'][()], filter_id=filter_id) out._num_bins = group['n_bins'][()] @@ -254,7 +254,7 @@ class Filter(IDManagerMixin, metaclass=FilterMeta): filter_type = elem.get('type') # If the filter type matches this class's short_name, then - # there is no overriden from_xml_element method + # there is no overridden from_xml_element method if filter_type == cls.short_name.lower(): # Get bins from element -- the default here works for any filters # that just store a list of bins that can be represented as integers @@ -438,7 +438,7 @@ class WithIDFilter(Filter): class UniverseFilter(WithIDFilter): - """Bins tally event locations based on the Universe they occured in. + """Bins tally event locations based on the Universe they occurred in. Parameters ---------- @@ -462,7 +462,7 @@ class UniverseFilter(WithIDFilter): class MaterialFilter(WithIDFilter): - """Bins tally event locations based on the Material they occured in. + """Bins tally event locations based on the Material they occurred in. Parameters ---------- @@ -486,7 +486,7 @@ class MaterialFilter(WithIDFilter): class CellFilter(WithIDFilter): - """Bins tally event locations based on the Cell they occured in. + """Bins tally event locations based on the Cell they occurred in. Parameters ---------- @@ -1945,7 +1945,7 @@ class EnergyFunctionFilter(Filter): raise ValueError('Only Tabulated1Ds with a single interpolation ' 'region are supported') if tab1d.interpolation[0] != 2: - raise ValueError('Only linear-linar Tabulated1Ds are supported') + raise ValueError('Only linear-linear Tabulated1Ds are supported') return cls(tab1d.x, tab1d.y) diff --git a/openmc/lattice.py b/openmc/lattice.py index 648b1438e..1c311fbb1 100644 --- a/openmc/lattice.py +++ b/openmc/lattice.py @@ -106,7 +106,7 @@ class Lattice(IDManagerMixin, ABC): elif lattice_type == 'hexagonal': return openmc.HexLattice.from_hdf5(group, universes) else: - raise ValueError(f'Unkown lattice type: {lattice_type}') + raise ValueError(f'Unknown lattice type: {lattice_type}') def get_unique_universes(self): """Determine all unique universes in the lattice @@ -1215,7 +1215,7 @@ class HexLattice(Lattice): for rings in self._universes: if len(rings) != self._num_rings: msg = 'HexLattice ID={0:d} has an inconsistent number of ' \ - 'rings per axial positon'.format(self._id) + 'rings per axial position'.format(self._id) raise ValueError(msg) else: diff --git a/openmc/material.py b/openmc/material.py index 015bad535..e5c3f8e4b 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -443,7 +443,7 @@ class Material(IDManagerMixin): # Generally speaking, the density for a macroscopic object will # be 1.0. Therefore, lets set density to 1.0 so that the user - # doesnt need to set it unless its needed. + # doesn't need to set it unless its needed. # Of course, if the user has already set a value of density, # then we will not override it. if self._density is None: @@ -482,8 +482,8 @@ class Material(IDManagerMixin): 'ao' for atom percent and 'wo' for weight percent. Defaults to atom percent. enrichment : float, optional - Enrichment of an enrichment_taget nuclide in percent (ao or wo). - If enrichment_taget is not supplied then it is enrichment for U235 + Enrichment of an enrichment_target nuclide in percent (ao or wo). + If enrichment_target is not supplied then it is enrichment for U235 in weight percent. For example, input 4.95 for 4.95 weight percent enriched U. Default is None (natural composition). @@ -625,7 +625,7 @@ class Material(IDManagerMixin): raise ValueError(msg) elif token not in ['(', ')', ''] and not token.isdigit(): msg = 'Formula must be made from a sequence of ' \ - 'element symbols, integers, and backets. ' \ + 'element symbols, integers, and brackets. ' \ '{} is not an allowable entry.'.format(token) raise ValueError(msg) diff --git a/openmc/mesh.py b/openmc/mesh.py index 4c973352b..1f17dbae2 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -144,7 +144,7 @@ class RegularMesh(MeshBase): The lower-left corner of the structured mesh. If only two coordinate are given, it is assumed that the mesh is an x-y mesh. upper_right : Iterable of float - The upper-right corner of the structrued mesh. If only two coordinate + The upper-right corner of the structured mesh. If only two coordinate are given, it is assumed that the mesh is an x-y mesh. width : Iterable of float The width of mesh cells in each direction. diff --git a/openmc/mgxs_library.py b/openmc/mgxs_library.py index d7d4b6f2f..67ad151cc 100644 --- a/openmc/mgxs_library.py +++ b/openmc/mgxs_library.py @@ -477,7 +477,7 @@ class XSdata: def add_temperature(self, temperature): """This method re-sizes the attributes of this XSdata object so that it - can accomodate an additional temperature. Note that the set_* methods + can accommodate an additional temperature. Note that the set_* methods will still need to be executed. Parameters diff --git a/openmc/plots.py b/openmc/plots.py index 6c5a5d437..a430a945e 100644 --- a/openmc/plots.py +++ b/openmc/plots.py @@ -220,7 +220,7 @@ class Plot(IDManagerMixin): mask_background : Iterable of int or str Color to apply to all cells/materials not listed in mask_components show_overlaps : bool - Inidicate whether or not overlapping regions are shown + Indicate whether or not overlapping regions are shown overlap_color : Iterable of int or str Color to apply to overlapping regions colors : dict @@ -565,9 +565,9 @@ class Plot(IDManagerMixin): seed : int The random number seed used to generate the color scheme alpha : float - The value between 0 and 1 to apply in alpha compisiting + The value between 0 and 1 to apply in alpha compositing background : 3-tuple of int or str - The background color to apply in alpha compisiting + The background color to apply in alpha compositing """ @@ -883,9 +883,9 @@ class Plots(cv.CheckedList): seed : int The random number seed used to generate the color scheme alpha : float - The value between 0 and 1 to apply in alpha compisiting + The value between 0 and 1 to apply in alpha compositing background : 3-tuple of int or str - The background color to apply in alpha compisiting + The background color to apply in alpha compositing """ diff --git a/openmc/plotter.py b/openmc/plotter.py index 576cb28fc..92acaf5bb 100644 --- a/openmc/plotter.py +++ b/openmc/plotter.py @@ -882,7 +882,7 @@ def _calculate_mgxs_elem_mat(this, types, library, orders=None, else: T = temperature - # Check to see if we have nuclides/elements or a macrocopic object + # Check to see if we have nuclides/elements or a macroscopic object if this._macroscopic is not None: # We have macroscopics nuclides = {this._macroscopic: (this._macroscopic, this.density)} diff --git a/openmc/polynomial.py b/openmc/polynomial.py index 718fc668c..1259c61ca 100644 --- a/openmc/polynomial.py +++ b/openmc/polynomial.py @@ -59,7 +59,7 @@ class ZernikeRadial(Polynomial): Domain of Zernike polynomials to be applied on. Default is 1. norm_coef : iterable of float The list of coefficients of each term in the polynomials after - normailization. + normalization. """ def __init__(self, coef, radius=1): @@ -106,7 +106,7 @@ class Zernike(Polynomial): Azimuthal of Zernike polynomial to be applied on. Default is 0. norm_coef : iterable of float The list of coefficients of each term in the polynomials after - normailization. + normalization. """ def __init__(self, coef, radius=1): super().__init__(coef) diff --git a/openmc/region.py b/openmc/region.py index cfdc3e81e..b252ff4a7 100644 --- a/openmc/region.py +++ b/openmc/region.py @@ -87,7 +87,7 @@ class Region(ABC): operators are union '|', intersection ' ', and complement '~'. For example, '(1 -2) | 3 ~(4 -5)'. surfaces : dict - Dictionary whose keys are suface IDs that appear in the Boolean + Dictionary whose keys are surface IDs that appear in the Boolean expression and whose values are Surface objects. """ @@ -104,7 +104,7 @@ class Region(ABC): while i < len(expression): if expression[i] in '()|~ ': # If special character appears immediately after a non-operator, - # create a token with the apporpriate half-space + # create a token with the appropriate half-space if i_start >= 0: j = int(expression[i_start:i]) if j < 0: diff --git a/openmc/settings.py b/openmc/settings.py index 18d1fa4d9..eb5761817 100644 --- a/openmc/settings.py +++ b/openmc/settings.py @@ -194,7 +194,7 @@ class Settings: batches specified via ``batches`` is interpreted as the minimum number of batches ufs_mesh : openmc.RegularMesh - Mesh to be used for redistributing source sites via the uniform fision + Mesh to be used for redistributing source sites via the uniform fission site (UFS) method. verbosity : int Verbosity during simulation between 1 and 10. Verbosity levels are diff --git a/openmc/surface.py b/openmc/surface.py index 4a174a23b..3c9d4bab5 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -255,7 +255,7 @@ class Surface(IDManagerMixin, ABC): if memo is None: memo = {} - # If no nemoize'd clone exists, instantiate one + # If no memoize'd clone exists, instantiate one if self not in memo: clone = deepcopy(self) clone.id = None @@ -1053,7 +1053,7 @@ class QuadricMixin: pivot = np.asarray(pivot) rotation = np.asarray(rotation, dtype=float) - # Allow rotaiton matrix to be passed in directly, otherwise build it + # Allow rotation matrix to be passed in directly, otherwise build it if rotation.ndim == 2: check_length('surface rotation', rotation.ravel(), 9) Rmat = rotation @@ -1746,7 +1746,7 @@ class Cone(QuadricMixin, Surface): # # (d*(r - p))^2 - (r - p)*(r - p)cos^2(theta) = 0 # - # where * is the dot product and the vector r is the evaulation point + # where * is the dot product and the vector r is the evaluation point # r = (x, y, z) # # The argument r2 for cones is actually tan^2(theta) so that diff --git a/openmc/tallies.py b/openmc/tallies.py index 6755e805d..3f8429b84 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -2977,7 +2977,7 @@ class Tally(IDManagerMixin): Returns ------- openmc.Tally - A new derived Tally with data diagaonalized along the new filter. + A new derived Tally with data diagonalized along the new filter. """ diff --git a/openmc/volume.py b/openmc/volume.py index 67f4b7abe..4b5d09c3d 100644 --- a/openmc/volume.py +++ b/openmc/volume.py @@ -56,7 +56,7 @@ class VolumeCalculation: volumes : dict Dictionary mapping unique IDs of domains to estimated volumes in cm^3. threshold : float - Threshold for the maxmimum standard deviation of volumes. + Threshold for the maximum standard deviation of volumes. .. versionadded:: 0.12 trigger_type : {'variance', 'std_dev', 'rel_err'} @@ -228,14 +228,14 @@ class VolumeCalculation: self._atoms = atoms def set_trigger(self, threshold, trigger_type): - """Set a trigger on the voulme calculation + """Set a trigger on the volume calculation .. versionadded:: 0.12 Parameters ---------- threshold : float - Threshold for the maxmimum standard deviation of volumes + Threshold for the maximum standard deviation of volumes trigger_type : {'variance', 'std_dev', 'rel_err'} Value type used to halt volume calculation """