Handling Delta Temperature Units in Expressions
When Temperature and Delta Temperature quantities are used as operands to plus or minus operations in an expression, they are handled specially. The biggest difference is an automatic unit change of the resulting values based on the units of the operands.
- When two Temperature quantities are being subtracted (either the first or both operands is/are temperature quantities), the result value has Delta Temperature units.
- When a Delta Temperature quantity is added or subtracted from a Temperature quantity, the result value has Temperature units.
- Adding or subtracting two Delta Temperature quantities results in a quantity with Delta Temperature units.
- Subtracting two temperature quantities is an observable behavior change when compared to earlier releases of Ansys Electronics Desktop.
Temperature Units
Celsius Family
- cel, delta_cel (Legacy name for delta_cel, celdiff continues to be supported)
Kelvin Family
- mkel, delta_mkel (milli Kelvin) (Legacy name for delta_mkel, mkeldiff continues to be supported)
- ckel, delta_ckel (centi Kelvin)
- dkel, delta_dkel (deci Kelvin)
- kel, delta_kel (Legacy name for delta_kel, keldiff continues to be supported)
Farenheit Family
- fah, delta_fah
Temperature-related Use Cases
The high-level legal use cases (in unit types) are:
- Temperature - Temperature = DeltaTemperature
- Temperature +/- DeltaTemperature = Temperature
- DeltaTemperature +/- DeltaTemperature = DeltaTemperature
The minor variations in these use cases specify how the actual units (Celsius is a unit of the Temperature unit type) are handled.
Temperature - Temperature
If they have the same unit, then the Delta Temperature unit will be a matching one.
For example:
- 10 cel - 5 cel = 5 delta_cel
- 100 kel - 90kel = 10 delta_kel
- 10 fah - 1 fah = 9 delta_fah
If they have different units, they are converted to the default units for temperature difference.
For example:
- 10cel - 1 kel = 9 delta_kel
Temperature +/- DeltaTemperature
The resulting temperature quantity will retain the units of the Temperature quantity (first operand)
DeltaTemperature +/- DeltaTemperature
- If they have the same unit, the resulting Delta Temperature quantity will retain that.
- If they have different units, the resulting Delta Temperature quantity will have the default Delta Temperature units
- 5 delta_cel + 10 delta_cel = 15 delta_cel
- 10 delta_cel + 1 delta_kel = 11 delta_kel
All other use cases in a plus or minus arithmetic operation are physically meaningless and revert to previous bahavior, where Electronics Desktop converts quantities to their SI values and then operates on the plain numbers.
- Temperature + Temperature
- Temperature +/- non-Temperature/non-Delta Temperature
- Delta Temperature +/- non-Temperature/non-Delta Temperature
- non-Temperature/non-Delta Temperature +/- Delta Temperature
- non-Temperature/non-Delta Temperature +/- Temperature