Weight Windows for Neutrons and Photons

Hi there, I am trying to make a shielding calculation. Similar to the example shown later, I have used weight window successfully when I transport only neutrons. But when I try to make a coupled neutron-photon transport simulation, I don’t know how to use weight windows for both neutrons and photons.

weight windows example:

……
ww = openmc.WeightWindows(
    mesh=my_ww_mesh,
    upper_ww_bounds=upper_ww_bounds,
    lower_ww_bounds=lower_ww_bounds,
    particle_type='neutron',
    energy_bins=(0.0, 100_000_000.),  
    survival_ratio=5
)
sett = openmc.Settings()
……
sett.weight_windows = ww

Any help regarding this topic would be very appreciated.

Kimberly

Thanks for posting and great to see the examples in the neutronics-workshop are useful :smile:

The WeightWindows class has a particle attribute which defaults to 'neutron' which it looks like you have found.

This attribute can also be set to photon but it can only accept one or the other.

So I would think you want two weight windows. One for photons and one for neutrons.

model.settings.weight_windows attribute accepts an iterate (list) of weight windows so then you can apply both to you model. You would want different values in each weight window but here is some pseudo code

neutron_ww = openmc.WeightWindows(
    mesh=my_ww_mesh,
    upper_ww_bounds=upper_ww_bounds,
    lower_ww_bounds=lower_ww_bounds,
    particle_type='neutron',
    energy_bins=(0.0, 100_000_000.),  
    survival_ratio=5
)

photon_ww = openmc.WeightWindows(
    mesh=my_ww_mesh,
    upper_ww_bounds=upper_ww_bounds_2,
    lower_ww_bounds=lower_ww_bounds_2,
    particle_type='photon',
    energy_bins=(0.0, 100_000_000.),  
    survival_ratio=5
)

my_settings = openmc.Settings()
my_settings.weight_windows = [neutron_ww, photon_ww]
1 Like

Thanks @Shimwell for your reply! I will have a look through this and seems like it should work for my simulation.