mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Respond to @wbinventor comments on #632
This commit is contained in:
parent
6234c4e05e
commit
1e57cb8407
15 changed files with 146 additions and 138 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue