1. External Meshes without Curved Boundaries
This tutorial shows how to read in externally generated unstructured and structured meshes with straight-edged elements.
The parameter file can be found in
tutorials/2-01-external_mesh_CGNS_sphere/parameter.ini
1.1. External Mesh
The external mesh file that is to be used has to be available in the directory of the executed parameter file as a CGNS format file. This file is read-in by introducing the parameter filename
. As one can see from the parameter.ini’s excerpt and Fig. 1.1, the parameters of the parameter file have to be adapted to the definitions in the CGNS mesh file. This means that the parameters Mode
, nZones
, BoundaryName
and BoundaryType
cannot be set freely anymore because the structure of the external mesh must be retained. In this case, the external mesh spheremesh02 is available as CGNS file and consists of three zones. Therefore, the settings of the parameters are Mode=3
, nZones=3
, filename=spheremesh02.cgns
.
Another important fact is that for external meshes no BCIndex
parameter is needed which normally assigns the boundary conditions to the surfaces of the mesh. The reason for this is that the boundary conditions are assigned to their belonging surfaces by their names. The boundary condition, for example, of Zone_1
of the CGNS file (BC_sphere
) has to be defined as BoundaryName=sphere
in the parameter file.
!================================================================= !
! MESH
!================================================================= !
Mode =3 ! 1 Cartesian 3 CGNS 4 STAR-CD V3
nZones =3 ! number of zones
filename=spheremesh02.cgns ! name of mesh file
...
...
!================================================================= !
! CURVED
!================================================================= !
useCurveds=F ! T to generate curved boundaries
!================================================================= !
! BOUNDARY CONDITIONS
!================================================================= !
BoundaryName=sphere ! BC_Name must be defined in mesh file
BoundaryType=(/4,1,0,0/)
BoundaryName=inflow
BoundaryType=(/2,0,0,0/)
BoundaryName=outflow
BoundaryType=(/2,0,0,0/)
BoundaryName=mantel
BoundaryType=(/2,0,0,0/)
Furthermore, the BoundaryType
parameter has to be adapted to the definitions in the CGNS mesh file. If a boundary of the external mesh is curved, the curveIndex
component (2nd component) of the BoundaryType
parameter has to be a value unequal to zero. Whether curved boundaries are generated or not is controlled by the parameter useCurveds
. In this tutorial, useCurveds=F
. The case useCurveds=T
is the topic of the next tutorial which explains how to use mesh curving techniques to generate curved boundaries.
All new parameters of the parameter file of this tutorial are explained below.
Parameters |
Setting |
Description |
---|---|---|
|
|
The name of the external mesh file. The necessary files have to be available in the directory of the executed parameter file as CGNS files. |
|
|
Scales all input mesh coordinates by a fixed factor |
|
|
Characteristic length of the mesh |
|
|
T (True): If curved boundaries are defined |
A description of all parameters of the parameter file can be found in List of Parameters.
1.2. Output Visualization
If there is a need for assistance of visualizing the HOPR output visit Visualization.
The figures below show the visualizations of the SPHERE_Debugmesh.vtu file.
In addition, a visualization of the surfaces the first boundary condition sphere was assigned to (the curveIndex
of the BoundaryType
parameter is set to 1) of the SPHERE_Debugmesh_BC.vtu file is shown for each external mesh (see Fig. 1.4, Fig. 1.7, Fig. 1.10).