Week 12 - Validation studies of Symmetry BC vs Wedge BC in OpenFOAM vs Analytical H.P equation
Aim: Validation studies of Symmetry BC vs Wedge BC in OpenFOAM vs Analytical H.P equation
objective: simulate the same problem as in week 1 but by applying Symmetry Boundary Condition. You will do the simulation for the below mentioned angles using both symmetry and wedge boundary conditions and validate them with HP equations like you did in week 11 challenge.
theory;

wedge bounday condtion in open foam
For 2 dimensional axi-symmetric cases, e.g. a cylinder, the geometry is specified as a wedge of small angle (e.g.
) and 1 cell thick running along the plane of symmetry, straddling one of the coordinate planes, as shown in Figure 4.3. The axi-symmetric wedge planes must be specified as separate patches of wedge type.
Symmetry Boundary Condition:
The symmetry boundary condition defines a mirror face/surface. It should only be used if the physical object or geometry and the expected flow field pattern of the developed solution are mirrored along that surface.
case set up
matlab code to generate blockMeshDict file
#for 10 degree angle
close all;
clear all;
clc;
% Define the angle of the wedge (in degrees)
theta = 10;
% Define the radius of the wedge
r = 5;
L=100;
% Generate the data for the wedge
y = r*cosd(theta/2);
z = r*sind(theta/2);
f1=fopen('blockmeshdict.txt','wt');%txt file ceated in name blockMeshdict.txt
fprintf(f1,'/--------------------------------- C++ -----------------------------------\n');
fprintf (f1,'========= |\n')
fprintf (f1,'\\ / F ield | OpenFOAM: The Open Source CFD Toolbox\n');
fprintf (f1,' \\ / O peration | Website: https://openfoam.org\n');
fprintf (f1,' \\ / A nd | Version: 10\n');
fprintf (f1,' \\/ M anipulation |\n');
fprintf(f1, '')
fprintf(f1,'\*---------------------------------------------------------------------------*/\n');
fprintf(f1,'FoamFile\n{\n')
fprintf(f1,'format ascii;\n');
fprintf(f1,' class dictionary;\n');
fprintf(f1,' object blockMeshDict;\n}\n');
fprintf(f1,'// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\n');
fprintf(f1,'convertToMeters 1;\n');
fprintf(f1,'vertices\n');
fprintf(f1,'(\n');
fprintf(f1,' (0 0 0)\n')
fprintf(f1,' (0 %g -%g)\n',y,z)
fprintf(f1,' (0 %g %g)\n',y,z)
fprintf(f1,' (%g 0 0)\n',L)
fprintf(f1,' (%g %g -%g)\n',L,y,z)
fprintf(f1,' (%g %g %g)\n',L,y,z)
fprintf(f1,');\n');
fprintf(f1,'blocks\n');
fprintf(f1,'(\n');
fprintf(f1,' hex (0 1 2 0 3 4 5 3) (100 1 40) simpleGrading (1 1 1)\n')
fprintf(f1,');\n');
fprintf(f1,'edges\n');
fprintf(f1,'(\n');
fprintf(f1,' arc 1 2 (0 %g 0)\n',r)
fprintf(f1,' arc 4 5 (%g %g 0)\n',L,r)
fprintf(f1,');\n');
fprintf(f1,'boundary\n');
fprintf(f1,'(\n');
fprintf(f1,'inlet\n {\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 2 1 0)\n);\n }\n');
fprintf(f1,'outlet\n{\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (3 4 5 3)\n);\n}\n');
fprintf(f1,'upperWall\n{\n');
fprintf(f1,' type wall;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (1 2 5 4)\n);\n}\n');
fprintf(f1,'axis\n{\n');
fprintf(f1,' type empty;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 3 0)\n);\n}\n');
fprintf(f1,'front\n{\n');
fprintf(f1,' type wedge;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 5 2)\n);\n}\n');
fprintf(f1,' Back\n{\n');
fprintf(f1,' type wedge;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 1 4 3)\n);\n}\n);\n');
fprintf(f1,'mergePatchPairs\n(\n);\n');
#for 25 degree angle
close all;
clear all;
clc;
% Define the angle of the wedge (in degrees)
theta = 25;
% Define the radius of the wedge
r = 5;
L=100;
% Generate the data for the wedge
y = r*cosd(theta/2);
z = r*sind(theta/2);
f1=fopen('blockmeshdict.txt','wt');%txt file ceated in name blockMeshdict.txt
fprintf(f1,'/--------------------------------- C++ -----------------------------------\n');
fprintf (f1,'========= |\n')
fprintf (f1,'\\ / F ield | OpenFOAM: The Open Source CFD Toolbox\n');
fprintf (f1,' \\ / O peration | Website: https://openfoam.org\n');
fprintf (f1,' \\ / A nd | Version: 10\n');
fprintf (f1,' \\/ M anipulation |\n');
fprintf(f1, '')
fprintf(f1,'\*---------------------------------------------------------------------------*/\n');
fprintf(f1,'FoamFile\n{\n')
fprintf(f1,'format ascii;\n');
fprintf(f1,' class dictionary;\n');
fprintf(f1,' object blockMeshDict;\n}\n');
fprintf(f1,'// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\n');
fprintf(f1,'convertToMeters 1;\n');
fprintf(f1,'vertices\n');
fprintf(f1,'(\n');
fprintf(f1,' (0 0 0)\n')
fprintf(f1,' (0 %g -%g)\n',y,z)
fprintf(f1,' (0 %g %g)\n',y,z)
fprintf(f1,' (%g 0 0)\n',L)
fprintf(f1,' (%g %g -%g)\n',L,y,z)
fprintf(f1,' (%g %g %g)\n',L,y,z)
fprintf(f1,');\n');
fprintf(f1,'blocks\n');
fprintf(f1,'(\n');
fprintf(f1,' hex (0 1 2 0 3 4 5 3) (100 1 40) simpleGrading (1 1 1)\n')
fprintf(f1,');\n');
fprintf(f1,'edges\n');
fprintf(f1,'(\n');
fprintf(f1,' arc 1 2 (0 %g 0)\n',r)
fprintf(f1,' arc 4 5 (%g %g 0)\n',L,r)
fprintf(f1,');\n');
fprintf(f1,'boundary\n');
fprintf(f1,'(\n');
fprintf(f1,'inlet\n {\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 2 1 0)\n);\n }\n');
fprintf(f1,'outlet\n{\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (3 4 5 3)\n);\n}\n');
fprintf(f1,'upperWall\n{\n');
fprintf(f1,' type wall;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (1 2 5 4)\n);\n}\n');
fprintf(f1,'axis\n{\n');
fprintf(f1,' type empty;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 3 0)\n);\n}\n');
fprintf(f1,'front\n{\n');
fprintf(f1,' type wedge;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 5 2)\n);\n}\n');
fprintf(f1,' Back\n{\n');
fprintf(f1,' type wedge;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 1 4 3)\n);\n}\n);\n');
fprintf(f1,'mergePatchPairs\n(\n);\n');
#for 45 degree angle
close all;
clear all;
clc;
% Define the angle of the wedge (in degrees)
theta = 45;
% Define the radius of the wedge
r = 5;
L=100;
% Generate the data for the wedge
y = r*cosd(theta/2);
z = r*sind(theta/2);
f1=fopen('blockmeshdict.txt','wt');%txt file ceated in name blockMeshdict.txt
fprintf(f1,'/--------------------------------- C++ -----------------------------------\n');
fprintf (f1,'========= |\n')
fprintf (f1,'\\ / F ield | OpenFOAM: The Open Source CFD Toolbox\n');
fprintf (f1,' \\ / O peration | Website: https://openfoam.org\n');
fprintf (f1,' \\ / A nd | Version: 10\n');
fprintf (f1,' \\/ M anipulation |\n');
fprintf(f1, '')
fprintf(f1,'\*---------------------------------------------------------------------------*/\n');
fprintf(f1,'FoamFile\n{\n')
fprintf(f1,'format ascii;\n');
fprintf(f1,' class dictionary;\n');
fprintf(f1,' object blockMeshDict;\n}\n');
fprintf(f1,'// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\n');
fprintf(f1,'convertToMeters 1;\n');
fprintf(f1,'vertices\n');
fprintf(f1,'(\n');
fprintf(f1,' (0 0 0)\n')
fprintf(f1,' (0 %g -%g)\n',y,z)
fprintf(f1,' (0 %g %g)\n',y,z)
fprintf(f1,' (%g 0 0)\n',L)
fprintf(f1,' (%g %g -%g)\n',L,y,z)
fprintf(f1,' (%g %g %g)\n',L,y,z)
fprintf(f1,');\n');
fprintf(f1,'blocks\n');
fprintf(f1,'(\n');
fprintf(f1,' hex (0 1 2 0 3 4 5 3) (100 1 40) simpleGrading (1 1 1)\n')
fprintf(f1,');\n');
fprintf(f1,'edges\n');
fprintf(f1,'(\n');
fprintf(f1,' arc 1 2 (0 %g 0)\n',r)
fprintf(f1,' arc 4 5 (%g %g 0)\n',L,r)
fprintf(f1,');\n');
fprintf(f1,'boundary\n');
fprintf(f1,'(\n');
fprintf(f1,'inlet\n {\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 2 1 0)\n);\n }\n');
fprintf(f1,'outlet\n{\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (3 4 5 3)\n);\n}\n');
fprintf(f1,'upperWall\n{\n');
fprintf(f1,' type wall;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (1 2 5 4)\n);\n}\n');
fprintf(f1,'axis\n{\n');
fprintf(f1,' type empty;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 3 0)\n);\n}\n');
fprintf(f1,'front\n{\n');
fprintf(f1,' type wedge;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 5 2)\n);\n}\n');
fprintf(f1,' Back\n{\n');
fprintf(f1,' type wedge;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 1 4 3)\n);\n}\n);\n');
fprintf(f1,'mergePatchPairs\n(\n);\n');
these file for wedge bc for symmetry instead of wedge add symmetry bc
#symmetry bc for 10 degree angle
close all;
clear all;
clc;
% Define the angle of the wedge (in degrees)
theta = 10;
% Define the radius of the wedge
r = 5;
L=100;
% Generate the data for the wedge
y = r*cosd(theta/2);
z = r*sind(theta/2);
f1=fopen('blockmeshdict.txt','wt');%txt file ceated in name blockMeshdict.txt
fprintf(f1,'/--------------------------------- C++ -----------------------------------\n');
fprintf (f1,'========= |\n')
fprintf (f1,'\\ / F ield | OpenFOAM: The Open Source CFD Toolbox\n');
fprintf (f1,' \\ / O peration | Website: https://openfoam.org\n');
fprintf (f1,' \\ / A nd | Version: 10\n');
fprintf (f1,' \\/ M anipulation |\n');
fprintf(f1, '')
fprintf(f1,'\*---------------------------------------------------------------------------*/\n');
fprintf(f1,'FoamFile\n{\n')
fprintf(f1,'format ascii;\n');
fprintf(f1,' class dictionary;\n');
fprintf(f1,' object blockMeshDict;\n}\n');
fprintf(f1,'// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\n');
fprintf(f1,'convertToMeters 1;\n');
fprintf(f1,'vertices\n');
fprintf(f1,'(\n');
fprintf(f1,' (0 0 0)\n')
fprintf(f1,' (0 %g -%g)\n',y,z)
fprintf(f1,' (0 %g %g)\n',y,z)
fprintf(f1,' (%g 0 0)\n',L)
fprintf(f1,' (%g %g -%g)\n',L,y,z)
fprintf(f1,' (%g %g %g)\n',L,y,z)
fprintf(f1,');\n');
fprintf(f1,'blocks\n');
fprintf(f1,'(\n');
fprintf(f1,' hex (0 1 2 0 3 4 5 3) (100 1 40) simpleGrading (1 1 1)\n')
fprintf(f1,');\n');
fprintf(f1,'edges\n');
fprintf(f1,'(\n');
fprintf(f1,' arc 1 2 (0 %g 0)\n',r)
fprintf(f1,' arc 4 5 (%g %g 0)\n',L,r)
fprintf(f1,');\n');
fprintf(f1,'boundary\n');
fprintf(f1,'(\n');
fprintf(f1,'inlet\n {\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 2 1 0)\n);\n }\n');
fprintf(f1,'outlet\n{\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (3 4 5 3)\n);\n}\n');
fprintf(f1,'upperWall\n{\n');
fprintf(f1,' type wall;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (1 2 5 4)\n);\n}\n');
fprintf(f1,'axis\n{\n');
fprintf(f1,' type empty;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 3 0)\n);\n}\n');
fprintf(f1,'front\n{\n');
fprintf(f1,' type symmetry;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 5 2)\n);\n}\n');
fprintf(f1,' Back\n{\n');
fprintf(f1,' type symmetry;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 1 4 3)\n);\n}\n);\n');
fprintf(f1,'mergePatchPairs\n(\n);\n');
close all;
clear all;
clc;
% Define the angle of the wedge (in degrees)
theta = 25;
% Define the radius of the wedge
r = 5;
L=100;
% Generate the data for the wedge
y = r*cosd(theta/2);
z = r*sind(theta/2);
f1=fopen('blockmeshdict.txt','wt');%txt file ceated in name blockMeshdict.txt
fprintf(f1,'/--------------------------------- C++ -----------------------------------\n');
fprintf (f1,'========= |\n')
fprintf (f1,'\\ / F ield | OpenFOAM: The Open Source CFD Toolbox\n');
fprintf (f1,' \\ / O peration | Website: https://openfoam.org\n');
fprintf (f1,' \\ / A nd | Version: 10\n');
fprintf (f1,' \\/ M anipulation |\n');
fprintf(f1, '')
fprintf(f1,'\*---------------------------------------------------------------------------*/\n');
fprintf(f1,'FoamFile\n{\n')
fprintf(f1,'format ascii;\n');
fprintf(f1,' class dictionary;\n');
fprintf(f1,' object blockMeshDict;\n}\n');
fprintf(f1,'// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\n');
fprintf(f1,'convertToMeters 1;\n');
fprintf(f1,'vertices\n');
fprintf(f1,'(\n');
fprintf(f1,' (0 0 0)\n')
fprintf(f1,' (0 %g -%g)\n',y,z)
fprintf(f1,' (0 %g %g)\n',y,z)
fprintf(f1,' (%g 0 0)\n',L)
fprintf(f1,' (%g %g -%g)\n',L,y,z)
fprintf(f1,' (%g %g %g)\n',L,y,z)
fprintf(f1,');\n');
fprintf(f1,'blocks\n');
fprintf(f1,'(\n');
fprintf(f1,' hex (0 1 2 0 3 4 5 3) (100 1 40) simpleGrading (1 1 1)\n')
fprintf(f1,');\n');
fprintf(f1,'edges\n');
fprintf(f1,'(\n');
fprintf(f1,' arc 1 2 (0 %g 0)\n',r)
fprintf(f1,' arc 4 5 (%g %g 0)\n',L,r)
fprintf(f1,');\n');
fprintf(f1,'boundary\n');
fprintf(f1,'(\n');
fprintf(f1,'inlet\n {\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 2 1 0)\n);\n }\n');
fprintf(f1,'outlet\n{\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (3 4 5 3)\n);\n}\n');
fprintf(f1,'upperWall\n{\n');
fprintf(f1,' type wall;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (1 2 5 4)\n);\n}\n');
fprintf(f1,'axis\n{\n');
fprintf(f1,' type empty;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 3 0)\n);\n}\n');
fprintf(f1,'front\n{\n');
fprintf(f1,' type symmetry;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 5 2)\n);\n}\n');
fprintf(f1,' Back\n{\n');
fprintf(f1,' type symmetry;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 1 4 3)\n);\n}\n);\n');
fprintf(f1,'mergePatchPairs\n(\n);\n');
close all;
clear all;
clc;
% Define the angle of the wedge (in degrees)
theta = 45;
% Define the radius of the wedge
r = 5;
L=100;
% Generate the data for the wedge
y = r*cosd(theta/2);
z = r*sind(theta/2);
f1=fopen('blockmeshdict.txt','wt');%txt file ceated in name blockMeshdict.txt
fprintf(f1,'/--------------------------------- C++ -----------------------------------\n');
fprintf (f1,'========= |\n')
fprintf (f1,'\\ / F ield | OpenFOAM: The Open Source CFD Toolbox\n');
fprintf (f1,' \\ / O peration | Website: https://openfoam.org\n');
fprintf (f1,' \\ / A nd | Version: 10\n');
fprintf (f1,' \\/ M anipulation |\n');
fprintf(f1, '')
fprintf(f1,'\*---------------------------------------------------------------------------*/\n');
fprintf(f1,'FoamFile\n{\n')
fprintf(f1,'format ascii;\n');
fprintf(f1,' class dictionary;\n');
fprintf(f1,' object blockMeshDict;\n}\n');
fprintf(f1,'// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\n');
fprintf(f1,'convertToMeters 1;\n');
fprintf(f1,'vertices\n');
fprintf(f1,'(\n');
fprintf(f1,' (0 0 0)\n')
fprintf(f1,' (0 %g -%g)\n',y,z)
fprintf(f1,' (0 %g %g)\n',y,z)
fprintf(f1,' (%g 0 0)\n',L)
fprintf(f1,' (%g %g -%g)\n',L,y,z)
fprintf(f1,' (%g %g %g)\n',L,y,z)
fprintf(f1,');\n');
fprintf(f1,'blocks\n');
fprintf(f1,'(\n');
fprintf(f1,' hex (0 1 2 0 3 4 5 3) (100 1 40) simpleGrading (1 1 1)\n')
fprintf(f1,');\n');
fprintf(f1,'edges\n');
fprintf(f1,'(\n');
fprintf(f1,' arc 1 2 (0 %g 0)\n',r)
fprintf(f1,' arc 4 5 (%g %g 0)\n',L,r)
fprintf(f1,');\n');
fprintf(f1,'boundary\n');
fprintf(f1,'(\n');
fprintf(f1,'inlet\n {\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 2 1 0)\n);\n }\n');
fprintf(f1,'outlet\n{\n');
fprintf(f1,' type patch;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (3 4 5 3)\n);\n}\n');
fprintf(f1,'upperWall\n{\n');
fprintf(f1,' type wall;\n');
fprintf(f1,' faces\n (\n');
fprintf(f1,' (1 2 5 4)\n);\n}\n');
fprintf(f1,'axis\n{\n');
fprintf(f1,' type empty;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 3 0)\n);\n}\n');
fprintf(f1,'front\n{\n');
fprintf(f1,' type symmetry;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 3 5 2)\n);\n}\n');
fprintf(f1,' Back\n{\n');
fprintf(f1,' type symmetry;\n');
fprintf(f1,' faces\n(\n');
fprintf(f1,' (0 1 4 3)\n);\n}\n);\n');
fprintf(f1,'mergePatchPairs\n(\n);\n');
afetr blockmeshDict file velocity and pressure boundary condtions were set same as previous challenge
gedit 0/U file
/*--------------------------------*- 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.021 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (0.021 0 0);
}
outlet
{
type zeroGradient;
}
upperWall
{
type noSlip;
}
axis
{
type empty;
}
front
{
type wedge;
}
Back
{
type wedge;
}
}
// ************************************************************************* //
gedit 0/p flle
/*--------------------------------*- 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 0;
}
upperWall
{
type zeroGradient;
}
axis
{
type empty;
}
front
{
type wedge;
}
Back
{
type wedge;
}
}
after voundary condion set up then block mesh and run the solver icoFoam and wait till simultion runs
Result:
the simulation is ran for 6 cases and the results were dicused here
wedge `10^o`

boundary layer formation

pressure drop

shear stress

velocity profile
wedge `25^o`

boundary layer formation

pressure drop

shear stress

velocity profile
wedge `45^o`

boundary layer formation

pressure drop

shear stress

velocity profile
symmetry `10^o`

boundary layer

pressure drop

shear stress

velocity profile

boundary layer

pressure drop

shear stress

velocity profile
symmetry `45^o`

boundary layer

pressure drop

shear stress

velocity profile
conclusion
`u=Re*nu/D`
`u=2100*10^-6/0.01`
u=0.21 m/s
pressure drop across pipe
`nabla p=-8*mu*L*u/r^2`
where
mu is dydnamic viscosity
L is length of pipe
U is avrge velocity of fluid flow in pipe
r is radius of pipe
`nabla p=-8*0.001*0.3/0.05^2`
`nabla p=0.02016 pa`
`tau_w=mu*(du)/dy`
`tau_w=0.001*(du)/(dy)`
the results matchs with velocity profile and wall shear stress profile