Multi-physics interface

From Serpent Wiki
Revision as of 16:19, 24 February 2016 by Ville Valtavirta (Talk | contribs) (Non-uniform output binning)

Jump to: navigation, search

The multi-physics interface is a set of routines, as well as input/output formats intended for easily bringing in detailed temperature and density fields to Serpent and at the same time automatically producing power distributions to be used in coupled codes.

List of multi-physics interface filetypes

Type Name Notes
1 Point-average For interpolation of point-wise data
2 Regular mesh For data on a regular cartesian or hexagonal mesh
3 Functional dependence User defined functional dependence can be defined on source code level
4 Tetrahedral mesh type Use interface type 7 instead.
5 Fuel behavior interface (piecewise constant) For coupling with fuel performance/behavior codes with 1.5 dimensional (z,r) coordinate system.
6 Fuel behavior interface (radial interpolation) For coupling with fuel performance/behavior codes with 1.5 dimensional (z,r) coordinate system.
7 Unstructured mesh Based on OpenFOAM file format.

Usage instructions

The interface is linked to the main input file with the command

ifc FILE

where FILE is the path to the interface definition file. The descriptions for the interface definition files of the different interface types are given below. Multiple interfaces can be linked to a single input e.g. for bringing in temperature/density data for multiple materials.

Point-average interface (type 1)

Coolant density of a pin cell geometry has been modified using the point-average interface (type 1) (darker color indicates lower density).

The point-average interface is a way to bring in temperatures and densities for a single material in a number of discrete points in the geometry. During neutron transport Serpent will calculate the temperature and density in an interaction point as an average of the values of nearby interface points.

The input syntax for the interface file is

TYPE MAT OUT
OUTFILE NZ ZMIN ZMAX NR
DIM RAD EXP
NP
X1 Y1 Z1 DENS1 T1
X2 Y2 Z2 DENS2 T2
...

The first line contains three parameters:

TYPE  : the interface type (1 for point-average inteface)
MAT  : the name of the material that the data is given for.
OUT  : the output flag (1/0). If the flag is not set, the second line is omitted.

If the output flag is set, the second line contains parameters for the fission power output. If the output flag is not set the second line is emitted. The parameters for the output are:

OUTFILE  : determines the file name to which the output is printed
NZ  : is the number of axial bins for pin-wise power distributions
ZMIN  : is the minimum axial coordinate of the power distribution.
ZMAX  : is the maximum axial coordinate of the power distribution.
NR  : gives the number of radial bins in the power distribution. The radial bins are of equal volume.

The third line contains:

DIM  : The dimension of the distribution (1 = z-dependence only, 2 = x- and y-dependence, 3 = x-, y- and z-dependence).
RAD  : The exclusion radius, beyond which the points are not included in the average.
EXP  : The exponent for the averaging process.

If the exclusion radius RAD is too small, some parts of the region may not be properly covered. If the radius is large, more CPU time is required for calculating the average. Setting the exponent EXP to 1 means that the average is based on distance, EXP = 2 means square distance, and so on.

The fourth line gives the number of points NP to be given and the remaining lines give the data in each of the points: If DIM = 1, only Zi is given, if DIM = 2, only Xi and Yi are given). Parameter DENSi is the material density at the point (negative values for mass density, positive values for atomic density) and Ti is the temperature.

Regular mesh based interface (type 2)

Coolant density of a pin cell geometry has been modified using the regular mesh based interface (type2) (darker color indicates lower density).

The regular mesh based interface is a way to bring in temperatures and densities on a regular cartesian or hexagonal mesh. The format has a wide variety of uses such as bringing in information from nodal codes, channel/subchannel codes etc.

The input syntax for the interface file is

TYPE MAT OUT
OUTFILE NZ ZMIN ZMAX NR
MESHTYPE
NX XMIN XMAX NY YMIN YMAX NZ ZMIN ZMAX [Cartesian mesh]
X0 Y0 PITCH ZMIN ZMAX NX NY NZ [Hexagonal mesh]
DENS1 T1
DENS2 T2
...

The first line contains three parameters:

TYPE  : the interface type (1 for point-average inteface)
MAT  : the name of the material that the data is given for.
OUT  : the output flag (1/0). If the flag is not set, the second line is omitted.

