Showing posts with label pipe. Show all posts
Showing posts with label pipe. Show all posts

Velocity Profile in a Circular Pipe

This Excel spreadsheet calculates and plots the velocity profile of a power-law fluid in a circular pipe. The spreadsheet is valid for Newtonian, pseudoplastic and dilatant fluids.

Velocity Profile of a Newtonian Liquid

The velocity profile of a Power-law fluid is given by this equation.

Equation for the velocity profile in a circular pipe
where
  • r is the radial position i.e. distance from the center line (m)
  • R is the pipe radius (m)
  • u(r) is the axial velocity (m s-1)
  • dp/dz is the axial pressure gradient (Pa m-1)
  • K is the flow consistency index (Pa sn)
  • n is the flow behavior index
The equation above is only valid for developed steady-state laminar flow in a circular pipe. The entrance length (that is, the pipe length needed to develop a steady-state velocity profile) for laminar flow is given by this correlation.

Correlation to give the entrance length necessary to fully develop steady state flow in a circular pipe
The value of n determines the relationship between the axial velocity and radial distance. If
  • n = 1, the fluid is Newtonian
  • n < 1, the fluid is pseudoplastic
  • n > 1, the fluid is dilatant
The chart below gives the velocity profile for different values of n (with all other parameters constant).


The spreadsheet is simple to use. Simply enter the parameters

Calculate the velocity profile in a spreadsheet

Excel will then plot the velocity profile from the centerline to the surface of the pipe. As expected, the velocity profile is symmetrical.

The transient velocity profile in laminar flow is more difficult to calculate; this requires the numerical solution of a partial differential equation via a finite difference scheme. This will be the subject of another spreadsheet.

Download Spreadsheet to Calculate the Velocity Profile in a Circular Pipe

Heat Loss From An Insulated Pipe

This Excel spreadsheet models heat loss from an insulated pipe. This is a very common system in the process industries - insulated pipes are everywhere, and engineers need a sound grasp of heat transfer principles to model their effects. Although the model in the spreadsheet is simplified to aid understanding, complexity can be easily added.

Liquid flows through the pipe, with heat exchanged with the insulation. Heat is lost from the insulation to the environment via convection (no radiation losses are considered). The thermal effects of the pipe wall are ignored (although this can be easily implemented).



Cross-Section of Insulated Pipe

These equations are used in the spreadsheet to define the heat transfer process.

  • q is the heat flowrate through the pipe and insulation (W m-1)
  • Ts is the temperature at the surface of the insulation (K)
  • Ta is the ambient air temperature (K)
  • Tf is the fluid temperature inside the pipe (K)
  • DO is the pipe diameter (m)
  • DS is the outside diameter of the insulated pipe (i.e. the pipe diameter plus two times the insulation thickness) (m)
  • k is the insulation thermal conductivity (W m-1 K-1)
  • ΔT is the temperature difference between the insulation surface and ambient air Ts-T(K)
  • hs is the insulation-to-air heat surface heat transfer coefficient (W m2 K-1)
The equation for the surface heat transfer hs coefficient is a correlation; any other valid relationship can be substituted.

The equations are implicit - the heat transfer coefficient is a function of the surface temperature Ts, but the surface temperature is a function of the heat transfer coefficient. 

