Showing posts with label Fluid flow. Show all posts
Showing posts with label Fluid flow. Show all posts

Tuesday, September 23, 2014

Understanding Compressible Flow

Understanding the flow of compressible fluids in pipes is necessary for a robust design of process plants. The main difference between incompressible fluid, like water, and compressible fluid, vapor, is the greater change in pressure and density. This makes the calculations for compressible fluids slightly more difficult. Understanding how the fluid properties change is critical when dealing with these fluids. The ability of compressible fluids, unlike incompressible fluids, to "choke" further complicates matters.
Practical applications of this topic include sizing relief valve outlet laterals and low-pressure compressor suction lines. These pose a special challenge as the velocities and pressure changes are high.Adiabatic Flow of a Compressible Fluid Through a Conduit
Flow through pipes in a typical plant where line lengths are short, or the pipe is well insulated can be considered adiabatic. A typical situation is a pipe into which gas enters at a given pressure and temperature and flows at a rate determined by the length and diameter of the pipe and downstream pressure. As the line gets longer friction losses increase and the following occurs:
  1. Pressure decreases
  2. Density decreases
  3. Velocity increases
  4. Enthalpy decreases
  5. Entropy increases
The question is "will the velocity continue to increasing until it crosses the sonic barrier?" The answer is NO. The maximum velocity always occurs at the end of the pipe and continues to increase as the pressure drops until reaching Mach 1. The velocity cannot cross the sonic barrier in adiabatic flow through a conduit of constant cross section. If an effort is made to decrease downstream pressure further, the velocity, pressure, temperature and density remain constant at the end of the pipe corresponding to Mach 1 conditions. The excess pressure drop is dissipated by shock waves at the pipe exit due to sudden expansion. If the line length is increased to drop the pressure further the mass flux decreases, so that Mach 1 is maintained at the end of the pipe.
Analyzing the adiabatic flow using energy and mass balance yields the following analyses along with this nomenclature:
Table 1: Nomenclature
VariableDefinitionVariableDefinition
henthalpy/unit masshststagnation enthalpy
vvelocityMaMach number
ggravitational constantMmolecular weight
zelevationTtemperature
Qheat flowPpressure
Wsshaft workRgas constant
Cpspecific heat (constant pressure)Zcompressibility
rdensitygCp/Cv
Gmass flux  

Analysis One
This analysis derives the relationship between the stagnation temperature, flowing temperature, and the Mach number for a flowing ideal gas. Stagnation temperature is the temperature a flowing gas rises to when it is brought isentropically to rest, thereby converting its kinetic energy into enthalpy.
Conservation of energy requires that the energy balances:
compressible_flow1Eq. (1)
For adiabatic flow, no shaft work and for gases: Q=0, Ws=0 and dz=negligible....or:
compressible_flow2Eq. (2)
Enthalpy per unit mass of an ideal gas is defined H = Cp T
The gas, at rest, has no kinetic energy and is at its stagnation temperature (Tst), while the moving gas has kinetic energy and is at another temperature (T). The energies are therefore:
energy at rest, per unit mass = 0 + Cp Tstenergy in motion, per unit mass = v2/2 + Cp T
Equating the energy at rest and in motion:
hst= h+v2/2Eq. (3)
or
h= hst-v2/2Eq. (4)
or
compressible_flow3Eq. (5)
This implies:
  1. Stagnation enthalpy of the fluid during adiabatic flow is constant. For an ideal gas, this implies the stagnation temperature is constant.
  2. Enthalpy of the gas drops and kinetic energy increases in the direction of flow.
  3. For as given mass flux the enthalpy and density are related to each other.
A useful way of looking at this relationship is by fanno lines. The fanno lines are lines of constant mass flux plotted on an enthalpy/entropy diagram:
compressible-flow
Figure 1: Sub-sonic Flanno Flow
Cp Tst = v2/2 + Cp TEq. (6)
To make this equation useful, we must replace Cp and v by terms containing only constants and the Mach number.
Also for an ideal gas:
compressible_flow5Eq. (7)
and
compressible_flow6Eq. (8)
Substituting yields:
compressible_flow7Eq. (9)
or
compressible_flow8Eq. (10)
Thus we see that for an ideal gas the temperature decreases as velocity increases.

