Challenge

Week 11 - Simulation of Flow through a pipe in OpenFoam

Introduction To laminar flow in pipe:

Laminar flow or streamline flow in pipes (or tubes) occurs when a fluid flows in parallel layers, with no disruption between the layers. At low velocities, the fluid tends to flow without lateral mixing, and adjacent layers slide past one another like playing cards. There are no cross-currents perpendicular to the direction of flow, nor eddies or swirls of fluids. In laminar flow, the motion of the particles of the fluid is very orderly with all particles moving in straight lines parallel to the pipe walls. Any lateral mixing (mixing at right angles to the flow direction) occurs by the action of diffusion between layers of the liquid. Diffusion mixing can be slow however if the diameter of the pipe of the tube is small then this diffusive mixing can be very significant.

Hagen–Poiseuille equation

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.

BlockMeshDict file:

Kinematic Pressure Drop:

Average Velocity:

Kinematic Viscosity:

Control Dict:

Praview with Mesh(3-degree wedge angle)

Velocity Distribution:

Velocity Profiles:

clear all
close all
clc

f2=fopen('p.txt', 'r');
fgetl (f2);
A=fscanf(f2, '%f', [2 inf]);
B=A';
mu=0.00089;
U=B(1:end-1, 2);
r=B (1:end-1, 1);
tau=zeros (length(U));

for i=2:length(r)
    tau(i)=mu*((U(i-1)-U(i))/(r(i)-r(i-1)));
end

tau=tau(:,1);
plot (r,tau, 'r')
hold on
plot (-r, tau, 'r')
xlabel('Radius in m')
ylabel('Shear stress in Pa')
title('Shear stress profile at L-2.52m')

figure (2)
plot (U,r, 'b')
hold on
plot (U, -r, 'b')
grid on
xlabel('Velocity in m/s')
ylabel('Radius in m')
title('Velocity profile at L=2.52m')
grid on

conclusion:

wedge angle max velocity hagen poiseuille error
3 0.1854 0.1869 0.0015
4 0.1857 0.1869 0.0013
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.