Skip to content

Commit

Permalink
Updated user documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
scopplestone committed Apr 22, 2024
1 parent e3db7de commit c0884fa
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 80 deletions.
42 changes: 21 additions & 21 deletions docs/documentation/tutorials/externalmesheswithcurvedboundaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ This tutorial shows how several methods can be applied to curve the boundary fac

The parameter file can be found in

tutorials/2-02-external_mesh_sphere/parameter.ini
tutorials/2-02-external_mesh_CGNS_sphere_curved/parameter.ini

## Mesh Curving Techniques
In the development of the next generation of 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 whose importance 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.
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.

<figure class="align-center" id="fig-curving">
<a class="reference internal image-reference" href="../../../tutorials/figures/Curving.jpg"><img alt="../../../tutorials/figures/Curving.jpg" src="../../../tutorials/figures/Curving.jpg" style="width: 50%;" /></a>
Expand All @@ -15,20 +15,20 @@ In the development of the next generation of numerical methods for CFD, high ord
</figcaption>
</figure>

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`.
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} Mesh Curving Techniques Parameter.
---
name: tab:Mesh Curving Techniques Parameter
---
| Parameters |Setting | Description |
| :------ | :----------: | :--------------------------- |
| `curvingMethod` | `1` | 0: No curving method activated.<br>1: Curving with normal vectors at surface points.<br>3: Curving with subdivided surface mesh. |
| Parameters |Setting | Description |
| :------ | :----------:| :--------------------------- |
| `curvingMethod` | `1` | 0: No curving method activated.<br>1: Curving with normal vectors at surface points.<br>3: Curving with subdivided surface mesh. |
```

## 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.
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 always to set to 4 for a normal vector approach. Otherwise HOPR will maybe not work correctly.
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.

<figure class="align-center" id="fig-normalvectors">
<a class="reference internal image-reference" href="../../../tutorials/figures/Normalvectors.jpg"><img alt="../../../tutorials/figures/Normalvectors.jpg" src="../../../tutorials/figures/Normalvectors.jpg" style="width: 90%;" /></a>
Expand All @@ -39,13 +39,13 @@ It has to be taken into account that for generating the curved boundary splines

<h4>Description of Parameters<a class="headerlink" href="#description-of-parameters" title="Permalink to this heading"></a></h4>

Below all parameters which are mandatory for this curving technique are explained. A description of all parameters can be found in {ref}`userguide/parameters:List of Parameters`.
Below, all parameters which are mandatory for this curving technique are explained. A description of all parameters can be found in {ref}`userguide/parameters:List of Parameters`.

```{table} Curving Using Normal Vectors: Description of Parameters.
---
name: tab:Curving Using Normal Vectors Description of Parameters
---
| Parameters |Setting | Description |
| Parameters |Setting | Description |
| :------ | :----------: | :--------------------------- |
| `NormalsType` | `1` | Source of the normal:<br>1: Reconstructed from coarse surface mesh (no additional parameters, `CurveIndex` of BC must be >0).<br>2: `NormalVectFile` (point normal vector file) needed<br>3: Analytical normals from surface point positions |
| `NormalVectFile` | ` filename` | Number of association between BC `CurveIndex` and analytical normal. Mandatory if `NormalsType=3` |
Expand All @@ -56,10 +56,10 @@ name: tab:Curving Using Normal Vectors Description of Parameters
```
<h4>Output Visualization<a class="headerlink" href="#output-visualization" title="Permalink to this heading"></a></h4>

The figures below show the visualizations of the boundary sphere (`BoundaryType=(/4,1,0,0/)`) of the meshes spheremesh01.cgns (<a class="reference internal" href="#fig-exmesh-01j"><span class="std std-numref">Fig. 2.4</span></a> - <a class="reference internal" href="#fig-exmesh-012"><span class="std std-numref">Fig. 2.6</span></a>), spheremesh02.cgns (<a class="reference internal" href="#fig-exmesh-02j"><span class="std std-numref">Fig. 2.8</span></a> - <a class="reference internal" href="#fig-exmesh-022"><span class="std std-numref">Fig. 2.10</span></a>) and spheremesh04.cgns (<a class="reference internal" href="#fig-exmesh-04j"><span class="std std-numref">Fig. 2.12</span></a> - <a class="reference internal" href="#fig-exmesh-042"><span class="std std-numref">Fig. 2.14</span></a>) 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).
The figures below show the visualization of the boundary sphere (`BoundaryType=(/4,1,0,0/)`) of the meshes spheremesh01.cgns (<a class="reference internal" href="#fig-exmesh-01j"><span class="std std-numref">Fig. 2.4</span></a> - <a class="reference internal" href="#fig-exmesh-012"><span class="std std-numref">Fig. 2.6</span></a>), spheremesh02.cgns (<a class="reference internal" href="#fig-exmesh-02j"><span class="std std-numref">Fig. 2.8</span></a> - <a class="reference internal" href="#fig-exmesh-022"><span class="std std-numref">Fig. 2.10</span></a>) and spheremesh04.cgns (<a class="reference internal" href="#fig-exmesh-04j"><span class="std std-numref">Fig. 2.12</span></a> - <a class="reference internal" href="#fig-exmesh-042"><span class="std std-numref">Fig. 2.14</span></a>) 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 (<a class="reference internal" href="#fig-exmesh-sm1"><span class="std std-numref">Fig. 2.3</span></a>, <a class="reference internal" href="#fig-exmesh-sm2"><span class="std std-numref">Fig. 2.7</span></a>, <a class="reference internal" href="#fig-exmesh-sm4"><span class="std std-numref">Fig. 2.11</span></a>) and were visualized with the SPHERE_CURVED_Debugmesh_BC.vtu file.

