Skip to main content
1-Visitor
November 16, 2017
Question

problem defining a function that has variables with units of measure

  • November 16, 2017
  • 3 replies
  • 5780 views

I tried to define the function so that all the units of measure would cancel out and one would produce a dimensionless mass fraction but MathCAD thinks I am doing it incorrectly.

 

Please explain what I am doing wrong or provide a workaround.

 

Thanks!

Problem defining function with units of measure.PNG

 

 

 

3 replies

23-Emerald I
November 16, 2017

Yours looks like it should work.  But you can try this:

mass fraction.PNG

1-Visitor
November 16, 2017

°C is actually a function that converts your input to a temperature.  Mathcad has to treat °F and °C differently than the other temperature units because they are not zero-based (not sure this is the right terminology).

 

Because °C is a function and not a unit, you cannot just divide by °C.  You need a function that gives you the inverse temperature.  You can write your own function like this:

Capture.PNG

 

Or you can see another option here: https://community.ptc.com/t5/PTC-Mathcad-Questions/Inverse-Temperature-Units-in-Prime/m-p/347471#M135794

1-Visitor
November 16, 2017

Here are the two options implemented to your function:

Capture.PNG

(Mathcad 3.1 attached)

21-Topaz II
November 17, 2017

Hi,

My answer is very similar to that of FK:

Sol_liQ.jpg

25-Diamond I
November 17, 2017

@-MFra- wrote:

Hi,

My answer is very similar to that of FK:

 


Give it a try and evaluate (60 °C) /( 1 °C) - you won't get 60!

MFG has explained why.

25-Diamond I
November 19, 2017
 In my opinion, the best advice we can give to ddenholm is to face the whole problem considering the temperatures in Kelvin.

I tend to disagree. While it may be generally a good idea to use Kelvin when dealing with temperatures - why should he go through the hassle of conversion?

In my opinion the best advice is to use the built-in inverse function  /°C  instead of the division by °C. Thats the second of MJGs suggestions.

But its not understandable why this notation for the inverse function is not documented in Prime anymore and why this inverse can only be typed in via that awkward tricky way with the double quotes which have to be deleted later (as described in more detail in the link MJG provided.