Week 8 - Simulation of a backward facing step in OpenFOAM
Aim: incompressible-laminar-viscous flow through the backward-facing step geometry.
Objectives:
- Analyze and simulate flow through the backward-facing steps.
- Creating multiple meshes - mesh grading factors: 0.2, 0.5, 0.8 and determining how the velocity magnitude profile
changes. - Measuring the velocity profile at 8.5 m from the inlet of geometry.
- Compare velocity magnitude contours near the step region for the above-mentioned grading factors.
- To understand how different quantities like velocity, pressure behaves due to sudden step.
Introduction: In this project, the flow-through backward-facing step will be simulated using icoFOAM solver which is
performed in OpenFOAM software. As a result, if the simulation, velocity, pressure profile for different mesh grading factors can be achieved. The dimensions of a given backward-facing step are below. And simulate the flow with different Garding factors.
Nature of flow: Incompressible flow
Block Mesh specification:
Number of blocks = 5
The arrangement of blocks is as follow:

It will more clearly from the below figure
Mesh Specification-
- Number of cells along the X-direction(longer dimension) = 200
- Number of cells along with the y-direction = 10
Let's code in open foam for block mashing,
/*--------------------------------*- C++ -*----------------------------------*
========= |
\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\ / O peration | Website: https://openfoam.org
\ / A nd | Version: 8
\/ M anipulation |
*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(0 0 0) //0
(0.08 0 0) //1
(0.08 0.005 0) //2
(0 0.005 0) //3
(0.08 0.01 0) //4
(0 0.01 0) //5
(0.2 0.01 0) //6
(0.2 0.005 0) //7
(0.2 0 0) //8
(0.2 -0.01 0) //9
(0.08 -0.01 0) //10
(0 0 0.001) //11
(0.08 0 0.001) //12
(0.08 0.005 0.001) //13
(0 0.005 0.001) //14
(0.08 0.01 0.001) //15
(0 0.01 0.001) //16
(0.2 0.01 0.001) //17
(0.2 0.005 0.001) //18
(0.2 0 0.001) //19
(0.2 -0.01 0.001) //20
(0.08 -0.01 0.001) // 21
);
blocks
(
hex (0 1 2 3 11 12 13 14) (80 5 1) simpleGrading (0.2 5 1)
hex (3 2 4 5 14 13 15 16) (80 5 1) simpleGrading (0.2 0.2 1)
hex (2 7 6 4 13 18 17 15) (120 5 1) simpleGrading (5 0.2 1)
hex (1 8 7 2 12 19 18 13) (120 5 1) simpleGrading (5 5 1)
hex (10 9 8 1 21 20 19 12) (120 10 1) simpleGrading (5 5 1)
);
edges
(
);
boundary
(
inlet
{
type patch;
faces
(
(0 11 14 3)
(3 14 16 5)
);
}
outlet
{
type patch;
faces
(
(9 8 19 20)
(8 7 18 19)
(7 6 17 18)
);
}
upperwalls
{
type wall;
faces
(
(5 16 15 4)
(4 15 17 6)
);
}
lowerwalls
{
type wall;
faces
(
(0 1 12 11)
(10 9 20 21)
(10 21 12 1)
);
}
frontAndBack
{
type empty;
faces
(
(3 2 1 0)
(5 4 2 3)
(4 6 7 2)
(2 7 8 1)
(1 8 9 10)
(11 12 13 14)
(14 13 15 16)
(13 18 17 15)
(12 19 18 13)
(21 20 19 12)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //