From c0884fa467f9323b1a41940389309ebe954cfbea Mon Sep 17 00:00:00 2001 From: Stephen Copplestone Date: Mon, 22 Apr 2024 20:50:02 +0200 Subject: [PATCH] Updated user documentation --- .../externalmesheswithcurvedboundaries.md | 42 +++++----- .../externalmesheswithoutcurvedboundaries.md | 39 +++++----- .../tutorials/hoproutputparameter.md | 4 +- .../tutorials/straightedgedboxes.md | 76 +++++++++---------- 4 files changed, 81 insertions(+), 80 deletions(-) diff --git a/docs/documentation/tutorials/externalmesheswithcurvedboundaries.md b/docs/documentation/tutorials/externalmesheswithcurvedboundaries.md index cecd3f2..311cb6e 100644 --- a/docs/documentation/tutorials/externalmesheswithcurvedboundaries.md +++ b/docs/documentation/tutorials/externalmesheswithcurvedboundaries.md @@ -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.
../../../tutorials/figures/Curving.jpg @@ -15,20 +15,20 @@ In the development of the next generation of numerical methods for CFD, high ord
-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.
1: Curving with normal vectors at surface points.
3: Curving with subdivided surface mesh. | + | Parameters |Setting | Description | + | :------ | :----------:| :--------------------------- | + | `curvingMethod` | `1` | 0: No curving method activated.
1: Curving with normal vectors at surface points.
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.
../../../tutorials/figures/Normalvectors.jpg @@ -39,13 +39,13 @@ It has to be taken into account that for generating the curved boundary splines

Description 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`. +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:
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` | @@ -56,10 +56,10 @@ name: tab:Curving Using Normal Vectors Description of Parameters ```

Output Visualization

-The figures below show the visualizations 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). +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 {ref}`tutorials/index_visualization:Visualization`. +If there is a need for assistance of visualizing the HOPR output visit {ref}`tutorials/index_visualization:Visualization`.
spheremesh01
@@ -179,26 +179,26 @@ If there is a need for assistance of visualizing the HOPR output visit {ref}`tut ## 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.

Description 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`. +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
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 - +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 {ref}`tutorials/index_visualization:Visualization`. +If there is a need for assistance of visualizing the HOPR output visit {ref}`tutorials/index_visualization:Visualization`.
spheremesh01
@@ -318,17 +318,17 @@ If there is a need for assistance of visualizing the HOPR output visit {ref}`tut ## 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.

Description of Parameters

-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". | @@ -336,7 +336,7 @@ name: tab:Use of pre-curved meshes Description of Parameters

Output Visualization

-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.
cylinder
diff --git a/docs/documentation/tutorials/externalmesheswithoutcurvedboundaries.md b/docs/documentation/tutorials/externalmesheswithoutcurvedboundaries.md index d348481..01d944d 100644 --- a/docs/documentation/tutorials/externalmesheswithoutcurvedboundaries.md +++ b/docs/documentation/tutorials/externalmesheswithoutcurvedboundaries.md @@ -3,38 +3,38 @@ This tutorial shows how to read in externally generated unstructured and structu The parameter file can be found in - tutorials/2-01-external_mesh_sphere/parameter.ini + tutorials/2-01-external_mesh_CGNS_sphere/parameter.ini ## External Mesh -The external mesh which shall read in have to be available in the directory of the executed parameter file as CGNS 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` can not 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`. +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 assigns normally bondary 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. +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 + 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 - - + 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=(/4,1,0,0/) + BoundaryName=inflow BoundaryType=(/2,0,0,0/) - BoundaryName=outflow + BoundaryName=outflow BoundaryType=(/2,0,0,0/) - BoundaryName=mantel + BoundaryName=mantel BoundaryType=(/2,0,0,0/) @@ -45,7 +45,7 @@ Another important fact is that for external meshes no `BCIndex` parameter is nee
-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 an value unequal to zero. Wether curved boundaries shall be generated or not can be controlled by the parameter `useCurveds`. In this tutorial `useCurveds=F`. The case `useCurveds=T` is the topic of the next tutorial which explaines how to use mesh curving techniques to get curved boundaries for your mesh. +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. @@ -53,20 +53,21 @@ All new parameters of the parameter file of this tutorial are explained below. --- name: tab:External Mesh Parameters --- - | Parameters |Setting | Description | + | Parameters |Setting | Description | | :------ | :----------: | :--------------------------- | - | `filename` | `spheremesh.cgns` | The name of the external mesh file. The belonging files have to be available in the directory of the executed parameter file as CGNS files. | - | `meshscale` | ` 0.001` | Scales all input meshes by a factor | + | `filename` | `spheremesh.cgns` | 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. | + | `meshscale` | ` 0.001` | Scales all input mesh coordinates by a fixed factor | | `SpaceQuandt` | ` 1000` | Characteristic length of the mesh | | `useCurveds` | `T` | T (True): If curved boundaries are defined
F (False): If no curved boundaries are defined . | ``` -A description of all parameters of the parameterfile can be found in {ref}`userguide/parameters:List of Parameters`. +A description of all parameters of the parameter file can be found in {ref}`userguide/parameters:List of Parameters`. ## Output Visualization If there is a need for assistance of visualizing the HOPR output visit {ref}`tutorials/index_visualization: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) +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).

