Difference between revisions of "Input syntax manual"

Serpent has no interactive user interface. All communication between the code and the user is handled through one or several input files and various output files.

The format of the input file is unrestricted. The file consists of white-space (space, tab or newline) separated words, containing alphanumeric characters(’a-z’, ’A-Z’, ’0-9’, ’.’, ’-’). If special characters or white spaces need to be used within the word (file names, etc.), the entire string must be enclosed within quotes.

The input file is divided into separate data blocks, denoted as cards. The file is processed one card at a time and there are no restrictions regarding the order in which the cards should be organized. The input cards are listed below. Additional options are followed by key word "set". All input cards and options are case-insensitive (note to developers: make it so). Each input card is delimited by the beginning of the next card. It is hence important that none of the parameter strings used within the card coincide with the card identifiers.

The percent-sign ('%') is used to define a comment line. Anything from this character to the end of the line is omitted when the input file is read. Unlike Serpent 1, hashtag ('#') can no longer be used to mark comment lines in Serpent 2 input. The alternative is to use C-style comment sections beginning with "/*" and ending with "*/". Everything between these delimiters is omitted, regardless of the number of newlines or special characters.

This page will contain the whole input syntax of Serpent 2, with links to more detailed descriptions where needed. For reference see also the Serpent 1 input manual[1].

Input cards

NOTE: Serpent command words are in boldface and input parameters entered by the user in CAPITAL ITALIC. Optional input parameters are enclosed in [ square brackets ], and when the number of values is not fixed, the remaining values are marked with three dots (...).

branch (branch definition)

branch NAME [ repm MAT1 MAT2 ]
[ repu UNI1 UNI2 ]
[ stp MAT DENS TEMP THERM1 SABL1 SABH1 THERM2 SABL2 SABH2 ... ]
[ tra TGT TRANS ]
[ xenon OPT ]
[ samarium OPT ]
[ norm NSF ]
[ gcu UNI2 ]
[ reptrc FILE1 FILE2 ]
[ var VNAME VAL ]


Defines the variations invoked for a branch in the automated burnup sequence. Input values:

 NAME : branch name MAT1 : name of the replaced material MAT2 : name of the replacing material UNI1 : name of the replaced universe UNI2 : name of the replacing universe MAT : name of the material for which density and temperature are adjusted DENS : material density after adjustment (positive entries for atomic, negative entries for mass densities) TEMP : material temperature after adjustment, or -1 if no adjustment in temperature THERMn : nth thermal scattering data associated with the material SABLn : name of the nth S(α, β) library for temperature below the given value SABHn : name of the nth S(α, β) library for temperature above the given value TGT : target universe, surface or cell TRANS : name of the applied transformation OPT : option for setting poison concentrations (0 = set to zero, 1 = use values from restart file) NSF : normalization scaling factor FILE1 : file path of the replaced transport correction curve data FILE2 : file path of the replacing transport correction curve data VNAME : variable name VAL : variable value

Notes:

• The branch name identifies the branch in the coefficient matrix of the coef card
• The input parameters consist of a number variations, which are invoked when the branch is applied. A single branch card may inclued one or several variations.
• The repm variation can be used to replace one material with another, for example, to change coolant boron concentration.
• The material replacement works as if MAT1 were created using the mat or mix card of MAT2.
• The name of the material present in the geometry will still be MAT1 after the replacement, but the material specification (composition, density, tmp, moder, rgb, etc.) will correspond to MAT2.
• This means that all other input-cards that are linked to a specific material name such as det dm, src sm, set trc and set iter nuc can be linked to the original material (MAT1) and they will automatically apply to whatever material MAT2 replaces MAT1 for the branch calculation.
• The repu variation can be used to replace one universe with another, for example, to replace empty control rod guide tubes with rodded tubes for control rod insertion in 2D geometries.
• The name of the universe present in the geometry will still be UNI1 after the replacement, but the universe contents will correspond to UNI2.
• This means that all other input-cards that are linked to a specific universe name such as det du and src su can be linked to the original universe (UNI1) and they will automatically apply to whatever universe UNI2 replaces UNI1 for the branch calculation.
• The stp variation can be used to change material density and temperature. The adjustment is made using the built-in Doppler-broadening preprocessor routine and tabular interpolation for S(α, β) thermal scattering data.
• The last three parameters of the stp entry are provided only if the material has thermal scattering libraries attached to it (see the therm card).
• The tra variation can be used to move or rotate different parts of the geometry, for example, to adjust the position of control rods in 3D geometries. The name of the transformation refers to the unit (universe, cell or surface) entry in the trans card.
• The xenon and samarium options can be set to enforce the concentrations of fission product poisons Xe-135 and Sm-149 to zero. By default the concentrations are read from the restart file.
• The norm variation can be used to change the normalization. The adjustment is made applying the parameter NSF as a multiplicative scaling factor to the given normalization.
• The gcu variation can be used to replace the universe for group constant generation. This variation is limited to a single-valued GCU-list.
• The reptrc variation can be used to replace a transport correction file with another.
• Variables can be used to pass information into output file, which may be convenient for the post-processing of the data.
• The branch card is used together with the coef card.
• For more information, see detailed description on the automated burnup sequence.
• The replaced material MAT1 of repm variation is also replaced inside mixtures. This means one can not replace a material with a mixture defined with mix card containing the replaced material (for example replacing pure water defined with mat card by a mixture of boron and water defined with a mix card containing the same pure water material).
• The replacing material MAT2 of repm variation can not be included in geometry using other cards than the branch card with the repm variation, version 2.1.30.
• The "sum" option to define the material density as the sum of the constituent nuclide densities is not supported from version 2.2.0 and on.

casematrix (casematrix definition)

casematrix CASE_NAME
NHIS [ HIS_BR1 HIS_BR2 ... HIS_BRNHIS ]
NBU  [ BU1 BU2 ... BUNBU ]
NBR1 [ BR1,1 BR1,2 ... BR1,NBR1 ]
NBR2 [ BR2,1 BR2,2 ... BR1,NBR2 ]
...


Defines the casematrix for the automated burnup sequence. Input values:

 CASE_NAME : name of the casematrix NHIS : number of history variations HIS_BRk : name of the kth history variation branch NBU : number of burnup points BUn : burnup steps at which the momentary variation branches are invoked NBRm : number branches in the mth dimension of the burnup matrix BRm,i : name of the ith branch in the mth dimension

Notes:

• The casematrix card performs multiple depletions with NHIS (different) historical variations and performs restarts similar as the coef input card.
• The casematrix card creates a multi-dimensional coefficient matrix (of size NBR1 × NBR2 × NBR3 × ... ). The automated burnup sequence performs a restart for each of the listed burnup points, and loops over the branch combinations defined by the coefficient matrix. This is repeated for each different depletion history.
• Positive values in the burnup vector are interpreted as (MWd/kgU), negative values are interpreted as time steps in days.
• The casematrix card is used together with the branch card and -casematrix running option.
• Multiple casematrix cards can be given in a single input file.

cell (cell definition)

cell NAME UNI0 MAT [ SURF1 SURF2 ... ]


Defines a material cell. Input values:

 NAME : cell name UNI0 : universe where the cell belongs to MAT : material that fills the cell SURFn : surface list
cell NAME UNI0 fill UNI1 [ SURF1 SURF2 ... ]


Defines a filled cell. Input values:

 NAME : cell name UNI0 : universe where the cell belongs to UNI1 : universe that fills the cell SURFn : surface list
cell NAME UNI0 outside [ SURF1 SURF2 ... ]


Defines an outside cell. Input values:

 NAME : cell name UNI0 : universe where the cell belongs to SURFn : surface list

Notes:

• There are three types of cells: material cells, filled cells and outside cells. Filled cells are identified by providing the key word fill, followed by the universe filling the cell. If the key word is missing, the third entry is interpreted as the material filling the cell. Outside cells are identified by replacing the material name with key word outside.
• Cells defined without surfaces are treated as infinite, from version 2.1.32 on.
• Void cells can be defined by setting the material name to "void"
• When the geometry is set up, the root universe must always be defined. By default the root universe is named "0", and it can be changed with the set root option.
• Outside cells are used to define the part of the geometry that does not belong to the model. When the particle enters an outside cell, boundary conditions are applied. It is important that the geometry model is non-re-entrant (convex) when vacuum boundary conditions are used. Delta-tracking might miss the boundary conditions in a re-entrant (concave) outer surface.
• Outside cells are allowed only in the root universe. It is important that all space outside the model is defined.
• The surface list defines the boundaries of the cell by listing the surface names (as provided in the surface card), together with the operator identifiers (nothing for intersection, ":" for union, "-" for complement and "#" for cell complement).
• Universes are implicitly declared for example by using the UNI0 key words on cell cards as there is no explicit universe input card.
• For more information, see detailed description on the universe-based geometry type in Serpent.

