Week 11 - Simulation of Flow through a pipe in OpenFoam
Given
Re=2100
Density=997kg/m^3
viscosity=1.002e-3Ns/m^2
Kinematic viscosity=1.004e-6m^2/s
Taken
Daimeter(D)=10mm
Hydrodynamic length(Le)=0.05*Re*D
Total length of pipe(L)=Le+0.3
The geometry of wedge is made such that its axis lies on x axis and its base is symmetric about y axis. The wedge angle taken is 5 degree as to run the wedge command it requires angle less than or equal to 5 degree.
Matlab code to create blockmesh is named 'Matlab code to create blockmesh.txt' and attached below.
The Mesh grading in the x direction of the block is 0.1 so that its fine near the wall of the pipe. The mesh grading in z direction of the block is 10 so that its fine near the inlet. The picture attached 'mesh1.png' and 'mesh2.png' shows the mesh grading.
The blockmesh file created is named 'blockMeshDict.txt' and is attached below.
Pressure calculation
`delta`P=32*L*V*`mu`/D^2=91.35594N/m^2
Since the fluid is incompressible we can use kinematic pressure for calculation.
Kinematic Pressure=0.09162m^2/s^2
The inlet pressure condition file p is attached below named 'p.txt'.
Velocity calculation
V=Re*`mu`/`rho`*D=0.21105 m/s
The inlet velocity condition file V is attached below named 'U.txt'.
Control dict
The control file is attached below named 'controlDict.txt'.
Vmax=`delta`P*R^2/4*μ*L=0.4153
To get the velocity at 1.35 m from the inlet probe fuction is used.
The maximum velocity devloped is 0.418943 at the center of pipe and was found using probe tool in paraview. Which is an percentage error of 0.877197207%.
The velocity profile at 0, 0.675, 1.34 and 1.35 are attached below.
Shear stress
Using the probes function the velocity at different location is sampled.
And by manually deleting the parts of file which are not required, we use it to do our analysis. We have only taken the axial velocity as other velocity is very small i.e in order of e-16. The file of the sampled velocity is attached below named 'Usample.txt'.
The matlab code to calculate and plot for shear stress is named 'shearStress.txt' and attached below.
Conclusion
The flow is fully develop with parabolic velocity profile at the hydrodynamic length.