Hence the equations need to be solved iteratively with Goal Seek in Excel. Simply 
  • break the loop by estimating a value of Ts
  • use this to calculate all other properties (including the heat transfer rate)
  • use the heat transfer rate to backcalculate Ts
  • use Goal Seek to make the two values of Ts equal by varying the estimated value of Ts (or any other parameter
You can easily modify the heat transfer equations to include more complex effects, such as effect of fouling on the pipe surface, multiple layers of different insulation, radiative losses, thick large pipe walls (which act as a heat sink) etc.


Calculate Least Cost Pipe Diameter and Flow Velocity with Excel

Generally, engineers choose pipe diameters and flow velocities which minimize the total cost of the pipeline over the whole pipeline lifecyle.  The total cost is the sum of the capital costs and operational costs. 

This Excel spreadsheet calculates the least total cost pipe diameter and flow velocity for a pipe, given the desired construction material, flowrate, viscosity and density.


It uses the Generaux Equation and the empirical cost parameters as given the in the January 2010 article in Chemical Engineering "Updating the Rules for Pipe Sizing".  The Generaux Equation is an empirical correlation that takes into account the
  • annual depreciation and maintenance for the pipe
  • annual depreciation of the associated pumping equipment
  • installed cost of the pipe
  • fractional efficiency of pump
  • installation and fitting costs
  • energy cost to power the pump motor
  • friction in the pipe fittings
  • installation cost of the pump
  • cost of the pipe
  • number of operating days per year
  • taxes and other expenses
  • fluid density, viscosity and the desired flowrate
The calculation is iterative and uses Excel's Goal Seek Functionality.  

The spreadsheet enables you to choose from empircal cost parameters for 1998 and 2008, for a range of materials. Generally, least-cost flow velocities have decreased over time because energy costs have increased.

Instructions
  1. Specify the construction material (choose either Carbon Steel, Stainless Steel, Alumimum or Brass), fluid density and fluid viscosity
  2.  Click the Optimize button to initial Excel's Goal Seek function

Balancing a Pump Curve against a System Curve

Introduction
This article will demonstrate how you can balance a pump curve against a system curve to calculate liquid velocity with Excel.

First, we'll develop the equations that determine the liquid velocity in a simple pump and pipe system.  Then we'll discuss how these equations be solved using Excel's Goal Seek feature. Finally, we'll show Visual Basic code that can be used to automate Goal Seek so that any parameter change will automatically calculate the new liquid velocity.

The spreadsheet can be downloaded here, but read the rest of this article if you'd like to understand the theory.

Pump and Pipe System
Consider a centrifugal pump receiving liquid from a reservoir and forcing liquid through a pipe to a reservoir.


First consider the pump.  Its flowrate-head curve is can be described by a polynomial derived from empirical data, where a, b and c are best-fit coefficients, and Q is the volumetric flowrate

Equation 1
But the volumetric flowrate is

Equation 2
where A is the cross-sectional area of the pipe and V is the liquid velocity through the pipe.  Substituting Equation 2 into Equation 1 to eliminate Q gives

Equation 3
This equation now describes the head produced by the pump as a function of the liquid velocity through the pipe.

Now consider the pipe.  Frictional head loss through the pipe can be described by the Bernoulli equation and written as

Equation 4
We'll call Equation 4 the System Curve. f is the friction factor, given by the Haaland Equation.  

Equation 5
 where Re is the Reynolds Number.

Equation 6
The Haaland equation is only valid in turbulent flow, i.e. if the Reynolds Number is over 2500. 

For our pump and pipe system, the pump head is equal to the head loss in the pipe.  Hence
Equation 7
We can now use Excel to find the liquid velocity that satisfies Equation 7 (effectively determining the intersection between the pump curve and the system curve).

Excel Implementation
The Excel spreadsheet uses this cell coloring convention.


Step 1.  First define the parameters and calculate the cross-sectional area of the pipe.

Step 2. Now define the coefficients of the pump curve


Step 3. Set up the calculations required by Goal Seek


Step 4. Go to Data > What-If Analysis > Goal Seek.  Make the changes such that we find the liquid velocity that makes difference between pump curve and the system curve equal to zero.


You should now have the correct value of the liquid velocity.


Ensure that the Reynolds number is greater than 2500 so that our assumption of turbulent flow (and hence the use of the Haaland equation) is verified.

Visual Basic Macro to Automate Goal Seek
If you're really keen, you can use Visual Basic to automate Goal Seek.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim bSuccess As Boolean
    On Error Resume Next
    bSuccess = Range("C23").GoalSeek(0, Range("c18"))
    On Error GoTo 0
    If Not bSuccess Then
        MsgBox "Goal Seek Failed"
    End If
End Sub

Whenever any value in the worksheet is changed, the Worksheet_Change() event is initiated .  The VB code then asks GoalSeek() to find the liquid velocity ("C18") that makes the difference between the pump and system curve ("C23") equal to zero.