If the gas is flowing adiabatically, then no energy has been added or subtracted from it and Tst is constant along the length of the pipe. Knowing Tst, then the above equation can be used to find the flowing temperature from the Mach number, (or vice versa) at any position along the pipe.
Analysis Two
This analysis uses the principles of conservation of energy and mass to derive a relationship between pressure and Mach number at up and downstream conditions, for adiabatic flow in a pipe of constant cross-sectional area.
The conservation of mass requires the mass flux to be the same at any position along a pipe. Mass flux at any of these positions can be expressed in terms of density and velocity :
compressible_flow9Eq. (11)
For an ideal gas:
compressible_flow10Eq. (12)
and
compressible_flow11Eq. (13)
Substituting for density and velocity, we obtain Equation14 which relates Mach number, mass flow rate and flowing pressure and temperature:
compressible_flow12Eq. (14)
or
compressible_flow13Eq. (15)
Substituting for T from Equation 10:
compressible_flow14Eq. (16)
G is same at inlet (1) and outlet(2), so:
Â
compressible_flow15Eq. (17)
which leads to:
compressible_flow16Eq. (18)
This implies that pressure decreases as the Mach number increases. A similar analysis for temperature gives:
compressible_flow17Eq. (19)
This implies that temperature decreases as the Mach number increases. However, this is true for ideal gases only. For real gases temperature may increase!
Analysis Three
Now the momentum equation is introduced to incorporates the losses due to friction. The derivation is available in any standard textbook for compressible flow In summary the final result is:
compressible_flow18Eq. (20)
where
f= Average Darcy friction factor
L= Equivalent length of line
d= I.D. of the line
Thus this equation relates losses due to friction to inlet and outlet velocities. Solving for the unknown parameter requires a trial and error approach and is suitable for an Excel spreadsheet using the "Goal Seek" or "Solver" tools. Depending on the number of unknowns one or all three of the following equations need to be solved simultaneously:
Mass balance Equation 11
Energy balance Equation18 or 19
Momentum balance Equation 20.
In cases where the outlet velocity is defined as Mach 1, then the equation can be solved for the maximum length, which can be used to flow a certain amount of fluid through a line of known diameter. Beyond this length choked flow condition occurs and, as explained above, any further increase in pipe length will cause the flow to decrease in such a manner that velocity at the end of the pipe is still sonic ( Mach=1). This particular application is of considerable practical use in sizing blowdown lines or relief valve outlet lines relieving to the atmosphere.
Recall that the above equations have assumed that the gas is ideal. One can compensate for non-ideality to an extent by incorporating the Z factor. A rigorous approach implies solving simultaneously the momentum, energy, and mass balance equation numerically. An analytical approach, as given above for ideal gases, is useful most of the time and the results are valid for engineering purpose.
Isothermal Flow
In isothermal flow, the temperature of the gas remains constant. This simplifies matters considerably. Starting with the mechanical energy equation:
compressible_flow19Eq. (21)
Multiplying both sides by ?2:
compressible_flow20Eq. (22)
compressible_flow21


Eq. (23)
Rearranging and integrating gives:
compressible_flow22Eq. (24)
When the temperature change over the conduit is small Equation 24 can be used instead of the adiabatic Equation 20.  Adibatic flow below Mach 0.3 follows Equation 24 closely.
If Equation 24 is differentiated with respect to ?b   to obtain a maximum G then:
compressible_flow23Eq. (25)
and the exit Mach number is:
compressible_flow24Eq. (26)
This apparent choking condition for isothermal flow is not physically meaningful, as at these high speeds, and rates of expansion, isothermal conditions are not possible.
References
  1. Unit operations of Chemical Engineering- Mccabe, Smith and Hariott; McGraw-Hill
  2. Perry's Chemical Engineers' Handbook' McGraw-Hill.

    Source: http://www.cheresources.com

