Difference between revisions of "Ants developer manual"

From Kraken Wiki
Jump to: navigation, search
(Nodes)
 
(43 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
=== Super nodes ===
 
=== Super nodes ===
  
The input nodes are called super nodes in the program code. In fuel load card, positions marked with "0" are not included in the calculation mesh. The super node coordinates begin from the lowest axial level and lowest left non-"0" value. The first node is (1,1,1) in (x,y,z) coordinates, and the x increases to left and y increases from input row to input row. In hexagonal input geometry in fuel load card the x=1 goes in the 120 degree direction from the positive x axis. The z coordinate increases from layer to layer. The super node indexing increases fastest in the x coordinate, second fastest in the y coordinate and slowest in the z coordinate.
+
The input nodes are called super nodes in the program code. The super nodes (input nodes) can be subdivided into smaller nodes (calculation nodes). In fuel load card, positions marked with "0" are not included in the calculation mesh. The super node coordinates begin from the lowest axial level and lowest left non-"0" value. The first node is (1,1,1) in (x,y,z) coordinates, and the x increases to left and y increases from input row to input row. In hexagonal input geometry in fuel load card the x=1 goes in the 120 degree direction from the positive x axis. The z coordinate increases from layer to layer. The super node indexing increases fastest in the x coordinate, second fastest in the y coordinate and slowest in the z coordinate.
 +
 
 +
[[File:sqr.png|thumb|Indexing in a single axial layer of a rectangular mesh.]]
 +
[[File:hexx120.png|thumb|Indexing in a single axial layer of a hexagonal mesh. In Ants program code, the i and j in this figure are called x and y.]]
  
 
The input fuel load map is indexed in e.g. the "ind_*_to_orig_x", "ind_*_to_orig_y" and "ind_*_to_orig_z" index arrays in the program code.
 
The input fuel load map is indexed in e.g. the "ind_*_to_orig_x", "ind_*_to_orig_y" and "ind_*_to_orig_z" index arrays in the program code.
  
The input non-"0" nodes are called real super nodes. There is also another (x,y,z) indexing where there are one layer of boundary super nodes added in all x, y, radial hex or z directions. These are indexed in e.g. the "ind_*_to_x", "ind_*_to_y" and "ind_*_to_z" index arrays in the program code. Whereas only the input nodes are indexes in the real super node indexes, non-calculation boundary nodes are included in the all super node indexes together with the input nodes. The real and all super node indexes are the same for the real super nodes. The boundary node indexes begin from the number of real super nodes + 1, and are again indexes from the bottom z level leftmost corner. The sizes of the non-orig-(x,y,z) index arrays are +2 in all coordinates. The fuel super nodes are indexes only for the input super nodes marked to be fuel.
+
The input non-"0" nodes are called real super nodes. There is also another (x,y,z) indexing where there are one layer of boundary super nodes added in all x, y, radial hex or z directions. These are indexed in e.g. the "ind_*_to_x", "ind_*_to_y" and "ind_*_to_z" index arrays in the program code. Whereas only the input nodes are indexed in the real super node indexes, non-calculation boundary nodes are included in the all super node indexes together with the input nodes. The real and all super node indexes are the same for the real super nodes. The boundary node indexes begin from the number of real super nodes + 1, and are again indexed from the bottom z level leftmost corner. The sizes of the non-orig-(x,y,z) index arrays are the sizes of the orig-(x,y,z) arrays +2 in all coordinates. The fuel super nodes are indexed only for the input super nodes marked to be fuel. For the non-orig index arrays, the (x,y,z) in the orig index array corresponds to (x+1,y+1,z+1) in the non-orig index array.
  
 
=== Nodes ===
 
=== Nodes ===
  
The calculation nodes are called just nodes in the program code. The calculation nodes are indexes similar to the super nodes, but the divisions of the super nodes in the calculation nodes are indexes faster. E.g. with core division_x 2 and core division_y 2 in rectangular geometry, the real nodes 1...4 are in super node 1, and 5...8 in super node 2. The node indexes again run fastest in the x coordinate, then y coordinate and then z coordinate. In Triangular geometry, the node indexes run fastest in the radial hex coordinate and then in z coordinate inside a super node.
+
The calculation nodes are called just nodes in the program code. The calculation nodes are indexed similar to the super nodes, but the divisions of the super nodes to the calculation nodes are indexed fastest. E.g. with core division_x 2 and core division_y 2 in rectangular geometry, the real nodes 1...4 are in super node 1, and 5...8 in super node 2. The node indexes again run fastest in the x coordinate, then y coordinate and then z coordinate. In hexagonal geometry, only the z-direction can be subdivided, thus the z coordinate runs fastest. In triangular geometry, the node indexes run fastest in the radial hex coordinate and then in z coordinate inside a super node. The radial hex coordinate also runs fastest in the x coordinate and then in the y coordinate.
 +
 
 +
[[File:tr_sub.png|thumb|500px|Examples of hexagonal subdivision of the triangular geometry model. Blue, orange, yellow and green equal to core division_hex 6, 24, 96 and 384, respectively.]]
 +
 
 +
[[File:sqr_sub.png|thumb|400px|Indexing of one axial layer of nodes in a divided rectangular super node. The axial direction division (core division_z) begins from the lowest z, and the final node index is obtained by adding (z-1)*(core division_x)*(core_division_y) to the indexing presented in this figure, where z runs from 1 to core division_z.]]
 +
 
 +
==== Division cards ====
 +
The core division_x and core division_y divide the rectangular geometry super nodes into respective calculation nodes in the radial plane (x and y directions). These numbers have to be divisible by 2.
 +
 
 +
The core division_hex divide the triangular geometry super node (which is a hexagon) into respective calculation nodes in the radial plane. The number indicates the number of triangles in one hexagon, i.e. the number has to be 6 or divisible by 4 after divided by 6.
 +
 
 +
The core division_z divides the super nodes into respective calculation nodes in the axial direction. It can be used in all geometries.
 +
 
 +
The number of calculation nodes per super node (num_division) is given by
 +
*core division_x*core division_y*core division_z in rectangular geometry
 +
*core division_z in hexagonal geometry
 +
*core division_hex*core division_z in triangular geometry
 +
 
 +
==== Indexing ====
 +
 
 +
Super nodes are indexed from 1 to num_?_super_node (with ? being all/real/fuel/boundary in this section). Super nodes are divided into num_division calculation nodes which are indexed from 1 to num_division in each super node. The calculation nodes are globally indexed from 1 to num_?_node, where num_?_node is num_division*num_?_super_node. Each ?_super_node contains ?_nodes with indexes ((?_super_node - 1)*num_division + 1)...(?_super_node*num_division).
 +
 
 +
The all_super_node and all_node indexes goes such that the real_super_node and real_node are indexed first as 1...num_real_super_node and 1...num_real_node, respectively, and the boundary_super_node and boundary_node are indexed as (num_real_super_node+1)...(num_real_super_node+num_boundary_super_node) and (num_real_node+1)...(num_real_node+num_boundary_node), respectively. Thus, num_all_super_node equals num_real_super_node+num_boundary_super_node and num_all_node equals num_real_node+num_boundary_node.
 +
 
 +
Boundary_super_node always contain num_division boundary_nodes, even though not all of these nodes are actually connected with real calculation nodes. Only boundary nodes neighboring real nodes are considered in the boundary partial current updates during the calculation.
 +
 
 +
=== Directions ===
 +
 
 +
Super node and node directions are the same for the rectangular and hexagonal geometry solvers. For triangular they are different.
 +
* For rectangular nodes the directions are
 +
** DIR_EAST
 +
** DIR_NORTH
 +
** DIR_WEST
 +
** DIR_SOUTH
 +
** DIR_ABOVE
 +
** DIR_BELOW
 +
* For hexagonal nodes, including the triangular geometry super nodes, the directions are
 +
** DIR_EAST
 +
** DIR_NORTHEAST
 +
** DIR_NORTHWEST
 +
** DIR_WEST
 +
** DIR_SOUTHEAST
 +
** DIR_SOUTHWEST
 +
** DIR_ABOVE
 +
** DIR_BELOW
 +
* For triangular nodes the directions are
 +
** DIR_0, which can be equivalent to DIR_EAST or DIR_WEST
 +
** DIR_120, which can be equivalent to DIR_NORTHWEST or DIR_NORTHEAST
 +
** DIR_240, which can be equivalent to DIR_SOUTHEAST or DIR_SOUTHWEST
 +
** DIR_ABOVE
 +
** DIR_BELOW
 +
 
 +
[[File:tr_mom.png|thumb|400px|Triangular geometry model radial directions for the hexagonal super node and the two types of triangle nodes.]]
 +
 
 +
=== Partial current moments ===
 +
 
 +
The number of outgoing partial current moments are 18, 20 and 14 for the rectangular, hexagonal and triangular geometry models. The directions of the outgoing partial current moments can be found in the MOM_TO_DIR arrays of each solver.
 +
 
 +
=== Colors ===
 +
 
 +
The calculation nodes are divided into colors such that the colors of the neighbor nodes are different. The outgoing partial current moments are solved parallelly for the nodes of the same color. The number of the required colors is small, as Ants uses only surface currents in the neutronics solution instead of also using corner currents. For the rectangular and triangular geometries, the nodes are divided in two colors. Three colors would be sufficient for the hexagonal geometry solver, but four is used to preserve a possible 120 degree symmetry in the solution.
 +
 
 +
== Variables ==
 +
 
 +
Most of the relevant neutronics variables are defined in Neutronics_t type, in neutronics.F90. The indexing of the dimensions of the variables can be reverse-engineered from subroutines neutronics_allocate_geometry_variables and neutronics_allocate_neutronics_variables for geometry and neutronics variables, respectively, if not clearly documented in their definitions in Neutronics_t type. Variables related to coarse group and coarse mesh rebalance (CGR and CMR, respectively) acceleration methods can be reverse-engineered from neutronics_allocate_cgr_variables, and variables related to control elements in neutronics_construct_control_element.
 +
 
 +
== Solution method ==
 +
 
 +
The mode flux solutions used in the three different geometry neutronics models could be documented here. In general, sinh + cosh or sin/cos (abbreviated SN/CS here) depending on the sign of the real eigenvalue, or sinh*sin, cosh*cos, sinh*cos, cosh*sin with appropriate signs for the complex eigenvalues.
 +
 
 +
*Rectangular: SN/CS or the complex combinations for x, y and z directions weighted with 1.0, and (y, z) for x direction, (x, z) for y direction, and (x, y) for z direction.
 +
*Hexagonal: SN/CS or the complex combinations for x (0 degree from positive x axis), u (60 degree from positive x axis) and v (120 degree from positive x axis) directions weighted with 1.0, and (y (wx), z) for x direction, (150 degree from positive x axis (wu), z) for u direction and (30 degree from positive x axis (wv), z) for v direction, and SN/CS or the complex combinations for z direction.
 +
*Triangular: SN/CS or the complex combinations for 0 (0 degree from positive x axis), 120 (120 degree from positive x axis) and 240 (240 degree from positive x axis) directions weighted with 1.0, and (90 degree from positive x axis) for 0 direction, (210 degree from positive x axis) for 120 direction and (330 degree from positive x axis) for 240 direction, and SN/CS or the complex combinations for z direction.
 +
 
 +
Additionally, the descriptions of the different moments of the incoming and outgoing boundary currents could be documented here.  
  
 +
The reasons for choosing the different models (mode flux/partial current moments) could also be described here.
  
 
[[Category:Ants]]
 
[[Category:Ants]]

Latest revision as of 08:22, 29 April 2022

Geometry and indexing

Ants calculation mesh is determined by input cards

  • (core width_x, core width_y) or (core width_xy), core axial_nodes, core axial_heights, core division_x, core division_y, core division_z, core columns, core rows, and fuel load for rectangular geometry
  • core width_xy, core axial_nodes, core axial_heights, core division_z, core columns, core rows, and fuel load for hexagonal geometry
  • core width_xy, core axial_nodes, core axial_heights, core division_hex, core division_z, core columns, core rows, and fuel load for triangular geometry

Number of input nodes is determined by core axial_nodes, core columns, core rows and fuel load. The sizes of input nodes are determined by core width_x, core width_y, core width_xy and core axial_heights. The number and sizes of the calculation nodes can be changed using core division_x, core division_y, core division_hex and core division_z.

Super nodes

The input nodes are called super nodes in the program code. The super nodes (input nodes) can be subdivided into smaller nodes (calculation nodes). In fuel load card, positions marked with "0" are not included in the calculation mesh. The super node coordinates begin from the lowest axial level and lowest left non-"0" value. The first node is (1,1,1) in (x,y,z) coordinates, and the x increases to left and y increases from input row to input row. In hexagonal input geometry in fuel load card the x=1 goes in the 120 degree direction from the positive x axis. The z coordinate increases from layer to layer. The super node indexing increases fastest in the x coordinate, second fastest in the y coordinate and slowest in the z coordinate.

Indexing in a single axial layer of a rectangular mesh.
Indexing in a single axial layer of a hexagonal mesh. In Ants program code, the i and j in this figure are called x and y.

The input fuel load map is indexed in e.g. the "ind_*_to_orig_x", "ind_*_to_orig_y" and "ind_*_to_orig_z" index arrays in the program code.

The input non-"0" nodes are called real super nodes. There is also another (x,y,z) indexing where there are one layer of boundary super nodes added in all x, y, radial hex or z directions. These are indexed in e.g. the "ind_*_to_x", "ind_*_to_y" and "ind_*_to_z" index arrays in the program code. Whereas only the input nodes are indexed in the real super node indexes, non-calculation boundary nodes are included in the all super node indexes together with the input nodes. The real and all super node indexes are the same for the real super nodes. The boundary node indexes begin from the number of real super nodes + 1, and are again indexed from the bottom z level leftmost corner. The sizes of the non-orig-(x,y,z) index arrays are the sizes of the orig-(x,y,z) arrays +2 in all coordinates. The fuel super nodes are indexed only for the input super nodes marked to be fuel. For the non-orig index arrays, the (x,y,z) in the orig index array corresponds to (x+1,y+1,z+1) in the non-orig index array.

Nodes

The calculation nodes are called just nodes in the program code. The calculation nodes are indexed similar to the super nodes, but the divisions of the super nodes to the calculation nodes are indexed fastest. E.g. with core division_x 2 and core division_y 2 in rectangular geometry, the real nodes 1...4 are in super node 1, and 5...8 in super node 2. The node indexes again run fastest in the x coordinate, then y coordinate and then z coordinate. In hexagonal geometry, only the z-direction can be subdivided, thus the z coordinate runs fastest. In triangular geometry, the node indexes run fastest in the radial hex coordinate and then in z coordinate inside a super node. The radial hex coordinate also runs fastest in the x coordinate and then in the y coordinate.

Examples of hexagonal subdivision of the triangular geometry model. Blue, orange, yellow and green equal to core division_hex 6, 24, 96 and 384, respectively.
Indexing of one axial layer of nodes in a divided rectangular super node. The axial direction division (core division_z) begins from the lowest z, and the final node index is obtained by adding (z-1)*(core division_x)*(core_division_y) to the indexing presented in this figure, where z runs from 1 to core division_z.

Division cards

The core division_x and core division_y divide the rectangular geometry super nodes into respective calculation nodes in the radial plane (x and y directions). These numbers have to be divisible by 2.

The core division_hex divide the triangular geometry super node (which is a hexagon) into respective calculation nodes in the radial plane. The number indicates the number of triangles in one hexagon, i.e. the number has to be 6 or divisible by 4 after divided by 6.

The core division_z divides the super nodes into respective calculation nodes in the axial direction. It can be used in all geometries.

The number of calculation nodes per super node (num_division) is given by

  • core division_x*core division_y*core division_z in rectangular geometry
  • core division_z in hexagonal geometry
  • core division_hex*core division_z in triangular geometry

Indexing

Super nodes are indexed from 1 to num_?_super_node (with ? being all/real/fuel/boundary in this section). Super nodes are divided into num_division calculation nodes which are indexed from 1 to num_division in each super node. The calculation nodes are globally indexed from 1 to num_?_node, where num_?_node is num_division*num_?_super_node. Each ?_super_node contains ?_nodes with indexes ((?_super_node - 1)*num_division + 1)...(?_super_node*num_division).

The all_super_node and all_node indexes goes such that the real_super_node and real_node are indexed first as 1...num_real_super_node and 1...num_real_node, respectively, and the boundary_super_node and boundary_node are indexed as (num_real_super_node+1)...(num_real_super_node+num_boundary_super_node) and (num_real_node+1)...(num_real_node+num_boundary_node), respectively. Thus, num_all_super_node equals num_real_super_node+num_boundary_super_node and num_all_node equals num_real_node+num_boundary_node.

Boundary_super_node always contain num_division boundary_nodes, even though not all of these nodes are actually connected with real calculation nodes. Only boundary nodes neighboring real nodes are considered in the boundary partial current updates during the calculation.

Directions

Super node and node directions are the same for the rectangular and hexagonal geometry solvers. For triangular they are different.

  • For rectangular nodes the directions are
    • DIR_EAST
    • DIR_NORTH
    • DIR_WEST
    • DIR_SOUTH
    • DIR_ABOVE
    • DIR_BELOW
  • For hexagonal nodes, including the triangular geometry super nodes, the directions are
    • DIR_EAST
    • DIR_NORTHEAST
    • DIR_NORTHWEST
    • DIR_WEST
    • DIR_SOUTHEAST
    • DIR_SOUTHWEST
    • DIR_ABOVE
    • DIR_BELOW
  • For triangular nodes the directions are
    • DIR_0, which can be equivalent to DIR_EAST or DIR_WEST
    • DIR_120, which can be equivalent to DIR_NORTHWEST or DIR_NORTHEAST
    • DIR_240, which can be equivalent to DIR_SOUTHEAST or DIR_SOUTHWEST
    • DIR_ABOVE
    • DIR_BELOW
Triangular geometry model radial directions for the hexagonal super node and the two types of triangle nodes.

Partial current moments

The number of outgoing partial current moments are 18, 20 and 14 for the rectangular, hexagonal and triangular geometry models. The directions of the outgoing partial current moments can be found in the MOM_TO_DIR arrays of each solver.

Colors

The calculation nodes are divided into colors such that the colors of the neighbor nodes are different. The outgoing partial current moments are solved parallelly for the nodes of the same color. The number of the required colors is small, as Ants uses only surface currents in the neutronics solution instead of also using corner currents. For the rectangular and triangular geometries, the nodes are divided in two colors. Three colors would be sufficient for the hexagonal geometry solver, but four is used to preserve a possible 120 degree symmetry in the solution.

Variables

Most of the relevant neutronics variables are defined in Neutronics_t type, in neutronics.F90. The indexing of the dimensions of the variables can be reverse-engineered from subroutines neutronics_allocate_geometry_variables and neutronics_allocate_neutronics_variables for geometry and neutronics variables, respectively, if not clearly documented in their definitions in Neutronics_t type. Variables related to coarse group and coarse mesh rebalance (CGR and CMR, respectively) acceleration methods can be reverse-engineered from neutronics_allocate_cgr_variables, and variables related to control elements in neutronics_construct_control_element.

Solution method

The mode flux solutions used in the three different geometry neutronics models could be documented here. In general, sinh + cosh or sin/cos (abbreviated SN/CS here) depending on the sign of the real eigenvalue, or sinh*sin, cosh*cos, sinh*cos, cosh*sin with appropriate signs for the complex eigenvalues.

  • Rectangular: SN/CS or the complex combinations for x, y and z directions weighted with 1.0, and (y, z) for x direction, (x, z) for y direction, and (x, y) for z direction.
  • Hexagonal: SN/CS or the complex combinations for x (0 degree from positive x axis), u (60 degree from positive x axis) and v (120 degree from positive x axis) directions weighted with 1.0, and (y (wx), z) for x direction, (150 degree from positive x axis (wu), z) for u direction and (30 degree from positive x axis (wv), z) for v direction, and SN/CS or the complex combinations for z direction.
  • Triangular: SN/CS or the complex combinations for 0 (0 degree from positive x axis), 120 (120 degree from positive x axis) and 240 (240 degree from positive x axis) directions weighted with 1.0, and (90 degree from positive x axis) for 0 direction, (210 degree from positive x axis) for 120 direction and (330 degree from positive x axis) for 240 direction, and SN/CS or the complex combinations for z direction.

Additionally, the descriptions of the different moments of the incoming and outgoing boundary currents could be documented here.

The reasons for choosing the different models (mode flux/partial current moments) could also be described here.