Modelica.SIunits.Conversions

Conversion functions to/from non SI units and type definitions of non SI units

Information

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).

Package Content

Name Description
Modelica.SIunits.Conversions.NonSIunits NonSIunits Type definitions of non SI units
Modelica.SIunits.Conversions.to_unit1 to_unit1 Change the unit of a Real number to unit="1"
Modelica.SIunits.Conversions.to_degC to_degC Convert from Kelvin to degCelsius
Modelica.SIunits.Conversions.from_degC from_degC Convert from degCelsius to Kelvin
Modelica.SIunits.Conversions.to_degF to_degF Convert from Kelvin to degFahrenheit
Modelica.SIunits.Conversions.from_degF from_degF Convert from degFahrenheit to Kelvin
Modelica.SIunits.Conversions.to_degRk to_degRk Convert from Kelvin to degRankine
Modelica.SIunits.Conversions.from_degRk from_degRk Convert from degRankine to Kelvin
Modelica.SIunits.Conversions.to_deg to_deg Convert from radian to degree
Modelica.SIunits.Conversions.from_deg from_deg Convert from degree to radian
Modelica.SIunits.Conversions.to_rpm to_rpm Convert from radian per second to revolutions per minute
Modelica.SIunits.Conversions.from_rpm from_rpm Convert from revolutions per minute to radian per second
Modelica.SIunits.Conversions.to_kmh to_kmh Convert from metre per second to kilometre per hour
Modelica.SIunits.Conversions.from_kmh from_kmh Convert from kilometre per hour to metre per second
Modelica.SIunits.Conversions.to_day to_day Convert from second to day
Modelica.SIunits.Conversions.from_day from_day Convert from day to second
Modelica.SIunits.Conversions.to_hour to_hour Convert from second to hour
Modelica.SIunits.Conversions.from_hour from_hour Convert from hour to second
Modelica.SIunits.Conversions.to_minute to_minute Convert from second to minute
Modelica.SIunits.Conversions.from_minute from_minute Convert from minute to second
Modelica.SIunits.Conversions.to_litre to_litre Convert from cubic metre to litre
Modelica.SIunits.Conversions.from_litre from_litre Convert from litre to cubic metre
Modelica.SIunits.Conversions.from_Ah from_Ah Convert from Ampere hours to Coulomb
Modelica.SIunits.Conversions.to_Ah to_Ah Convert from Coulomb to Ampere hours
Modelica.SIunits.Conversions.from_Wh from_Wh Convert from Watt hour to Joule
Modelica.SIunits.Conversions.to_Wh to_Wh Convert from Joule to Watt hour
Modelica.SIunits.Conversions.to_kWh to_kWh Convert from Joule to kilo Watt hour
Modelica.SIunits.Conversions.from_kWh from_kWh Convert from kilo Watt hour to Joule
Modelica.SIunits.Conversions.to_bar to_bar Convert from Pascal to bar
Modelica.SIunits.Conversions.from_bar from_bar Convert from bar to Pascal
Modelica.SIunits.Conversions.to_gps to_gps Convert from kilogram per second to gram per second
Modelica.SIunits.Conversions.from_gps from_gps Convert from gram per second to kilogram per second
Modelica.SIunits.Conversions.from_Hz from_Hz Convert from Hz to rad/s
Modelica.SIunits.Conversions.to_Hz to_Hz Convert from rad/s to Hz
Modelica.SIunits.Conversions.to_cm2 to_cm2 Convert from square metre to square centimetre
Modelica.SIunits.Conversions.from_cm2 from_cm2 Convert from square centimetre to square metre
Modelica.SIunits.Conversions.ConversionIcon ConversionIcon This icon will be removed in future Modelica versions.

Modelica.SIunits.Conversions.to_unit1 Modelica.SIunits.Conversions.to_unit1

Change the unit of a Real number to unit="1"

Information

Syntax

SIunits.Conversions.to_unit1(r);

Description

The function call "Conversions.to_unit1(r)" returns r with unit="1".

Example

  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).

Inputs

NameDescription
rReal number

Outputs

NameDescription
resultReal number r with unit="1" [1]

