Difference between revisions of "Simple umsh 8 cubes input"

From Serpent Wiki
Jump to: navigation, search
(Traditional way)
(Traditional way)
Line 155: Line 155:
 
</nowiki>
 
</nowiki>
  
== Traditional way ==
+
== Traditional geometry + unstructured mesh based interface ==
  
The "traditional" way of defining a geometry with multiple materials at multiple densities and temperatures is to create a separate material for each of the temperature and density combinations. As this example has two different nuclide compositions we end up with 2<sup>3</sup> = 8 separate materials. This input creates the geometry by splitting the inner region into eight sub-regions using the coordinate planes. The correct material is then filled into each octant. The temperature and density data are specified in the material card.
+
The number of separate material definitions that are needed can be reduced to two by bringing in the temperature and density data via the multi-physics interface. The two nuclide compositions still have to be separated into their own materials. This input creates the geometry by splitting the inner region into eight sub-regions using the coordinate planes. The correct material is then filled into each octant. The temperature and density data are specified in the material card.
  
 
  <nowiki>
 
  <nowiki>
set title "8 cubes hexahedron test, CSG geo"
+
set title "8 cubes hexahedron test"
  
 
include "/home/vvvillehe/Serpent2/serpdefaults.txt"
 
include "/home/vvvillehe/Serpent2/serpdefaults.txt"
Line 172: Line 172:
 
surf 3 inf
 
surf 3 inf
  
% --- yz-plane
+
% --- yz-plane (not needed)
  
surf yzPlane px 0.0
+
%surf yzPlane px 0.0
  
% --- xz-plane
+
% --- xz-plane (not needed)
  
surf xzPlane py 0.0
+
%surf xzPlane py 0.0
  
 
% --- xy-plane
 
% --- xy-plane
Line 190: Line 190:
 
% --- Geometry based on the normal CSG-model
 
% --- Geometry based on the normal CSG-model
  
cell HiHiHi 0    fuelHiDHiTHiU   yzPlane  xzPlane  xyPlane -2metreCube
+
cell HiHiHi 0    fuelHiU   xyPlane -2metreCube
cell HiLoHi 0    fuelHiDLoTHiU    yzPlane -xzPlane  xyPlane -2metreCube
+
cell HiLoHi 0    fuelLoU   -xyPlane -2metreCube
cell HiHiLo 0    fuelHiDHiTLoU    yzPlane  xzPlane -xyPlane -2metreCube
 
cell HiLoLo 0    fuelHiDLoTLoU    yzPlane -xzPlane -xyPlane -2metreCube
 
cell LoHiHi 0    fuelLoDHiTHiU   -yzPlane  xzPlane  xyPlane -2metreCube
 
cell LoLoHi 0    fuelLoDLoTHiU  -yzPlane -xzPlane  xyPlane -2metreCube
 
cell LoHiLo 0    fuelLoDHiTLoU  -yzPlane  xzPlane -xyPlane -2metreCube
 
cell LoLoLo 0    fuelLoDLoTLoU  -yzPlane -xzPlane -xyPlane -2metreCube
 
  
 
% --- Blanket cell around the eight cubes
 
% --- Blanket cell around the eight cubes
Line 210: Line 204:
  
 
set bc 1
 
set bc 1
 +
 +
% --- Temperature and density information from interface
 +
 +
ifc "./type8.ifc"
  
 
% --- Fuel salts:
 
% --- Fuel salts:
  
% --- Material for cube at (+,+,+) corner (umsh cell 0)
+
% --- Material for cubes at (?,?,+)
mat fuelHiDHiTHiU  -4.10 tmp 1200.0
+
mat fuelHiU    -4.10  
 
Li-7.06c        77.50
 
Li-7.06c        77.50
 
F-19.06c      167.50
 
F-19.06c      167.50
Line 220: Line 218:
 
U-233.06c        2.85
 
U-233.06c        2.85
  
% --- Material for cube at (+,-,+) corner (umsh cell 1)
+
% --- Material for cubes at (?,?,-)
mat fuelHiDLoTHiU  -4.10 tmp 600.0
+
mat fuelLoU    -4.10  
 
Li-7.06c        77.50
 
Li-7.06c        77.50
 
F-19.06c      167.50
 
F-19.06c      167.50
Th-232.06c      19.65
+
Th-232.06c      19.65        
U-233.06c        2.85
 
 
 
% --- Material for cube at (+,+,-) corner (umsh cell 2)
 
mat fuelHiDHiTLoU  -4.10 tmp 1200.0
 
Li-7.06c        77.50
 
F-19.06c      167.50
 
Th-232.06c      19.65
 
U-233.06c        1.425
 
 
 
% --- Material for cube at (+,-,-) corner (umsh cell 3)
 
mat fuelHiDLoTLoU  -4.10 tmp 600.0
 
Li-7.06c        77.50
 
F-19.06c      167.50
 
Th-232.06c      19.65
 
U-233.06c        1.425
 
 
 
% --- Material for cube at (-,+,+) corner (umsh cell 4)
 
