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.Units.NonSI
to the
corresponding SI Units defined in package Modelica.Units.SI
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 Modelica.Units.SI; import Modelica.Units.Conversions.{from_degC, from_deg, from_rpm}; ... 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 |
---|---|
to_unit1 | Change the unit of a Real number to unit="1" |
to_degC | Convert from kelvin to degree Celsius |
from_degC | Convert from degree Celsius to kelvin |
to_degF | Convert from kelvin to degree Fahrenheit |
from_degF | Convert from degree Fahrenheit to kelvin |
to_degRk | Convert from kelvin to degree Rankine |
from_degRk | Convert from degree Rankine 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 |
Change the unit of a Real number to unit="1"
Modelica.Units.Conversions.to_unit1(r);
The function call "Conversions.to_unit1(r)
" returns r with unit="1".
Modelica.Units.SI.Velocity v = {3,2,1}; Real direction[3](unit="1") = to_unit1(v); // Automatically vectorized call of to_unit1
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
r | Real number |
Name | Description |
---|---|
result | Real number r with unit="1" [1] |
Convert from kelvin to degree Celsius
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
Kelvin | Value in kelvin [K] |
Name | Description |
---|---|
Celsius | Value in degree Celsius [degC] |
Convert from degree Celsius to kelvin
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
Celsius | Value in degree Celsius [degC] |
Name | Description |
---|---|
Kelvin | Value in kelvin [K] |
Convert from kelvin to degree Fahrenheit
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
Kelvin | Value in kelvin [K] |
Name | Description |
---|---|
Fahrenheit | Value in degree Fahrenheit [degF] |
Convert from degree Fahrenheit to kelvin
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
Fahrenheit | Value in degree Fahrenheit [degF] |
Name | Description |
---|---|
Kelvin | Value in kelvin [K] |
Convert from kelvin to degree Rankine
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
Kelvin | Value in kelvin [K] |
Name | Description |
---|---|
Rankine | Value in degree Rankine [degRk] |
Convert from degree Rankine to kelvin
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
Rankine | Value in degree Rankine [degRk] |
Name | Description |
---|---|
Kelvin | Value in kelvin [K] |
Convert from radian to degree
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
radian | Value in radian [rad] |
Name | Description |
---|---|
degree | Value in degree [deg] |
Convert from degree to radian
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
degree | Value in degree [deg] |
Name | Description |
---|---|
radian | Value in radian [rad] |
Convert from radian per second to revolutions per minute
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
rs | Value in radian per second [rad/s] |
Name | Description |
---|---|
rpm | Value in revolutions per minute [rev/min] |
Convert from revolutions per minute to radian per second
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
rpm | Value in revolutions per minute [rev/min] |
Name | Description |
---|---|
rs | Value in radian per second [rad/s] |
Convert from metre per second to kilometre per hour
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
ms | Value in metre per second [m/s] |
Name | Description |
---|---|
kmh | Value in kilometre per hour [km/h] |
Convert from kilometre per hour to metre per second
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
kmh | Value in kilometre per hour [km/h] |
Name | Description |
---|---|
ms | Value in metre per second [m/s] |
Convert from second to day
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
s | Value in second [s] |
Name | Description |
---|---|
day | Value in day [d] |
Convert from day to second
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
day | Value in day [d] |
Name | Description |
---|---|
s | Value in second [s] |
Convert from second to hour
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
s | Value in second [s] |
Name | Description |
---|---|
hour | Value in hour [h] |
Convert from hour to second
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
hour | Value in hour [h] |
Name | Description |
---|---|
s | Value in second [s] |
Convert from second to minute
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
s | Value in second [s] |
Name | Description |
---|---|
minute | Value in minute [min] |
Convert from minute to second
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
minute | Value in minute [min] |
Name | Description |
---|---|
s | Value in second [s] |
Convert from cubic metre to litre
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
m3 | Value in cubic metre [m3] |
Name | Description |
---|---|
litre | Value in litre [l] |
Convert from litre to cubic metre
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
litre | Value in litre [l] |
Name | Description |
---|---|
m3 | Value in cubic metre [m3] |
Convert from Ampere hours to Coulomb
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
AmpereHour | Value in ampere hours [A.h] |
Name | Description |
---|---|
Coulomb | Value in coulomb [C] |
Convert from Coulomb to Ampere hours
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
Coulomb | Value in coulomb [C] |
Name | Description |
---|---|
AmpereHour | Value in ampere hours [A.h] |
Convert from watt hour to joule
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
WattHour | Value in watt hour [W.h] |
Name | Description |
---|---|
Joule | Value in joule [J] |
Convert from joule to watt hour
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
Joule | Value in joule [J] |
Name | Description |
---|---|
WattHour | Value in watt hour [W.h] |
Convert from joule to kilo watt hour
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
J | Value in joule [J] |
Name | Description |
---|---|
kWh | Value in kWh [kW.h] |
Convert from kilo watt hour to joule
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
kWh | Value in kWh [kW.h] |
Name | Description |
---|---|
J | Value in joule [J] |
Convert from Pascal to bar
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
Pa | Value in Pascal [Pa] |
Name | Description |
---|---|
bar | Value in bar [bar] |
Convert from bar to Pascal
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
bar | Value in bar [bar] |
Name | Description |
---|---|
Pa | Value in Pascal [Pa] |
Convert from kilogram per second to gram per second
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
kgps | Value in kg/s [kg/s] |
Name | Description |
---|---|
gps | Value in g/s [g/s] |
Convert from gram per second to kilogram per second
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
gps | Value in g/s [g/s] |
Name | Description |
---|---|
kgps | Value in kg/s [kg/s] |
Convert from Hz to rad/s
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
f | Value in hertz [Hz] |
Name | Description |
---|---|
w | Value in radian per second [rad/s] |
Convert from rad/s to Hz
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
w | Value in radian per second [rad/s] |
Name | Description |
---|---|
f | Value in hertz [Hz] |
Convert from square metre to square centimetre
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
m2 | Value in square metre [m2] |
Name | Description |
---|---|
cm2 | Value in square centimetre [cm2] |
Convert from square centimetre to square metre
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Name | Description |
---|---|
cm2 | Value in square centimetre [cm2] |
Name | Description |
---|---|
m2 | Value in square metre [m2] |