External Meshes without Curved Boundaries

From HOPR
Jump to: navigation, search


Parameter File

This is the parameter file, which is also found in

tutorials/2-01-external_meshes_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 picture 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.

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.

!================================================================= !
! 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/)
Picture 1: Screenshot of the folder structure of a CGNS 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 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.

All new parameters of the parameter file of this tutorial are explained below.

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
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 List of Parameters.

Output Visualization

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

The pictures 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 picture 4, 7, 10)

spheremesh01

Picture 2: HOPR output of spheremesh01.cgns
Picture 3: HOPR output of spheremesh01.cgns with extracted edges.
Picture 4: Element surfaces (6) of spheremesh01.cgns the boundary condition sphere was assigned to.

spheremesh02

Picture 5: HOPR output of spheremesh02.cgns
Picture 6: HOPR output of spheremesh02.cgns with extracted edges.
Picture 7: Element surfaces (24) of spheremesh02.cgns the boundary condition sphere was assigned to.

spheremesh04

Picture 8: HOPR output of spheremesh04.cgns
Picture 9: HOPR output of spheremesh04.cgns with extracted edges.
Picture 10: Element surfaces (64) of spheremesh04.cgns the boundary condition sphere was assigned to.

Next Tutorial: External Meshes with Curved Boundaries