Cartesian Box

From HOPR
Jump to: navigation, search


Parameter File

This is the parameter file, which is also found in

tutorials/cartbox/parameter.ini

Description of Parameters

In the following all parameters of the parameter file are explained. This description consists only of parameters which are necessary to generate a cartesian box mesh. A description of all parameters can be found in List of Parameters.

Parameters Setting Description
ProjectName cartbox Part of the output files' name which will be generated during the execution (cartbox_mesh.h5, cartbox_Debugmesh.dat, cartbox_Debugmesh_BC.dat, ...) . These Files can be found in the directory of the executed parameter.ini file.
Debugvisu T T (true) : The files *_Debugmesh.dat and *_Debugmesh_BC.dat will be generated, which enable you to visualize the mesh and the boundary mesh for debugging. These Files can be found in the directory of the executed parameter.ini file
F (False): Files for visualization (cartbox_Debugmesh.dat, cartbox_Debugmesh_BC.dat) will not generated during executing of the parameter.ini file.
Mode 1 Mode of mesh generation; 1: Cartmesh (intern), 3: CFD General Notation System (CGNS, extern)
nZones 1 Number of cartesian boxes
Corner (/0.,0.,0. ,,1.,0.,0. ,,1.,1.,0. ,,0.,1.,0. ,,0.,0.,1. ,,1.,0.,1. ,,1.,1.,1. ,,0.,1.,1. /)
Picture 1: The Cartesian Box
Coordinates of the box's corner nodes in the three-dimensional cartesian coordinate system. For proper operation the nodes have to be in the order as illustrated in Figure 1 at the right and each node with x,y,z coordinates. Furthermore the corner nodes define the six surfaces of the cartesian box, see table below.
Surface Corner Nodes Position in the Cartesian coordinate system
1 1 - 2 - 3 - 4 z < 0 plane (z-)
2 1 - 2 - 5 - 6 y < 0 plane (y-)
3 2 - 3 - 6 - 7 x > 0 plane (x+)
4 3 - 4 - 7 - 8 y > 0 plane (y+)
5 1 - 4 - 5 - 8 x < 0 plane (x-)
6 5 - 6 - 7 - 8 z > 0 (z+)
nElems (/2,3,4/) Number of elements per box in the direction of the cartesian coordinate axes; (/nElemX,nElemY,nElemZ/)
BCIndex (/1,2,3,4,5,6/) 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+/). Here, six different boundary conditions were assigned to the box surfaces. In case of a boundary condition defined on several faces, the components belonging to these faces will be equal in the BCIndex vector, see Exemplary Variations of Boundary Conditions for details.
elemtype 108 Type of cells/elements used for discretization; 104: Tetrahedron, 105: Pyramid, 106:Prism with triangular base, 108: Hexahedron
BoundaryName BC_zminus Name of the boundary condition
BoundaryType (/4,0,0,0/) For each boundary condition two parameters are mandatory, the Name and the Type. The Type parameter consists of four components to set: (/ Type, curveIndex, State, alpha /). For a single cartesian box only the component Type has to be set to a arbitrary number > 1. The other components have to be set 0; The further description of the components can be found in the next tutorials or in the List of Parameters.

Boundary Conditions and Sketch

The picture on the right side shows the sketch of the current problem. On the left side, however, one can see 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 index of the first component of the BCIndex vector "1" says that the boundary condition on position one, "BC_zminus", is assigned to the first surface. Furthermore, the index of the second component of the BCIndex vector "2" means that the second boundary condition ""BC_yminus" is assigned to the second surface of the cartesian box. The other boundary conditions are assigned on the same way to their surfaces. For more examples go to Exemplary Variations of Boundary Conditions.

Cartbox ini.jpg
Picture 2: Sketch of the current problem

Output Visualization

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

Mesh

This is a visualization of the cartbox_Debugmesh.dat file.

Picture 3: Mesh of the cartesian box

Boundary Conditions

This is a visualization of the cartbox_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.

Picture 4: Boundary condition 1 (BC_wall) is assigned to surface 1
Picture 5: Boundary condition 2 (BC_inflow) is assigned to surface 2
Picture 6: Boundary condition 3 (BC_outflow) is assigned to surface 3
Picture 7: Boundary condition 4 (BC_yplus) is assigned to surface 4
Picture 8: Boundary condition 5 (BC_xminus) is assigned to surface 5
Picture 9: Boundary condition 6 (BC_zplus) is assigned to surface 6

Examples

For a better understanding of the interaction between the individual parameters examples respectively cases with Exemplary Variations of Boundary Conditions of the cartesian box are provided.

Next Tutorial: Box with Periodic Boundary Conditions