Difference between revisions of "Unstructured mesh based input"

From Serpent Wiki
Jump to: navigation, search
(Faces file)
m
 
(17 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
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: [[Input_syntax_manual#solid_.28irregular_3D_geometry_definition.29|Geometry]] and [[Multi-physics_interface#Unstructured_mesh_based_interface_.28type_7.29|Interface]]. This page will describe the syntax in the individual files that are linked into the geometry or interface definition.
 
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: [[Input_syntax_manual#solid_.28irregular_3D_geometry_definition.29|Geometry]] and [[Multi-physics_interface#Unstructured_mesh_based_interface_.28type_7.29|Interface]]. This page will describe the syntax in the individual files that are linked into the geometry or interface definition.
  
 +
'''See the example''' [[Simple_umsh_8_cubes_input|here]].
  
 
== Points file ==
 
== Points file ==
Line 6: Line 7:
  
 
  ''NP''
 
  ''NP''
(
 
 
  (''X<sub>0</sub>'' ''Y<sub>0</sub>'' ''Z<sub>0</sub>'')
 
  (''X<sub>0</sub>'' ''Y<sub>0</sub>'' ''Z<sub>0</sub>'')
 
  (''X<sub>1</sub>'' ''Y<sub>1</sub>'' ''Z<sub>1</sub>'')
 
  (''X<sub>1</sub>'' ''Y<sub>1</sub>'' ''Z<sub>1</sub>'')
 
  ...
 
  ...
 
  (''X<sub>NP-1</sub>'' ''Y<sub>NP-1</sub>'' ''Z<sub>NP-1</sub>'')
 
  (''X<sub>NP-1</sub>'' ''Y<sub>NP-1</sub>'' ''Z<sub>NP-1</sub>'')
)
 
  
where the first line contains the number of points to be given <tt>''NP''</tt> followed by an opening brace and the coordinates of <tt>''NP''</tt> points given in braces.
+
where the first line contains the number of points to be given <tt>''NP''</tt> followed by the coordinates of <tt>''NP''</tt> points (<b>in metres</b>) given in braces.
  
OpenFOAM points files can also be used as is without the need to remove the header data from the file.
+
OpenFOAM points files can also be used as is without any modifications.
  
 
== Faces file ==
 
== Faces file ==
Line 22: Line 21:
  
 
  ''NF''
 
  ''NF''
(
+
  ''NP<sub>0</sub>''(''F<sub>0,p0</sub>'' ''F<sub>0,p1</sub>'' ... ''F<sub>0,pNP<sub>0</sub>-1</sub>'')
  ''NP<sub>1</sub>''(''F<sub>0,p0</sub>'' ''F<sub>0,p1</sub>'' ... ''F<sub>0,pNP-1<sub>0</sub></sub>'')
+
  ''NP<sub>1</sub>''(''F<sub>1,p0</sub>'' ''F<sub>1,p1</sub>'' ... ''F<sub>1,pNP<sub>1</sub>-1</sub>'')
  ''NP<sub>0</sub>''(''F<sub>1,p0</sub>'' ''F<sub>1,p1</sub>'' ... ''F<sub>1,pNP-1<sub>1</sub></sub>'')
+
 
  ...
 
  ...
  ''NP<sub>NF-1</sub>''(''F<sub>NF-1,p0</sub>'' ''F<sub>NF-1,p1</sub>'' ... ''F<sub>NF,pNP-1<sub>NF-1</sub></sub>'')
+
  ''NP<sub>NF-1</sub>''(''F<sub>NF-1,p0</sub>'' ''F<sub>NF-1,p1</sub>'' ... ''F<sub>NF,pNP<sub>NF-1</sub>-1</sub>'')
)
+
  
where the first line contains the number of faces to be given <tt>''NF''</tt> followed by an opening brace and a list of faces. Each face is defined by the number of points making up the face <tt>''NP<sub>i</sub>''</tt> followed by the indices of the points making up the face in braces.
+
where the first line contains the number of faces to be given <tt>''NF''</tt> followed by a list of faces. Each face is defined by the number of points making up the face <tt>''NP<sub>i</sub>''</tt> 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.
 
OpenFOAM face files can also be used as is, without the need to remove the header data from the file.
Line 60: Line 57:
 
  ''NEIGHBOUR<sub>1</sub>''
 
  ''NEIGHBOUR<sub>1</sub>''
 
  ...
 
  ...
  ''NEIGHBOUR<sub>NF<sub>int</sub></sub>''
+
  ''NEIGHBOUR<sub>NF<sub>int</sub>-1</sub>''
  
 
where the first line contains the number of owner cells to be given <tt>''NF<sub>int</sub>''</tt> (this should be equal to the number of internal faces in the mesh). An opening brace is followed by <tt>''NF<sub>int</sub>''</tt> cell indices so that the cell index <tt>''NEIGHBOUR<sub>0</sub>''</tt> is the neighbour of face 0 etc.
 
where the first line contains the number of owner cells to be given <tt>''NF<sub>int</sub>''</tt> (this should be equal to the number of internal faces in the mesh). An opening brace is followed by <tt>''NF<sub>int</sub>''</tt> cell indices so that the cell index <tt>''NEIGHBOUR<sub>0</sub>''</tt> is the neighbour of face 0 etc.
Line 69: Line 66:
 
*Serpent will use this information to speed up the geometry search as neutrons exit a mesh cell.
 
*Serpent will use this information to speed up the geometry search as neutrons exit a mesh cell.
  
== Materials file ==
+
== 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 materials file linked to the geometry or interface definition. The syntax for the file is straightforward:
+
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''
 
  ''NC''
 +
''MAT<sub>0</sub>''
 
  ''MAT<sub>1</sub>''
 
  ''MAT<sub>1</sub>''
''MAT<sub>2</sub>''
 
 
  ...
 
  ...
  ''MAT<sub>NC</sub>''
+
  ''MAT<sub>NC-1</sub>''
  
 
First the number of cells in the interface <tt>''NC''</tt> is given. This is followed by the material name for each of the cells.
 
First the number of cells in the interface <tt>''NC''</tt> is given. This is followed by the material name for each of the cells.
Line 89: Line 86:
 
  ''RHO<sub>1</sub>''
 
  ''RHO<sub>1</sub>''
 
  ...
 
  ...
  ''RHO<sub>NC</sub>''
+
  ''RHO<sub>NC-1</sub>''
  
 
The first line will specify the number of cells <tt>''NC''</tt> 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 <tt>0</tt> and so on.
 
The first line will specify the number of cells <tt>''NC''</tt> 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 <tt>0</tt> 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/m<sup>3</sup>.
+
'''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/m<sup>3</sup>'''.
  
 
== Temperature file ==
 
== Temperature file ==
Line 103: Line 100:
 
  ''T<sub>1</sub>''
 
  ''T<sub>1</sub>''
 
  ...
 
  ...
  ''T<sub>NC</sub>''
+
  ''T<sub>NC-1</sub>''
  
 
The first line will specify the number of cells <tt>''NC''</tt> 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 <tt>0</tt> and so on.
 
The first line will specify the number of cells <tt>''NC''</tt> 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 <tt>0</tt> and so on.
Line 109: Line 106:
 
OpenFOAM temperature files can also be used as is, without the need to remove the header data from the file.
 
OpenFOAM temperature files can also be used as is, without the need to remove the header data from the file.
  
== Mapping file ==
+
== Output mapping file ==
  
The mapping can be used to map the power distribution from multiple mesh cells to a combined tally bin. The syntax is:
+
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''
 
  ''NC''
Line 117: Line 114:
 
  ''BIN<sub>1</sub>''
 
  ''BIN<sub>1</sub>''
 
  ...
 
  ...
  ''BIN<sub>NC</sub>''
+
  ''BIN<sub>NC-1</sub>''
  
 
The first line will specify the number of cells <tt>''NC''</tt> 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
 
The first line will specify the number of cells <tt>''NC''</tt> 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
Line 130: Line 127:
  
 
will map cells 0 and 1 to bin 1, cells 2 and 3 to bin 2 and cells 4 and 5 to bin 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.
 +
 +
[[Category:Input]]

Latest revision as of 14:54, 29 November 2017

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.