All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Objective: To simulate an incompressible-laminar-viscous flow through the backward facing step geometry. To perform a transient simulation. The solver can be chosen based on the described physics of the flow. To explain the entire simulation procedure (how you set up the case). Procedure: To choose the solve To Set up…
Sayan Chatterjee
updated on 14 Mar 2024
Objective:
To simulate an incompressible-laminar-viscous flow through the backward facing step geometry.
To perform a transient simulation. The solver can be chosen based on the described physics of the flow.
To explain the entire simulation procedure (how you set up the case).
Procedure:
Since the flow is incompressible and laminar . Also the flow is of low reynolds number, the solver chosen is icoFoam.
Using the PISO algorithm , the incompressible laminar flow is solved.
The general approach to set up the case is to create a copy of the files of the icoFoam solver and create a different folder .
The Run folder inside FOAM_RUN contains all the copied folders.
To create the geometry, the blockMeshDict file needs to be edited. The general idea of blockMesh is we define the geometry by set of blocks.
The origin of the geometry is nominated as 0 (0 0 0). The file is written in a C++ language.
The geometry can be simplified to create the co ordinates. It can be considered as two sets of five blocks, Joined together as front and back starting from index 0. To create the first block:
hex(0 1 2 3 11 12 1 3 14)(1 1 1) simplegrading(1 1 1)
In the above command, hex detremines the mesh. Here hexahedral mesh is done. It should be noted that the indexing of the block is done in cyclic order (whatever may be) If not followed, the solution will cxrash.
The (1 1 1) denotes the no of grids in x ,y and z direction. Since this is a 2D analysis, it is immamterial to provide meshing in the z direction , or to increase the grid points in the z direction.
The simple grading refers to mesh stretching. That is to stretch the mesh in a particular direction. This is nessecary to achieve good computational efficiency.
The formula to calculate grading factor is : f = size of end cell/(size of first cell). So if the grading factor is 0.1, the end cell will be one tenth of the first cell.
To check the blockmeshDict to see if the blocks are genberated in a proper way or not, blockMesh command is used. To check the mesh, checkMesh is used. After that icoFoam solver is used to perform the simulation.
The blockMeshDict for the grading factor 0.2 is pasted along below.
Boundary conditions:
The boundary condition in openFoam is given to faces . Here it is called patch. The boundary faces are : 1) Inlet 2) No slip boundaries 3) Outlet.
The inlet and outlet are type: patch. This is a dictionary. The no slip boundaries are type walls.
The blockMeshDict file is pasted below
/*--------------------------------*- 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 0.1;
vertices
(
(0 0 0) //0
(8 0 0) //1
(8 0.5 0) //2
(0 0.5 0) //3
(8 1 0) //4
(0 1 0) //5
(20 1 0) //6
(20 0.5 0) //7
(20 0 0) //8
(20 -1 0)//9
(8 -1 0) //10
(0 0 1) //11
(8 0 1) //12
(8 0.5 1)//13
(0 0.5 1)//14
(8 1 1) //15
(0 1 1) //16
(20 1 1) //17
(20 0.5 1) //18
(20 0 1) //19
(20 -1 1) //20
(8 -1 1) //21
);
blocks
(
hex (0 1 2 3 11 12 13 14) (80 10 1) simpleGrading (0.2 5 1)
hex (3 2 4 5 14 13 15 16) (80 10 1) simpleGrading (0.2 0.2 1)
hex (2 7 6 4 13 18 17 15) (120 10 1) simpleGrading (0.2 0.2 1)
hex (1 8 7 2 12 19 18 13) (120 10 1) simpleGrading (5 5 1)
hex (10 9 8 1 21 20 19 12) (120 20 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)
);
}
noSlipWalls
{
type wall;
faces
(
(15 4 5 16)
(17 6 4 15)
(10 21 12 1)
(11 0 1 12)
(21 10 9 20)
);
}
frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(3 5 4 2)
(10 1 8 9)
(1 2 7 8)
(2 4 6 7)
(11 12 13 14)
(14 13 15 16)
(21 20 19 12)
(12 19 18 13)
(13 18 17 15)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
/*--------------------------------*- 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;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linear;
}
laplacianSchemes
{
default Gauss linear orthogonal;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default orthogonal;
}
// ************************************************************************* //
Mesh generation:
The grid generation can be visualized as, near the edges , a grading factor of 0.2 is applied. this means that near the edge, the size of gris is 0.2 times the size of the cell at the beginning.
The plot over line shows a parabolic profile . The location of the plot over line is y=0.85 meters.
For grading factor 1 ,
The blockmeshDict file is :
The simplegrading(1 1 1) denotes a grading factor of 1.
/*--------------------------------*- 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 0.1;
vertices
(
(0 0 0) //0
(8 0 0) //1
(8 0.5 0) //2
(0 0.5 0) //3
(8 1 0) //4
(0 1 0) //5
(20 1 0) //6
(20 0.5 0) //7
(20 0 0) //8
(20 -1 0)//9
(8 -1 0) //10
(0 0 1) //11
(8 0 1) //12
(8 0.5 1)//13
(0 0.5 1)//14
(8 1 1) //15
(0 1 1) //16
(20 1 1) //17
(20 0.5 1) //18
(20 0 1) //19
(20 -1 1) //20
(8 -1 1) //21
);
blocks
(
hex (0 1 2 3 11 12 13 14) (80 10 1) simpleGrading (1 1 1)
hex (3 2 4 5 14 13 15 16) (80 10 1) simpleGrading (1 1 1)
hex (2 7 6 4 13 18 17 15) (120 10 1) simpleGrading (1 1 1)
hex (1 8 7 2 12 19 18 13) (120 10 1) simpleGrading (1 1 1)
hex (10 9 8 1 21 20 19 12) (120 20 1) simpleGrading (1 1 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)
);
}
noSlipWalls
{
type wall;
faces
(
(15 4 5 16)
(17 6 4 15)
(10 21 12 1)
(11 0 1 12)
(21 10 9 20)
);
}
frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(3 5 4 2)
(10 1 8 9)
(1 2 7 8)
(2 4 6 7)
(11 12 13 14)
(14 13 15 16)
(21 20 19 12)
(12 19 18 13)
(13 18 17 15)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
Results for grading factor 1:
The grids are uniform, since the grading factor is 1.
The velovcity profile obtained is parabolic. The plot over line is created at an location of y =0.85 meters.
Conclusion:
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...
Week 8 - Simulation of a backward facing step in OpenFOAM
Objective: To simulate an incompressible-laminar-viscous flow through the backward facing step geometry. To perform a transient simulation. The solver can be chosen based on the described physics of the flow. To explain the entire simulation procedure (how you set up the case). Procedure: To choose the solve To Set up…
14 Mar 2024 12:12 PM IST
Week 11- Broadband Noise modelling over Ahmed body
Introduction: The Ahmed body is a geometric shape proposed by Ahmed and ram in 1984. The shape provides a model to study geometric effect on wakes of ground vehicles. The Ahmed Body was first created by S.R. Ahmed in his research “Some Salient Features of the Time-Averaged Ground Vehicle Wake” in 1984.…
16 Aug 2021 06:54 PM IST
Week 8- Moving zones approach in Fluent
There are two types of motion encountered in fluid flow, they are rectilinear and rotary. There are two approaches to model rotary motion: Moving reference frame Moving mesh appraoch. Moving refernce frame: A Moving Reference Frame (MRF) is a relatively simple, robust, and efficient steady-state, Computational fluid…
22 Jul 2021 07:43 PM IST
Week 5 - Turbulence modelling challenge
Turbulence : Introduction: Turbulence is an irregular motion which in general makes its appearwnce in fluids, gases or liquids, when they flow past solid surfaces or even when neighbouring streams of same flow past or over one another. Turbulent fluid motion is an irregular condition of flow in which various quantities…
20 Jul 2021 09:30 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.