×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Empirical Equations

Empirical Equations

Empirical Equations

(OP)
I just had occssion to fix a problem that I've been having with a very complex empirical equation for several years.

Units are a problem in equations with fractional exponents, logs, trig functions so most of the time people just put in the numbers with confidence that the constants take care of unit conversions.

I had an equation that was expecting pressure in lbf/ft^2.  I put this equation into my "notebook" MathCAD file (13 MB of useful relationships) several years ago and didn't document it very well.  I use the equation a few times a year and for the last couple of years I've gotten answers that haven't made much sense.  This morning I looked it up and found that it wanted psf not the psi that I was giving it.

I just went through my whole notebook and changed every entry in every empirical equation to require units.  I did this by dividing each varible by the proper unit within the equation and then multiply the entire expression times the units that the empirical equation is supposed to return.  I get the added benefit that I don't have to convert units offline anymore.  If the equation wants pipe length in miles, I can define the "PipeLen" vairable in meters and the "PipeLen/mi" in the equation converts it.

This technique also makes the equations self documenting.  For anyone who regularly uses empirical equations I would highly recommend it.

David
Replies continue below

Recommended for you

RE: Empirical Equations

Too True.

Definitely worth doing.


Philip

RE: Empirical Equations

I agree.  First, though, make sure that the equation is truly empirical.  I have often found that I can get back to basics and have an equation independent of units.  For instance, in calculating the impedances of conductors, the term

x=0.2794·(f/60)·log(a)

comes up quite often where f is frequency in Hz and the answer is in ohms/mile.  The equation

x=4·pi·f·10^-7·ln(a)·(henry/m)

is a more basic equivalent that doesn't depend on units.

I also find that documentation can be more clear to someone familiar with the empirical equation if I predefine the variables with units ahead of the equation and just use the new variable in the equation.
 

RE: Empirical Equations

(OP)
In Oil & Gas all the equations are empirical.  I came across one a while back that wanted temperature in Fahrenheit (it really gets squirrely as you approach 0F) and porosity in percent (so 0.03 should be put in as "3.0".  Many of them want pressure in psig or psfg.  

The curve fitting that people did 50-75 years ago (mostly with slide rules and very sparse data sets) is pretty amazing.

David

RE: Empirical Equations

You still need to have cancelled out the units inside the log(a). You CANNOT take the log of a unit.

In this equation 'a' must be unitless (which includes radians and steradians).

I also like to make sure that I have the fundamental formual, but somethime one needs to use the 'book' formula and embed the units in that, so f -> f/Hz, l -> l/m, h -> h/ft, m -> m/kg etc.

[noting:
 1) that the US pound is sometmes a force and sometimes a mass;
 2) that m can be both mass and metres, so use the maths styles to discriminate between them.]

Philip
 

RE: Empirical Equations

(OP)
Fawkes,
What nonsense.  An emirical equation is an empirical equation.  I've seen examples of Oil & Gas equations converted to "SI" and the units chosen are just as stupid as the original.  Pipe diameter may be in mm, cm, or m (and I've seen all of them).  Pressure may be in bar, Pa, kPa, MPa, or kg/m^2 for gods sake (interesting that kg can be either a force or a mass in the hands of real people).  Temperature may be in C or K.

I know there are very precise acceptable units in SI, but I've seen every bit as much confusion with meters as with feet because people use what makes sense to them not to some committee.

Empirical equaitons are created through observation, not through derivation.  If a person can make a line fit his data better by taking a log of an expression that is just fine, but the units need to be stripped within the function.

David

RE: Empirical Equations

David (zdas04)

I think you'll have a friend in JmG over on the collab http://collab.mathsoft.com/~Mathcad2000.
 He also disdains the use of units, thinking that they should be done off-line (usually by hand / error prone) and that the formulas are just arithmetic.

The biggest problem in all this is not realising where the errors are comming from in one's local domain.

In some instances it comes from poor arithmetic skills so having the formula written in 'local' units avoid some large errors.
Some times it is typographic (Jmg mentions a 4" valve that was delivered as a 4' one (that is delivered in feet, requested in inches).
While at other times the problems are in the conversion between one unit of measure to those needed in the formulas (e.g the Mars Lander).
Then there is the mass - weight problem.

The MathCAD philosophy (which is unique among the computer packages) is to display and remember the units and know their conversions throughout the worksheet.
There is still a need for proper engineering review of the results for 'reasonableness' no matter what the tool. But we should seek out as much support and error checking and warnings as possible.

Hence I am for the inclusion of the units convertion within the empirical formula (not converting the formulas). Tthe user can then see the normal measure that is to be expected, rather than it being a note that might be lost.

Grade = log(weight/tonne)

is better than

Grade = log(weight)   .....    [note weight to be the number of tonnes]

The latter is the sort of thing that happens in Excel, matLab, C, etc.

Philip
(all science is empirical: repeatable demonstrable observations. Engineering equations are no different, the error bars may be larger thoughwinky smile

 

RE: Empirical Equations

(OP)
In Oil & Gas, it is very common for the equations to simply not be in units that can be cancelled (one equation that purports to yeild Thousands of Standard Cubic Feet per day resolves into psi^2.5 / ft^5 or some such).  This is always ignored in the assumption that the constant includes all the unit conversions implicitly.  When I was a pup (think slide rules) I really hated this.  Today I just accept it.

I don't disdain units, the thing that saved me in Nuc School, college, graduate school, and the PE exam was unit analysis.  For the pretty equations that you see in those places, I really like the way MathCad handles units.  In fact I like the way it handles them in empirical equations--I can put in a length in "km" and since I divide the length in the equation by "mi" I get the right answer without ever having to do the conversion at all.

David

RE: Empirical Equations

I find myself often programming in MathCAD what I see in industry codes like API, etc.  I usually wind up dissecting the constant so I can use real units.  I then try a bunch of examples both ways to make sure I get the same answer.  Usually this works and sometimes the constant goes away after all the conversions are done and units put in.  However, it is a real chore sometimes!

RE: Empirical Equations

(OP)
IFR,
I always tried to do that too (it didn't always work) before I started using MathCAD.  Now I just multiply the constant times the units of the answer and divide everything else by its unit.  Life got so much simpler when I gave up and started doing that.

David

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close