MCNP Guide
Basic Shapes in MCNP
Building blocks for all MCNP geometries
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
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 wallThe 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
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 $ Air inside room
2 1 -2.3 1:-2:3:-4:5:-6 $ Concrete walls (density 2.3 g/cm³)This example creates a simple room using six planes. Cell 1 defines the air inside (negative side of all walls), while cell 2 defines the concrete structure (positive side of any wall). The Boolean operators create the complete geometry.
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
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 shieldThe '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
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 airThis 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
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=2The 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
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.7 3 4 -5 $ Water coolant around pin
5 3 -0.7 -4:5 $ Water above/below fuelThis 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.
c Cone surfaces
1 kz 0 0 1 0 $ Cone apex at origin, opening upward
2 k/z 5 5 2 1 $ Cone at (5,5) with different slope
c Torus (donut shape)
3 tz 10 5 2 $ Torus around z-axis, major radius 10, minor radius 5
c Beam collimator using cone
10 kz 0 0 0.1 0 $ Collimator cone (10° half-angle)
11 pz 0 $ Entrance plane
12 pz 50 $ Exit planeCones are defined by their apex and opening angle. Tori require major and minor radii. These surfaces are useful for specialized applications but require careful attention to orientation and parameters.
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.