Photons missing from sourcepoint output

Hi there,

I am in the process of building up to a large shielding problem. Within this, I am depleting my core model, restarting from a user defined point (based on activity), and then writing a source file using the sourcepoint setting. However, when checking the contents of this source, despite having photon_transport = True, there are no photons in my source file. Is there an additional setting that must be included?

Thanks in advance, to anyone who has any insight!

Sources in openmc default to have neutrons as the emitted particle.

Perhaps you want to change your source to emit photons, if so then set the openmc.Source.particle='photon'

Link to the docs for source

Thank you for the speedy reply Shimwell!

Excuse my naivety, however is it physical to just replace the Particletype? If I did want a mixed source, is there a way to overwrite the default behaviour or would the approach have to change in obtaining seperate gamma and neutron sources?

Maybe I should clarify in what I mean by “physical”, as the energy spectra for photons and gammas will be quite different?

When assigning the openmc.Settings.source it accepts an iterable of Sources so you can have as many different sources as you like. Different source objects can have different particles.

Ah yes, thank you.
If I wanted to write a gamma source, I am assuming is this not an available feature?

I essentially want to write a source (gamma and neutron, separate or combined) obtained from a core model, and then use openmc.Filesource in a fixed source run, where I have shielding in place. I hope that makes sense!

I have seen examples of using isotropic sources and other custom sources from the fusion workshop, however havent come across many where the source is written to file (and none for writing a photon source). My geometry will become relatively complex and I would like to maintain the best spatial and spectral photon sources :slight_smile:

Hi all,
Maybe I am confused about the functionaltiy of sourcepoint… Does it tally the source particles and then just assign ALL to neutrons, or does it not include any photons?

Is this also the same for the surface source writing class?

You would need to add space, energy distributions and such but here is the minimal example. Let me know if this works for you

example with just a photon source

source = openmc.Source()
source .particle = 'photon'
settings = openmc.Settings()
setings.source = [source]
settings.photon_transport=True

example only neutron source

source = openmc.Source()
source .particle = 'neutron'
settings = openmc.Settings()
settings.source = [source]
settings.photon_transport=True # you may still want this on to get photons made by neutrons

example with mixed photon neutron source

photon_source = openmc.Source()
photon_source .particle = 'photon'
neutron_source = openmc.Source()
neutron_source .particle = 'neutron'
settings = openmc.Settings()
settings.source = [photon_source, neutron_source]
settings.photon_transport=True
1 Like

Thank you for your response. Based on this, I believe I will use surface tallying to obtain the spatial and energy distributions. Is there functionality to obtain angular distribution of different particle types?

I have the same needs. But it seems that OpenMC does not support generating photon source for a fixed source run.

7. Execution Settings — OpenMC Documentation

Hi there,
I believe my issue has been remedied through the use of surf_source_write. This way, even with a DAGMC geometry, I have been able to produce neutron and photon sources provided the surfaces of interest. If my interpretation is correct, sourcepoint will simply grab the fission source bank; whereas surf_source_write will essentially do the particle current crossing the given surfaces.

Thanks for pointing out this!! I was mislead by the documentation. surf_source_write does record both neutron and photon.

@Shimwell Maybe we should remove or modify this line from the documentation as it may mislead users:

Features not implemented: Generating a photon source from a neutron calculation that be used for a later fixed source photon calculation

1 Like

@kingyue Improvements to the documentation are most welcome. Feel free to make a pull request with the changes you would like.