spheremesh01

@@ -159,4 +160,4 @@ The figures below show the visualizations of the SPHERE_Debugmesh.vtu file. In A - \ No newline at end of file + diff --git a/docs/documentation/tutorials/hoproutputparameter.md b/docs/documentation/tutorials/hoproutputparameter.md index 2155b80..a217c08 100644 --- a/docs/documentation/tutorials/hoproutputparameter.md +++ b/docs/documentation/tutorials/hoproutputparameter.md @@ -13,5 +13,5 @@ name: tab:HOPR Output Parameter | `ProjectName` | `ProjectName=cartbox` | Str | 1 | OBLIGATORY | Part of the output files' name which will be generated during the execution. These Files can be found in the directory of the executed `parameter.ini` file. | ``` -A description of all parameters of the parameterfile can be found in -{ref}`userguide/parameters:List of Parameters` \ No newline at end of file +A description of all parameters of the parameter file can be found in +{ref}`userguide/parameters:List of Parameters` diff --git a/docs/documentation/tutorials/straightedgedboxes.md b/docs/documentation/tutorials/straightedgedboxes.md index e3354df..861ce6c 100644 --- a/docs/documentation/tutorials/straightedgedboxes.md +++ b/docs/documentation/tutorials/straightedgedboxes.md @@ -15,7 +15,7 @@ This tutorial shows how to generate a simple mesh of a cubical box and the defin See {ref}`tutorials/straightedgedboxes:Cartesian Box: Exemplary Variations of Boundary Conditions` for cases with different boundary conditions. ### Cartesian Box: Description of Parameters -The following table describes all parameters present in the parameter file. Therefore, it is limited to the parameters needed to generate a Cartesian box mesh. A description of all parameters can be found in {ref}`userguide/parameters:List of Parameters`. +The following table describes all parameters present in the parameter file. Therefore, it is limited to the parameters needed to generate a Cartesian box mesh. A description of all parameters can be found in {ref}`userguide/parameters:List of Parameters`. ```{table} Parameters Cartesian Box. --- @@ -35,7 +35,7 @@ name: tab:Parameters Cartesian Box | `BoundaryType` | `(/4,0,0,0/)` | Type of each boundary condition, provided with the components `(/ Type, curveIndex, State, alpha /)`.For a single Cartesian box, only the component `Type` has to be set.
The other components are set to the default value `0`. Further description of the components can be found in the next tutorials or in the {ref}`userguide/parameters:List of Parameters`. | ``` ### Cartesian Box: Boundary Conditions and Sketch -Fig. 1.2 shows the sketch of the current flow setup. Fig. 1.3 gives the corresponding excerpt of the parameter file containing the boundary conditions. Entries are colored to highlight the connection between the `BCIndex` and the boundary conditions. The same colors are used for the visualization below. +Fig. 1.2 shows the sketch of the current flow setup. Fig. 1.3 gives the corresponding excerpt of the parameter file containing the boundary conditions. Entries are colored to highlight the connection between the `BCIndex` and the boundary conditions. The same colors are used for the visualization below. @@ -58,10 +58,10 @@ name: tab:Parameters Cartesian Box
-The index of the first component of the `BCIndex` vector `1` assigns the boundary condition on position one, `BC_zminus`, to the first surface. Consequently, the index of the second component of the `BCIndex` vector `2` assigns the second boundary condition `BC_yminus` to the second surface of the Cartesian box and so on. More examples are given in {ref}`tutorials/straightedgedboxes:Cartesian Box: Exemplary Variations of Boundary Conditions`. +The index of the first component of the `BCIndex` vector `1` assigns the boundary condition on position one, `BC_zminus`, to the first surface. Consequently, the index of the second component of the `BCIndex` vector `2` assigns the second boundary condition `BC_yminus` to the second surface of the Cartesian box and so on. More examples are given in {ref}`tutorials/straightedgedboxes:Cartesian Box: Exemplary Variations of Boundary Conditions`. ### Cartesian Box: Output Visualization -The following section highlights the visualization of the above setup. For more details on the HOPR visualization output, see {ref}`tutorials/index_visualization:Visualization`. +The following section highlights the visualization of the above setup. For more details on the HOPR visualization output, see {ref}`tutorials/index_visualization:Visualization`.

Mesh

@@ -142,13 +142,13 @@ For a better understanding of the interaction between the parameter `BCIndex` an

Parameters and Sketch

-The parameterfile of this example can be found in +The parameterfile of this example can be found in /tutorials/1-01-cartbox/parameter_ex1.ini Fig. 1.11 shows the sketch of the current problem and Fig. 1.12 shows an excerpt of the parameter file which deals with the boundary conditions. In this code's excerpt some text elements are colored to show the connection between the surfaces and their assigned boundary conditions. The same colors are used for the visualization below. -The first four components of the `BCIndex` vector are equal. The index of these components `1` says that the boundary condition on position one, `BC_wall`, is assigned to the surfaces one to four. Furthermore, the fifth component of the `BCIndex` vector with the index `2` means that the second boundary condition `BC_inflow` is assigned to the fifth surface of the cartesian box. At least the third boundary condition `BC_outflow` is assigned to the the sixth surface. Therefore, the last or the sixth component of the `BCIndex` vector is set to `3`. +The first four components of the `BCIndex` vector are equal. The index of these components `1` says that the boundary condition on position one, `BC_wall`, is assigned to the surfaces one to four. Furthermore, the fifth component of the `BCIndex` vector with the index `2` means that the second boundary condition `BC_inflow` is assigned to the fifth surface of the cartesian box. At least the third boundary condition `BC_outflow` is assigned to the the sixth surface. Therefore, the last or the sixth component of the `BCIndex` vector is set to `3`. @@ -173,7 +173,7 @@ The first four components of the `BCIndex` vector are equal. The index of these

Output Vizualisation

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

Mesh

@@ -187,7 +187,7 @@ This is a visualization of the cartbox_ex1_Debugmesh.dat file.

Boundary Conditions

-This is a visualization of the cartbox_ex1_Debugmesh_BC.dat file. The colors of the surfaces represent the boundary conditions and are the same as in the excerpt of the parameter file. +This is a visualization of the cartbox_ex1_Debugmesh_BC.dat file. The colors of the surfaces represent the boundary conditions and are the same as in the excerpt of the parameter file.
@@ -220,13 +220,13 @@ This is a visualization of the cartbox_ex1_Debugmesh_BC.dat file. The colors of #### Example 2 -The parameterfile of this example can be found in +The parameterfile of this example can be found in /tutorials/1-01-cartbox/parameter_ex2.ini -Fig. 1.17 shows the sketch of the current problem and Fig. 1.18 shows an excerpt of the parameter file which deals with the boundary conditions. In this code's excerpt some text elements are colored to show the connection between the surfaces and their assigned boundary conditions. The same colors are used for the visualization below. +Fig. 1.17 shows the sketch of the current problem and Fig. 1.18 shows an excerpt of the parameter file which deals with the boundary conditions. In this code's excerpt some text elements are colored to show the connection between the surfaces and their assigned boundary conditions. The same colors are used for the visualization below. -In this example the first, the third and the sixth component of the `BCIndex` vector are equal. The index of these components `1` says that the boundary condition on position one, `BC_wall`, is assigned to the surfaces one, three and six. Furthermore, the fifth component of the `BCIndex` vector with the index `2` means that the second boundary condition `BC_inflow` is assigned to the fifth surface of the cartesian box. At least the third boundary condition `BC_outflow` is assigned to the second and the forth surface. Therefore, the second and the fourth component of the `BCIndex` vector is set to `3`. +In this example the first, the third and the sixth component of the `BCIndex` vector are equal. The index of these components `1` says that the boundary condition on position one, `BC_wall`, is assigned to the surfaces one, three and six. Furthermore, the fifth component of the `BCIndex` vector with the index `2` means that the second boundary condition `BC_inflow` is assigned to the fifth surface of the cartesian box. At least the third boundary condition `BC_outflow` is assigned to the second and the forth surface. Therefore, the second and the fourth component of the `BCIndex` vector is set to `3`.

Parameters and Sketch

@@ -253,11 +253,11 @@ In this example the first, the third and the sixth component of the `BCIndex` ve

Output Vizualisation

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

Mesh

-This is a visualization of the cartbox_ex2_Debugmesh.dat file. +This is a visualization of the cartbox_ex2_Debugmesh.dat file.
../../../tutorials/figures/Ex2_cartbox_mesh.jpg @@ -269,7 +269,7 @@ This is a visualization of the cartbox_ex2_Debugmesh.dat file.

Boundary Conditions

-This is a visualization of the cartbox_ex2_Debugmesh_BC.dat file. The colors of the surfaces represent the boundary conditions and are the same as in the excerpt of the parameter file. +This is a visualization of the cartbox_ex2_Debugmesh_BC.dat file. The colors of the surfaces represent the boundary conditions and are the same as in the excerpt of the parameter file.
@@ -306,7 +306,7 @@ This is a visualization of the cartbox_ex2_Debugmesh_BC.dat file. The colors of ## Periodic Boundary Conditions This tutorial shows how to define periodic boundary conditions, only slightly changing the definitions from the tutorial Cartesian Box. -The parameter file can be found in +The parameter file can be found in tutorials/1-02-cartbox_periodic/parameter.ini @@ -317,14 +317,14 @@ In the following parameters of the parameter file are explained. This descriptio --- name: tab:Parameters Periodic Boundary Conditions --- - | Parameters |Setting | Description | + | Parameters |Setting | Description | | :------ | :----------: | :--------------------------- | | `BoundaryName` | `BC_zminus` | Name of the boundary condition | | `BoundaryType` | ` (/1,0,0,-1/)` | For each periodic boundary condition three parameters are mandatory, the `BoundaryName`, the `BoundaryType` and the displacement vector `vv`. The Type parameter consists of four
components to set: `(/ Type, curveIndex, State, alpha /)`. For a periodic boundary condition the component Type has always to set to "1". The fourth component `alpha` assigns a
displacement vector `vv` and its direction (-/+) to the periodic boundary. An `alpha` of "-1" means that the first ("1") defined displacement vector is assigned to this surface in the opposite
direction ("-1") as he was defined. For a simple cartesian box the other components `curveIndex` and `State` have to be set 0.
The further description of the components can be found in the next tutorials or in the {ref}`userguide/parameters:List of Parameters`. | | `vv` | `(/0.,0.,1./)` |The displacement vector has to specify in the three-dimensional cartesian coordinate system, has to be normal to a surface the vector was assigned to. In addition the displacement vector has
to show to the inside of the cartesian box. In case of two parallel surface-planes, both with periodic boundary conditions, just one displacement vector has to be defined. Therefore the
different directions of the vectors can be compensated by switching the sign of `alpha`, the fourth component of the `BoundaryType` vector.
It has to be taken into account that the displacement vector has to be as long as the distance between the surfaces the vector was assigned to. Also the index of a displacement vector is
defined by the position of its definition like the parameter `BCIndex`. Several definitions of boundary conditions between two definitions of displacement vectors will not affect the index of
the displacement vectors. | ``` ### Periodic Boundary Conditions: Boundary Conditions and Sketch -Fig. 1.23 shows the sketch of the current problem. It is similar to the problem in the tutorial Cartesian Box but instead of Dirichlet periodic boundary conditions are assigned to the surfaces one, two, four and six. Further below one can see an excerpt of the parameter file which deals with the periodic boundary conditions. In this code's excerpt some text elements are colored to show the connection between boundary conditions and their related displacement vectors. The same colors are used for the visualization in Fig. 1.17. +Fig. 1.23 shows the sketch of the current problem. It is similar to the problem in the tutorial Cartesian Box but instead of Dirichlet periodic boundary conditions are assigned to the surfaces one, two, four and six. Further below one can see an excerpt of the parameter file which deals with the periodic boundary conditions. In this code's excerpt some text elements are colored to show the connection between boundary conditions and their related displacement vectors. The same colors are used for the visualization in Fig. 1.17.
../../../tutorials/figures/Cartbox_periodic_sketch.jpg
@@ -346,25 +346,25 @@ For the other two periodic boundary conditions of the surfaces two and four the ## Multiple Cartesian Boxes This tutorial shows how to generate a mesh consisting of mutliple cartesian boxes and how to link them via boundary conditions. -The parameter file can be found in +The parameter file can be found in tutorials/1-03-cartbox_multiple/parameter.ini ### Multiple Cartesian Boxes: Definition of Multiple Cartesian Boxes -A general excerpt of the parameter file below shows how multiple cartesian boxes have to be defined in the parameter file. +A general excerpt of the parameter file below shows how multiple cartesian boxes have to be defined in the parameter file. !====================================================================== ! ! MESH !====================================================================== ! Mode =1 ! Mode for Cartesian boxes nZones =n ! number of boxes - + ! === zone 1 === - ... - + ... + ! === zone 2 === ... - + . . . @@ -374,21 +374,21 @@ A general excerpt of the parameter file below shows how multiple cartesian boxes At first the parameter `nZones` has to be adapted to the number of cartesian boxes one going to define. The cartesian boxes can defined simply by writing them and their specifications `(Corner, nElems, BCIndex, elemtype, ...)` among themselves. Furthermore it is important that the boxes are defined correctly to each other. If there shall be a contact between two boxes, it is mandatory that the corresponding surfaces will coincide. That means that also the surfaces' corner nodes have to coincide. -However, a correct defining of the corner nodes is not sufficient for the functionality. Therefore, the parameter `BCIndex` which assigns boundary conditions to box's surfaces has to be adapted. +However, a correct defining of the corner nodes is not sufficient for the functionality. Therefore, the parameter `BCIndex` which assigns boundary conditions to box's surfaces has to be adapted. ```{table} Multiple Cartesian Boxes. --- name: tab:Multiple Cartesian Boxes --- - | Parameters |Setting | Description | + | Parameters |Setting | Description | | :------ | :----------: | :--------------------------- | | `BCIndex` | `(/0,0,0,0,0,0/)` | The `BCIndex` parameter assigns a bondary condition to each surface of the cartesian box in order of the surfaces. The number of a vector's component represents the nth boundary
condition in order of its position in the file. Hence, each position refers to the six box sides `(/z-,y-,x+,y+,x-,z+/)`.
In case of multiple cartesian boxes there are surfaces which coincide with other ones. To such surfaces no boundary condition can assign. Therefore, The number of the corresponding
vector's component is set to 0. Here, all components of the parameter `BCIndex` are set to 0 (`(/0,0,0,0,0,0/)`).
That means that the this box is surounded completely by six other boxes so that no boundary condition can assign to a single surface. | ``` -A description of all parameters of the parameterfile can be found in {ref}`userguide/parameters:List of Parameters`. +A description of all parameters of the parameterfile can be found in {ref}`userguide/parameters:List of Parameters`. ### Multiple Cartesian Boxes: Sketch -Fig. 1.25 shows the sketch of the current problem. As on can see the generated mesh shall consist of three cartesian boxes. These zones are thereby defined in the following order in the parameter file: +Fig. 1.25 shows the sketch of the current problem. As on can see the generated mesh shall consist of three cartesian boxes. These zones are thereby defined in the following order in the parameter file: 1st zone: lower left zone @@ -416,7 +416,7 @@ If there is a need for assistance of visualizing the HOPR output visit {ref}`tut

