Validation studies of Symmetry BC vs Wedge BC in OpenFOAM vs Analytical H.P equation
Objective:
- To simulate an axisymmetric laminar flow by applying the Symmetry and wedge boundary condition for the mentioned angles i.e;
- `10^0`
- `25^0`
- `45^0`
Theory:
In nonideal fluid dynamics, the Hagen–Poiseuille equation, also known as the Hagen–Poiseuille law, Poiseuille law, or Poiseuille equation, is a physical law that gives the pressure drop in an incompressible and Newtonian fluid in laminar flow flowing through a long cylindrical pipe of the constant cross-section.

At the entrance, the flow is said to be in the hydrodynamic entrance region where the velocity profile gradually takes shape of a parabola from a straight line. As soon as the parabolic velocity profile becomes state it is said to be in its fully developed state. Hagen–Poiseuille equation, is applicable for fully developed flow to calculate pressure drop.
The pressure drop is given by;
`triangle P= (32muLV)/D^2`
where,
`triangle P` is the pressure drop
`mu` is the dynamic viscosity
'L' is the length of pipe
'V' is Velocity
Assumption made:
Geometry: Axisymmetric
Reynold's number: 2100
Working Fluid: Water
Diameter of pipe: 0.02m
PROCEDURE :
- We start with copying the cavity file from the tutorial to the FOAM_RUN folder.
- In order to run the simulation, we make required changes in the blockMeshDict file, controlDict, and in an initial folder as per the geometry for this problem.
- Here we are using Matlab code to generate the blockMeshDict file and parse it to run folder. After creating the wedge assign the boundary conditions, and also setting the simulation start and end time, and in transport properties enter the kinematic viscosity.
- Run the blockMesh command and then by using checkMesh command check the mesh. Now simulation is ready to run, run it using the icoFoam solver.
- After the simulation, use paraFoam to view the flow inside the wedge and use plot over line commands to plot the velocity and shear stress changes at a point after the hydrodynamical entry region so that we analyze the fully developed fluid region.
Case 1: For Symmetry Boundary condition:
1.1 For `10^0`:
MATLAB blockMesh file generation:
clear all
close all
clc
%Inputs
Re=2100; %Reynolds Number
rho=997; % Density of water
D=0.02; % Diameter of pipe
r= D/2;
mu=0.89*10^-3; %Dynamic Viscosity
v=0.88927*10^-6; %Kinematic Viscosity
theta=input('Enter the value of the wedge angle=')
L_h=0.06*Re*D; %hydrodynamic length
L=L_h+0.5;
%Analytical solutions
V_avg=(Re*mu)/(rho*D); %Average velocity
V_max=2*V_avg; %Maximun velocity
P_drop=(32*mu*L*V_avg)/D^2; %Pressure Drop
P_kinematic=(P_drop/rho); %Kinematic Pressure Drop
%Vertices
v0=[0 0 0]
v1=[0 r*cosd(theta/2) r*sind(theta/2)]
v2=[0 r*cosd(theta/2) -r*sind(theta/2)]
v3=[L 0 0]
v4=[L r*cosd(theta/2) r*sind(theta/2)]
v5=[L r*cosd(theta/2) -r*sind(theta/2)]
%Printing the blockMeshDict File
%writing to a file
f1=fopen('blockMeshDict_New1','wt');
%header region
fprintf(f1,'%sn','/*------------------------------------*-C++ -*-------------------------------*');
fprintf(f1,'%sn',' ========= |');
fprintf(f1,'%sn',' / F ield | OpenFOAM: The Open Source CFD Toolbox');
fprintf(f1,'%sn',' / O peration | Website: https://openfoam.org');
fprintf(f1,'%sn',' / A nd | Version: 8');
fprintf(f1,'%sn',' / M anipulation |');
fprintf(f1,'%sn','*------------------------------------------------------------------------------*/');
fprintf(f1,'%sn','FoamFile');
fprintf(f1,'%sn','{');
fprintf(f1,'%sn',' version 2.0;');
fprintf(f1,'%sn',' format ascii;');
fprintf(f1,'%sn',' class dictionary;');
fprintf(f1,'%sn',' object blockMeshDict;');
fprintf(f1,'%sn','}');
fprintf(f1,'%sn','// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //');
fprintf(f1,'n');
%initial inputs
fprintf(f1,'%s','convertToMeters 1;');
fprintf(f1,'n');
fprintf(f1, '%sn', 'vertices');
fprintf(f1,'(n');
fprintf(f1,'%s (%f %f %f)n',blanks(5),v0(1),v0(2),v0(3));
fprintf(f1,'%s (%f %f %f)n',blanks(5),v1(1),v1(2),v1(3));
fprintf(f1,'%s (%f %f %f)n',blanks(5),v2(1),v2(2),v2(3));
fprintf(f1,'%s (%f %f %f)n',blanks(5),v3(1),v3(2),v3(3));
fprintf(f1,'%s (%f %f %f)n',blanks(5),v4(1),v4(2),v4(3));
fprintf(f1,'%s (%f %f %f)n',blanks(5),v5(1),v5(2),v5(3));
fprintf(f1,');n');
fprintf(f1,'n');
%Defining the wedge block
fprintf(f1,'%sn', 'blocks');
fprintf(f1,'(n');
fprintf(f1,'%s %s n',blanks(5),'hex (0 2 1 0 3 5 4 3) (40 1 500) simpleGrading (1 1 1)');
fprintf(f1,'%s n',');');
fprintf(f1,'%s n','edges');
fprintf(f1,'( n');
fprintf(f1,'arc 1 2 (%f %f %f) n',0,r,0);
fprintf(f1,'arc 4 5 (%f %f %f) n',L,r,0);
fprintf(f1,'%s n',');');
fprintf(f1,'%s n','boundary');
fprintf(f1,'(n');
fprintf(f1,'%s %s n',blanks(5) ,'inlet');
fprintf(f1, '%s %s n',blanks(5) ,'{');
fprintf(f1,'%s %s n',blanks(10),'type patch;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',0, 1, 2, 0);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1, '%sn','outlet');
fprintf(f1,' {n');
fprintf(f1,' %sn','type patch;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',3, 4, 5, 3);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1,' %sn','wedge_front');
fprintf(f1,' {n');
fprintf(f1,' %sn','type symmetry;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',2, 5, 3, 0);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1,' %sn','wedge_back');
fprintf(f1,' {n');
fprintf(f1,' %sn','type symmetry;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',0, 3, 4, 1);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1,' %sn','top');
fprintf(f1,' {n');
fprintf(f1,' %sn','type wall;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',1, 4, 5, 2);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1,' %sn','axis');
fprintf(f1,' {n');
fprintf(f1,' %sn','type empty;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',0, 3, 3, 0);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1,' );n');
%Merging Patch pairs
fprintf(f1,'%sn','mergePatchPair');
fprintf(f1,'(n');
fprintf(f1,');n');
fprintf(f1,'// **************************************************************************//');
fclose(f1)
blockMesh File:
/*------------------------------------*-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.000000 0.000000 0.000000)
(0.000000 0.009962 0.000872)
(0.000000 0.009962 -0.000872)
(3.020000 0.000000 0.000000)
(3.020000 0.009962 0.000872)
(3.020000 0.009962 -0.000872)
);
blocks
(
hex (0 2 1 0 3 5 4 3) (40 1 500) simpleGrading (1 1 1)
);
edges
(
arc 1 2 (0.000000 0.010000 0.000000)
arc 4 5 (3.020000 0.010000 0.000000)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 4 5 3)
);
}
wedge_front
{
type symmetry;
faces
(
(2 5 3 0)
);
}
wedge_back
{
type symmetry;
faces
(
(0 3 4 1)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPair
(
);
// **************************************************************************//
Pressure file:
/*--------------------------------*- 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;
}
wedge_front
{
type symmetry;
}
wedge_back
{
type symmetry;
}
top
{
type zeroGradient;
}
axis
{
type empty;
}
}
// ************************************************************************* //
Velocity file:
/*--------------------------------*- 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.09373 0 0);
}
outlet
{
type zeroGradient;
}
wedge_front
{
type symmetry;
}
wedge_back
{
type symmetry;
}
top
{
type noSlip;
}
axis
{
type empty;
}
}
// ************************************************************************* //
controlDict:
/*--------------------------------*- 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 controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 10;
deltaT 0.005;
writeControl timeStep;
writeInterval 20;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
// ************************************************************************* //
RESULTS:
1.1 Pressure Profile:

1.2 Velocity Profile:

1.3. Velocity Plot:

1.4. Shear Stress Plot:

1.2. For `25^0`:
blockMesh file:
/*------------------------------------*-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.000000 0.000000 0.000000)
(0.000000 0.009763 0.002164)
(0.000000 0.009763 -0.002164)
(3.020000 0.000000 0.000000)
(3.020000 0.009763 0.002164)
(3.020000 0.009763 -0.002164)
);
blocks
(
hex (0 2 1 0 3 5 4 3) (40 1 500) simpleGrading (1 1 1)
);
edges
(
arc 1 2 (0.000000 0.010000 0.000000)
arc 4 5 (3.020000 0.010000 0.000000)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 4 5 3)
);
}
wedge_front
{
type symmetry;
faces
(
(2 5 3 0)
);
}
wedge_back
{
type symmetry;
faces
(
(0 3 4 1)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPair
(
);
// **************************************************************************//
1.2.1 Pressure Profile:

1.2.2 Velocity Profile:

1.2.3 Velocity Plot:

1.2.4 Shear stress Plot:

3. For `45^0``:
blockMesh file:
/*------------------------------------*-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.000000 0.000000 0.000000)
(0.000000 0.009239 0.003827)
(0.000000 0.009239 -0.003827)
(3.020000 0.000000 0.000000)
(3.020000 0.009239 0.003827)
(3.020000 0.009239 -0.003827)
);
blocks
(
hex (0 2 1 0 3 5 4 3) (40 1 500) simpleGrading (1 1 1)
);
edges
(
arc 1 2 (0.000000 0.010000 0.000000)
arc 4 5 (3.020000 0.010000 0.000000)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 4 5 3)
);
}
wedge_front
{
type symmetry;
faces
(
(2 5 3 0)
);
}
wedge_back
{
type symmetry;
faces
(
(0 3 4 1)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPair
(
);
// **************************************************************************//
1.3.1 Pressure Profile:

1.3.2 Velocity Profile:

1.3.3 Velocity Plot:

1.3.4 Shear stress Plot:

Case 2: For Wedge Boundary condition:
2.1. For `10^0`:
MATLAB blockMesh file generation:
clear all
close all
clc
%Inputs
Re=2100; %Reynolds Number
rho=997; % Density of water
D=0.02; % Diameter of pipe
r= D/2;
mu=0.89*10^-3; %Dynamic Viscosity
v=0.88927*10^-6; %Kinematic Viscosity
theta=input('Enter the value of the wedge angle=')
L_h=0.06*Re*D; %hydrodynamic length
L=L_h+0.5;
%Analytical solutions
V_avg=(Re*mu)/(rho*D); %Average velocity
V_max=2*V_avg; %Maximun velocity
P_drop=(32*mu*L*V_avg)/D^2; %Pressure Drop
P_kinematic=(P_drop/rho); %Kinematic Pressure Drop
%Vertices
v0=[0 0 0]
v1=[0 r*cosd(theta/2) r*sind(theta/2)]
v2=[0 r*cosd(theta/2) -r*sind(theta/2)]
v3=[L 0 0]
v4=[L r*cosd(theta/2) r*sind(theta/2)]
v5=[L r*cosd(theta/2) -r*sind(theta/2)]
%Printing the blockMeshDict File
%writing to a file
f1=fopen('blockMeshDict_New','wt');
%header region
fprintf(f1,'%sn','/*------------------------------------*-C++ -*-------------------------------*');
fprintf(f1,'%sn',' ========= |');
fprintf(f1,'%sn',' / F ield | OpenFOAM: The Open Source CFD Toolbox');
fprintf(f1,'%sn',' / O peration | Website: https://openfoam.org');
fprintf(f1,'%sn',' / A nd | Version: 8');
fprintf(f1,'%sn',' / M anipulation |');
fprintf(f1,'%sn','*------------------------------------------------------------------------------*/');
fprintf(f1,'%sn','FoamFile');
fprintf(f1,'%sn','{');
fprintf(f1,'%sn',' version 2.0;');
fprintf(f1,'%sn',' format ascii;');
fprintf(f1,'%sn',' class dictionary;');
fprintf(f1,'%sn',' object blockMeshDict;');
fprintf(f1,'%sn','}');
fprintf(f1,'%sn','// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //');
fprintf(f1,'n');
%initial inputs
fprintf(f1,'%s','convertToMeters 1;');
fprintf(f1,'n');
fprintf(f1, '%sn', 'vertices');
fprintf(f1,'(n');
fprintf(f1,'%s (%f %f %f)n',blanks(5),v0(1),v0(2),v0(3));
fprintf(f1,'%s (%f %f %f)n',blanks(5),v1(1),v1(2),v1(3));
fprintf(f1,'%s (%f %f %f)n',blanks(5),v2(1),v2(2),v2(3));
fprintf(f1,'%s (%f %f %f)n',blanks(5),v3(1),v3(2),v3(3));
fprintf(f1,'%s (%f %f %f)n',blanks(5),v4(1),v4(2),v4(3));
fprintf(f1,'%s (%f %f %f)n',blanks(5),v5(1),v5(2),v5(3));
fprintf(f1,');n');
fprintf(f1,'n');
%Defining the wedge block
fprintf(f1,'%sn', 'blocks');
fprintf(f1,'(n');
fprintf(f1,'%s %s n',blanks(5),'hex (0 2 1 0 3 5 4 3) (20 1 200) simpleGrading (1 1 1)');
fprintf(f1,'%s n',');');
fprintf(f1,'%s n','edges');
fprintf(f1,'( n');
fprintf(f1,'arc 1 2 (%f %f %f) n',0,r,0);
fprintf(f1,'arc 4 5 (%f %f %f) n',L,r,0);
fprintf(f1,'%s n',');');
fprintf(f1,'%s n','boundary');
fprintf(f1,'(n');
fprintf(f1,'%s %s n',blanks(5) ,'inlet');
fprintf(f1, '%s %s n',blanks(5) ,'{');
fprintf(f1,'%s %s n',blanks(10),'type patch;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',0, 1, 2, 0);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1, '%sn','outlet');
fprintf(f1,' {n');
fprintf(f1,' %sn','type patch;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',3, 4, 5, 3);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1,' %sn','wedge_front');
fprintf(f1,' {n');
fprintf(f1,' %sn','type wedge;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',2, 5, 3, 0);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1,' %sn','wedge_back');
fprintf(f1,' {n');
fprintf(f1,' %sn','type wedge;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',0, 3, 4, 1);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1,' %sn','top');
fprintf(f1,' {n');
fprintf(f1,' %sn','type wall;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',1, 4, 5, 2);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1,' %sn','axis');
fprintf(f1,' {n');
fprintf(f1,' %sn','type empty;');
fprintf(f1,' %s n','faces');
fprintf(f1,' %s n','(');
fprintf(f1,' (%d %d %d %d)n',0, 3, 3, 0);
fprintf(f1,' );n');
fprintf(f1,' }n');
fprintf(f1,' );n');
%Merging Patch pairs
fprintf(f1,'%sn','mergePatchPair');
fprintf(f1,'(n');
fprintf(f1,');n');
fprintf(f1,'// **************************************************************************//');
fclose(f1)
blockMesh file:
/*------------------------------------*-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.000000 0.000000 0.000000)
(0.000000 0.009962 0.000872)
(0.000000 0.009962 -0.000872)
(3.020000 0.000000 0.000000)
(3.020000 0.009962 0.000872)
(3.020000 0.009962 -0.000872)
);
blocks
(
hex (0 2 1 0 3 5 4 3) (20 1 200) simpleGrading (1 1 1)
);
edges
(
arc 1 2 (0.000000 0.010000 0.000000)
arc 4 5 (3.020000 0.010000 0.000000)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 4 5 3)
);
}
wedge_front
{
type wedge;
faces
(
(2 5 3 0)
);
}
wedge_back
{
type wedge;
faces
(
(0 3 4 1)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPair
(
);
// **************************************************************************//
ControlDict:
/*--------------------------------*- 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 controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 10;
deltaT 0.005;
writeControl timeStep;
writeInterval 20;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
// ************************************************************************* //
Pressure file:
/*--------------------------------*- 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;
}
wedge_front
{
type wedge;
}
wedge_back
{
type wedge;
}
top
{
type zeroGradient;
}
axis
{
type empty;
}
}
// ************************************************************************* //
Velocity file:
/*--------------------------------*- 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.09373 0 0);
}
outlet
{
type zeroGradient;
}
wedge_front
{
type wedge;
}
wedge_back
{
type wedge;
}
top
{
type noSlip;
}
axis
{
type empty;
}
}
// ************************************************************************* //
2.1.1 Pressure Profile:

2.1.2 Velocity Profile:

2.1.3 Velocity Plot for fully developed flow:

2.1.4 Shear stress Plot:

2.2. For `25^0`:
blockMesh file:
/*------------------------------------*-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.000000 0.000000 0.000000)
(0.000000 0.009763 0.002164)
(0.000000 0.009763 -0.002164)
(3.020000 0.000000 0.000000)
(3.020000 0.009763 0.002164)
(3.020000 0.009763 -0.002164)
);
blocks
(
hex (0 2 1 0 3 5 4 3) (20 1 200) simpleGrading (1 1 1)
);
edges
(
arc 1 2 (0.000000 0.010000 0.000000)
arc 4 5 (3.020000 0.010000 0.000000)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 4 5 3)
);
}
wedge_front
{
type wedge;
faces
(
(2 5 3 0)
);
}
wedge_back
{
type wedge;
faces
(
(0 3 4 1)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPair
(
);
// **************************************************************************//
2.2.1 Pressure Profile:

2.2.2 Velocity Profile:

2.2.3 Velocity Plot for fully developed flow:

2.2.4 Shear stress Plot:

2.3. For `45^0``
blockMesh file:
/*------------------------------------*-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.000000 0.000000 0.000000)
(0.000000 0.009239 0.003827)
(0.000000 0.009239 -0.003827)
(3.020000 0.000000 0.000000)
(3.020000 0.009239 0.003827)
(3.020000 0.009239 -0.003827)
);
blocks
(
hex (0 2 1 0 3 5 4 3) (20 1 200) simpleGrading (1 1 1)
);
edges
(
arc 1 2 (0.000000 0.010000 0.000000)
arc 4 5 (3.020000 0.010000 0.000000)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 4 5 3)
);
}
wedge_front
{
type wedge;
faces
(
(2 5 3 0)
);
}
wedge_back
{
type wedge;
faces
(
(0 3 4 1)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPair
(
);
// **************************************************************************//
2.3.1 Pressure Profile:

2.3.2 Velocity Profile:

2.3.3 Velocity Plot for fully developed flow:

2.3.4 Shear stress Plot:

Conclusion:
- Here we see that as the wedge angle increases the velocity becomes more accurate to the analytical value.
- Also, we observe that the symmetric BC is more accurate in terms of velocity where it is very close to the analytical value.
- As observed we could say that the symmetric BC because of its fine meshing takes more time for computing or running the simulation.
REFERENCES:
- Versteeg, H. K. and Malalasekera "Introduction to Computational Fluid Dynamics: The Finite Volume Method"
- https://skill-lync.com/knowledgebase/how-to-create-shear-stress-plot-inside-paraview
- https://www.youtube.com/watch?v=fjhKZHHwji0