Gamma Detector Modeling

Hello! I’m new to using OpenMC and am trying to use it to model a gamma ray detector. Right now I’m just trying to start with a simple simulation of a fixed point source a distance away from a sodium iodide bar. It doesn’t seem like there’s currently a method to model the photon’s energy deposition, so my current approach is using a flux tally on the xy plane and a flux tally on the yz plane. Just wanted to ask if anyone else has tried modeling this before and if they have any tips or suggestions for how to best go about the model. Thanks!

Hello.
I am also fairly new, but it seems, that a simpler approach would be to use a cell filter as in Pincell example, in section “user-defined tallies”.
It also seems, that pulse-height tally is in the works.

Hi @mattgranados and welcome to the community! The pulse height tally capability for photons was just merged into our develop branch, so if you want to live on the bleeding edge you can build from source to try out this capability. For an example, I would take a look at this test. @cp-f might be able to give some better guidance.

EDIT: @cp-f already put together a very nice example of this feature here.

Thanks for the suggestions, really exciting to see that new pulse height tally. I’ll look into using the develop branch!

Hi,
I tried to run this example"https://github.com/openmc-dev/openmc-notebooks/blob/main/gamma-detector.ipynb" but I got an error "Unable to set “energy distribution” to “None” which is not of type “Univariate” " Why did I get this error?Could you help me ?Thank you

@A66 You may need to download the correct chain file that is used in that notebook here:

1 Like

Hi,
I solved this problem but I got an other error.


Thank you

Sorry, I just replied to the wrong person hence the reason for the repost.

This is because you are running OpenMC on its main branch. Since the pulse height tally is fairly new, it is only available on the develop branch of the repo. Please follow the instructions here to create a new docker image containing the develop branch of OpenMC and you should no longer get that error.

1 Like

I am also looking into gamma detector modeling but specifically for the isotope Rn-222 instead of Cs-127 like the notebook mentions. I have tried many different approaches to import a cross-section library that does support the isotope but it never seems to work. Shortly after I define the materials, I keep receiving the error “RuntimeError: Could not find nuclide Rn222 in the nuclear data library”. I have defined the cross_sections environment variable to the path of the cross_sections.xml file in the ENDF/B-VII.1 library located on the official libraries area on the homepage of the OpenMC website. I have also set the depletion chain environment variable to the ENDF/B-VII.1 Chain (PWR Spectrum) xml file once again from the OpenMC website. I am pretty new to the OpenMC community so please forgive me if some of my questions are naïve. Thanks in advance!

I don’t know the answer to this question either. If you want, you can ask again on the main page. Maybe more people will see it and it will be answered.
Thank you

Hi TejaK, I’m sorry that I’m only answering now, I was on vacation and don’t look in here that often. Are you also in the OpenMC slack? there is usually answered much faster.

This sounds for me like a crosssection error. Actually when I look into the crosssection files I see that they provide them for photons, but not for neutrons - which is strange I think. Maybe cause its a nobel gas with a “short” half-life.

But if you only want to model the gammas it hould be fine.

Regarding the emissions of Radon (are you interested in them?) - they should be produced by the depletion chain.

If this creates problems, you could also add them by hand as a discrete source (compare the gamma detector example).

You could take them from the IAEA or the NNDC whose data both relies on the ENSDF data:

(decay radiation search)

https://www-nds.iaea.org/relnsd/vcharthtml/VChartHTML.html
(decay radiation)

I hope this helps you a bit with your problems.

Christopher

Hi Cristopher,

Thanks for the response! I am currently working on modeling gamma radiation from the decay of radon gas in OpenMC as a proof of concepts before committing to the materials to construct a physical radon detection robot. I ended up adding the Radon by hand as a discrete source like in the example as I did not need the explicit cross section of the isotope. Regarding the slack page for OpenMC, where can I find the link to that?

Thanks so much!
Teja

slack: Slack

Thank you to @cp-f and the OpenMC folks for introducing this functionality. I’ve been building my own models to compare with some IRL gamma detectors I’m testing, and I have a couple questions. I’m relatively new to modeling detectors so excuse me if these are well-known concepts for other software like MCNP.

First, I understand that these are fixed-source calculations and time doesn’t play a role but how does actual time play into these simulated spectrums? For example, if I’m taking a 60-second measurement of a point source with a given activity, how is that represented in the simulated spectrum? Are empirical results and simulated results supposed to be normalized based on the number of particles incident on the detector? So for example, a simulated 1 Ci source will provide the same activity as a real 1/60 Ci source measured for 60 seconds?

Second, how is intrinsic efficiency of the detector accounted for? Is this baked into the model through cross-sections and the geometries used or should post-processing of the data incorporate some type of scaling to account for efficiency.

