Cell Definitions in Serpent

Cell Definition Fundamentals

In Serpent, cells are three-dimensional volumes defined by combinations of surfaces. They are the building blocks of your geometry model, and each cell must be assigned a material (or defined as void).

Basic Cell Syntax

The basic syntax for defining a cell in Serpent is:

text
cell NAME/ID UNIVERSE_ID MATERIAL SURFACE_DEFINITION [CELL_OPTIONS]

Where:

  • NAME/ID: A unique identifier for the cell (number or name)
  • UNIVERSE_ID: The universe this cell belongs to (0 for base universe)
  • MATERIAL: Material name or "void" for empty regions
  • SURFACE_DEFINITION: Combination of surfaces defining the cell boundaries
  • CELL_OPTIONS: Optional parameters for the cell

Simple Examples

text
% Example 1: Fuel pin with cladding
surf fuel_rad cylz 0.0 0.0 0.4   % Fuel radius
surf clad_rad cylz 0.0 0.0 0.46  % Cladding outer radius
surf top pz 10.0                 % Top of pin
surf bot pz -10.0                % Bottom of pin

% Cell definitions
cell fuel   0 fuel   -fuel_rad -top bot      % Fuel region (inside fuel radius, between top and bottom)
cell clad   0 zirc4  -clad_rad top bot fuel_rad  % Cladding (inside clad radius, outside fuel radius)
cell water  0 h2o    clad_rad : top : -bot   % Water (everything else)

% Example 2: Void region
cell void_region 0 void -top     % Void region above the top surface

Cell Parameters and Options

Cells can have various parameters that control their behavior in the simulation:

Material Assignment

Every cell must have a material assignment or be defined as void:

text
% Material assignment examples
cell fuel_cell 0 uo2      -fuel_surf  % UO2 fuel material
cell gap_cell  0 void     -gap_surf   % Void (gas gap)
cell water_cell 0 water   -water_surf % Water material

% Reference to material defined elsewhere
mat uo2  -10.4 
92235.09c   0.04
92238.09c   0.96
8016.09c    2.0

Cell Temperature

You can specify a temperature for a cell to override the material default:

text
% Temperature assignment (in Kelvin)
cell fuel1  0 fuel   -fuel_surf1  tmp 900     % Fuel at 900K
cell fuel2  0 fuel   -fuel_surf2  tmp 1200    % Hotter region at 1200K
cell water  0 water  -water_surf  tmp 580     % Water at 580K

Important: Cell temperatures affect cross-section interpolation. Serpent uses temperature-dependent cross sections, and the tmp parameter ensures that the correct cross sections are used for neutron interactions within that cell.

Importance Sampling

Cell importance affects variance reduction in the simulation:

text
% Cell importance for variance reduction
cell core     0 fuel   -core_surf    imp 1.0    % Normal importance
cell shield   0 steel  -shield_surf  imp 0.5    % Half importance (fewer neutrons tracked)
cell concrete 0 conc   -conc_surf    imp 0.2    % Even lower importance
cell outside  0 void   conc_surf     imp 0.0    % Zero importance (neutrons terminated)

Other Cell Options

Additional cell options include:

text
% Additional options
cell fuel 0 fuel -fuel_surf tmp 900 rgb 255 100 100   % Set visualization color (RGB)
cell core 0 fuel -core_surf vol 125.6               % Set explicit cell volume (cm³)
cell gap  0 void -gap_surf   mask 2                 % Set mask for specific detectors

Advanced Boolean Logic for Cells

Complex cell definitions often require sophisticated Boolean operations:

Boolean Operations Review

  • Intersection: Space or blank between surface symbols (logical AND)
  • Union: Colon : between regions (logical OR)
  • Complement: Plus + (outside) or minus - (inside) before surface
  • Parentheses: ( ) for grouping operations

Complex Boolean Examples

text
% Example: Fuel assembly with control rod guide tube and instrumentation tube
surf fuel_pin  cylz 0.0 0.0 0.41    % Fuel pin radius
surf guide_out cylz 0.0 0.0 0.60    % Guide tube outer radius
surf guide_in  cylz 0.0 0.0 0.56    % Guide tube inner radius
surf instr_out cylz 10.0 10.0 0.60  % Instrumentation tube outer radius
surf instr_in  cylz 10.0 10.0 0.56  % Instrumentation tube inner radius
surf box       rect -10.5 10.5 -10.5 10.5 -50.0 50.0 % Assembly boundary

% Cell definitions with complex Boolean logic
cell fuel_region 0 fuel -fuel_pin                              % Fuel pins
cell guide_tube  0 zirc (-guide_out guide_in)                   % Guide tube (zircaloy)
cell guide_water 0 water -guide_in                             % Water inside guide tube
cell instr_tube  0 zirc (-instr_out instr_in)                   % Instrumentation tube
cell instr_water 0 water -instr_in                             % Water inside instrumentation tube
cell mod_water   0 water -box fuel_pin guide_out instr_out     % Moderator (exclude all other regions)

Nested Boolean Operations

For very complex geometries, nesting boolean operations with parentheses provides clarity:

text
% Example: Control rod with multiple perforations
surf rod_out  cylz 0.0 0.0 1.0   % Rod outer radius
surf rod_top  pz 50.0            % Rod top
surf rod_bot  pz -50.0           % Rod bottom
surf hole1    cylx 0.0 0.0 0.2   % Perforation hole 1
surf hole2    cylx 0.0 0.8 0.2   % Perforation hole 2
surf hole3    cylx 0.0 -0.8 0.2  % Perforation hole 3

% Complex cell with perforations
cell rod 0 ss304 (-rod_out -rod_top rod_bot) : (hole1 (-rod_top rod_bot)) : 
                 (hole2 (-rod_top rod_bot)) : (hole3 (-rod_top rod_bot))

% Alternative more readable approach
cell rod_body 0 ss304 -rod_out -rod_top rod_bot hole1 hole2 hole3  % Main rod body
cell hole1_reg 0 water -hole1 -rod_top rod_bot                     % Water in hole 1
cell hole2_reg 0 water -hole2 -rod_top rod_bot                     % Water in hole 2
cell hole3_reg 0 water -hole3 -rod_top rod_bot                     % Water in hole 3

Pro Tip: For complex geometries, consider breaking down the model into multiple simpler cells rather than creating a single complex cell with many Boolean operations. This makes the input file more readable and easier to debug.

Common Cell Definition Errors

Cell definition errors are common pitfalls when working with Serpent:

Overlapping Cells

Each point in space should belong to exactly one cell:

text
% INCORRECT - Overlapping cells
cell fuel1 0 fuel -fuel_rad      % All space inside fuel radius
cell fuel2 0 fuel -fuel_rad      % Same region defined twice!

% CORRECT - Distinct cells
cell fuel1 0 fuel -fuel_rad1     % Fuel region 1
cell fuel2 0 fuel -fuel_rad2 fuel_rad1  % Fuel region 2 (outside region 1)

Undefined Regions

Every point in the geometry must be defined:

text
% INCORRECT - Incomplete definition
cell fuel 0 fuel -fuel_rad       % Inside fuel radius
cell clad 0 zirc -clad_rad fuel_rad  % Between fuel and clad radii
% Missing definition for space outside clad_rad!

% CORRECT - Complete definition
cell fuel 0 fuel -fuel_rad       % Inside fuel radius
cell clad 0 zirc -clad_rad fuel_rad  % Between fuel and clad radii
cell water 0 water clad_rad      % Outside clad radius

Incorrect Boolean Logic

Misuse of intersection vs. union operations:

text
% INCORRECT - Boolean logic error
cell incorrect 0 fuel -fuel_rad : -clad_rad  % Union means inside either one!

% CORRECT - Proper intersections and unions
cell fuel 0 fuel -fuel_rad                  % Inside fuel radius
cell clad 0 zirc -clad_rad fuel_rad          % Inside clad but outside fuel radius

Debugging Cell Definitions