Using Equivalent Lengths of Valves and Fittings

How to use Equivalent Lengths of Valves and Fittings
One of the most basic calculations performed by any process engineer, whether in design or in the plant, is line sizing and pipeline pressure loss. Typically known are the flow rate, temperature and corresponding viscosity and specific gravity of the fluid that will flow through the pipe.
These properties are entered into a computer program or spreadsheet along with some pipe physical data (pipe schedule and roughness factor)
and out pops a series of line sizes with associated Reynolds Number, velocity, friction factor and pressure drop per linear dimension. The pipe size is then selected based on a compromise between the velocity and the pressure drop. With the line now sized and the pressure drop per linear dimension determined, the pressure loss from the inlet to the outlet of the pipe can be calculated.
Calculating Pressure Drop
The most commonly used equation for determining pressure drop in a straight pipe is the Darcy Weisbach equation. One common form of the equation which gives pressure drop in terms of feet of head is given below:
eqlength1Eq. (1)
The term eqlength2is commonly referred to as the Velocity Head.
Another common form of the Darcy Weisbach equation that is most often used by engineers because it gives pressure drop in units of pounds per square inch (psi) is:
eqlength3Eq. (2)
To obtain pressure drop in units of psi/100 ft, the value of 100 replaces L in Equation 2.
The total pressure drop in the pipe is typically calculated using these five steps.
  1. Determine the total length of all horizontal and vertical straight pipe runs.
  2. Determine the number of valves and fittings in the pipe. For example, there may be two gate valves, a 90o elbow and a flow thru tee.
  3. Determine the means of incorporating the valves and fittings into the Darcy equation. To accomplish this, most engineers use a table of equivalent lengths. This table lists the valve and fitting and an associated length of straight pipe of the same diameter, which will incur the same pressure loss as that valve or fitting. For example, if a 2" 90o elbow were to produce a pressure drop of 1 psi, the equivalent length would be a length of 2" straight pipe that would also give a pressure drop of 1 psi. The engineer then multiplies the quantity of each type of valve and fitting by its respective equivalent length and adds them together.
  4. The total equivalent length is usually added to the total straight pipe length obtained in step one to give a total pipe equivalent length.
  5. This total pipe equivalent length is then substituted for L in Equation 2 to obtain the pressure drop in the pipe.
See any problems with this method?
Relationship Between K, Friction Factor, and Equivalent Length
The following discussion is based on concepts found in reference 1, the CRANE Technical Paper No. 410. It is the author's opinion that this manual is the closest thing the industry has to a standard on performing various piping calculations. If the reader currently does not own this manual, it is highly recommended that it be obtained.
As in straight pipe, velocity increases through valves and fittings at the expense of head loss. This can be expressed by another form of the Darcy equation similar to Equation 1:
eqlength4Eq. (3)
When comparing Equations 1 and 3, it becomes apparent that:
eqlength5Eq. (4)
K is called the resistance coefficient and is defined as the number of velocity heads lost due to the valve or fitting. It is a measure of the following pressure losses in a valve or fitting:
  • Pipe friction in the inlet and outlet straight portions of the valve or fitting
  • Changes in direction of flow path
  • Obstructions in the flow path
  • Sudden or gradual changes in the cross-section and shape of the flow path
