Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hazen-Williams Equation entry and units

Status
Not open for further replies.

MrNYPE

Civil/Environmental
Jul 23, 2008
4
0
0
US
I am building a worksheet that calculates head loss due to friction in water pipes. I am using the Hazen-Williams equation. The commonly used version of this equation uses mixed units (e.g. ft, inches, gpm), and has several standard coefficients that end up giving the result in feet.

When I assign the units to all of the inputs, the equation result gives me some strange units, and an incorrect numerical result, as Mathcad is trying to rectify the units as best it can.

I would like to avoid finding, and then typing into the sheet, the units for each of the coefficients- it will be very messy, and is not the common way of depicting this calculation. I intend to use my MathCAD sheet for presentation in an engineering report.

Is there another way to enter this equation, or a way to override the units that mathcad calculates for the result?
 
Replies continue below

Recommended for you

The way I do it is to divide the variables within the equation by the required units (i.e. enter [q/gpm]^exponent). That gives me the latitude to enter q in any units and allow MathCad to convert it to gpm at evaluation time. At the end I multiply times the output units.

This has the benefit of being self documenting. Trying to divide by minutes^0.327 to get the contant to work out is counter productive.

David
 
Can you do the equation without units. Then when you get the correct numerical answer, redefine it with the proper units. I have used equations with mixed units. To avoid the problem, I rarely use any units in my MathCad files. I find the numerical answer and then add a unit text label next to the variables and answers.
 
Dave's approach is more robust, and allows you to enter quantities in any unit system, since the normalization factors do the conversions.

Frankly, for many calculations, the units in Mathcad are so easy to use that it's counterproductive, at least for me, to not use units.

We get specifications all the time with mixed units, and we'd spend way too many calories doing unit conversions that Mathcad does transparently.

TTFN

FAQ731-376
 
PEInc,
I used to just not enter units, and then I went back to an equation I hadn't used in a couple of years and spent half a day trying to find the units for each of the input variables. Boy I was mad at myself for not documenting the original equation. Now they are all self-documenting and I don't have to convert kg/cm^2 to psi before doing the math, I can just input whatever units my client gave me the data in and MathCad makes it match the empirical equations.

David
 
zdas04,

When I define my variable, I add a text label next to the numerical value. For my answers, I do the same. There is no confusion. The hard part is that, occasionally, I have to manually convert my answers to metric or other units.
 
We already discussed above that some equations use mixed units which are magically combined by the constant(s).

You are right though that I probably should use units for most of my work.
 
But, the advantage in using units, particularly in the normalized form, as Dave posted, is that you can use arbitrary mixed units in those equations.

The H-W equation for pressure drop is something like:
4.52*Q^1.85/(C^1.85*d^4.87) where Q is in gal/min, and d is in inches.

So, once the equation is normalized, you can simply plug in lit/s for Q, or furlongs for d, and Mathcad would do the conversions and spit out the correct answer in the unit system that you've set up the equation for. Moreover, I would think that it would also reconcile the differences between the US and SI versions of that equation, since the end result is pressure, so Mathcad can do the units placeholder conversion to any arbitrary pressure you can contemplate, i.e., pascals, or torr, etc.

To me, that's really the power of a program like Mathcad; you can configure such equations so that you could come back to it 10 yrs from now, assuming computers and s/w are still usable, and plug in something totally different and get answers without having to re-derive whether the conversion factor is 4.52 oe 10.67 or something totally different.

TTFN

FAQ731-376
 
In case that wasn't clear enough, here's how you would do it with the original H-W equation for flow (oddly enough, I recently got some data from a client and they gave me a psi on one end and a kPa on the other end of the line, my equation didn't care):

Len: 1900 m
Pup: 1100 psi
Pdown: 6.78 MPa
d: 76.2 mm
cHW: 140

Q:(0.442*(d/in)^2.63 * cHW * (((Pup/psi)-(Pdown/psi))/(Len/ft))^0.54)*gpm

gives you 131.8 gpm or 719 m^3/day, or 8.3*10^27 cubic Angstrom/s. Notice that I always put the unit right with the variable so that I don't mess up and raise one to a power that the other one doesn't get raised to.


PEInc,
I also had a plan to put a text label next to the variables, but you know on different screens they tend to move, and sometimes you get in a hurry and don't do it. The way I do it now solves both of those ongoing human problems.

David
 
Status
Not open for further replies.
Back
Top