This content has been marked as final.
Show 378 replies

30. Working with numbers or variables with Units
StuartBruff Oct 15, 2006 12:00 AM (in response to ptc1368288)On 10/15/2006 12:36:30 PM, jmG wrote:
== assign the values to vars, use native formulas done by knowledgeable persons and append the corresponding "Unit result" . That way get rid of units in Mathcad . Any QA team will check on a independent unitless calculator . Convert beforehand not after.
In the two examples I gave, the knowledgeable persons and QA missed the units mismatches. It's that simple.
Consider what might have happened if the ground and navigation systems had both used units to quantify the data  the ground station could still have used pounds, tagged it as pounds and the navigation system would simply have converted it Newtons. X years, Y M$ and lots of peoples' lives would not have been wasted.
== Did you have a point here ?
Errare humane est.
Stuart 
31. Working with numbers or variables with Units
ptc1368288 Oct 15, 2006 12:00 AM (in response to ptc1368288)... like the mhyper(2.5,1,x) is scaled in UnitOf_Graphing as well as the all lot of math functions also the NURBS are in their base definitions, i.e: "UnitOf_Graphing". Open the collapsed area to see what we would pass as an export.
The task resumes in several scaling/dimensioning steps
1. assume you give a data set for the dome roof,
the next task is to scale Cheby style ...
2. Find the control points that will best fit the data set (not included in the work sheet under construction ...)
3. tabulate and export in "UnitOf_Graphing"
4. at this point the end user will convert back in his the original unit system (that we can do for him so that the QA department can check the entire contract made via Mathcad).
The QED is that the Engineer must first get rid of the unit system because unit systems have no mathematical meaning ... that's what I'm trying to explain and explain in this collab: unit systems don't belong to maths and if you use Mathcad for doing math task you must work without unit system .
In what unit were the Cathedrals built ?
... in the system "That Long"
... then the "that long" was graphed down with all the necessary "that long" correspondences to the taste of the Master of the Cathedral .
jmG
UnitOf_Graphing NURBS.mcd 35.1 K


32. Working with numbers or variables with Units
lamb Oct 15, 2006 12:00 AM (in response to ptc1368288)On 10/14/2006 11:23:51 AM, jmG wrote:
>... suite of :
>
>http://collab.mathsoft.com/rea
>d?90388,11
>
>� you advocate you can't do
>your job without units, then,
>could you or the could your
>profession do the job in DOS
>or else compiled languages
>that don't take units . Could
>you do the job in TI =59,
>HP48SX ... ?
>
What is that supposed to mean? Even in the days of DOS and compiled languages I couldn't do my job without units! But that doesn't have anything to do with using units in Mathcad. I could ask you if you could have done your job in the days of slide rules. Certainly it was possible, but you had to do the accounting for the powers of ten by some independent means. That does not mean that you should say that Mathcad should only work in the range 110, and you should carry the exponent on a piece of paper. In the same way, why should I carry units in some separate accounting rather than have Mathcad do that for me. To repeat my mantra, get the computer to do the repetitive, dumb stuff and let us concentrate on the important creatice issues.
>Hankel or else functions only
>relate the dependent domain to
>the independent one. Do you
>have to put units in
>mhyper(2.5,1,x) ?
>
>I see no units in the attached
>Galerkin finite differences.
>However some collab suggested
>Odesolve should carry unit.
>
>The PID Optimize (attached)
>starts with units and
>properties but by the "Harry
>magic" the final answer are
>coefficients apparently
>unitless but they are not as
>they are in "repeat per
>minute" .
>
No, it does not start with units. If you look at it the numbers do not have units attached  there are text boxes that say what the units should be which is a totally different thing. This sheet is a great example of why you DO want units. Example 1: If I have an amount of oil in the tank in lb rather than kg then it is trivial to do that with units. Not so with numbers and text boxes. (Here in the US it is common to have to go between imperial and SI units). Example 2: there is a line t.final = 10. What are the units? Not even given in a text box. And what If I want to go from min to hr, how do I do that? Example 3: As you say the coefficients are apparently unitless, but in reality they have units. It should be possible to include them with the right units transparently.
With a good units system you are (a) forced to maintain consistency, (b) allowed to used different units (lb/kg/tonne...) as is most convenient, and (c) have the power of unit checking to help validate equations.
>I'm short of time to look at
>your antenna sheet, other
>collabs might find useful.
>
What antenna sheet? Nothing was attached. I don't think that my sheets are sufficiently generally to be useful, and I don't have time to prepare them just as a didactical aid in this discussion. Suffice it to say that I can write the Hankel transform as an integral from 0 meter to 5.2 meter, of J0(kqr)rdr, where k, q, and r have suitable units also. I would define k = 2*pi/lambda where lambda is in mm.
James 
33. Working with numbers or variables with Units
ptc1368288 Oct 15, 2006 12:00 AM (in response to lamb)... reply would be too long .
Maths are relational to domains (the dependent related to the independent ) and all accessory parameters are implicitly "related" .
You mentioned the antenna task
Mutiplying 2*3 = 6 in the slide rule is in watts if 2 = Volt and 3 = Amp . More Volts and more Amps = more watts. You measure 1000 Volts , Volts are not bigger in their scientific definition, only more of them ... only the dimension of the input then you don't need to carry "Volt", only the number of them which is the task of dimensioning the inputs (variables) in a formula.
Assume the Big Blue does not carry units like a luggage, then you couldn't do the antenna job ?
Variables have measured dimensions or measurable dimensions, which values are assigned and treated by the nature of the formula. The executable are only the 4 ops *, /, +,  which are arithmetic operations and arithmetic has no units . Only the operands have values.
jmG

34. Working with numbers or variables with Units
StuartBruff Oct 15, 2006 12:00 AM (in response to lamb)On 10/15/2006 12:24:49 AM, jwlamb wrote:
== Example 1: If I have an amount of oil in the tank in lb rather than kg then it is trivial to do that with units. Not so with numbers and text boxes. (Here in the US it is common to have to go between imperial and SI units).
I would have thought that any Canadian would have a vested interest in keeping track of conversions ...
http://en.wikipedia.org/wiki/Gimli_Glider
I think a search would reveal several other amusing unit conversion errors
http://en.wikipedia.org/wiki/Mars_Climate_Orbiter
The ground station was sending thruster data in English units  in this case, pounds  while NASA's navigation team was expecting metric units, Newtons. One pound is equal to 4.48 Newtons.
This is exactly the kind of mistake that Mathcad can obviate.
== To repeat my mantra,
Interestingly, the Sanskrit word 'mantra' can be translated as 'instrument of thought'.
== get the computer to do the repetitive, dumb stuff and let us concentrate on the important creative issues.
I have been a proselyte of this approach for some years.
OTOH, there are those that advocate the repetition of dumb activities as a way of clearing the mind to allow deeper concentration of thought. Menuclicking and typing in units are obviously examples of such an approach.
Stuart
clickclickclick typetypetype
clickclickclick typetypetype 
35. Working with numbers or variables with Units
ptc1368288 Oct 16, 2006 12:00 AM (in response to StuartBruff)On 10/16/2006 8:41:51 AM, stuartafbruff wrote:
>On 10/16/2006 7:06:25 AM, fkohlhepp
>wrote:
>>If we're using Mathcad to do engineering tasks, is it okay to use units?
>
>Sometimes. For example, if you wish to
>set the gap on a spark plug, and look up
>the value in your workshop manual, then
>it is important to measure the thickness
>of the Mathcad CD in the appropriate
>units (in or mm) before using the CD to
>set the gap.
>
>But if you're going to use 'equations'
>or 'formulae' or other such mathematical
>constructs, I'm not so sure ...
>
>Stuart
______________________
Back to the very original question:
http://collab.mathsoft.com/~Mathcad2000/read?90450,11e#90450
>>I am a structural engineer and work often with Kips, U.S. Tons, Yards, ft., inch.,etc. How do you mix these units in calculation and get the correct answer without keeping track of their different units? Help is appreciated. Thanks.<<
...The answer is : work with unified system like the Instrumentation Engineers do. You may have and you should convert formulas in unified unit system . For instance we measure flow in T/hr , it implies to relate "masse volumique" kg/m�, pipe size in m (meter) ... the geometrical constant is related to DP (pressure produced)... + some extra material properties (�C, cp, coefficient of expansion ...).
Once the formula is done, have colleagues review so to avoid receiving a 4 ft butterfly valve to be installed in a 4 " pipe (not a joke !).
jmG 
36. Working with numbers or variables with Units
ptc1368288 Oct 16, 2006 12:00 AM (in response to ptc1176891)On 10/16/2006 12:12:46 PM, baxterp wrote:
>Thanks all for the
>entertaining banter. It's
>always fun to watch a
>conversation like this where I
>agree with exactly half (and
>usually everyother) posting.
>:+)
>
>Thanks,
>Preston
___________________
Like you say, Preston:
Captivating to watch peoples that have agreed to disagree if you can also agree to disagree.
A bit circular, is it ?
Sometimes, watching forum is like watching a dog chasing his tail.
jmG 
37. Working with numbers or variables with Units
FredKohlhepp Oct 16, 2006 12:00 AM (in response to ptc1368288)If we're using Mathcad to do engineering tasks, is it okay to use units?
Fred Kohlhepp
fkohlhepp@sikorsky.com 
38. Working with numbers or variables with Units
ptc1176891 Oct 16, 2006 12:00 AM (in response to ptc1368288)Thanks all for the entertaining banter. It's always fun to watch a conversation like this where I agree with exactly half (and usually everyother) posting. :+)
Thanks,
Preston 
39. Working with numbers or variables with Units
ptc1368288 Oct 16, 2006 12:00 AM (in response to PhilipOakley)On 10/16/2006 10:29:47 AM, philipoakley wrote:
>On 10/16/2006 9:47:51 AM, jmG wrote:
>>...The answer is : work with unified
>>system
>>jmG
>
...
>The consistency of terminology is as
>important within pure maths, as is
>application of consistent units of
>measure and their conversion in
>engineering.
>
>Each group gets to draw its own line.
>
>Philip Oakley
____________________
Yes, Philip !
We all agree now that engineering formulea must be be made coherent unit wise . Further, the task my require preprocessing (like scaling Cheby style or else like reduction ... ) before applying the best maths (curve fitting for instance... NURBS). And a final postprocessing to render .
All that done correct, put the right values for the intrants ... bingo = job done !
Most engineering tasks need a solver of some kind, therefore not unit in the formula but true values instead, will output good result in "UnitOf_pertaining formula".
Nothing wrong carrying units for calculating the surface area of the toy box , though !
jmG 
40. Working with numbers or variables with Units
StuartBruff Oct 16, 2006 12:00 AM (in response to FredKohlhepp)On 10/16/2006 7:06:25 AM, fkohlhepp wrote:
>If we're using Mathcad to do engineering tasks, is it okay to use units?
Sometimes. For example, if you wish to set the gap on a spark plug, and look up the value in your workshop manual, then it is important to measure the thickness of the Mathcad CD in the appropriate units (in or mm) before using the CD to set the gap.
But if you're going to use 'equations' or 'formulae' or other such mathematical constructs, I'm not so sure ...
Stuart 
41. Working with numbers or variables with Units
PhilipOakley Oct 16, 2006 12:00 AM (in response to ptc1368288) 
42. Working with numbers or variables with Units
StuartBruff Oct 18, 2006 12:00 AM (in response to ptc1368288)On 10/18/2006 11:06:08 AM, jmG wrote:
== The bad news for collabs who want to carry units in Mathcad is that all "dimensioned working formula" found in Engineering books have been made before Mathcad and made paper/pencil.
And, as evidenced by the examples I gave, they may not have been derived using the same units as the user of the formula. Hence, simply stuffing some numbers in them will give completely erroneous results. Ask NASA and ask them about F=ma at the same time.
== You can even carry your pet shop as units in Mathcad, so that 2 monkeys * 3 onions = monkey stew or onion soup .
What's wrong with that? Is there no place for Domestic Science in the Collaboratory?
== That's how I consider units in math software = an idiosyncrasy.
You are entitled to your opinion, however, rather than Fred et al, I find *your* arguments somewhat lacking in detail.
== That you might want to check if the paper/pencil conversion/relation is OK and use Mathcad unit capability = fine ! and then any formula designer should. But once that done, zap units in Mathcad work sheets and put the values appropriately and accordingly to the "dimensioned working formula"
Why? If the developed formula works and gives dimensionally correct results, why should anyone remove the units and risk introducing an error?
== The QED of this reply is that Units is the faith of the heretics and a useless luggage.
There is a scientific discipline, based in mathematics, known as Dimensional Analysis that deals with the algebra of quantity manipulation. Far from being the faith of 'heretics', I think you'll find that units are orthodoxy in engineering and scientific circles.
It's a good discipline for ensuring that you understand a formula and have accurately derived it. I have fond memories of Lecturer's being picked up on errors because somebody had noticed a dimensional inconsistency.
There have been several examples of this in the Collaboratory, where the correct use of units has identified an underlying problem. Philip Oakley's problem formula being one of the more recent ( http://collab.mathsoft.com/read?90107,11 )  implementing h and D with units would have immediately shown that a problem existed, given reasonable guesses as to the nature of the quantities.
Stuart 
43. Working with numbers or variables with Units
lamb Oct 18, 2006 12:00 AM (in response to ptc1368288)On 10/16/2006 12:41:58 PM, jmG wrote:
>
>Captivating to watch peoples that have
>agreed to disagree if you can also agree
>to disagree.
We can certainly agree to disagree. There is, however, a fundamental issue in that requests for functionality in Mathcad should not be dismissed by someone who does not require that functionality
provided it not mutually exclusive with some other (particularly preexisting) feature. Units, as far as I can see, fall into this category, since Mathcad (or even formerly MathCAD) has never imposed this on the user.
So, while I agree with Preston that it is quite amusing to watch a 'discussion' like this, the more serious side is that it has possible implications for the future direction of Mathcad (OK, OK, so I'm an optimist). I know from several software packages that it is much harder to convince developers (or more likely sales) that it is better to add or improve mundane features than to add glitzy new things that are of limited real value.
James 
44. Working with numbers or variables with Units
ptc1368288 Oct 18, 2006 12:00 AM (in response to lamb)James,
You don't help yourself presuming that the all maths, physics, engineering should carry units. All practical work is formulated considering the appropriate values to assign to the independent domain for the dependent one to be true vis the intended meaning (!) . Maths are relational and unitless . You confuse arithmetical maths like the toy box surface area for instance and the analytical maths involving for instance a suite of DE all composed via Laplace and resulting in time varying process dimensioned back to the unit step (just to mention one out of many ).
Spare some time switching domain and look at WaterSteam properties ... enter 150 �C to get saturation pressure 4.76 bar + about a dozen more values for other properties ( entropy, enthalpy, masse volumique, viscosity, ...). All results are in the corresponding unit of your choice . All that is done by the designers on a continuous basis for over a century.
Don't invent formula out of the blue, use them as proved.
jmG