Hello, OpenMC community members. I am trying to use openmc simulate a 1D deep penetration problem with weight windows generated by openmc itself. Referring to the fusion project, I used the following codes to generate weight windows:
% create mesh for weight window
mesh = openmc.RegularMesh()
mesh.lower_left = (0.0, -1.0, -1.0)
mesh.upper_right = (220.0, 1.0, 1.0)
mesh.dimension = (88, 1, 1)% create flux tally at mesh
mesh_filter = openmc.MeshFilter(mesh)
particle_filter = openmc.ParticleFilter(‘neutron’)
flux_ty = openmc.Tally(name=“flux tally”)
flux_ty.filters = [mesh_filter, particle_filter]
flux_ty.scores = [“flux”]
tallies.append(flux_ty, merge=True)% add mesh flux tally to the model
model = openmc.Model(geometry, materials, settings, tallies)% generate and reuse weight window
wwg = openmc.WeightWindowGenerator(mesh, energy_bins, particle_type=“neutron”)
model.settings.batches = 1000
model.settings.particles = 500000
model.settings.weight_window_generators = wwg
Note that I did not know how to apply weight window generator to 1D geometry, so I modified the 1D geometry to 3D by adding Y/Z reflective boundaries.
Then, I ploted the lower bounds of generated weight windows, i.e. (larger energy group indexes mean higher energy here)
In this problem, a fixed source was defined at the region from x=0 to x=170, so less particle events can be tallied at the region of x>210. Besides, the fixed source has a very small probabilities for high-energy groups, which caused large uncertainties for tallied fluxes of high-energy group.
After a simulation of 5E+08 particle histories with the weight window generator, the generated weight windows showed a large amount of meaningless lower bound values (-1). To my knowledge, the generated weight windows are updated on the fly and used during openmc’s simulation. It took more time but did not give good weight windows to lower down uncertatities. It should be my misunderstanding about how to use openmc.WeightWindowGenerator
.
Besides, is it suggested to generate weight windows firstly by openmc.WeightWindowGenerator
and then use the generated weight windows by openmc.WeightWindows
for simulation? or just use the first one and update it on the fly during simulation?