Pipe friction in the inlet and outlet straight portions of the valve or fitting is very small when compared to the other three. Since friction factor and Reynolds Number are mainly related to pipe friction, K can be considered to be independent of both friction factor and Reynolds Number. Therefore, K is treated as a constant for any given valve or fitting under all flow conditions, including laminar flow. Indeed, experiments showed1 that for a given valve or fitting type, the tendency is for K to vary only with valve or fitting size. Note that this is also true for the friction factor in straight clean commercial steel pipe as long as flow conditions are in the fully developed turbulent zone. It was also found that the ratio L/D tends towards a constant for all sizes of a given valve or fitting type at the same flow conditions. The ratio L/D is defined as the equivalent length of the valve or fitting in pipe diameters and L is the equivalent length itself.
In Equation 4, f therefore varies only with valve and fitting size and is independent of Reynolds Number. This only occurs if the fluid flow is in the zone of complete turbulence (see the Moody Chart in reference 1 or in any textbook on fluid flow). Consequently, f in Equation 4 is not the same f as in the Darcy equation for straight pipe, which is a function of Reynolds Number. For valves and fittings, f is the friction factor in the zone of complete turbulence and is designated ft, and the equivalent length of the valve or fitting is designated Leq. Equation 4 should now read (with D being the diameter of the valve or fitting):
eqlength6Eq. (5)
The equivalent length, Leq, is related to ft, not f, the friction factor of the flowing fluid in the pipe. Going back to step four in our five step procedure for calculating the total pressure drop in the pipe, adding the equivalent length to the straight pipe length for use in Equation 1 is fundamentally wrong.
Calculating Pressure Drop, The Correct Way
So how should we use equivalent lengths to get the pressure drop contribution of the valve or fitting? A form of Equation 1 can be used if we substitute ft for f and Leq for L (with d being the diameter of the valve or fitting):
eqlength7Eq. (6)
The pressure drop for the valves and fittings is then added to the pressure drop for the straight pipe to give the total pipe pressure drop.
Another approach would be to use the K values of the individual valves and fittings. The quantity of each type of valve and fitting is multiplied by its respective K value and added together to obtain a total K. This total K is then substituted into the following equation:
eqlength8Eq. (7)
Notice that use of equivalent length and friction factor in the pressure drop equation is eliminated, although both are still required to calculate the values of K1. As a matter of fact, there is nothing stopping the engineer from converting the straight pipe length into a K value and adding this to the K values for the valves and fittings before using Equation 7. This is accomplished by using Equation 4, where D is the pipe diameter and f is the pipeline friction factor.
How significant is the error caused by mismatching friction factors? The answer is, it depends. Below is a real world example showing the difference between the Equivalent Length method (as applied by most engineers) and the K value method to calculate pressure drop.
An Example
The fluid being pumped is 94% Sulfuric Acid through a 3", Schedule 40, Carbon Steel pipe:
Table 1: Process Data for Example Calculation
Mass Flow Rate, lb/hr63,143
Volumetric Flow Rate, gpm70
Density, lb/ft3112.47
S.G.1.802
Viscosity, cp10
Temperature, oF127
Pipe ID, in3.068
Velocity, ft/s3.04
Reynold's No12,998
Darcy Friction Factor, (f) Pipe0.02985
Pipe Line ?P/100 ft1.308
Friction Factor at Full Turbulence (ft)0.018
Straight Pipe, ft31.5
Â
Table 2: Fitting Date for Example Calculation
FittingsLeq/D1Leq2, 3
K1, 2 =
ft (L/D)
QuantityTotal LeqTotal K
90o Long Radius Elbow205.10.36210.230.72
Branch Tee6015.31.08115.341.08
Swing Check Valve5012.80.90112.780.90
Plug Valve184.60.32414.600.324
3" x 1" Reducer4None5822.68557.921822.6857.92
Total    865.6360.94
Notes:
  1. K values and Leq/D are obtained from Reference 1.
  2. K values and Leq are given in terms of the larger sized pipe.
  3. Leq is calculated using Equation 5 above.
  4. The reducer is really an expansion; the pump discharge nozzle is 1" (Schedule 80) but the connecting pipe is 3". In piping terms, there are no expanders, just reducers. It is standard to specify the reducer with the larger size shown first. The K value for the expansion is calculated as a gradual enlargement with a 30o angle.
  5. There is no L/D associated with an expansion or contraction. The equivalent length must be back calculated from the K value using Equation 5 above.
Table 3: Pressure Drop Results for Example Calculation
 Typical Equivalent
