3.2 Supersonic flow over a forward-facing step
Tutorial path:
In this example we shall investigate supersonic flow over a forward-facing step. The problem description involves a flow of Mach 3 at an inlet to a rectangular geometry with a step near the inlet region that generates shock waves.
This example introduces the following OpenFOAM features for the first time:
3.2.1 Problem specification
The problem is defined as follows:
- Solution domain
- The domain is 2 dimensional and consists of a short inlet section
followed by a forward-facing step of 20% the height of the section as shown in
Figure 3.4
- Governing equations
- Initial conditions
- , , .
- Boundary conditions
-
- Inlet (left) with fixedValue for velocity , pressure and temperature ;
- Outlet (right) with zeroGradient on , and ;
- No-slip adiabatic wall (bottom);
- Symmetry plane (top).
- Transport properties
-
- Dynamic viscosity of air
- Thermodynamic properties
-
- Specific heat at constant volume
- Gas constant
- Conductivity
- Case name
- forwardStep case located in the $FOAM_TUTORIALS/compressible/sonicFoam/laminar directory.
- Solver name
- sonicFoam: an implementation for compressible trans-sonic/supersonic laminar gas flow.
The case is designed such that the speed of sound of the gas , the consequence being that the velocities are directly equivalent to the Mach number, e.g. the inlet velocity of is equivalent to Mach 3. This speed of sound calculation can be verified using the relationship for a perfect gas, , i.e. the ratio of specific heats
| (3.10) |
3.2.2 Mesh generation
The mesh used in this case is relatively simple, specified with uniform rectangular cells of length 0.06 in the direction and 0.05 in the direction. The geometry can simply be divided into 3 blocks, one below the top of the step, and two above the step, one either side of the step front. The full set of vertices and blocks are given in the mesh description file below:
2| ========= | |
3| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4| \\ / O peration | Version: v2006 |
5| \\ / A nd | Website: www.openfoam.com |
6| \\/ M anipulation | |
7\*---------------------------------------------------------------------------*/
8FoamFile
9{
10 version 2.0;
11 format ascii;
12 class dictionary;
13 object blockMeshDict;
14}
15// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16
17scale 1;
18
19vertices
20(
21 (0 0 -0.05)
22 (0.6 0 -0.05)
23 (0 0.2 -0.05)
24 (0.6 0.2 -0.05)
25 (3 0.2 -0.05)
26 (0 1 -0.05)
27 (0.6 1 -0.05)
28 (3 1 -0.05)
29 (0 0 0.05)
30 (0.6 0 0.05)
31 (0 0.2 0.05)
32 (0.6 0.2 0.05)
33 (3 0.2 0.05)
34 (0 1 0.05)
35 (0.6 1 0.05)
36 (3 1 0.05)
37);
38
39blocks
40(
41 hex (0 1 3 2 8 9 11 10) (25 10 1) simpleGrading (1 1 1)
42 hex (2 3 6 5 10 11 14 13) (25 40 1) simpleGrading (1 1 1)
43 hex (3 4 7 6 11 12 15 14) (100 40 1) simpleGrading (1 1 1)
44);
45
46edges
47(
48);
49
50boundary
51(
52 inlet
53 {
54 type patch;
55 faces
56 (
57 (0 8 10 2)
58 (2 10 13 5)
59 );
60 }
61 outlet
62 {
63 type patch;
64 faces
65 (
66 (4 7 15 12)
67 );
68 }
69 bottom
70 {
71 type symmetryPlane;
72 faces
73 (
74 (0 1 9 8)
75 );
76 }
77 top
78 {
79 type symmetryPlane;
80 faces
81 (
82 (5 13 14 6)
83 (6 14 15 7)
84 );
85 }
86 obstacle
87 {
88 type patch;
89 faces
90 (
91 (1 3 11 9)
92 (3 4 12 11)
93 );
94 }
95);
96
97mergePatchPairs
98(
99);
100
101// ************************************************************************* //
3.2.3 Running the case
The case approaches a steady-state at some time after 10 . The results for pressure at 2 are shown in Figure 3.5. The results clearly show discontinuities in pressure, i.e. shock waves, emanating from ahead of the base of the step.
3.2.4 Exercise
The user can examine the effect on the solution of increasing the inlet velocity.