All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Aim : To simulate the flow of water in a curved pipe using snappyhexmesh in openfoam Geometry in Meshlab : The different .stl files can be viewed in Meshlabs and the identification of refinement zones would become easy . Input data: velocity of water at the pipe inlet = 7m/sec at 25 deg blockMeshDict File : FoamFile…
RAJAMAHANTI HARSHITH
updated on 02 Jun 2021
Aim : To simulate the flow of water in a curved pipe using snappyhexmesh in openfoam
Geometry in Meshlab :
The different .stl files can be viewed in Meshlabs and the identification of refinement zones would become easy .
Input data:
velocity of water at the pipe inlet = 7m/sec at 25 deg
blockMeshDict File :
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object blockMeshDict;
}
vertices (
(-0.2725 -0.45512927 -0.45512927)
(-0.2725 -0.45512927 0.45512927)
(4.2725 -0.45512927 0.45512927)
(4.2725 -0.45512927 -0.45512927)
(-0.2725 0.45512927 -0.45512927)
(-0.2725 0.45512927 0.45512927)
(4.2725 0.45512927 0.45512927)
(4.2725 0.45512927 -0.45512927)
(-0.2725 -0.91025853 -0.91025853)
(-0.2725 -0.91025853 0.91025853)
(4.2725 -0.91025853 0.91025853)
(4.2725 -0.91025853 -0.91025853)
(-0.2725 0.91025853 -0.91025853)
(-0.2725 0.91025853 0.91025853)
(4.2725 0.91025853 0.91025853)
(4.2725 0.91025853 -0.91025853)
);
blocks (
hex (0 1 2 3 4 5 6 7) (10 200 10) simpleGrading (1.0 1.0 1.0)
hex (1 0 3 2 9 8 11 10) (10 200 10) simpleGrading (1.0 1.0 1.0)
hex (5 1 2 6 13 9 10 14) (10 200 10) simpleGrading (1.0 1.0 1.0)
hex (4 5 6 7 12 13 14 15) (10 200 10) simpleGrading (1.0 1.0 1.0)
hex (0 4 7 3 8 12 15 11) (10 200 10) simpleGrading (1.0 1.0 1.0)
);
edges (
arc 0 1 (-0.2725 -0.5382704 0.0)
arc 1 5 (-0.2725 0.0 0.5382704)
arc 4 5 (-0.2725 0.5382704 0.0)
arc 0 4 (-0.2725 0.0 -0.5382704)
arc 3 2 (4.2725 -0.5382704 0.0)
arc 2 6 (4.2725 0.0 0.5382704)
arc 7 6 (4.2725 0.5382704 0.0)
arc 3 7 (4.2725 0.0 -0.5382704)
arc 8 9 (-0.2725 -1.2873 0.0)
arc 9 13 (-0.2725 0.0 1.2873)
arc 12 13 (-0.2725 1.2873 0.0)
arc 8 12 (-0.2725 0.0 -1.2873)
arc 11 10 (4.2725 -1.2873 0.0)
arc 10 14 (4.2725 0.0 1.2873)
arc 15 14 (4.2725 1.2873 0.0)
arc 11 15 (4.2725 0.0 -1.2873)
);
boundary (
inlet
{
type patch;
faces (
(1 5 4 0)
(5 13 12 4)
(4 12 8 0)
(0 8 9 1)
(1 9 13 5)
);
}
outlet
{
type patch;
faces (
(3 7 6 2)
(6 14 10 2)
(2 10 11 3)
(3 11 15 7)
(7 15 14 6)
);
}
boundaries
{
type wall;
faces (
(13 14 15 12)
(12 15 11 8)
(8 11 10 9)
(9 10 14 13)
);
}
);
SnappyHexMesh file :
FoamFile
{
version 2.0;
class dictionary;
format ascii;
location "system";
object snappyHexMeshDict;
}
castellatedMesh true;
snap true;
addLayers false;
geometry
{
inlet.stl
{
type triSurfaceMesh;
simflowType stl;
name inlet;
includedAngle 120.0;
}
outlet.stl
{
type triSurfaceMesh;
simflowType stl;
name outlet;
includedAngle 120.0;
}
s_pipe.stl
{
type triSurfaceMesh;
simflowType stl;
name s_pipe;
includedAngle 120.0;
faceGroups
{
inlet
{
name s_pipe;
}
wall
{
name s_pipe;
}
outlet
{
name s_pipe;
}
}
}
wall.stl
{
type triSurfaceMesh;
simflowType stl;
name wall;
includedAngle 120.0;
}
}
castellatedMeshControls
{
locationInMesh (0.0 0.0 -0.25);
refinementSurfaces
{
inlet
{
level ( 0 0 );
patchInfo
{
type wall;
}
}
outlet
{
level ( 0 0 );
patchInfo
{
type wall;
}
}
wall
{
level ( 0 0 );
patchInfo
{
type wall;
}
}
}
refinementRegions
{
}
limitRegions
{
}
features
(
{
file "inlet.eMesh";
levels ((0 0));
}
{
file "outlet.eMesh";
levels ((0 0));
}
{
file "wall.eMesh";
levels ((0 0));
}
);
maxLocalCells 1000000;
maxGlobalCells 10000000;
nCellsBetweenLevels 1;
maxLoadUnbalance 0.1;
minRefinementCells 10;
resolveFeatureAngle 30.0;
allowFreeStandingZoneFaces true;
}
snapControls
{
tolerance 10.0;
nSmoothPatch 3;
nSolveIter 500;
nRelaxIter 5;
nFeatureSnapIter 10;
implicitFeatureSnap true;
explicitFeatureSnap true;
multiRegionFeatureSnap true;
nFaceSplitInterval 5;
}
addLayersControls
{
layers
{
}
relativeSizes true;
minThickness 0.1;
firstLayerThickness 0.2;
expansionRatio 1.25;
nGrow 0;
featureAngle 180.0;
maxFaceThicknessRatio 0.5;
nSmoothSurfaceNormals 5;
nSmoothThickness 10;
minMedialAxisAngle 90.0;
maxThicknessToMedialRatio 0.5;
nMedialAxisIter 100;
nSmoothNormals 3;
slipFeatureAngle 30.0;
nRelaxIter 5;
nBufferCellsNoExtrude 0;
nLayerIter 50;
nRelaxedIter 20;
detectExtrusionIsland true;
}
meshQualityControls
{
maxNonOrtho 65.0;
maxBoundarySkewness 20.0;
maxInternalSkewness 4.0;
maxConcave 80.0;
minVol 1.0E-14;
minTetQuality 1.0E-20;
minArea -1.0;
minTwist 0.02;
minTriangleTwist -1.0;
minDeterminant 0.01;
minFaceWeight 0.05;
minVolRatio 0.01;
minVolCollapseRatio 0.1;
nSmoothScale 4;
errorReduction 0.75;
relaxed
{
maxNonOrtho 75.0;
}
}
mergeTolerance 1.0E-6;
debug 0;
The mesh is generated by the snappyhexmesh and is ready to undergo for solving
Geometry in paraview :
Mesh generated by snappyhex :
Mesh refinement and adding layers :
The first layer thickness and minimum thickness is modified to obtain the desired mesh refinement. And for the different stl files we can refine the mesh so that the wall boundaries and cruitial regions are refined.
Turbulence model choosen:
The Y+ plus value is calculated based on that the turbulence model is choosen. The calculated Y+ value is in the range of 20< Y+ <200 so k-Epsilon model is choosen.
k-w sst can also be choosen if results to be obtained on the wall boundaries are our priority.
Output files:
velocity contour :
The 3 D geometry is cut by taking a section plane and the velocity contour is plotted.
The vector field of velocity is plotted to examine how the velocity changes at the curves of the pipe.
pressure contour :
The pressure drop can be calculated by taking the pressure difference at the inlet and the outlet.
conclusion :
The velocity and pressure contours are plotted and the simulation is performed by using snappyHexMesh in openfoam
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...
3D simulation of water in a curved pipe using snappyhexmesh in openfoam
Aim : To simulate the flow of water in a curved pipe using snappyhexmesh in openfoam Geometry in Meshlab : The different .stl files can be viewed in Meshlabs and the identification of refinement zones would become easy . Input data: velocity of water at the pipe inlet = 7m/sec at 25 deg blockMeshDict File : FoamFile…
02 Jun 2021 04:49 AM IST
2D simulation of flow over a square obstacle using openfoam
Aim : To calculate velocity contour and dragforce on a square obstacle placed in the air field and to automate the simulation process in openfoam Geometry : The geometry is created by blockMeshDict file in Openfoam. Input data : velocity at inlet = 10 m/sec Temperature at inlet = 25 deg c Reynolds number= Re…
01 Jun 2021 10:59 PM IST
Emission characterization on a CAT3410 engine
Emission Characterization on a CAT3410 Engine Aim: To run the simulation for emission characterization on a CAT3410 Engine. Objective: To run the simulation for emission characterization on a CAT3410 engine for two different piston profiles (i.e. Open-w,…
11 Apr 2021 09:06 PM IST
FINAL TEST
Q1. What is the Compression ratio for the engine? From the Volume vs Crank Angle Plot Here the maximum volume is = 0.0005738 and the minimum volume is = 5.7032 e-5 m^3 And the compression ratio is Maximum Volume / Minimum Volume = 0.0005738 / 5.7032e-5 = 10.06 Q2. Modify the compression ratio for this…
09 Apr 2021 11:25 PM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.