# Rotating Geometry

**URL:** <https://openmc.discourse.group/t/rotating-geometry/3811>\
**Category:** User Support\
**Created:** [January 9, 2024, 6:52pm UTC](https://openmc.discourse.group/t/rotating-geometry/3811 "2024-01-09T18:52:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![trajan061](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@trajan061](https://openmc.discourse.group/u/trajan061)\
**Post date:** [January 9, 2024, 6:52pm UTC](https://openmc.discourse.group/t/rotating-geometry/3811/1 "2024-01-09T18:52:01Z")

</div>

This is my first time posting and my first time using OpenMC. I was wondering how you would rotate geometry here? Right now, I am conducting a criticality test on 8 plutonium rods and they need to be rotated 26.33 degrees into the x-axis, here is what I have set up for my flux distribution to visualize the geometry:

 ![Screenshot 2024-01-09 105138](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/8/8f7a19abf14dc9a1acba02d087ab9842a4b2de1c.png)

---

<div class="post-metadata">

**Author:** ![tjlaboss](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/tjlaboss/32/1390_2.png) [@tjlaboss](https://openmc.discourse.group/u/tjlaboss)\
**Post date:** [January 9, 2024, 7:18pm UTC](https://openmc.discourse.group/t/rotating-geometry/3811/2 "2024-01-09T19:18:23Z")

</div>

Use `cell.rotation` or `cell.rotation_matrix`.

[https://docs.openmc.org/en/stable/pythonapi/generated/openmc.Cell.html](https://docs.openmc.org/en/stable/pythonapi/generated/openmc.Cell.html)

---

<div class="post-metadata">

**Author:** ![trajan061](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@trajan061](https://openmc.discourse.group/u/trajan061)\
**Post date:** [January 10, 2024, 10:53pm UTC](https://openmc.discourse.group/t/rotating-geometry/3811/3 "2024-01-10T22:53:14Z")

</div>

I just tried that and I seem to be running into an issue saying that it cannot apply the rotation:

RuntimeError: Cannot apply a rotation to cell 3 because it is not filled with another universe application called MPI\_Abort(MPI\_COMM\_WORLD, -1) - process 0 [unset]: write\_line error; fd=-1 buf=:cmd=abort exitcode=-1 : system msg for write\_line failure : Bad file descriptor

---

<div class="post-metadata">

**Author:** ![tjlaboss](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/tjlaboss/32/1390_2.png) [@tjlaboss](https://openmc.discourse.group/u/tjlaboss)\
**Post date:** [January 10, 2024, 11:06pm UTC](https://openmc.discourse.group/t/rotating-geometry/3811/4 "2024-01-10T23:06:08Z")

</div>

Place all the cells that needs to be rotated in a Universe, fill a new Cell with that Universe, and apply the rotation to that Cell.
