Geometry problem

Dear Experts,

I am currently working on a research reactor and have encountered a challenge involving the arrangement of an 8x8 assembly within the reactor vessel. There is a block obstructing the path, and it needs to remain in place due to design constraints. This block is causing issues with crossing the vessel and properly fitting the assembly.

I am seeking advice on how to resolve this issue while maintaining the integrity of the assembly and the overall design. Any suggestions on potential solutions or modifications that could help address this problem would be greatly appreciated.


image

Thank you for your expertise.
wwr-sm.ipynb (425.4 KB)

Hi Umarov,
Sorry, I can’t understand whether you want to ‘keep the vessel and cut the beryllium to follow the cylinder size’ or ‘keep the Be reflector and slice the cylinder vessel’?
If you want to cut the beryllium, I think you just need to fill the core assembly lattice universe into the inner cylinder surface.
But if you want to keep the beryllium reflector, then you need to fill the core assembly lattice into a region made up of surface boundaries, and then use those surfaces to cut the reactor vessel as you want, i.e. outside the inner cylinder surface, inside the outer cylinder surface, and outside the core assembly region.
I think you can try which fits your requirements.

You can also use the ‘outer’ parameter from a rectangular lattice to fill all space outside the lattice if needed. It will make your input simpler since you don’t need to declare a specific cell filled with some material between the core assembly lattice and the reactor cylinder vessel.
https://docs.openmc.org/en/latest/pythonapi/generated/openmc.RectLattice.html#openmc.RectLattice

Also, I recommend you use geometry debug to check if there are some overlapping cells in your model.

Dear Wahid,

Thank you for your advice! I want to keep the beryllium reflector. However, I am encountering an error and would like some guidance.
Here is my code:

assembly.universes = [
[[Be4,Be3,Be,Be,Be,Be,Be3,Be4],
[Be3,Be,Be,Be,Be,Be,Be,Be3],
[Be,root,root,root_bor,root,root_bor,root,Be],
[Be,root,root_bor,root_bor,root,root_bor,root,Be],
[Be,root,root_bor,root,root_bor,root_bor,root,Be],
[Be,root,root,root,root_bor,root,root,Be],
[Be3,Be,Be,Be,Be,Be,Be,Be3],
[Be4,Be3,Be,Be,Be,Be,Be3,Be4]]
]

#COREEEEEE

H_UP = openmc.ZPlane(z0 = 29)
H_DOWN = openmc.ZPlane(z0 = -29)

Define the inner and outer cylinders

inner_cylinder = openmc.ZCylinder(r=35)
outer_cylinder = openmc.ZCylinder(r=36, boundary_type=‘vacuum’)

Define the regions

vessel_region = -outer_cylinder & +inner_cylinder & -H_UP & +H_DOWN
vwfill_region = -inner_cylinder & -H_UP & +H_DOWN

assembly_region = -openmc.ZCylinder(r=35)
assembly_cell = openmc.Cell(name=‘quarter assembly cell’, fill=assembly, region=vwfill_region)

Create cells and assign regions

v = openmc.Cell(name=‘v’)
v.fill = Al
v.region = vessel_region

Add cells to universe

quarter_assembly_universe = openmc.Universe(cells=[v, assembly_cell])

Define geometry and export

geometry = openmc.Geometry(quarter_assembly_universe)
geometry.export_to_xml()

and the error:

What am i doing wrong?


here is how it should look

I think you need to check your geometry. Maybe you forgot to declare the outer universe on lattice 14. Check your geometry.xml to find which cells made up the lattice 14.
Try the geometry debug feature, it could help you find the overlapping cells and debug your geometry.

openmc.run(geometry_debug=True)

Hi Umarov,
from your notebook, I found various cell overlaps in your input, so I changed some regions defined for your cells. this is the modified notebook
wwr-smxW.ipynb (483.1 KB)

besides, you also forgot to declare the universe for the outer region of the defined lattice. I add a universe filled with Be for lattice outer

assembly.outer = openmc.Universe(cells=[openmc.Cell(fill=beril)]) # region outside lattice filled with beryllium

here are the calculation results from your settings
image

I also noticed that your fuel assembly geometry differs from the old model you asked for before, please check

Dear Wahid,

Thank you a lot for your support! Now i started understanding better.
However i have 2 morequestions:

  1. Is there any command to upgrade OpenMC version, my version is 13.0, want to iupgrade to 15.0;

  2. second question is about plotting, i am facing an error while plotting:

my command - Be3.plot(width=(2.0, 2.0), origin=(0.0, 0.0, 0.1))

error -

but my materials.xml contains cross_sections.xml file.

What am i doing wrong ?

Hi Umarov,
Regarding the update to your openmc, I think it will depend on how you obtain your openmc.
I am compiling my openmc from source, so I only need to git pull the source code and then rebuild the openmc executable followed by updating the python API with pip3 install . from my openmc root folder or python -m pip install .
If you are using other options when obtaining openmc, I think you can check the detailed installation doc. again
https://docs.openmc.org/en/latest/usersguide/install.html#usersguide-build

Regarding the issue with cross_sections.xml, is it from the latest notebook? Have you tried to check your default openmc nuclear data from your terminal?

echo $OPENMC_CROSS_SECTIONS

You can also use the materials.cross_sections to set the path to your nuclear data from your input script

materials.cross_sections = '/mnt/d/openmc/endfb80_hdf5/cross_sections.xml'

I think you have done this on your script, so the question is, did this file exist in that path?
you can add those path to your .profile file on your $HOME if needed

export OPENMC_CROSS_SECTIONS=/mnt/d/openmc/endfb80_hdf5/cross_sections.xml

Also, your fuel material uses high-enriched uranium, 2.46E-3 #/barn-cm U-235 and 2.46E-4 #/barn-cm U-238, that’s almost 92%mol U-235. I think you need to check your fuel composition.

Dear Wahid,

Regarding the issue with the cross_sections.xml file, I have checked the latest notebook, and the file does indeed exist at the specified path.
image
Additionally, I’ve confirmed that my fuel material is using high-enriched uranium with a composition of 2.46E-3 #/barn-cm U-235 and 2.46E-4 #/barn-cm U-238, which equates to approximately 92% U-235.
Despite these verifications, the issue persists. I have followed all recommended steps, including setting the OPENMC_CROSS_SECTIONS environment variable and verifying the file’s existence and path. However, the problem remains unresolved.

I would appreciate any further guidance or suggestions you might have to address this issue.

Thank you for your assistance.

Can you show me what is the terminal results from your working directory (where you have your xml.file) if you do this command?

which openmc
openmc --version
pwd
ls
echo $OPENMC_CROSS_SECTIONS
openmc

sure,


I tried to launch another problem with the same library path,
image
and its working

Wow, that’s interesting.
Have you tried to start from new clean folders?
Copy and paste the material.xml, geometry.xml, and settings.xml to that folder and then do the previous commands.

ls
echo $OPENMC_CROSS_SECTIONS
openmc -g

openmc should run with those xml files, and you can try with xml files that you have successfully run before. After that overwrite those xml files with the case that you want to check.

I hope it can help you localize the problem, because you said that you have another folder that has all the required xml.files and openmc works well on those folder. That’s a good sign that you have a good set up and the problem only exist on specific folders