Week 12 - Validation studies of Symmetry BC vs Wedge BC in OpenFOAM vs Analytical H.P equation
In continuation to the week 11 challenge, in this challenge we continue with the simulation of pipe flow by modeling using wedge angles of 10°, 25° and 45° using both wedge as well as symmetry boundary condition and compare the simulation results with the Hagen–Poiseuille equation.
10° wedge angle:
blockMeshDict
/*--------------------------------*- 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 1.265167e-02 -1.106878e-03)
(0 1.265167e-02 1.106878e-03)
(3 0 0)
(3 1.265167e-02 -1.106878e-03)
(3 1.265167e-02 1.106878e-03)
);
blocks
(
hex (0 3 4 1 0 3 5 2) (1000 50 1) simpleGrading (1 0.2 1)
);
edges
(
arc 1 2 (0 1.270000e-02 0)
arc 4 5 (3 1.270000e-02 0)
);
boundary
(
inlet
{
type patch;
faces
(
(0 2 1 0)
);
}
outlet
{
type patch;
faces
(
(3 4 5 3)
);
}
front
{
type wedge; //symmetry
faces
(
(0 3 5 2)
);
}
back
{
type wedge; //symmetry
faces
(
(0 1 4 3)
);
}
wall
{
type wall;
faces
(
(1 2 5 4)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
U (Velocity B.C.)
/*--------------------------------*- 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 volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (0.073804 0 0);
}
outlet
{
type zeroGradient;
}
front
{
type wedge; //symmetry
}
back
{
type wedge; //symmetry
}
wall
{
type noSlip;
}
axis
{
type empty;
}
}
// ************************************************************************* //
P (Pressure B.C.)
/*--------------------------------*- 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 volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}
front
{
type wedge; //symmetry
}
back
{
type wedge; //symmetry
}
wall
{
type zeroGradient;
}
axis
{
type empty;
}
}
// ************************************************************************* //
25° wedge angle:
blockMeshDict
/*--------------------------------*- 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 1.239896e-02 -2.748783e-03)
(0 1.239896e-02 2.748783e-03)
(3 0 0)
(3 1.239896e-02 -2.748783e-03)
(3 1.239896e-02 2.748783e-03)
);
blocks
(
hex (0 3 4 1 0 3 5 2) (200 50 1) simpleGrading (1 0.2 1)
);
edges
(
arc 1 2 (0 1.270000e-02 0)
arc 4 5 (3 1.270000e-02 0)
);
boundary
(
inlet
{
type patch;
faces
(
(0 2 1 0)
);
}
outlet
{
type patch;
faces
(
(3 4 5 3)
);
}
front
{
type symmetry; //wedge
faces
(
(0 3 5 2)
);
}
back
{
type symmetry; //wedge
faces
(
(0 1 4 3)
);
}
wall
{
type wall;
faces
(
(1 2 5 4)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
45° wedge angle:
blockMeshDict
/*--------------------------------*- 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 1.173327e-02 -4.860080e-03)
(0 1.173327e-02 4.860080e-03)
(3 0 0)
(3 1.173327e-02 -4.860080e-03)
(3 1.173327e-02 4.860080e-03)
);
blocks
(
hex (0 3 4 1 0 3 5 2) (1000 50 1) simpleGrading (1 1 1)
);
edges
(
arc 1 2 (0 1.270000e-02 0)
arc 4 5 (3 1.270000e-02 0)
);
boundary
(
inlet
{
type patch;
faces
(
(0 2 1 0)
);
}
outlet
{
type patch;
faces
(
(3 4 5 3)
);
}
front
{
type symmetry; //wedge
faces
(
(0 3 5 2)
);
}
back
{
type symmetry; //wedge
faces
(
(0 1 4 3)
);
}
wall
{
type wall;
faces
(
(1 2 5 4)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
Generated mesh

Velocity Profiles:
As per the theretical calculation using HP equation, the hydrodynamic length is 2.667m. The plots shown below also agree with this for
the various combinations of wedge angles and both wedge and symmetry B.Cs.






Theoretical vs Numerical Velocity Profiles:

Comparison of maximum velocity and pressure drop:
As discussed in week11 challenge, the max. velocity and pressure drop can be calculated using the HP equations as

Thus, it can be observed from the above plots that in all the cases, the max. velocity is in the vicinity of 0.14~0.15 m/s which agrees with the theoretical max. velocity.

The theoretical kinematic pressure drop is almost equal to the numerical values for wedge angle of 10deg and 25deg and there is a small difference between the theretical value and numerical value for the 45deg wedge angle.
Shear Stress:
The below plot shows the shear stress obtained by post processing the velocity data in paraview. The maximum shear stress from the plot is around 0.021 Pa whereas the max shear stress calculated theoretically is 0.02069 Pa.

Difference between symmetry and wedge boundary condition:
The result plots obtained after the simulation for the wedge and symmetry boundary conditions show that,although the wedge and symmetry boundary conditions are different in the way they are defined in OpenFOAM, however their application is similar. In our problem, they simulate the flow in a similar manner without much of a significant difference mostly because the flow is laminar in this case.