Basic Shapes in MCNP

Building blocks for all MCNP geometries

What you'll learn

After the first pin · 1 / 1411 min read
  • Apply the surface sign convention: negative is inside or behind, positive is outside or in front.
  • Bound a rectangular region with px, py, and pz planes.
  • Place spheres with so and s, and cylinders with cx, cy, cz, and the c/x family.
  • Read the parameter lists for cone (kz, k/z) and torus (tz) cards, including the cone sheet selector.
  • Assemble a PWR fuel pin from concentric cylinders and two axial planes.

Before you start

Surface-Based Geometry

MCNP builds all geometries from mathematical surfaces. Each surface divides space into two regions: positive (outside) and negative (inside). By combining surfaces with Boolean operations, you create the cells that define your model.

The Sign Convention

The key to MCNP geometry is understanding surface orientation. When you reference a surface in a cell definition:

Negative (-)

Inside or behind the surface

Positive (+)

Outside or in front of the surface

This convention applies to all surface types and is essential for creating correct cell definitions.

Planes: The Foundation

Planes are the most fundamental surfaces in MCNP. They create flat boundaries and are essential for building rectangular geometries like rooms, boxes, and slabs.

Axis-Aligned Planes

mcnp
c Simple plane definitions
1  px   5.0    $ Plane perpendicular to x-axis at x=5
2  py  -2.0    $ Plane perpendicular to y-axis at y=-2
3  pz   0.0    $ Plane at z=0 (xy-plane)

c Concrete shield wall (50 cm thick)
10  px   0     $ Inner surface of wall
11  px  50     $ Outer surface of wall

The px, py, and pz cards create planes normal to the coordinate axes. The number specifies where the plane intersects its axis. These are perfect for creating rectangular boundaries and slab geometries.

Building a Simple Room

mcnp
c Laboratory room (4m × 3m × 2.5m)
1  px  -200    $ Left wall
2  px   200    $ Right wall  
3  py  -150    $ Back wall
4  py   150    $ Front wall
5  pz    0     $ Floor
6  pz   250    $ Ceiling

c Room interior cell
1  0  1 -2 3 -4 5 -6          $ Void inside room (use mat for air transport)
2  1  -2.3  -1:2:-3:4:-5:6    $ Concrete walls (density 2.3 g/cm³)
c NOTE: as written cell 2 extends to infinity; a real model bounds the
c concrete with outer surfaces and adds a graveyard cell with imp:n=0

This example creates a simple room using six planes. Cell 1 defines the air inside by intersecting the positive side of the left/back/floor surfaces with the negative side of the right/front/ceiling surfaces. Cell 2 uses a union of the remaining half-spaces to create the surrounding concrete.

Spheres: Radial Symmetry

Spheres are ideal for point sources, detectors, and any geometry with radial symmetry. They're mathematically simple but powerful for modeling many nuclear applications.

Sphere Definitions

mcnp
c Basic spheres
1  so   5.0           $ Centered at origin, radius 5 cm
2  s    10 0 0  2.5   $ Center at (10,0,0), radius 2.5 cm

c Neutron source and shield
10  so   1.0          $ Pu-Be source (1 cm radius)
11  so  11.0          $ Lead shield (10 cm thick)
12  so  21.0          $ Concrete biological shield

The 'so' card creates origin-centered spheres, while 's' allows arbitrary positioning. Concentric spheres are perfect for modeling shielded sources or multi-layer detectors.

Detector Modeling

mcnp
c NaI scintillation detector
1  so   3.81    $ NaI crystal (3-inch diameter)
2  so   3.91    $ Aluminum housing (1mm thick)
3  so   4.01    $ Air gap
4  so   4.21    $ Steel outer shell

c Detector cells
1  1  -3.67  -1           $ NaI crystal
2  2  -2.70   1 -2        $ Aluminum
3  0          2 -3        $ Air gap
4  3  -7.87   3 -4        $ Steel housing
5  0          4           $ Surrounding air

This realistic detector model uses concentric spheres to represent each material layer. The cell definitions use the sphere surfaces to create the proper material regions with correct thicknesses.

Cylinders: Rods and Pipes

Cylinders are essential for nuclear applications - fuel pins, control rods, coolant channels, and piping systems all require cylindrical geometry.

Basic Cylinder Types

mcnp
c Infinite cylinders along axes
1  cx   2.0    $ Along x-axis, radius 2 cm
2  cy   1.5    $ Along y-axis, radius 1.5 cm  
3  cz   0.5    $ Along z-axis, radius 0.5 cm