If the output flag is set, the second line contains parameters for the fission power output. If the output flag is not set the second line is emitted. The parameters for the output are:

OUTFILE  : determines the file name to which the output is printed
NZ  : is the number of axial bins for pin-wise power distributions
ZMIN  : is the minimum axial coordinate of the power distribution.
ZMAX  : is the maximum axial coordinate of the power distribution.
NR  : gives the number of radial bins in the power distribution. The radial bins are of equal volume.

The third line contains basic information about the regular mesh: MESHTYPE is an integer indicating the type of the mesh (1 = cartesian, 4 = x-type hexagonal, 5 = y-type hexagonal). The format of the next line depends on the mesh type:

  • For the cartesian mesh the next line consists of three triplets of values indicating the number of bins as well as the minimum and maximum coordinates in each of the coordinate directions.
  • For the hexagonal mesh the next line contains 8 values: The coordinates for mesh centerpoint, mesh pitch, the axial limits of the mesh and the number of nodes in each of the coordinate directions.

Finally NX*NY*NZ pairs of values indicating the density and temperature in each of the cells follow. The ordering of the cells is such that the x-index increases first, then the y-index and finally the z-index.

User defined functional dependence (type 3)

Coolant density of a pin cell geometry has been modified using the user defined functional dependence (type3) with a sine wave based density distribution (darker color indicates lower density).

The user defined functional dependence interface allows the user to pass a number of arbitrary input parameters to Serpent, that are passed to subroutine userdf.c, along with local coordinates. The subroutine can be modified to include any kind of functional distribution. The interface file has almost no error tolerance, so be sure that all required values are entered and in the correct order.

The input syntax for the interface file is

TYPE MAT OUT
OUTFILE NZ ZMIN ZMAX NR
NP
P1
P2
...

The first line contains three parameters:

TYPE  : the interface type (1 for point-average inteface)
MAT  : the name of the material that the data is given for.
OUT  : the output flag (1/0). If the flag is not set, the second line is omitted.

If the output flag is set, the second line contains parameters for the fission power output. If the output flag is not set the second line is emitted. The parameters for the output are:

OUTFILE  : determines the file name to which the output is printed
NZ  : is the number of axial bins for pin-wise power distributions
ZMIN  : is the minimum axial coordinate of the power distribution.
ZMAX  : is the maximum axial coordinate of the power distribution.
NR  : gives the number of radial bins in the power distribution. The radial bins are of equal volume.

After the output parameters, the number of parameters to be read from the file NP is indicated followed by NP arbitrary parameters (integers or floating point numbers).

Tetrahedral mesh interface (type 4)

The tetrahedral mesh interface has been replaced with the OpenFOAM-based interface format, which offers the same functionality with some additional benefits.

Fuel behavior interface (types 5 and 6)

Fuel temperature of a pin cell geometry has been modified using the step profile fuel behavior interface (type 5) (brighter color indicates higher temperature).
Fuel temperature of a pin cell geometry has been modified using the linearly interpolated fuel behavior interface (type 6) (brighter color indicates higher temperature).

The fuel behavior interface is designed for bringing in temperature and radial expansion data from fuel behavior / fuel performance codes using the traditional "1.5 dimensional" (z,r) coordinate system.

TYPE OUTFILE NPIN

Parameter TYPE is set to 5 or 6 for fuel behavior interface. Type 5 indicates a temperature step profile in the radial direction whereas type 6 corresponds to interpolation of temperatures in the radial direction between the radial nodes. OUTFILE is the filename where output is written and NPIN is the number of fuel pins described in this interface.

After this header line, NPIN fuel pin descriptions follow.

Fuel pin description

First the pin name for which the temperatures are applied is given

PINUNI

this should correspond to the name in the pin-definition. After that come the output meshings for power and flux in axial, angular and radial directions

NZ ZMIN ZMAX NA AMIN AMAX NR RMIN RMAX
NZ ZMIN ZMAX NA AMIN AMAX NR RMIN RMAX EMIN EMAX

This sets up tallies for power and flux: NZ axial bins between ZMIN and ZMAX, NA angular bins between AMIN and AMAX (degrees), and NR radial bins (of equal area) between RMIN and RMAX. The detector intended for tallying the local fast flux also has energy limits EMIN and EMAX.

