Universes and Lattices

Efficient modeling of repeated structures

What you'll learn

After the first pin · 3 / 1413 min read
  • Define a universe by tagging its cells with u=, then place it in a host cell with fill=.
  • Build separate universes for a fuel pin, a guide tube, and a water hole, and mix them in one model.
  • Write a lattice cell that defines a single pitch element, with lat=1 for rectangular and lat=2 for hexagonal.
  • Read and write the index ranges and fill map of a fill=-2:2 -2:2 0:0 array.
  • Offset a filled universe with a translation vector in parentheses after fill=.

Before you start

Why Use Universes?

Nuclear systems contain many identical components. Instead of defining hundreds of fuel pins individually, universes let you create one template and reuse it everywhere.

Key Benefits

Efficiency

Define once, use everywhere

Consistency

All instances identical

Maintenance

Change template, update all

Memory

Reduced input file size

Creating Your First Universe

A universe is a complete geometry template. Let's build a simple fuel pin universe step by step.

Step 1: Define Surfaces

mcnp
c Fuel pin surfaces
1  cz   0.4096    $ Fuel radius
2  cz   0.4178    $ Gap radius  
3  cz   0.4750    $ Clad radius

Step 2: Create Universe Cells

mcnp
c Universe 1: Fuel pin
10  1  -10.4   -1     u=1  imp:n=1    $ UO2 fuel
11  0           1 -2  u=1  imp:n=1    $ Helium gap
12  2  -6.56    2 -3  u=1  imp:n=1    $ Zircaloy clad
13  3  -0.714   3     u=1  imp:n=1    $ Water (infinite)

The `u=1` parameter assigns all cells to universe 1. Cell 13 extends to infinity, ensuring the universe fills all space.

Step 3: Use the Universe

mcnp
c Place fuel pin in assembly
20  0  10 -11 12 -13  fill=1  imp:n=1    $ Pin location

c Boundary surfaces
10  px  -0.63    $ Pin boundaries
11  px   0.63    $ (1.26 cm pitch)
12  py  -0.63
13  py   0.63

The `fill=1` parameter places universe 1 inside the cell boundaries.

Multiple Universe Types

Real assemblies need different components. Create separate universes for each type, then mix them as needed.

mcnp
c Universe 1: Fuel pin (already defined)

c Universe 2: Guide tube  
25  2  -6.56   -4     u=2  imp:n=1    $ Zircaloy tube (solid)
26  3  -0.714   4     u=2  imp:n=1    $ Water outside tube

c Universe 3: Water hole
30  3  -0.714         u=3  imp:n=1    $ Pure water

c Additional surface
4  cz   0.612    $ Guide tube radius

Each universe serves a specific purpose: fuel pins for power, guide tubes for control rods, water holes for neutron moderation. Note that for a realistic hollow guide tube, you would need inner and outer radius surfaces.

Rectangular Lattices

For regular arrays, lattices automatically place universes in a grid pattern. This is perfect for fuel assemblies.

Simple 3×3 Lattice

mcnp
c 3x3 lattice universe
c The lattice cell defines ONE unit element (one pitch).
c MCNP tiles space by repeating this element.
c lat=1 → rectangular lattice  (lat=2 → hexagonal)
100  0  20 -21 22 -23  lat=1  u=10  imp:n=1
     fill=-1:1 -1:1 0:0    $ ix:jx iy:jy iz:jz index ranges
     1 1 1                 $ Row -1: fuel-fuel-fuel
     1 2 1                 $ Row  0: fuel-guide-fuel  
     1 1 1                 $ Row  1: fuel-fuel-fuel

c Single lattice element boundaries (1.26 cm pitch)
20  px  -0.63    $ Half-pitch left
21  px   0.63    $ Half-pitch right
22  py  -0.63    $ Half-pitch bottom
23  py   0.63    $ Half-pitch top

The `lat=1` creates a rectangular lattice. Numbers in the fill data specify which universe goes in each grid position.

Using the Lattice

