Skip to content

Commit 46dd1f4

Browse files
committed
Small documentation fixes.
1 parent cede76e commit 46dd1f4

File tree

3 files changed

+88
-67
lines changed

3 files changed

+88
-67
lines changed

Inviscid_Wedge/inv_wedge_HLLC.cfg

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -229,17 +229,20 @@ WRT_CON_FREQ= 1
229229

230230
% ----------------------- DESIGN VARIABLE PARAMETERS --------------------------%
231231
%
232-
% Kind of deformation (TRANSLATION, ROTATION, SCALE)
233-
DV_KIND= SCALE
234232
%
235-
% Marker of the surface in which we are going apply the shape deformation
236-
DV_MARKER= ( upper, lower, inlet, outlet )
237-
%
238-
% Parameters of the shape deformation
239-
% - TRANSLATION ( x_Disp, y_Disp, z_Disp )
240-
% - ROTATION ( x_Orig, y_Orig, z_Orig, x_End, y_End, z_End )
241-
% - SCALE ( 1.0 )
233+
% Kind of deformation (NO_DEFORMATION, SCALE_GRID, TRANSLATE_GRID, ROTATE_GRID,
234+
% FFD_SETTING, FFD_NACELLE,
235+
% FFD_CONTROL_POINT, FFD_CAMBER, FFD_THICKNESS, FFD_TWIST
236+
% FFD_CONTROL_POINT_2D, FFD_CAMBER_2D, FFD_THICKNESS_2D,
237+
% FFD_TWIST_2D, HICKS_HENNE, SURFACE_BUMP, SURFACE_FILE)
238+
DV_KIND= SCALE_GRID
239+
%
240+
% - NO_DEFORMATION ( 1.0 )
241+
% - TRANSLATE_GRID ( x_Disp, y_Disp, z_Disp ), as a unit vector
242+
% - ROTATE_GRID ( x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) axis, DV_VALUE in deg.
243+
% - SCALE_GRID ( 1.0 )
242244
DV_PARAM= ( 1.0 )
243245
%
244246
% Value of the deformation
245-
DV_VALUE= 1.0
247+
DV_VALUE= 10.0
248+

_docs/Mesh-File.md

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,56 @@ The SU2 mesh format carries an extension of .su2, and the files are in a readabl
1515

1616
### Specification
1717

18-
Consider the following simple, 2-D mesh for a square domain consisting of 8 triangular elements. It will be used to explain the .su2 mesh format.
18+
Consider the following simple, 2D mesh for a square domain consisting of 8 triangular elements. It will be used to explain the .su2 mesh format.
1919

20-
![Square Mesh Example](../../docs_files/square.png)
20+
![Square Mesh Example](../docs_files/square.png)
2121

22-
**Square Mesh Example: Note that the figure uses Tecplot node and element number (starting at 1). The node and element numbering for SU2 start at 0.**
22+
**Square Mesh Example: Note that the figure uses Tecplot node and element number (1-based). The node and element numbering for SU2 start at 0.**
2323

24-
The first line of the .su2 mesh declares the dimensionality of the problem. SU2 can handle 2-D or 3-D geometries. As a note, for 2D simulations, it is recommended that a truly 2D mesh is used (no z-coordinates) rather than a quasi-2D mesh (one or more cells deep in the third dimension with symmetry boundary conditions). For the 2D square mesh, the dimension is defined as follows:
24+
The first line of the .su2 mesh declares the dimensionality of the problem. SU2 can handle 2D or 3D geometries. As a note, for 2D simulations, it is recommended that a truly 2D mesh is used (no z-coordinates) rather than a quasi-2D mesh (one or more cells deep in the third dimension with symmetry boundary conditions). For the 2D square mesh, the dimension is defined as follows:
2525

2626
```
2727
NDIME= 2
2828
```
2929

