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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

calculating a function with Temp in 'C not 'K

ThomasH-disable
1-Visitor

calculating a function with Temp in 'C not 'K

Hi all,

Stuck once again in one of those grey areas.

I need to gain a factor from an equation that has T temp in it. I need mcad to work it out with T set to deg C but it calculates it in Kelvin which isn't what i'm after.

equation of the form;

1-(1.5*T)-(1.5-T^2)

at the moment i'm dividing the T sections with UnitsOf(T) so the equation can solve.

Any advice from the Collaboratory would be grand.

Regards, Tom Hulbert.
4 REPLIES 4

You can do all that quick, in "UserUnit"

jmG

The attached is for version 14. If it's an earlier version that does not support temperature units this will need to be modified a little.

Richard

On 5/12/2010 5:49:37 AM, ThomasH wrote:
>I need to gain a factor from
>an equation that has T temp in
>it. I need mcad to work it out
>with T set to deg C but it
>calculates it in Kelvin which
>isn't what i'm after.

�C are physically and mathematically equivalent to K, so all you need is to put the �C in place of K in the solution.


TTFN,
Eden

Your expression is clearly empirical, as the three terms are dimensionally inconsistent; therefore, you MUST divide each term through by its units to make all terms unitless, and make the expression calculable.



Be careful when using "UnitsOf" with temperature variables, or even dividing through by 1 deg C - if you are using a default Mathcad installation, the "UnitsOf" your temperature variable are likely to be K (not deg C), whereas your expression may be formulated for input temperature in degrees Celsius (or degrees Fahrenheit, depending on the source). You might be better off creating a unitless temperature, or use the "Temperature Change" unit type variable for an application like this.



That is:



Suppose you have defined T = 20 deg C, and your formula would yield the expected result for T = 20 (as a unitless number), but in default units, T / UnitsOf(T) would yield 293.15, not 20. T / 1 deg C won't work either, as it would yield 293.15 / 274.15 = 1.069.



However, if you use units of "Temperature Change" (Delta deg C) to specify your temperature variable, then T / UnitsOf(T) will yield 20 K / 1 K = 20, as expected.



Hope this helps!
Announcements

Top Tags