Conversion functions to/from non SI units and type definitions of non SI units
This package provides conversion functions from the non SI Units defined in package Modelica.SIunits.Conversions.NonSIunits to the corresponding SI Units defined in package Modelica.SIunits and vice versa. It is recommended to use these functions in the following way (note, that all functions have one Real input and one Real output argument):
import SI = Modelica.SIunits; import Modelica.SIunits.Conversions.*; ... parameter SI.Temperature T = from_degC(25); // convert 25 degree Celsius to Kelvin parameter SI.Angle phi = from_deg(180); // convert 180 degree to radian parameter SI.AngularVelocity w = from_rpm(3600); // convert 3600 revolutions per minutes // to radian per seconds
Extends from Modelica.Icons.Package (Icon for standard packages).
Name | Description |
---|---|
NonSIunits | Type definitions of non SI units |
to_unit1 | Change the unit of a Real number to unit="1" |
to_degC | Convert from Kelvin to degCelsius |
from_degC | Convert from degCelsius to Kelvin |
to_degF | Convert from Kelvin to degFahrenheit |
from_degF | Convert from degFahrenheit to Kelvin |
to_degRk | Convert from Kelvin to degRankine |
from_degRk | Convert from degRankine to Kelvin |
to_deg | Convert from radian to degree |
from_deg | Convert from degree to radian |
to_rpm | Convert from radian per second to revolutions per minute |
from_rpm | Convert from revolutions per minute to radian per second |
to_kmh | Convert from metre per second to kilometre per hour |
from_kmh | Convert from kilometre per hour to metre per second |
to_day | Convert from second to day |
from_day | Convert from day to second |
to_hour | Convert from second to hour |
from_hour | Convert from hour to second |
to_minute | Convert from second to minute |
from_minute | Convert from minute to second |
to_litre | Convert from cubic metre to litre |
from_litre | Convert from litre to cubic metre |
from_Ah | Convert from Ampere hours to Coulomb |
to_Ah | Convert from Coulomb to Ampere hours |
from_Wh | Convert from Watt hour to Joule |
to_Wh | Convert from Joule to Watt hour |
to_kWh | Convert from Joule to kilo Watt hour |
from_kWh | Convert from kilo Watt hour to Joule |
to_bar | Convert from Pascal to bar |
from_bar | Convert from bar to Pascal |
to_gps | Convert from kilogram per second to gram per second |
from_gps | Convert from gram per second to kilogram per second |
from_Hz | Convert from Hz to rad/s |
to_Hz | Convert from rad/s to Hz |
to_cm2 | Convert from square metre to square centimetre |
from_cm2 | Convert from square centimetre to square metre |
ConversionIcon | This icon will be removed in future Modelica versions. |
Change the unit of a Real number to unit="1"
SIunits.Conversions.to_unit1(r);
The function call "Conversions.to_unit1(r)
" returns r with unit="1".
Modelica.SIunits.Velocity v = {3,2,1}; Real direction[3](unit="1") = to_unit1(v); // Automatically vectorized call of to_unit1
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Real | r | Real number |
Type | Name | Description |
---|---|---|
Real | result | Real number r with unit="1" [1] |
Convert from Kelvin to degCelsius
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Temperature | Kelvin | Kelvin value [K] |
Type | Name | Description |
---|---|---|
Temperature_degC | Celsius | Celsius value [degC] |
Convert from degCelsius to Kelvin
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Temperature_degC | Celsius | Celsius value [degC] |
Type | Name | Description |
---|---|---|
Temperature | Kelvin | Kelvin value [K] |
Convert from Kelvin to degFahrenheit
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Temperature | Kelvin | Kelvin value [K] |
Type | Name | Description |
---|---|---|
Temperature_degF | Fahrenheit | Fahrenheit value [degF] |
Convert from degFahrenheit to Kelvin
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Temperature_degF | Fahrenheit | Fahrenheit value [degF] |
Type | Name | Description |
---|---|---|
Temperature | Kelvin | Kelvin value [K] |
Convert from Kelvin to degRankine
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Temperature | Kelvin | Kelvin value [K] |
Type | Name | Description |
---|---|---|
Temperature_degRk | Rankine | Rankine value [degRk] |
Convert from degRankine to Kelvin
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Temperature_degRk | Rankine | Rankine value [degRk] |
Type | Name | Description |
---|---|---|
Temperature | Kelvin | Kelvin value [K] |
Convert from radian to degree
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Angle | radian | radian value [rad] |
Type | Name | Description |
---|---|---|
Angle_deg | degree | degree value [deg] |
Convert from degree to radian
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Angle_deg | degree | degree value [deg] |
Type | Name | Description |
---|---|---|
Angle | radian | radian value [rad] |
Convert from radian per second to revolutions per minute
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
AngularVelocity | rs | radian per second value [rad/s] |
Type | Name | Description |
---|---|---|
AngularVelocity_rpm | rpm | revolutions per minute value [rev/min] |
Convert from revolutions per minute to radian per second
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
AngularVelocity_rpm | rpm | revolutions per minute value [rev/min] |
Type | Name | Description |
---|---|---|
AngularVelocity | rs | radian per second value [rad/s] |
Convert from metre per second to kilometre per hour
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Velocity | ms | metre per second value [m/s] |
Type | Name | Description |
---|---|---|
Velocity_kmh | kmh | kilometre per hour value [km/h] |
Convert from kilometre per hour to metre per second
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Velocity_kmh | kmh | kilometre per hour value [km/h] |
Type | Name | Description |
---|---|---|
Velocity | ms | metre per second value [m/s] |
Convert from second to day
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Time | s | second value [s] |
Type | Name | Description |
---|---|---|
Time_day | day | day value [d] |
Convert from day to second
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Time_day | day | day value [d] |
Type | Name | Description |
---|---|---|
Time | s | second value [s] |
Convert from second to hour
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Time | s | second value [s] |
Type | Name | Description |
---|---|---|
Time_hour | hour | hour value [h] |
Convert from hour to second
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Time_hour | hour | hour value [h] |
Type | Name | Description |
---|---|---|
Time | s | second value [s] |
Convert from second to minute
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Time | s | second value [s] |
Type | Name | Description |
---|---|---|
Time_minute | minute | minute value [min] |
Convert from minute to second
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Time_minute | minute | minute value [min] |
Type | Name | Description |
---|---|---|
Time | s | second value [s] |
Convert from cubic metre to litre
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Volume | m3 | cubic metre value [m3] |
Type | Name | Description |
---|---|---|
Volume_litre | litre | litre value [l] |
Convert from litre to cubic metre
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Volume_litre | litre | litre value [l] |
Type | Name | Description |
---|---|---|
Volume | m3 | cubic metre value [m3] |
Convert from Ampere hours to Coulomb
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
ElectricCharge_Ah | AmpereHour | Ampere hours [A.h] |
Type | Name | Description |
---|---|---|
ElectricCharge | Coulomb | Coulomb [C] |
Convert from Coulomb to Ampere hours
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
ElectricCharge | Coulomb | Coulomb [C] |
Type | Name | Description |
---|---|---|
ElectricCharge_Ah | AmpereHour | Ampere hours [A.h] |
Convert from Watt hour to Joule
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Energy_Wh | WattHour | Watt hour [W.h] |
Type | Name | Description |
---|---|---|
Energy | Joule | Joule [J] |
Convert from Joule to Watt hour
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Energy | Joule | Joule [J] |
Type | Name | Description |
---|---|---|
Energy_Wh | WattHour | Watt hour [W.h] |
Convert from Joule to kilo Watt hour
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Energy | J | Joule value [J] |
Type | Name | Description |
---|---|---|
Energy_kWh | kWh | kWh value [kW.h] |
Convert from kilo Watt hour to Joule
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Energy_kWh | kWh | kWh value [kW.h] |
Type | Name | Description |
---|---|---|
Energy | J | Joule value [J] |
Convert from Pascal to bar
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Pressure | Pa | Pascal value [Pa] |
Type | Name | Description |
---|---|---|
Pressure_bar | bar | bar value [bar] |
Convert from bar to Pascal
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Pressure_bar | bar | bar value [bar] |
Type | Name | Description |
---|---|---|
Pressure | Pa | Pascal value [Pa] |
Convert from kilogram per second to gram per second
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate | kgps | kg/s value [kg/s] |
Type | Name | Description |
---|---|---|
MassFlowRate_gps | gps | g/s value [g/s] |
Convert from gram per second to kilogram per second
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate_gps | gps | g/s value [g/s] |
Type | Name | Description |
---|---|---|
MassFlowRate | kgps | kg/s value [kg/s] |
Convert from Hz to rad/s
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Frequency | f | frequency [Hz] |
Type | Name | Description |
---|---|---|
AngularVelocity | w | angular velocity [rad/s] |
Convert from rad/s to Hz
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
AngularVelocity | w | angular velocity [rad/s] |
Type | Name | Description |
---|---|---|
Frequency | f | frequency [Hz] |
Convert from square metre to square centimetre
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Area | m2 | square metre value [m2] |
Type | Name | Description |
---|---|---|
Area_cm | cm2 | square centimetre value [cm2] |
Convert from square centimetre to square metre
Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).
Type | Name | Default | Description |
---|---|---|---|
Area_cm | cm2 | square centimetre value [cm2] |
Type | Name | Description |
---|---|---|
Area | m2 | square metre value [m2] |
This icon will be removed in future Modelica versions.
This icon of a conversion symbol will be removed in future versions of the library. Instead the icon Modelica.SIunits.Icons.Conversion shall be used.
Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).