CFmesh Format
CFmesh is the format that was developed along with the COOLFluiD framework. It serves as a way of storing into a text file part of the data that is present in the MeshData object.
There are several converters from other file formats into this format.
Description
- Define the dimensions of the problem, 2D or 3D.
!NB_DIM 2
- Define the number of equations per state. This is the number of variables per degree of freedom.
!NB_EQ 4
- Define the number of nodes in the mesh. Mind that nodes define the geometry, not the place where the degrees of freedom are. Follow it by a zero for backward compatibility reasons only.
!NB_NODES 4573 0
- Define the coordinates of the nodes in the mesh. X, Y and then Z if appropriate. There should be as many lines as number of nodes.
!LIST_NODE 0.01 0.4 0.02 0.4 0.01 0.5 0.02 0.5 ...
- Define the number of states in the mesh. Mind that states define the solution field, not the place where the geometry is. Follow it by a zero for backward compatibility reasons only.
!NB_STATES 7046 0
- Define the variables per degree of freedom.
If the keyword is followed by a zero then this list is not present, meaning that this mesh does not have a solution field.
!LIST_STATE 0
If the keyword is followed by a one then the list will be present. There should be as many following lines as number of states, and each line should have the number of variables previously defined.
!LIST_STATE 1 1.0 20. 23. 120. 1.0 20.5 23. 121. 1.0 20.7 23. 122. ...
- Define the number of elements (also known as cells).
!NB_ELEM 7046
- Define how many different element types exist in the mesh.
!NB_ELEM_TYPES 2
- Define the order of the geometry of the elements. Must be bigger than one because it makes no sense in having zero order geometry.
!GEOM_POLYORDER 1
- Define the order of the solution on the elements. Must be bigger than zero. If the order is one, it will be a FiniteElement type mesh. If the order is zero, it will be a cell centered FiniteVolume type mesh, where the degree of freedom is one per cell, placed in its baricenter.
!SOL_POLYORDER 0
- Define the element types present on the mesh. They must be all in the same line.
!ELEM_TYPES Triag Quad
- Define the number of elements per type. They must be all in the same line. Their sum must match the total number of elements.
!NB_ELEM_PER_TYPE 5167 1879
- Define the number of nodes per type.
!NB_NODES_PER_TYPE 3 4
- Define the number of states (also known as degrees of freedom) per type. Note that this is not the number of variables per state. In FiniteVolume is one at the center of the cell and in FiniteElement is three in a triangle.
!NB_STATES_PER_TYPE 1 1
- Define the connectivity list of elements per element type, matching the order in the list above. First should be present the node connectivity list, and on the same line, the state connectivity list. They need not match in the FiniteElement meshes, and obviously do not match in the FiniteVolume ones because only one state is present.
- The numbering of states and nodes starts at 0 and finished in N-1 where N is the total number of nodes or states present.
- The number of lines must match the number of elements.
!LIST_ELEM 433 181 182 0 474 392 399 1 578 325 264 2 465 3 262 3
- Define the Groups. A group represents a region of the inner domain. These groups are considered as different inner TRSs and are defined by the cells they contain. The number of group needs to be defined and a group name is assigned to each of them. Then, the number of elements in the group and the IDs of the elements contained.
!NB_GROUPS 2 !GROUP_NAME InnerCells1 !GROUP_ELEM_NB 6046 !GROUP_ELEM_LIST 1 2
- Define the number of TopologicalRegionSets. These represent regions of the domain or its boundaries, where some special algorithm will be applied, e.g. boundary conditions. The number has to be greater than one.
!NB_TRSs 2
- For each TopologicalRegionSet repeat the following:
- Define its name.
!TRS_NAME Airfoil
- Define the number of TopologicalRegion's that compose this set. Each is usually an entity to which can be assigned a CAD definition, e.g. a curve, an edge, etc.
!NB_TRs 2
- Define the number of GeometricEntity in each of these TopologicalRegion.
!NB_GEOM_ENTS 196 190
- Define the type of the GeometricEntity present.
!GEOM_TYPE Face
- Define the GeometricEntity construction: first the number of nodes that compose the geometry of the entity and then the number of states (degrees of freedom) associated to it. Follow with the IDs of the nodes and the IDs of the states. In this example there are 2 nodes and a state in each 2D face on a FiniteVolume mesh, hence 3 IDs follow, the first two for the nodes and the latest for the state, which matches the ID of the state of the adjacent Cell.
!LIST_GEOM_ENT 2 1 2712 231 5167 2 1 2723 2712 5178
- Define its name.
- Finish with the END keyword.
!END
Example file
!NB_DIM 2 !NB_EQ 4 !NB_NODES 4573 0 !LIST_NODE ... !NB_STATES 7046 0 !LIST_STATE 0 !NB_ELEM 7046 !NB_ELEM_TYPES 2 !GEOM_POLYORDER 1 !SOL_POLYORDER 0 !ELEM_TYPES Triag Quad !NB_ELEM_PER_TYPE 5167 1879 !NB_NODES_PER_TYPE 3 4 !NB_STATES_PER_TYPE 1 1 !LIST_ELEM 433 181 182 0 474 392 399 1 578 325 264 2 465 3 262 3 ... !NB_GROUPS 2 !GROUP_NAME InnerCells1 !GROUP_ELEM_NB 6046 !GROUP_ELEM_LIST 1 2 3 ... !GROUP_NAME InnerCells2 !GROUP_ELEM_NB 1000 !GROUP_ELEM_LIST 6046 6047 6048 ... !NB_TRSs 2 !TRS_NAME Airfoil !NB_TRs 2 !NB_GEOM_ENTS 196 190 !GEOM_TYPE Face !LIST_GEOM_ENT 2 1 2712 231 5167 2 1 2723 2712 5178 ... !TRS_NAME FarField !NB_TRs 1 !NB_GEOM_ENTS 25 !GEOM_TYPE Face !LIST_GEOM_ENT 2 1 12 31 67 2 1 23 12 78 ... !END
