Week 12 - Validation studies of Symmetry BC vs Wedge BC in OpenFOAM vs Analytical H.P equation
AIM:- Simulate the axis symetric and wedge boundary condition in open foam for different angles 10,25,45.
SOLUTIONS
Hagen poiseuille's law
In non-ideal fluid dynamics the hagen poiseuille equation is aphysical law that gives the pressure drop in an incompressible and newtonian fluid in laminar flow flowing through a long cylindrical pipe of constant cross-section. The pressure drop is given by:
`DeltaP=(32muLV)/D^2`
where
`triangle P` is pressure drop
`mu`is dynamic viscosity
L is length of pipe
V is velocity

At enterance the flow is said to be in hydrodynamic enterance region where the velocity profil gradually takes the shape of parabola from a straight line. As soon as the parabolic velocity profile becomes steady the flow is said to be in its fully developed state . Normally hagen Poiseuilles equation is applicable for a fully developed flow which helps us to calculate pressure loss.
Equations used
Average velocity
`V_(avg)=(R_emu)/(rhoD)`
Maximum velocity
`V_max=2*V_(avg)`
Pressure drop
`DeltaP=(32muLV)/D^2`
Kinematic pressure drop
`(DeltaP)/rho`
STEPS & PROCEDURE
(1) Will start copying the cavity file to FOAM_RUN folder.
(2) Then we uses the blockmeshdict files ,pressure files, velocity ,controldict & transportfiles which we created using file parsing in matlab
(3) Then we run the blockMesh to create mesh structure.
(4) After we run for icoFoam and then paraFoam to get results for various cases for wedges at different angles.
(5) Compute data for analytical and Cfd to compare results.
CODES
MATLAB CODE FOR SYMMETRICAL
close all
clear all
clc
%% Input data
% Reynolds number
Re = 2100;
% density of water in kg/m^3
rho=1000;
% Dia of pipe in metres
D= .004;
% Entrance Length of pipe
L= 0.06*Re*D;
% Fully developed length
L_d = 0.4;
% Total length of pipe
L_p= L+L_d;
% Radius of pipe
r=D/2;
% Angle of wedge(in degrees)
theta= 25;
% Dynamic viscosity
mu= 0.89e-3;
% Kinematic viscosity
nu= mu/rho;
%Hagen poisuille flow equations
v_avg= Re*nu/D;
v_max= 2*v_avg;
del_p= (8*mu*L_d*v_avg)/(r^2);
kinematic_p= del_p/rho;
%calculating shear stress
R= linspace(0,(D/2),1000);
for i= 1:length(R)
tau(i)= 2*mu*v_max*(abs(R(i)))/(r^2);
vel(i)= v_max*(1-(R(i)/r)^2);
end
figure(1)
plot(R,tau)
xlabel('Radius')
ylabel('Shear stress')
grid on
legend ('Shear stress')
figure(2)
plot(R,vel)
xlabel('Radius')
ylabel('Shear stress')
grid on
legend ('Velocity Profile')
%% Creating files for blockmeshdict
%Header files
h1='/*----------------------------------*- C++ -*------------------------------------*\\\'
h2=' ========= | \'
h3=' \\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \'
h4=' \\\\ / O peration | Website: https://openfoam.org \'
h5=' \\\\ / A nd | Version: 7 \'
h6=' \\\\/ M anipulation | \'
h7='\\*----------------------------------------------------------------------------------*/\'
h8='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\'
h9='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\'
%vertices
v0=[0 0 0] %for point 0
v1=[0 r*cosd(theta/2) r*sind(theta/2)] %point 1
v2=[0 r*cosd(theta/2) -r*sind(theta/2)]
v3=[L_p 0 0]
v4=[L_p r*cosd(theta/2) r*sind(theta/2)]
v5=[L_p r*cosd(theta/2) -r*sind(theta/2)]
% Creating text
f1 = fopen( ' blockMeshDict_symmetry_angle_25', 'w');
fprintf(f1, ' %s \n ', h1 )
fprintf(f1, ' %s \n ', h2 )
fprintf(f1, ' %s \n ', h3 )
fprintf(f1, ' %s \n ', h4 )
fprintf(f1, ' %s \n ', h5 )
fprintf(f1, ' %s \n ', h6 )
fprintf(f1, ' %s \n \n ', h7 )
fprintf(f1, 'FoamFile \n{ \n \n ')
fprintf(f1, '%12s \t \t 2.0; \n ','version ')
fprintf(f1, '%12s \t \t ascii; \n','format ')
fprintf(f1, '%12s \t \t dictionary; \n','class ')
fprintf(f1, '%12s \t \t blockMeshDict; \n','object ')
fprintf(f1, '} \n \n')
fprintf(f1, '%s \n \n', h8)
fprintf(f1, 'convertToMeters 1; \n \n')
fprintf(f1, 'vertices \n ( \n ')
fprintf(f1, '\t (%d %d %d) \n',v0)
fprintf(f1, '\t (%d %d %d) \n',v1)
fprintf(f1, '\t (%d %d %d) \n',v2)
fprintf(f1, '\t (%d %d %d) \n',v3)
fprintf(f1, '\t (%d %d %d) \n',v4)
fprintf(f1, '\t (%d %d %d) \n',v5)
fprintf(f1, '); \n \n')
fprintf(f1, 'blocks \n ( \n ')
fprintf(f1, '\t hex (0 3 5 2 0 3 4 1) (%d %d %d) ', 300,30,1)
fprintf(f1, ' SimpleGrading (1 0.1 1) \n \n ); \n \n')
fprintf(f1, 'edges \n ( \n')
fprintf(f1, '\t arc %d %d (%d %d %d) \n', 1,2,0,r,0)
fprintf(f1, '\t arc %d %d (%d %d %d) \n', 4,5,L_p,r,0)
fprintf(f1, '); \n \n')
fprintf(f1, 'boundary \n ( \n ')
fprintf(f1, '\t inlet \n \t { \n')
fprintf(f1, '\t \t type patch; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (0 1 2 0)\n')
fprintf(f1, '\t \t ); \n \t }\n')
fprintf(f1, '\t outlet \n \t { \n')
fprintf(f1, '\t \t type patch; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (3 5 4 3)\n')
fprintf(f1, '\t \t ); \n \t }\n')
fprintf(f1, '\t top \n \t { \n')
fprintf(f1, '\t \t type wall; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (1 4 5 2)\n')
fprintf(f1, '\t \t ); \n \t }\n')
fprintf(f1, '\t front \n \t { \n')
fprintf(f1, '\t \t type symmetry; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (0 3 4 1)\n')
fprintf(f1, '\t \t ); \n \t }\n')
fprintf(f1, '\t back \n \t { \n')
fprintf(f1, '\t \t type symmetry; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (0 2 5 3)\n')
fprintf(f1, '\t \t ); \n \t }\n')
fprintf(f1, '\t axis \n \t { \n')
fprintf(f1, '\t \t type empty; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (0 3 3 0)\n')
fprintf(f1, '\t \t ); \n \t } \n ); \n \n')
fprintf(f1, 'mergePatchPairs \n')
fprintf(f1, '( \n\')
fprintf(f1, '); \n\')
fprintf(f1, '%s \n\',h9)
f1(close)
MATLAB FOR WEDGES
close all
clear all
clc
%% Input data
% Reynolds number
Re = 2100;
% density of water in kg/m^3
rho=1000;
% Dia of pipe in metres
D= .004;
% Entrance Length of pipe
L= 0.06*Re*D;
% Fully developed length
L_d = 0.4;
% Total length of pipe
L_p= L+L_d;
% Radius of pipe
r=D/2;
% Angle of wedge(in degrees)
theta= 10;
% Dynamic viscosity
mu= 0.89e-3;
% Kinematic viscosity
nu= mu/rho;
%Hagen poisuille flow equations
v_avg= Re*nu/D;
v_max= 2*v_avg;
del_p= (8*mu*L_d*v_avg)/(r^2);
kinematic_p= del_p/rho;
%calculating shear stress
R= linspace(0,(D/2),1000);
for i= 1:length(R)
tau(i)= 2*mu*v_max*(abs(R(i)))/(r^2);
vel(i)= v_max*(1-(R(i)/r)^2);
end
figure(1)
plot(R,tau)
xlabel('Radius')
ylabel('Shear stress')
grid on
legend ('Shear stress')
figure(2)
plot(R,vel)
xlabel('Radius')
ylabel('Shear stress')
grid on
legend ('Velocity Profile')
%% Creating files for blockmeshdict
%Header files
h1='/*----------------------------------*- C++ -*------------------------------------*\\\'
h2=' ========= | \'
h3=' \\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \'
h4=' \\\\ / O peration | Website: https://openfoam.org \'
h5=' \\\\ / A nd | Version: 7 \'
h6=' \\\\/ M anipulation | \'
h7='\\*----------------------------------------------------------------------------------*/\'
h8='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\'
h9='// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\'
%vertices
v0=[0 0 0] %for point 0
v1=[0 r*cosd(theta/2) r*sind(theta/2)] %point 1
v2=[0 r*cosd(theta/2) -r*sind(theta/2)]
v3=[L_p 0 0]
v4=[L_p r*cosd(theta/2) r*sind(theta/2)]
v5=[L_p r*cosd(theta/2) -r*sind(theta/2)]
% Creating text
f1 = fopen( ' blockMeshDict_wedge_angle10', 'w');
fprintf(f1, ' %s \n ', h1 )
fprintf(f1, ' %s \n ', h2 )
fprintf(f1, ' %s \n ', h3 )
fprintf(f1, ' %s \n ', h4 )
fprintf(f1, ' %s \n ', h5 )
fprintf(f1, ' %s \n ', h6 )
fprintf(f1, ' %s \n \n ', h7 )
fprintf(f1, 'FoamFile \n{ \n \n ')
fprintf(f1, '%12s \t \t 2.0; \n ','version ')
fprintf(f1, '%12s \t \t ascii; \n','format ')
fprintf(f1, '%12s \t \t dictionary; \n','class ')
fprintf(f1, '%12s \t \t blockMeshDict; \n','object ')
fprintf(f1, '} \n \n')
fprintf(f1, '%s \n \n', h8)
fprintf(f1, 'convertToMeters 1; \n \n')
fprintf(f1, 'vertices \n ( \n ')
fprintf(f1, '\t (%d %d %d) \n',v0)
fprintf(f1, '\t (%d %d %d) \n',v1)
fprintf(f1, '\t (%d %d %d) \n',v2)
fprintf(f1, '\t (%d %d %d) \n',v3)
fprintf(f1, '\t (%d %d %d) \n',v4)
fprintf(f1, '\t (%d %d %d) \n',v5)
fprintf(f1, '); \n \n')
fprintf(f1, 'blocks \n ( \n ')
fprintf(f1, '\t hex (0 3 5 2 0 3 4 1) (%d %d %d) ', 300,30,1)
fprintf(f1, ' SimpleGrading (1 0.1 1) \n \n ); \n \n')
fprintf(f1, 'edges \n ( \n')
fprintf(f1, '\t arc %d %d (%d %d %d) \n', 1,2,0,r,0)
fprintf(f1, '\t arc %d %d (%d %d %d) \n', 4,5,L_p,r,0)
fprintf(f1, '); \n \n')
fprintf(f1, 'boundary \n ( \n ')
fprintf(f1, '\t inlet \n \t { \n')
fprintf(f1, '\t \t type patch; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (0 1 2 0)\n')
fprintf(f1, '\t \t ); \n \t }\n')
fprintf(f1, '\t outlet \n \t { \n')
fprintf(f1, '\t \t type patch; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (3 5 4 3)\n')
fprintf(f1, '\t \t ); \n \t }\n')
fprintf(f1, '\t top \n \t { \n')
fprintf(f1, '\t \t type wall; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (1 4 5 2)\n')
fprintf(f1, '\t \t ); \n \t }\n')
fprintf(f1, '\t front \n \t { \n')
fprintf(f1, '\t \t type wedge; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (0 3 4 1)\n')
fprintf(f1, '\t \t ); \n \t }\n')
fprintf(f1, '\t back \n \t { \n')
fprintf(f1, '\t \t type wedge; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (0 2 5 3)\n')
fprintf(f1, '\t \t ); \n \t }\n')
fprintf(f1, '\t axis \n \t { \n')
fprintf(f1, '\t \t type empty; \n')
fprintf(f1, '\t \t faces \n \t \t ( \n')
fprintf(f1, '\t \t \t (0 3 3 0)\n')
fprintf(f1, '\t \t ); \n \t } \n ); \n \n')
fprintf(f1, 'mergePatchPairs \n')
fprintf(f1, '( \n\')
fprintf(f1, '); \n\')
fprintf(f1, '%s \n\',h9)
BLOCKMESHDICT FOR SYMMETRY ANGLE DEGREE- 10
/*----------------------------------*- C++ -*------------------------------------*\\\
========= | \
\\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \
\\\\ / O peration | Website: https://openfoam.org \
\\\\ / A nd | Version: 7 \
\\\\/ M anipulation | \
\\*----------------------------------------------------------------------------------*/\
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
convertToMeters 1;
vertices
(
(0 0 0)
(0 1.992389e-03 1.743115e-04)
(0 1.992389e-03 -1.743115e-04)
(9.040000e-01 0 0)
(9.040000e-01 1.992389e-03 1.743115e-04)
(9.040000e-01 1.992389e-03 -1.743115e-04)
);
blocks
(
hex (0 3 5 2 0 3 4 1) (300 30 1) SimpleGrading (1 0.1 1)
);
edges
(
arc 1 2 (0 2.000000e-03 0)
arc 4 5 (9.040000e-01 2.000000e-03 0)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 5 4 3)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
front
{
type symmetry;
faces
(
(0 3 4 1)
);
}
back
{
type symmetry;
faces
(
(0 2 5 3)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPairs
(
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
BLOCKMESHDICT FOR WEDGES ANGLE DEGREE-10
/*----------------------------------*- C++ -*------------------------------------*\\\
========= | \
\\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \
\\\\ / O peration | Website: https://openfoam.org \
\\\\ / A nd | Version: 7 \
\\\\/ M anipulation | \
\\*----------------------------------------------------------------------------------*/\
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
convertToMeters 1;
vertices
(
(0 0 0)
(0 1.992389e-03 1.743115e-04)
(0 1.992389e-03 -1.743115e-04)
(9.040000e-01 0 0)
(9.040000e-01 1.992389e-03 1.743115e-04)
(9.040000e-01 1.992389e-03 -1.743115e-04)
);
blocks
(
hex (0 3 5 2 0 3 4 1) (300 30 1) SimpleGrading (1 0.1 1)
);
edges
(
arc 1 2 (0 2.000000e-03 0)
arc 4 5 (9.040000e-01 2.000000e-03 0)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 5 4 3)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
front
{
type wedge;
faces
(
(0 3 4 1)
);
}
back
{
type wedge;
faces
(
(0 2 5 3)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPairs
(
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
BLOCKMESHDICT FOR SYMMETRY ANGLE DEGREE - 25
/*----------------------------------*- C++ -*------------------------------------*\\\
========= | \
\\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \
\\\\ / O peration | Website: https://openfoam.org \
\\\\ / A nd | Version: 7 \
\\\\/ M anipulation | \
\\*----------------------------------------------------------------------------------*/\
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
convertToMeters 1;
vertices
(
(0 0 0)
(0 1.952592e-03 4.328792e-04)
(0 1.952592e-03 -4.328792e-04)
(9.040000e-01 0 0)
(9.040000e-01 1.952592e-03 4.328792e-04)
(9.040000e-01 1.952592e-03 -4.328792e-04)
);
blocks
(
hex (0 3 5 2 0 3 4 1) (300 30 1) SimpleGrading (1 0.1 1)
);
edges
(
arc 1 2 (0 2.000000e-03 0)
arc 4 5 (9.040000e-01 2.000000e-03 0)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 5 4 3)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
front
{
type symmetry;
faces
(
(0 3 4 1)
);
}
back
{
type symmetry;
faces
(
(0 2 5 3)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPairs
(
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
BLOCKMESHDICT FOR WEDGES ANGLE DEGREE-25
/*----------------------------------*- C++ -*------------------------------------*\\\
========= | \
\\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \
\\\\ / O peration | Website: https://openfoam.org \
\\\\ / A nd | Version: 7 \
\\\\/ M anipulation | \
\\*----------------------------------------------------------------------------------*/\
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
convertToMeters 1;
vertices
(
(0 0 0)
(0 1.952592e-03 4.328792e-04)
(0 1.952592e-03 -4.328792e-04)
(9.040000e-01 0 0)
(9.040000e-01 1.952592e-03 4.328792e-04)
(9.040000e-01 1.952592e-03 -4.328792e-04)
);
blocks
(
hex (0 3 5 2 0 3 4 1) (300 30 1) SimpleGrading (1 0.1 1)
);
edges
(
arc 1 2 (0 2.000000e-03 0)
arc 4 5 (9.040000e-01 2.000000e-03 0)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 5 4 3)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
front
{
type wedge;
faces
(
(0 3 4 1)
);
}
back
{
type wedge;
faces
(
(0 2 5 3)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPairs
(
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
BLOCKMESHDICT SYMMETRY ANGLE DEGREE-45
/*----------------------------------*- C++ -*------------------------------------*\\\
========= | \
\\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \
\\\\ / O peration | Website: https://openfoam.org \
\\\\ / A nd | Version: 7 \
\\\\/ M anipulation | \
\\*----------------------------------------------------------------------------------*/\
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
convertToMeters 1;
vertices
(
(0 0 0)
(0 1.847759e-03 7.653669e-04)
(0 1.847759e-03 -7.653669e-04)
(9.040000e-01 0 0)
(9.040000e-01 1.847759e-03 7.653669e-04)
(9.040000e-01 1.847759e-03 -7.653669e-04)
);
blocks
(
hex (0 3 5 2 0 3 4 1) (300 30 1) SimpleGrading (1 0.1 1)
);
edges
(
arc 1 2 (0 2.000000e-03 0)
arc 4 5 (9.040000e-01 2.000000e-03 0)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 5 4 3)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
front
{
type symmetry;
faces
(
(0 3 4 1)
);
}
back
{
type symmetry;
faces
(
(0 2 5 3)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPairs
(
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
BLOCKMESHDICT 45 WEDGES ANGLE AT 45
/*----------------------------------*- C++ -*------------------------------------*\\\
========= | \
\\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \
\\\\ / O peration | Website: https://openfoam.org \
\\\\ / A nd | Version: 7 \
\\\\/ M anipulation | \
\\*----------------------------------------------------------------------------------*/\
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
convertToMeters 1;
vertices
(
(0 0 0)
(0 1.847759e-03 7.653669e-04)
(0 1.847759e-03 -7.653669e-04)
(9.040000e-01 0 0)
(9.040000e-01 1.847759e-03 7.653669e-04)
(9.040000e-01 1.847759e-03 -7.653669e-04)
);
blocks
(
hex (0 3 5 2 0 3 4 1) (300 30 1) SimpleGrading (1 0.1 1)
);
edges
(
arc 1 2 (0 2.000000e-03 0)
arc 4 5 (9.040000e-01 2.000000e-03 0)
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 0)
);
}
outlet
{
type patch;
faces
(
(3 5 4 3)
);
}
top
{
type wall;
faces
(
(1 4 5 2)
);
}
front
{
type wedge;
faces
(
(0 3 4 1)
);
}
back
{
type wedge;
faces
(
(0 2 5 3)
);
}
axis
{
type empty;
faces
(
(0 3 3 0)
);
}
);
mergePatchPairs
(
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\
PRESSURE SYMMETRY
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
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 1.0073;
}
top
{
type zeroGradient;
}
front
{
type symmetry;
}
back
{
type symmetry;
}
axis
{
type empty;
}
}
// ************************************************************************* //
VELOCITY SYMMETRY
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
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 (1 0 0);
}
outlet
{
type zeroGradient;
}
top
{
type noSlip;
}
front
{
type symmetry;
}
back
{
type symmetry;
}
axis
{
type empty;
}
}
// ************************************************************************* //
PRESSURE AT WEDGE
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
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 1.0073;
}
top
{
type zeroGradient;
}
front
{
type wedge;
}
back
{
type wedge;
}
axis
{
type empty;
}
}
// ************************************************************************* //
VELOCITY AT WEDGE
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
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 (1 0 0);
}
outlet
{
type zeroGradient;
}
top
{
type noSlip;
}
front
{
type wedge;
}
back
{
type wedge;
}
axis
{
type empty;
}
}
// ************************************************************************* //
CONTROLDICT
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1;
deltaT 1e-3;
writeControl timeStep;
writeInterval 5;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
// ************************************************************************* //
RESULTS
SYMMETRY AT ANGLE 10

VELOCITY COMPARISION
MATLAB

OPENFOAM

SHEAR STRESS
MATLAB

OPENFOAM

SYMMETRY RESULTS AT 25 DEGREE

VELOCITY
MATLAB

OPENFOAM

SHEAR STRESS
MATLAB

OPENFOAM

SYMMETRY AT 45 DEGREE

VELOCITY
MATLAB

OPENFOAM

SHEAR STRESS
MATLAB

OPENFOAM

WEDGE AT ANGLE 10 DEGREE

VELOCITY
MATLAB

OPENFOAM

SHEAR STRESS
MATLAB

OPENFOAM

WEDGE AT 25 DEGREES

VELOCITY
MATLAB

OPENFOAM

SHEAR STRESS
MATLAB

OPENFOAM

WEDGES AT 45 DEGREE

VELOCITY
MATLAB

OPENFOAM

SHEAR STRESS
MATLAB

OPENFOAM

HP postulate


CONCLUSION
We perfored the simulation for two boundary conditions those are symmetry and wedges boundary conditions.
During wedge boundary conditions simulation across the arc of the wedge is not done.But whereas in symmetrical the simulaation across the arc is done.So, The simulation time is higher in that case.The courant number is increasing slightly in case of wedge condition hence the symmetry boundary condition will be more accurate.Symmetry condition consider mesh as 3d and the calculations are done among all axis.
The result did'nt change due to boundary conditions because the physical properties were same difference was just in accuracy .