Thanks again!

Hi rioben,

great that you found your way to OpenMC and no worries, on being relatively new, I hope we can figure that out.

The result from a tally is scaled to one starting particle, to obtain the result of a for example 60 second measurement you would need to multiply that value by the number of emitted particles from your source. This number you would need to calculate by hand. You have the activity, which is the number of decays per second, so you would need to calculate the number of emitted gammas per decay. Usually ENSDF is a good source for this kind of data, which is provided here for example:

https://www-nds.iaea.org/relnsd/vcharthtml/VChartHTML.html

or here:

You can than either multiply the pulse-height tally result with this value or set

source.strength = the number of emitted gammas

in your code which will do the multiplication automatically. If you have an isotropic source you could think about to start the particles only in the direction of the detector which could safe you some simulation time, since I would guess most particles will not hit the detector.

Just for you to keep in mind especially for the Co-60 source there is this summation peak, which is currently not modeled by OpenMC

slide 61 of

Keep also in mind that you will need to apply Gaussian broadening to your results to simulate a realistic detector spectrum.

For the efficiency of the detector it is more complicated, the simulation returns basically the chance that a started particles delivers a certain amount of energy in the active volume. But it can not account for dead time or some loss in the electronics. You would probably need to do some research on that side.

Christopher

Thank you for the thorough response! I’ve been able to apply Gaussian broadening and I’ll check out the LANL resource you shared.

So, tying this back to your example, is it accurate to say you’ve scaled your sources by the variables number_atoms_Cs137 and number_atoms_Ba137_m1?

As for the efficiency, I’ll do some more research.

Yes, so in the example we rely on the data in chain_simple.xml (this file is a shorter version of a file ranging over way more isotopes).

After a decay chain_simple.xml contains a line containing the discrete energies in eV and the intensities (meaning emissions per second per atom).

When you look at the lines 42 in the chain_simple.xml you will find the gamma emissions of Ba-137m1:

  <parameters>4470.0 31817.0 32194.0 36304.0 36378.0 37255.0 661657.0 4.372683136122041e-05 9.525884763557368e-05 0.00017377297596020668 1.6633087848867745e-05 3.2112650589648466e-05 1.0158463048637348e-05 0.004069614128287558</parameters>

First all the energies are listed, then the intensities. From this you can obtain, for example, that every Ba-137m1 isotopes emits on avergage 0.004069614128287558 gammas with the energy 661657.0 eV per second. When we multiply this by the number of atoms we get the total emissions.

This is basically what we are doing in the example, but for all the emitted gamma particles. We calculate the number of atoms of Cs-137 and Ba-137m1. Then we determine all energies and intensities from the chain_simple.xml file. Then the total strength is scaled by the number of atoms.

I hope this helps.

1 Like

@cp-f Thank you for the explanation. I’ve been able to work out the source strength based on your explanation by multiplying activity by intensity by measurement time. However, something that’s confusing me now is the total number of pulses being recorded.

In your example, your Cs137 source strength and Ba137 source strength are on the order of 10^7 and 10^12 respectively and result in a broadened photopeak of roughly 10^10 counts. My Cs137 and Ba137 source strengths are on the order of 10^-8 and 10^-3 and result in a broadened photopeak of roughly 10^-5 counts.

While the scaling seems to make sense, I’m curious how the model registers source strengths and counts that are less than 1? The total number of pulses recorded across all bins in my model is on the order of 10^-2 but the IRL gamma spectrum I’ve recorded with my detector has a photopeak on the order of 10^4 counts alone. Does that mean I’ll have to come up with some type of scaling factor to match results?

So it seems to me that you get a smaller number of counts in the pulse-height tally than you would expect from your setup.

There are several factors that can have an effect on that. Here are some things you could check (what I would do in a debugging the problem process):

  • When you sum up the pht results over the entire energy range you should result in the source.strength value. Otherwise you need to double check how to set this value.
  • Check the position and direction of your source. There is a web browser based openmc plotter (which you can upload your settings.xml for double checking): https://openmc-plot-4zf6u4tg6a-ew.a.run.app/
    This tool by @Shimwell saved me a lot of times.
  • Is there some shielding in front of your active volume (the volume you use for the pulse-height counting)?
  • Maybe you can build a very trivial model to see if the basic concepts work as expected.

I hope this helps. Let me know if you made some progress. I am interested in seeing your results if you want to share them.

Christopher

1 Like

Hi! I’m using OpenMC to model a NaI detector and I’m having trouble plotting the geometry and finding code that includes energy broadening to better display the tallies produced from my detector model. Please let me know if you can help, thank you!