coef (coefficient matrix definition)

coef NBU [ BU1 BU2 ... ]
[ NBR1 BR1,1 BR1,2 ... ]
[ NBR2 BR2,1 BR2,2 ... ]
...


Defines the coefficient matrix for the automated burnup sequence. Input values:

 NBU : number of burnup points BUn : burnup steps at which the branches are invoked NBRm : number branches in the mth dimension of the burnup matrix BRm,i : name of the ith branch in the mth dimension

Notes:

• The coef card creates a multi-dimensional coefficient matrix (of size NBR1 × NBR2 × NBR3 × ... ). The automated burnup sequence performs a restart for each of the listed burnup points, and loops over the branch combinations defined by the coefficient matrix.
• Positive values in the burnup vector are interpreted as (MWd/kgU), negative values are interpreted as time steps in days.
• The coef card is used together with the branch card.
• For multiple historical variations or historical conditions defined using a branch card, see the casematrix card.

datamesh (general data mesh definition)

The datamesh card allows the user to define various meshes that can be used for spatial discretization e.g. in detectors.

datamesh NAME 1 USELC NX XMIN XMAX NY YMIN YMAX NZ ZMIN ZMAX


Defines a regular Cartesian mesh that can be linked to detectors, interfaces etc.

 NAME : mesh name USELC : use lowest level coordinates (1/yes) instead of global coordinates (0/no) for the mesh search NX : number of cells in the x direction XMIN : mesh lower x boundary XMAX : mesh higher x boundary NY : number of cells in the y direction YMIN : mesh lower y boundary YMAX : mesh higher y boundary NZ : number of cells in the z direction ZMIN : mesh lower z boundary ZMAX : mesh higher z boundary
datamesh NAME 2 USELC NR RMIN RMAX NPHI


Defines a regular 2D cylindrical mesh that can be linked to detectors, interfaces etc.

 NAME : mesh name USELC : use lowest level coordinates (1/yes) instead of global coordinates (0/no) for the mesh search NR : number of cells in the radial direction RMIN : mesh inner radial boundary RMAX : mesh outer radial boundary NPHI : number of cells in the polar angle direction
X-type hexagonal mesh horizontal indexing example for NX = NY = 3.
datamesh NAME 4 USELC X0 Y0 PITCH ZMIN ZMAX NX NY NZ


Defines a regular x-type hexagonal mesh that can be linked to detectors, interfaces etc.

 NAME : mesh name USELC : use lowest level coordinates (1/yes) instead of global coordinates (0/no) for the mesh search X0 : mesh horizontal origin x-coordinate Y0 : mesh horizontal origin y-coordinate PITCH : mesh horizontal pitch (equal to cell flat-to-flat width) ZMIN : mesh lower z boundary ZMAX : mesh higher z boundary NX : number of cells in the x direction NY : number of cells in the y direction NZ : number of cells in the z direction
Y-type hexagonal mesh horizontal indexing example for NX = NY = 3.
datamesh NAME 5 USELC X0 Y0 PITCH ZMIN ZMAX NX NY NZ


Defines a regular y-type hexagonal mesh that can be linked to detectors, interfaces etc.

 NAME : mesh name USELC : use lowest level coordinates (1/yes) instead of global coordinates (0/no) for the mesh search X0 : mesh horizontal origin x-coordinate Y0 : mesh horizontal origin y-coordinate PITCH : mesh horizontal pitch (equal to cell flat-to-flat width) ZMIN : mesh lower z boundary ZMAX : mesh higher z boundary NX : number of cells in the x direction NY : number of cells in the y direction NZ : number of cells in the z direction
datamesh NAME 6 USELC NX NY NZ  X1 ... XNX+1  Y1 ... YNY+1  Z1 ... ZNZ+1


Defines an irregular Cartesian mesh that can be linked to detectors, interfaces etc.

 NAME : mesh name <