Mesh

-This is a visualization of the `cartbox_multiple_Debugmesh.dat` file. +This is a visualization of the `cartbox_multiple_Debugmesh.dat` file.
../../../tutorials/figures/Cartbox_multiple_mesh.jpg @@ -427,7 +427,7 @@ This is a visualization of the `cartbox_multiple_Debugmesh.dat` file.

Boundary Conditions

-This is a visualization of the `cartbox_multiple_Debugmesh_BC.dat` file. The colors of the surfaces represent the boundary conditions and are the same as in the excerpt of the parameter file. +This is a visualization of the `cartbox_multiple_Debugmesh_BC.dat` file. The colors of the surfaces represent the boundary conditions and are the same as in the excerpt of the parameter file.
@@ -499,7 +499,7 @@ This is a visualization of the `cartbox_multiple_Debugmesh_BC.dat` file. The col ## Stretching Functions This tutorial shows how to generate a mesh consisting of a boxes with a stretched element arrangement. -The parameter file can be found in +The parameter file can be found in tutorials/1-04-cartbox_multiple_stretch/parameter.ini @@ -518,7 +518,7 @@ With stretching functions one can generate a mesh consisting of a boxes with a s type="text/javascript"> -In case of a stretched element arrangement the next element of a box is always stretched by a factor \\(f\\) in the direction of the coordinate axis. Thereby the value of factor \\(f\\) can have a positive or a negative sign. Here \\(f\\) has either a negative and an absolute value >1 or a positive sign and an abolute value <1. The length of the first element is called \\(l_{0}\\). All streched \\(N\\) elements together has the length \\(l_{ges}\\). +In case of a stretched element arrangement the next element of a box is always stretched by a factor \\(f\\) in the direction of the coordinate axis. Thereby the value of factor \\(f\\) can have a positive or a negative sign. Here \\(f\\) has either a negative and an absolute value >1 or a positive sign and an abolute value <1. The length of the first element is called \\(l_{0}\\). All streched \\(N\\) elements together has the length \\(l_{ges}\\). ### Stretching Functions: Building a Cartesian Box with Stretched Elements To get a single cartesian box with a stretched element arrangement it is important to know that the parameters \\(l_{0}\\) and \\(N\\) are defined even before one define the stretching parameters `factor` and `l0`. The length \\(l_{ges}\\) is defined by the boundarys of the cartesian box and the number of elements per box in the direction of the cartesian coordinate axes, called \\(N\\) in the following, was defined with the parameter `nElems`. @@ -527,13 +527,13 @@ For a stretched element arrangement either the parameter `factor` or the paramet $$ \frac{l_{ges}}{l_{0}} = \sum_{i=1}^{N} f^{i-1} = \frac{1 - f^{N}}{1 - f } $$ -The structure of both parameters are explained below. A description of all parameters of the parameterfile can be found in {ref}`userguide/parameters:List of Parameters`. +The structure of both parameters are explained below. A description of all parameters of the parameterfile can be found in {ref}`userguide/parameters:List of Parameters`. ```{table} Stretching Functions. --- name: tab:Stretching Functions --- - | Parameters |Setting | Description | + | Parameters |Setting | Description | | :------ | :----------: | :--------------------------- | | `factor` | ` (/-1.75,1,-1.5/)` | Stretching factor of the elements in the direction of the cartesian coordinate axes. A value >1 means an increase of the element size in the direction of the coordinate axis, however, a value of the
intervall (0,1) means a decrease. The Value 1 does not affect the element sizes just as the value 0 which means an deactivation of the stretching function for this axis. Furthermore the stretching
behaviour can be mirrored by adding a negative sign to the values. A combination with the parameter `l0` ignores the element number of the defined box.
In case of `(/-1.75,1,-1.5/)` each following element in the direction of the x-axis is compressed by the factor -1.75 and in the direction of the z-axis by the factor -1.5. The element arrangement
in the direction of the y-axis was not changed. | | `l0` | `(/0,1,5,0/)` | The length of the first element of a stretched element arrangement of a cartesian box. Each component of the vector stands for an axis of the cartesian coordinate system. The value 0 means an
deactivation of the stretching function for this axis. A negative sign defines the length of the first element of the other side of the box. A combination with the parameter `factor` ignores the
element number of the defined box. Here the stretching function is deactivated for the x- and z-axis, whereas the first element in the direction of the y-axis has a size of 1.5. | @@ -599,10 +599,10 @@ These three different cases are presented below with a small cube with an edge l
### Stretching Functions: Building Multiple Cartesian Boxes with Stretched Elements -For building a mesh consisting of multiple cartesian boxes with a stretched element arrangement at least one of the parameters `factor` and `l0` has to be defined for each cartesian box. The reason for this is that if there shall be a contact between two boxes the surfaces' corner nodes have to coincide. This means that defining a stretch function to a cartesian box leads to a need of a stretch function of the adjacent cartesian box. A visualization of this issue one can see in the sketch of the tutorial's problem. +For building a mesh consisting of multiple cartesian boxes with a stretched element arrangement at least one of the parameters `factor` and `l0` has to be defined for each cartesian box. The reason for this is that if there shall be a contact between two boxes the surfaces' corner nodes have to coincide. This means that defining a stretch function to a cartesian box leads to a need of a stretch function of the adjacent cartesian box. A visualization of this issue one can see in the sketch of the tutorial's problem. ### Stretching Functions: Sketch -In the following an exemplary mesh of multiple cartesian boxes with a stretched element arrangement is presented. The belonging parameter file can be found in Parameterfile Stretching Functions. The arrangement of the cartesian boxes corresponds to the one of the tutorial Multiple Cartesian Boxes but instead of equidistant elements a stretched element arrangement is produced by inserting the parameters `factor` and `l0`. Furthermore the number of elements of each box were increased by changing the parameter `nElems` for a better visualization of the stretched element arrangement. The figure below shows the way the elements will be stretched. +In the following an exemplary mesh of multiple cartesian boxes with a stretched element arrangement is presented. The belonging parameter file can be found in Parameterfile Stretching Functions. The arrangement of the cartesian boxes corresponds to the one of the tutorial Multiple Cartesian Boxes but instead of equidistant elements a stretched element arrangement is produced by inserting the parameters `factor` and `l0`. Furthermore the number of elements of each box were increased by changing the parameter `nElems` for a better visualization of the stretched element arrangement. The figure below shows the way the elements will be stretched.
@@ -613,11 +613,11 @@ In the following an exemplary mesh of multiple cartesian boxes with a stretched
-It has to be taken into account that the figure above just demonstrates in which directions the elements are stretched respectively compressed. Wether the number of elements per box nor the cartesian boxes'sizes represented here corresponds to the parameters of the Parameterfile Stretching Functions. +It has to be taken into account that the figure above just demonstrates in which directions the elements are stretched respectively compressed. Wether the number of elements per box nor the cartesian boxes'sizes represented here corresponds to the parameters of the Parameterfile Stretching Functions. ### Stretching Functions: Output Visualization -If there is a need for assistance of visualizing the HOPR output visit {ref}`tutorials/index_visualization:Visualization`. -These are visualizations of the cartbox_multiple_stretch_mesh.h5 file. +If there is a need for assistance of visualizing the HOPR output visit {ref}`tutorials/index_visualization:Visualization`. +These are visualizations of the cartbox_multiple_stretch_mesh.h5 file.
../../../tutorials/figures/Cartbox_multiple_stretch_side.png