If there is a need for assistance of visualizing the HOPR output visit {ref}`tutorials/index_visualization:Visualization`.
If there is a need for assistance of visualizing the HOPR output visit {ref}`tutorials/index_visualization:Visualization`.

<h5>spheremesh01<a class="headerlink" href="#spheremesh01" title="Permalink to this heading"></a></h5>

Expand Down Expand Up @@ -179,26 +179,26 @@ If there is a need for assistance of visualizing the HOPR output visit {ref}`tut
</table>

## 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.
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.

<h4>Description of Parameters<a class="headerlink" href="#description-of-parameters" title="Permalink to this heading"></a></h4>

Below all parameters which are mandatory for this curving technique are explained. A description of all parameters can be found in {ref}`userguide/parameters:List of Parameters`.
Below, all parameters which are mandatory for this curving technique are explained. A description of all parameters can be found in {ref}`userguide/parameters:List of Parameters`.
```{table} Curving Using Subdivided Surface Mesh: Description of Parameters.
---
name: tab:Curving Using Subdivided Surface Mesh Description of Parameters
---
| Parameters |Setting | Description |
| 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<br>1 x subdivided: `boundaryOrder=3`<br>2 x subdivided: `boundaryOrder=5`<br>3 x subdivided: `boundaryOrder=9`... |
```
<h4>Output Visualization<a class="headerlink" href="#output-visualization" title="Permalink to this heading"></a></h4>

The figures below show the visualization of the SPHERE_Debugmesh_BC.vtu file by using the mesh file spheremesh01.cgns (<a class="reference internal" href="#fig-exmesh-sm1"><span class="std std-numref">Fig. 2.3</span></a> - <a class="reference internal" href="#fig-exmesh-012"><span class="std std-numref">Fig. 2.6</span></a>), spheremesh02.cgns (<a class="reference internal" href="#fig-exmesh-sm2"><span class="std std-numref">Fig. 2.7</span></a> - <a class="reference internal" href="#fig-exmesh-022"><span class="std std-numref">Fig. 2.10</span></a>) and spheremesh01.cgns (<a class="reference internal" href="#fig-exmesh-sm4"><span class="std std-numref">Fig. 2.11</span></a> -
The figures below show the visualization of the SPHERE_Debugmesh_BC.vtu file by using the mesh file spheremesh01.cgns (<a class="reference internal" href="#fig-exmesh-sm1"><span class="std std-numref">Fig. 2.3</span></a> - <a class="reference internal" href="#fig-exmesh-012"><span class="std std-numref">Fig. 2.6</span></a>), spheremesh02.cgns (<a class="reference internal" href="#fig-exmesh-sm2"><span class="std std-numref">Fig. 2.7</span></a> - <a class="reference internal" href="#fig-exmesh-022"><span class="std std-numref">Fig. 2.10</span></a>) and spheremesh01.cgns (<a class="reference internal" href="#fig-exmesh-sm4"><span class="std std-numref">Fig. 2.11</span></a> -
<a class="reference internal" href="#fig-exmesh-042"><span class="std std-numref">Fig. 2.14</span></a>). 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 {ref}`tutorials/index_visualization:Visualization`.
If there is a need for assistance of visualizing the HOPR output visit {ref}`tutorials/index_visualization:Visualization`.

<h5>spheremesh01<a class="headerlink" href="#spheremesh01" title="Permalink to this heading"></a></h5>

Expand Down Expand Up @@ -318,25 +318,25 @@ If there is a need for assistance of visualizing the HOPR output visit {ref}`tut
</table>

## 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. Furthemore 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.
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.

<h4>Description of Parameters<a class="headerlink" href="#description-of-parameters" title="Permalink to this heading"></a></h4>

Below the mandatory parameters for reading a Gmsh mesh file are described. Note that in case of Gmsh meshes HOPR only supports linear pyramids and prisms, while tetrahedra and hexahedra are supported up to order 4. A description of all parameters can be found in {ref}`userguide/parameters:List 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 {ref}`userguide/parameters:List of Parameters`.

```{table} Use of pre-curved meshes: Description of Parameters.
---
name: tab:Use of pre-curved meshes Description of Parameters
---
| Parameters |Setting | Description |
| 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". |
```

<h4>Output Visualization<a class="headerlink" href="#output-visualization" title="Permalink to this heading"></a></h4>

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

<h5>cylinder<a class="headerlink" href="#cylinder" title="Permalink to this heading"></a></h5>

Expand Down
Loading

0 comments on commit c0884fa

Please sign in to comment.