11 - Simulation of Flow Through a Pipe Part 1 2


This project objective is to be able to accurately simulate the laminar incompressible flow through a pipe. The project will be broken into two different parts. This first part of the project will be focused on the simulation set-up. Based on a desired Reynols number and pipe diameter, the inner velocity and the minimun lenght of the pipe (for fully developed flow) must be calculated. This problem can be computationally expensive, and that is why symmetry conditions will be considered. Instead of simulating all the pipe, it will also have to be determined what is the minimun wedge angle that should be analyzed to realistically simulate the flow. For this, a Matlab program will be written automatically generate the computational mesh for any wedge angle and grading schemes. Afterwards, a comparisson with the computational results (velocity and shear stress) between the simulation and the Hagen Poiseuille's solution will be performed.

1) Preliminary Data

The first step of the project is to establish the properties for the flow and pipe simulated. The properties assumed for this project are:

  1. Reynolds number(Re) = 2100
  2. Diameter of Pipe(D) = 0.02m
  3. Dynamic Viscosity(µ) = 0.00102 Pa.s, for water at 20C.
  4. Density(ρ) = 998.2 kg/m3
  5. Kinematic Viscosty(nu) = 1.0218 e-6 m2/s

2) Analytical Solution - Hagen Poiseuille

Assuming a fully-developed flow, the Navier Stoke Integral Equations lead to the following results (Hagen Poiseuille Equations is based on these same assumptions).

  1. Velocity(v) = Re*µ/(ρ*D) = 0.108 m/s
  2. Max Velocity = 2*v = 0.2159 m/s
  3. Entry length=0.06*Re*D = 2.1m 
  4. L=Le=2.1 m (To make sure our pipe is long enough)
  5. PressureDrop = 8*µ*V*L/(R^2) = 43.2971 Pa 

 3) Geometry and Meshing

 Among this project objectives, we wanted to somehow create an automated way to analyze the problem for different wedge angles (Part 2 of this project). For this, a Matlab program was developed that created the geometry and Mesh automatically. This matlab script can be found here:



4) Boundary and Initial Conditions

When solving circulating internal flow, the most common boundary conditions are to fix an inlet velocity and an outlet pressure. The inlet velocity has been previously calculated from the Reynolds number and the fluid properties. The outlet pressure must be the ambient pressure (constant), and the pressure drop through the pipe is what must be compared with the analytical solution we got.

Regarding the boundary and initial conditions, we want to highlight the following. In the U dictionary, a new type of boundary conditions was employed: inletOutlet. By applying this BC in the pipe, the outlet velocity will always be adapted to the conditions according to zeroGradient, except if there is an inflow at the outlet patch. In this case, the value specified under the inletOutlet condition is assgined to this inflow velocity, so the flow will always be outgoing.

Some iterations were needed in order to determine what was the optimum size of the cells, and their distribution, in order to achieve accuracy in the results, but employing the minimum amount of time possible. The final mesh is shown here:


5) Postprocesing Results:

Velocity Contour:

At the inlet


Fully Developed Profile

Pressure Contour:


Velocity Profiles:

At the entrance of the pipe:

At the middle of the pipe:


At the end of the pipe(fully developed):



From the above plots we can see that the flow is not fully developed at the inlet. However, when the flow advances through the pipe, the flow starts being fully developed,and at the end the velocity profile is almost identical than the analytical solution. This is the result that was expected as a consequence of choosing the length of the pipe based on the entry lenght of the problem. Further graphical comparison will be carried out in the second part of the project.

Pressure Drop:


The pressure drop through the pipe can be computed from this previous graph. In here, the kinematic pressure drop is around 0.0433 m2/s2. In order to change to SI, we just need to multiply by the density of the fluid, obtaining a value of 43.2134 Pa. This results is almost the same than the analytical solution.

Shear Stress:

Exporting the velocity profile to an Excel sheet, the shear stress profile at the exit can be computed.


The shear stress is given by the formula 

τ=-μ ∂u/∂y

The values of the derivative can be calculated by regression for the numerical values, and just applying the derivative to the analytical solution. For the analytical solution, the shear stress follows the formula


The maximum analytical value (shear stress at the wall) is 0.044 Pa, similar to the one obtained from the numerical results (see the graph above).

Projects by Jorge Martinez

The purpose of this project is to show the effect of initial temperature and pressure in the ignition delay in a combustion process. For this purpose, a Constant Volume Reactor and the corresponding network objects are created in Cantera, and the combustion process is s Read more

The purpose of this project, is to setup and analyze a transient shock tube simulation using Converge Studio. The project will analyze how the interaction of the original shock waves and the reflected waves affect the fluid in the tube, and how the computational mesh ha Read more

The purpose of this project is to simulate the conjugate heat transfer in a pipe using Converge Studio. For this, an air flow is simulated through an aluminum pipe, which is receiveing a constant heat flux of 10,000 W/m2 at the outside wall. The objective is to understa Read more

This project objective is to simulate the Prandtl Meyer shock wave phenomena using Converge Studio. First, a quick literature review about shock waves and their boundary conditions is provided. Then , the problem is set up and solved, focusing in how the different param Read more

The purpose of this assignment is to create a Python program including a Multivariate Newton Rhapson Solver, to solve a non-linear coupled differential system. This method is really useful for stiff systems, where the explicit solver are unstable. The system of equatio Read more

The objective of this part of the project, is to simulate the transient flow through an elbow pipe with a throttle valve in the middle. This valve will be rotating from zero to 25 degrees, and then stay steady.  Case Setup. In the steady state part of the project Read more

This project purpose is to simulate the flow over an elbow body that contains a throttle using CONVERGE Studio. In this first part of the project, an steady state analysis will be set up. This means that the throttle will not move. This case helps set up the real analys Read more

In this challenge, the efficiency of using a heat recuperator to pre-heat the air is analyzed. For that, we simulate a furnace burning methane and air mixture, and we analyze first how the pre-heating affects at the AFL, and then the total heat/work that could be extrac Read more

This project main objective is to calculate the Adiabatic Flame Temperature using Python and Cantera. In the first part of the project, the effect of the equivalence ratio for the methane combustion in a constant volume chamber is analyzed, and the python and cantera re Read more

This projects aims to simulate a backward facing step flow using CONVERGE Studio. The flow is creating when a not reacting specie, air (23% O2 and 77% N2 in mass fraction), suffers a pressure gradient between the ends of the channel. The velocity, pressure and recirulat Read more


The End