30-
SU2 searches specifically for the keyword "NDIME=" in order to set the dimension, and the dimension value will be stored for use throughout the code. This value would be 3 for a 3-D mesh. Note that while "%" is used here to denote comments, SU2 does not officially recognize it as such. Extra text added to the mesh file between sections (such as lines following a "%") will simply be ignored. The next part of the file describes the interior element connectivity.
30+
SU2 searches specifically for the keyword `NDIME=` in order to set the dimension, and the dimension value will be stored for use throughout the code. This value would be 3 for a 3D mesh. Note that while "%" is used here to denote comments, SU2 does not officially recognize it as such. Extra text added to the mesh file between sections (such as lines following a "%") will simply be ignored.
31+
32+
To specify the point list, SU2 first searches for the string `NPOIN=` and stores the total number of nodes in the mesh. This value is given first, as it is used to set up a loop over all of the grid points that must immediately follow this line. Then, the coordinates for each of the nodes are given. This is specified in the .su2 format as:
33+
34+
```
35+
NPOIN= 9
36+
0.00000000000000 0.00000000000000
37+
0.50000000000000 0.00000000000000
38+
1.00000000000000 0.00000000000000
39+
0.00000000000000 0.50000000000000
40+
0.50000000000000 0.50000000000000
41+
1.00000000000000 0.50000000000000
42+
0.00000000000000 1.00000000000000
43+
0.50000000000000 1.00000000000000
44+
1.00000000000000 1.00000000000000
45+
```
46+
47+
In this case, there are 9 nodes in the 3x3 square above. Immediately after the node number specification comes the list of node coordinates in cartesian space. Each line gives the coordinates for a single grid vertex. The grid points are assigned a global element index of 0 through 8 in the order they appear in the file. This global element index is implied by the ordering and does not need to be explicitly specified by the file, although some legacy meshes may still contain an explicit index at the end of the line that can be ignored.
48+
49+
For a 2D mesh, only x and y coordinates are required, but a 3D mesh would give x, y, and z coordinates. Note that the global index values for the nodes and elements stored within SU2 are zero-based, as opposed to starting from 1 as Tecplot does. The location of each node in the list can be confirmed in space by adding 1 to the implied global index from the ordering and comparing with the figure above.
50+
51+
The next part of the file describes the interior element connectivity, which begins with the `NELEM=` keyword:
3152

3253
```
3354
NELEM= 8
34-
5 0 1 3 0
35-
5 1 4 3 1
36-
5 1 2 4 2
37-
5 2 5 4 3
38-
5 3 4 6 4
39-
5 4 7 6 5
40-
5 4 5 7 6
41-
5 5 8 7 7
55+
5 0 1 3
56+
5 1 4 3
57+
5 1 2 4
58+
5 2 5 4
59+
5 3 4 6
60+
5 4 7 6
61+
5 4 5 7
62+
5 5 8 7
4263
```
4364

44-
SU2 is based on unstructured mesh technology, and thus supports several element types for both 2-D and 3-D elements. Unlike for structured meshes where a logical, ordered indexing can be assumed for neighboring nodes and their corresponding cells (rectangles in 2-D and hexahedral elements in 3-D), for an unstructured mesh, a list of nodes that make up each element, or the connectivity as it is often called, must be provided. First, SU2 will search for the string "NELEM=" and then store the number of interior elements. This value is given first, as it is used to set up a loop over all of the elements which must immediately follow this line. For the square mesh above, this corresponds to the 8 triangular interior elements which are labeled from 1 to 8.
45-
Each following line describes the connectivity of a single element. The first integer on each line is a unique identifier for the type of element that is described. SU2 supports line, triangle, rectangle, tetrahedral, pyramid, wedge, and hexahedral elements. The identifiers follow the VTK format:
65+
SU2 is based on unstructured mesh technology, and thus supports several element types for both 2D and 3D elements. Unlike for structured meshes where a logical, ordered indexing can be assumed for neighboring nodes and their corresponding cells (quadrilaterals in 2D and hexahedral elements in 3D), for an unstructured mesh, a list of nodes that make up each element, or the connectivity as it is often called, must be provided. First, SU2 will search for the string `NELEM=` and then store the number of interior elements. This value is given first, as it is used to set up a loop over all of the elements which must immediately follow this line. For the square mesh above, this corresponds to the 8 triangular interior elements that are assigned a global element index of 0 through 7 in the order they appear in the file. This global element index is implied by the ordering and does not need to be explicitly specified by the file, although some legacy meshes may still contain an explicit index at the end of the line that can be ignored.
66+
67+
Each following line describes the connectivity of a single element. The first integer on each line is a unique identifier for the type of element that is described. SU2 supports line, triangle, quadrilateral, tetrahedral, pyramid, prism, and hexahedral elements. The identifiers follow the VTK format:
4668

