Simulation of Flow through a pipe in OpenFoam(Wedge BC).
Comparative Analysis of Symmetry and wedge Boundary condition and its validation with Hagon-Poiseuille Equations.
The matlab code for all the above conditions remains the same except changing angle theta. The simulation is first performed with wedge boundary condition replacing symmetry boundary conditions. The simulation time with wedge boundary condition is less compared to symmetry boundary condition, but limitation with wedge BC is that we can not go beyond 5 degree of theta angle.
The Boundary conditions are:
/*--------------------------------*- 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;
}
front
{
type wedge;
}
back
{
type wedge;
}
top
{
type zeroGradient;
}
axis
{
type empty;
}
}
// ************************************************************************* //
/*--------------------------------*- 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 (0.0672 0 0);
}
outlet
{
type zeroGradient;
}
front
{
type wedge;
}
back
{
type wedge;
}
top
{
type noSlip;
}
axis
{
type empty;
}
}
// ************************************************************************* //
The symmetry conditions are used for other different angles, so to avoid repetition MATLAB code is not presented below. I feel that result comparison is most important part of this challenge, so I am presenting those directly.
Velocity Profiles:
1. Wedge
2. Symmetry_10Degrees
3. Symmetry_25Degrees
3. Symmetry_45Degrees
Result Table:
| Sr. No. | Parameter | Wedge | Symmetry_10 | Symmetry_25 | Symmetry_45 |
| 1 | Velocity | 0.13321 | 0.133232 | 0.133346 | 0.133588 |
| error | 0.8854 | 0.869 | 0.78422 | 0.6042 | |
| 2 | Pressure | 0.5555 | 0.55777 | 0.58099 | 0.64329 |
| error | 1.078 | 1.481 | 4.38734 | 13.64 |
Observations:
1. The parabolic profile is maintained irrespective of the angle of wedge.
2. The velocity is almost constant with all the wedge angles.
3. Error is decreasing with the wedge angle.
4. Pressure drop is increasing with wedge angle.
5. Wedge boundary condition instead of symmetry saves the simulation time.