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!

Basic units output in mathcad

Status
Not open for further replies.

tue98161

Civil/Environmental
Nov 23, 2012
12
0
0
US
Hey all, I'm an undergrad using mathcad for the first time to do some basic calcs for a design class.

I'm having an issue with units being assigned in the program. (File is attached, work begins on page 3).

I've assigned a value for "P" in lbf and a value for "a" in ft. When these two values are multiplied, the output is in [ft^2*lb]/s^2.

Later on in the calculations, I have a length, "L", but the program has assigned that to be gallons, not "feet" as I would like it.

How can I use the program to control these units?

Thank you!
 
 http://files.engineering.com/getfile.aspx?folder=ffe127c4-e2ab-4fd9-8df4-a48e88b25df9&file=Timber_Design_Sheet.xmcd
Replies continue below

Recommended for you

I don't think you specified eg. P:=100*lbf. If you had, you would have gotten the right result, maybe in Joules, but correct nonetheless. As far as the "L" is concerned, it is a Mathcad predefined unit and stands for "liter" - so don't use it as a variable name.
 
Someone apparently failed to point out to you that you CANNOT and MUST NOT use built-in unit names as variable names. L is a Mathcad symbol for liter; note, however, this is a non-standard usage, since liter is not a proper name, so its symbol must be lower case. Only units that are named after people, like the kelvin, has a capitalized K for its symbol.

You should always check to see if the symbol you are using is already taken. The first time you type L=, it would have converted to L:= had L not been previously defined. L= should result in L=1*L because its a built-in unit

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529


Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
There is a homework forum hosted by engineering.com:
 
I don't know how that works out in Mathcad 14 and beyond. I only have 13, but there the "L" clearly is otherwise occupied and defines "liter". If you want lower case, you'll have to use just that "liter".
 
You can, at your own risk simply force the re-definition of L to be something else. I don't actually see where you defined L in your sheet at all, so it would have complained about L being undefined anyway.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529


Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
There is a homework forum hosted by engineering.com:
 
IRStuff,
The "L" for liter makes practical sense even if it doesn't make pure SI sense. The symbol "l" looks too much like the symbol "1" (in fact in old typewriters the same striker came up with either one or ell). Had MathCad followed the SI convention the confusion would have legion.

David Simpson, PE
MuleShoe Engineering

In questions of science, the authority of a thousand is not worth the humble reasoning of a single individual. Galileo Galilei, Italian Physicist
 
The practical issues don't make it any less annoying. I don't think this issue is restricted to "old typewriters," though; the input dialog box here uses a Courier-equivalent font, and only in the preview or final version does it switch to a san-serif font that makes them distinguishable. Almost every book-form document we create at work uses "New" Times Roman, where the two are only barely distinguishable; the ell is every so slightly taller with an ever so slightly shorter serif.

The bigger issue, of course, is that every year or so, someone new to Mathcad will do something similar to the OP and wonder why the units aren't working. I wonder if this is why Mathcad isn't used as much as it could be, since the units handling is a major selling point for me.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529


Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
There is a homework forum hosted by engineering.com:
 
I can nearly explain the liter symbol, I see a lot more people defining their input mass as m:45*kg. Absolutely nothing works from that point on. You ask for a length and get a mass. That is why you see long-time MathCad users always using the dot (as in m.pipe to make it appear like m[sub]pipe[/sub]) to make sure that no variable redefines a built in unit.

David Simpson, PE
MuleShoe Engineering

In questions of science, the authority of a thousand is not worth the humble reasoning of a single individual. Galileo Galilei, Italian Physicist
 
yes, m:=something else is definitely a killer. Unfortunately, Mathsoft would do similar sorts of things in their example sheets, which would wreak havoc if the examples sheets were incorporated into another sheet that depended on an unsullied built-in unit. I did just that this afternoon, and it took a few minutes to figure it out and correct the problem.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529


Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
There is a homework forum hosted by engineering.com:
 
@IRstuff:

The (optional) use of the upper-case "L" for litre (or "liter" if you're American - but that's a different topic!) has in fact been a part of the SI standard definition since 1979, precisely because of the typography issue.

The litre, and the symbol lower-case l, were adopted by the CIPM in 1879 (PV, 1879, 41). The alternative symbol, capital L, was adopted by the 16th CGPM (1979, Resolution 6; CR, 101 and Metrologia, 1980, 16, 56-57) in order to avoid the risk of confusion between the letter l (el) and the numeral 1 (one).
Ref: Note (f) to Table 6 "Non-SI units accepted for use with the International System of Units" in "The International System of Units (SI)", 8th edition 2006, Bureau International des Poids et Mesures

See also:

 
Status
Not open for further replies.
Back
Top