In this example we shall investigate steady turbulent flow over a backward-facing
step. The problem description is taken from one used by Pitz and Daily in an
experimental investigation [**] against which the computed solution can be
compared. This example introduces the following OpenFOAM features for the first
time:
generation of a mesh using blockMesh using full mesh grading
capability;
The domain is 2 dimensional, consisting of a short inlet, a
backward-facing step and converging nozzle at outlet as shown in Figure 3.4.
Figure 3.4:
Geometry of backward-facing step
Governing equations
Mass continuity for incompressible flow
(3.4)
Steady flow momentum equation
(3.5)
where is kinematic pressure and (in slightly over-simplistic terms)
is the viscous stress term with an effective kinematic
viscosity , calculated from selected transport and turbulence
models.
Initial conditions
, -- required in OpenFOAM input files but
not necessary for the solution since the problem is steady-state.
Boundary conditions
Inlet (left) with fixed velocity m/s;
Outlet (right) with fixed pressure ;
No-slip walls on other boundaries.
Transport properties
Kinematic viscosity of air
Turbulence model
Standard ;
Coefficients:
.
Solver name
simpleFoam: an implementation for steady incompressible
flow.
Case name
pitzDaily, located in the $OpenFOAM_TUTORIALS/simpleFoam
directory.
The problem is solved using simpleFoam, so-called as it is an implementation
for steady flow using the SIMPLE algorithm [**]. The solver has full access to all
the turbulence models in the incompressibleTurbulenceModels library and the
non-Newtonian models incompressibleTransportModels library of the standard
OpenFOAM release.
We expect that the flow in this problem is reasonably complex and an
optimum solution will require grading of the mesh. In general, the regions of
highest shear are particularly critical, requiring a finer mesh than in the
regions of low shear. We can anticipate where high shear will occur by
considering what the solution might be in advance of any calculation.
At the inlet we have strong uniform flow in the direction and, as it
passes over the step, it generates shear on the fluid below, generating
a vortex in the bottom half of the domain. The regions of high shear
will therefore be close to the centreline of the domain and close to the
walls.
The domain is subdivided into 12 blocks as shown in Figure 3.5.
Figure 3.5:
Blocks in backward-facing step
The mesh is 3 dimensional, as always in OpenFOAM, so in Figure 3.5 we are
viewing the back plane along . The full set of vertices and blocks are
given in the mesh description file below:
A major feature of this problem is the use of the full mesh grading
capability of blockMesh that is described in 6.3.1 of the User Guide. The
user can see that blocks 4,5 and 6 use the full list of 12 expansion ratios.
The expansion ratios correspond to each edge of the block, the first 4 to
the edges aligned in the local direction, the second 4 to the edges
in the local direction and the last 4 to the edges in the local
direction. In blocks 4, 5, and 6, the ratios are equal for all edges in the
local and directions but not for the edges in the direction
that corresponds in all blocks to the global . If we consider the ratios
used in relation to the block definition in 6.3.1 of the User Guide, we
realize that different gradings have been prescribed along the left and right
edges in blocks 4,5 and 6 in Figure 3.5. The purpose of this differential
grading is to generate a fine mesh close to the most critical region of
flow, the corner of the step, and allow it to expand into the rest of the
domain.
The mesh can be generated using blockMesh from the command line or from
within FoamX and viewed as described in previous examples.
The case files can be viewed, or edited from within FoamX or by hand.
In this case, we are required to set the initial and boundary fields for
velocity , pressure , turbulent kinetic energy and dissipation rate
. The boundary conditions can be specified by setting the physical
patch types in FoamX: the upper and lower walls are set to Wall, the left
patch to Inlet and the right patch to Outlet. These physical boundary
conditions require us to specify a fixedValue at the inlet on , and
. is given in the problem specification, but the values of and
must be chosen by the user in a similar manner to that described
in 2.1.8.1 of the User Guide. We assume that the inlet turbulence is
isotropic and estimate the fluctuations to be of at the inlet. We
have
(3.6)
and
(3.7)
If we estimate the turbulent length scale to be of the width of the inlet
then
The choices of fvSchemes are as follows: the timeScheme should be SteadyState;
the gradScheme and laplacianScheme should be set as default to Gauss; and, the
divScheme should be set to UD to ensure boundedness.
Special attention should be paid to the settings of fvTolerances. Although the
top level simpleFoam code contains only equations for and , the turbulent
model solves equations for , and , and tolerance settings are required for
all 5 equations. A solverTolerance of and solverRelativeTolerance of
0.1 are acceptable for all variables with the exception of when
and 0.01 are recommended. Under-relaxation of the solution is required
since the problem is steady. A relaxationFactor of 0.7 is acceptable
for , , and but 0.3 is required for to avoid numerical
instability.
Finally, in controlDict, the time step deltaT should be set to 1 since in steady
state cases such as this is effectively an iteration counter. With benefit of
hindsight we know that the solution requires 1000 iterations reach reasonable
convergence, hence endTime is set to 1000. Ensure that the writeFrequency is
sufficiently high, e.g. 50, that you will not fill the hard disk with data during run
time.
Development of a vortex in the backward-facing step.
Run the case and post-process the results. After a few iterations, e.g. 50, a vortex
develops beneath the corner of the step that is the height of the step but
narrow in the -direction as shown by the vector plot of velocities is
shown Figure 3.6(a). Over several iterations the vortex stretches in the
-direction from the step to the outlet until at 1000 iterations the system
reaches a steady-state in which the vortex is fully developed as shown in
Figure 3.6(b-c).