Nabla Logo programmer
  Advanced Search
  
  Send us a comment/query
 
  Back to main web site
 
  OpenFOAM guides
  - User guide
  - Programmer’s guide
 
  Index
 
  Changes from OpenFOAM 2.2 to 2.3
 
  Trademarks in the guides
  ©2000-2007 Nabla Ltd.

3.3 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;

3.3.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.7
    Inlet: Ux = Mach  3, p = 1 N/m2




1.0

      y
               0.2
       x

        0.6                        2.4
                                Dimensions--in-m-
\special {t4ht=

Figure 3.7: Geometry of the forward step geometry


Governing equations
 
  • Mass continuity
    @r-+  \~/  • (rU) = 0
@t
                                                                          

                                                                          
           \special {t4ht=
    (3.9)

  • Ideal gas
    p = rRT
           \special {t4ht=
    (3.10)

  • Momentum equation for Newtonian fluid
    @rU--+  \~/  • (rUU)  -  \~/  •m\ ~/ U = -  \~/ p
 @t
           \special {t4ht=
    (3.11)

  • Energy equation for fluid (ignoring some viscous terms), e = CvT  \special {t4ht=, with Fourier’s Law q = - k \~/ T  \special {t4ht=
                          (    )
@re-    •            •  -k-            •
@t  +  \~/   (rUe) -   \~/    Cv    \~/ e = p \~/   U
           \special {t4ht=
    (3.12)

Initial conditions
U  = 0 m/s  \special {t4ht=, p = 1 Pa  \special {t4ht=, T =  1 K  \special {t4ht=.
Boundary conditions
 
  • Inlet (left) with fixedValue for velocity U = 3 m/s  = Mach  3  \special {t4ht=, pressure p =  1 Pa  \special {t4ht= and temperature T  = 1 K  \special {t4ht=;
  • Outlet (right) with zeroGradient on U  \special {t4ht=, p  \special {t4ht= and T  \special {t4ht=;
  • No-slip adiabatic wall (bottom);
  • Symmetry plane (top).
Transport properties
 
  • Dynamic viscosity of air m =  18.1mPa  s  \special {t4ht=
Thermodynamic properties
 
  • Specific heat at constant volume Cv  = 1.78571 J/kg K  \special {t4ht=
  • Gas constant R  = 0.714286 J/kg K  \special {t4ht=
  • Conductivity k =  32.3 mW/m   K  \special {t4ht=
Case name
forwardStep case located in the $OpenFOAM_TUTORIALS/sonicFoam 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      V~ -----
c =   gRT  =  1 m/s  \special {t4ht=, the consequence being that the velocities are directly equivalent to the Mach number, e.g. the inlet velocity of 3 m/s  \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  \special {t4ht=, i.e. the ratio of specific heats

              R
g = Cp/Cv  =  ---+ 1
              Cv
\special {t4ht=
(3.13)

3.3.2 Mesh generation

The mesh used in this case is relatively simple, specified with uniform rectangular cells of length 0.06 m  \special {t4ht= in the x  \special {t4ht= direction and 0.05 m  \special {t4ht= in the y  \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  // The OpenFOAM Project // File: blockMeshDict
2  /*
3  -------------------------------------------------------------------------------
4   =========         | dictionary
5   \\      /         |
6    \\    /          | Name:   blockMeshDict
7     \\  /           | Family: FoamX configuration file
8      \\/            |
9      F ield         | OpenFOAM version: 2.3
10      O peration     | Product of Nabla Ltd.
11      A and          |
12      M anipulation  | Email: Enquiries@Nabla.co.uk
13  -------------------------------------------------------------------------------
14  */
15  // FoamX Case Dictionary.
16  
17  FoamFile
18  {
19      version         2.0;
20      format          ascii;
21  
22      root            "";
23      case            "";
24      instance        "";
25      local           "";
26  
27      class           dictionary;
28      object          blockMeshDict;
29  }
30  
31  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32  
33  convertToMeters 1;
34  
35  vertices
36  (
37      (0 0 -0.05)
38      (0.6 0 -0.05)
39      (0 0.2 -0.05)
40      (0.6 0.2 -0.05)
41      (3 0.2 -0.05)
42      (0 1 -0.05)
43      (0.6 1 -0.05)
44      (3 1 -0.05)
45      (0 0 0.05)
46      (0.6 0 0.05)
47      (0 0.2 0.05)
48      (0.6 0.2 0.05)
49      (3 0.2 0.05)
50      (0 1 0.05)
51      (0.6 1 0.05)
52      (3 1 0.05)
53  );
54  
55  blocks
56  (
57      hex (0 1 3 2 8 9 11 10) (25 10 1) simpleGrading (1 1 1)
58      hex (2 3 6 5 10 11 14 13) (25 40 1) simpleGrading (1 1 1)
59      hex (3 4 7 6 11 12 15 14) (100 40 1) simpleGrading (1 1 1)
60  );
61  
62  edges
63  (
64  );
65  
66  patches
67  (
68      patch inlet
69      (
70          (0 8 10 2)
71          (2 10 13 5)
72      )
73      patch outlet
74      (
75          (4 7 15 12)
76      )
77      symmetryPlane bottom
78      (
79          (0 1 9 8)
80      )
81      symmetryPlane top
82      (
83          (5 13 14 6)
84          (6 14 15 7)
85      )
86      patch obstacle
87   (
88          (1 3 11 9)
89          (3 4 12 11)
90      )
91  );
92  
93  mergePatchPairs
94  (
95  );
96  
97  // ************************************************************************* //

3.3.3 Running the case

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


                                              pressure
Shock  fronts
                                                14
                                                12

                                                10

                                                 8
                                                 6

                                                 4

                                                 2
\special {t4ht=


Figure 3.8: Shock fronts in the forward step problem


3.3.4 Exercise

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