# Photon transport discrepancies with MCNP and Serpent

**URL:** <https://openmc.discourse.group/t/photon-transport-discrepancies-with-mcnp-and-serpent/1574>\
**Category:** Validation and Verification\
**Created:** [November 29, 2021, 1:57pm UTC](https://openmc.discourse.group/t/photon-transport-discrepancies-with-mcnp-and-serpent/1574 "2021-11-29T13:57:00Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [December 15, 2021, 1:32pm UTC](https://openmc.discourse.group/t/photon-transport-discrepancies-with-mcnp-and-serpent/1574/8 "2021-12-15T13:32:35Z")

</div>

Glad to hear you’re seeing good agreement. Regarding the source question, yes, if we had a general source filtering capability, that would make it easy as you could just ask it to filter on the cell you want the source to be in. In the absence of that, if you wanted to sample a source uniformly over a spherical shell (one of your concentric spheres), you’d have to either write a C++ custom source routine (described [here](https://openmc.discourse.group/t/how-to-define-a-source-in-the-shape-of-a-spherical-shell/1014/6)) or use the new `PowerLaw` distribution as follows:

```auto
r = openmc.stats.PowerLaw(r_min, r_max, 1)
theta = openmc.stats.Uniform(0, pi)
phi = openmc.stats.Uniform(0, 2*pi)
spatial_dist = openmc.stats.SphericalIndependent(r, theta, phi)
source = openmc.Source(space=spatial_dist, ...)

```

---

_[View the full topic](https://openmc.discourse.group/t/photon-transport-discrepancies-with-mcnp-and-serpent/1574)._
