Partial classes
Information
Extends from Icons.InterfacesPackage (Icon for packages containing interfaces (from MSL 3.2.1)).
Package Contents
Name |
Description |
LambdaUnit
|
Partial operator record for a lambda unit |
degC
|
degree Celsius (degC) |
Np
|
neper (Np) (in terms of amplitude ratio, not power ratio) |
B
|
bel (B) (in terms of power ratio, not amplitude ratio) |
dB
|
decibel (dB) (in terms of power ratio, not amplitude ratio) |
kPag
|
kilopascal, gauge (kPag) |
Partial operator record for a lambda unit
Parameters
Type | Name | Default | Description |
replaceable type Quantity | Quantities.Interfaces.Quantity | |
Modelica definition
degree Celsius (degC)
Information
Extends from LambdaUnit (Partial operator record for a lambda unit).
Parameters
Type | Name | Default | Description |
replaceable type Quantity | Quantities.Temperature | |
Modelica definition
operator record degC
"degree Celsius (degC)"
extends LambdaUnit(
redeclare type Quantity =
Quantities.Temperature);
operator '*'
"Multiplication is overloaded to map a number to a quantity"
function num2qty
"Convert a number to a quantity"
input Real n
"Number";
input degC selfDummy
"2nd argument is the unit itself; contains no data";
output Quantity q
"Quantity";
algorithm
q := (n + 273.15)*K;
end num2qty;
end '*';
operator '/'
"Division is overloaded to map a quantity to a number"
function qty2num
"Convert a quantity to a number"
input Quantity q
"Quantity";
input degC selfDummy
"2nd argument is the unit itself; contains no data";
output Real n
"Number";
algorithm
n := q/K - 273.15;
end qty2num;
end '/';
end degC;
neper (Np) (in terms of amplitude ratio, not power ratio)
Information
Extends from LambdaUnit (Partial operator record for a lambda unit).
Parameters
Type | Name | Default | Description |
replaceable type Quantity | Q.Number | |
Modelica definition
operator record Np
"neper (Np) (in terms of amplitude ratio, not power ratio)"
extends LambdaUnit(
redeclare type Quantity =
Q.Number);
operator '*'
"Multiplication is overloaded to map a number to a quantity"
function num2qty
"Convert a number to a quantity"
input Real n
"Number";
input Np selfDummy
"2nd argument is the unit itself; contains no data";
output Quantity q
"Quantity";
algorithm
q :=
exp(n);
end num2qty;
end '*';
operator '/'
"Division is overloaded to map a quantity to a number"
function qty2num
"Convert a quantity to a number"
input Quantity q
"Quantity";
input Np selfDummy
"2nd argument is the unit itself; contains no data";
output Real n
"Number";
algorithm
n :=
log(q);
end qty2num;
end '/';
end Np;
bel (B) (in terms of power ratio, not amplitude ratio)
Information
Extends from LambdaUnit (Partial operator record for a lambda unit).
Parameters
Type | Name | Default | Description |
replaceable type Quantity | Q.Number | |
Modelica definition
operator record B
"bel (B) (in terms of power ratio, not amplitude ratio)"
extends LambdaUnit(
redeclare type Quantity =
Q.Number);
operator '*'
"Multiplication is overloaded to map a number to a quantity"
function num2qty
"Convert a number to a quantity"
input Real n
"Number";
input B selfDummy
"2nd argument is the unit itself; contains no data";
output Quantity q
"Quantity";
algorithm
q := 10^n;
end num2qty;
end '*';
operator '/'
"Division is overloaded to map a quantity to a number"
function qty2num
"Convert a quantity to a number"
input Quantity q
"Quantity";
input B selfDummy
"2nd argument is the unit itself; contains no data";
output Real n
"Number";
algorithm
n :=
log10(q);
end qty2num;
end '/';
end B;
decibel (dB) (in terms of power ratio, not amplitude ratio)
Information
Extends from LambdaUnit (Partial operator record for a lambda unit).
Parameters
Type | Name | Default | Description |
replaceable type Quantity | Q.Number | |
Modelica definition
operator record dB
"decibel (dB) (in terms of power ratio, not amplitude ratio)"
extends LambdaUnit(
redeclare type Quantity =
Q.Number);
operator '*'
"Multiplication is overloaded to map a number to a quantity"
function num2qty
"Convert a number to a quantity"
input Real n
"Number";
input dB selfDummy
"2nd argument is the unit itself; contains no data";
output Quantity q
"Quantity";
algorithm
q := 10^(Prefixes.d*n);
end num2qty;
end '*';
operator '/'
"Division is overloaded to map a quantity to a number"
function qty2num
"Convert a quantity to a number"
input Quantity q
"Quantity";
input dB selfDummy
"2nd argument is the unit itself; contains no data";
output Real n
"Number";
algorithm
n :=
log10(q)/Prefixes.d;
end qty2num;
end '/';
end dB;
kilopascal, gauge (kPag)
Information
Extends from LambdaUnit (Partial operator record for a lambda unit).
Parameters
Type | Name | Default | Description |
replaceable type Quantity | Q.Pressure | |
Modelica definition
operator record kPag
"kilopascal, gauge (kPag)"
extends LambdaUnit(
redeclare type Quantity =
Q.Pressure);
operator '*'
"Multiplication is overloaded to map a number to a quantity"
function num2qty
"Convert a number to a quantity"
input Real n
"Number";
input kPag selfDummy
"2nd argument is the unit itself; contains no data";
output Quantity q
"Quantity";
algorithm
q := n*kPa + atm;
end num2qty;
end '*';
operator '/'
"Division is overloaded to map a quantity to a number"
function qty2num
"Convert a quantity to a number"
input Quantity q
"Quantity";
input kPag selfDummy
"2nd argument is the unit itself; contains no data";
output Real n
"Number";
algorithm
n := (q - atm)/kPa;
end qty2num;
end '/';
end kPag;