Multiple Unit Calculation and/or Converstion
Posted: December 27th, 2016, 10:26 pm
This Simantics system looks like a fantastic tool, and just starting out, I've encountered an obstacle with units.
I need to create models using multiple units with combined unit relationships such as Aux1=Volts, Aux2=Amps, Aux4=Watts (Aux1*Aux2), Aux5=AmpHours Aux6=WattHours (Aux1*Aux5). Although these aren't really dimensionless quantities, it seems to only work by treating them as such and entering 1 for the units.
Similarly, it would be handy to be able to convert units inside the model, where, for example a main parameter receives data in hours, but seconds are best used downstream in the model. However, creating Aux1 with Units set to "Hours", value set to X, and Aux2 with Units set to "Seconds", value set to "Aux1*3600" generates an warning of "Hours!=Seconds".
While the warning is clearly true, I'd like to be able to define the relationship somewhere.
Is there a facility to do this such as a conversion symbol type, or is there documentation that I am missing on how to define these sorts of relationships in Simantic? Do I need to either disable unit validation, or set the units to "1" in this section of the model, or is there a better way? Also, is there some more detailed documentation on how the Units are handled and validated?
Thanks in advance for any help!
I need to create models using multiple units with combined unit relationships such as Aux1=Volts, Aux2=Amps, Aux4=Watts (Aux1*Aux2), Aux5=AmpHours Aux6=WattHours (Aux1*Aux5). Although these aren't really dimensionless quantities, it seems to only work by treating them as such and entering 1 for the units.
Similarly, it would be handy to be able to convert units inside the model, where, for example a main parameter receives data in hours, but seconds are best used downstream in the model. However, creating Aux1 with Units set to "Hours", value set to X, and Aux2 with Units set to "Seconds", value set to "Aux1*3600" generates an warning of "Hours!=Seconds".
While the warning is clearly true, I'd like to be able to define the relationship somewhere.
Is there a facility to do this such as a conversion symbol type, or is there documentation that I am missing on how to define these sorts of relationships in Simantic? Do I need to either disable unit validation, or set the units to "1" in this section of the model, or is there a better way? Also, is there some more detailed documentation on how the Units are handled and validated?
Thanks in advance for any help!