Contents - Index


UNITSYSTEM$

 

The UNITSYSTEM$ function provides string information relating to the current settings in the Unit System dialog window.  The function takes a string argument that must be surrounded by single quote marks.  Legal arguments are shown in the first column in the following list.  The function will return a string that represents the current unit setting.  Note that the units of energy, entropy and volume are returned for specific properties.  Possible return strings for each of the arguments are shown in the second and third columns for EES configured in English and SI units, respectively.:

 

Argument Returns (English Units)  Returns (SI Units)  

Conductivity  Btu/hr-ft-R W/m-K  

Density          lb_m/ft^2 kg/m^3  

ElectricalResistivity ohm-ft ohm-m  

Energy Btu/lb_m, Btu/lbmol J/kg, J/kmol, kJ/kg, kJ/kmol  

Entropy Btu/lb_m-R, Btu/lbmol-R, J/kg-K, J/kmol-K, kJ/kg-K, kJ/kmol-K  

Density          lb_m/ft^3, lbmol/ft^3 kg/m^3, kmol/m^3  

length ft m  

Pressure psia, atm Pa, kPa, MPa, bar  

SoundSpeed ft/s m/s  

SurfaceTension lb_f/ft N/m  

Temperature F, R  C, K  

Trig  radians, degrees radians, degrees  

Viscosity      lb_m/ft-hr kg/m-s  

VolExpCoef 1/R 1/K  

Volume ft^3/lb_m, ft^3/lbmol m^3/kg, m^3/kmol  

YieldStress ksi Mpa  

YoungsModulus psia GPa  

     

 

 

The function is particularly useful if you are writing your own internal library routines.  For example, suppose you have written a function that requires a temperature in K.  The temperature is supplied to the program in variable T with the units specified in the Unit System dialog window or $UNITSYSTEM directive. You can convert the temperature supplied to the function to K units with the following equations.

 

T$=unitsystem$('Temperature')

TK=converttemp(T$,K,T)

 

 

Also see: 

 UnitSystem

 $UNITSYSTEM

 Mathematical functions

 Unit System menu item