Unstructured mesh based input

From Serpent Wiki
Revision as of 14:54, 29 November 2017 by Antti Rintala (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Serpent 2 supports unstructured mesh based geometries and multi-physics interfaces. The input syntax for the geometry and interface definitions are described in their respective pages: Geometry and Interface. This page will describe the syntax in the individual files that are linked into the geometry or interface definition.

See the example here.

Points file

The points file can be given in the simple format:

NP
(X0 Y0 Z0)
(X1 Y1 Z1)
...
(XNP-1 YNP-1 ZNP-1)

where the first line contains the number of points to be given NP followed by the coordinates of NP points (in metres) given in braces.

OpenFOAM points files can also be used as is without any modifications.

Faces file

The faces file can be given in the simple format:

NF
NP0(F0,p0 F0,p1 ... F0,pNP0-1)
NP1(F1,p0 F1,p1 ... F1,pNP1-1)
...
NPNF-1(FNF-1,p0 FNF-1,p1 ... FNF,pNPNF-1-1)

where the first line contains the number of faces to be given NF followed by a list of faces. Each face is defined by the number of points making up the face NPi followed by the indices of the points making up the face in braces.

OpenFOAM face files can also be used as is, without the need to remove the header data from the file.

Notes:

  • Point index 0 corresponds to the first point given in the points-file.
  • The ordering of points in a face should be such that traversing the point list will traverse the face boundary. The direction of the face normal vector is defined by the right-hand rule and should point out of the owner cell.
  • All internal faces (faces between two cells) should be listed first, before listing the boundary faces (faces between a cell and computational domain boundary).

Owner file

The cells are created by defining an owner cell for each of the faces (and also a neighbour for faces between two cells). The owner file can be given in the simple format:

NF
OWNER0
OWNER1
...
OWNERNF-1

where the first line contains the number of owner cells to be given NF (this should be equal to the number of faces defined in the faces file). An opening brace is followed by NF cell indices so that the cell index OWNER0 is the owner of face 0 etc.

OpenFOAM owner files can also be used as is, without the need to remove the header data from the file.

Neighbour file

The cells are created by defining an owner cell for each of the faces and also a neighbour cell for faces between two cells. The neighbour file contains information about the be given in the simple format:

NFint
NEIGHBOUR0
NEIGHBOUR1
...
NEIGHBOURNFint-1

where the first line contains the number of owner cells to be given NFint (this should be equal to the number of internal faces in the mesh). An opening brace is followed by NFint cell indices so that the cell index NEIGHBOUR0 is the neighbour of face 0 etc.

OpenFOAM neighbour files can also be used as is, without the need to remove the header data from the file.

Notes:

  • Serpent will use this information to speed up the geometry search as neutrons exit a mesh cell.

Material file

The unstructured mesh based geometry definition needs to know the material filling each cell of the unstructured mesh. This information is given to Serpent using the material file linked to the geometry or interface definition. The syntax for the file is straightforward:

NC
MAT0
MAT1
...
MATNC-1

First the number of cells in the interface NC is given. This is followed by the material name for each of the cells.

Density file

The density file can be used to specify the material density in each of the cells. The syntax is very simple:

NC
RHO0
RHO1
...
RHONC-1

The first line will specify the number of cells NC in the interface and the further lines will give the density information given as relative values compared to the nominal density. The second line should contain the relative density of cell 0 and so on.

OpenFOAM density files can also be used as is, without the need to remove the header data from the file. In this case the density can also be given in kg/m3.

Temperature file

The temperature file can be used to specify the material temperature in each cell. The syntax is very simple:

NC
T0
T1
...
TNC-1

The first line will specify the number of cells NC in the interface and the further lines will give the temperature information. The temperature data are given either as absolute temperatures or increments to the nominal temperature as can be specified in the interface file. The second line should contain the temperature data for cell 0 and so on.

OpenFOAM temperature files can also be used as is, without the need to remove the header data from the file.

Output mapping file

The output mapping file can be used to map the power distribution from multiple mesh cells to a combined tally bin. The syntax is:

NC
BIN0
BIN1
...
BINNC-1

The first line will specify the number of cells NC in the interface and the further lines will give the bin index for each cell (smallest bin index is 1). With a mesh containing six cells the mapping file

6
1
1
2
2
3
3

will map cells 0 and 1 to bin 1, cells 2 and 3 to bin 2 and cells 4 and 5 to bin 3.