Exemplary Variations of Boundary Conditions

From HOPR
Jump to: navigation, search


Example 1

For a better understanding of the interaction between the parameter BCIndex and the declaration of the boundary conditions two different examples are presented below. Both examples are slight variations of the tutorial Cartesian Box in that way, that there are just three different boundary conditions: WALL, INFLOW and OUTFLOW. This means that components belonging to the surfaces will be equal in the BCIndex vector (see List of Parameters).

The parameterfile of this example can be found in

/tutorials/1-01-cartbox/parameter_ex1.ini

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

Cartbox ex1 ini.jpg
Picture 1: Sketch of Example 1

Output Vizualisation

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

Mesh

This is a visualization of the cartbox_ex1_Debugmesh.dat file.

Picture 2: Mesh of the cartesian box

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.

Picture 3: Boundary condition 1 (BC_wall) is assigned to surfaces 1 - 4
Picture 4: Boundary condition 2 (BC_inflow) is assigned to surface 5
Picture 5: Boundary condition 3 (BC_outflow) is assigned to surface 6

Example 2

The parameterfile of this example can be found in

/tutorials/1-01-cartbox/parameter_ex2.ini

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.

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

Cartbox ex2 ini.jpg
Picture 6: Sketch of Example 2

Output Vizualisation

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

Mesh

This is a visualization of the cartbox_ex2_Debugmesh.dat file.

Picture 7: Mesh of the cartesian box

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.

Picture 8: Boundary condition 1 (BC_wall) is assigned to surfaces 1, 3 and 6
Picture 9: Boundary condition 2 (BC_inflow) is assigned to surface 5
Picture 10: Boundary condition 3 (BC_outflow) is assigned to surface 2 and 4

Next Tutorial: Box with Periodic Boundary Conditions