4769

4870
|Element Type | Identifier |
@@ -52,29 +74,12 @@ Each following line describes the connectivity of a single element. The first in
5274
|Quadrilateral |9|
5375
|Tetrahedral |10|
5476
|Hexahedral |12|
55-
|Wedge |13|
77+
|Prism |13|
5678
|Pyramid |14|
5779

58-
In our square mesh, all elements are triangles, and thus the identifier (first integer) on all lines is 5. Following the identifier is a list of the node indices that make up the element. Each triangular element will have 3 nodes specified, a rectangular element would have 4 nodes specified, a tetrahedral element would have 4 nodes specified, and so on. The final value is the element index given to each interior element in the mesh. Note that the .su2 format indexes the nodes and elements starting from zero, as opposed to starting from 1 as Tecplot does, which was used to create the mesh image. For example, take the triangular element described in the first line which is indexed as 0 (1 in Tecplot). The SU2 nodes are given as (0,1,3) which would correspond to (1,2,4) in Tecplot. Looking at the figure of the mesh above, we see that this is the lower left triangular element. The ordering of the nodes given in the connectivity list for a specific element is important, and the user is referred to the VTK format guide for the correct ordering for each supported element type (page 9).
59-
60-
After the connectivity information for all interior elements, the coordinates for each of the nodes are given. This is specified in the .su2 format as:
61-
62-
```
63-
NPOIN= 9
64-
0.00000000000000 0.00000000000000 0
65-
0.50000000000000 0.00000000000000 1
66-
1.00000000000000 0.00000000000000 2
67-
0.00000000000000 0.50000000000000 3
68-
0.50000000000000 0.50000000000000 4
69-
1.00000000000000 0.50000000000000 5
70-
0.00000000000000 1.00000000000000 6
71-
0.50000000000000 1.00000000000000 7
72-
1.00000000000000 1.00000000000000 8
73-
```
74-
75-
Again, SU2 searches for the string "NPOIN=" and stores the total number of nodes in the mesh. In this case, there are 9 nodes in the 3x3 square above. Immediately after the node number specification comes the list of node coordinates in cartesian space. Each line gives the coordinates for a single node followed by its index number. The node index numbers are the indices used for specifying the connectivity information for elements. For a 2-D mesh, the x and y coordinates are given followed by the index, but a 3-D mesh would give x, y, and z, followed by the index. The location of each node can be confirmed in space by comparing with the figure above after adding 1 to the index value.
80+
In our square mesh, all elements are triangles, and thus the identifier (first integer) on all lines is 5. Following the identifier is a list of the node indices that make up the element. Each triangular element will have 3 nodes specified, a rectangular element would have 4 nodes specified, a tetrahedral element would have 4 nodes specified, and so on. Note again that the global index values for the nodes and elements stored within SU2 are zero-based, as opposed to starting from 1 as Tecplot does, which was used to create the mesh image. For example, take the triangular element described in the first line, which would be indexed as 0 in SU2 (1 in Tecplot). The SU2 nodes are given as (0,1,3) which would correspond to (1,2,4) in Tecplot. Looking at the figure of the mesh above, we see that this is the lower left triangular element. The ordering of the nodes given in the connectivity list for a specific element is important, and the user is referred to the VTK format guide for the correct ordering for each supported element type (page 9).
7681

77-
The final component of the mesh is a description of all boundaries (which we call markers), including a name (what we call a tag). For each boundary, the connectivity information is given which is based off of the same node indices given above. For a 2-D mesh, only line elements are supported along the boundaries. For a 3-D mesh, triangular and rectangular elements are the possible options for boundary elements. This section of the .su2 mesh file appears as:
82+
The final component of the mesh is a description of all boundaries (which we call markers), including a name (what we call a tag). For each boundary, the connectivity information is specified using the same node global index values given above. For a 2D mesh, only line elements are supported along the boundaries. For a 3D mesh, triangular and quadrilateral elements are the possible options for boundary elements. This section of the .su2 mesh file appears as:
7883

7984
```
8085
NMARK= 4
@@ -96,7 +101,7 @@ MARKER_ELEMS= 2
96101
3 3 0
97102
```
98103

