Curved Structured Mesh

From HOPR
Jump to: navigation, search


Parameter File

This is the parameter file, which is also found in

tutorials/1-05-curved_structured/parameter.ini

Curved Structured Mesh

To generate a curved structured mesh the following parameter settings are mandatory:

  • Mode=11 (curved structured block with hexahedral elements)
This mode activates a transformation of the cartesian coordinate system to a turned cylindrical coordinate system. The element distribution which the user can determine by the parameter nElems refers subsequently to the new coordinate system.
Picture 1: Transformation of the coordinate system
  • nZones=1
  • MeshType=3 (for curved mesh)

The HOPR user has to choose whether he wants to generate a half or a full cylindrical mesh. Therefore the new parameter WhichMapping is provided. For specifying the general shape of the (half) cylinder three parameters are provided: R_0, R_INF and DZ. Their meaning is visualized in picture 2. It must be taken into account that the value for the inner radius (R_0) must not be zero and the value for DZ corresponds to the half thickness of the (half) cylinder.

Picture 2: Visualization of the parameters which determine the shape

The assignment of the boundary conditions to the surfaces refers also to the new coordinate system but are defined as before by the parameter BCIndex (z-,y-,x+,y+,x-,z+). For the case that the parameter WhichMapping is set to 4 (full cylindrical mesh) the third and fith surface (x+, x-) coincide and the corresponding components of the BCIndex vector has to set to zero.

All new abovementioned parameters are explained below. A description of all parameters of the parameter file can be found in List of Parameters.

Parameters Setting Description
Meshtype 3 1: Cube (origin + dimensions)
2: Bilinear (8 points CGNS notation)
3: Curved (add WhichMapping)
WhichMapping 4 Type of mapping using 6 boundary faces to build the curved structured mesh:
3: Half cylinder
4: Full cylinder
R_0 0.5 Inner radius of curved structured mesh. The Value 0 is not allowed.
R_INF 20 Outer radius of curved structured mesh
DZ 2 Dimension in z-direction: [-DZ,DZ]

Stretching Functions for Curved Structured Meshes

Similar to straight-edged boxes one can generate curved structured meshes with a stretched element arrangement. Therefore three new parameters have to be defined in the parameter file: stretchType, fac and DXmaxToDXmin. In contrast to a cartesian box where two parameters can used individually or in combination to stretch the elements (factor, l0) here a type of stretching has to select with the parameter stretchType. For this reason and the fact that for different stretchTypes different stretching functions are required it is advisable to define all three parameters.

All three parameters are explained below. A description of all parameters of the parameter file can be found in List of Parameters.

Parameters Setting Description
stretchType (/3,1,0/) This parameter manages the (de)activation of the stretching functions for all axis. For this reason the parameter is a vector with three components.

0: Stretching is deactivated
1: Stretching with a factor
2: Stretching with a legnth ratio
3: Stretching with a bell function.

fac (/1.5,2.2,10/) Stretching factor of the elements in the direction of the turned local cylindrical coordinate axis. 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 and means an deactivation of the stretching function for this axis. The value 0 is only allowed if the stretching function for this axis is deactivated (stretchType vector component for this axis is 0). Furthermore the stretching behaviour can be mirrored by adding a negative sign to the values. If the stretchType vector component for an axis is 3, the factor will be multiplied by -1 if the half distance is reached. In addition, fac has not the significant influence on the element arrangement anymore but the parameter DXmaxToDXmin.

In case of (/1.5,2.2,10/) each following element in x-direction is stretched by the factor 1.5, in y-direction by the factor 2.2 and in the direction of the z-axis by the factor 10 (dependent on stretchType)

DXmaxToDXmin (/6.,100.,1./) This parameter specify the frame ratio of the maximum element size to the minimum element size for the stretched element arrangement. If the stretchType vector component for an axis is 3, the element arrangement is affected significantly by DXmaxToDXmin instead of the parameter fac.

In case of (/6,100,1/) the maximum element size in x-direction can be 6 times larger than the minimum element size. In y-direction the maximum element size can be 100 times larger than the minimum element size. The value 1, here set for ratio of the z-direction, is used typically for a deactivated stretching.

