From 1e57cb84074c4d35500fcb9f027b203a20a546de Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 26 Apr 2016 07:08:03 -0500 Subject: [PATCH] Respond to @wbinventor comments on #632 --- examples/python/basic/build-xml.py | 4 +- examples/python/boxes/build-xml.py | 8 +- .../python/lattice/hexagonal/build-xml.py | 10 +- examples/python/lattice/nested/build-xml.py | 6 +- examples/python/lattice/simple/build-xml.py | 8 +- examples/python/pincell/build-xml.py | 6 +- .../python/pincell_multigroup/build-xml.py | 6 +- examples/python/reflective/build-xml.py | 4 +- openmc/executor.py | 5 +- openmc/material.py | 4 +- openmc/mgxs/library.py | 2 +- openmc/mgxs_library.py | 2 +- openmc/plots.py | 4 +- openmc/surface.py | 211 +++++++++--------- openmc/tallies.py | 4 +- 15 files changed, 146 insertions(+), 138 deletions(-) diff --git a/examples/python/basic/build-xml.py b/examples/python/basic/build-xml.py index 19737cf91..05accbc5e 100644 --- a/examples/python/basic/build-xml.py +++ b/examples/python/basic/build-xml.py @@ -74,7 +74,7 @@ cell1.fill = universe1 universe1.add_cells([cell2, cell3]) root.add_cells([cell1, cell4]) -# Instantiate a Geometry and register the root Universe, and export to XML +# Instantiate a Geometry, register the root Universe, and export to XML geometry = openmc.Geometry() geometry.root_universe = root geometry.export_to_xml() @@ -124,7 +124,7 @@ third_tally = openmc.Tally(tally_id=3, name='third tally') third_tally.filters = [cell_filter, energy_filter, energyout_filter] third_tally.scores = ['scatter', 'nu-scatter', 'nu-fission'] -# Instantiate a Tallies object, register all Tallies, and export to XML +# Instantiate a Tallies collection, register all Tallies, and export to XML tallies_file = openmc.Tallies() tallies_file.add_tally(first_tally) tallies_file.add_tally(second_tally) diff --git a/examples/python/boxes/build-xml.py b/examples/python/boxes/build-xml.py index 196a10ca7..318af2265 100644 --- a/examples/python/boxes/build-xml.py +++ b/examples/python/boxes/build-xml.py @@ -36,7 +36,7 @@ moderator.add_nuclide(h1, 2.) moderator.add_nuclide(o16, 1.) moderator.add_s_alpha_beta('HH2O', '71t') -# Instantiate a Materials object, register all Materials, and export to XML +# Instantiate a Materials collection, register all Materials, and export to XML materials_file = openmc.Materials() materials_file.default_xs = '71c' materials_file.add_materials([fuel1, fuel2, moderator]) @@ -97,7 +97,7 @@ outer_box.fill = moderator root = openmc.Universe(universe_id=0, name='root universe') root.add_cells([inner_box, middle_box, outer_box]) -# Instantiate a Geometry and register the root Universe, and export to XML +# Instantiate a Geometry, register the root Universe, and export to XML geometry = openmc.Geometry() geometry.root_universe = root geometry.export_to_xml() @@ -107,7 +107,7 @@ geometry.export_to_xml() # Exporting to OpenMC settings.xml File ############################################################################### -# Instantiate a SettingsFile, set all runtime parameters, and export to XML +# Instantiate a Settings object, set all runtime parameters, and export to XML settings_file = openmc.Settings() settings_file.batches = batches settings_file.inactive = inactive @@ -129,7 +129,7 @@ plot.width = [20, 20] plot.pixels = [200, 200] plot.color = 'cell' -# Instantiate a Plots object, add Plot, and export to XML +# Instantiate a Plots collection, add Plot, and export to XML plot_file = openmc.Plots() plot_file.add_plot(plot) plot_file.export_to_xml() diff --git a/examples/python/lattice/hexagonal/build-xml.py b/examples/python/lattice/hexagonal/build-xml.py index a9d7f6899..04002faf2 100644 --- a/examples/python/lattice/hexagonal/build-xml.py +++ b/examples/python/lattice/hexagonal/build-xml.py @@ -35,7 +35,7 @@ iron = openmc.Material(material_id=3, name='iron') iron.set_density('g/cc', 7.9) iron.add_nuclide(fe56, 1.) -# Instantiate a Materials object, register all Materials, and export to XML +# Instantiate a Materials collection, register all Materials, and export to XML materials_file = openmc.Materials() materials_file.default_xs = '71c' materials_file.add_materials([moderator, fuel, iron]) @@ -105,7 +105,7 @@ lattice.outer = univ2 # Fill Cell with the Lattice cell1.fill = lattice -# Instantiate a Geometry and register the root Universe, and export to XML +# Instantiate a Geometry, register the root Universe, and export to XML geometry = openmc.Geometry() geometry.root_universe = root geometry.export_to_xml() @@ -115,7 +115,7 @@ geometry.export_to_xml() # Exporting to OpenMC settings.xml file ############################################################################### -# Instantiate a SettingsFile, set all runtime parameters, and export to XML +# Instantiate a Settings object, set all runtime parameters, and export to XML settings_file = openmc.Settings() settings_file.batches = batches settings_file.inactive = inactive @@ -151,7 +151,7 @@ plot_yz.width = [8, 8] plot_yz.pixels = [400, 400] plot_yz.color = 'mat' -# Instantiate a Plots object, add plots, and export to XML +# Instantiate a Plots collection, add plots, and export to XML plot_file = openmc.Plots() plot_file.add_plot(plot_xy) plot_file.add_plot(plot_yz) @@ -167,7 +167,7 @@ tally = openmc.Tally(tally_id=1) tally.filters = [openmc.Filter(type='distribcell', bins=[cell2.id])] tally.scores = ['total'] -# Instantiate a Tallies object, register Tally/Mesh, and export to XML +# Instantiate a Tallies collection, register Tally/Mesh, and export to XML tallies_file = openmc.Tallies() tallies_file.add_tally(tally) tallies_file.export_to_xml() diff --git a/examples/python/lattice/nested/build-xml.py b/examples/python/lattice/nested/build-xml.py index eb16c8327..0e4e459e2 100644 --- a/examples/python/lattice/nested/build-xml.py +++ b/examples/python/lattice/nested/build-xml.py @@ -30,7 +30,7 @@ moderator.add_nuclide(h1, 2.) moderator.add_nuclide(o16, 1.) moderator.add_s_alpha_beta('HH2O', '71t') -# Instantiate a Materials object, register all Materials, and export to XML +# Instantiate a Materials collection, register all Materials, and export to XML materials_file = openmc.Materials() materials_file.default_xs = '71c' materials_file.add_materials([moderator, fuel]) @@ -116,7 +116,7 @@ lattice2.universes = [[univ4, univ4], cell1.fill = lattice2 cell2.fill = lattice1 -# Instantiate a Geometry and register the root Universe, and export to XML +# Instantiate a Geometry, register the root Universe, and export to XML geometry = openmc.Geometry() geometry.root_universe = root geometry.export_to_xml() @@ -176,7 +176,7 @@ tally = openmc.Tally(tally_id=1) tally.filters = [mesh_filter] tally.scores = ['total'] -# Instantiate a Tallies object, register Tally/Mesh, and export to XML +# Instantiate a Tallies collection, register Tally/Mesh, and export to XML tallies_file = openmc.Tallies() tallies_file.add_mesh(mesh) tallies_file.add_tally(tally) diff --git a/examples/python/lattice/simple/build-xml.py b/examples/python/lattice/simple/build-xml.py index 6e44e4da0..8d9481aaa 100644 --- a/examples/python/lattice/simple/build-xml.py +++ b/examples/python/lattice/simple/build-xml.py @@ -30,7 +30,7 @@ moderator.add_nuclide(h1, 2.) moderator.add_nuclide(o16, 1.) moderator.add_s_alpha_beta('HH2O', '71t') -# Instantiate a Materials object, register all Materials, and export to XML +# Instantiate a Materials collection, register all Materials, and export to XML materials_file = openmc.Materials() materials_file.default_xs = '71c' materials_file.add_materials([moderator, fuel]) @@ -106,7 +106,7 @@ lattice.universes = [[univ1, univ2, univ1, univ2], # Fill Cell with the Lattice cell1.fill = lattice -# Instantiate a Geometry and register the root Universe, and export to XML +# Instantiate a Geometry, register the root Universe, and export to XML geometry = openmc.Geometry() geometry.root_universe = root geometry.export_to_xml() @@ -142,7 +142,7 @@ plot.width = [4, 4] plot.pixels = [400, 400] plot.color = 'mat' -# Instantiate a Plots object, add Plot, and export to XML +# Instantiate a Plots collection, add Plot, and export to XML plot_file = openmc.Plots() plot_file.add_plot(plot) plot_file.export_to_xml() @@ -173,7 +173,7 @@ tally.filters = [mesh_filter] tally.scores = ['total'] tally.triggers = [trigger] -# Instantiate a Tallies object, register Tally/Mesh, and export to XML +# Instantiate a Tallies collection, register Tally/Mesh, and export to XML tallies_file = openmc.Tallies() tallies_file.add_mesh(mesh) tallies_file.add_tally(tally) diff --git a/examples/python/pincell/build-xml.py b/examples/python/pincell/build-xml.py index 10cd4944d..561df2b5a 100644 --- a/examples/python/pincell/build-xml.py +++ b/examples/python/pincell/build-xml.py @@ -100,7 +100,7 @@ borated_water.add_nuclide(o16, 2.4672e-2) borated_water.add_nuclide(o17, 6.0099e-5) borated_water.add_s_alpha_beta('HH2O', '71t') -# Instantiate a Materials object, register all Materials, and export to XML +# Instantiate a Materials collection, register all Materials, and export to XML materials_file = openmc.Materials() materials_file.default_xs = '71c' materials_file.add_materials([uo2, helium, zircaloy, borated_water]) @@ -149,7 +149,7 @@ root = openmc.Universe(universe_id=0, name='root universe') # Register Cells with Universe root.add_cells([fuel, gap, clad, water]) -# Instantiate a Geometry and register the root Universe, and export to XML +# Instantiate a Geometry, register the root Universe, and export to XML geometry = openmc.Geometry() geometry.root_universe = root geometry.export_to_xml() @@ -197,7 +197,7 @@ tally = openmc.Tally(tally_id=1, name='tally 1') tally.filters = [energy_filter, mesh_filter] tally.scores = ['flux', 'fission', 'nu-fission'] -# Instantiate a Tallies object, register all Tallies, and export to XML +# Instantiate a Tallies collection, register all Tallies, and export to XML tallies_file = openmc.Tallies() tallies_file.add_mesh(mesh) tallies_file.add_tally(tally) diff --git a/examples/python/pincell_multigroup/build-xml.py b/examples/python/pincell_multigroup/build-xml.py index 233728142..697a596d9 100644 --- a/examples/python/pincell_multigroup/build-xml.py +++ b/examples/python/pincell_multigroup/build-xml.py @@ -81,7 +81,7 @@ water = openmc.Material(material_id=2, name='Water') water.set_density('macro', 1.0) water.add_macroscopic(h2o_data) -# Instantiate a Materials object, register all Materials, and export to XML +# Instantiate a Materials collection, register all Materials, and export to XML materials_file = openmc.Materials() materials_file.default_xs = '300K' materials_file.add_materials([uo2, water]) @@ -122,7 +122,7 @@ root = openmc.Universe(universe_id=0, name='root universe') # Register Cells with Universe root.add_cells([fuel, moderator]) -# Instantiate a Geometry and register the root Universe, and export to XML +# Instantiate a Geometry, register the root Universe, and export to XML geometry = openmc.Geometry() geometry.root_universe = root geometry.export_to_xml() @@ -173,7 +173,7 @@ tally.add_score('flux') tally.add_score('fission') tally.add_score('nu-fission') -# Instantiate a Tallies object, register all Tallies, and export to XML +# Instantiate a Tallies collection, register all Tallies, and export to XML tallies_file = openmc.Tallies() tallies_file.add_mesh(mesh) tallies_file.add_tally(tally) diff --git a/examples/python/reflective/build-xml.py b/examples/python/reflective/build-xml.py index 7d96e296d..e4776e744 100644 --- a/examples/python/reflective/build-xml.py +++ b/examples/python/reflective/build-xml.py @@ -23,7 +23,7 @@ fuel = openmc.Material(material_id=1, name='fuel') fuel.set_density('g/cc', 4.5) fuel.add_nuclide(u235, 1.) -# Instantiate a Materials object, register Material, and export to XML +# Instantiate a Materials collection, register Material, and export to XML materials_file = openmc.Materials() materials_file.default_xs = '71c' materials_file.add_material(fuel) @@ -64,7 +64,7 @@ root = openmc.Universe(universe_id=0, name='root universe') # Register Cell with Universe root.add_cell(cell) -# Instantiate a Geometry and register the root Universe, and export to XML +# Instantiate a Geometry, register the root Universe, and export to XML geometry = openmc.Geometry() geometry.root_universe = root geometry.export_to_xml() diff --git a/openmc/executor.py b/openmc/executor.py index 9bb3477c5..edbbaddc4 100644 --- a/openmc/executor.py +++ b/openmc/executor.py @@ -54,7 +54,10 @@ def run(particles=None, threads=None, geometry_debug=False, particles : int, optional Number of particles to simulate per generation. threads : int, optional - Number of OpenMP threads. + Number of OpenMP threads. If OpenMC is compiled with OpenMP threading + enabled, the default is implementation-dependent but is usually equal to + the number of hardware threads available (or a value set by the + OMP_NUM_THREADS environment variable). geometry_debug : bool, optional Turn on geometry debugging during simulation. Defaults to False. restart_file : str, optional diff --git a/openmc/material.py b/openmc/material.py index 6b0a0f246..c6030a8e6 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -643,8 +643,8 @@ class Material(object): class Materials(object): - """Materials used for an OpenMC simulation. Corresponds directly to the - materials.xml input file. + """Collection of Materials used for an OpenMC simulation. Corresponds directly + to the materials.xml input file. Attributes ---------- diff --git a/openmc/mgxs/library.py b/openmc/mgxs/library.py index ca7bf39cd..8d5e9854e 100644 --- a/openmc/mgxs/library.py +++ b/openmc/mgxs/library.py @@ -355,7 +355,7 @@ class Library(object): Parameters ---------- tallies_file : openmc.Tallies - A Tallies object to add each MGXS' tallies to generate a + A Tallies collection to add each MGXS' tallies to generate a "tallies.xml" input file for OpenMC merge : bool Indicate whether tallies should be merged when possible. Defaults diff --git a/openmc/mgxs_library.py b/openmc/mgxs_library.py index 8db3c84ff..d3e49b238 100644 --- a/openmc/mgxs_library.py +++ b/openmc/mgxs_library.py @@ -705,7 +705,7 @@ class MGXSLibrary(object): # Make sure energy groups match. if xsdata.energy_groups != self._energy_groups: - msg = 'Energy groups of XSdata do not match that of MGXSLibrary!' + msg = 'Energy groups of XSdata do not match that of MGXSLibrary.' raise ValueError(msg) self._xsdatas.append(xsdata) diff --git a/openmc/plots.py b/openmc/plots.py index ae34678bb..a967cb060 100644 --- a/openmc/plots.py +++ b/openmc/plots.py @@ -402,8 +402,8 @@ class Plot(object): class Plots(object): - """Plots file used for an OpenMC simulation. Corresponds directly to the - plots.xml input file. + """Collection of Plots used for an OpenMC simulation. Corresponds directly to + the plots.xml input file. """ diff --git a/openmc/surface.py b/openmc/surface.py index c6f3f2cd0..37e7c2ffd 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -23,7 +23,11 @@ def reset_auto_surface_id(): class Surface(object): - """A two-dimensional surface with an associated boundary condition. + """An implicit surface with an associated boundary condition. + + An implicit surface is defined as the set of zeros of a function of the + three Cartesian coordinates. Surfaces in OpenMC are limited to a set of + algebraic surfaces, i.e., surfaces that are polynomial in x, y, and z. Parameters ---------- @@ -43,14 +47,14 @@ class Surface(object): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -63,7 +67,7 @@ class Surface(object): # A dictionary of the quadratic surface coefficients # Key - coefficeint name # Value - coefficient value - self._coeffs = {} + self._coefficients = {} # An ordered list of the coefficient names to export to XML in the # proper order @@ -82,12 +86,13 @@ class Surface(object): string += '{0: <16}{1}{2}\n'.format('\tType', '=\t', self._type) string += '{0: <16}{1}{2}\n'.format('\tBoundary', '=\t', self._boundary_type) - coeffs = '{0: <16}'.format('\tCoefficients') + '\n' + coefficients = '{0: <16}'.format('\tCoefficients') + '\n' - for coeff in self._coeffs: - coeffs += '{0: <16}{1}{2}\n'.format(coeff, '=\t', self._coeffs[coeff]) + for coeff in self._coefficients: + coefficients += '{0: <16}{1}{2}\n'.format( + coeff, '=\t', self._coefficients[coeff]) - string += coeffs + string += coefficients return string @@ -108,8 +113,8 @@ class Surface(object): return self._boundary_type @property - def coeffs(self): - return self._coeffs + def coefficients(self): + return self._coefficients @id.setter def id(self, surface_id): @@ -173,7 +178,7 @@ class Surface(object): element.set("type", self._type) if self.boundary_type != 'transmission': element.set("boundary", self.boundary_type) - element.set("coeffs", ' '.join([str(self._coeffs.setdefault(key, 0.0)) + element.set("coeffs", ' '.join([str(self._coefficients.setdefault(key, 0.0)) for key in self._coeff_keys])) return element @@ -215,14 +220,14 @@ class Plane(Surface): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -239,39 +244,39 @@ class Plane(Surface): @property def a(self): - return self.coeffs['A'] + return self.coefficients['A'] @property def b(self): - return self.coeffs['B'] + return self.coefficients['B'] @property def c(self): - return self.coeffs['C'] + return self.coefficients['C'] @property def d(self): - return self.coeffs['D'] + return self.coefficients['D'] @a.setter def a(self, A): check_type('A coefficient', A, Real) - self._coeffs['A'] = A + self._coefficients['A'] = A @b.setter def b(self, B): check_type('B coefficient', B, Real) - self._coeffs['B'] = B + self._coefficients['B'] = B @c.setter def c(self, C): check_type('C coefficient', C, Real) - self._coeffs['C'] = C + self._coefficients['C'] = C @d.setter def d(self, D): check_type('D coefficient', D, Real) - self._coeffs['D'] = D + self._coefficients['D'] = D class XPlane(Plane): @@ -298,14 +303,14 @@ class XPlane(Plane): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -319,12 +324,12 @@ class XPlane(Plane): @property def x0(self): - return self.coeffs['x0'] + return self.coefficients['x0'] @x0.setter def x0(self, x0): check_type('x0 coefficient', x0, Real) - self._coeffs['x0'] = x0 + self._coefficients['x0'] = x0 def bounding_box(self, side): """Determine an axis-aligned bounding box. @@ -382,14 +387,14 @@ class YPlane(Plane): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -404,12 +409,12 @@ class YPlane(Plane): @property def y0(self): - return self.coeffs['y0'] + return self.coefficients['y0'] @y0.setter def y0(self, y0): check_type('y0 coefficient', y0, Real) - self._coeffs['y0'] = y0 + self._coefficients['y0'] = y0 def bounding_box(self, side): """Determine an axis-aligned bounding box. @@ -467,14 +472,14 @@ class ZPlane(Plane): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -489,12 +494,12 @@ class ZPlane(Plane): @property def z0(self): - return self.coeffs['z0'] + return self.coefficients['z0'] @z0.setter def z0(self, z0): check_type('z0 coefficient', z0, Real) - self._coeffs['z0'] = z0 + self._coefficients['z0'] = z0 def bounding_box(self, side): """Determine an axis-aligned bounding box. @@ -553,14 +558,14 @@ class Cylinder(Surface): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -575,12 +580,12 @@ class Cylinder(Surface): @property def r(self): - return self.coeffs['R'] + return self.coefficients['R'] @r.setter def r(self, R): check_type('R coefficient', R, Real) - self._coeffs['R'] = R + self._coefficients['R'] = R class XCylinder(Cylinder): @@ -615,14 +620,14 @@ class XCylinder(Cylinder): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -637,21 +642,21 @@ class XCylinder(Cylinder): @property def y0(self): - return self.coeffs['y0'] + return self.coefficients['y0'] @property def z0(self): - return self.coeffs['z0'] + return self.coefficients['z0'] @y0.setter def y0(self, y0): check_type('y0 coefficient', y0, Real) - self._coeffs['y0'] = y0 + self._coefficients['y0'] = y0 @z0.setter def z0(self, z0): check_type('z0 coefficient', z0, Real) - self._coeffs['z0'] = z0 + self._coefficients['z0'] = z0 def bounding_box(self, side): """Determine an axis-aligned bounding box. @@ -718,14 +723,14 @@ class YCylinder(Cylinder): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -740,21 +745,21 @@ class YCylinder(Cylinder): @property def x0(self): - return self.coeffs['x0'] + return self.coefficients['x0'] @property def z0(self): - return self.coeffs['z0'] + return self.coefficients['z0'] @x0.setter def x0(self, x0): check_type('x0 coefficient', x0, Real) - self._coeffs['x0'] = x0 + self._coefficients['x0'] = x0 @z0.setter def z0(self, z0): check_type('z0 coefficient', z0, Real) - self._coeffs['z0'] = z0 + self._coefficients['z0'] = z0 def bounding_box(self, side): """Determine an axis-aligned bounding box. @@ -821,14 +826,14 @@ class ZCylinder(Cylinder): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -843,21 +848,21 @@ class ZCylinder(Cylinder): @property def x0(self): - return self.coeffs['x0'] + return self.coefficients['x0'] @property def y0(self): - return self.coeffs['y0'] + return self.coefficients['y0'] @x0.setter def x0(self, x0): check_type('x0 coefficient', x0, Real) - self._coeffs['x0'] = x0 + self._coefficients['x0'] = x0 @y0.setter def y0(self, y0): check_type('y0 coefficient', y0, Real) - self._coeffs['y0'] = y0 + self._coefficients['y0'] = y0 def bounding_box(self, side): """Determine an axis-aligned bounding box. @@ -928,14 +933,14 @@ class Sphere(Surface): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -952,39 +957,39 @@ class Sphere(Surface): @property def x0(self): - return self.coeffs['x0'] + return self.coefficients['x0'] @property def y0(self): - return self.coeffs['y0'] + return self.coefficients['y0'] @property def z0(self): - return self.coeffs['z0'] + return self.coefficients['z0'] @property def r(self): - return self.coeffs['R'] + return self.coefficients['R'] @x0.setter def x0(self, x0): check_type('x0 coefficient', x0, Real) - self._coeffs['x0'] = x0 + self._coefficients['x0'] = x0 @y0.setter def y0(self, y0): check_type('y0 coefficient', y0, Real) - self._coeffs['y0'] = y0 + self._coefficients['y0'] = y0 @z0.setter def z0(self, z0): check_type('z0 coefficient', z0, Real) - self._coeffs['z0'] = z0 + self._coefficients['z0'] = z0 @r.setter def r(self, R): check_type('R coefficient', R, Real) - self._coeffs['R'] = R + self._coefficients['R'] = R def bounding_box(self, side): """Determine an axis-aligned bounding box. @@ -1056,14 +1061,14 @@ class Cone(Surface): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -1081,39 +1086,39 @@ class Cone(Surface): @property def x0(self): - return self.coeffs['x0'] + return self.coefficients['x0'] @property def y0(self): - return self.coeffs['y0'] + return self.coefficients['y0'] @property def z0(self): - return self.coeffs['z0'] + return self.coefficients['z0'] @property def r2(self): - return self.coeffs['r2'] + return self.coefficients['r2'] @x0.setter def x0(self, x0): check_type('x0 coefficient', x0, Real) - self._coeffs['x0'] = x0 + self._coefficients['x0'] = x0 @y0.setter def y0(self, y0): check_type('y0 coefficient', y0, Real) - self._coeffs['y0'] = y0 + self._coefficients['y0'] = y0 @z0.setter def z0(self, z0): check_type('z0 coefficient', z0, Real) - self._coeffs['z0'] = z0 + self._coefficients['z0'] = z0 @r2.setter def r2(self, R2): check_type('R^2 coefficient', R2, Real) - self._coeffs['R2'] = R2 + self._coefficients['R2'] = R2 class XCone(Cone): @@ -1153,14 +1158,14 @@ class XCone(Cone): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -1209,14 +1214,14 @@ class YCone(Cone): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -1265,14 +1270,14 @@ class ZCone(Cone): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -1309,14 +1314,14 @@ class Quadric(Surface): boundary_type : {'transmission, 'vacuum', 'reflective', 'periodic'} Boundary condition that defines the behavior for particles hitting the surface. - coeffs : dict + coefficients : dict Dictionary of surface coefficients id : int Unique identifier for the surface name : str Name of the surface type : str - Type of the surface, e.g. 'x-plane' + Type of the surface """ @@ -1340,93 +1345,93 @@ class Quadric(Surface): @property def a(self): - return self.coeffs['a'] + return self.coefficients['a'] @property def b(self): - return self.coeffs['b'] + return self.coefficients['b'] @property def c(self): - return self.coeffs['c'] + return self.coefficients['c'] @property def d(self): - return self.coeffs['d'] + return self.coefficients['d'] @property def e(self): - return self.coeffs['e'] + return self.coefficients['e'] @property def f(self): - return self.coeffs['f'] + return self.coefficients['f'] @property def g(self): - return self.coeffs['g'] + return self.coefficients['g'] @property def h(self): - return self.coeffs['h'] + return self.coefficients['h'] @property def j(self): - return self.coeffs['j'] + return self.coefficients['j'] @property def k(self): - return self.coeffs['k'] + return self.coefficients['k'] @a.setter def a(self, a): check_type('a coefficient', a, Real) - self._coeffs['a'] = a + self._coefficients['a'] = a @b.setter def b(self, b): check_type('b coefficient', b, Real) - self._coeffs['b'] = b + self._coefficients['b'] = b @c.setter def c(self, c): check_type('c coefficient', c, Real) - self._coeffs['c'] = c + self._coefficients['c'] = c @d.setter def d(self, d): check_type('d coefficient', d, Real) - self._coeffs['d'] = d + self._coefficients['d'] = d @e.setter def e(self, e): check_type('e coefficient', e, Real) - self._coeffs['e'] = e + self._coefficients['e'] = e @f.setter def f(self, f): check_type('f coefficient', f, Real) - self._coeffs['f'] = f + self._coefficients['f'] = f @g.setter def g(self, g): check_type('g coefficient', g, Real) - self._coeffs['g'] = g + self._coefficients['g'] = g @h.setter def h(self, h): check_type('h coefficient', h, Real) - self._coeffs['h'] = h + self._coefficients['h'] = h @j.setter def j(self, j): check_type('j coefficient', j, Real) - self._coeffs['j'] = j + self._coefficients['j'] = j @k.setter def k(self, k): check_type('k coefficient', k, Real) - self._coeffs['k'] = k + self._coefficients['k'] = k class Halfspace(Region): diff --git a/openmc/tallies.py b/openmc/tallies.py index 1af3b12bc..90b09f582 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -3420,8 +3420,8 @@ class Tally(object): class Tallies(object): - """Tallies file used for an OpenMC simulation. Corresponds directly to the - tallies.xml input file. + """Collection of Tallies used for an OpenMC simulation. Corresponds directly to + the tallies.xml input file. """