Surface Cards in MCNP

Creating the geometric boundaries that define your model

What you'll learn

First pin cell · 3 / 1012 min read
  • Write a surface card in the order surface number, type, and parameters.
  • Place planes, cylinders, and spheres with px, cz, so, and their variants.
  • Replace a group of surfaces with a macrobody: RCC, RHP, or RPP.
  • Build the concentric cylinders and axial planes that bound a fuel pin.

Before you start

What a surface is

A surface card is a mathematical fence and nothing else: an equation that splits all of space into two half-spaces. It carries no material, no density, and no particle importance. Those arrive later, on cell cards that pick a side of each surface and fill the resulting region. One surface can bound many cells; the card itself never decides what lives where.

mcnp
surface_number  type  parameters  $ comment

1  px   5.0    $ Plane at x = 5
2  cz   0.5    $ Cylinder on z-axis, radius 0.5
3  so   10.0   $ Sphere at origin, radius 10

The integer at the start is the label you will write on cell cards. The mnemonic that follows (px, cz, so, …) picks the equation family, and the parameters fix size and position. All lengths are centimetres. A short comment that names the physical boundary — "fuel outer radius", not just "cylinder" — is what you will want when the geometry later fails to plot.

Sense is the failure mode that waits until the cell card. Negative sense means the side where the surface equation is negative (the interior of a cylinder or sphere; the low-x side of a px). Positive sense is the other side. Flip a sign and you can still get a closed-looking model that fills the wrong half of space — see Cell Cards for how those senses combine.

Planes, cylinders, and spheres

Most reactor models are built from three families. Axis-aligned planes cut space into slabs; cylinders follow fuel pins and channels; spheres cover sources, detectors, and problems with spherical symmetry. Reach for the general forms only when the axis-aligned shortcuts will not sit where you need them.

Planes are the workhorses. px, py, and pz sit perpendicular to a coordinate axis; the general p card takes the four coefficients of Ax + By + Cz = D for any orientation.

mcnp
c Basic planes
1  px  5.0      $ Vertical plane at x = 5
2  py -2.0      $ Vertical plane at y = -2  
3  pz  0.0      $ Horizontal plane at z = 0
4  p   1 1 0 5  $ General plane: Ax+By+Cz=D (here x + y = 5)

A px at x = 5 is an infinitely thin sheet: x < 5 on one side, x > 5 on the other. That split is what cell cards will intersect with other surfaces, so getting the intercept right matters more than the mnemonic itself.

Cylinders are the nuclear default. cz, cx, and cy place infinite cylinders on a coordinate axis; the displaced forms such as c/y shift the axis off the origin for off-centre pins and channels.

mcnp
c Cylindrical surfaces
10  cz   0.5      $ Cylinder on z-axis, radius 0.5
11  cx   2.0      $ Cylinder on x-axis, radius 2.0
12  c/y  3 1 0.8  $ Parallel to y-axis, center at (x=3,z=1), R=0.8

A bare cz is infinite in z. That is fine until a volume tally needs a finite cell — then you must close the model with planes (or a finite macrobody). Leave the ends open and MCNP cannot compute the volume an F4 or F7 divides by.

Spheres cover the cases that want a point-like emitter or a curved outer boundary. so centres on the origin; s places a sphere anywhere; sx, sy, and sz centre on one axis.

mcnp
c Spherical surfaces
20  so  5.0        $ Sphere at origin, radius 5
21  s   2 3 1 2.5  $ Sphere at (2,3,1), radius 2.5
22  sx  10.0  3.0  $ Sphere on x-axis at x=10, radius 3

Macrobodies

A macrobody is a pre-built solid — several surfaces and their intersections packaged as one card. You use it when you would otherwise hand-write the same cylinder-plus-end-caps or box over and over, and when a single name makes the geometry harder to leave ambiguous.