Length Method
K Value Method
Straight Pipe ?P, psiNot Applicable0.412
Total Pipe Equivalent Length ?P, psi11.734Not Applicable
Valves and Fittings ?P, psiNot Applicable6.828
Total Pipe ?P, psi11.7347.240
The line pressure drop is greater by about 4.5 psi (about 62%) using the typical equivalent length method (adding straight pipe length to the equivalent length of the fittings and valves and using the pipe line fiction factor in Equation 1).
One can argue that if the fluid is water or a hydrocarbon, the pipeline friction factor would be closer to the friction factor at full turbulence and the error would not be so great, if at all significant; and they would be correct. However hydraulic calculations, like all calculations, should be done in a correct and consistent manner. If the engineer gets into the habit of performing hydraulic calculations using fundamentally incorrect equations, he takes the risk of falling into the trap when confronted by a pumping situation as shown above.
Another point to consider is how the engineer treats a reducer when using the typical equivalent length method. As we saw above, the equivalent length of the reducer had to be back-calculated using equation 5. To do this, we had to use ft and K
Final Thoughts on K Values
The 1976 edition of the Crane Technical Paper No. 410 first discussed and used the two-friction factor method for calculating the total pressure drop in a piping system (f for straight pipe and ft for valves and fittings). Since then, Hooper2 suggested a 2-K method for calculating the pressure loss contribution for valves and fittings. His argument was that the equivalent length in pipe diameters (L/D) and K was indeed a function of Reynolds Number (at flow rates less than that obtained at fully developed turbulent flow) and the exact geometries of smaller valves and fittings. K for a given valve or fitting is a
combination of two Ks, one being the K found in CRANE Technical Paper No. 410, designated KY, and the other being defined as the K of the valve or fitting at a Reynolds Number equal to 1, designated K1. The two are related by the following equation:K = K1 / NRE + K? (1 + 1/D)
The term (1+1/D) takes into account scaling between different sizes within a given valve or fitting group. Values for K1 can be found in the reference article2 and pressure drop is then calculated using Equation 7. For flow in the fully turbulent zone and larger size valves and fittings, K becomes consistent with that given in CRANE.
Darby3 expanded on the 2-K method. He suggests adding a third K term to the mix. Darby states that the 2-K method does not accurately represent the effect of scaling the sizes of valves and fittings. The reader is encouraged to get a copy of this article.
The use of the 2-K method has been around since 1981 and does not appear to have "caught" on as of yet. Some newer commercial computer programs allow for the use of the 2-K method, but most engineers inclined to use the K method instead of the Equivalent Length method still use the procedures given in CRANE. The latest 3-K method comes from data reported in the recent CCPS Guidlines4 and appears to be destined to become the new standard; we shall see.
Conclusion
Consistency, accuracy and correctness should be what the Process Design Engineer strives for. We all add our "fat" or safety factors to theoretical calculations to account for real-world situations. It would be comforting to know that the "fat" was added to a basis using sound and fundamentally correct methods for calculations.
Nomenclature
D=Diameter, ft
d=Diameter, inches
f=Darcy friction factor
ft=Darcy friction factor in the zone of complete turbulence
g=Acceleration of gravity, ft/sec2
hL=Head loss in feet
K=Resistance coefficient or velocity head loss
K1=K for the fitting at NRE = 1
K?=K value from CRANE
L=Straight pipe length, ft
Leq=Equivalent length of valve or fitting, ft
NRE=Reynolds Number
?P=Pressure drop, psi
n=Velocity, ft/sec
W=Flow Rate, lb/hr
?=Density, lb/ft3
References
  1. Crane Co., "Flow of Fluids through Valves, Fittings and Pipe", Crane Technical Paper No. 410, New York, 1991.
  2. Hooper, W. B., The Two-K Method Predicts Head Losses in Pipe Fittings, Chem. Eng., p. 97-100, August 24, 1981.
  3. Darby, R., Correlate Pressure Drops through Fittings, Chem. Eng., p. 101-104, July, 1999.
  4. AIChE Center for Chemical Process Safety, "Guidelines for Pressure Relief and Effluent Handling systems", pp. 265-268, New York, 1998.
 Source: http://www.cheresources.com