diff --git a/examples/assembly/assembly.py b/examples/assembly/assembly.py new file mode 100644 index 0000000000..31984543a6 --- /dev/null +++ b/examples/assembly/assembly.py @@ -0,0 +1,140 @@ +""" +This script builds a single PWR assembly and is a slightly more advanced +demonstration of model building using Python. The creation of two universes for +fuel pins and guide tube pins has been separated into functions, and then the +overall model is built by an `assembly` function. This script also demonstrates +the use of the `Model` class, which provides some extra convenience over using +`Geometry`, `Materials`, and `Settings` classes directly. Finally, the script +takes two command-line flags that indicate whether to build and/or run the +model. + +""" + +import argparse +from math import log10 + +import numpy as np +import openmc + +# Define surfaces +fuel_or = openmc.ZCylinder(r=0.39218, name='Fuel OR') +clad_or = openmc.ZCylinder(r=0.45720, name='Clad OR') + +# Define materials +fuel = openmc.Material(name='Fuel') +fuel.set_density('g/cm3', 10.29769) +fuel.add_nuclide('U234', 4.4843e-6) +fuel.add_nuclide('U235', 5.5815e-4) +fuel.add_nuclide('U238', 2.2408e-2) +fuel.add_nuclide('O16', 4.5829e-2) + +clad = openmc.Material(name='Cladding') +clad.set_density('g/cm3', 6.55) +clad.add_nuclide('Zr90', 2.1827e-2) +clad.add_nuclide('Zr91', 4.7600e-3) +clad.add_nuclide('Zr92', 7.2758e-3) +clad.add_nuclide('Zr94', 7.3734e-3) +clad.add_nuclide('Zr96', 1.1879e-3) + +hot_water = openmc.Material(name='Hot borated water') +hot_water.set_density('g/cm3', 0.740582) +hot_water.add_nuclide('H1', 4.9457e-2) +hot_water.add_nuclide('O16', 2.4672e-2) +hot_water.add_nuclide('B10', 8.0042e-6) +hot_water.add_nuclide('B11', 3.2218e-5) +hot_water.add_s_alpha_beta('c_H_in_H2O') + + +def fuel_pin(): + """Returns a fuel pin universe.""" + + fuel_cell = openmc.Cell(fill=fuel, region=-fuel_or) + clad_cell = openmc.Cell(fill=clad, region=+fuel_or & -clad_or) + hot_water_cell = openmc.Cell(fill=hot_water, region=+clad_or) + + univ = openmc.Universe(name='Fuel Pin') + univ.add_cells([fuel_cell, clad_cell, hot_water_cell]) + return univ + + +def guide_tube_pin(): + """Returns a control rod guide tube universe.""" + + gt_inner_cell = openmc.Cell(fill=hot_water, region=-fuel_or) + gt_clad_cell = openmc.Cell(fill=clad, region=+fuel_or & -clad_or) + gt_outer_cell = openmc.Cell(fill=hot_water, region=+clad_or) + + univ = openmc.Universe(name='Guide Tube') + univ.add_cells([gt_inner_cell, gt_clad_cell, gt_outer_cell]) + return univ + + +def assembly_model(): + """Returns a single PWR fuel assembly.""" + + model = openmc.model.Model() + + # Create fuel assembly Lattice + pitch = 21.42 + assembly = openmc.RectLattice(name='Fuel Assembly') + assembly.pitch = (pitch/17, pitch/17) + assembly.lower_left = (-pitch/2, -pitch/2) + + # Create array indices for guide tube locations in lattice + gt_pos = np.array([ + [2, 5], [2, 8], [2, 11], + [3, 3], [3, 13], + [5, 2], [5, 5], [5, 8], [5, 11], [5, 14], + [8, 2], [8, 5], [8, 8], [8, 11], [8, 14], + [11, 2], [11, 5], [11, 8], [11, 11], [11, 14], + [13, 3], [13, 13], + [14, 5], [14, 8], [14, 11] + ]) + + # Create 17x17 array of universes. First we create a 17x17 array all filled + # with the fuel pin universe. Then, we replace the guide tube positions with + # the guide tube pin universe (note the use of numpy fancy indexing to + # achieve this). + assembly.universes = np.full((17, 17), fuel_pin()) + assembly.universes[gt_pos[:, 0], gt_pos[:, 1]] = guide_tube_pin() + + # Create outer boundary of the geometry to surround the lattice + outer_boundary = openmc.model.rectangular_prism( + pitch, pitch, boundary_type='reflective') + + # Create a cell filled with the lattice + main_cell = openmc.Cell(fill=assembly, region=outer_boundary) + + # Finally, create geometry by providing a list of cells that fill the root + # universe + model.geometry = openmc.Geometry([main_cell]) + + model.settings.batches = 150 + model.settings.inactive = 50 + model.settings.particles = 1000 + model.settings.source = openmc.Source(space=openmc.stats.Box( + (-pitch/2, -pitch/2, -1), + (pitch/2, pitch/2, 1), + only_fissionable=True + )) + + # NOTE: We never actually created a Materials object. When you export/run + # using the Model object, if no materials were assigned it will look through + # the Geometry object and automatically export any materials that are + # necessary to build the model. + return model + + +if __name__ == '__main__': + # Set up command-line arguments for generating/running the model + parser = argparse.ArgumentParser() + parser.add_argument('--generate', action='store_true') + parser.add_argument('--run', action='store_true') + args = parser.parse_args() + + if args.generate or args.run: + model = assembly_model() + if args.generate: + model.export_to_xml() + if args.run: + model.run() diff --git a/examples/xml/custom_source/CMakeLists.txt b/examples/custom_source/CMakeLists.txt similarity index 100% rename from examples/xml/custom_source/CMakeLists.txt rename to examples/custom_source/CMakeLists.txt diff --git a/examples/custom_source/README.md b/examples/custom_source/README.md new file mode 100644 index 0000000000..94db705264 --- /dev/null +++ b/examples/custom_source/README.md @@ -0,0 +1,19 @@ +# Building a Custom Source + +To run this example, you first need to compile the custom source library, which +requires headers from OpenMC. A CMakeLists.txt file has been set up for you that +will search for OpenMC and build the custom library. To build the source +library, you can run: + + mkdir build && cd build + OPENMC_ROOT= cmake .. + make + +After this, you can build the model by running `python build_xml.py`. In the XML +files that are created, you should see a reference to build/libsource.so, the +custom source library that was built by CMake. The model is also set up with a +mesh tally of the flux, so once you run `openmc`, you will get a statepoint file +with the tally results in it. Running `python show_flux.py` will pull in the +results from the statepoint file and display them. If all worked well, you +should see a ring "imprint" as well as a higher flux to the right side (since +the custom source has all particles moving in the positive x direction). diff --git a/examples/custom_source/build_xml.py b/examples/custom_source/build_xml.py new file mode 100644 index 0000000000..a0817d4223 --- /dev/null +++ b/examples/custom_source/build_xml.py @@ -0,0 +1,36 @@ +import openmc + +# Create a single material +iron = openmc.Material() +iron.set_density('g/cm3', 5.0) +iron.add_element('Fe', 1.0) +mats = openmc.Materials([iron]) +mats.export_to_xml() + +# Create a 5 cm x 5 cm box filled with iron +box = openmc.model.rectangular_prism(10.0, 10.0, boundary_type='vacuum') +cell = openmc.Cell(fill=iron, region=box) +geometry = openmc.Geometry([cell]) +geometry.export_to_xml() + +# Tell OpenMC we're going to use our custom source +settings = openmc.Settings() +settings.run_mode = 'fixed source' +settings.batches = 10 +settings.particles = 1000 +source = openmc.Source() +source.library = 'build/libsource.so' +settings.source = source +settings.export_to_xml() + +# Finally, define a mesh tally so that we can see the resulting flux +mesh = openmc.RegularMesh() +mesh.lower_left = (-5.0, -5.0) +mesh.upper_right = (5.0, 5.0) +mesh.dimension = (50, 50) + +tally = openmc.Tally() +tally.filters = [openmc.MeshFilter(mesh)] +tally.scores = ['flux'] +tallies = openmc.Tallies([tally]) +tallies.export_to_xml() diff --git a/examples/custom_source/show_flux.py b/examples/custom_source/show_flux.py new file mode 100644 index 0000000000..6f54943018 --- /dev/null +++ b/examples/custom_source/show_flux.py @@ -0,0 +1,14 @@ +import matplotlib.pyplot as plt +import openmc + +# Get the flux from the statepoint +with openmc.StatePoint('statepoint.10.h5') as sp: + flux = sp.tallies[1].mean + flux.shape = (50, 50) + +# Plot the flux +fig, ax = plt.subplots() +ax.imshow(flux, origin='lower', extent=(-5.0, 5.0, -5.0, 5.0)) +ax.set_xlabel('x [cm]') +ax.set_ylabel('y [cm]') +plt.show() diff --git a/examples/xml/custom_source/source_ring.cpp b/examples/custom_source/source_ring.cpp similarity index 100% rename from examples/xml/custom_source/source_ring.cpp rename to examples/custom_source/source_ring.cpp diff --git a/examples/jezebel/jezebel.py b/examples/jezebel/jezebel.py new file mode 100644 index 0000000000..5114ac714d --- /dev/null +++ b/examples/jezebel/jezebel.py @@ -0,0 +1,33 @@ +import openmc + +# Create plutonium metal material +pu = openmc.Material() +pu.set_density('sum') +pu.add_nuclide('Pu239', 3.7047e-02) +pu.add_nuclide('Pu240', 1.7512e-03) +pu.add_nuclide('Pu241', 1.1674e-04) +pu.add_element('Ga', 1.3752e-03) +mats = openmc.Materials([pu]) +mats.export_to_xml() + +# Create a single cell filled with the Pu metal +sphere = openmc.Sphere(r=6.3849, boundary_type='vacuum') +cell = openmc.Cell(fill=pu, region=-sphere) +geom = openmc.Geometry([cell]) +geom.export_to_xml() + +# Finally, define some run settings +settings = openmc.Settings() +settings.batches = 200 +settings.inactive = 10 +settings.particles = 10000 +settings.export_to_xml() + +# Run the simulation +openmc.run() + +# Get the resulting k-effective value +n = settings.batches +with openmc.StatePoint(f'statepoint.{n}.h5') as sp: + keff = sp.k_combined + print(f'Final k-effective = {keff}') diff --git a/examples/python/lattice/hexagonal/build-xml.py b/examples/lattice/hexagonal/build_xml.py similarity index 100% rename from examples/python/lattice/hexagonal/build-xml.py rename to examples/lattice/hexagonal/build_xml.py diff --git a/examples/python/lattice/nested/build-xml.py b/examples/lattice/nested/build_xml.py similarity index 100% rename from examples/python/lattice/nested/build-xml.py rename to examples/lattice/nested/build_xml.py diff --git a/examples/python/lattice/simple/build-xml.py b/examples/lattice/simple/build_xml.py similarity index 100% rename from examples/python/lattice/simple/build-xml.py rename to examples/lattice/simple/build_xml.py diff --git a/examples/pincell/build_xml.py b/examples/pincell/build_xml.py new file mode 100644 index 0000000000..c5d614ea90 --- /dev/null +++ b/examples/pincell/build_xml.py @@ -0,0 +1,112 @@ +from math import log10 + +import numpy as np +import openmc + +############################################################################### +# Create materials for the problem + +uo2 = openmc.Material(name='UO2 fuel at 2.4% wt enrichment') +uo2.set_density('g/cm3', 10.29769) +uo2.add_element('U', 1., enrichment=2.4) +uo2.add_element('O', 2.) + +helium = openmc.Material(name='Helium for gap') +helium.set_density('g/cm3', 0.001598) +helium.add_element('He', 2.4044e-4) + +zircaloy = openmc.Material(name='Zircaloy 4') +zircaloy.set_density('g/cm3', 6.55) +zircaloy.add_element('Sn', 0.014 , 'wo') +zircaloy.add_element('Fe', 0.00165, 'wo') +zircaloy.add_element('Cr', 0.001 , 'wo') +zircaloy.add_element('Zr', 0.98335, 'wo') + +borated_water = openmc.Material(name='Borated water') +borated_water.set_density('g/cm3', 0.740582) +borated_water.add_element('B', 4.0e-5) +borated_water.add_element('H', 5.0e-2) +borated_water.add_element('O', 2.4e-2) +borated_water.add_s_alpha_beta('c_H_in_H2O') + +# Collect the materials together and export to XML +materials = openmc.Materials([uo2, helium, zircaloy, borated_water]) +materials.export_to_xml() + +############################################################################### +# Define problem geometry + +# Create cylindrical surfaces +fuel_or = openmc.ZCylinder(r=0.39218, name='Fuel OR') +clad_ir = openmc.ZCylinder(r=0.40005, name='Clad IR') +clad_or = openmc.ZCylinder(r=0.45720, name='Clad OR') + +# Create a region represented as the inside of a rectangular prism +pitch = 1.25984 +box = openmc.rectangular_prism(pitch, pitch, boundary_type='reflective') + +# Create cells, mapping materials to regions +fuel = openmc.Cell(fill=uo2, region=-fuel_or) +gap = openmc.Cell(fill=helium, region=+fuel_or & -clad_ir) +clad = openmc.Cell(fill=zircaloy, region=+clad_ir & -clad_or) +water = openmc.Cell(fill=borated_water, region=+clad_or & box) + +# Create a geometry and export to XML +geometry = openmc.Geometry([fuel, gap, clad, water]) +geometry.export_to_xml() + +############################################################################### +# Define problem settings + +# Indicate how many particles to run +settings = openmc.Settings() +settings.batches = 100 +settings.inactive = 10 +settings.particles = 1000 + +# Create an initial uniform spatial source distribution over fissionable zones +lower_left = (-pitch/2, -pitch/2, -1) +upper_right = (pitch/2, pitch/2, 1) +uniform_dist = openmc.stats.Box(lower_left, upper_right, only_fissionable=True) +settings.source = openmc.source.Source(space=uniform_dist) + +# For source convergence checks, add a mesh that can be used to calculate the +# Shannon entropy +entropy_mesh = openmc.RegularMesh() +entropy_mesh.lower_left = (-fuel_or.r, -fuel_or.r) +entropy_mesh.upper_right = (fuel_or.r, fuel_or.r) +entropy_mesh.dimension = (10, 10) +settings.entropy_mesh = entropy_mesh +settings.export_to_xml() + +############################################################################### +# Define tallies + +# Create a mesh that will be used for tallying +mesh = openmc.RegularMesh() +mesh.dimension = (100, 100) +mesh.lower_left = (-pitch/2, -pitch/2) +mesh.upper_right = (pitch/2, pitch/2) + +# Create a mesh filter that can be used in a tally +mesh_filter = openmc.MeshFilter(mesh) + +# Now use the mesh filter in a tally and indicate what scores are desired +mesh_tally = openmc.Tally(name="Mesh tally") +mesh_tally.filters = [mesh_filter] +mesh_tally.scores = ['flux', 'fission', 'nu-fission'] + +# Let's also create a tally to get the flux energy spectrum. We start by +# creating an energy filter +e_min, e_max = 1e-5, 20.0e6 +groups = 500 +energies = np.logspace(log10(e_min), log10(e_max), groups + 1) +energy_filter = openmc.EnergyFilter(energies) + +spectrum_tally = openmc.Tally(name="Flux spectrum") +spectrum_tally.filters = [energy_filter] +spectrum_tally.scores = ['flux'] + +# Instantiate a Tallies collection and export to XML +tallies = openmc.Tallies([mesh_tally, spectrum_tally]) +tallies.export_to_xml() diff --git a/examples/pincell/plot_spectrum.py b/examples/pincell/plot_spectrum.py new file mode 100644 index 0000000000..d88a6de433 --- /dev/null +++ b/examples/pincell/plot_spectrum.py @@ -0,0 +1,23 @@ +import matplotlib.pyplot as plt +import openmc + + +# Get results from statepoint +with openmc.StatePoint('statepoint.100.h5') as sp: + t = sp.get_tally(name="Flux spectrum") + + # Get the energies from the energy filter + energy_filter = t.filters[0] + energies = energy_filter.bins[:, 0] + + # Get the flux values + mean = t.get_values(value='mean').ravel() + uncertainty = t.get_values(value='std_dev').ravel() + +# Plot flux spectrum +fix, ax = plt.subplots() +ax.loglog(energies, mean, drawstyle='steps-post') +ax.set_xlabel('Energy [eV]') +ax.set_ylabel('Flux') +ax.grid(True, which='both') +plt.show() diff --git a/examples/python/pincell_depletion/chain_simple.xml b/examples/pincell_depletion/chain_simple.xml similarity index 100% rename from examples/python/pincell_depletion/chain_simple.xml rename to examples/pincell_depletion/chain_simple.xml diff --git a/examples/python/pincell_depletion/restart_depletion.py b/examples/pincell_depletion/restart_depletion.py similarity index 100% rename from examples/python/pincell_depletion/restart_depletion.py rename to examples/pincell_depletion/restart_depletion.py diff --git a/examples/python/pincell_depletion/run_depletion.py b/examples/pincell_depletion/run_depletion.py similarity index 100% rename from examples/python/pincell_depletion/run_depletion.py rename to examples/pincell_depletion/run_depletion.py diff --git a/examples/python/pincell_multigroup/build-xml.py b/examples/pincell_multigroup/build_xml.py similarity index 56% rename from examples/python/pincell_multigroup/build-xml.py rename to examples/pincell_multigroup/build_xml.py index bb9fc78606..1f34683919 100644 --- a/examples/python/pincell_multigroup/build-xml.py +++ b/examples/pincell_multigroup/build_xml.py @@ -1,20 +1,12 @@ +from math import log10 + import numpy as np import openmc import openmc.mgxs ############################################################################### -# Simulation Input File Parameters -############################################################################### - -# OpenMC simulation parameters -batches = 100 -inactive = 10 -particles = 1000 - -############################################################################### -# Exporting to OpenMC mgxs.h5 file -############################################################################### +# Create multigroup data # Instantiate the energy group data groups = openmc.mgxs.EnergyGroups(group_edges=[ @@ -69,107 +61,90 @@ mg_cross_sections_file = openmc.MGXSLibrary(groups) mg_cross_sections_file.add_xsdatas([uo2_xsdata, h2o_xsdata]) mg_cross_sections_file.export_to_hdf5() - -############################################################################### -# Exporting to OpenMC materials.xml file ############################################################################### +# Create materials for the problem # Instantiate some Macroscopic Data uo2_data = openmc.Macroscopic('UO2') h2o_data = openmc.Macroscopic('LWTR') # Instantiate some Materials and register the appropriate Macroscopic objects -uo2 = openmc.Material(material_id=1, name='UO2 fuel') +uo2 = openmc.Material(name='UO2 fuel') uo2.set_density('macro', 1.0) uo2.add_macroscopic(uo2_data) -water = openmc.Material(material_id=2, name='Water') +water = openmc.Material(name='Water') water.set_density('macro', 1.0) water.add_macroscopic(h2o_data) # Instantiate a Materials collection and export to XML materials_file = openmc.Materials([uo2, water]) -materials_file.cross_sections = "./mgxs.h5" +materials_file.cross_sections = "mgxs.h5" materials_file.export_to_xml() - -############################################################################### -# Exporting to OpenMC geometry.xml file ############################################################################### +# Define problem geometry -# Instantiate ZCylinder surfaces -fuel_or = openmc.ZCylinder(surface_id=1, x0=0, y0=0, r=0.54, name='Fuel OR') -left = openmc.XPlane(surface_id=4, x0=-0.63, name='left') -right = openmc.XPlane(surface_id=5, x0=0.63, name='right') -bottom = openmc.YPlane(surface_id=6, y0=-0.63, name='bottom') -top = openmc.YPlane(surface_id=7, y0=0.63, name='top') +# Create a surface for the fuel outer radius +fuel_or = openmc.ZCylinder(r=0.54, name='Fuel OR') -left.boundary_type = 'reflective' -right.boundary_type = 'reflective' -top.boundary_type = 'reflective' -bottom.boundary_type = 'reflective' +# Create a region represented as the inside of a rectangular prism +pitch = 1.26 +box = openmc.rectangular_prism(pitch, pitch, boundary_type='reflective') # Instantiate Cells -fuel = openmc.Cell(cell_id=1, name='cell 1') -moderator = openmc.Cell(cell_id=2, name='cell 2') +fuel = openmc.Cell(fill=uo2, region=-fuel_or, name='fuel') +moderator = openmc.Cell(fill=water, region=+fuel_or & box, name='moderator') -# Use surface half-spaces to define regions -fuel.region = -fuel_or -moderator.region = +fuel_or & +left & -right & +bottom & -top - -# Register Materials with Cells -fuel.fill = uo2 -moderator.fill = water - -# Instantiate Universe -root = openmc.Universe(universe_id=0, name='root universe') - -# Register Cells with Universe -root.add_cells([fuel, moderator]) - -# Instantiate a Geometry, register the root Universe, and export to XML -geometry = openmc.Geometry(root) +# Create a geometry with the two cells and export to XML +geometry = openmc.Geometry([fuel, moderator]) geometry.export_to_xml() - -############################################################################### -# Exporting to OpenMC settings.xml file ############################################################################### +# Define problem settings # Instantiate a Settings object, set all runtime parameters, and export to XML -settings_file = openmc.Settings() -settings_file.energy_mode = "multi-group" -settings_file.batches = batches -settings_file.inactive = inactive -settings_file.particles = particles +settings = openmc.Settings() +settings.energy_mode = "multi-group" +settings.batches = 100 +settings.inactive = 10 +settings.particles = 1000 # Create an initial uniform spatial source distribution over fissionable zones -bounds = [-0.63, -0.63, -1, 0.63, 0.63, 1] -uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:]) -settings_file.source = openmc.source.Source(space=uniform_dist) - -settings_file.export_to_xml() +lower_left = (-pitch/2, -pitch/2, -1) +upper_right = (pitch/2, pitch/2, 1) +uniform_dist = openmc.stats.Box(lower_left, upper_right, only_fissionable=True) +settings.source = openmc.source.Source(space=uniform_dist) +settings.export_to_xml() ############################################################################### -# Exporting to OpenMC tallies.xml file -############################################################################### +# Define tallies -# Instantiate a tally mesh -mesh = openmc.RegularMesh(mesh_id=1) -mesh.dimension = [100, 100, 1] -mesh.lower_left = [-0.63, -0.63, -1.e50] -mesh.upper_right = [0.63, 0.63, 1.e50] +# Create a mesh that will be used for tallying +mesh = openmc.RegularMesh() +mesh.dimension = (100, 100) +mesh.lower_left = (-pitch/2, -pitch/2) +mesh.upper_right = (pitch/2, pitch/2) -# Instantiate some tally Filters -energy_filter = openmc.EnergyFilter([1e-5, 0.0635, 10.0, 1.0e2, 1.0e3, 0.5e6, - 1.0e6, 20.0e6]) +# Create a mesh filter that can be used in a tally mesh_filter = openmc.MeshFilter(mesh) -# Instantiate the Tally -tally = openmc.Tally(tally_id=1, name='tally 1') -tally.filters = [energy_filter, mesh_filter] -tally.scores = ['flux', 'fission', 'nu-fission'] +# Now use the mesh filter in a tally and indicate what scores are desired +mesh_tally = openmc.Tally(name="Mesh tally") +mesh_tally.filters = [mesh_filter] +mesh_tally.scores = ['flux', 'fission', 'nu-fission'] -# Instantiate a Tallies collection, register all Tallies, and export to XML -tallies_file = openmc.Tallies([tally]) -tallies_file.export_to_xml() +# Let's also create a tally to get the flux energy spectrum. We start by +# creating an energy filter +e_min, e_max = 1e-5, 20.0e6 +groups = 500 +energies = np.logspace(log10(e_min), log10(e_max), groups + 1) +energy_filter = openmc.EnergyFilter(energies) + +spectrum_tally = openmc.Tally(name="Flux spectrum") +spectrum_tally.filters = [energy_filter] +spectrum_tally.scores = ['flux'] + +# Instantiate a Tallies collection and export to XML +tallies = openmc.Tallies([mesh_tally, spectrum_tally]) +tallies.export_to_xml() diff --git a/examples/python/basic/build-xml.py b/examples/python/basic/build-xml.py deleted file mode 100644 index 5caed28104..0000000000 --- a/examples/python/basic/build-xml.py +++ /dev/null @@ -1,121 +0,0 @@ -import openmc - - -############################################################################### -# Simulation Input File Parameters -############################################################################### - -# OpenMC simulation parameters -batches = 15 -inactive = 5 -particles = 10000 - - -############################################################################### -# Exporting to OpenMC materials.xml file -############################################################################### - -# Instantiate some Materials and register the appropriate Nuclides -moderator = openmc.Material(material_id=41, name='moderator') -moderator.set_density('g/cc', 1.0) -moderator.add_element('H', 2.) -moderator.add_element('O', 1.) -moderator.add_s_alpha_beta('c_H_in_H2O') - -fuel = openmc.Material(material_id=40, name='fuel') -fuel.set_density('g/cc', 4.5) -fuel.add_nuclide('U235', 1.) - -# Instantiate a Materials collection and export to XML -materials_file = openmc.Materials([moderator, fuel]) -materials_file.export_to_xml() - - -############################################################################### -# Exporting to OpenMC geometry.xml file -############################################################################### - -# Instantiate ZCylinder surfaces -surf1 = openmc.ZCylinder(surface_id=1, x0=0, y0=0, r=7, name='surf 1') -surf2 = openmc.ZCylinder(surface_id=2, x0=0, y0=0, r=9, name='surf 2') -surf3 = openmc.ZCylinder(surface_id=3, x0=0, y0=0, r=11, name='surf 3') -surf3.boundary_type = 'vacuum' - -# Instantiate Cells -cell1 = openmc.Cell(cell_id=1, name='cell 1') -cell2 = openmc.Cell(cell_id=100, name='cell 2') -cell3 = openmc.Cell(cell_id=101, name='cell 3') -cell4 = openmc.Cell(cell_id=2, name='cell 4') - -# Use surface half-spaces to define regions -cell1.region = -surf2 -cell2.region = -surf1 -cell3.region = +surf1 -cell4.region = +surf2 & -surf3 - -# Register Materials with Cells -cell2.fill = fuel -cell3.fill = moderator -cell4.fill = moderator - -# Instantiate Universes -universe1 = openmc.Universe(universe_id=37) -root = openmc.Universe(universe_id=0, name='root universe') -cell1.fill = universe1 - -# Register Cells with Universes -universe1.add_cells([cell2, cell3]) -root.add_cells([cell1, cell4]) - -# Instantiate a Geometry, register the root Universe, and export to XML -geometry = openmc.Geometry(root) -geometry.export_to_xml() - - -############################################################################### -# Exporting to OpenMC settings.xml file -############################################################################### - -# Instantiate a Settings object, set all runtime parameters, and export to XML -settings_file = openmc.Settings() -settings_file.batches = batches -settings_file.inactive = inactive -settings_file.particles = particles - -# Create an initial uniform spatial source distribution over fissionable zones -bounds = [-4., -4., -4., 4., 4., 4.] -uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) -settings_file.source = openmc.source.Source(space=uniform_dist) - -settings_file.export_to_xml() - - -############################################################################### -# Exporting to OpenMC tallies.xml file -############################################################################### - -# Instantiate some tally Filters -cell_filter = openmc.CellFilter(cell2) -energy_filter = openmc.EnergyFilter([0., 20.e6]) -energyout_filter = openmc.EnergyoutFilter([0., 20.e6]) - -# Instantiate the first Tally -first_tally = openmc.Tally(tally_id=1, name='first tally') -first_tally.filters = [cell_filter] -scores = ['total', 'scatter', 'nu-scatter', - 'absorption', 'fission', 'nu-fission'] -first_tally.scores = scores - -# Instantiate the second Tally -second_tally = openmc.Tally(tally_id=2, name='second tally') -second_tally.filters = [cell_filter, energy_filter] -second_tally.scores = scores - -# Instantiate the third Tally -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 collection and export to XML -tallies_file = openmc.Tallies((first_tally, second_tally, third_tally)) -tallies_file.export_to_xml() diff --git a/examples/python/boxes/build-xml.py b/examples/python/boxes/build-xml.py deleted file mode 100644 index d04f0f67a3..0000000000 --- a/examples/python/boxes/build-xml.py +++ /dev/null @@ -1,125 +0,0 @@ -import numpy as np -import openmc - -############################################################################### -# Simulation Input File Parameters -############################################################################### - -# OpenMC simulation parameters -batches = 15 -inactive = 5 -particles = 10000 - - -############################################################################### -# Exporting to OpenMC materials.xml File -############################################################################### - -# Instantiate some Materials and register the appropriate Nuclides -fuel1 = openmc.Material(material_id=1, name='fuel') -fuel1.set_density('g/cc', 4.5) -fuel1.add_nuclide('U235', 1.) - -fuel2 = openmc.Material(material_id=2, name='depleted fuel') -fuel2.set_density('g/cc', 4.5) -fuel2.add_nuclide('U238', 1.) - -moderator = openmc.Material(material_id=3, name='moderator') -moderator.set_density('g/cc', 1.0) -moderator.add_element('H', 2.) -moderator.add_element('O', 1.) -moderator.add_s_alpha_beta('c_H_in_H2O') - -# Instantiate a Materials collection and export to XML -materials_file = openmc.Materials([fuel1, fuel2, moderator]) -materials_file.export_to_xml() - - -############################################################################### -# Exporting to OpenMC geometry.xml file -############################################################################### - -# Instantiate planar surfaces -x1 = openmc.XPlane(surface_id=1, x0=-10) -x2 = openmc.XPlane(surface_id=2, x0=-7) -x3 = openmc.XPlane(surface_id=3, x0=-4) -x4 = openmc.XPlane(surface_id=4, x0=4) -x5 = openmc.XPlane(surface_id=5, x0=7) -x6 = openmc.XPlane(surface_id=6, x0=10) -y1 = openmc.YPlane(surface_id=11, y0=-10) -y2 = openmc.YPlane(surface_id=12, y0=-7) -y3 = openmc.YPlane(surface_id=13, y0=-4) -y4 = openmc.YPlane(surface_id=14, y0=4) -y5 = openmc.YPlane(surface_id=15, y0=7) -y6 = openmc.YPlane(surface_id=16, y0=10) -z1 = openmc.ZPlane(surface_id=21, z0=-10) -z2 = openmc.ZPlane(surface_id=22, z0=-7) -z3 = openmc.ZPlane(surface_id=23, z0=-4) -z4 = openmc.ZPlane(surface_id=24, z0=4) -z5 = openmc.ZPlane(surface_id=25, z0=7) -z6 = openmc.ZPlane(surface_id=26, z0=10) - -# Set vacuum boundary conditions on outside -for surface in [x1, x6, y1, y6, z1, z6]: - surface.boundary_type = 'vacuum' - -# Instantiate Cells -inner_box = openmc.Cell(cell_id=1, name='inner box') -middle_box = openmc.Cell(cell_id=2, name='middle box') -outer_box = openmc.Cell(cell_id=3, name='outer box') - -# Use each set of six planes to create solid cube regions. We can then use these -# to create cubic shells. -inner_cube = +x3 & -x4 & +y3 & -y4 & +z3 & -z4 -middle_cube = +x2 & -x5 & +y2 & -y5 & +z2 & -z5 -outer_cube = +x1 & -x6 & +y1 & -y6 & +z1 & -z6 -outside_inner_cube = -x3 | +x4 | -y3 | +y4 | -z3 | +z4 - -# Use surface half-spaces to define regions -inner_box.region = inner_cube -middle_box.region = middle_cube & outside_inner_cube -outer_box.region = outer_cube & ~middle_cube - -# Register Materials with Cells -inner_box.fill = fuel1 -middle_box.fill = fuel2 -outer_box.fill = moderator - -# Instantiate root universe -root = openmc.Universe(universe_id=0, name='root universe') -root.add_cells([inner_box, middle_box, outer_box]) - -# Instantiate a Geometry, register the root Universe, and export to XML -geometry = openmc.Geometry(root) -geometry.export_to_xml() - - -############################################################################### -# Exporting to OpenMC settings.xml File -############################################################################### - -# Instantiate a Settings object, set all runtime parameters, and export to XML -settings_file = openmc.Settings() -settings_file.batches = batches -settings_file.inactive = inactive -settings_file.particles = particles - -# Create an initial uniform spatial source distribution over fissionable zones -uniform_dist = openmc.stats.Box(*outer_cube.bounding_box, only_fissionable=True) -settings_file.source = openmc.source.Source(space=uniform_dist) - -settings_file.export_to_xml() - -############################################################################### -# Exporting to OpenMC plots.xml File -############################################################################### - -plot = openmc.Plot(plot_id=1) -plot.origin = [0, 0, 0] -plot.width = [20, 20] -plot.pixels = [200, 200] -plot.color_by = 'cell' - -# Instantiate a Plots collection and export to XML -plot_file = openmc.Plots([plot]) -plot_file.export_to_xml() diff --git a/examples/python/pincell/build-xml.py b/examples/python/pincell/build-xml.py deleted file mode 100644 index 072cc911f0..0000000000 --- a/examples/python/pincell/build-xml.py +++ /dev/null @@ -1,138 +0,0 @@ -import openmc - -############################################################################### -# Simulation Input File Parameters -############################################################################### - -# OpenMC simulation parameters -batches = 100 -inactive = 10 -particles = 1000 - - -############################################################################### -# Exporting to OpenMC materials.xml file -############################################################################### - - -# Instantiate some Materials and register the appropriate Nuclides -uo2 = openmc.Material(material_id=1, name='UO2 fuel at 2.4% wt enrichment') -uo2.set_density('g/cm3', 10.29769) -uo2.add_element('U', 1., enrichment=2.4) -uo2.add_element('O', 2.) - -helium = openmc.Material(material_id=2, name='Helium for gap') -helium.set_density('g/cm3', 0.001598) -helium.add_element('He', 2.4044e-4) - -zircaloy = openmc.Material(material_id=3, name='Zircaloy 4') -zircaloy.set_density('g/cm3', 6.55) -zircaloy.add_element('Sn', 0.014 , 'wo') -zircaloy.add_element('Fe', 0.00165, 'wo') -zircaloy.add_element('Cr', 0.001 , 'wo') -zircaloy.add_element('Zr', 0.98335, 'wo') - -borated_water = openmc.Material(material_id=4, name='Borated water') -borated_water.set_density('g/cm3', 0.740582) -borated_water.add_element('B', 4.0e-5) -borated_water.add_element('H', 5.0e-2) -borated_water.add_element('O', 2.4e-2) -borated_water.add_s_alpha_beta('c_H_in_H2O') - -# Instantiate a Materials collection and export to XML -materials_file = openmc.Materials([uo2, helium, zircaloy, borated_water]) -materials_file.export_to_xml() - - -############################################################################### -# Exporting to OpenMC geometry.xml file -############################################################################### - -# Instantiate ZCylinder surfaces -fuel_or = openmc.ZCylinder(surface_id=1, x0=0, y0=0, r=0.39218, name='Fuel OR') -clad_ir = openmc.ZCylinder(surface_id=2, x0=0, y0=0, r=0.40005, name='Clad IR') -clad_or = openmc.ZCylinder(surface_id=3, x0=0, y0=0, r=0.45720, name='Clad OR') -left = openmc.XPlane(surface_id=4, x0=-0.62992, name='left') -right = openmc.XPlane(surface_id=5, x0=0.62992, name='right') -bottom = openmc.YPlane(surface_id=6, y0=-0.62992, name='bottom') -top = openmc.YPlane(surface_id=7, y0=0.62992, name='top') - -left.boundary_type = 'reflective' -right.boundary_type = 'reflective' -top.boundary_type = 'reflective' -bottom.boundary_type = 'reflective' - -# Instantiate Cells -fuel = openmc.Cell(cell_id=1, name='cell 1') -gap = openmc.Cell(cell_id=2, name='cell 2') -clad = openmc.Cell(cell_id=3, name='cell 3') -water = openmc.Cell(cell_id=4, name='cell 4') - -# Use surface half-spaces to define regions -fuel.region = -fuel_or -gap.region = +fuel_or & -clad_ir -clad.region = +clad_ir & -clad_or -water.region = +clad_or & +left & -right & +bottom & -top - -# Register Materials with Cells -fuel.fill = uo2 -gap.fill = helium -clad.fill = zircaloy -water.fill = borated_water - -# Instantiate Universe -root = openmc.Universe(universe_id=0, name='root universe') - -# Register Cells with Universe -root.add_cells([fuel, gap, clad, water]) - -# Instantiate a Geometry, register the root Universe, and export to XML -geometry = openmc.Geometry(root) -geometry.export_to_xml() - - -############################################################################### -# Exporting to OpenMC settings.xml file -############################################################################### - -# Instantiate a Settings object, set all runtime parameters, and export to XML -settings_file = openmc.Settings() -settings_file.batches = batches -settings_file.inactive = inactive -settings_file.particles = particles - -# Create an initial uniform spatial source distribution over fissionable zones -bounds = [-0.62992, -0.62992, -1, 0.62992, 0.62992, 1] -uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) -settings_file.source = openmc.source.Source(space=uniform_dist) - -entropy_mesh = openmc.RegularMesh() -entropy_mesh.lower_left = [-0.39218, -0.39218, -1.e50] -entropy_mesh.upper_right = [0.39218, 0.39218, 1.e50] -entropy_mesh.dimension = [10, 10, 1] -settings_file.entropy_mesh = entropy_mesh -settings_file.export_to_xml() - - -############################################################################### -# Exporting to OpenMC tallies.xml file -############################################################################### - -# Instantiate a tally mesh -mesh = openmc.RegularMesh() -mesh.dimension = [100, 100, 1] -mesh.lower_left = [-0.62992, -0.62992, -1.e50] -mesh.upper_right = [0.62992, 0.62992, 1.e50] - -# Instantiate some tally Filters -energy_filter = openmc.EnergyFilter([0., 4., 20.e6]) -mesh_filter = openmc.MeshFilter(mesh) - -# Instantiate the Tally -tally = openmc.Tally(tally_id=1, name='tally 1') -tally.filters = [energy_filter, mesh_filter] -tally.scores = ['flux', 'fission', 'nu-fission'] - -# Instantiate a Tallies collection and export to XML -tallies_file = openmc.Tallies([tally]) -tallies_file.export_to_xml() diff --git a/examples/python/reflective/build-xml.py b/examples/python/reflective/build-xml.py deleted file mode 100644 index 09fa026263..0000000000 --- a/examples/python/reflective/build-xml.py +++ /dev/null @@ -1,82 +0,0 @@ -import numpy as np -import openmc - -############################################################################### -# Simulation Input File Parameters -############################################################################### - -# OpenMC simulation parameters -batches = 500 -inactive = 10 -particles = 10000 - - -############################################################################### -# Exporting to OpenMC materials.xml file -############################################################################### - -# Instantiate a Material and register the Nuclide -fuel = openmc.Material(material_id=1, name='fuel') -fuel.set_density('g/cc', 4.5) -fuel.add_nuclide('U235', 1.) - -# Instantiate a Materials collection and export to XML -materials_file = openmc.Materials([fuel]) -materials_file.export_to_xml() - - -############################################################################### -# Exporting to OpenMC geometry.xml file -############################################################################### - -# Instantiate Surfaces -surf1 = openmc.XPlane(surface_id=1, x0=-1, name='surf 1') -surf2 = openmc.XPlane(surface_id=2, x0=+1, name='surf 2') -surf3 = openmc.YPlane(surface_id=3, y0=-1, name='surf 3') -surf4 = openmc.YPlane(surface_id=4, y0=+1, name='surf 4') -surf5 = openmc.ZPlane(surface_id=5, z0=-1, name='surf 5') -surf6 = openmc.ZPlane(surface_id=6, z0=+1, name='surf 6') - -surf1.boundary_type = 'vacuum' -surf2.boundary_type = 'vacuum' -surf3.boundary_type = 'reflective' -surf4.boundary_type = 'reflective' -surf5.boundary_type = 'reflective' -surf6.boundary_type = 'reflective' - -# Instantiate Cell -cell = openmc.Cell(cell_id=1, name='cell 1') - -# Use surface half-spaces to define region -cell.region = +surf1 & -surf2 & +surf3 & -surf4 & +surf5 & -surf6 - -# Register Material with Cell -cell.fill = fuel - -# Instantiate Universes -root = openmc.Universe(universe_id=0, name='root universe') - -# Register Cell with Universe -root.add_cell(cell) - -# Instantiate a Geometry, register the root Universe, and export to XML -geometry = openmc.Geometry(root) -geometry.export_to_xml() - - -############################################################################### -# Exporting to OpenMC settings.xml file -############################################################################### - -# Instantiate a Settings object, set all runtime parameters, and export to XML -settings_file = openmc.Settings() -settings_file.batches = batches -settings_file.inactive = inactive -settings_file.particles = particles - -# Create an initial uniform spatial source distribution over fissionable zones -uniform_dist = openmc.stats.Box(*cell.region.bounding_box, - only_fissionable=True) -settings_file.source = openmc.source.Source(space=uniform_dist) - -settings_file.export_to_xml() diff --git a/examples/xml/basic/geometry.xml b/examples/xml/basic/geometry.xml deleted file mode 100644 index b30884f8ca..0000000000 --- a/examples/xml/basic/geometry.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/examples/xml/basic/materials.xml b/examples/xml/basic/materials.xml deleted file mode 100644 index 606c676df8..0000000000 --- a/examples/xml/basic/materials.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/examples/xml/basic/settings.xml b/examples/xml/basic/settings.xml deleted file mode 100644 index 6e622b6cef..0000000000 --- a/examples/xml/basic/settings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - eigenvalue - 15 - 5 - 10000 - - - - - -4 -4 -4 4 4 4 - - - - diff --git a/examples/xml/basic/tallies.xml b/examples/xml/basic/tallies.xml deleted file mode 100644 index a125e9ca2a..0000000000 --- a/examples/xml/basic/tallies.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - 100 - - - - 0 20.0e6 - - - - 0 20.0e6 - - - - 1 - total scatter nu-scatter absorption fission nu-fission - - - - 1 2 - total scatter nu-scatter absorption fission nu-fission - - - - 1 2 3 - scatter nu-scatter nu-fission - - - diff --git a/examples/xml/boxes/geometry.xml b/examples/xml/boxes/geometry.xml deleted file mode 100644 index abe4924e66..0000000000 --- a/examples/xml/boxes/geometry.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/xml/boxes/materials.xml b/examples/xml/boxes/materials.xml deleted file mode 100644 index 1d0ab4a1ca..0000000000 --- a/examples/xml/boxes/materials.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/xml/boxes/plots.xml b/examples/xml/boxes/plots.xml deleted file mode 100644 index 0a75f574eb..0000000000 --- a/examples/xml/boxes/plots.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - cell - 0. 0. 0. - 20. 20. - 200 200 - - diff --git a/examples/xml/boxes/settings.xml b/examples/xml/boxes/settings.xml deleted file mode 100644 index 9007a12c59..0000000000 --- a/examples/xml/boxes/settings.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - eigenvalue - 15 - 5 - 10000 - - - - - - - diff --git a/examples/xml/custom_source/geometry.xml b/examples/xml/custom_source/geometry.xml deleted file mode 100644 index b30884f8ca..0000000000 --- a/examples/xml/custom_source/geometry.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/examples/xml/custom_source/materials.xml b/examples/xml/custom_source/materials.xml deleted file mode 100644 index 606c676df8..0000000000 --- a/examples/xml/custom_source/materials.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/examples/xml/custom_source/settings.xml b/examples/xml/custom_source/settings.xml deleted file mode 100644 index f935ed685e..0000000000 --- a/examples/xml/custom_source/settings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - fixed source - 10 - 0 - 100000 - - - - build/libsource.so - - - diff --git a/examples/xml/custom_source/tallies.xml b/examples/xml/custom_source/tallies.xml deleted file mode 100644 index 7f6f299261..0000000000 --- a/examples/xml/custom_source/tallies.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - 100 - - - - 0 20.0e6 - - - - 1 2 - flux - - - diff --git a/examples/xml/lattice/nested/geometry.xml b/examples/xml/lattice/nested/geometry.xml deleted file mode 100644 index 324f71cb36..0000000000 --- a/examples/xml/lattice/nested/geometry.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - 2 2 - -1.0 -1.0 - 1.0 1.0 - - 1 2 - 2 3 - - - - - - 2 2 - -2.0 -2.0 - 2.0 2.0 - - 5 5 - 5 5 - - - - - - - - - - - - diff --git a/examples/xml/lattice/nested/materials.xml b/examples/xml/lattice/nested/materials.xml deleted file mode 100644 index 2222721959..0000000000 --- a/examples/xml/lattice/nested/materials.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/examples/xml/lattice/nested/plots.xml b/examples/xml/lattice/nested/plots.xml deleted file mode 100644 index 0f92e06211..0000000000 --- a/examples/xml/lattice/nested/plots.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - 0. 0. 0. - 4.0 4.0 - 400 400 - - - diff --git a/examples/xml/lattice/nested/settings.xml b/examples/xml/lattice/nested/settings.xml deleted file mode 100644 index 879173d1b3..0000000000 --- a/examples/xml/lattice/nested/settings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - eigenvalue - 20 - 10 - 10000 - - - - - -1 -1 -1 1 1 1 - - - - diff --git a/examples/xml/lattice/nested/tallies.xml b/examples/xml/lattice/nested/tallies.xml deleted file mode 100644 index d342174a99..0000000000 --- a/examples/xml/lattice/nested/tallies.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - regular - 4 4 - -2.0 -2.0 - 1.0 1.0 - - - - 1 - - - - 1 - total - - - diff --git a/examples/xml/lattice/simple/geometry.xml b/examples/xml/lattice/simple/geometry.xml deleted file mode 100644 index bda7246c79..0000000000 --- a/examples/xml/lattice/simple/geometry.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - 4 4 - -2.0 -2.0 - 1.0 1.0 - - 1 2 1 2 - 2 3 2 3 - 1 2 1 2 - 2 3 2 3 - - - - - - - - - - - - diff --git a/examples/xml/lattice/simple/materials.xml b/examples/xml/lattice/simple/materials.xml deleted file mode 100644 index 2222721959..0000000000 --- a/examples/xml/lattice/simple/materials.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/examples/xml/lattice/simple/plots.xml b/examples/xml/lattice/simple/plots.xml deleted file mode 100644 index 0f92e06211..0000000000 --- a/examples/xml/lattice/simple/plots.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - 0. 0. 0. - 4.0 4.0 - 400 400 - - - diff --git a/examples/xml/lattice/simple/settings.xml b/examples/xml/lattice/simple/settings.xml deleted file mode 100644 index 879173d1b3..0000000000 --- a/examples/xml/lattice/simple/settings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - eigenvalue - 20 - 10 - 10000 - - - - - -1 -1 -1 1 1 1 - - - - diff --git a/examples/xml/lattice/simple/tallies.xml b/examples/xml/lattice/simple/tallies.xml deleted file mode 100644 index d342174a99..0000000000 --- a/examples/xml/lattice/simple/tallies.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - regular - 4 4 - -2.0 -2.0 - 1.0 1.0 - - - - 1 - - - - 1 - total - - - diff --git a/examples/xml/pincell/geometry.xml b/examples/xml/pincell/geometry.xml deleted file mode 100644 index f67f9e74c2..0000000000 --- a/examples/xml/pincell/geometry.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/xml/pincell/materials.xml b/examples/xml/pincell/materials.xml deleted file mode 100644 index 9f9afa3843..0000000000 --- a/examples/xml/pincell/materials.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/xml/pincell/settings.xml b/examples/xml/pincell/settings.xml deleted file mode 100644 index 5845898c8d..0000000000 --- a/examples/xml/pincell/settings.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - eigenvalue - 100 - 10 - 1000 - - - - - - -0.62992 -0.62992 -1. - 0.62992 0.62992 1. - - - - - - - -0.39218 -0.39218 -1.e50 - 0.39218 0.39218 1.e50 - 10 10 1 - - 1 - - diff --git a/examples/xml/pincell/tallies.xml b/examples/xml/pincell/tallies.xml deleted file mode 100644 index 7e1e0dafe4..0000000000 --- a/examples/xml/pincell/tallies.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - 100 100 1 - -0.62992 -0.62992 -1.e50 - 0.62992 0.62992 1.e50 - - - - 2 - - - - 0. 4. 20.0e6 - - - - 1 2 - flux fission nu-fission - - - diff --git a/examples/xml/pincell_multigroup/geometry.xml b/examples/xml/pincell_multigroup/geometry.xml deleted file mode 100644 index a1df07a9ec..0000000000 --- a/examples/xml/pincell_multigroup/geometry.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/examples/xml/pincell_multigroup/materials.xml b/examples/xml/pincell_multigroup/materials.xml deleted file mode 100644 index f0225b1009..0000000000 --- a/examples/xml/pincell_multigroup/materials.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - ./mgxs.h5 - - - - - - - - - diff --git a/examples/xml/pincell_multigroup/mgxs.h5 b/examples/xml/pincell_multigroup/mgxs.h5 deleted file mode 100644 index dbcda859da..0000000000 Binary files a/examples/xml/pincell_multigroup/mgxs.h5 and /dev/null differ diff --git a/examples/xml/pincell_multigroup/plots.xml b/examples/xml/pincell_multigroup/plots.xml deleted file mode 100644 index 92ab1c2cac..0000000000 --- a/examples/xml/pincell_multigroup/plots.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - 1 - mat - material - 0 0 0 - 1.26 1.26 - slice - 1000 1000 - - - - - - - - 2 - cell - cell - 0 0 0 - 1.26 1.26 - slice - 1000 1000 - - - diff --git a/examples/xml/pincell_multigroup/settings.xml b/examples/xml/pincell_multigroup/settings.xml deleted file mode 100644 index 6966d02b7b..0000000000 --- a/examples/xml/pincell_multigroup/settings.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - eigenvalue - 1000 - 100 - 10 - - - -0.63 -0.63 -1 0.63 0.63 1 - - - multi-group - diff --git a/examples/xml/pincell_multigroup/tallies.xml b/examples/xml/pincell_multigroup/tallies.xml deleted file mode 100644 index d84e129f2f..0000000000 --- a/examples/xml/pincell_multigroup/tallies.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 100 100 1 - -0.63 -0.63 -1e+50 - 0.63 0.63 1e+50 - - - 1e-05 0.0635 10.0 100.0 1000.0 500000.0 1000000.0 20000000.0 - - - 1 - - - 1 2 - flux fission nu-fission - - diff --git a/examples/xml/reflective/geometry.xml b/examples/xml/reflective/geometry.xml deleted file mode 100644 index 51cdf1ecb0..0000000000 --- a/examples/xml/reflective/geometry.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - 0 - 1 - 1 -2 3 -4 5 -6 - - - - - - - - - - - diff --git a/examples/xml/reflective/materials.xml b/examples/xml/reflective/materials.xml deleted file mode 100644 index 2472a74717..0000000000 --- a/examples/xml/reflective/materials.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/examples/xml/reflective/settings.xml b/examples/xml/reflective/settings.xml deleted file mode 100644 index 0ae6e5623b..0000000000 --- a/examples/xml/reflective/settings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - eigenvalue - 500 - 10 - 10000 - - - - - -1 -1 -1 1 1 1 - - - - diff --git a/openmc/settings.py b/openmc/settings.py index 794c97b618..cddef9255f 100644 --- a/openmc/settings.py +++ b/openmc/settings.py @@ -612,10 +612,6 @@ class Settings(object): @entropy_mesh.setter def entropy_mesh(self, entropy): cv.check_type('entropy mesh', entropy, RegularMesh) - if entropy.dimension: - cv.check_length('entropy mesh dimension', entropy.dimension, 3) - cv.check_length('entropy mesh lower-left corner', entropy.lower_left, 3) - cv.check_length('entropy mesh upper-right corner', entropy.upper_right, 3) self._entropy_mesh = entropy @trigger_active.setter