mcnp
c Macrobody examples
c  RCC  Vx Vy Vz  Hx Hy Hz  R  (base vertex, height vector, radius)
30  RCC  0 0 0  0 0 10  2.5    $ Right circular cylinder: base at origin, 10 cm tall, R=2.5
c  RHP  Vx Vy Vz  Hx Hy Hz  Rx Ry Rz  (base point, height vector, facet vector)
31  RHP  0 0 0  0 0 20  3.0 0 0  $ Hexagonal prism: 20 cm tall, facet 3 cm from axis
c  RPP  xmin xmax ymin ymax zmin zmax
32  RPP  -5 5 -5 5 0 10        $ Rectangular box: 10x10x10 cm

RCC is a finite right circular cylinder with end caps — the shape you want for a pellet or a control-rod segment that must not run to infinity. RHP (also accepted as HEX) builds the hexagonal prisms common in reactor lattices; for a regular hexagon the optional facet vectors can be omitted so the card takes nine entries. RPP is the axis-aligned box. Count the parameters carefully — a short card is often legal, not a typo.

Macrobodies mix with ordinary surfaces in the same deck. A shielding layout often uses six planes for the outer room, a sphere for the source, and a BOX for the wall:

mcnp
c Shielding problem surfaces
10  px  -100.0   $ Left boundary
11  px   100.0   $ Right boundary  
12  py  -100.0   $ Front boundary
13  py   100.0   $ Back boundary
14  pz   0.0     $ Ground level
15  pz   200.0   $ Top boundary
20  so   5.0     $ Source sphere
21  BOX  20 -30 0  40 0 0  0 60 0  0 0 150  $ Concrete shield

The pin cell's surfaces

The running example for this path is a PWR pin cell. Radially it needs four concentric cz surfaces — fuel at 0.4096 cm, gap at 0.4178 cm, cladding at 0.475 cm, and the Wigner–Seitz cell boundary at 0.7108 cm (equal in area to a 1.26 cm square pitch). Hover each line below for the field-by-field reading.

mcnp — hover a line to explain it
c Fuel pin surfaces
1 cz 0.4096 $ Fuel pellet radius
2 cz 0.4178 $ Gap outer radius (clad inner)
3 cz 0.4750 $ Cladding outer radius
4 cz 0.7108 $ Unit cell boundary (equal-area, 1.26 cm pitch)
5 pz 0.0 $ Bottom of active fuel
6 pz 365.76 $ Top of active fuel
7 pz -10.0 $ Bottom reflector
8 pz 375.76 $ Top reflector

Fuel Pin Surface Cards

Hover any highlighted line to see a field-by-field explanation.

Fuel pellet surface (cz)
He gap / clad inner surface (cz)
Cladding outer surface (cz)
Unit cell boundary (cz)
Bottom of active fuel (pz)
Top of active fuel (pz)
Bottom of lower reflector (pz)
Top of upper reflector (pz)

The radii match the deck on Example: Pin Cell and mcnp-examples/example_pin/pin_cell.i. The axial planes in the viewer teach a full-height stack with reflectors; the runnable pin instead closes a 1 cm slice with reflecting pz planes so every cell has a finite volume for tallies. Same cylinders, different way of ending the model in z.

The outer cylinder is the easy place to go wrong. Half the pitch (0.63 cm) looks like the right length and under-moderates the lattice badly; the equal-area radius is pitch/√π. And that outer cylinder wants a white boundary (+), not specular reflection — a mirror on a curved surface conserves impact parameter and can trap neutrons in the moderator annulus. Boundary prefixes belong on the surface card; the cell card only chooses which side of the surface it owns.

Card semantics on this page follow MCNP6.3.1 Theory & User Manual (LA-UR-24-24602 Rev. 1), §5.3.1 Surfaces Cards, Defined by Equations and §5.3.4 Surfaces Defined by Macrobodies.

Full reference list on the attribution page.

Check yourself

  • Write a surface card in the order surface number, type, and parameters?
  • Place planes, cylinders, and spheres with px, cz, so, and their variants?
  • Replace a group of surfaces with an RCC, RHP, or RPP macrobody?
  • Build the concentric cylinders and axial planes that bound a fuel pin?