Package 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 Contents
Name | Description |
---|
ConversionIcon | This icon will be removed in future Modelica versions. |
from_Ah | Convert from Ampere hours to Coulomb |
from_bar | Convert from bar to Pascal |
from_cm2 | Convert from square centimetre to square metre |
from_day | Convert from day to second |
from_deg | Convert from degree to radian |
from_degC | Convert from degCelsius to Kelvin |
from_degF | Convert from degFahrenheit to Kelvin |
from_degRk | Convert from degRankine to Kelvin |
from_gps | Convert from gram per second to kilogram per second |
from_hour | Convert from hour to second |
from_Hz | Convert from Hz to rad/s |
from_kmh | Convert from kilometre per hour to metre per second |
from_kWh | Convert from kilo Watt hour to Joule |
from_litre | Convert from litre to cubic metre |
from_minute | Convert from minute to second |
from_rpm | Convert from revolutions per minute to radian per second |
from_Wh | Convert from Watt hour to Joule |
NonSIunits … | Type definitions of non SI units |
to_Ah | Convert from Coulomb to Ampere hours |
to_bar | Convert from Pascal to bar |
to_cm2 | Convert from square metre to square centimetre |
to_day | Convert from second to day |
to_deg | Convert from radian to degree |
to_degC | Convert from Kelvin to degCelsius |
to_degF | Convert from Kelvin to degFahrenheit |
to_degRk | Convert from Kelvin to degRankine |
to_gps | Convert from kilogram per second to gram per second |
to_hour | Convert from second to hour |
to_Hz | Convert from rad/s to Hz |
to_kmh | Convert from metre per second to kilometre per hour |
to_kWh | Convert from Joule to kilo Watt hour |
to_litre | Convert from cubic metre to litre |
to_minute | Convert from second to minute |
to_rpm | Convert from radian per second to revolutions per minute |
to_unit1 | Change the unit of a Real number to unit="1" |
to_Wh | Convert from Joule to Watt hour |
Function 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
Type | Name | Description |
---|
Real | r | Real number |
Outputs
Type | Name | Description |
---|
Real | result | Real number r with unit="1" |
Function Modelica.SIunits.Conversions.to_degC
Convert from Kelvin to degCelsius
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.from_degC
Convert from degCelsius to Kelvin
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.to_degF
Convert from Kelvin to degFahrenheit
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.from_degF
Convert from degFahrenheit to Kelvin
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.to_degRk
Convert from Kelvin to degRankine
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.from_degRk
Convert from degRankine to Kelvin
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Angle | radian | radian value |
Outputs
Type | Name | Description |
---|
Angle_deg | degree | degree value |
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Angle_deg | degree | degree value |
Outputs
Type | Name | Description |
---|
Angle | radian | radian value |
Function Modelica.SIunits.Conversions.to_rpm
Convert from radian per second to revolutions per minute
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.from_rpm
Convert from revolutions per minute to radian per second
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.to_kmh
Convert from metre per second to kilometre per hour
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Velocity | ms | metre per second value |
Outputs
Function Modelica.SIunits.Conversions.from_kmh
Convert from kilometre per hour to metre per second
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Type | Name | Description |
---|
Velocity | ms | metre per second value |
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Time | s | second value |
Outputs
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Type | Name | Description |
---|
Time | s | second value |
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Time | s | second value |
Outputs
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Type | Name | Description |
---|
Time | s | second value |
Function Modelica.SIunits.Conversions.to_minute
Convert from second to minute
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Time | s | second value |
Outputs
Function Modelica.SIunits.Conversions.from_minute
Convert from minute to second
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Type | Name | Description |
---|
Time | s | second value |
Function Modelica.SIunits.Conversions.to_litre
Convert from cubic metre to litre
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Volume | m3 | cubic metre value |
Outputs
Function Modelica.SIunits.Conversions.from_litre
Convert from litre to cubic metre
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Type | Name | Description |
---|
Volume | m3 | cubic metre value |
Function Modelica.SIunits.Conversions.from_Ah
Convert from Ampere hours to Coulomb
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.to_Ah
Convert from Coulomb to Ampere hours
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.from_Wh
Convert from Watt hour to Joule
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Energy_Wh | WattHour | Watt hour |
Outputs
Type | Name | Description |
---|
Energy | Joule | Joule |
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Energy | Joule | Joule |
Outputs
Type | Name | Description |
---|
Energy_Wh | WattHour | Watt hour |
Function Modelica.SIunits.Conversions.to_kWh
Convert from Joule to kilo Watt hour
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Energy | J | Joule value |
Outputs
Function Modelica.SIunits.Conversions.from_kWh
Convert from kilo Watt hour to Joule
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Type | Name | Description |
---|
Energy | J | Joule value |
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Pressure | Pa | Pascal value |
Outputs
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Type | Name | Description |
---|
Pressure | Pa | Pascal value |
Function Modelica.SIunits.Conversions.to_gps
Convert from kilogram per second to gram per second
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.from_gps
Convert from gram per second to kilogram per second
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Outputs
Function Modelica.SIunits.Conversions.to_cm2
Convert from square metre to square centimetre
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Area | m2 | square metre value |
Outputs
Type | Name | Description |
---|
Area_cm | cm2 | square centimetre value |
Function Modelica.SIunits.Conversions.from_cm2
Convert from square centimetre to square metre
Extends from Modelica.SIunits.Icons.Conversion
(Base icon for conversion functions).
Inputs
Type | Name | Description |
---|
Area_cm | cm2 | square centimetre value |
Outputs
Type | Name | Description |
---|
Area | m2 | square metre value |
Partial Function 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).
Generated 2018-12-12 12:14:37 EST by MapleSim.