Add universe into universe

Hi everyone,

I have question about universes and cells,

the first try is that, I did a pin cell that the outer material of its cladding is water, and I used the ‘+’ for the clad surface card to define that the water is out of the surface. then I bound with box. and i got a results

then I tried to make the same pin cell, but this time I did not define that the water out of the clad surface, I just define what is inside the bounded box, which is water. and I got different results. “lower value of k”. which seems to be add water to the pin cell.

the problem for me is that:
I want a universe that contains only the pin cell (fuel gap and clad). and another universe that contains only water. then combine them together, in order to give me the same results of the first trial.

What you are describing goes against what I normally think of as a “universe”. Generally, it is recommended to define each universe such that it fills all space. Then, you can use that universe (call it “A”) as a fill in a cell that is contained in a different universe (call it “B”). Parts of universe “A” will effectively be cut off by the bounds of the cell in universe “B”, which is totally fine. Doing it this way ensures that you don’t end up with regions of the problem that have no cell defined.

Now, if you want to define a universe that is filled only with water other than having a hole where a pin-cell universe (containing fuel, gap, clad) will be filled in, you could do this as follows:

water = openmc.Material()
fuel = openmc.Material()
clad = openmc.Material()
...

pitch = 2.0
box = openmc.rectangular_prism(pitch, pitch)
clad_outer_surf = openmc.ZCylinder(r=0.7)
clad_inner_surf = openmc.ZCylinder(r=0.6)
fuel_surf = openmc.ZCylinder(r=0.5)

# Create fuel pin universe
fuel_cell = openmc.Cell(fill=fuel, region=-fuel_surf)
gap_cell = openmc.Cell(region=+fuel_surf & -clad_inner_surf)
clad_cell = openmc.Cell(region=+clad_inner_surf & -clad_outer_surf)
pin_universe = openmc.Universe(cells=[fuel_cell, gap_cell, clad_cell])

# Create universe with water and hole to be filled with pin universe defined above
water_cell = openmc.Cell(fill=water, region=box & +clad_outer_surf)
hole_cell = openmc.Cell(fill=pin_universe, region=-clad_outer_surf)
top_universe = openmc.Universe(cells=[water_cell, hole_cell])