2. External Meshes with Curved Boundaries

This tutorial shows how several methods can be applied to curve the boundary faces of the elements.

The parameter file can be found in

tutorials/2-02-external_mesh_CGNS_sphere_curved/parameter.ini

2.1. Mesh Curving Techniques

In the development of next generation numerical methods for CFD, high-order methods are promising a substantial increase in efficiency and accuracy. While the particular high-order methods can be very distinct, they have in common that they must rely on a high-order approximation of curved geometries to maintain their high-order of accuracy. The generation of curved meshes is thus a topic the importance of which cannot be overstated, if one truly wants to apply high order methods to problems with industrial relevance. Especially aerospace applications heavily rely on complex geometries and pose high requirements to the quality of geometry representation.

../Curving.jpg

Fig. 2.1 From linear meshes to high order meshes.

HOPR provides several strategies to produce high-order meshes, relying on linear meshes, which are the standard of today’s state-of-the-art meshing software and can be generated by commercial mesh generation tools. The two main strategies can be selected with the parameter curvingMethod. Therefore, the parameter useCurveds has to set to T.

Table 2.37 Mesh Curving Techniques Parameter.

Parameters

Setting

Description

curvingMethod

1

0: No curving method activated.
1: Curving with normal vectors at surface points.
3: Curving with subdivided surface mesh.

2.2. Curving Using Normal Vectors

Using normal vectors at the surface points, one can reconstruct the curved boundary face. Normal vectors can either be reconstructed from the existing coarse mesh, given in a point-normal file or prescribed analytically. The way of providing the normal vectors can be selected with the parameter NormalsType. For each setting, a different number of new but self-explanatory parameters are mandatory. These parameters are listed below.

It has to be taken into account that for generating the curved boundary splines, the parameter boundaryOrder has to be always set to 4 for a normal vector approach. Otherwise HOPR will maybe not work correctly.

../Normalvectors.jpg

Fig. 2.2 Sequence of constructing curved element edges from surface normals..

Description of Parameters

Below, all parameters which are mandatory for this curving technique are explained. A description of all parameters can be found in List of Parameters.

Table 2.38 Curving Using Normal Vectors: Description of Parameters.

Parameters

Setting

Description

NormalsType

1

Source of the normal:
1: Reconstructed from coarse surface mesh (no additional parameters, CurveIndex of BC must be >0).
2: NormalVectFile (point normal vector file) needed
3: Analytical normals from surface point positions

NormalVectFile

filename

Number of association between BC CurveIndex and analytical normal. Mandatory if NormalsType=3

nExactNormals

1

Number of association between BC CurveIndex and analytical normal. Mandatory if NormalsType=3

ExactNormals

(/1,1/)

(/ BC curveIndex, number of analytical formula/). Build in formulas (see src/mesh/curved.f90):
1: Sphere with origin (0,0,0)
2: Cylinder around z-axis Mandatory if NormalsType=3

boundaryOrder

4

Not used here, fixed to cubic polynomial

Output Visualization

The figures below show the visualization of the boundary sphere (BoundaryType=(/4,1,0,0/)) of the meshes spheremesh01.cgns (Fig. 2.4 - Fig. 2.6), spheremesh02.cgns (Fig. 2.8 - Fig. 2.10) and spheremesh04.cgns (Fig. 2.12 - Fig. 2.14) for the three different normal vector approaches. Therefore, the SPHERE_CURVED_SplineSurf.vtu file was used. Furthermore, for the second normal vector approach (NormalsType=2) the point normal vector file normals_out_000001.dat was used (called filename in the captions). For the purpose of comparison the surfaces of the original meshes the boundary sphere were assigned to are also shown (Fig. 2.3, Fig. 2.7, Fig. 2.11) and were visualized with the SPHERE_CURVED_Debugmesh_BC.vtu file.

If there is a need for assistance of visualizing the HOPR output visit Visualization.

spheremesh01
../Exmesh-sm1.jpg

Fig. 2.3 Boundary sphere without using a curving technique.

../Exmesh-01j.jpg

Fig. 2.4 Boundary sphere with curved surfaces. These are generated by splines with normal vectors which are reconstructed from the coarse mesh file.
NormalsType = 1

../Exmesh-011.jpg

Fig. 2.5 Boundary sphere with curved surfaces. These are generated by normal vectors coming from a mandatory point normal vector file.
NormalsType = 2
NormalVectFile = filename

../Exmesh-012.jpg

Fig. 2.6 Boundary sphere with curved surfaces. These are generated by analytical normals from surface point positions.
NormalsType = 3
nExactNormals = 1

ExactNormals = (/1,1/)

spheremesh02
../Exmesh-sm2.jpg

Fig. 2.7 Boundary sphere without using a curving technique.

../Exmesh-02j.jpg

Fig. 2.8 Boundary sphere with curved surfaces. These are generated by splines with normal vectors which are reconstructed from the coarse mesh file.
NormalsType = 1

../Exmesh-021.jpg

Fig. 2.9 Boundary sphere with curved surfaces. These are generated by normal vectors coming from a mandatory point normal vector file.
NormalsType = 2
NormalVectFile = filename

../Exmesh-022.jpg

Fig. 2.10 Boundary sphere with curved surfaces. These are generated by analytical normals from surface point positions.
NormalsType = 3
nExactNormals = 1
ExactNormals = (/1,1/)

spheremesh04
../Exmesh-sm4.jpg

Fig. 2.11 Boundary sphere without using a curving technique.

../Exmesh-04j.jpg

