Supersonic flow over a forward-facing step

2.2 Supersonic flow over a forward-facing step

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:

  • supersonic flow;

2.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 2.4
\relax \special {t4ht=

Figure 2.4: Geometry of the forward step geometry


Governing equations
 
  • Mass continuity
    ∂ρ-+  ∇∙(ρU ) = 0
∂t
           \relax \special {t4ht=
    (2.6)

  • Ideal gas
    p = ρRT
           \relax \special {t4ht=
    (2.7)

  • Momentum equation for Newtonian fluid
    ∂ρU
-----+ ∇ ∙(ρUU  ) - ∇ ∙μ ∇U  =  - ∇p
 ∂t
           \relax \special {t4ht=
    (2.8)

  • Energy equation for fluid (ignoring some viscous terms), e = CvT  \relax \special {t4ht=, with Fourier’s Law q = - k∇T  \relax \special {t4ht=
                         (    )
∂ρe-+ ∇ ∙(ρUe ) - ∇ ∙  -k-  ∇e =  p∇ ∙U
 ∂t                    Cv
           \relax \special {t4ht=
    (2.9)

Initial conditions
U  = 0 m ∕s  \relax \special {t4ht=, p = 1 Pa  \relax \special {t4ht=, T =  1 K  \relax \special {t4ht=.
Boundary conditions
 
  • Inlet (left) with fixedValue for velocity U = 3 m ∕s = Mach  3  \relax \special {t4ht=, pressure p =  1 Pa  \relax \special {t4ht= and temperature T  = 1 K  \relax \special {t4ht=;
  • Outlet (right) with zeroGradient on U  \relax \special {t4ht=, p  \relax \special {t4ht= and T  \relax \special {t4ht=;
  • No-slip adiabatic wall (bottom);
  • Symmetry plane (top).
Transport properties
 
  • Dynamic viscosity of air μ =  18.1μPas  \relax \special {t4ht=
Thermodynamic properties
 
  • Specific heat at constant volume Cv  = 1.78571 J∕kgK  \relax \special {t4ht=
  • Gas constant R  = 0.714286 J∕kgK  \relax \special {t4ht=
  • Conductivity k =  32.3 μW  ∕mK  \relax \special {t4ht=
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     √ -----
c =   γRT  =  1 m∕s  \relax \special {t4ht=, the consequence being that the velocities are directly equivalent to the Mach number, e.g. the inlet velocity of 3 m ∕s  \relax \special {t4ht= is equivalent to Mach 3. This speed of sound calculation can be verified using the relationship for a perfect gas, Cp - Cv  = R  \relax \special {t4ht=, i.e. the ratio of specific heats

              R
γ = Cp ∕Cv =  ---+ 1
              Cv
\relax \special {t4ht=
(2.10)

2.2.2 Mesh generation

The mesh used in this case is relatively simple, specified with uniform rectangular cells of length 0.06 m  \relax \special {t4ht= in the x  \relax \special {t4ht= direction and 0.05 m  \relax \special {t4ht= in the y  \relax \special {t4ht= 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:

1  /*--------------------------------*- C++ -*----------------------------------*\
2  | =========                 |                                                 |
3  | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
4  |  \\    /   O peration     | Version:  plus                                  |
5  |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
6  |    \\/     M anipulation  |                                                 |
7  \*---------------------------------------------------------------------------*/
8  FoamFile
9  {
10      version     2.0;
11      format      ascii;
12      class       dictionary;
13      object      blockMeshDict;
14  }
15  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16  
17  convertToMeters 1;
18  
19  vertices
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  
39  blocks
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  
46  edges
47  (
48  );
49  
50  boundary
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  
97  mergePatchPairs
98  (
99  );
100  
101  // ************************************************************************* //

2.2.3 Running the case

The case approaches a steady-state at some time after 10 s  \relax \special {t4ht=. The results for pressure at 2 s  \relax \special {t4ht= are shown in Figure 2.5. The results clearly show discontinuities in pressure, i.e. shock waves, emanating from ahead of the base of the step.


\relax \special {t4ht=


Figure 2.5: Shock fronts in the forward step problem


2.2.4 Exercise

The user can examine the effect on the solution of increasing the inlet velocity.