Simple Geometries in Serpent

Surfaces, cells, and Boolean operations for constructive solid geometry

Constructive Solid Geometry

Serpent uses constructive solid geometry (CSG) to define the physical layout of a model. In CSG, the problem domain is divided into cells — three-dimensional volumes — by mathematical surfaces. Each surface divides all of space into two half-spaces, and cells are defined as intersections, unions, or complements of these half-spaces. Every point in the geometry must belong to exactly one cell, and every cell must be assigned either a material or a special keyword like outside to mark the problem boundary.

Unlike some older Monte Carlo codes that use rigid column-based input, Serpent allows surfaces and cells to have descriptive names rather than just integer identifiers.

Surface Types

Surfaces are defined with the surf card, which takes a name, a type keyword, and the geometric parameters for that type. The most commonly used surface types in reactor modeling are planes, cylinders, and spheres.

Planes

text
% Axis-aligned planes
surf px1 px 10.0      % Plane at x = 10.0
surf py1 py -5.0      % Plane at y = -5.0
surf pz1 pz 0.0       % Plane at z = 0.0

% General plane: ax + by + cz = d
surf p1 plane 1.0 1.0 1.0 5.0

Axis-aligned planes are specified with the px, py, or pz keyword and a single coordinate value. For planes at arbitrary orientations, the plane keyword takes the coefficients of the plane equation. Planes are most often used for axial boundaries (top and bottom of a fuel rod) and for bounding boxes in models with rectangular symmetry.

Cylinders

text
% Infinite cylinders along coordinate axes
surf cyl1 cylx 0.0 0.0 5.0   % Along x-axis, centered at (y=0, z=0), radius 5.0
surf cyl2 cyly 0.0 0.0 2.5   % Along y-axis
surf cyl3 cylz 0.0 0.0 0.41  % Along z-axis (most common for fuel pins)

Cylinders aligned with the z-axis (cylz) are by far the most common surface type in reactor models, since fuel rods, control rods, and guide tubes are all cylindrical and typically oriented vertically. The parameters specify the center coordinates in the plane perpendicular to the axis and the cylinder radius.

Spheres and Square Prisms

text
% Sphere centered at (x, y, z) with radius r
surf sph1 sph 0.0 0.0 0.0 10.0

% Square prism (useful for lattice cells)
surf sqc1 sqc 0.0 0.0 0.63   % Centered at origin, half-width 0.63 cm

Spheres are used for criticality benchmark geometries, radiation sources, and some advanced reactor concepts. The sqc surface defines a square cylinder (infinite square prism) and is particularly useful for bounding unit cells in square lattice geometries — the half-width parameter equals half the lattice pitch.

Cell Definitions and Boolean Logic

Cells are defined with the cell card, which assigns a material to a region of space bounded by surfaces. The cell card takes the cell name, the universe it belongs to (use 0 for the root universe), the material name, and a Boolean expression describing the region.

In the Boolean expression, a negative surface reference means "the inside (negative half-space) of that surface," and a positive reference means "the outside." A space between surface references implies intersection (logical AND), meaning the cell occupies the region that satisfies all conditions simultaneously. A colon between references creates a union (logical OR). Parentheses group operations to control precedence.

Basic Cell Examples

text
% Surfaces
surf fuel_r  cylz 0.0 0.0 0.41
surf clad_r  cylz 0.0 0.0 0.48
surf bound   sqc  0.0 0.0 0.63

% Cells
cell fuel  0 uo2     -fuel_r           % Inside fuel radius
cell clad  0 zirc     fuel_r -clad_r   % Between fuel and clad radii
cell water 0 h2o      clad_r -bound    % Between clad radius and boundary
cell ext   0 outside  bound            % Everything outside the boundary

This example defines a simple fuel pin cross-section. Cell "fuel" occupies the region inside the fuel radius. Cell "clad" occupies the annular region between the fuel and cladding surfaces — it must be outside fuel_r (positive reference) AND inside clad_r (negative reference). The outside keyword on the last cell tells Serpent that everything beyond the boundary surface is outside the problem domain.

Complete Fuel Pin Cell Example

A complete fuel pin unit cell model combining materials, surfaces, cells, and boundary conditions:

text
% Materials
mat fuel -10.4
92235.09c  0.04
92238.09c  0.96
8016.09c   2.0

mat zircaloy -6.56
40000.09c -0.9816
50000.09c -0.0150
26000.09c -0.0024
24000.09c -0.0010

mat water -1.0 moder lwtr 1001
1001.09c 2
8016.09c 1
therm lwtr lwj3.11t

% Surfaces
surf fuel_surf cylz 0.0 0.0 0.41
surf gap_surf  cylz 0.0 0.0 0.42
surf clad_surf cylz 0.0 0.0 0.48
surf cell_surf sqc  0.0 0.0 0.63

% Cells
cell 10 0 fuel      -fuel_surf
cell 20 0 void       fuel_surf -gap_surf
cell 30 0 zircaloy   gap_surf  -clad_surf
cell 40 0 water      clad_surf -cell_surf
cell 50 0 outside    cell_surf

% Settings
set bc 2
set pop 10000 100 20

This model includes the gas gap between fuel pellet and cladding, modeled as a void cell. The reflective boundary conditions on the square cell boundary simulate an infinite lattice of identical pins. The geometry plot capability (plot 3 500 500) can be added to produce a PNG visualization that verifies the concentric ring structure before running a full transport calculation.

Geometry Verification

Always verify a new geometry before committing to a production run. Serpent can generate cross-sectional plots of the geometry with the plot card (e.g., plot 3 500 500 for an XY plot at 500×500 pixels), producing PNG images that show material assignments in color. These plots immediately reveal common errors such as misplaced surfaces, incorrect Boolean logic, and undefined regions.

During the transport calculation, Serpent reports lost particles — neutrons that escape through undefined regions of the geometry. Any lost particles indicate a geometry error that must be fixed. The overlap detection mode (set overlap 10000) tests random points throughout the geometry to find cells that inadvertently share the same region of space.