c Positioned cylinders
10  c/x  5 3   2.0    $ Parallel to x-axis at y=5, z=3
11  c/y  2 4   1.0    $ Parallel to y-axis at x=2, z=4
12  c/z  1 2   0.8    $ Parallel to z-axis at x=1, y=2

The cx, cy, cz cards create infinite cylinders along coordinate axes. The c/x, c/y, c/z cards create cylinders parallel to axes but at arbitrary positions. These are the building blocks for complex piping and rod geometries.

PWR Fuel Pin

mcnp
c Fuel pin geometry (standard PWR dimensions)
1  cz   0.4096    $ UO2 fuel pellet
2  cz   0.4178    $ Inner cladding (gap)
3  cz   0.4750    $ Outer cladding surface
4  pz   0.0       $ Bottom of active fuel
5  pz   366.0     $ Top of active fuel

c Fuel pin cells
1  1  -10.4    -1 4 -5     $ UO2 fuel
2  0           1 -2 4 -5   $ Helium gap
3  2  -6.56    2 -3 4 -5   $ Zircaloy cladding
4  3  -0.714   3 4 -5      $ Water coolant around pin
5  3  -0.714  -4:5         $ Water above/below fuel

This realistic fuel pin uses cylinders for radial boundaries and planes for axial limits. The cell definitions create the fuel, gap, cladding, and coolant regions with proper material assignments and densities.

Cones and Tori

While less common, cones and tori are useful for specialized geometries like beam collimators, vessel heads, and complex piping systems.

mcnp
c Cone surfaces  
c KZ format: z0 t^2 [+/-1]  (z0=apex, t^2=tan^2(half-angle))
1  kz   0  1.0  1     $ Cone apex at z=0, 45-deg half-angle, upper sheet
2  k/z  5 5  0  1.0   $ Cone at (x=5,y=5), apex at z=0, 45-deg

c Torus (donut shape)
c TZ format: x y z A B C  (center, major radius, two minor radii)
3  tz   0 0 0  10 5 5  $ Torus centered at origin, R_major=10, R_minor=5

c Beam collimator using cone
10  kz   0  0.031  1   $ Cone apex at z=0, ~10-deg half-angle, upper sheet
11  pz   0             $ Entrance plane
12  pz   50            $ Exit plane

The KZ card takes the apex z-coordinate, the square of the tangent of the half-angle (t²), and an optional sheet selector (+1 for upper, -1 for lower). K/Z adds x,y offsets. Tori (TZ, TX, TY) require six parameters: center coordinates, major radius, and two minor radii. These surfaces require careful attention to parameter counts and orientation.

Practical Guidelines

Surface Numbering Strategy

Use a logical numbering system to keep your geometry organized. Consider reserving number ranges for different purposes:

1-9: Major boundaries (room walls, vessel surfaces)

10-99: Primary components (fuel pins, detectors)

100-999: Secondary features (supports, instrumentation)

1000+: Lattice and universe surfaces

Always include descriptive comments for each surface. Good comments explain both the physical object and its role in the overall geometry.

Visualization and Verification

Always verify your surfaces using MCNP's plotting capabilities before building complex geometries. The plot command helps catch orientation errors and dimension mistakes early in the modeling process.

Remember that all MCNP dimensions are in centimeters. When working with engineering drawings in other units, convert carefully and document your conversions in comments.

Try It Yourself

Macrobodies are the shortcut worth knowing, and also the easiest place to guess a keyword that does not exist. MCNP defines ten: BOX, RPP, SPH, RCC, RHP (also spelled HEX), REC, TRC, ELL, WED, and ARB. Each takes a fixed number of entries, and a body with the wrong count is a different body.

Try it yourself — macrobodies.i
Two of these three surfaces are wrong. The cylinder uses a keyword MCNP does not have, and the parallelepiped is short a pair of entries — RPP wants xmin xmax ymin ymax zmin zmax. The hexagonal prism is already correct.
1 error, 1 warningChecked by the OWEN rule set

RHP and HEX are the same card; the manual heads the section with both spellings and uses each in its examples. It takes nine entries for a regular hexagon — vertex, height vector, first facet vector — or fifteen when you supply the second and third facet vectors to describe an irregular one.

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

  • Apply the surface sign convention without stopping to check it?
  • Bound a rectangular region with px, py, and pz planes?
  • Place spheres and cylinders, including the off-axis c/x family?
  • Read a cone card, sheet selector included, and a torus parameter list?
  • Assemble a PWR fuel pin from concentric cylinders and two axial planes?