# Independent Disc Source in x-dir

**URL:** https://openmc.discourse.group/t/independent-disc-source-in-x-dir/6297
**Category:** User Support
**Created:** [April 20, 2026, 5:26pm UTC](https://openmc.discourse.group/t/independent-disc-source-in-x-dir/6297 "2026-04-20T17:26:47Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![branko89](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@branko89](https://openmc.discourse.group/u/branko89)
#### Post date: [April 20, 2026, 5:26pm UTC](https://openmc.discourse.group/t/independent-disc-source-in-x-dir/6297/1 "2026-04-20T17:26:47Z")

</div>

Is there a way to create an independent disc source facing x-dir? I have created a rectangular one and a cylindrical one facing z-dir, but I cannot get it to face x-dir. I have tried, but the rotation does not seem to work:  
spatial\_dist = stats.CylindricalIndependent(  
r=stats.Uniform(0.0, 15.0),  
phi=stats.Uniform(0.0, 2 \* np.pi),  
z=stats.Discrete([0.0], [1.0]),  
origin=(0.0, 0.0, 0.0)  
)  
spatial\_dist.rotation = (0, 90, 0)

angular\_dist = stats.Monodirectional(reference\_uvw=(1.0, 0.0, 0.0))

src = openmc.IndependentSource(space=spatial\_dist, angle=angular\_dist)

src.space.origin = (-99.0, 0.0, 15.0)  
src.energy = stats.Discrete([5e4], [1.0])  
src.particle = ‘neutron’

---

<div class="post-metadata">

### Author: ![BorAtBH](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/boratbh/32/4342_2.png) [@BorAtBH](https://openmc.discourse.group/u/BorAtBH)
#### Post date: [April 22, 2026, 12:36pm UTC](https://openmc.discourse.group/t/independent-disc-source-in-x-dir/6297/2 "2026-04-22T12:36:49Z")

</div>

Hi! I’ve faced a similar issue with not having the option of x-axis oriented cylindrical sources. Instead of rotating the source I got around it by just creating a point cloud source ([openmc.stats.PointCloud — OpenMC Documentation](https://docs.openmc.org/en/stable/pythonapi/generated/openmc.stats.PointCloud.html)) with appropriate radial and axial distributions. Not elegant, but it works.

---

<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: [April 22, 2026, 11:38pm UTC](https://openmc.discourse.group/t/independent-disc-source-in-x-dir/6297/3 "2026-04-22T23:38:20Z")

</div>

Hi,

it was recently added

```auto
**kwargs – Keyword arguments passed directly to CylindricalIndependent (e.g., origin, r_dir, z_dir).

```

[https://docs.openmc.org/en/latest/pythonapi/generated/openmc.stats.cylindrical\_uniform.html#openmc.stats.cylindrical\_uniform](https://docs.openmc.org/en/latest/pythonapi/generated/openmc.stats.cylindrical_uniform.html#openmc.stats.cylindrical_uniform)

> <https://github.com/openmc-dev/openmc/pull/3474>
>
> \# Description
> 
> This PR generalize CylindricalIndependent to support symmetry a…xis in every direction and not only in z direction.
> 
> This PR also implement cylindrical\_uniform and ring\_uniform to generate uniform spatial distributions over cylinders and rings in a similar way to spherical\_uniform.
> 
> 
> \# Checklist
> 
> \- \[x\] I have performed a self-review of my own code
> \- \[x\] I have run \[clang-format\](https://docs.openmc.org/en/latest/devguide/styleguide.html#automatic-formatting) (version 15) on any C++ source files (if applicable)
> \- \[x\] I have followed the \[style guidelines\](https://docs.openmc.org/en/latest/devguide/styleguide.html#python) for Python source files (if applicable)
> \- \[x\] I have made corresponding changes to the documentation (if applicable)
> \- \[x\] I have added tests that prove my fix is effective or that my feature works (if applicable)

---

<div class="post-metadata">

### Author: ![branko89](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@branko89](https://openmc.discourse.group/u/branko89)
#### Post date: [April 23, 2026, 1:40am UTC](https://openmc.discourse.group/t/independent-disc-source-in-x-dir/6297/4 "2026-04-23T01:40:00Z")

</div>

Thank you! I did something like that where I sampled from a spatial source I define. I will try the PointCloud.

---

<div class="post-metadata">

### Author: ![BorAtBH](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/boratbh/32/4342_2.png) [@BorAtBH](https://openmc.discourse.group/u/BorAtBH)
#### Post date: [April 23, 2026, 6:08am UTC](https://openmc.discourse.group/t/independent-disc-source-in-x-dir/6297/5 "2026-04-23T06:08:35Z")

</div>

Oh, brilliant! Thanks for the heads up

---

<div class="post-metadata">

### Author: ![branko89](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@branko89](https://openmc.discourse.group/u/branko89)
#### Post date: [May 4, 2026, 7:58pm UTC](https://openmc.discourse.group/t/independent-disc-source-in-x-dir/6297/6 "2026-05-04T19:58:02Z")

</div>

So which argument controls the orientation?

---

<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: [May 5, 2026, 1:28pm UTC](https://openmc.discourse.group/t/independent-disc-source-in-x-dir/6297/7 "2026-05-05T13:28:38Z")

</div>

_r\_dir_

**Python**

```python
spatial_dist = openmc.stats.CylindricalIndependent(
    r=openmc.stats.Uniform(0.0, 15.0),
    phi=openmc.stats.Uniform(0.0, 2*np.pi),
    z=openmc.stats.Discrete([0.0], [1.0]),
    origin=(-99.0, 0.0, 15.0),
    r_dir=(0.0, 1.0, 0.0),
    z_dir=(1.0, 0.0, 0.0),
)

```

**XML**

```xml
<space type="cylindrical"
       origin="-99.0 0.0 15.0"
       r_dir="0.0 1.0 0.0"
       z_dir="1.0 0.0 0.0">
  <r type="uniform" parameters="0.0 15.0"/>
  <phi type="uniform" parameters="0.0 6.283185307179586"/>
  <z type="discrete" parameters="0.0 1.0"/>
</space>

```
