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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Subtracting Degrees Celsius

jdirry
1-Newbie

Subtracting Degrees Celsius

When subtracting two thermodynamic temperatures, like 3°C from 5°C, I expect to get the result in Kelvins:

5 °C-3 °C→ 2 K

However, Mathcad gives

5 °C-3 °C→ 2•°C


and doesn't handle it any different than a thermodynamic temperature, while it should handle it as temperature difference and therefore in absolute units (which is K) rather than in relative units.

Is there any way around this problem?

14 REPLIES 14
Werner_E
24-Ruby V
(To:jdirry)

I don't experience that effect. Mathcad gives me exactly the 2 K which you expect and of course I could format the result in Delta °C if I like to do so. Changing the unit to °C would be wrong, of course:

I can replicate the problem in MathCAD Prime 3.1. The behavior you describe would be the correct one. Which version of MathCAD are you using?

mathcad prime 3.1 degrees celsius.pngmathcad prime 3.1 degrees celsius 2.png

The former was from Mathcad 15, but the same applies to Prime:

Maybe you are doing something wrong when you insert °C ??

Nothing wrong with the input. I am just using the symbolic solve „→“. The numeric solve „=“ get's it right.

MJG
18-Opal
18-Opal
(To:jdirry)

The symbolic solver is not unit-aware.  It treats units as unknown variables.

The symbolics see this:

5°C - 3°C -> 2°C

the same as this:

5*x - 3*x -> 2*x

jdirry
1-Newbie
(To:MJG)

indeed. i guess the symbolic solver should be aware of units and dimensions, because they sometimes need special handling.

I can imagine that the °C (°F, °Re, etc.)  get converted to K in an preprocessing step. After that it is totally ok to thread them as unknown variables.

RichardJ
19-Tanzanite
(To:jdirry)

i guess the symbolic solver should be aware of units and dimensions, because they sometimes need special handling.

Maybe, maybe not. This has been discussed before, and there are arguments on both sides. Symbolic math is the algebraic rearrangement and solution of equations. If it is limited to that, then units are irrelevant. If E=m*c^2, then m=E/c^2, regardless of the units.

Anyway, it it not unit aware. As I said in my other post though, it should not produce a wrong or misleading result. This is what mathcad 15 gives:

Not exactly useful, but at least it's not misleading.

Werner_E
24-Ruby V
(To:jdirry)

the symbolic solver should be aware of units and dimensions,

Maybe, but I guess its rather hard to implement this or, for PTC staff, impossible to do. So I would not expect this to see in any version in the near or distant future.

After all, as Richard has shown, is °C not a simple scaling factor like most other units but, because of the necessary shifting, its a function used in postfix notation. At least this (being a function) is shown correctly by Mathcads (15 and below) symbolics but the symbolic output of Prime is simply wrong. So I agree to call it a bug in Prime.

We see this when we follow the symbolic evaluation by a numeric one. Normally this should give a satisfactory result but not in the case of temperatures:

so the question that remains is how to report this bug in a way, such that the MathCAD developers will take notice?

RichardJ
19-Tanzanite
(To:jdirry)

I already did.

VladimirN
24-Ruby II
(To:jdirry)

Anyway you can send your issue to PTC's tech support by using "Mathcad Support Center":

Mathcad Support Center

http://blogs.ptc.com/2011/09/22/how-to-use-the-brand-new-online-mathcad-support-center/

because of my academic license, they only give me support for license files and installation. can't report any bugs there.

RichardJ
19-Tanzanite
(To:MJG)

But in this case °C is not a variable, it is a function, and the answer is wrong.

RichardJ
19-Tanzanite
(To:jdirry)

I can reproduce this in Mathcad Prime when using symbolic evaluation. The symbolic processor does not understand units, so you should use only numeric evaluation. However, it should not show a wrong answer, so I consider this to be a bug.

Top Tags