HOME
SOFTWARE
--- CFDStudio
--- ANSWER
--- PORFLOW
--- TIDAL
--- RADM
--- TOOLS
--- INQUIRIES
DOWNLOADS
APPLICATIONS
CONSULTING
STORE
COMPANY
CONTACT
FAQ
 

ACRi -- Analytic & Computational Research, Inc.

 

ACRi Unstructured Data Formats

General Notes:

  • ACRi CFD Solvers support both structured and unstructured grids.
  • Structured grids are specified by the COORdinate command only.
  • Unstructured grids are specified using both COORdinate and CONNectivity commands.
  • There are 3 basic types of unstructured grids: Regular Unstructured, Hybrid Unstructured, and Split Unstructured.

For a list of 3rd party grid generators that are compatible with ACRi software, please see the respective entry in the Frequently Asked Questions section.

This document describes the file formats for using version 5.5 of the ACRi CFD solvers with unstructured meshes. However, future versions of ACRi software will be compatible with the data formats described here. Additionally, the specifications for regions, boundaries, and periodic pairs remain same in the next version of the solvers.

This description consists of the actual data formats as well as the input commands that are needed to work with version 5.5 unstructured meshes.

Highlights:

  1. Separate 2D and 3D modes are supported.
  2. ACRi solvers place the unknown variables at the element centers (cell centered formulation).
  3. There are 3 basic types of unstructured grids:
    • Regular Unstructured: (See Mode 1 below) This supports only Hexagonal (3D) and Quad (2D) elements.
    • Hybrid Unstructured: (See Mode 2 below) Supported modes are: Triangles and Quads in 2D; Tetrahedrals, quad-based pyramids, triangle-based prisms and hex's in 3D.
    • Split Unstructured: (See Mode 3 below) This also supports only Hexagonal (3D) and Quad (2D) elements. However, one element may be connected to multiple elements on any given side.
  4. Elements are numbered sequentially starting at 1. No other assumptions are made regarding element orientations or spatial location.
  5. Local refinement (or split faces or hanging nodes) in the form of one to many connections is supported.
  6. ACRi solvers do their own numbering of boundary elements. Hence, only "volume" elements should be specified in the connectivity data (quadrilaterals or triangles in 2D and tets, pyramids, prisms or hexahedra in 3D).
  7. Internal regions and sub-domains are specified by lists of elements and referred to by name.
  8. Boundaries are specified by lists of ordered pairs of element number, face number and referred to by name.
  9. Periodic boundaries are specified by list of ordered pairs of matching boundary elements, (element#, face# , element#, face#) and are read in from files.
  10. ACRi solvers also support cylindrical coordinate systems. In this mode element orientations are constrained as will be detailed later.

The unstructured data is specified via a mandatory commands file, a mandatory vertex (coordinates) file, a mandatory connectivity (element) file and an optional auxiliary connections (local refinement, or split connectivity) file. The formats are described below.

MODE 1: Vertex Connectivity for Quad or Hex Elements

The element to vertex connectivity is specified. The file must contain as many records as the number of elements specified on the GRID command.  Each record consists of the element number followed by 4 (for 2D) or 8 (for 3D) vertex numbers of the element corners. Each record is read by the FORTRAN statement:

READ(IFILE,*) M,( NV(K),K = 1, NBRMX )
where IFILE is an internally assigned file unit number, M, is the element number, NBRMX takes the value of 4 in 2D and value of 8 in 3D, and NV are the vertex numbers for the element corners.

For 2D geometry, the vertices must be specified in a counter-clock wise fashion in the x-y plane, such that the local (x, h) and the direction normal to the plane form a right handed system. For 3D geometry, the vertices on "bottom" side must be specified first (in counter-clockwise order) followed by the corresponding vertices on "top" side, such that the local (x, h, z) direction forms a right handed system. (Any side may be chosen as the "bottom", then the topologically opposite side is considered to be the "top"). The local (x, h, z) direction for each element is defined by the order in which the vertices appear on this record. The local x axis is oriented from vertex 1 to vertex 2, the h axis from vertex 1 to vertex 4, and the z axis from vertex 1 to vertex 5. These then determine the local side number (1, 2, 3, 4) or the local X-, X+, Y-, Y+, Z-, Z+ sides which are used to specify the boundary and boundary conditions. These concepts are illustrated in Figures 1 and 2. This is the default option.

COMMENTS:

An unstructured mesh is defined by:

  1. A list of vertex numbers (integer) and their space coordinates (real), and
  2. A list of element numbers (integer) and their vertex numbers (integer).
  3. The list (b) defines the "mapping" from each element to its vertices in list (a).

EXAMPLES:

CONNectivity information on file "VERT2ELM.CNC"
CONNectivity of VERTices to elements on file "VERT2ELM.CNC"

Figure 1: Relation between Vertex Numbers and Side Numbers for a Quadrilateral illustrating the application of the right hand rule. (2D only).

Figure 2: Relation between Vertex Numbers and Side Numbers for a Hexahedron illustrating the application of the right hand rule. (3D only).

MODE 2: Vertex Connectivity for Mixed Hybrid Elements.

The element to vertex connectivity is specified for a grid with mixed type of elements. Currently 6 different types of elements are allowed. These are given in the Table below.

Element Type # of Vertices # of Sides Geometry Description
1 3 3 2D Triangle
2 4 4 2D Quadrilateral
3 4 4 3D Tetrahedron
4 5 5 3D Quad-Based Pyramid
5 6 5 3D Triangle-based Prism
6 8 6 3D Hexahedron

The file must contain as many records as the number of elements specified on the GRID command. Each record must specify (in order), the element number, element type (given in the Table above), the total number of vertices for that element (given in Table above) and the vertex numbers for the element corners. Each record is read by the FORTRAN statement:

READ(IFILE,*) M, MTYPE, NVRTX,( NV(K),K=1,NVRTX)
where IFILE is an internally assigned file unit number, M, is the element number, MTYPE is the element type, NVRTX is the number of vertices for the element, and NV are the vertex numbers for the element corners.

Schematic of each element type and its connectivity describing the relationship of the local side numbering to the vertex connectivity is illustrated in Figures 1 through 6.

EXAMPLES:

CONNectivity for HYBRID elements on file "MIXED_ELEMENTS.CNC"

Figure 3: Relation between Vertex Numbers and Side Numbers for a Triangle illustrating the application of the right hand rule. (2D only).

Figure 4: Relation between Vertex Numbers and Side Numbers for a Tetrahedron illustrating the application of the right hand rule. (3D only).

Figure 5: Relation between Vertex Numbers and Side Numbers for a Pyramid illustrating the application of the right hand rule. (3D only).

Figure 6: Relation between Vertex Numbers and Side Numbers for a Triangular Prism illustrating the application of the right hand rule. (3D only).

MODE 3: Connectivity for Quad or Hex Elements with Split Sides

The vertex and element connectivity for the split elements is specified. This is a supplementary mode of the command to enable local grid refinement or adaptation of the mesh in selected parts of the domain, based on solution features. (Split sides are element sides with more than one attached neighboring element). It can be used in conjunction with Mode 1 but is not available with Mode 2 of the command.

By default all ACRi Software Tools assume that each element is connected to 4 other elements in 2D and 6 other element in 3D geometry. However if the grid is locally refined then a element may be split into multiple "child" elements and some of the elements may be connected to more than the default number of neighboring elements. This supplementary connectivity is specified in the following manner.

The 1st record in the file consists of a header with two numbers: the number of split elements and the total number of data items in the rest of the file. The header is followed by a number of sets of data equal to the number of split elements. The 1st record of each set consists of the element number that is split followed by a side index for each side (4 for 2D and 6 for 3D) of the element which denotes the number of neighboring elements (if > 1) connected to that face. The index is zero if there is only one element connected to the side (no split). This record is followed by a list of element numbers that adjoin the split side in the order of the side index. The final record of the set consists of the local side number (from 1 to 6) for the adjoining elements that are attached to the split side.

The entire file is read in using the following two FORTRAN statements:

READ(IFILE,*) N_SPLIT_M, N_ITEMS
READ(IFILE,*) ( N_SPL(K), K = 1, N_ITEMS )

EXAMPLE:

If the ( Mode 1 ) vertex connectivity for the above mesh is as follows:

Element # Vertex Connectivity
1 1 2 6 5
2 2 3 7 6
3 3 4 8 7
4 5 6 10 9
5 6 20 17 18
6 7 8 12 11
7 9 10 14 13
8 10 11 15 14
9 11 12 16 15
10 20 7 19 17
11 17 19 11 21
12 18 17 21 10

Then the SPLIt connectivity command is:

CONNectivity SPLIT on file "SPLIT.CON."

Contents of the file SPLIT. CON are:

(the text on the right is for clarity and must NOT be present in the file)

4 36       ! 4 Split elements; 36 numeric items follow
2         ! Split Element Number
0 0 0 2   ! Face # 4 is split in to 2 segments
5 10       ! Element numbers that split face connects to
3 3       ! Face #3 (of Element 5) and Face #3 (of Element 10)
4         ! Split Element Number
0 2 0 0   ! Face # 2 is split in to 2 segments
5 12       ! Element numbers that split face connects to
1 1       ! Face #1 (of Element 5) and Face #1 (of Element 12)
6         ! Split Element Number
2 0 0 0   ! Face #1 is split in to 2 segments
10 11       ! Element numbers that split face connects to
2 2       ! Face #2 (of Element 10) and Face #2 (of Element 11)
8         ! Split Element Number
0 0 2 0   ! Face #3 is split in to 2 segments
12 11       ! Element numbers that split face connects to
4 4       ! Face #4 (of Element 12) and Face #4 (of Element 12)

Region Selection (Version 4.00 and above)

A region can be selected by grouping a LIST of elements and giving them a unique name. In example 2, the elements 14, 18, 20, 22, 24 have been grouped into a list and given a name SAMPLE1 as follows:

LOCAte LIST ID=SAMPLE1 14, 18, 20, 22, 24
Subsequent operations can then select this region by name various purposes such as initialization, applying sources, etc. The name can be up to 8 characters long.

Boundary Selection (Version 4.00 and above)

Boundary surfaces can be selected by grouping them into a PAIRed list and giving them a unique name. In example 2, the right boundary is defined by:

LOCAte PAIR ID=RIGHTBC 5 , 2 ; 6 , 3 ; 7 , 3 ; 8 , 3 ; 9 , 3 ;
which consists of ordered pairs of element number, local face number. Recall that local face numbers are assigned based on the order of the vertices in the connectivity file. Boundary conditions can now be set based by referring to the name set on the LOCAte command. The name can be up to 8 characters long.

Periodic Pairs (Version 4.00 and above)

Periodic boundaries are defined by providing pairs of matching boundary faces in a file (typical extension .per).

Each line of the file contains four integers

Element No. Face No. Matching Element No. Matching Face No.

See Example 2.

Radial Coordinate System

In a cylindrical system, some restrictions on the element orientations apply such that faces 3 and 4 are perpendicular to the global R direction and, in 3D, faces 5 and 6 are perpendicular to the global THETA direction. A vector from the centroid of face 3 to the centroid of face 4 should be approximately aligned with the unit vector in the R direction at the element centroid.

Command Input

Command input is accomplished via the FREEFORM™ language. For CFDStudio™ users, these commands are generated automatically.

Commands start on column 1 of a line and consist of a keyword, modifiers, numeric, separator, terminator, and comment fields. The typical file extensions for the commands file are ".inp", or ".q1" (all lower case).

An unstructured mesh is processed using the GRID, CONNectivity, and COORdinate commands.

The syntax for the GRID command consists of the keyword GRID with modifiers UNST, THRE (for 3D only), and a numeric field denoting the number of elements.

Thus for a 2D problem with 30,000 elements, the command is:

GRID UNSTructured 30000 elements
and for a 3D problem with 300,000 elements,
GRID UNSTructured THREe-d 300000 elements

Note that only the first four characters in a keyword or modifier are significant. The rest of the input is usually retained to make use of the self documenting feature of the FREEFORM™ language.

The syntax for the CONNectivity command is:

CONNectivity 'case_name.cnc'
where the file name containing the connectivity data is enclosed in single quotes. The CONNectivity command accepts an optional modifier SPLIt to indicate that the specified file contains auxiliary connectivity data for local refinement, i.e.,
CONNectivity SPLIt 'case_name.blk'
The typical file extension for auxiliary connectivity is '.blk'. If the CONNectivity SPLIt command is present then the CONNectivity command should precede it and the CONNectivity command should occur after the GRID command as shown in Example 1.

The syntax for the COORdinate command is:

COORdinate VERTices X Y 'case_name.xyz'
for 2D (see Example 1 and Example 2) and
COORdinate VERTices X Y Z 'case_name.xyz'
for 3D. The COORdinate command also accepts an optional modifier CYLIndrical which forces the vertex coordinates to be interpreted as X , R in 2D and X, R, and THETA in 3D. The CYLIindrical modifier can be placed anywhere on the line containing the COORdinate keyword.

Regions are defined by grouping elements with the LOCAte LIST command as follows,

LOCAte LIST ID=NAME0001
followed by a list of integers denoting the desired elements. See Example 2.

Boundaries are defined by grouping boundary faces with the LOCAte PAIR command as follows,

LOCAte PAIR ID=NAME0002
followed by a list of ordered pairs of integers element#1, face#1, element#2, face#2, …. See Example 2.

The appropriate face numbers are listed in Table 1(a) for 2D and Table 1(b) for 3D.


Example 1

Figure 2 below shows a typical unstructured mesh to be used for this example.

Figure 8: Ordering of the unknowns (element numbers in boxes), vertex numbers and face numbers. The arrangement of the elements forms an 'O' grid. Elements 1,3,5 and 9 have split faces formed due to local refinement. The arrows indicate the local '4' orientation of each element.

Vertex File, Example-1.xyz:

Vertex No. X coordinate Y coordinate for 2D
1 0. 0.
2 3. 0.
3 1. 1.
4 2. 1.
5 1. 2.
6 2. 2.
7 0. 3.
8 3. 3.
9 1. 0.
10 1.25 1.
11 2.0 0.
12 1.75 1.
13 1.5 3.
14 1.5 2.
15 1.0 1.5
16 2.0 1.5

 

Connectivity File, Example-1.cnc:

Element No. vertex 1 vertex 2 vertex 3 vertex 4
1 3 4 16 15
2 1 9 10 3
3 2 8 6 4
4 8 13 14 6
5 7 1 3 5
6 9 11 12 10
7 11 2 4 12
8 13 7 5 14
9 5 15 16 6

 

Auxiliary Connectivity File, Example-1.blk:
(Elements 1, 3, 5, and 9 have split faces or hanging nodes)
4 38    
1      
0 0 3 0
2 6 7  
4 4 4  
3      
0 0 0 2
1 9    
2 4    
5      
0 0 0 2
1 9    
1 3    
9      
2 0 0 0
4 8    
4 4    

Commands in File "Example-1.inp":

GRID UNSTructured 9 elements

CONNectivity 'Example-1.cnc'

CONNectivity SPLIt 'Example-1.blk'

COORdinate X Y VERTices 'Example-1.xyz'


Example 2

Figure. 9 below shows another unstructured mesh to be used for Example 2.

Figure 9. An example mesh to illustrate setting up boundary definitions. The faces labeled p1 .. p4 form periodic pairs. The circled elements are gathered into a sub-region using the "LOCAte LIST" command. The right boundary, composed of the elements with the arrow heads pointing to the boundary, is defined using a "LOCAte PAIR" command.

Coordinates File, Example-2.xyz:
1 0.0 0.0
2 0.2 0.0
3 0.4 0.0
4 0.6 0.0
5 0.8 0.0
6 1.0 0.0
7 0.0 0.1
8 0.2 0.1
9 0.4 0.1
10 0.6 0.1
11 0.8 0.1
12 1.0 0.1
13 0.0 0.2
14 0.2 0.2
15 0.4 0.2
16 0.6 0.2
17 0.8 0.2
18 1.0 0.2
19 0.0 0.3
20 0.2 0.3
21 0.4 0.3
22 0.6 0.3
23 0.8 0.3
24 1.0 0.3
25 0.0 0.4
26 0.2 0.4
27 0.4 0.4
28 0.6 0.4
29 0.8 0.4
30 1.0 0.4
31 0.0 0.5
32 0.2 0.5
33 0.4 0.5
34 0.6 0.5
35 0.8 0.5
36 1.0 0.5

 

Connectivity File, Example-2.cnc:
1 1 2 8 7
2 2 3 9 8
3 3 4 10 9
4 4 5 11 10
5 5 6 12 11
6 12 18 17 11
7 18 24 23 17
8 24 30 29 23
9 30 36 35 29
10 35 34 28 29
11 34 33 27 28
12 33 32 26 27
13 32 31 25 26
14 25 19 20 26
15 19 13 14 20
16 13 7 8 14
17 8 9 15 14
18 9 10 16 15
19 10 11 17 16
20 17 23 22 16
21 23 29 28 22
22 28 27 21 22
23 27 26 20 21
24 20 14 15 21
25 15 16 22 21

 

Periodic Pairs File, Example-2.per:
1 3 10 3
2 3 11 3
3 3 12 3
4 3 13 3

 

Commands in File "Example-2.inp":

GRID UNSTructured 25 elements CONNectivity 'Example-2.cnc' COORdinate VERTices X Y 'Example-2.xyz' PERIodic 'Example-2.per' LOCAte LIST ID=SAMPLE1
14, 18, 20, 22, 24

LOCAte PAIR ID=RIGHTBC
5, 2 ; 6, 3 ; 7, 3 ; 8, 3 ; 9, 3 ;

 

HOME | SOFTWARE | DOWNLOADS | APPLICATIONS | CONSULTING | STORE | COMPANY

© 2015 ACRi