mcnp
c Place 3x3 assembly in reactor
200  0  30 -31 32 -33  fill=10  imp:n=1    $ Assembly location

c Assembly boundaries  
30  px  -2.5     $ Assembly box
31  px   2.5
32  py  -2.5
33  py   2.5

Realistic PWR Assembly

Let's create a simplified 5×5 PWR assembly with proper guide tube placement.

mcnp
c 5x5 PWR assembly
c Again, the lattice cell defines a single pitch element.
300  0  40 -41 42 -43  lat=1  u=20  imp:n=1
     fill=-2:2 -2:2 0:0    $ 5x5 grid (indices -2 to 2)
     1 1 1 1 1             $ Row -2: all fuel
     1 1 2 1 1             $ Row -1: guide tube
     1 2 3 2 1             $ Row  0: guide-instrument-guide
     1 1 2 1 1             $ Row  1: guide tube
     1 1 1 1 1             $ Row  2: all fuel

c Single lattice element (1.26 cm pitch)
40  px  -0.63    $ Half-pitch
41  px   0.63
42  py  -0.63
43  py   0.63

This pattern places guide tubes at strategic locations for control rod insertion and includes an instrument tube in the center.

Positioning and Transformations

Universes can be positioned anywhere using translation vectors or transformation cards.

Translation Vectors

mcnp
c Place assemblies at different positions
c Each cell defines a box using px/py planes
c (positive sense of lower bound, negative sense of upper)
400  0  50 -51 52 -53  fill=20 (0 0 0)      imp:n=1    $ Assembly 1
401  0  54 -55 56 -57  fill=20 (10 0 0)     imp:n=1    $ Assembly 2
402  0  58 -59 60 -61  fill=20 (0 10 0)     imp:n=1    $ Assembly 3
403  0  62 -63 64 -65  fill=20 (10 10 0)    imp:n=1    $ Assembly 4

Translation vectors in parentheses specify the (x,y,z) offset for each universe placement.

Working with universes in practice

One rule about universe design is not a preference but a requirement: the outermost cell of a universe must extend to infinity. A universe is a template, and the cell that fills it gets clipped by the container it is placed into — so if the template's own outer cell stops at a finite boundary, there is a shell of undefined space between where the template ends and where the container's wall is. MCNP reports that as a lost particle, sometimes thousands of cycles in.

Everything else is bookkeeping that pays off later. Keep each universe to one component, number its surfaces in a consistent block so you can tell at a glance which universe a surface belongs to, and say in a comment what the universe is for. On the lattice side, the failure mode is almost always a mismatch: a fill index range that does not match the number of map entries you wrote, or a universe number in the map that does not exist. Neither of these is necessarily an error MCNP catches, which is why building up from a 3×3 case before writing a seventeen-row map is worth the extra run.

Building your first universe model

The order of work follows the structure of the input. Decide first what geometry repeats — for a reactor that is nearly always the fuel pin — and define the surfaces that bound it. Add u=N to each of those cells to assign them to universe N, and make the outermost of them infinite as described above. At that point the universe exists but appears nowhere; it enters the model when some other cell carries fill=N.

Then check it before scaling up. Plot the geometry, and run a short calculation to see whether any particles are lost. A universe model that is subtly wrong tends to run — MCNP will happily track through a geometry with a gap in it until a particle happens to enter the gap — so the absence of an error message on a five-cycle run is not the same as a correct model.

Card semantics on this page follow MCNP6.3.1 Theory & User Manual (LA-UR-24-24602 Rev. 1), §5.5.5 Repeated Structures and §5.9.15 SD: Segment Divisor.

Full reference list on the attribution page.

Check yourself

  • Tag a set of cells with u= and place that universe with fill=?
  • Build fuel pin, guide tube, and water hole universes and mix them in one model?
  • Write a lattice cell, choosing lat=1 or lat=2 to suit the pitch?
  • Read and write the index ranges and fill map of a fill=-2:2 -2:2 0:0 array?
  • Offset a filled universe with a translation vector after fill=?