Mesh types
Contents
Mesh types
Each physical data field consists of values on a specific mesh. Whereas several mesh types should be supported by Cerberus, the individual solvers typically only need to support their own mesh types. This section describes the geometry of the different mesh types supported by Cerberus and the mesh-data (the ordered list of values exactly specifying the mesh) associated with each mesh type.
Type 1 — Structured regular Cartesian mesh
Structured regular Cartesian meshes (in Kraken) are 3D meshes that cover a cuboid volume ([xmin, xmax]*[ymin, ymax]*[zmin, zmax]) and have a fixed number of cells in the x-, y- and z-direction (Nx, Ny, Nz). The total number of cells is the product of the number of cells in each of the three coordinate directions. The size/spacing of the cells is constant, but can be different for the different directions.
The mesh data for structured Cartesian meshes is as follows
Data type/size | Data content (explanation) | Data content (example) | Notes |
---|---|---|---|
1*integer | Mesh type | 1 | |
Information on mesh size | |||
1*integer | Nx | 2 | Number of cells in X-direction. |
1*integer | Ny | 1 | Number of cells in Y-direction. |
1*integer | Nz | 4 | Number of cells in Z-direction. |
Information on mesh boundaries | |||
2*float | xmin, xmax | -10.0, 10.0 | The outer limits of the mesh. |
2*float | ymin, ymax | -5.0, 5.0 | The outer limits of the mesh. |
2*float | zmin, zmax | 0.0, 100.0 | The outer limits of the mesh. |
Default indexing
x runs fastest, then y and finally z slowest.
All indices increase from minimum coordinate to maximum coordinate.
Type 2 — Structured irregular Cartesian mesh
Structured Cartesian meshes (in Kraken) are 3D meshes that cover a cuboid volume ([xmin, xmax]*[ymin, ymax]*[zmin, zmax]) and have a fixed number of cells in the x-, y- and z-direction (Nx, Ny, Nz). The total number of cells is the product of the number of cells in each of the three coordinate directions. For the irregular version, the size/spacing of the cells need not be constant.
The mesh data for structured irregular Cartesian meshes is as follows
Data type/size | Data content (explanation) | Data content (example) | Notes |
---|---|---|---|
1*integer | Mesh type | 2 | |
Information on mesh size | |||
1*integer | Nx | 2 | Number of cells in X-direction. |
1*integer | Ny | 1 | Number of cells in Y-direction. |
1*integer | Nz | 4 | Number of cells in Z-direction. |
Information on mesh boundaries | |||
(Nx+1)*float | x0, x1, ..., xNx+1 | -10.0, -5.0, 10.0 | The cell boundaries in X-direction. |
(Ny+1)*float | y0, y1, ..., yNy+1 | -5.0, 5.0 | The cell boundaries in Y-direction. |
(Nz+1)*float | z0, z1, ..., zNz+1 | 0.0, 35.0, 50.0, 65.0, 100.0 | The cell boundaries in Z-direction. |
Default indexing
x runs fastest, then y and finally z slowest.
All indices increase from minimum coordinate to maximum coordinate.
Types 3-6 — Structured hexagonal meshes
Four different hexagonal meshes are currently supported (types 3-6). The different mesh types correspond to different orientations of the hexagons and to different choices of basis vectors.
The mesh data for all structured hexagonal meshes is the same:
Data type/size | Data content (explanation) | Data content (example) | Notes |
---|---|---|---|
1*integer | Mesh type | 3 | |
Information on mesh size | |||
1*integer | Nx | 4 | Number of cells in X-direction. |
1*integer | Ny | 4 | Number of cells in Y-direction. |
1*integer | Nz | 4 | Number of cells in Z-direction. |
Information on horizontal mesh geometry | |||
2*float | x0, y0 | 0.0, 0.0 | The horizontal centerpoint of the mesh. |
1*float | pitch | 0.236 | The horizontal pitch between adjacent mesh cells. |
Information on axial boundaries | |||
(Nz+1)*float | z0, z1, ..., zNz+1 | 0.0, 0.35, 0.50, 0.65, 1.0 | The cell boundaries in Z-direction. |
The following subsections show the base indexing in the different mesh types.
Type 3 — Structured x-type 60 degree hexagonal mesh
A single axial layer of the x-type (pointy top) hexagonal mesh with a 60 degree angle between the basis vectors is shown here:
Type 4 — Structured y-type 60 degree hexagonal mesh
A single axial layer of the y-type (flat top) hexagonal mesh with a 60 degree angle between the basis vectors is shown here:
Type 5 — Structured x-type 120 degree hexagonal mesh
A single axial layer of the x-type (pointy top) hexagonal mesh with a 120 degree angle between the basis vectors is shown here:
Type 6 — Structured y-type 120 degree hexagonal mesh
A single axial layer of the y-type (flat top) hexagonal mesh with a 120 degree angle between the basis vectors is shown here:
Type 7 — Structured cylindrical mesh
The mesh data for structured cylindrical meshes is as follows
Data type/size | Data content (explanation) | Data content (example) | Notes |
---|---|---|---|
1*integer | Mesh type | 7 | |
Information on mesh size | |||
1*integer | Nr | 5 | Number of radial cells. |
1*integer | Nphi | 1 | Number of angular cells. |
Information on mesh boundaries | |||
(Nr + 1)*float | r0, r1, r2, ... | 0.0, 0.1e-2, 0.2e-2, 0.3e-2, 0.4e-2 | The cell boundaries for the mesh in the radial direction. |
(Nphi + 1)*float | phi0, phi1, phi2, ... | 0, 360 | The cell boundaries for the mesh in the angular direction (degrees, as in polar coordinates). |
Default indexing
Radial indexing runs fastest and angular indexing slower.
Type 8 — Nested mesh
Data type/size | Data content (explanation) | Data content (example) | Notes |
---|---|---|---|
1*integer | Mesh type | 8 | |
1*integer | Nm | 2 | Number of nested meshes. |
Information on Nm nested meshes | |||
1*integer | Mesh 1 type (top level) | 1 | |
... The rest of the mesh 1 data. | |||
Mesh 2 type (second highest level) | 1 | ||
... The rest of the mesh 2 data. | |||
Mesh Nm type (lowest level) | 1 | ||
... The rest of the mesh Nm data. |
Type 9 — List
The list mesh type does not have any clearly defined spatial structure. It may be useful for passing in data, for which the exact geometric configuration is irrelevant.
Data type/size | Data content (explanation) | Data content (example) | Notes |
---|---|---|---|
1*integer | Mesh type | 9 | |
1*integer | Nval | 10 | Number of values in the list. |