LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Thermodynamic temperatures? A nighmare...

I need to vent a bit of frustration regarding the way in which Labview handles physical units of temperatures here! This is especially frustrating when using thermodynamic formulas wher absolute temperatures are essential!

 

I have used these units a lot but I still do not understand the way in which the different temperature units [K], [Cdeg], and [degC] should be used and how they are handled internally. I would expect to be [K] the standard and when I calculate the temperature difference of two temperatures in [K] I expect the difference still to be [K]. But this is not the case! If I need this delta T for further calculations it gets even more confusing.

 

To get around this problem I converted the temperatures first to non-unit numbers using the unit[K]-conversion, then "apply" the unit [K] again after the substraction. Now it gets really confusing: I need the square of this number but when I sqare the value which should have the unit [K] I get.... [Cdeg].

If I use the same number in a multiple multiplication node (together with other varaibles), the units are correct.

 

Interestingly, when I use the probe cursor with context-help on, the unit directly behind the unit [K] conversion is shown as [Cdeg] and not as [K].

But now I am really scared: Which number is used in formulas where e.g. the temperature is multiplied with e.g. the Boltzman constant (J/K)? Do I get the thermodynamically correct energy or something wrong? It seems that physical units may be completely worthless when using them (especially temperatures) in thermodynamic formulas....... this behaviour has been found in LV2009 but the confusion with temperature units I had with previous versions already a lot!

 

I added a vi to demonstrate that the temperature squared results in a wrong unit, but T times T is correct!

 

 

Olaf

   

 

Message 1 of 4
(3,077 Views)

When you live in a world with h=kb=c=G=1, these things aren't a problem.  There are other problems, I'd be careful around a 12 Planck Volt car battery.

 

My usual advice is to leave all units out until the end, this saves floating point precision and in this case frustration and bugs.   I agree, it took me about 2 minutes to decide that units in LV rank up there with Stacked Sequences, Express VIs, and the Stop function.

Message 2 of 4
(3,061 Views)
The issue you're seeing with the Square function has been reported before and has been confirmed as a bug. Corrective Action Requests #44236 and #47360 were filed. As of 8.6.1 this bug still wasn't fixed, and based on what you're seeing, it still has not been fixed in 2009. We can only hope it's fixed for future releases.
0 Kudos
Message 3 of 4
(3,058 Views)

I agree, it took me about 2 minutes to decide that units in LV rank up there with Stacked Sequences, Express VIs, and the Stop function.

 

After many years of LV I have tried using the units once.... years ago and have not used them since.... I agree with Darin, manage the units yourself in code.

SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
Message 4 of 4
(3,040 Views)