cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Keeping Units in their original form during calculations.

BenjaminAmoah
1-Newbie

Keeping Units in their original form during calculations.

Hi everyone, I'm a new user and having difficulties calculating Energy in kWhr and eventually generation cost per kWhr. I realised that MathCad automatically converts the kW into W and hr into s. How do I get this sorted?

9 REPLIES 9

Something like the attached?

Mike

Yes!

But MathCad converts time to s and Power in kW to W before results.

Have a look at the attached worksheet.

You can change what units are displayed by clicking:-

Tools/Worksheet Options/Unit Systems/Custom.

The variables in the attached are shown in your required unit format, but the result will have be to manually changed as it is not a Based or Derived Mathcad unit.

Mike

Hello Benjamin,

you probably forgot to use an operator between kW & hr (see attached image).

You can also define a new unit called kWhr by telling MathCad that 1 kWhr is equivalent to 1 kW * 1 hr

Cheers

Raiko

MikeArmstrong
5-Regular Member
(To:Raiko)

You can also define a new unit called kWhr by telling MathCad that 1 kWhr is equivalent to 1 kW * 1 hr

Defining kWhr isn't worthwhile, because Mathcad would still default to Joules when a calculation is done and the units would have be manually changed.

Mike

Message was edited by: MIke Armstrong

Defining kWhr isn't worthwhile, because Mathcad would still default to Joules when a calculation is done and the units would have be manually changed.

It's an old tip; when you evaluate an expression (type the "=" key to get an answer, Mathcad puts in default units. IF YOU IMMEDIATELY HIT THE "TAB" KEY, the cursor will jump to the unit placeholder after the expression, where you can type in the unit of your choice. (Saves a mouse reach and click each time.)

RichardJ
19-Tanzanite
(To:f.kohlhepp)

It's an old tip; when you evaluate an expression (type the "=" key to get an answer, Mathcad puts in default units. IF YOU IMMEDIATELY HIT THE "TAB" KEY, the cursor will jump to the unit placeholder after the expression, where you can type in the unit of your choice. (Saves a mouse reach and click each time.)

I didn't know that. I wonder how many thousands of mouse clicks I have wasted!

MikeArmstrong
5-Regular Member
(To:f.kohlhepp)

Nice trick - didn't know that.

I also have AutoHotkey installed on my machine which is a free, open-source utility for Windows. With it, you can create Hotkeys for the keyboard using script.

Now I can hit tab to jump to the placeholder and then hold the windows key and hit the letter N and it will change the unit to N/mm^2.

Mike

My (unuseful today) tip: inside the unit placeholder type any number -to switch font to constants- press left arrow, type the unit, press sup key (right delete). Then the unit is now in constant variable type, without using the mouse. This was useful to use m (constant) as unit and m (variable) as variable, or N, or J, etc.

But from version 14 PTC, in an undocumented way, supress the feature that constant type is different from variable type.

This, what I take as bug, make a lot of my worksheets that don't works in mc14. And that following all official documentation and instructions to use mathcad.

Regards. Alvaro.

Top Tags