All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Simulation of a backward facing step in OpenFOAM The project demonstrates importance of grading factor while meshing in CFD numerical simulation. Geometry for analysis:- In order to develop this geometry to be solved in openFoam, 3 blocks were made and meshed using blockMesh. The blocks created is described below:-…
Vipul Anand
updated on 14 Apr 2021
Simulation of a backward facing step in OpenFOAM
The project demonstrates importance of grading factor while meshing in CFD numerical simulation.
Geometry for analysis:-
In order to develop this geometry to be solved in openFoam, 3 blocks were made and meshed using blockMesh. The blocks created is described below:-
in order to apply variable grid spacing, growth factor in the blockMeshDict file has been applied.
The numerical analysis is done with the following changing grid spacing factor of 0.1, 0.2, 0.4, 0.8, 1.
The grid spacing is applied in such a way to increase the no. of grid points in the corner point.
Setting up the Simulation:-
In order to simulate the problem, tutorial file from incompressible flow is taken and modified. The modified files are, blockMeshDict, controlDict, transportProperties and initial condition values in folder named 0.
The boundary definitions used in the simulation is as follows:-
The blockMeshDict file:-
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 1;
vertices
(
(0 0 0) //0
(0.01 0 0) //1
(0.01 0.12 0) //2
(0 0.12 0) //3
(0.02 0 0) //4
(0.02 0.12 0) //5
(0.02 0.2 0) //6
(0.01 0.2 0) //7
(0 0 0.001) //8
(0.01 0 0.001) //9
(0.01 0.12 0.001) //10
(0 0.12 0.001) //11
(0.02 0 0.001) //12
(0.02 0.12 0.001) //13
(0.02 0.2 0.001) //14
(0.01 0.2 0.001) //15
);
blocks
(
hex (0 1 2 3 8 9 10 11) (20 200 1) simpleGrading (1 1 1)
hex (1 4 5 2 9 12 13 10) (20 200 1) simpleGrading (1 1 1)
hex (2 5 6 7 10 13 14 15) (20 200 1) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
Inlet
{
type patch;
faces
(
(7 15 14 6)
);
}
Outlet
{
type patch;
faces
(
(1 4 12 9)
(0 1 9 8)
);
}
frontAndBack
{
type empty;
faces
(
(2 5 6 7)
(1 4 5 2)
(0 1 2 3)
(10 13 14 15)
(9 12 13 10)
(8 9 10 11)
);
}
top
{
type wall;
faces
(
(5 13 14 6)
(4 12 13 5)
);
}
bottom
{
type wall;
faces
(
(0 8 11 3)
(2 10 15 7)
);
}
side
{
type wall;
faces
(
(3 11 10 2)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
the controlDict file:-
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1;
deltaT 0.00005;
writeControl timeStep;
writeInterval 10;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
// ************************************************************************* //
transportProperties for Kinematic Viscosity:-
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
nu [0 2 -1 0 0 0 0] 1.48e-5;
// ************************************************************************* //
pressure initial Condition:-
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
Inlet
{
type zeroGradient;
}
Outlet
{
type fixedValue;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
side
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
Velocity Boundary Condition :-
Inlet has uniform velocity of 1 m/s in the negative y direction.
top, bottom and side boundary has no slip condition, their velocity is kept zero.
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
Inlet
{
type fixedValue;
value uniform (0 -1 0);
}
Outlet
{
type zeroGradient;
}
top
{
type noSlip;
}
bottom
{
type noSlip;
}
side
{
type noSlip;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
The Mesh in the cornor area for different grading factor along with its implementations are :-
for grading factor 1:-
blocks
(
hex (0 1 2 3 8 9 10 11) (20 200 1) simpleGrading (1 1 1)
hex (1 4 5 2 9 12 13 10) (20 200 1) simpleGrading (1 1 1)
hex (2 5 6 7 10 13 14 15) (20 200 1) simpleGrading (1 1 1)
);
for grading factor 0.8:-
blocks
(
hex (0 1 2 3 8 9 10 11) (20 200 1) simpleGrading (0.8 0.8 1)
hex (1 4 5 2 9 12 13 10) (20 200 1) simpleGrading (1.25 0.8 1)
hex (2 5 6 7 10 13 14 15) (20 200 1) simpleGrading (1.25 1.25 1)
);
for grading factor 0.4:-
blocks
(
hex (0 1 2 3 8 9 10 11) (20 200 1) simpleGrading (0.4 0.4 1)
hex (1 4 5 2 9 12 13 10) (20 200 1) simpleGrading (2.5 0.4 1)
hex (2 5 6 7 10 13 14 15) (20 200 1) simpleGrading (2.5 2.5 1)
);
for grading factor 0.2:-
blocks
(
hex (0 1 2 3 8 9 10 11) (20 200 1) simpleGrading (0.2 0.2 1)
hex (1 4 5 2 9 12 13 10) (20 200 1) simpleGrading (5 0.2 1)
hex (2 5 6 7 10 13 14 15) (20 200 1) simpleGrading (5 5 1)
);
for grading factor 0.1:-
blocks
(
hex (0 1 2 3 8 9 10 11) (20 200 1) simpleGrading (0.1 0.1 1)
hex (1 4 5 2 9 12 13 10) (20 200 1) simpleGrading (10 0.1 1)
hex (2 5 6 7 10 13 14 15) (20 200 1) simpleGrading (10 10 1)
);
Results:-
From the plot is can be easily be seen that, there is very less variation in velocity magnitude with grading factor where the mesh is fine, at around 0.01m along the line of interest.
Whereas, the velocity magnitude varies at around the top surface around 0.014 and beyond.
The behaviour can easily be understood by the fact of grid independence. At around x = 0.1, the grid points are already so near to each other. While simulation, with varying grid factor, that region was always with refined grid points.
At the top surface around 0.014 (in line of interest) and beyond, the grid spacing changed and the grid was course, so there are variotions in the results.
It is worth noting that, for those parts of the geometry, where, more accuracy is needed, the grid points must be refined. Since, no. of grid points have a huge effect on simulation time, So grading factor can help a lot in controling grid spacing at desired places. While, the areas where more tolerace can be allowed, the grid can be coarse.
The coarse grid mesh requires less time for running the simulation as compared to finer grid. So grid factor can help in saving simulation resourse without comprimising with the quality of solution.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Senstivity Analysis - GRI Mechanism
Introduction: Sensitivity analysis given an overview of magnitude of variation of an independent variable over dependent variable. It is the study that helps in investigation of factors that has the potential to alter the given outcome. Since our study is focussed on the chemical reactions, the reactants and their initial…
04 Jul 2022 02:31 PM IST
FULL HYDRO case set up (PFI)
Objective:- Simulate PFI - engine in Converge CFD Geometry The prepared geometry from the previous section has been used in the present simulation. Simulation Type of Simulation Crank angle-based IC engine simulation The given parameters were, RPM of 3000 Connecting rod of length 0.18m Stroke of length 0.09m…
04 Jul 2022 02:25 PM IST
Simulation of Flat Plate Heat Sink
Detailed Objectives and Motivation Flat plate heats sinks are most common cooling solution for low to medium heat dissipating electronic equipment. Its ease in manufacturing attracts diverse range of material selection with required thermal properties. Selection of material is not the only part and parcel in manufacturing…
04 Jul 2022 02:24 PM IST
Simulation of Flow over a Cylinder and Explaining the phenomenon of Karman Vortex Street
Project Report - Flow over a Cylinder Introduction Flow past object, has been a topic of interest since long time. The phenomenon is very common in engineering designs. The complex nature of physics and behaviour of transport phenomenon around the object is still being actively studied. The nature of flow changes at critical…
04 Jul 2022 01:49 PM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.