Serpent provides tools to help identify and resolve cell definition errors:

  • Geometry Plotter: Use set gcu to generate plots of your geometry
  • Overlap Checker: Use set overlap 10000 to check for overlapping regions
  • Point Detector: Use set pd followed by coordinates to check which cell contains a specific point
  • Lost Particle Information: When particles get lost, Serpent reports the last cell and coordinates

Troubleshooting Tip: If Serpent reports "Lost particles" during a simulation, it usually indicates a problem with cell definitions. The most common causes are overlapping cells or undefined regions in the geometry.

Practical Cell Definition Examples

Example 1: PWR Fuel Pin with Cladding and Gap

text
% PWR fuel pin with fuel, gap, and cladding
surf fuel_rad cylz 0.0 0.0 0.41    % Fuel pellet radius
surf gap_rad  cylz 0.0 0.0 0.42    % Gap outer radius
surf clad_rad cylz 0.0 0.0 0.475   % Cladding outer radius
surf z_top    pz 180               % Top of pin
surf z_bot    pz -180              % Bottom of pin

% Cell definitions
cell fuel      0 uo2        -fuel_rad -z_top z_bot      % Fuel pellet
cell gap       0 void       -gap_rad fuel_rad -z_top z_bot  % Gas gap
cell cladding  0 zircaloy4  -clad_rad gap_rad -z_top z_bot  % Cladding
cell water     0 h2o        -z_top z_bot clad_rad       % Surrounding water
cell top_void  0 void       z_top                       % Void above pin
cell bot_void  0 void       -z_bot                      % Void below pin

Example 2: Control Rod Assembly

text
% Control rod assembly with guide tubes
surf guide_out cylz 0.0 0.0 0.565   % Guide tube outer radius
surf guide_in  cylz 0.0 0.0 0.49    % Guide tube inner radius
surf rod_rad   cylz 0.0 0.0 0.48    % Control rod radius
surf rod_tip   pz 180.0             % Control rod tip position
surf z_top     pz 220.0             % Top of geometry
surf z_bot     pz -220.0            % Bottom of geometry

% Control rod insertion positions (can be changed for movement)
surf pos_in    pz -180.0            % Fully inserted position
surf pos_out   pz 150.0             % Fully withdrawn position

% Cell definitions
cell rod       0 absorber  -rod_rad -pos_out pos_in  % Control rod
cell guide     0 zircaloy  -guide_out guide_in -z_top z_bot  % Guide tube 
cell water_in  0 h2o       -guide_in rod_rad -z_top z_bot   % Water inside guide around rod
cell water_tip 0 h2o       -guide_in -rod_tip rod_rad      % Water above rod tip
cell water_out 0 h2o       guide_out -z_top z_bot          % Water outside guide tube

Example 3: Reflector with Baffle

text
% Reactor core with reflector and baffle
surf core_bound   rect -85.0 85.0 -85.0 85.0 -180.0 180.0   % Core boundary
surf baffle_bound rect -90.0 90.0 -90.0 90.0 -185.0 185.0   % Baffle boundary
surf refl_bound   rect -120.0 120.0 -120.0 120.0 -200.0 200.0  % Reflector boundary

% Cell definitions
cell core      0 fill 1     -core_bound            % Core region (filled with universe 1)
cell baffle    0 ss304      -baffle_bound core_bound  % Baffle region
cell reflector 0 h2o        -refl_bound baffle_bound  % Reflector region
cell outside   0 outside    refl_bound              % Outside world

Modeling Tip: When defining cells for a reactor model, start with the smallest components (fuel pins) and work outward to larger structures (assemblies, core, reflector). This approach helps maintain consistency and reduces errors.

Summary

Mastering cell definitions is essential for creating accurate and efficient Serpent models:

  • Cells are three-dimensional volumes defined by combinations of surfaces
  • Each cell must have a material assignment or be defined as void
  • Complex geometries can be created using Boolean operations (intersection, union, complement)
  • Cell parameters allow for temperature specification, importance sampling, and other properties
  • Common errors include overlapping cells, undefined regions, and incorrect Boolean logic
  • Debugging tools like geometry plots and overlap checking help identify and fix errors

In the next section, we'll explore lattice structures, which provide a powerful way to create repeated patterns of cells for modeling reactor geometries like fuel assemblies.