Modelica.SIunits.Conversions.to_degC Modelica.SIunits.Conversions.to_degC

Convert from Kelvin to degCelsius

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
KelvinKelvin value [K]

Outputs

NameDescription
CelsiusCelsius value [degC]

Modelica.SIunits.Conversions.from_degC Modelica.SIunits.Conversions.from_degC

Convert from degCelsius to Kelvin

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
CelsiusCelsius value [degC]

Outputs

NameDescription
KelvinKelvin value [K]

Modelica.SIunits.Conversions.to_degF Modelica.SIunits.Conversions.to_degF

Convert from Kelvin to degFahrenheit

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
KelvinKelvin value [K]

Outputs

NameDescription
FahrenheitFahrenheit value [degF]

Modelica.SIunits.Conversions.from_degF Modelica.SIunits.Conversions.from_degF

Convert from degFahrenheit to Kelvin

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
FahrenheitFahrenheit value [degF]

Outputs

NameDescription
KelvinKelvin value [K]

Modelica.SIunits.Conversions.to_degRk Modelica.SIunits.Conversions.to_degRk

Convert from Kelvin to degRankine

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
KelvinKelvin value [K]

Outputs

NameDescription
RankineRankine value [degRk]

Modelica.SIunits.Conversions.from_degRk Modelica.SIunits.Conversions.from_degRk

Convert from degRankine to Kelvin

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
RankineRankine value [degRk]

Outputs

NameDescription
KelvinKelvin value [K]

Modelica.SIunits.Conversions.to_deg Modelica.SIunits.Conversions.to_deg

Convert from radian to degree

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
radianradian value [rad]

Outputs

NameDescription
degreedegree value [deg]

Modelica.SIunits.Conversions.from_deg Modelica.SIunits.Conversions.from_deg

Convert from degree to radian

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
degreedegree value [deg]

Outputs

NameDescription
radianradian value [rad]

Modelica.SIunits.Conversions.to_rpm Modelica.SIunits.Conversions.to_rpm

Convert from radian per second to revolutions per minute

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
rsradian per second value [rad/s]

Outputs

NameDescription
rpmrevolutions per minute value [rev/min]

Modelica.SIunits.Conversions.from_rpm Modelica.SIunits.Conversions.from_rpm

Convert from revolutions per minute to radian per second

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
rpmrevolutions per minute value [rev/min]

Outputs

NameDescription
rsradian per second value [rad/s]

Modelica.SIunits.Conversions.to_kmh Modelica.SIunits.Conversions.to_kmh

Convert from metre per second to kilometre per hour

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
msmetre per second value [m/s]

Outputs

NameDescription
kmhkilometre per hour value [km/h]

Modelica.SIunits.Conversions.from_kmh Modelica.SIunits.Conversions.from_kmh

Convert from kilometre per hour to metre per second

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
kmhkilometre per hour value [km/h]

Outputs

NameDescription
msmetre per second value [m/s]

Modelica.SIunits.Conversions.to_day Modelica.SIunits.Conversions.to_day

Convert from second to day

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
ssecond value [s]

Outputs

NameDescription
dayday value [d]

Modelica.SIunits.Conversions.from_day Modelica.SIunits.Conversions.from_day

Convert from day to second

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
dayday value [d]

Outputs

NameDescription
ssecond value [s]

Modelica.SIunits.Conversions.to_hour Modelica.SIunits.Conversions.to_hour

Convert from second to hour

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
ssecond value [s]

Outputs

NameDescription
hourhour value [h]

Modelica.SIunits.Conversions.from_hour Modelica.SIunits.Conversions.from_hour

Convert from hour to second

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
hourhour value [h]

Outputs

NameDescription
ssecond value [s]

Modelica.SIunits.Conversions.to_minute Modelica.SIunits.Conversions.to_minute

Convert from second to minute

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
ssecond value [s]

Outputs

NameDescription
minuteminute value [min]

Modelica.SIunits.Conversions.from_minute Modelica.SIunits.Conversions.from_minute

Convert from minute to second

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
minuteminute value [min]

Outputs

NameDescription
ssecond value [s]

