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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Units reverting into base units

RV_10243307
2-Explorer

Units reverting into base units

Hi,

 

I want Mathcad to display me units in °C/W but it keeps reverting into base units.

So after that I thought to myself to create a unit named CpW but it does not matter it will keep switching into base units. I've seen this post on the forum.

 

https://community.ptc.com/t5/Mathcad/Mathcad-Prime-5-0-automatically-converts-my-defined-units-to/m-p/618572

 

But it does not seems like I can change the base unit inside the matrix TTIsmaj when I display the result, Any idea on how can I do this ?

 

 Thanks

 

RV_10243307_1-1661176455763.png

 

 

RV_10243307_0-1661176375821.png

 

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:RV_10243307)

In your text you write °C/W (that is: degrees Celsius per Watt),

in your Prime definition of CpW you define it .as C/W (that is: Coulomb per Watt). You'll probably want to correct that.

The temperature unit °C is a strange one, because it doesn't relate to the base unit K with just a multiplication factor. The unit °C in Prime is implemented using a function, and that results in the fact that you cannot simply apply it to a vector:

LucMeekes_0-1661179030666.png

But you can do:

LucMeekes_3-1661179422111.png

I bet in your case those temperatures are temperature differences, in which case you could replace °C with K (because a temperature difference of one degree Celsius is the same as one Kelvin). Alternatively you could use the unit Delta °C:

LucMeekes_2-1661179220497.png

All that said: Prime does NOT allow to change the units of individual elements of a result array (vector or matrix).

 

Success!
Luc

 

 

 

View solution in original post

7 REPLIES 7
LucMeekes
23-Emerald III
(To:RV_10243307)

In your text you write °C/W (that is: degrees Celsius per Watt),

in your Prime definition of CpW you define it .as C/W (that is: Coulomb per Watt). You'll probably want to correct that.

The temperature unit °C is a strange one, because it doesn't relate to the base unit K with just a multiplication factor. The unit °C in Prime is implemented using a function, and that results in the fact that you cannot simply apply it to a vector:

LucMeekes_0-1661179030666.png

But you can do:

LucMeekes_3-1661179422111.png

I bet in your case those temperatures are temperature differences, in which case you could replace °C with K (because a temperature difference of one degree Celsius is the same as one Kelvin). Alternatively you could use the unit Delta °C:

LucMeekes_2-1661179220497.png

All that said: Prime does NOT allow to change the units of individual elements of a result array (vector or matrix).

 

Success!
Luc

 

 

 

Werner_E
25-Diamond I
(To:RV_10243307)

Unfortunately there is no solution for your problem. Its a great drawback that we cannot manually change the units for single elements in a matrix.

You could edit the placehoder after the matrix to read C/W. So your second column would show the values you want to see but your first column (time values) will look quite strange 😉

Only workaround I can think of is to display the two columns singly and change the unit for the second one to C/W.

How to determine in what equation when to use deltaC or C? Is there any base requirement when to use which or when the equation is multiplication or addition subtraction or complicated or simple equation?

Werner_E
25-Diamond I
(To:TR_9781963)

As Luc already wrote, working with temperature other than Kelvin can be tricky and confusing. Units in Prime usually are implemented as constant multiplication factors. But this is not possible with temperatures because he conversion also requires a shift. So these units are implemented as functions.
When it comes to a rise of temperatures you should use Delta°C and not °C. Any value given in °C is converted to Kelvin but a value in Delta°C is equivalent to the same value in K

Werner_E_0-1661186140762.png

This should explain the examples below

Werner_E_1-1661186169305.png

You may also note the examples in the help, especially #5

https://support.ptc.com/help/mathcad/r8.0/en/index.html#page/PTC_Mathcad_Help%2Fexample_working_with_temperatures.html%23wwID0EK5ZDB

 

 

Sometimes it is very confusing can you explain the behavior? 

LucMeekes
23-Emerald III
(To:TR_9781963)

It's fully understandable.

Know that:

LucMeekes_1-1663965032589.png

Your check expression should be:

LucMeekes_3-1663965062416.png

 

Success!
Luc

 

 

 

Werner_E
25-Diamond I
(To:TR_9781963)

 

If 2000 and 1800 are meant to be Kelvin or degree Celsius, the correct result is 0,219 W

But if they are meant to be degree Fahrenheit, the correct result is 0,122 W

Reason is that the conversion from degree Celsius to Kelvin is just a shift of scale T.K=T.C+273.15

But the conversion from degree Fahrenheit to Kelvin additionally includes a factor 5/9.

This means that a temperature difference of 200 degree Celsius is also a difference of 200 Kelvin.

But a difference of 200 degree Fahrenheit is a difference of just 200*5/9 (approx. 111.1) Kelvin.

Werner_E_0-1663965309842.png

Werner_E_1-1663965348194.png

 

 

Announcements

Top Tags