Your First Serpent Simulation

The Pin Cell Model

We'll start with a simple PWR fuel pin cell model. This example includes:

  • UO₂ fuel pellet
  • Zircaloy cladding
  • Light water moderator
  • Reflective boundary conditions

Model Specifications:

  • Fuel radius: 0.4096 cm
  • Clad inner radius: 0.4178 cm
  • Clad outer radius: 0.4750 cm
  • Pin pitch: 1.26 cm
  • Fuel enrichment: 3.1 wt% U-235
  • Operating temperature: 900K (fuel), 600K (clad), 574K (moderator)

Creating the Input File

Create a new file named pin_cell.inp with the following content:

1. Title and Comments

text
% Simple PWR pin cell example
% Created for the Nuclear Monte Carlo Guide
% Temperature in Kelvin, dimensions in cm

2. Material Definitions

text
% UO2 fuel (3.1% enriched)
mat fuel -10.4 tmp 900
92235.09c  -0.031
92238.09c  -0.969
8016.09c   -2.0

% Zircaloy-4 cladding
mat clad -6.56 tmp 600
40090.09c  -0.9845
50120.09c  -0.0155

% Light water moderator
mat water -0.7 tmp 574 moder lwtr 1001
1001.09c   2
8016.09c   1

% Thermal scattering data for hydrogen in water
therm lwtr lwj3.11t

3. Surface Definitions

text
% Surfaces for pin cell geometry
surf 1  cyl 0.0 0.0 0.4096  % Fuel outer radius
surf 2  cyl 0.0 0.0 0.4178  % Clad inner radius
surf 3  cyl 0.0 0.0 0.4750  % Clad outer radius
surf 4  sqc 0.0 0.0 0.63    % Pin cell boundary (half pitch)

4. Cell Definitions

text
% Cell definitions
cell 1  0  fuel   -1      % Fuel region
cell 2  0  clad    1 -2   % Gap region
cell 3  0  clad    2 -3   % Clad region
cell 4  0  water   3 -4   % Moderator region
cell 5  0  outside 4      % Outside world

5. Physics and Simulation Parameters

text
% Cross section library path
set acelib "sss_endfb7u.xsdata"

% Boundary conditions (reflective)
set bc 2

% Neutron population and cycles
set pop 10000 100 20

% Activate neutron history tracking
set nfg 2 1.0E-9

% Detector for flux spectrum
det 1 de 1e-11 1e-10 1e-9 1e-8 1e-7 1e-6 1e-5 1e-4 1e-3 1e-2 1e-1 1e0 1e1 1e2
det 1 dt 2
det 1 dm fuel

Note: Make sure to adjust the acelib path to match your Serpent installation's cross-section library location.

Running the Simulation

Follow these steps to run your first simulation:

  1. Open Terminal:

    Navigate to the directory containing your input file.

  2. Run Serpent:
    bash
    sss2 -omp 4 pin_cell.inp

    The -omp 4 flag uses 4 CPU threads. Adjust based on your system.

  3. Monitor Progress:

    Watch the terminal output for progress updates and any warning messages.

Expected Runtime: This simple problem should complete in a few minutes on a modern computer.

Understanding the Results

After the simulation completes, you'll have several output files:

1. Main Results (pin_cell_res.m)

Look for these key results:

  • k-effective (multiplication factor)
  • Statistical uncertainty
  • Neutron balance table

2. Detector Output (pin_cell_det0.m)

Contains the flux spectrum data we requested:

  • Energy-dependent flux in fuel
  • Statistical uncertainties
  • Energy group boundaries

3. Log File (pin_cell.out)

Check this file if you encounter any issues:

  • Warning messages
  • Memory usage
  • Calculation times

Expected Results: For this pin cell:

  • k-effective should be around 1.2-1.3
  • Statistical uncertainty should be less than 0.001
  • The flux spectrum should show thermal and fast peaks

Common Issues

Cross Section Library Not Found

If Serpent can't find the cross-section library:

  • Check the SERPENT_DATA environment variable
  • Verify the library path in the input file
  • Ensure library files are in the correct location

Geometry Errors

If you see "undefined cell" warnings:

  • Check surface definitions
  • Verify cell definitions and material assignments
  • Look for overlapping or undefined regions

Poor Statistics

If uncertainties are too large:

  • Increase the number of neutron histories
  • Run more active cycles
  • Check for geometry or physics issues

Next Steps

Now that you've run your first simulation, try:

  • Modifying the enrichment to see its effect on k-effective
  • Changing the moderator temperature
  • Adding more detector definitions
  • Experimenting with different boundary conditions

Continue to the next section to learn more about Serpent's input file structure and advanced features.