Modelica.SIunits.Conversions.to_litre Modelica.SIunits.Conversions.to_litre

Convert from cubic metre to litre

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
m3cubic metre value [m3]

Outputs

NameDescription
litrelitre value [l]

Modelica.SIunits.Conversions.from_litre Modelica.SIunits.Conversions.from_litre

Convert from litre to cubic metre

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
litrelitre value [l]

Outputs

NameDescription
m3cubic metre value [m3]

Modelica.SIunits.Conversions.from_Ah Modelica.SIunits.Conversions.from_Ah

Convert from Ampere hours to Coulomb

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
AmpereHourAmpere hours [A.h]

Outputs

NameDescription
CoulombCoulomb [C]

Modelica.SIunits.Conversions.to_Ah Modelica.SIunits.Conversions.to_Ah

Convert from Coulomb to Ampere hours

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
CoulombCoulomb [C]

Outputs

NameDescription
AmpereHourAmpere hours [A.h]

Modelica.SIunits.Conversions.from_Wh Modelica.SIunits.Conversions.from_Wh

Convert from Watt hour to Joule

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
WattHourWatt hour [W.h]

Outputs

NameDescription
JouleJoule [J]

Modelica.SIunits.Conversions.to_Wh Modelica.SIunits.Conversions.to_Wh

Convert from Joule to Watt hour

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
JouleJoule [J]

Outputs

NameDescription
WattHourWatt hour [W.h]

Modelica.SIunits.Conversions.to_kWh Modelica.SIunits.Conversions.to_kWh

Convert from Joule to kilo Watt hour

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
JJoule value [J]

Outputs

NameDescription
kWhkWh value [kW.h]

Modelica.SIunits.Conversions.from_kWh Modelica.SIunits.Conversions.from_kWh

Convert from kilo Watt hour to Joule

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
kWhkWh value [kW.h]

Outputs

NameDescription
JJoule value [J]

Modelica.SIunits.Conversions.to_bar Modelica.SIunits.Conversions.to_bar

Convert from Pascal to bar

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
PaPascal value [Pa]

Outputs

NameDescription
barbar value [bar]

Modelica.SIunits.Conversions.from_bar Modelica.SIunits.Conversions.from_bar

Convert from bar to Pascal

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
barbar value [bar]

Outputs

NameDescription
PaPascal value [Pa]

Modelica.SIunits.Conversions.to_gps Modelica.SIunits.Conversions.to_gps

Convert from kilogram per second to gram per second

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
kgpskg/s value [kg/s]

Outputs

NameDescription
gpsg/s value [g/s]

Modelica.SIunits.Conversions.from_gps Modelica.SIunits.Conversions.from_gps

Convert from gram per second to kilogram per second

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
gpsg/s value [g/s]

Outputs

NameDescription
kgpskg/s value [kg/s]

Modelica.SIunits.Conversions.from_Hz Modelica.SIunits.Conversions.from_Hz

Convert from Hz to rad/s

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
ffrequency [Hz]

Outputs

NameDescription
wangular velocity [rad/s]

Modelica.SIunits.Conversions.to_Hz Modelica.SIunits.Conversions.to_Hz

Convert from rad/s to Hz

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
wangular velocity [rad/s]

Outputs

NameDescription
ffrequency [Hz]

Modelica.SIunits.Conversions.to_cm2 Modelica.SIunits.Conversions.to_cm2

Convert from square metre to square centimetre

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
m2square metre value [m2]

Outputs

NameDescription
cm2square centimetre value [cm2]

Modelica.SIunits.Conversions.from_cm2 Modelica.SIunits.Conversions.from_cm2

Convert from square centimetre to square metre

Information

Extends from Modelica.SIunits.Icons.Conversion (Base icon for conversion functions).

Inputs

NameDescription
cm2square centimetre value [cm2]

Outputs

NameDescription
m2square metre value [m2]

Modelica.SIunits.Conversions.ConversionIcon Modelica.SIunits.Conversions.ConversionIcon

This icon will be removed in future Modelica versions.

Information

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).

Automatically generated Thu Dec 19 17:20:27 2019.