After these two output lines comes the number of axial temperature profiles that will be given for the first pin

NZ

Next, the limits of the first axial zone should be given as well as the number of angular subzones for this axial region

ZMIN1 ZMAX1 NA

After this, the limits of the first angular zone are given as well as the number of radial nodes to be read for the temperature distribution

AMIN1 AMAX1 NR

Finally, the information at NR radial nodes is given for the first angular zone of the first axial zone of the first pin:

RCOLD1 RHOT1 T1
RCOLD2 RHOT2 T2
...
RCOLDNR RHOTNR TNR

Three values are given for each radial node: RCOLDi the radial position of the node in cold (Serpent input) coordinates, RHOTi the radial position of the node in hot (to be used for neutron tracking) coordinates and Ti temperature at this radial node. If RCOLDi and RHOTi are equal the geometry is not deformed for the neutron tracking. If the interface type is 5, Ti is the temperature used between RHOTi-1 and RHOTi giving a step profile. If the interface type is set to 6, linear interpolation is used between the radial nodes.

After the list of NR radial nodes, come the limits of the next angular zone (if available) followed by the radial nodes for that zone etc. After all of the angular zones have been defined come the limits for the next axial zone and its first angular zone etc. After all of the axial zones of the first pin have been defined comes the pin-universe for the second pin etc.

Special cases

Axially segmented fuel rods

The pin-definitions in Serpent are essentially one-dimensional, which means that fuel rods that consist of axial segments have to be defined as a combination of multiple pin-definitions (or without the use of pin-definitions, but the interface only works with pin-definitions).

The fuel behavior interface can be used for rods consisting of multiple pin-definitions, but all of the pin definitions have to be linked to the interface. Instead of giving a single pin-universe name

PINUNI

in the interface file, a negative number indicating the number of pin-definitions to be linked should be given followed by the pin-universe names

 -NUNI PINUNI1 PINUNI2 ... PINUNINUNI

Consider, for example a fuel rod filled consisting of a lower undoped fuel part, an intermediate segment with gadolinia-doped fuel and an upper undoped fuel part. This kind of a fuel rod can be modeled by creating two pin-definitions

pin    p1nogd
fuel   0.60579
void   0.62103
Zirc   0.71501
cool

for the undoped part and

pin    p1yesgd
fuelgd 0.60579
void   0.62103
Zirc   0.71501
cool

for the doped part. The three dimensional rod can be created by defining the limiting horizontal surfaces (here surf z1 and surf z2) and filling the pin-definitions into the correct axial levels of a new universe:

cell cp1l p1combined fill p1nogd        -z1
cell cp1m p1combined fill p1yesgd    z1 -z2
cell cp1h p1combined fill p1nogd     z2

Now the universe p1combined can be used for example in a lattice, producing a three dimensional representation of the fuel rod. The interface file associated with this rod would then link both of the pin-definitions to the temperature field:

TYPE OUTFILE NPIN
-2 p1nogd p1yesgd
NZ ZMIN ZMAX NA AMIN AMAX NR RMIN RMAX
NZ ZMIN ZMAX NA AMIN AMAX NR RMIN RMAX EMIN EMAX
...

Non-uniform output binning

The output binning defined by the

NZ ZMIN ZMAX NA AMIN AMAX NR RMIN RMAX

line is normally of equal volume. If an arbitrary binning is to be used instead, a negative value can be given for the number of bins, followed by NBIN+1 bin boundaries instead of BINMIN and BINMAX. For example:

NZ ZMIN ZMAX NA AMIN AMAX -3 0.0 0.1 0.4 0.5

will define three radial bins, where the first bin is from 0.0 cm to 0.1 cm, the second one from 0.1 cm to 0.4 cm and the third bin from 0.4 cm to 0.5 cm. The practice is the same for each of the directions (axial, angular or radial).

Unstructured mesh based interface (type 7)

The unstructured mesh based interface has been designed to bring in solutions from solvers based on unstructured meshes (e.g. many finite volume or finite element codes).

The unstructured mesh based interface format is based on a point-face-cell hierarchy, where the user gives a number of points (vertices) that can be combined into a set of planar faces, which make up a set of closed convex cells.