99-
First, the number of boundaries, or markers, is specified using the "NMARK=" string. Then for each marker, a name, or tag, is specified using "MARKER_TAG=." This tag can be any string name, and the tag name is used in the configuration file for the solver when specifying boundary conditions. Here, the tags "lower," "right," "upper," and "left" would be used. The number of elements on each marker, using "MARKER_ELEMS=," must then be specified before listing the connectivity information as is done for the interior mesh elements at the start of the file. Again, the unique VTK identifier is given at the start of each line followed by the node list for that element. Note that no index is given for boundary elements. For our example, only line elements (identifier 3) exist along the markers, and on each boundary of the square there are 2 edges of a triangle that make up the marker. These elements can again be verified with the mesh figure above.
104+
First, the number of boundaries, or markers, is specified using the "NMARK=" string. Then for each marker, a name, or tag, is specified using "MARKER_TAG=." This tag can be any string name, and the tag name is used in the configuration file for the solver when specifying boundary conditions. Here, the tags "lower," "right," "upper," and "left" would be used. The number of elements on each marker, using "MARKER_ELEMS=," must then be specified before listing the connectivity information as is done for the interior mesh elements at the start of the file. Again, the unique VTK identifier is given at the start of each line followed by the node list for that element. For our example, only line elements (identifier 3) exist along the markers, and on each boundary of the square there are 2 edges of a triangle that make up the marker. These elements can again be verified with the mesh figure above.
100105

101106
### Examples
102107
Attached here is the simple square mesh from above in .su2 format, along with codes for creating this file in the Python, C++, and Fortran 90 programming languages. These scripts are meant to be examples of how to write .su2 meshes in a few common languages which can be easily modified for creating new meshes:
@@ -108,11 +113,11 @@ First, the number of boundaries, or markers, is specified using the "NMARK=" str
108113

109114
## CGNS Format
110115

111-
The native format is straightforward and readable, and meshes for simple or analytic geometries can be made very easily using scripts like those provided above. However, for creating meshes around very complex geometries, third party meshing software can make the process much simpler than attempting to build meshes via scripting. With this in mind, support for the CGNS data standard has been included within SU2. The main advantage gained here is that complex meshes created in a third party software package (one that supports unstructured CGNS file export) can be used directly within SU2. Furthermore, a converter from CGNS to the .su2 format has been built into SU2.
116+
To make creating your own meshes easier and more accessible, support for the open CGNS data standard has been included within SU2. The main advantage gained is that complex meshes created in a third-party software package (one that supports unstructured, single-zone CGNS file export) can be used directly within SU2 without the need for conversion to the native format. Moreover, as CGNS is a binary format, the size of the mesh files can be significantly reduced. If needed, a converter from CGNS to the SU2 format has been built into SU2 (See the [inviscid wedge tutorial](../tutorials/Inviscid_Wedge)).
112117

113118
### Compiling with CGNS Support
114119

115-
First, obtain and build the CGNS library (Version 3.1.4 recommended, built without HDF support) on the machine where SU2 will be running and follow the instruction provided in [[Parallel and CGNS Build]].
120+
Starting with SU2 v4.3, the source for version 3.3.0 of the CGNS library is shipped with SU2 in the externals/ directory, and it is automatically built and linked for you when compiling SU2 (ADF support only).
116121

117122
### Using and Converting CGNS Meshes
118123

@@ -126,6 +131,6 @@ It is important to note that SU2 will not use any specific boundary conditions t
126131

127132
## Third-Party Mesh Software
128133

129-
We are continuously working to integrate SU2 with industry-standard tools. We currently have an output plugin for the Pointwise(R) meshing software. This custom addition allows users of Pointwise version 17.00 and later to directly output their meshes in the native SU2 format. The plugin is available natively within recent versions of Pointwise (V17.0R2 or later), and the source code for the plugin can also be found in the Mesh_Tools/ folder within the root of the SU2 source directory.
134+
We are continuously working to integrate SU2 with industry-standard tools. We currently have an output plugin for the Pointwise(R) meshing software. This custom addition allows users of Pointwise version 17.00 and later to directly output their meshes in the native SU2 format. The plugin is available natively within recent versions of Pointwise (V17.0R2 or later).
130135

131136
In addition, a number of other packages support direct output to the SU2 format, such as GMSH and CENTAUR. CGNS files created by a number of other meshing packages have been successfully tested and used, such as those from ICEM CFD, for instance.

0 commit comments

Comments
 (0)