## re: Problem with temperature unit

## re: Problem with temperature unit

(OP)

Hi,

I am having problem inputting the temperature value with unit in MathCAd V13,

For example T1 := 13 deg C.

Mathcad prompts an error that "This value must be scalar"

On anside, how do you attach a bmp.file in the thread?

Thanks

I am having problem inputting the temperature value with unit in MathCAd V13,

For example T1 := 13 deg C.

Mathcad prompts an error that "This value must be scalar"

On anside, how do you attach a bmp.file in the thread?

Thanks

## RE: re: Problem with temperature unit

Peter

## RE: re: Problem with temperature unit

This is an invalid mathcad statement.

Mathcad allow only Kelvin (K) and Rankine (R) temperature units.

You can define a Celsius unit using C=K-273.16 (use the identity operator of three parallel lines not the equal sign)

Anyway in mathcad you need to multiply the number by the unit not just right it as text. It is best to type the number and then type the multiplication operator (appears as a dot) and then use Insert Unit and select the temperature unit.

## RE: re: Problem with temperature unit

Temperature units °C and °F are a new feature of ver. 13. IMHO, one of the least useful new features. See Help|Tutorials|New Features in Mathcad 13. That's about the only place they are explained. I can't find them under units in Help|Mathcad Help.

To enter the new units when defining a variable, you have to use the postfix operator xf from the evaluation toolbar. You don't have to use xf when adding the units to a result in the units placeholder, though.

The units are not multiplicative. You can't use them in equations that involve multiplication and division without running into trouble. You also can't use °F as the unit for the result of adding two values with units of °F. New multiplicative units Δ°C and Δ°F are also new features. Effectively Δ°C = K and Δ°F = K·5/9.

I find it all confusing and avoid using the new units. If you violate the multiplicative rules, you get answers, but they are wrong. This is dangerous. Using the Δ°C units usually works, but it is the same mathematically as using K and is harder to use. About the only useful thing to do is to define a variable, say T1:=13°F, then evaluate it in °C to get the conversion T1=-10.556°C. If you start using T1 in equations, you get in trouble quickly. For instance, if you define T2:=2*T1, it evaluates to T2=485.67°F or T2=945.34Δ°F, not T2=26°F.

You can just type a number then type in the unit as text without typing a *. At least most of the time. I have run into cases where this doesn't work but I can't remember where.

## RE: re: Problem with temperature unit

I own Mathcad 2000, 2001 and 12 but mainly use 2000. I have the other two to be able to read higher version files. I am not familiar with 13. If what you are describing is true then I am glad I didn't upgrade to 13. In previous versions you use units in equations and statements the same as any other variables and as it should be.

Are you a new user of mathcad or an experienced use?

## RE: re: Problem with temperature unit

This is a recurrent problem because of the offsets used in creating the various temperature scales. No other unit has this problem because they are simply scaled from each other.

The original temperature units, R and K, are still available and their behavior remains unchanged.

While the new behavior is awkward, it makes doing thermal calculations easier, because you input absolute temperatures in the usual equations with mixed units and get correct answers. Obviously, if you find that too annoying, you can still do the workaround of segregating the delta-temp calculations from the absolute temp calculations.

Since these workarounds all tend to be manual, the new system does have the advantage that once you've got it mastered, it automatic and equations look consistent with what everyone sees in textbooks.

TTFN

## RE: re: Problem with temperature unit

## RE: re: Problem with temperature unit

Peter

## RE: re: Problem with temperature unit

If I enter T1:=13* and then use the dialog box to put in °F, I end up with T1:=13·°F with the error "This value must be a scalar." If I enter T1:=13*[alt]0176F, I get the same thing.

It works either with the dialog box or typing in the units if I use the postfix operator. Once the variable T1 is defined, I can evaluate it and enter the unit °C in the placeholder without a postfix operator, either by typing or with the dialog box. I get T1=-10.556°C

## RE: re: Problem with temperature unit

TTFN

## RE: re: Problem with temperature unit

Type T1:<ctrl>U

select °F

Type <Insert>13<Enter>

I get T1:=13°F

Error: Value must be scalar.

If I type *13 instead of just 13, I get T1:=13·°F.

I can enter other units by just typing in the unit after the number. If I type L1:13cm, I get L1:=13cm.

## RE: re: Problem with temperature unit

I tried your method with MathCad Rel. 13. I can use it to insert a degrees C unit on a number. But the conversion seems to be off.

I type in T1: <shifft><ctl>X and use the insert menu to insert degrees C for units.

Then I type in T1= and I see a number in degrees K. So far so good. In the units placeholder thee I insert degrees F and it shows me T1= 55.4 deg F. This looks like the correct value.

I tried T1:-40 <shift><ctl>X aind used the insert menu to put in degrees C. Then typed T1= and got -313.15 degrees K. I used the insert menu to insert deg F and saw -1.023X10^3 deg F. I think it should be -40 deg F. (recall the grade school math problem?)

I guess I con't fully understand what you are saying about calculations with temperatures then. I also tried entering a value of epsilon = 0.00065 in/in/100*deg F. Once I did this I could not get a valid response when I tried anything with this value. Fortunately for me, this does not come up very much in my work.

regards,

chichuck

## RE: re: Problem with temperature unit

TTFN

## RE: re: Problem with temperature unit

Back to an earlier point, strangely enough when I use the insert units dialog, the units are inserted without overwriting the numerical value and it works both with and without invoking the postfix operator first. For instance,

t1: 13 <ctrl-u> <degrees celcius (function) (deg C)>

works exactly as expected, and the various unit conversions also work correctly. Using postfix also works, but is not necessary (at least on my setup).

Peter

## RE: re: Problem with temperature unit

jghrist,

Are you running SP1? That may be the cause of the problem. The Insert Units dialog box should clearly show "Degrees Celsius function (ºC)," while v13.0 does not show that.

TTFN

## RE: re: Problem with temperature unit

That must be the problem, I'm running v13.0 and the dialog box shows "Degrees Celsius (°C)"

## RE: re: Problem with temperature unit

TTFN

## RE: re: Problem with temperature unit

Some further clarification. The negative sign is problematic. The only reliable workaround is to enter the magnitude into the temperature function first, then apply the negative sign. A quick check is to display the temperature in absolute kelvin temperature.

If the negative sign is erroneously applied, you get a negative absolute temperature, which, of course, is not possible, since the kelvin temperature is referenced to absolute zero and only positive temperatures are valid.

TTFN

## RE: re: Problem with temperature unit

I tried with postfix operator deg C(13) and seems ok.

thanks

Patrick

## RE: re: Problem with temperature unit

I installed the upgrade and it works now as you say.

For negative temperatures, just hit the space bar before putting in the units to expand the selection to include the negative sign.

T1:-40<space><ctrl-u><degrees celcius (function) (deg C)><Enter>

T1:=(-40)°C

T1=233.15K

## RE: re: Problem with temperature unit

[img xxxx]

Where xxxx is the address where the image is alocated, i use the "direct link to image"

EXAMPLE:

In this case a uploaded a image with this link:

This is the "direct link to image": h

Diquan