I am using the following code to generate a paramak shell geometry, though the issue also happens with cylinders (paramak.CenterColumnShieldCylinder).
R = 5
t2 = 2
t3 = 3
t4 = 4
sphere_inner = paramak.SphericalShell(inner_radius=0,shell_thickness=R,name='sphere-inner',rotation_angle=360)
sphere_second = paramak.SphericalShell(inner_radius=R,shell_thickness=t2,name='sphere-second',rotation_angle=360)
sphere_third = paramak.SphericalShell(inner_radius=R+t2,shell_thickness=t3,name='sphere-third',rotation_angle=360)
sphere_fourth = paramak.SphericalShell(inner_radius=R+t2+t3,shell_thickness=t4,name='sphere-fourth',rotation_angle=360)
my_reactor = paramak.Reactor(shapes_and_components = [sphere_inner,sphere_second,sphere_third,sphere_fourth])
reactor_descr = 'spherical_shell_example'
my_reactor.export_stp(reactor_descr+'.stp',units='m')
my_reactor.export_dagmc_h5m(reactor_descr+'.h5m',min_mesh_size = 0.01, max_mesh_size = 20.)
I then load this .h5m file into an OpenMC environment and follow this example
import openmc
import openmc_plasma_source as ops
import openmc_tally_unit_converter as otuc
import neutronics_material_maker as nmm
filedir = '/path/to/file/'
filename = 'spherical_shell_example.h5m'
bound_dag_univ = openmc.DAGMCUniverse(filename=filedir+filename).bounded_universe()
my_geometry = openmc.Geometry(root=bound_dag_univ)
mat1 = nmm.Material.from_library(name='DT_plasma').openmc_material
mat1.name = 'sphere-inner'
mat2 = nmm.Material.from_library(name='tungsten').openmc_material
mat2.name = 'sphere-second'
mat3 = nmm.Material.from_library(name='lithium-lead',temperature=900.0).openmc_material
mat3.name = 'sphere-third'
mat4 = nmm.Material.from_library(name='SS_316L_N_IG').openmc_material
mat4.name = 'sphere-fourth'
materials = openmc.Materials([mat1, mat2, mat3, mat4])
tally1 = openmc.Tally()
material_filter = openmc.MaterialFilter(mat3)
tally1 = openmc.Tally(name='blanket_heating')
tally1.filters = [material_filter]
tally1.scores = ['heating']
my_tallies = openmc.Tallies([tally1])
my_settings = openmc.Settings(batches = 1, particles = 100, run_mode = 'fixed source')
my_settings.source = ops.FusionPointSource(fuel="DT", temperature=20000.0, coordinate=(0,0,0))
my_model = openmc.Model(
materials=materials, geometry=my_geometry, settings=my_settings, tallies=my_tallies
)
statepoint_file = my_model.run()
sp = openmc.StatePoint(statepoint_file)
heating_tally = sp.get_tally(name='blanket_heating')
heating_tally.get_values().sum()
tally = otuc.process_tally(
heating_tally,
)
print(tally)
This results in an error of 100% leakage, i.e. all particles lost, even at increased batches and/or particle numbers. DAGMC checks on the geometry show that it has no leaky surfaces or volumes. Material assignments work/load fine.
I am using the following code to generate a paramak shell geometry, though the issue also happens with cylinders (paramak.CenterColumnShieldCylinder).
I then load this .h5m file into an OpenMC environment and follow this example
This results in an error of 100% leakage, i.e. all particles lost, even at increased batches and/or particle numbers. DAGMC checks on the geometry show that it has no leaky surfaces or volumes. Material assignments work/load fine.