All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
OBJECTIVE : The objective of the project is to create a backward facing step using icoFoam solver to stimulate it, the analysis of the transient solver for incompressible under which cavity is used to create the vertices, blocks & boundary for the facing step. Openfoam case file is manipulated…
Aravind Subramanian
updated on 23 Oct 2019
OBJECTIVE :
The objective of the project is to create a backward facing step using icoFoam solver to stimulate it, the analysis of the transient solver for incompressible under which cavity is used to create the vertices, blocks & boundary for the facing step. Openfoam case file is manipulated to get the required result. The variation of the result by varying the mesh size using the simplegrading option is studied and explained.
PROBLEM DESCRIPTION :
The fluid flow analysis has to be performed in the cavity under icoFoam. The solver used icoFoam, normally used for low reynold number, incompressible flows.
The mesh size have to be changed 0.2, 0.5, 0.8 such that a finer mesh is created at the inlet & outlet. The velocity @ 0.085 is to be calculated for different simple grading size. Variation of the velocity for each grid size are plotted. Number of cells along X axis is 200 & Number of cells along Y axis is 10, since it is 2D flow Z axis is not considered & mesh value is taken as 1.
BOUNDARY CONDITIONS :
Inlet velocity = 2m/s.
Exit pressure is atmospheric.
A fully developed flow at the exit.
No slip condition to be used at the top & bottom surface.
Procedure
The copy a the cavity is taken in the FOAM RUN folder to execute the command. The blockMeshDict under system folder is used to change value of vertices & blocks. To view geometry created, clear out all the entries inside the boundary section of blockMeshDict file and execute the blockMesh command in the terminal, now open paraview to view it.
8
blockMeshDict File the simple grading is set at 0.8.
inlet - left side.
outlet - right side.
noslip - top & bottom side.
front & back - remaining sides.
/*--------------------------------*- C++ -*----------------------------------*\\
========= |
\\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\\\ / O peration | Website: https://openfoam.org
\\\\ / A nd | Version: 6
\\\\/ M anipulation |
\\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.01;
vertices
(
(0 0 0) //point 0
(8 0 0) //point 1
(8 0.5 0)//point 2
(0 0.5 0)//point 3
(8 1 0)//point 4
(0 1 0)//point 5
(20 1 0)//point 6
(20 0.5 0)//point 7
(20 0 0)//point 8
(20 1 0)//point 9
(8 -1 0)//point 10
(0 0 0.1)//point 11
(8 0 0.1)//point 12
(8 0.5 0.1)//point 13
(0 0.5 0.1)//point 14
(8 1 0.1)//point 15
(0 1 0.1)//point 16
(20 1 0.1)//point 17
(20 0.5 0.1)//point 18
(20 0 0.1)//point 19
(20 -1 0.05)//point 20
(8 -1 0.05)//point 21
);
blocks
(
hex (0 1 2 3 11 12 13 14) (80 10 1) simplegrading (0.8 0.8 1)
hex (3 2 4 5 14 13 15 16) (80 10 1) simplegrading (0.8 0.8 1)
hex (2 7 6 4 13 18 17 15) (120 10 1) simplegrading (1.25 0.8 1)
hex (1 8 7 2 12 19 18 13) (120 10 1) simplegrading (1.25 0.8 1)
hex (10 9 8 1 21 20 19 12) (120 10 1) simplegrading (1.25 0.8 1)
);
edges
(
);
boundary
(
inlet
{
type patch;
faces
(
(3 0 11 14)
(3 14 16 5)
);
}
outlet
{
type patch;
faces
(
(9 8 19 20)
(8 7 18 19)
(7 6 17 18)
);
}
frontAndBack
{
type empty;
faces
(
(11 14 13 12)
(14 16 15 13)
(13 15 17 18)
(12 13 18 19)
(21 12 19 20)
(3 2 1 0)
(5 4 2 3)
(10 1 8 9)
(1 2 7 8)
(2 4 6 7)
);
}
noslipwalls
{
type wall;
faces
(
(11 0 1 12)
(21 10 9 20)
(16 15 5 4)
(15 17 6 4 )
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
ControlDict file :
The simulation is set to start from zero to end at 5. The time step is selected as 2e-4 to have the CFL no < 1. CFL no = u * dt/dx
dt = time step.
u = velocity.
dx = difference in x axis step.
/*--------------------------------*- C++ -*----------------------------------*\\
========= |
\\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\\\ / O peration | Website: https://openfoam.org
\\\\ / A nd | Version: 6
\\\\/ M anipulation |
\\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location \"system\";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 5;
deltaT 2e-4;
writeControl timeStep;
writeInterval 20;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
// ************************************************************************* //
PRESSURE INITIAL CONDITIONS :
The pressure value @ outlet is set to atmospheric pressure since the pressure at outlet boundary is also equal the atmosperic pressure the gauge pressure value is set at zero.
/*--------------------------------*- C++ -*----------------------------------*\\
========= |
\\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\\\ / O peration | Website: https://openfoam.org
\\\\ / A nd | Version: 6
\\\\/ 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;
}
frontAndBack
{
type empty;
}
noslipwalls
{
type zeroGradient;
}
}
// ************************************************************************* //
VELOCITY INITIAL CONDITIONS :
The velocity @ inlet is set to 2 m/s & noslip condition is set at top & bottom walls so the velocity is not equal to zero.
/*--------------------------------*- C++ -*----------------------------------*\\
========= |
\\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\\\ / O peration | Website: https://openfoam.org
\\\\ / A nd | Version: 6
\\\\/ 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 (2 0 0);
}
outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
noslipwalls
{
type noSlip;
}
}
// ************************************************************************* //
IcoFoam command is used to run the post processor for this program. Then to open paraview paraFoam command is used. The wire frame option is used to capture the figure, then click on the filters, expand the data analysis group to choose plot over line option. To extract the plot data to an Excel file, click the file option in the toolbar and select the “Export Scene” option & name the output document and save it.
GRADING FACTOR
Depending the mesh size to be created the value in the simple grading is changed.
simple grading f = size of end cell/ size of start cell. This is used to refine the mesh at certain locations, we need to find value @ diatance of 0.085 from the inlet Depending the grading value of the simplegrading is changed in the blockMeshDict file.
1. 0.2
The wireframe view of the figure :
2. 0.5
3. 0.8
4. 1
Line Plot
The slice command is used to cut the part along plane so make it a 2D part & line over plot command is used to make to velocity plot.
Grading Factor - 0.2
Grading Factor - 0.5
Grading Factor - 0.8
Velocity @ 0.085 from Inlet :
Grading Factor Velocity value Time taken(sec)
0.2 1.346 192
0.5 1.354 203
0.8 1.368 212
Inference :
From the plot of the various grading value we can see that the variation in the value is very less when compared to the simple grading change. Time taken to run the simulation is more for grade mesh @ 0.8 when compared to the other. Since the shape of the figure is very simple so mesh doesn\'t affect the values but however more finer the mesh the better will be the results & time to converge is also more for finer mesh so the plot @ 0.8 is smooth than the other mesh grade.The mesh nodes are more @ 0.085m where the step region starts flow enter the larger area & dip in the velocity due to the increase in flow area which follows continuity equation (a*v = constant, since it is incompressible flow density is not considered) . Magnitude of velocity was highest near the inlet above 2m/s the simulation results were for 1750 iterations. The maximum value of the CFL number increases as the grading factor decreases. It is excepted value since the distance between adjacent cell decreases at certain portion of the flow but the mean value of the CFL number is almost same for all grading factors. The accurate results are produced @ 0.2 grading factor this is due the higher number nodes in that region.
REFERENCE :
1. https://www.openfoam.com/documentation/user-guide/
2. http://foam.sourceforge.net/docs/Guides-a4/OpenFOAMUserGuide-A4.pdf
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 11 - Louver/Grille characterization
Aim The objective of the project is to simulate a hexa grille placed at the center of the channel for a streamline flow and do a parametric optiization of the design. Task Define a parameter to optimize the design. Define trials. Define primary and compound functions that you want to report. Calculate parametric solutions.…
20 Sep 2021 12:41 PM IST
Week 12 - Final Project - Modelling and Analysis of a Datacenter
AIM The objective of the project is to create a data center model using macros in the Icepak. The main parts of the data center are Computer room air conditioning (CRAC), server cabinets, power distribution units and perforated tiles. Analyze the flow distribution and behaviour of temperature in the server stacks. Problem…
20 Sep 2021 12:41 PM IST
Week 10 - MRF project
Aim The objective of the project is to create a MRF model by importing the model to Ansys Icepak and setup the physics & solve the thermal model. Moving Reference Frame The Moving reference frame approach is a steady state method used in CFD to model problems with rotating parts. The MRF is a moving/sliding mesh…
24 Aug 2021 05:23 PM IST
Week 9 - PCB Thermal Simulation
PCB Board A printed circuit board (PCB) mechanically supports and electrically connects electronic components using conductive tracks, pads and other features etched from one or more sheet layers of copper laminated onto and/or between sheet layers of a non conductive substrate. Components are generally…
19 Jul 2021 11:56 AM 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.