Hydraulic Calculations Using Mathcad - Part 1: Simple .

2y ago
8 Views
3 Downloads
989.08 KB
17 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Abby Duckworth
Transcription

PDHonline Course H141 (1 PDH)Hydraulic Calculations Using Mathcad Part 1: Simple PipelinesInstructor: D.M. Griffin, Jr. Ph.D., P.E., D.WRE2012PDH Online PDH Center5272 Meadow Estates DriveFairfax, VA 22030-6658Phone & Fax: 703-988-0088www.PDHonline.orgwww.PDHcenter.comAn Approved Continuing Education Provider

www.PDHcenter.comPDH Course H141www.PDHonline.orgHydraulic Calculations Using Mathcad - Part 1. Simple PipelinesD.M. Griffin, Jr., P.E., PhDPDHonlineCOURSE CONTENTINTRODUCTIONThe purpose of this course is to introduce the student the use of Mathcad for solvingsimple pipeline problems quickly and efficiently. Mathcad is unique in its free form inputstyle. Because of the ease with which Mathcad documents can be understood it is currentlyone of the most popular applications for doing engineering calculations on the market. Intoday's economy any tool which improves the accuracy and efficiency of engineeringcalculations will improve a company's bottom line. In this course we will illustrate how tosolve a simple pipeline problem using a Mathcad solve block. Along the way suggestionswill be provided to help the user create the most efficient and useful Mathcad files.PIPELINE HYDRAULICSPipelines are a common sight in the world today, carrying everything from waste water to oil.The need to determine the appropriate size of a pipeline to carry a specific discharge or tocompute the discharge from a pipeline is often one of the first assignments given to a newengineering graduate. The solution to such problems often involves one or more of theequations listed below.The energy equation:p1γ z1 v122 g hL hminor hp The Reynolds number equation: NR The Colebrook White Equation:copyright 2009 D.M. Griffinp2γ z2 v222 gρ D vμ ε 1 D2.51 2 log 3.7fNR f page 2 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgThe continuity equation: Q A1 v1 A2 v22L vThe Darcy Weisbach Equation: hL f used to compute pipeline friction lossD 2 gEquations for various minor losses (valves, bends, diffusers, confusors, generally of the2vform: hminor K 2 gAll of the equations above are in Mathcad. The equals sign should be noted. Mathcad hasseveral different forms of equals signs depending on what operation is being carried out.This form of equals sign is obtained by clicking on view toolbars Booleanand clicking on the equals sign in the upper left corner. This form of equals is used whensimply typing equations as part of an explanation as done here or when doing certainsymbolic or numerical calculations as you will see later. The remaining variables aredefined below:p1 is the pressure at point 1 in the systemp2 is the pressure at point 2 in the systemγ is the unit weight of waterz1 and z2 are the elevation of point 1 and point 2 relative to a user chosen datumL is the pipe lengthD is the pipe diameterρ is the density of waterf is the Darcy Weisbach friction factorv1 and v2 are the velocities at points 1 and 2K is a minor loss coefficientε the equivalent roughness of the pipe materialcopyright 2009 D.M. Griffinpage 3 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgTHE SYSTEMIn order to understand how we apply these equations using Mathcad we must first define a"system" . The system I have chosen is shown below. We want to know the pressure atpoint 2 for a specified flow rate. However to do this we will need to find the Darcy Weisbachfriction factor and the Reynolds number as well.copyright 2009 D.M. Griffinpage 4 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgA SIMPLE PROBLEMThe schematic above shows the hydraulic components required to convey water from anelevated tank to a point in an 8 inch diameter pipeline. Now, if you examine most currenttextbooks and design manuals problems such as these are often solved used some type ofmanual, trial and error approach involving the Moody diagram. Such procedures aretedious, time consuming, and prone to error. That is not the case here. Our approachhere will be to first determine the "unknowns", that is what we need to determine in orderto solve the problem, obviously we want the pressure p at the residence for a specifiedgalflow rate, Q : 1200 . However, a little study shows that, in addition, we will need tominfind the velocity in the pipe, Darcy Weisbach friction factor for the pipe, and the ReynoldsNumber. Thus we will need to solve three independent equations containing the variablessimultaneously. One of the equations is nonlinear and one, the Colebrook White Equation,is transcendental meaning that f appears on both sides of the equation and cannot beisolated. This would be a daunting problem to solve manually, here we will use a MathcadSolve Block. A Mathcad solve block is a numerical algorithm designed to solve multipleequations for multiple unknowns. It can use one of several user chosen numericalmethods to do this however, the Levenberg Marquardt algorithm is usually the mostrobust. How to select the numerical method to use will be described below.KNOWN VALUES AND A WORD ABOUT UNITSThus far we have not said much about the use of units in Mathcad. Units and the errorsarising from them cause numerous mistakes when manually solving even simpleengineering problems. This results in lost time, money, and even lawsuits in extremecases. Excel is unit ignorant and offers little help. Mathcad however is capable of utilizingseveral different unit systems and enforces dimensional consistency thus all buteliminating unit conversions and errors resulting from units. Below we enter the knowvalues for this problem with units.The elevation of point 1, the water surface in the elevated tank: z1 : 200 ft. Here I haveattached units of feet however Mathcad does all needed unit conversions so if I want thiselevation in meters I simply type z1 200 ft backspace over ft, and type "m", theMathcad unit for meters, z1 60.96 m Mathcad has done the unit conversion. Ifdimensional consistency is not present Mathcad will issue an error to that effect. To seethe possible unit systems click Tools Worksheet options Unit System.To see the available units in Mathcad click on Insert Unitcopyright 2009 D.M. Griffinpage 5 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgKnown values with units:I have found that maximum computational efficiency results if every known value isassigned a variable name early in the file and to the maximum extent possible have nonumerical values in the file. This avoids having to search for each occurrence of a value incase of an error or if a change in a problem parameter is necessary or desirable. (supposeyou had worked this problem manually, then were told to change the pipe diameter !)pressure at point 1 : p1 : 0 psiftvelocity at point 1: v1 : 0 secelevations : z1 : 200ft, z2 : 0 ftproperties of water: unit weight γ : 62.4 lbfft 5 lbf secabsolute viscosity μ : 2.735 10 2ftpipeline length : , L8 : 1200 ft3,density ρ : γgLoss coefficients : , Kcheck : 10, Kbend : 1.5equivalent roughness of pipe materials : ε : 0.00085 ft,pipe diameters: D8 : 8 inflow rate : Q : 1200 galminThe "relative roughness" is defined ascopyright 2009 D.M. Griffinε 3 1.275 10D8page 6 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgGiven the pipe diameter we can compute its area: A8 : v8 : π D82,4and the velocityQft 7.659 A8secTHE STRUCTURE OF A SOLVE BLOCKA solve block starts with the word "Given" typed in Math mode (the cursor is blue, it's redin text mode). The equations to be solved are typed below "Given" using the symbolicequals sign (cntl ). The number of equations must match the number of unknowns.Descriptive text can be placed inside the solve block as well. Our unknowns are thepressure at point 2, the D-W friction factor and the Reynolds number.SOLVE BLOCK STARTS HEREGivenIMPORTANT - "Given" must be typed in Math modeINITIAL GUESSES:A Mathcad solve block requires an initial guess for each of the unknowns being sought,these are supplied belowp2 : 1 psif8 : .03NR : 106All that is important here is that the units be correct, they do not need to be in the same unitsystem, Mathcad handles all unit conversions.The energy equation written between the water surface in the elevated tank and the pointin the 8" pipe at which the pressure and flow are desired. The line friction loss and minorlosses are included, but no pump term is included because there is no pump in thesystem.copyright 2009 D.M. Griffinpage 7 of 17

www.PDHcenter.comp1PDH Course H141v122www.PDHonline.org222L 8 v8v8v8p2v8 z1 f8 Kcheck 3 Kbend z2 γ2 gD8 2 g2g2gγ2 gThe Colebrook - White equation is the mathematical equivalent of the Moody Diagram, notethat it is transcendental in nature. ε D 18 2.51 2 log 3.7f8NR f8 The Reynolds Number NR ρ D 8 v8μThe solution set to this problem is written as a "vector" containing the three unknowns weare looking for. This is accomplished by clicking on Insert matrix and then filling inthe desired number of rows and columns, in this case 3 rows, 1 columnThe variable names holding the solution values (on the left) should be different than thevariable names of the actual unknowns. p2soln f8soln : Find ( p2 , f8 , NR) NRsoln In order to select the numerical search algorithm to be used to search for the solution clickon the word "Find" on the right hand side of the statement above: Find nonlinear.The user then has the choice of clicking on the Levenberg-Marquardt, conjugate-gradient,or quasi-Newton methods. I have found the Levenberg-Marquardt to be the most robust atfinding solutions.copyright 2009 D.M. Griffinpage 8 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgThe solution values are shown below, because this is a numerical procedure there is noabsolute guarantee they are correct as would be the case if an analytical solution had beenpossible. For this reason it is desirable substitute the solution values into the governingequations and verify that an identity results.p2soln 65.227 psif8soln 0.022NRsoln 3.621 105CHECK THE GOVERNING EQUATIONSIn doing this I usually use what I call the "ratio form" of an identity. That is, I set the left sideover the right side which will result in 1.0 if solution values are correct.p1v12222L 8 v8v8v8 z1 f8soln Kcheck 3 Kbend γ2 g2g2gD8 2 gp2solnγ z2 v82 12 g1f8soln ε D82.51 2 log 3.7 NRsoln f8soln 1NRsoln ρ D 8 v8 μ 1FURTHER EXAMINATION OF THE SOLUTION3 galQ : A8 v8 1.2 10 mincopyright 2009 D.M. Griffinpage 9 of 17

www.PDHcenter.comPDH Course H1413 galIn the problem the resulting flow rate is Q 1.2 10 www.PDHonline.org. We know that if the flow rateminis zero the static line pressure will be: pstatic : γ z1 86.667 psi . The pressure atpoint 2 is p2soln 65.227 psi . Therefore the pipeline losses and minor losses shouldapproximately equal the difference pstatic p2soln 21.44 psi as shown below.The computed sum of the pipe friction loss and minor losses equals:222 L 8 v8v8v8 Energy loss : f8soln Kcheck 3 Kbend γ 21.045 psi D8 2 g2g2g This results in a loss rate ofpsiEnergy loss 0.018 ftL8Also, we can demonstrate that the minor losses are not so minor after all, they representnearly 30% of the total system loss:22 v8v8 Kcheck 2g 3 Kbend 2g γ 5.728 psi The solution value for the Darcy Weisbach friction falls in the transition zone of the Moodydiagram implying that f depends on BOTH the relative roughness and the Reynoldsnumber. If we had assumed wholly turbulent flow in which case f would depend only onthe relative roughness our resulting value of f would have been underestimated by a smallamount. In a number of texts, particularly early ones the assumption of wholly turbulentflow was often made in order to simplify calculations. However, given the widespread useof PVC and other plastic materials for pipe this practice is not advised since these materialsoften have relative roughness values that routinely place the flow in the transition zone.This is illustrated in the problem in Appendix 1.copyright 2009 D.M. Griffinpage 10 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgMOODY DIAGRAMExtending MathcadAt this point a number of "what if " scenarios can be tried by simply changing any one of theparameter values. Examples of such changes might be:1. change the liquid viscosity to examine the effect of temperature2. change the pipe diameter, length, pipe material (equivalentroughness)copyright 2009 D.M. Griffinpage 11 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.org3. change the tank elevation4. Change the flow rate5. Change the pressure in the tank (to simulate a hydro pneumaticpressure tank, for example)Anyone that has completed this course material and has an elementary knowledge ofpipeline hydraulics can see that the solution technique used here can easily be extrapolatedto multiple pipe sizes in series or parallel. In addition, pumps can be incorporated in thesystem if an equation for the pump characteristic is known or can be developed from data.Such systems may be explored in future courses.Appendix 1The effect of the wholly turbulent flow assumption on pipe dischargePROBLEM: Find the water flow for the following system.copyright 2009 D.M. Griffinpage 12 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgWater flow steadily down the inclined, 3/4 in diameter, copper pipe shown in the Figure. Twopressure gages 100' apart indicate identical pressures. Find the volumetric flow rate. Workthe problem assuming fully developed, turbulent flow as well as using a complete solution,without assuming complete turbulence. NOTE that the pressure readings are identical. Thisoccurs because energy loss due to friction is exactly balanced by the change in elevationhead. In the absence of a pump this could not occur if the pipe was horizontal. If the pipewere horizontal AND the pressure drop was zero there would be no flow. Note that wecannot predict this using precisely zero and the equations below because we end up withV 0 which results in a zero in the denominator of one of the terms in the C-W equation.KNOWN VALUESLength : 100 ft ε : .000005 ftν : 1.22 10D : .75 inA : relative roughness : 5 ft π D2secθ : 30 deglbfft24γ : 62.4 0.442 in32ε 5 8 10Dvertical distance between gages: Length sin ( θ) 50 ftWrite Bernoulli's equation between the pressure gages:p1γ z1 V12p2 hL 2 gγ z2 V222 g.In doing so we see that the difference in elevation between the ends of the pipe apparentlybalances the friciton loss.()Δp z2 z1 hL 0γhL : Length sin ( θ) from Bernoulli's equation belowcopyright 2009 D.M. Griffinpage 13 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgComplete Solution, no assumption of wholly turbulent flowNow, since the pipe diameter remains constant and, according to the problem statement,the pressure readings are identical the head loss term becomes:ΔpΔphL z1 z2 Length sin ( θ) . That is the total energy loss is the sum ofγγthe change in elevation and the friction loss within the pipe.()2L V. The friction loss is also obtainable using the Darcy Weisbach equation: hL f D 2 gThe immediate problem is that we don't know f or V so we can't get Q. We need moreequations. We can make use of the Colebrook-White equation to get f:0.25f ε log D 2.51 3.7NR f 2Colebrook - White equationHowever, the Colebrook White equations presents 2 problems of its own - (1.) It's atranscendental equation and must be solved iteratively and (2.) It involves the Reynoldsnumber which involves V, which we do not know.In summary then have 3 independent equations and three unknowns, f, V and NR. We canuse a solve block to obtain a solution.The headloss is NOT unknown, but obtained from the difference in elevation of the twoends of the pipe: hL 50 ftinitial guesses for unknowns: f : .012, V : .3 copyright 2009 D.M. Griffinft6and N R : 10secpage 14 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgSOLVE BLOCK - 3 equations - 2 of them nonlinear, 1 of those transcendentalGiven2hL f Length V D2 gDarcy Weisbach equation0.25f ε log D 2.51 3.7NR f NR D RESULTSVνColebrook White equationReynolds number fsoln V soln : Find ( f , V , NR) NRsoln fsoln 0.0212Vsoln 2.97Q 13.41544NRsoln 4.991 10msπ DA : 4copyright 2009 D.M. Griffin2galmin4ε 5 8 10D2Q : A Vsolnvolumetric flow ratepage 15 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgThe volumetric flow rate varies with the angle of inclination as shown for zero pressuredropinclination, degrees.001 deg10 deg20 deg30 deg50 deg90 degflowrate, gpm0.0297.410.813.417.0219.7Assume Complete TurbulenceIF we assume completely turbulent flow then the value of the friction factor, f, dependsonly on the relative roughness of the pipe. This being the case, we obtain a value ofgal.0125 for f and a corresponding value of Q 13.415 for the flowrate.minf : .0125from the Moody diagram, corresponding to relative roughness of the pipe2Length VhL f 2 gD1V : 1122 2 f Length hL D gf Length()V 12.683 Qturbulent : A VgalQturbulent 17.465 minQturbulentQcopyright 2009 D.M. GriffinftsecQ 13.415 galmin 1.302page 16 of 17

www.PDHcenter.comPDH Course H141www.PDHonline.orgThe completely turbulent approach gives a flow about 30% higher than the completesolutioncopyright 2009 D.M. Griffinpage 17 of 17

A Mathcad solve block is a numerical algorithm designed to solve multiple equations for multiple unknowns. It can use one of several user chosen numerical . on the word "Find" on the right hand side of the statement above: Find nonlinear. The user then has the choice of

Related Documents:

PTC Mathcad Prime 4.0 PTC Mathcad Prime 5 PTC Mathcad Prime 4.0 M010 PTC Mathcad Prime 7 Prime 8 2022 PTC Mathcad Prime 6 PTC Mathcad Prime x.0 Major releases with new functionality From 2016, yearly frequency to match subscription period Prime

41. Simplify MathCAD polynomials 42. Factor MathCAD polynomial roots 43. Insert MathCAD graphics 44. Convert MathCAD angles 45. Use MathCAD truncation 46. Use MathCAD roundoff Student Contributions Each student will spend approximately 2.5-5 hours per week preparing for class and completing

Mathcad on client systems. The Mathcad Calculation Server supports all built-in math functionality within Mathcad for faithful presentation of worksheets, in addition to support for installed user EFIs. Mathcad Ca lculation Server does not replace the full power and interactivity of Mathcad on the desktop, but rather is a way to present

15: Extending and Automating Mathcad 231 Overview 231 Programming within Mathcad 231 Building Function DLLs 243 Creating Your Own Components 243 Accessing Mathcad from Within Another Application 248 Functions and Operators 16: Functions 249 Built-in Functions 249 Function Categories 249 Mathcad

chance to learn, understand and apply the MathCAD Tool to solve homework problem. I realized that the MathCAD tool does help me to solve the homework faster and cleaner. Therefore, in this paper, I will try my very best to explain to you the concept of the MathCAD tool. Here is the outline of the MathCAD tool that I will cover in this paper. 1.

PTC MathCAD & Creo Parametric Integration Guide MathCAD and Creo Parametric are well integrated and the process is documented. This one-page guide aims to clarify this process. Prerequisites: User must have Creo Parametric and PTC MathCAD installed. See Article CS201396 for version requirements. How to Integrate PTC MathCAD & Creo Parametric: 1.

Introduction to Mathcad 15 - part 2 Plots It is import ant to be able to visualize the result in other forms than just tables and numbers. Mathcad offers a wide variety of plots and graphs to help you present calculations in better forms. To place a graph in your Mathcad workbook you can use a shortcut, graph toolbar or use the Insert- graph .

In Mathcad, the same equation looks the way you would see it in a text or a reference book: x b b 2 4a.c 2a. The only difference is that Mathcad's equations and graphs are live. Change any data, variable, or equation, and Mathcad recalculates the math and redraws the graphs -- instantly. With