×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# 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

### RE: re: Problem with temperature unit

I haven't been able to duplicate your error with my copy of MC13.  On the Mathcad user forum (help > users forums) you can post a worksheet,  you could try posting your sheet there.

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

israelkk,

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

jghrist

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

In order to get the correct behavior in 13 and onward, you need to use <crtl><shft>X to invoke the postfix operator and then put ºF in the second placeholder.

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

I've used Mathcad since version 1.  If this were the only change with version 13, I wouldn't bother, but it isn't.  I suppose that the new temperature units would be useful in some applications and might be worthwhile mastering.  Most of my equations that use temperature really deal with temperature differences.  I usually defined a unit degC~K that worked just fine.  When I substituted the new °C unit for my old degC units, I got a bunch of wrong answers.  I realize now that I should have used Δ°C instead.  This has no advantage to me.

### RE: re: Problem with temperature unit

It's not necessary to invoke the postfix operator seperately from inserting the temperature unit if you use the insert units dialog box.  Go to Insert > Unit > Temperature > Degrees Celcius (function) (deg C).  If you wish to type the unit in then you have to use the postfix operator seperately, but for temperature units it is probably easier to use the insert units dialog box.

Peter

### RE: re: Problem with temperature unit

Using the insert units dialog box doesn't work for me.  If I enter T1:=13 and then use the dialog box to put in °F, I end up with T1:=°F - the 13 disappears.  If I enter T1:=13[alt]0176F, I end up with T1:=13°F with the error "This value must be a scalar."

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

No, you type T1:<ctrl>U  or Insert Unit, then select the temperature unit and then put in the numerical value.

TTFN

### RE: re: Problem with temperature unit

OK, I tried this -

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

IRStuff,

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

You need to invoke the postfix FIRST.  Otherwise, the minus sign applies to the entire function and not just the input.

TTFN

### RE: re: Problem with temperature unit

Often in formulas of that nature you are intested in delta temperature not absolute temperature.  I suspect if you try delta F or Delta C that will fix your problem.

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

The Insert Units invokes the postfix operator automatically for the affected temperature units.

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

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

### RE: re: Problem with temperature unit

Yup, you need to upgrade to 13.1

TTFN

### RE: re: Problem with temperature unit

chichuck,

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

(OP)
Hi all,

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

thanks

Patrick

### RE: re: Problem with temperature unit

IRstuff,
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

To insert a picture (JPG, BMP, etc...) what i use is: http://www.imageshack.us/ there i upload the file and then when is there i type this:

[img xxxx]

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

EXAMPLE:

This is the "direct link to image": http://img392.imageshack.us/img392/7748/testqx1.jpg

Diquan

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!