Temperature - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Units : Temperature

Temperature

 

Calling Sequence

Parameters

Description

Properties of Temperature Objects

Arithmetic with Temperature Objects

Examples

Compatibility

Calling Sequence

Temperature( v, s )

Value( t )

Scale( t )

type( expr, Temperature )

Parameters

v

-

: algebraic : expression designating the temperature value

s

-

: unit : Unit expression designating the temperature scale

t

-

: Temperature : temperature object

expr

-

: anything : any Maple expression

Description

• 

The Temperature( v, s ) command returns an absolute temperature object. An absolute temperature is a measure of the amount of heat in a physical object. This is to be distinguished from a relative temperature expression, such as 20*Units:-Unit( degC ), which represents a change in temperature of an object (for example, in space or time).

• 

The value v can be an arbitrary algebraic expression not involving any units.

• 

The temperature scale s is a unit expression of the form Units:-Unit( d ), where d is one of the valid temperature units: degC, degF, K, degR, degRe or degc.

Properties of Temperature Objects

• 

A Temperature object has the type Temperature, and this may be checked by using the type command.

• 

The value (that is, the magnitude) of a Temperature object can be retrieved by using the Value method.

• 

The temperature scale (a unit expression) can be retrieved by using the Scale method.

Arithmetic with Temperature Objects

• 

The difference t1t2 of two (absolute) Temperature objects t1 and t2 evaluates to a relative temperature expression.

• 

The average 12t1+12t2 of two (absolute) Temperature objects t1 and t2 evaluates to an absolute temperature expression.

• 

The sum tabs+trel of an absolute temperature tabs and a relative temperature trel evaluates to an absolute temperature expression.

• 

More general arithmetric with temperature objects is possible with affine combinations and null combinations of temperatures.

• 

An affine combination of temperatures is an expression of the form i=1naiti in which each ti is a Temperature object, and the coefficients ai satisfy i=1nai=1.

• 

An affine combination of absolute temperatures evaluates to a single absolute temperature. If all the temperature scales are the same, then the temperature scale of the result is the scale of the addends. However, an affine combination of temperatures with heterogeneous temperature scales evaluates to an absolute temperature whose temperature scale is the system default.

• 

A null combination of temperatures is an expression of the form i=1naiti in which each ti is a Temperature object, and the coefficients ai satisfy i=1nai=0.

• 

A null combination of absolute temperatures (such as a difference of absolute temperatures) always evaluates to a relative temperature expression.

• 

If all the Temperature objects such a combination have the same temperature scale, then the resulting Temperature object will use that temperature scale. Otherwise, the system default temperature scale is used.

• 

Combinations of Temperature objects that are neither affine nor null return unevaluated.

Examples

t1Temperature20,Units:-UnitdegC

t120°C

(1)

typet1,'Temperature'

true

(2)

Valuet1

20

(3)

Scalet1

°C

(4)

t2Temperature25,Units:-UnitdegC

t225°C

(5)

t2t1

5°C

(6)

typet2t1,'Temperature'

false

(7)

t3Temperature30,Units:-UnitdegC

t330°C

(8)

t1+t2+t33

25°C

(9)

t1+t2t3

15°C

(10)

tat1+1at2

t5a+25°C

(11)

sta=3|ta=3

s53+25°C

(12)

evalfs

16.33974596°C

(13)

t4Temperature50,Units:-UnitdegF

t450°F

(14)

t1+t2+t3+t4

20°C+25°C+30°C+50°F

(15)

t1+t2+t3+t44

14725K

(16)

t1t2+t3t4

15K

(17)

Compatibility

• 

The Temperature command was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

Units

Units,temperature