Calculation Formulas

For a better understanding how the element sizes are calculated the formulas for different stretchType settings are shown below.

  • Calculation of the element size for stretchType = 1:
 \Delta x_{i+1} = f \cdot \Delta x_{i} \;\;\;\;\;\; f = \bigg(\frac{\Delta x_{max}}{\Delta x_{min}}\bigg)^{\frac{1}{nElems-1}}
  • Calculation of the element size for stretchType = 3:
 \Delta x(\xi) \sim 1+\bigg(\frac{\Delta x_{max}}{\Delta x_{min}}-1\bigg)\cdot\bigg( \frac{\mathrm e^{-(\xi\cdot f)^2}-\mathrm e^{-f^2}}{\mathrm e^{0}-\mathrm e^{-f^2}}\bigg)

Picture 3: Plot of the calculation function if the parameter stretchType is set to 3 (f means fac, \frac{\Delta x_{max}}{\Delta x_{min}} means DXmaxToDXmin). If the value of fac increases, the peakedness will increase and the element sizes near the bonudaries will decrease.

Exemplary Stretching Cases

Furthermore, three different stretching cases are presented below with a full circle (WhichMapping=4) and an element distribution nElems=(/8,6,4/). Just x- and y- values were visualized.

Picture 4: Non-stretched element arrangement
nElems        =(/8,6,4/)    
stretchType   =(/1,1,0/)            
fac           =(/1,1,0./)
DXmaxToDXmin  =(/100.,100.,1/)
Picture 5: Stretched element arrangement. The element size in the direction of the x-axis increases by a factor of 1.5. In the direction of the y-axis it increases by the factor of 2.2.
nElems        =(/8,6,4/)    
stretchType   =(/1,1,0/)            
fac           =(/1.5,2.2,0/)
DXmaxToDXmin  =(/100,100,1/)
Picture 6: The stretchType parameter is set to 3 for the x-axis. The plot of the belonging calculation function shows that the element sizes increase immediately. In the direction of the y-axis the element size increases by the factor of 2.2.
nElems        =(/8,6,4/)    
stretchType   =(/3,1,0/)            
fac           =(/1.5,2.2,0/)
DXmaxToDXmin  =(/100,100,1/)
Picture 7: The stretchType parameter is set to 3 for the x-axis and the y-axis. although the fac values are different the plots of the belonging calculation function looks very similar to each other.
nElems         =(/8,6,4/)    
stretchType    =(/3,3,0/)            
fac            =(/1.5,2.2,0/)
DXmaxToDXmin   =(/100,100,1/)

Sketches

In the following two exemplary curved structured meshes are presented. The first mesh shall consist of twelve elements in x-direction, eight elements in y-direction and four elements in z-direction, all equidistant. The sketch of this problem is shown in picture 6. The belonging parameter file can be found in Parameterfile Curved Structured Mesh.
The second one consists of the same number of elements in each direction but instead of an equidistant element arrangement the elements shall be stretched. This sketch is presented in picture 7. To get the corresponding output by HOPR one have to edit the Parameterfile Curved Structured Mesh manually before executing because the stretching functions stretchType, fac and DXmintoDXmax are commended out.

Picture 8: Sketch of the 1 zone curved structured mesh. The full cirlce mesh (WhichMapping=4) shall consist of twelve elements in x-direction, eight elements in y-direction and four elements in z-direction, all equidistant.
Picture 9: Sketch of the 1 zone curved structured mesh with a stretched element arrangement. For the x-direction the stretchType parameter was set to 3. The parameter DXmaxToDXmin was set to 6 and the parameter fac to 1.5. For the y-direction the stretchType parameter was set to 1 and the elements were stretched by the factor 2.2. The elements in z-direction remain equidistant.

Output Visualization

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

Curved Structured Mesh without Stretched Elements

Picture 10: Curved structured mesh
Picture 11: Inner domain of the curved structured mesh

Curved Structured Mesh with Stretched Elements

Picture 12: Curved structured mesh with stretched element arrangement
Picture 13: Inner domain of the curved structured mesh with stretched element arrangement

Next Tutorial Section : Mesh Curving by Post-Deformation