Fig. 2.12 Boundary sphere with curved surfaces. These are generated by splines with normal vectors which are reconstructed from the coarse mesh file.
NormalsType = 1

../Exmesh-041.jpg

Fig. 2.13 Boundary sphere with curved surfaces. These are generated by normal vectors coming from a mandatory point normal vector file.
NormalsType = 2
NormalVectFile = filename

../Exmesh-042.jpg

Fig. 2.14 Boundary sphere with curved surfaces. These are generated by analytical normals from surface point positions.
NormalsType = 3
nExactNormals = 1
ExactNormals = (/1,1/)

2.3. Curving Using Subdivided Surface Mesh

Here, we need an additional surface mesh file, which contains a surface mesh (in CGNS format) generated by a mesh generator from the initial coarse surface mesh by subdivision. The additional surface points are lying on the CAD geometry and are then used as interpolation points for the polynomial description of the element face.

Description of Parameters

Below, all parameters which are mandatory for this curving technique are explained. A description of all parameters can be found in List of Parameters.

Table 2.39 Curving Using Subdivided Surface Mesh: Description of Parameters.

Parameters

Setting

Description

SplitElemFile

filename

Name of suvdivided surface mesh. Mandatory if curvingMethod=3

boundaryOrder

5

Order of spline-reconstruction for curved surfaces, corresponding to the number of subdivisions
1 x subdivided: boundaryOrder=3
2 x subdivided: boundaryOrder=5
3 x subdivided: boundaryOrder=9

Output Visualization

The figures below show the visualization of the SPHERE_Debugmesh_BC.vtu file by using the mesh file spheremesh01.cgns (Fig. 2.3 - Fig. 2.6), spheremesh02.cgns (Fig. 2.7 - Fig. 2.10) and spheremesh01.cgns (Fig. 2.11 - Fig. 2.14). In addition, for each file three examples with a different subdivision of the surface mesh are given.

If there is a need for assistance of visualizing the HOPR output visit Visualization.

spheremesh01
../Exmesh-sm1.jpg

Fig. 2.15 Boundary sphere without using a curving technique.

../Exmesh-sm14.jpg

Fig. 2.15 Boundary sphere with a double subdivision of the surface mesh by using the sphere_surfmesh_04.cgns file.
boundaryOrder = 5

../Exmesh-sm16.jpg

Fig. 2.16 Boundary sphere by using the sphere_surfmesh_06.cgns file. Because of the fact that this subdivision pattern was created neither with a double nor with a triple subdivision of the surface mesh the parameter boundaryOrder has to be adapted accordingly.
boundaryOrder = 7

../Exmesh-sm18.jpg

Fig. 2.17 Boundary sphere with a triple subdivision of the surface mesh by using the sphere_surfmesh_08.cgns file.
boundaryOrder = 9

spheremesh02
../Exmesh-sm2.jpg

Fig. 2.18 Boundary sphere without using a curving technique.

../Exmesh-sm28.jpg

Fig. 2.19 Boundary sphere with a double subdivision of the surface mesh by using the sphere_surfmesh_08.cgns file.
boundaryOrder = 5

../Exmesh-sm210.jpg

Fig. 2.20 Boundary sphere by using the sphere_surfmesh_10.cgns file. Because of the fact that this subdivision pattern was created neither with a double nor with a triple subdivision of the surface mesh the parameter boundaryOrder has to be adapted accordingly.
boundaryOrder = 6

../Exmesh-sm216.jpg

Fig. 2.21 Boundary sphere with a triple subdivision of the surface mesh by using the sphere_surfmesh_16.cgns file.
boundaryOrder = 9

spheremesh04
../Exmesh-sm4.jpg

Fig. 2.22 Boundary sphere without using a curving technique.

../Exmesh-sm48.jpg

Fig. 2.23 Boundary sphere with a single subdivision of the surface mesh by using the sphere_surfmesh_08.cgns file.
boundaryOrder = 3

../Exmesh-sm416.jpg

Fig. 2.24 Boundary sphere with a double subdivision of the surface mesh by using the sphere_surfmesh_16.cgns file.
boundaryOrder = 5

../Exmesh-sm436.jpg

Fig. 2.25 Boundary sphere with a triple subdivision of the surface mesh by using the sphere_surfmesh_36.cgns file.
boundaryOrder = 9

2.4. Use of pre-curved meshes

In some situations, the input mesh is already curved, e.g. when HOPRs own meshes are used for input or if the mesh generator already provides curved meshes (e.g. Gmsh). HOPR will read these meshes and directly use their high-order information. Existing high-order meshes from other sources can thus be directly translated into the HOPR format. Furthermore, HOPR’s various mesh post-processing capabilities can be applied to these meshes and the mesh curving can optionally also be redone by using the normal vector and the subdivision approach described above.

Description of Parameters

Below, the mandatory parameters for reading a Gmsh mesh file are described. Note that in case of Gmsh meshes HOPR currently only supports linear pyramids and prisms, while tetrahedra and hexahedra are supported up to an order of 4. A description of all parameters can be found in List of Parameters.

Table 2.40 Use of pre-curved meshes: Description of Parameters.

Parameters

Setting

Description

Filename

cylinder.msh

Name of mesh file.

boundaryOrder

4

Order of the geometry approximation in the mesh, i.e. the number of interpolation points per direction. Note: Gmsh denotes the polynomial degree by the term “order”.

Output Visualization

The figure below shows the visualization of the CYLINDER_SplineVol.dat file by using the mesh file cylinder.msh.

cylinder
../Cylinder_gmsh.png

Fig. 2.26 Curved mesh file created by Gmsh..