# Photon flux discrepancies with EGSnrc, MCNP, and Serpent

**URL:** <https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596>\
**Category:** Validation and Verification\
**Created:** [January 5, 2023, 9:12am UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596 "2023-01-05T09:12:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![hjao](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@hjao](https://openmc.discourse.group/u/hjao)\
**Post date:** [January 5, 2023, 9:12am UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/1 "2023-01-05T09:12:34Z")

</div>

Hello everyone,

We are comparing codes through calculating photon flux in NIST’s ordinary concrete and air. The model is quite simple, we have a 5 rectangular layers of concrete sandwiched between two air regions and we are assessing the volume averaged flux in the concrete layers as well as in the air layer right behind the concrete (from the direction of the source). The source generates photons in an rectangular area, shot directly towards the concrete layers.

The source photon energies are 0.6616 MeV, 1.1732 MeV, 1.3325 MeV with relative intensities of 0.8605, 0.0697, 0.0698.

We are seeing extremely good agreement between EGSnrc and MCNP (both code also simulate electrons, which are not counted in the flux) and good agreement between EGSnrc, MCNP and Serpent, but generally worse agreement between OpenMC and the other codes. OpenMC seems to underestimate flux for lower energies and overestimate the flux for higher energies. I have added a plot of the results for the most center layer of the concrete. Y-axis has volume average flux and X-axis particle energy in MeV.

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/4/408253390148aa652df9b71c10a2abab22495596.png)

Is this level of disagreement in the flux to be expected or does it indicate that something is off? The relative error for all codes are in the order of 0.0001 to 0.001.

My Python code can be found here: [OpenMC\_photon\_flux\_comparison - Pastebin.com](https://pastebin.com/waStcEk0)

---

<div class="post-metadata">

**Author:** ![hjao](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@hjao](https://openmc.discourse.group/u/hjao)\
**Post date:** [January 5, 2023, 9:14am UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/2 "2023-01-05T09:14:06Z")

</div>

Also a picture of the geometry using EGSnrc for easier visualization (couldn’t add it to the original post due to attachment limit). Gray is air, blue is concrete and yellow lines are photon tracks.

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/d/d591cb51f010c5d5d3a09ad9b78d5b335758ed72.png)

---

<div class="post-metadata">

**Author:** ![yrrepy](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/yrrepy/32/2365_2.png) [@yrrepy](https://openmc.discourse.group/u/yrrepy)\
**Post date:** [January 6, 2023, 6:41pm UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/3 "2023-01-06T18:41:07Z")

</div>

Hello,

can you compare with PHITS?

In some past benchmarking, I have noticed discrepancies between MCNP, OpenMC and PHITS.  
With the last two better agreeing with each other than with MCNP.

My benchmark is photons generated as secondaries from neutron capture.

Cheers,  
Perry

---

<div class="post-metadata">

**Author:** ![hjao](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@hjao](https://openmc.discourse.group/u/hjao)\
**Post date:** [January 9, 2023, 7:46am UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/4 "2023-01-09T07:46:41Z")

</div>

Thank you yrrpy for your insight!

Sadly we do not have access to PHITS, but we could run the same model in SCALE (Monaco, MAVRIC). SCALE results seem to agree quite well with MCNP and the other codes.

Image with the added Monaco and MAVRIC results.

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/6/66d35f92cb00f615f87bd2af6f4bca9ca066c672.png)

If we compare the total flux over all energies, the results seem to match up much better. Whether this simply indicates the difference in models at different energies is still uncertain though.

---

<div class="post-metadata">

**Author:** ![yrrepy](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/yrrepy/32/2365_2.png) [@yrrepy](https://openmc.discourse.group/u/yrrepy)\
**Post date:** [January 10, 2023, 5:14pm UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/5 "2023-01-10T17:14:18Z")

</div>

Hi Hando,

Could you provide your MCNP inputs?  
I have MCNP and PHITS; I can very easily convert a MCNP input to PHITS (they share CSG geometry engines).

Tchuss,  
Perry

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [January 13, 2023, 10:44am UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/6 "2023-01-13T10:44:50Z")

</div>

I’ll second @yrrepy’s request — if you can share the MCNP model, that would allow one of us to try to reproduce these results (and dig further into why there is a difference).

---

<div class="post-metadata">

**Author:** ![hjao](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@hjao](https://openmc.discourse.group/u/hjao)\
**Post date:** [January 16, 2023, 7:16am UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/7 "2023-01-16T07:16:31Z")

</div>

Thank you for the replies!

I will try to get the MCNP code from my colleague, who was responsible for the MCNP simulations, so it would be possible to reproduce these results.

Best,  
Hando

---

<div class="post-metadata">

**Author:** ![yrrepy](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/yrrepy/32/2365_2.png) [@yrrepy](https://openmc.discourse.group/u/yrrepy)\
**Post date:** [January 18, 2023, 4:43pm UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/8 "2023-01-18T16:43:15Z")

</div>

Eager and curious to get these inputs and investigate.  
I have some bandwidth for this, this week.

Perry

---

<div class="post-metadata">

**Author:** ![hjao](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@hjao](https://openmc.discourse.group/u/hjao)\
**Post date:** [January 19, 2023, 11:02am UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/9 "2023-01-19T11:02:52Z")

</div>

Sorry for the delay, I got the MCNP code from my colleague.  
I added the inputs to this pastebin: [MCNP inputs - Pastebin.com](https://pastebin.com/gRHpvCrT)

Looking forward to seeing the PHITS results!

---

<div class="post-metadata">

**Author:** ![yrrepy](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/yrrepy/32/2365_2.png) [@yrrepy](https://openmc.discourse.group/u/yrrepy)\
**Post date:** [January 20, 2023, 1:01am UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/10 "2023-01-20T01:01:35Z")

</div>

Hi Hando,

there are too many differences between the OpenMC input and MCNP input to be able to compare them.

The concrete material description substantially differs between the two.  
OpenMC: 52.9% Oxygen, Silicon 33.7%, Iron 1.4%  
MCNP : 57.5% Oxygen, Silicon 30.5%, Iron 0.6%

In MCNP, there are air gaps between the concrete slabs.  
In OpenMC there are not.

Regards,  
Perry

---

<div class="post-metadata">

**Author:** ![hjao](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@hjao](https://openmc.discourse.group/u/hjao)\
**Post date:** [January 20, 2023, 7:32am UTC](https://openmc.discourse.group/t/photon-flux-discrepancies-with-egsnrc-mcnp-and-serpent/2596/11 "2023-01-20T07:32:08Z")

</div>

Hi Perry,

Thank you for your time! I will let my colleague know about the air gaps in the geometry, but in regards to the material composition, it is my error! It seems that the concrete composition labeled as NIST concrete in MCNP, EGS etc. is not quite the same as the concrete described in the NIST’s ESTAR database itself. I corrected the chemical composition for OpenMC and now we have very good agreement between OpenMC and the other codes.

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/8/8ccd6d45c3b621b788255a69a68979045f9a6e1b.png)

Again, thank you for your time and insight!

All the best,  
Hando