mat fuelLoDHiTHiU  -2.05 tmp 1200.0
 
Li-7.06c        77.50
 
F-19.06c      167.50
 
Th-232.06c      19.65
 
U-233.06c        2.85
 
 
 
% --- Material for cube at (-,-,+) corner (umsh cell 5)
 
mat fuelLoDLoTHiU  -2.05 tmp 600.0
 
Li-7.06c        77.50
 
F-19.06c      167.50
 
Th-232.06c      19.65
 
U-233.06c        2.85
 
 
 
% --- Material for cube at (-,+,-) corner (umsh cell 6)
 
mat fuelLoDHiTLoU  -2.05 tmp 1200.0
 
Li-7.06c        77.50
 
F-19.06c      167.50
 
Th-232.06c      19.65
 
U-233.06c        1.425
 
 
 
% --- Material for cube at (-,-,-) corner (umsh cell 7)
 
mat fuelLoDLoTLoU  -2.05 tmp 600.0
 
Li-7.06c        77.50
 
F-19.06c      167.50
 
Th-232.06c      19.65
 
 
U-233.06c        1.425
 
U-233.06c        1.425
  
 
% --- Blanket material  
 
% --- Blanket material  
mat blanket    -0.10 rgb 50 250 50
+
mat blanket    -0.10
 
Li-7.06c        77.50
 
Li-7.06c        77.50
 
F-19.06c      167.50
 
F-19.06c      167.50
Line 282: Line 238:
 
% --- Geometry plot:
 
% --- Geometry plot:
  
plot 1 500 500 10
+
plot 1 500 500 10
 
plot 1 500 500 -10
 
plot 1 500 500 -10
  
Line 293: Line 249:
  
 
set power 8.0
 
set power 8.0
 +
</nowiki>
 +
 +
