mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 20:45:35 -04:00
Change Python Mesh class to RegularMesh
This commit is contained in:
parent
b804ddc952
commit
9ddd8b3067
42 changed files with 204 additions and 308 deletions
|
|
@ -150,8 +150,7 @@ plot_file.export_to_xml()
|
|||
###############################################################################
|
||||
|
||||
# Instantiate a tally mesh
|
||||
mesh = openmc.Mesh(mesh_id=1)
|
||||
mesh.type = 'regular'
|
||||
mesh = openmc.RegularMesh(mesh_id=1)
|
||||
mesh.dimension = [4, 4]
|
||||
mesh.lower_left = [-2, -2]
|
||||
mesh.width = [1, 1]
|
||||
|
|
@ -164,6 +163,7 @@ tally = openmc.Tally(tally_id=1)
|
|||
tally.filters = [mesh_filter]
|
||||
tally.scores = ['total']
|
||||
|
||||
# Instantiate a Tallies collection, register Tally/Mesh, and export to XML
|
||||
# Instantiate a Tallies collection, register Tally/RegularMesh, and export to
|
||||
# XML
|
||||
tallies_file = openmc.Tallies([tally])
|
||||
tallies_file.export_to_xml()
|
||||
|
|
|
|||
|
|
@ -143,8 +143,7 @@ plot_file.export_to_xml()
|
|||
###############################################################################
|
||||
|
||||
# Instantiate a tally mesh
|
||||
mesh = openmc.Mesh(mesh_id=1)
|
||||
mesh.type = 'regular'
|
||||
mesh = openmc.RegularMesh(mesh_id=1)
|
||||
mesh.dimension = [4, 4]
|
||||
mesh.lower_left = [-2, -2]
|
||||
mesh.width = [1, 1]
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ 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.Mesh()
|
||||
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]
|
||||
|
|
@ -119,8 +119,7 @@ settings_file.export_to_xml()
|
|||
###############################################################################
|
||||
|
||||
# Instantiate a tally mesh
|
||||
mesh = openmc.Mesh()
|
||||
mesh.type = 'regular'
|
||||
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]
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ 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.Mesh()
|
||||
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]
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ 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.Mesh()
|
||||
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]
|
||||
|
|
|
|||
|
|
@ -155,8 +155,7 @@ settings_file.export_to_xml()
|
|||
###############################################################################
|
||||
|
||||
# Instantiate a tally mesh
|
||||
mesh = openmc.Mesh(mesh_id=1)
|
||||
mesh.type = 'regular'
|
||||
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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue