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!

Default Units 1

Status
Not open for further replies.

Sparweb

Aerospace
May 21, 2003
5,104
0
36
CA
I have Mathcad 5.0+, which works very well for me, but I find I have to ADD units by typing them at the top of any analysis sheet before I can get down to business. I often deal with speeds expressed in "knots" (nautical miles per hour) so I always start my sheets with "knots:=1.1508*mph". I do the same thing for KSI:=1000*psi.

I also find that there's no good default set of units, so every time I state a calculated value I have to type "lbf" at the end of the "lb*ft*sec[sup]-2[/sup]" that automatically comes up.

Is there a better way? Do more recent versions of Mathcad include a "unit definition" that can be configured?



STF
 
Replies continue below

Recommended for you

1) As stated above, you can define a set of customized units in the file "normal.mct" which is stored in the template directory for Mathcad. This is what most people do to have their favorite units already defined.

2) As for lbf, you're pretty much stuck, at least you're not getting slugs ;-)



TTFN
 
v11 indeed has lbf, but what Sparweb wants is for a result to automatically display lbf, which v11 won't do, since that's not a standard unit in any case.

TTFN
 
set unit system to US
type force:1lbf
type force=

Mathcad returns 32.174 lb*ft/sec^2

you can then tab to the units placeholder and type lbf and Mathcad will display force=1lbf, indicating that lbf is indeed defined as a unit, which is also evident from the Insert Unit selections.

BUT, just because a unit is defined, does not mean that Mathcad will use it as a default unit.

NOTE, that the Simplify units when possible in the Format Results selection will alter SI unit display from kg*m/s^2 to N, but does nothing different in US units, although CGS units returns dynes.

TTFN
 
There are many units not covered in Mathcad. It is also convenient to define operators to increase productivity, simplify the typing and possible reduce errors.

One way that work for me is creating a unit file (units.mcd) with sets of units not covered in the program and operators.

Create a template linked with the new unit as follow: Isert/reference/units.mcd.

For convenience, this link could be hide-using Insert/Area and double click in the arrow to hide the link.
 
IRstuff:

Are you subscribed to the Mathsoft Collabratory Mathcad Useres Forum at ?

If not, you can access as a guest login.

Much has been discussed about UNITS ..... and I believe you will find the answers therein ... in particular, please see the discussion...

Feature Suggestions

and the thread ... Units Again!
circa 8/1/2003 - 8/12/2003

I believe you'll find the answer in there...

One must not use a Unit Name as a Variable...
i.e., Force is a Unit Name.... and will create a problem as you have described when it is also used as a variable.
 
jOmega,

I've been a member of the Mathcad Collab for well near 4 yrs and have used Mathcad since version 3. The thread you refer to does not address the automatic insertion of non-standard units, particularly lbf. It's mostly a series of rambles about forcing users to select a "units" style to create units, because there are users that want to use "m" and "g" as variables, thereby re-defining buit-in variables.

Additionally, "force" is NEITHER a unit NOR a dimension in Mathcad, as a simple insertion of "force=", will demonstrate.



TTFN
 
Thanks for the input IRstuff. [thumbsup] You have clearly understood my situation. However, I don't have a "normal.mct", or a "units.mct" as suggested by cuky, nor do I have a simple "templates" directory.

I set up Mathcad with a "blank.mcd" file to start with. I open it first, then start my work from there. It has the extra units added in on the right side of the right margin where it won't get printed out, like all my other scratch work.

I have a large number of "templates" that I use for various analyses, organized in a system of directories by structure type, and it really isn't associated with the WINMCAD directory.

Do you suggest a "units.mct" file that I could put in the WINMCAD directory that is referenced in my "blank.mcd" file in which I could define additional units, like "ksi:=1000*psi"?

Would this allow me to define constants in terms of my new units? It currently does not permit commands like:

stress~=24.5*ksi because ksi isn't a standard unit.



STF
 
I guess I've been one of those upgrade weenies, so I can't even remember what version used WINMCAD as the default directory.

Anyways, the answer should be yes. You should be able to define ksi in terms of psi and then use ksi in the units placeholder.

In lieu of templates, the older versions of Mathcad allowed for inclusion files, so you could simply reference a particular definition file for a particular application. I forget the syntax, unfortunately, but I think there was either a "Reference" or "Include" function.

TTFN
 
I'm not opposed to regular upgrades, I'm just a cheapskate.

Poked around looking for the function, to no avail. Perhaps my version (5) is too old. Will I upgrade? No. Not worth the extra 3.1 seconds of typing.
I almost upgraded to version 6 a few years ago, but the cursor cross-hairs kept leaving annoying little tracks on the screen, making it impossible to tell just where the cursor was after a while. (They's go away if I refreshed).

Thanks anyway, guys.

STF
 
I see it now. That will come in handy when cleaning up old analysis files that don't already have my list of "bonus units".

Thanks! [cheers]


STF
 
I asked the techs at Mathcad almost this exact question. Bottom line is it's not a built-in thing in Mathcad but something you can do by using any of the methods mentioned above. I've pretty much had the same ideas as mentioned here and I think I'm going to go with having a Mathcad file with my predefined units in it, such as ksi=1000psi, and inserting it as a reference.

Now, let me get my soap box out. Why is it we are even having this discussion? Shouldn't user-defined units just be an option when you're choosing what system of units to use? It seems like with all the bells and whistles Mathcad has this simple thing shouldn't be a big deal. I've mentioned this to the folks at Mathsoft. Maybe if enough others do too, they will add this.
 
There are two issues, both discussed in the Mathcad Collab.

> There are those who wish to use reserved units for regular variables, but don't want to mess up the units, which requires some additional "thing" to distinguish "g" as a variable vs. "g" as 9.8 m/s^2

> There are those who feel that Mathcad should have a consistent set of powers of 10 prefixes for existing units, e.g., um, mm, cm, m, km should all be pre-defined.

TTFN
 
The MatheMagician says, "Create a REFERENCE FILE
with the UNITS of your choice" then just insert
the file name into each new project you deem
requiring such "user-defined units"

Reference files in MathCAD v11 (which is the
only version I have tried this feature)works
wonderfully. One instance where I use it is
in the "transport properties of air". This means
each file requiring the calculation of Raynolds
number, heat transfer coefficients, etc. based
on the transport properties of air, I just include
the file and magic occurs !

Take care,

Mathemagician !
 
Status
Not open for further replies.
Back
Top