Hello everyone,
I am currently running an OpenMC simulation focused on neutron flux and dose calculations from a fixed neutron source (3e10 n/sec) located in the center of a room with concrete walls (2D geometry). I have a few questions regarding the simulation setup and would greatly appreciate your help.
-
How can I determine the sensitivity of the simulation results to the number of particles and the number of batches I set? What factors should I consider when selecting these parameters?
-
Should I assess the effect of mesh resolution on the results? If so, how can I check its influence on the accuracy of the flux and dose calculations?
-
Regarding the flux tally, if I understand correctly, the calculation is normalized by the source particle flux (particles/sec). So, in my case, to calculate the neutron flux and dose for my specific problem, I would need to multiply the result by the neutron source rate (3e10 n/sec). Is this the correct approach?
-
Finally, assuming the above is correct, how should I verify the effect of the neutron source strength on the dose calculations? Are there any recommended methods for this verification?
Here is a part of my code that I am working on:
"source_position = (xplane_2.x0 + width_inside_room/2, yplane_2.y0 + depth_inside_room/2, 0)
space = openmc.stats.Point(source_position)
angle = openmc.stats.Isotropic()
energy = openmc.stats.Discrete([14e6], [1.0])
source = openmc.IndependentSource(space=space, angle=angle, energy=energy)
source.particle = “neutron”
# Mesh and filter definitions
mesh = openmc.RegularMesh().from_domain(geometry)
mesh.dimension = [800, 800]
mesh_filter = openmc.MeshFilter(mesh)
particle_filter = openmc.ParticleFilter('neutron')
# Flux tally
flux_tally = openmc.Tally(name="flux tally")
flux_tally.filters = [mesh_filter, particle_filter]
flux_tally.scores = ["flux"]
# Dose tally
energy_bins_n, dose_coeffs_n = openmc.data.dose_coefficients(particle="neutron", geometry="AP")
energy_function_filter_n = openmc.EnergyFunctionFilter(energy_bins_n, dose_coeffs_n)
energy_function_filter_n.interpolation = "cubic"
dose_tally = openmc.Tally(name="neutron_dose_on_mesh")
dose_tally.filters = [mesh_filter, particle_filter, energy_function_filter_n]
dose_tally.scores = ["flux"]
tallies = openmc.Tallies([flux_tally, dose_tally])
# Settings
settings = openmc.Settings()
settings.run_mode = "fixed source"
settings.source = source
settings.particles = 10000000
settings.batches = 100
# Create and run model
model = openmc.Model(geometry, materials, settings, tallies)
sp_filename = model.run()
# Process results
flux_tally = sp.get_tally(name="flux tally")
dose_tally = sp.get_tally(name="neutron_dose_on_mesh")
flux_mean = flux_tally.get_reshaped_data(value='mean', expand_dims=True).squeeze()
flux_mean = flux_mean * neutron_flux
flux_std_dev = flux_tally.get_reshaped_data(value='std_dev', expand_dims=True).squeeze()
dose_mean = dose_tally.get_slice(scores=['flux']).mean.reshape(mesh.dimension) "
Thank you very much for your guidance.