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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

How do I make Mathcad 15 remember my units?

igriffiths
1-Newbie

How do I make Mathcad 15 remember my units?

I'm having issues making Mathcad 15 remember unit redefinitions, this is especially a bother when using the explicit function.


When I calculate a UDL from a pressure load (kPa x m = kN/m) Mathcad defaults the answer in kg/s^2. I redefine the units as kN/m which is okay, but when the variable is recalled, Mathcad returns the units to kg/s^2, this makes using the explicit function ugly. Any help?

I've tried making the variable unitless and then reassigning it on the next page over but this doesn't seem to help either.


Example doc attached

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:igriffiths)

Mathcad enables you to work with units. That is, you have full control over the values and units associated with quantities that you input. And you can change, for each numeric evaluation, the unit used for displaying the result.

If you assign a variable e.g. MyMass:=5 lb, MatCad internally calculates the physical quantity over in its internal unit system, SI, so the value gets stored as 2.268 with the units of mass. If you define another mass e.g. YourMass:=5 kg, the same thing happens. the value is internally stored as 5 with the units of mass.

Now you can add these two masses together, TotalMass:=MyMass+Yourmass, and evaluation results in TotalMass=7.268 kg.

Working with units can help prevent errors, e.g. mathcad does not allow you to add 5 ft to MyMass, for obvious reasons.

But it does allow you to calculate the pressure that TotalMass would exert on a footplate of 1 ft by 0.5 m:

TotalPressure:=TotalMass/(1 ft*0.5 m)

Since units of different unit systems are usable/used, how would Mathcad know what units to use in displaying a result, other than its internal (SI) units.

So the evaluation of TotalPressure results in 47.69 kg/m^2.

If you want that presented in other units, go ahead and insert your units on the placeholder of the result. And yes, you have to do that for every evaluation.

It might be nice if it were possible to define 'preferred units' for physical quantities, but then other problems pop up. Like how would MathCad determine to use use N*m ( for torque) or J (for energy) in the case where a result of 1 kg*m^2/s^2 is obtained?

And last but not least, the symbolic processor (that is involved with the 'explicit' keyword) doesn't know about units at all. It just treats them as undefined variables.

Knowing that units are undefined variables to the symbolic processor, you could:

Or even:

Until:

Sucess!
Luc

View solution in original post

4 REPLIES 4

Sorry, it is not your units it is your physical values.

I think only manual you can change kg/s^2 to kN/m.

Mathcad works only with units not with physical values.

I must each time for example change m^2/s^2 at specific enthalpy to kJ/kg

LucMeekes
23-Emerald III
(To:igriffiths)

Mathcad enables you to work with units. That is, you have full control over the values and units associated with quantities that you input. And you can change, for each numeric evaluation, the unit used for displaying the result.

If you assign a variable e.g. MyMass:=5 lb, MatCad internally calculates the physical quantity over in its internal unit system, SI, so the value gets stored as 2.268 with the units of mass. If you define another mass e.g. YourMass:=5 kg, the same thing happens. the value is internally stored as 5 with the units of mass.

Now you can add these two masses together, TotalMass:=MyMass+Yourmass, and evaluation results in TotalMass=7.268 kg.

Working with units can help prevent errors, e.g. mathcad does not allow you to add 5 ft to MyMass, for obvious reasons.

But it does allow you to calculate the pressure that TotalMass would exert on a footplate of 1 ft by 0.5 m:

TotalPressure:=TotalMass/(1 ft*0.5 m)

Since units of different unit systems are usable/used, how would Mathcad know what units to use in displaying a result, other than its internal (SI) units.

So the evaluation of TotalPressure results in 47.69 kg/m^2.

If you want that presented in other units, go ahead and insert your units on the placeholder of the result. And yes, you have to do that for every evaluation.

It might be nice if it were possible to define 'preferred units' for physical quantities, but then other problems pop up. Like how would MathCad determine to use use N*m ( for torque) or J (for energy) in the case where a result of 1 kg*m^2/s^2 is obtained?

And last but not least, the symbolic processor (that is involved with the 'explicit' keyword) doesn't know about units at all. It just treats them as undefined variables.

Knowing that units are undefined variables to the symbolic processor, you could:

Or even:

Until:

Sucess!
Luc

Thanks for that Help Luc! Do you know of a way to substitute units when using the explicit function?

RichardJ
19-Tanzanite
(To:igriffiths)

As noted by others, Mathcad does not store the units with the variable. It stores the value in SI units, and the dimensions. The default display when the variable is evaluated is therefore the SI value with the SI units.

Top Tags