Hi OpenMC experts,
I’ve encountered a problem when using OpenMC to study a Fixed-Source Transmutation problem and the associated decay photon spectrum.
When trying to simulate a decay-only scenario during the whole activation process by setting the source rate to zero, negative nuclide densities appear. I also noticed that this issue occurs particularly when only the nuclide H1 (e.g., in water) is defined.
Other materials seem to work fine so far.
WARNING: nuclide Cd107 in material2 is negative (density = -1.9449206001183648e-19 atom/b-cm)
WARNING: nuclide Sm146 in material2 is negative (density = -1.6800623999344763e-21 atom/b-cm)
Moreover, this leads to an error when using the get_decay_photon_energy() function. In a decay-only water problem(2 time steps, 1 day/step), we shouldn’t get any photon intensity, but the function still returns incorrect results.
Just wanted to share this situation — any suggestions or insights would be greatly appreciated.
Thanks!
import openmc
import openmc.deplete
import math
water = openmc.Material(2, name="water")
water.depletable = True
water.volume = 20 * 20 * 20 # cm³
water.add_nuclide('H1', 2.0)
water.add_nuclide('O16', 1.0)
water.set_density('g/cm3', 1.0)
materials = openmc.Materials([water])
x_min = openmc.XPlane(x0=-10, boundary_type='vacuum')
x_max = openmc.XPlane(x0=10, boundary_type='vacuum')
y_min = openmc.YPlane(y0=-10, boundary_type='vacuum')
y_max = openmc.YPlane(y0=10, boundary_type='vacuum')
z_min = openmc.ZPlane(z0=-10, boundary_type='vacuum')
z_max = openmc.ZPlane(z0=10, boundary_type='vacuum')
cube = +x_min & -x_max & +y_min & -y_max & +z_min & -z_max
cube = openmc.Cell(region=cube, fill=water)
universe = openmc.Universe(cells=[cube])
geometry = openmc.Geometry(universe)
source = openmc.IndependentSource()
source.space = openmc.stats.Point((0, 0, 0))
source.angle = openmc.stats.Isotropic()
source.energy = openmc.stats.Discrete([14e6], [1.0])
source.particle = 'neutron'
settings = openmc.Settings()
settings.batches = 2
settings.inactive = 0
settings.particles = 100000
settings.source = source
settings.run_mode = 'fixed source'
model = openmc.Model(geometry, materials, settings)
chain_file = "./chain_endfb80_pwr.xml"
operator = openmc.deplete.CoupledOperator(model, chain_file, normalization_mode='source-rate')
test_timesteps = [1 * 24 *3600, 1 * 24 *3600]
source_rates = [0,0]
integrator = openmc.deplete.PredictorIntegrator(operator, test_timesteps, source_rates=source_rates)
integrator.integrate()
