QCalc.Units.Interfaces

Partial classes

Information

Extends from Icons.InterfacesPackage (Icon for packages containing interfaces (from MSL 3.2.1)).

Package Contents

Name Description
QCalc.Units.Interfaces.LambdaUnit LambdaUnit Partial operator record for a lambda unit
QCalc.Units.Interfaces.degC degC degree Celsius (degC)
QCalc.Units.Interfaces.Np Np neper (Np) (in terms of amplitude ratio, not power ratio)
QCalc.Units.Interfaces.B B bel (B) (in terms of power ratio, not amplitude ratio)
QCalc.Units.Interfaces.dB dB decibel (dB) (in terms of power ratio, not amplitude ratio)
QCalc.Units.Interfaces.kPag kPag kilopascal, gauge (kPag)

QCalc.Units.Interfaces.LambdaUnit

Partial operator record for a lambda unit

Parameters

TypeNameDefaultDescription
replaceable type QuantityQuantities.Interfaces.Quantity 

Modelica definition

partial operator record LambdaUnit "Partial operator record for a lambda unit" replaceable type Quantity = Quantities.Interfaces.Quantity; end LambdaUnit;

QCalc.Units.Interfaces.degC

degree Celsius (degC)

Information

Extends from LambdaUnit (Partial operator record for a lambda unit).

Parameters

TypeNameDefaultDescription
replaceable type QuantityQuantities.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;

QCalc.Units.Interfaces.Np

neper (Np) (in terms of amplitude ratio, not power ratio)

Information

Extends from LambdaUnit (Partial operator record for a lambda unit).

Parameters

TypeNameDefaultDescription
replaceable type QuantityQ.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;

QCalc.Units.Interfaces.B

bel (B) (in terms of power ratio, not amplitude ratio)

Information

Extends from LambdaUnit (Partial operator record for a lambda unit).

Parameters

TypeNameDefaultDescription
replaceable type QuantityQ.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;

QCalc.Units.Interfaces.dB

decibel (dB) (in terms of power ratio, not amplitude ratio)

Information

Extends from LambdaUnit (Partial operator record for a lambda unit).

Parameters

TypeNameDefaultDescription
replaceable type QuantityQ.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;

QCalc.Units.Interfaces.kPag

kilopascal, gauge (kPag)

Information

Extends from LambdaUnit (Partial operator record for a lambda unit).

Parameters

TypeNameDefaultDescription
replaceable type QuantityQ.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;