Challenge

Week 10 - Simulation of Flow through a pipe in OpenFoam

AIM:-

In this challenge, You will simulate an axi-symmetric flow applying the wedge boundary condition. The flow is laminar and flows through a constant cross-section pipe at an inlet Reynold's number of 2100. You can do a transient or steady state simulation and you will validate your results with the Hogen- Poiseuille's equations for the fully developed flow.

You will also write code in matlab to automate the generation of block Mesh Dict file. The code should take inputs inputs like pipe length,diameter, wedge angle ect and output a fully functional block Mesh Dict file.

Hint

You can create a wedge from a hex block by collapsing it's bottom face ( by merging both sets of adjacent vertices) wedge angle should be less than 5°

You can assume the pipe diameter .

The cross – section of the wedge is as shown below,

The cross -section of the


SIMULATION PROCEDURE:-

Problem setup:-

We firs initialize the problem by navigating to the tutorials directory by OpenFoam by usinf the "tut" command in the terminal window. From the tutorials ,we have to figure out the suitable case files for our given problem, which is an axi -symmetric laminar flow through a constant cross section pipe. We use "ls" command to list the contents files or directories present inside the directory.


As it is an incompressible flow, we navigate into the incompressible directory. WE use the "cd" command to navigate and change the working directory using the terminal window.


The next step involves navigating into the iocFoam directory ,as the type of colver for this problem is icofaom . the iocfoam command solves the incompressible laminar navies-srockes equations. This code inherently transient,eruiring an initial condition such as zero velocity and boundary conditions.

Here ,we use the cavity utility to create our required domain . We copy this directory into the FOAMRUNfile,wnichisadefaultfileOpenFoamcreatesfoeus.Weuse"cpr"commandtorecursivelycreatyofthecontentsofthefileordirectoryintotheFOAMRUNfile,wnichisadefaultfileOpenFoamcreatesfoeus.Weuse"cpr"commandtorecursivelycreatyofthecontentsofthefileordirectoryintotheFOAM_RUN folder undwer the file name "Flow Through pipe" for personal use .We create a copy of the files as OpenFoam does not let us modify or make changes to its inbuilt tutorial files.

we then navigate to the copies tutorial file in $FOAM_RUN directory to view the contents inside the folder.


Output of program Geometry:-



We create a cross section of the pipe ,i.e; a wedge gemetry, with a wedge angle of 4* as shown below.

Block Mesh Dict file:-

Modified Symmetry:-

Modified file Wedge:-

Running of the file:-

open in para View:-


Surface With Edges:-

Results and Graphs:-



Matlab Program :-

Output of the Matlab program same as blockMeshDict.tex file foam coding in below the figer as openFoam:-


program copying in direct :-

carefullest ruining program coding OpenFoam :-


Hagen_Poiseuille's Thery:-

In nonideal fluid dynamics ,the Hagen-Poiseuille equation ,also known as the hagen-poiseulle law,Poiseullelaw or Poiseuille equation, is phusical law that gives the pressure drop in an in-compressible and Newtonian fluid in laminar flow flowing through a long cylindrical pipe of constant ceoss section.

The assumptions of the equation are the fluid is incompressible and Newtonian; the flow is laminar through a pipe of constant circular cross-section that is substantially longer than is diameter; and there is no acceleration of fluid in the pipe.

The pressure drop in incompressible and newtonian fluid in laminar flow through a long cylinder pipe of constant cross-section can be derived sa

The assumptions of the equation are that the fluid is incompressible and Newtonian; the flow is laminar through a pipe of constant circular cross-section that is substantially longer than its diameter; and there is no acceleration of fluid in the pipe.

The pressure drop in an incompressible and Newtonian fluid in laminar flow through a long cylindrical pipe of constant cross – section can be derived as,

p = 8mue VLR^2= 32 mueVLD^2

Where, p= pressuer Difference Between the two ends(p1-p2)

L =length of pipe

meu = Dynamic viscosity

V = velocity of Fluid

R =pipe radius

D = pipe Diameter.

The ratio of length to radius of a pipe should be greater than one forty-eighth of the Reynolds number for the Hagen–Poiseuille law to be valid. If the pipe is too short, the Hagen–Poiseuille equation may result in unphysically high flow rates.

A few examples in which the Hagen–Poiseuille law is practically applied is the air flow in lung alveoli, or the flow through a drinking straw or through a hypodermic needle. It is also applied for the process of blood flow through a narrow constriction.


p= 8mue*v*l/r^2 =32mue*VL/D^2 p= 8mue*v*l/r^2 =32mue*VL/D^2

Where,

PΔpΔpRe =2100 Pressure difference between the two ends(p1-p2)5D

LD=0.02 Length of the pip

mue M = Dynamic V = Velocity of Fluid

V = Velocity of Fluid

D2= 0.01 pipe radius

DM = pipe Diameter

The ratio of length to radius of a pipe should be greater than one forty-eighth of the Reynolds number for the Hagen–Poiseuille law to be valid. If the pipe is too short, the Hagen–Poiseuille equation may result in unphysically high flow rates.

A few examples in which the Hagen–Poiseuille law is practically applied is the air flow in lung alveoli, or the flow through a drinking straw or through a hypodermic needle. It is also applied for the process of blood flow through a narrow constriction.

Equations and Calculations:-

We are considering the working fluid flowing inside the cross section of the pipe to be Air at an ambient temperature of

Given Data :-

Geometry of the flow is axi - symmetric.The flow is laminar and flows through a constant cross section.

  1. The flow is laminar and flows through a constant cross section.

  2. Inlet Reynold’s Number, Re= 2100reo=997.

Wedge angle should be less than 5Dkgm^3

Analytical solution ameter of the pipe

:- CONCLUSIONS:

From the above study,we have successfully simulated an axi-symmetric flow by applying the wedge boundary condition across aconstant criss section pipe ,for an inlet Reynold's of 2100 and a wedgr angle of 4*

:-The Matlab code to automate the generation of of the block Mesh Dict File has been successfully written ,which takes the provided inputs and outputs a fully functional blockMeshDict files as shown above.

:-From the simulation run we obtain our respective

From the simulation run, we obtain our respective and as shown above. To study the velocity profiles, we carry out a test to study the flow characteristics at different regions of the pipe. We study the velocity profile plots at of the pipe, at a distance of from the inlet of the pipe.

:- From the plots obtained, we can observe that the fluid velocity at the walls of the pipe remains , due to the we have provided. We can also observe that the velocity profiles slowly develop and become more and more sharper () as the distance from the inlet increases.From the simulation run, we obtain our respective and as shown above. To study the velocity profiles, we carry out a test to study the flow characteristics at different regions of the pipe. We study the velocity profile plots at of the pipe, at a distance of from the inlet of the pipe.

:- from the simulation run ,We obtain our respective Wedge Geometry and velocity profiles aas show above . To study the velocity profile ,we carry out a test to study the flow characteristic and different regions of the pipe .

We study the velocity profile plots at regions of t he pipe,Distance of 2.8m(outlet) from the inlet of the pipe.

:- from the plots outlined,We can observe that the fluid velocity at the walls of the pipe remains Zero,due to the no_slip boundary condition we have provide .we can also observe that velocity profiles slowly develop and decome and more sharper (parabolic) as the distance from the inlet increases.of the pipe ,which is referred to as the of pipe

:- Due to the no -slip conditions at the walls of the pipe ,the abjacent of the fluid tend to slow down as the flow progresses,due to friction created between these layers .This leads to an increase in velocity of the at the centre of the pipe As a result ,the velocity profiles keep developing as the distance from the inlet increasea and the fluid reaches Mamximum velocity at the outlet of the pipe ,which is refrred to as the fully developed region

:- From the pressure plots obtained from the simulation, we can observe that the fluid pressure is the highest at the inlet of the pipe and theredy,we can say that the pressure drop obtained from this simulation obeys the Hagen-Poiseuille'sTheory.

:-Shear Stresses are developed in the fluid as a result of relative motion of the fluid layers adjacent to the walls of the pipe ,Which are provided with a no-slip boundary condition,leading to the walls of the pipe being Zero.From the shear steer's plot obtained, we can observe that the stresses are maximum at the walls of the pipe and it slowly decrease as it reaches the center of the pipe,as the relative friction between the layers slowly decrease.

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.