Here the interface file "./type8.ifc" has been linked to the main input file. The contents of this interface file using the [[Multi-physics_interface#Unstructured_mesh_based_interface_with_multiple_materials_.28type_8.29|type 8 interface format]] are presented here:
 +
 +
<nowiki>
 +
8 fuelHiU 1
 +
./0/volpower
 +
-1 600
 +
5 3 2 2 2
 +
./constant/polyMesh/points
 +
./constant/polyMesh/faces
 +
./constant/polyMesh/owner
 +
./constant/polyMesh/neighbour
 +
./constant/polyMesh/materials
 +
./0/rho 1 
 +
./0/T 1 
 +
./constant/polyMesh/map
 
</nowiki>
 
</nowiki>

Revision as of 13:44, 15 March 2016

These example inputs showcase the unstructured mesh based geometry and interface capabilities in Serpent 2.

The problem geometry is a cube with coordinates [-150, 150]x[-150, 150]x[-150, 150] divided into an inner region inside [-100, 100]x[-100, 100]x[-100, 100] and a blanket region.

The inner region is also evidently cube shaped but consists of 8 sub-regions:

  • Areas with positive x (+,?,?) have a larger density (different nuclide density for macroscopic cross sections).
  • Areas with positive y (?,+,?) have a larger temperature (different temperature for cross sections).
  • Areas with positive z (?,?,+) have a larger U-233 content (different material composition).

In the following sections this geometry is created in several different ways:

  1. Using the normal Serpent geometry definitions with separate materials for all 8 regions.
  2. Using the unstructured mesh based geometry definition with separate materials for all 8 regions.
  3. Using the normal Serpent geometry definitions with temperature and density data brought in using the unstructured mesh based interface.
  4. Using the unstructured mesh based geometry definition with attached temperature and density data for the materials.

Traditional way

The "traditional" way of defining a geometry with multiple materials at multiple densities and temperatures is to create a separate material for each of the temperature and density combinations. As this example has two different nuclide compositions we end up with 23 = 8 separate materials. This input creates the geometry by splitting the inner region into eight sub-regions using the coordinate planes. The correct material is then filled into each octant. The temperature and density data are specified in the material card.

set title "8 cubes hexahedron test, CSG geo"

include "/home/vvvillehe/Serpent2/serpdefaults.txt"

% --- Boundary of geometry:

surf 2  cuboid -150 150 -150 150 -150 150

% --- Boundary at infinity

surf 3 inf

% --- yz-plane

surf yzPlane px 0.0

% --- xz-plane

surf xzPlane py 0.0

% --- xy-plane

surf xyPlane pz 0.0

% --- Cube with two metre edge length:

surf 2metreCube cuboid -100 100 -100 100 -100 100

% --- Geometry based on the normal CSG-model

cell HiHiHi 0    fuelHiDHiTHiU    yzPlane  xzPlane  xyPlane -2metreCube
cell HiLoHi 0    fuelHiDLoTHiU    yzPlane -xzPlane  xyPlane -2metreCube
cell HiHiLo 0    fuelHiDHiTLoU    yzPlane  xzPlane -xyPlane -2metreCube
cell HiLoLo 0    fuelHiDLoTLoU    yzPlane -xzPlane -xyPlane -2metreCube
cell LoHiHi 0    fuelLoDHiTHiU   -yzPlane  xzPlane  xyPlane -2metreCube
cell LoLoHi 0    fuelLoDLoTHiU   -yzPlane -xzPlane  xyPlane -2metreCube
cell LoHiLo 0    fuelLoDHiTLoU   -yzPlane  xzPlane -xyPlane -2metreCube
cell LoLoLo 0    fuelLoDLoTLoU   -yzPlane -xzPlane -xyPlane -2metreCube

% --- Blanket cell around the eight cubes

cell 11  0 blanket   2metreCube -2

% --- Outside the geometry

cell 20  0 outside    2

% --- Black BC

set bc 1

% --- Fuel salts:

% --- Material for cube at (+,+,+) corner (umsh cell 0)
mat fuelHiDHiTHiU  -4.10 tmp 1200.0
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65         
U-233.06c        2.85

% --- Material for cube at (+,-,+) corner (umsh cell 1)
mat fuelHiDLoTHiU  -4.10 tmp 600.0
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65
U-233.06c        2.85

% --- Material for cube at (+,+,-) corner (umsh cell 2)
mat fuelHiDHiTLoU  -4.10 tmp 1200.0
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65
U-233.06c        1.425

% --- Material for cube at (+,-,-) corner (umsh cell 3)
mat fuelHiDLoTLoU  -4.10 tmp 600.0
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65
U-233.06c        1.425

% --- Material for cube at (-,+,+) corner (umsh cell 4)
mat fuelLoDHiTHiU  -2.05 tmp 1200.0
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65
U-233.06c        2.85

% --- Material for cube at (-,-,+) corner (umsh cell 5)
mat fuelLoDLoTHiU  -2.05 tmp 600.0
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65
U-233.06c        2.85

% --- Material for cube at (-,+,-) corner (umsh cell 6)
mat fuelLoDHiTLoU  -2.05 tmp 1200.0
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65
U-233.06c        1.425

% --- Material for cube at (-,-,-) corner (umsh cell 7)
mat fuelLoDLoTLoU  -2.05 tmp 600.0
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65
U-233.06c        1.425

% --- Blanket material 
mat blanket     -0.10 rgb 50 250 50
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65         
U-233.06c        2.85

% --- Run parameters:

set pop 5000 200 20

% --- Geometry plot:

plot 1 500 500  10
plot 1 500 500 -10

% --- Mesh plots:

mesh 10 1 500 500
mesh 1 500 500

% --- Power level:

set power 8.0

Traditional geometry + unstructured mesh based interface

The number of separate material definitions that are needed can be reduced to two by bringing in the temperature and density data via the multi-physics interface. The two nuclide compositions still have to be separated into their own materials. This input creates the geometry by splitting the inner region into eight sub-regions using the coordinate planes. The correct material is then filled into each octant. The temperature and density data are specified in the material card.

set title "8 cubes hexahedron test"

include "/home/vvvillehe/Serpent2/serpdefaults.txt"

% --- Boundary of geometry:

surf 2  cuboid -150 150 -150 150 -150 150

% --- Boundary at infinity

surf 3 inf

% --- yz-plane (not needed)

%surf yzPlane px 0.0

% --- xz-plane (not needed)

%surf xzPlane py 0.0

% --- xy-plane

surf xyPlane pz 0.0

% --- Cube with two metre edge length:

surf 2metreCube cuboid -100 100 -100 100 -100 100

% --- Geometry based on the normal CSG-model

cell HiHiHi 0    fuelHiU    xyPlane -2metreCube
cell HiLoHi 0    fuelLoU   -xyPlane -2metreCube

% --- Blanket cell around the eight cubes

cell 11  0 blanket   2metreCube -2

% --- Outside the geometry

cell 20  0 outside    2

% --- Black BC

set bc 1

% --- Temperature and density information from interface

ifc "./type8.ifc"

% --- Fuel salts:

% --- Material for cubes at (?,?,+)
mat fuelHiU     -4.10 
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65         
U-233.06c        2.85

% --- Material for cubes at (?,?,-)
mat fuelLoU     -4.10 
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65         
U-233.06c        1.425

% --- Blanket material 
mat blanket     -0.10
Li-7.06c        77.50
F-19.06c       167.50
Th-232.06c      19.65         
U-233.06c        2.85

% --- Run parameters:

set pop 5000 200 20

% --- Geometry plot:

plot 1 500 500 10
plot 1 500 500 -10

% --- Mesh plots:

mesh 10 1 500 500
mesh 1 500 500

% --- Power level:

set power 8.0

Here the interface file "./type8.ifc" has been linked to the main input file. The contents of this interface file using the type 8 interface format are presented here:

8 fuelHiU 1
./0/volpower
-1 600
5 3 2 2 2
./constant/polyMesh/points
./constant/polyMesh/faces
./constant/polyMesh/owner
./constant/polyMesh/neighbour
./constant/polyMesh/materials
./0/rho 1  
./0/T 1   
./constant/polyMesh/map