# Determine TRISO Locations

**URL:** <https://openmc.discourse.group/t/determine-triso-locations/3001>\
**Category:** User Support\
**Created:** [May 15, 2023, 1:36pm UTC](https://openmc.discourse.group/t/determine-triso-locations/3001 "2023-05-15T13:36:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanstwrt](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@ryanstwrt](https://openmc.discourse.group/u/ryanstwrt)\
**Post date:** [May 15, 2023, 1:36pm UTC](https://openmc.discourse.group/t/determine-triso-locations/3001/1 "2023-05-15T13:36:54Z")

</div>

Good morning,

I am using a modified input of the OpenMC fuel compact from Cardinal ([Multiphysics for a TRISO Gas Cooled Compact | Cardinal](https://cardinal.cels.anl.gov/tutorials/triso_multiphysics.html)). I would like to extract the TRISO particle locations for the entire compact, however, I am only able to find the original TRISO locations in the lattice. Any suggestions on how to find the TRISO locations throughout the compact? Thanks!

-Ryan

---

<div class="post-metadata">

**Author:** ![ligross](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/ligross/32/1653_2.png) [@ligross](https://openmc.discourse.group/u/ligross)\
**Post date:** [May 16, 2023, 4:21am UTC](https://openmc.discourse.group/t/determine-triso-locations/3001/2 "2023-05-16T04:21:10Z")

</div>

Hi Ryan,

I’ve also been looking into modeling TRISO recently. Have you come across [this OpenMC python notebook](https://github.com/openmc-dev/openmc-notebooks/blob/main/triso.ipynb)? I believe they would be stored in the variable `centers` from this example, which calls the `openmc.model.pack_spheres` method. It seems a similar variable exists, named `rand_spheres`, in the Cardinal tutorial.

Let me know if this answered your question,

Lewis

---

<div class="post-metadata">

**Author:** ![ryanstwrt](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@ryanstwrt](https://openmc.discourse.group/u/ryanstwrt)\
**Post date:** [May 18, 2023, 1:34pm UTC](https://openmc.discourse.group/t/determine-triso-locations/3001/3 "2023-05-18T13:34:54Z")

</div>

Hi Lewis,

Thank you for the reply! So I can grab the pebble locations for my original fuel universe that I create by looping over the the `openmc.model.pack_spheres` method. We then take these TRISO and fill multiple universes with them (i.e. TRISO filled cylinders in a compact). This results in us having multiple regions with TRISO particles in them (as we axially stack these compacts as well). I am trying to figure out if I can access the centers of each TRISO throughout the entire compact so that I can use this information in a coupled simulation with Bison in the future.

I have been trying to loop over the various cell/universes to obtain this information, but all of the TRISO particles seem to have the same locations.

So I can grab the TRISO locations in the original universe (thanks again for this), but I am not sure how to grab the TRISO locations in the various compacts that are created to make a full HTGR compact. Any ideas there?

-Ryan

---

<div class="post-metadata">

**Author:** ![ligross](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/ligross/32/1653_2.png) [@ligross](https://openmc.discourse.group/u/ligross)\
**Post date:** [May 19, 2023, 1:23am UTC](https://openmc.discourse.group/t/determine-triso-locations/3001/4 "2023-05-19T01:23:08Z")

</div>

Are you able to share the exact script you are using? It is a bit hard to say why they all have the same location without seeing your exact code. My guess is you are repeatedly printinig out the original universe, as opposed to the ones instantiated throughout your problem. You should have some line similar to this  
`trisos = [openmc.model.TRISO(r_PyC_outer, triso_univ, center) for center in centers]`, which is a list of initialized TRISO particles. You can print them, e.g. `print(trisos[0])` to get information about their position. Is this what you are doing?

---

<div class="post-metadata">

**Author:** ![April](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@April](https://openmc.discourse.group/u/April)\
**Post date:** [May 20, 2023, 2:55am UTC](https://openmc.discourse.group/t/determine-triso-locations/3001/5 "2023-05-20T02:55:18Z")

</div>

Hi Ryan,

Yes, you are correct that there are a single-compact’s worth of TRISO coordinates (and cells) in the OpenMC model. These do not get duplicated - instead, when we fill them into multiple universes in a lattice, the neutron’s coordinates just get translated to a different reference frame with that single-compact’s-worth-of-TRISOs.

If you know the centroid of each of the lattice elements, you could make a loop over those centroids, and just copy the TRISO coordinates (shifted to the lattice centroid) to get unique coordinates for all of the actual TRISOs.

Would that work for your use case?

-April

---

<div class="post-metadata">

**Author:** ![ryanstwrt](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@ryanstwrt](https://openmc.discourse.group/u/ryanstwrt)\
**Post date:** [June 5, 2023, 2:35pm UTC](https://openmc.discourse.group/t/determine-triso-locations/3001/6 "2023-06-05T14:35:54Z")

</div>

Hi April,

Wonderful, I was wondering if this might have been the case. Thank you for letting me know. Yes, we ended up just copying the TRISO coordinates and shifting them accordingly. This method was simple and easy to use, thanks for the suggestion!

-Ryan
