#include "SIUnit.hpp"
Public Member Functions | |
SIUnit (const SIExpnt &exponents=SIExpnt(), int scaleExponent=0, const std::string &prettyString="") | |
SIUnit (const std::string &scaleAbbreviation, const SIExpnt &exponents=SIExpnt(), const std::string &prettyString="") | |
virtual | ~SIUnit () |
SIUnit is a Unit with baseUnits are fixed by its constructors, see SIExpnt.
setBaseUnitExponent throws an exception if any other string is passed in as a baseUnit. SIUnit.hpp declares related operators and UnitFactory callback functions.
openstudio::SIUnit::SIUnit | ( | const SIExpnt & | exponents = SIExpnt() , |
int | scaleExponent = 0 , |
||
const std::string & | prettyString = "" |
||
) |
Default constructor.
Example:
SIUnit myEnergy(SIExpnt(1,2,-2),3,"J"); std::cout << myEnergy; // produces "kJ"
[in] | exponents | holds the exponents for each base unit. |
[in] | scaleExponent | exponent for scale. For instance 3 for kilo. |
[in] | prettyString | optional string to use in place of standardString. |
openstudio::SIUnit::SIUnit | ( | const std::string & | scaleAbbreviation, |
const SIExpnt & | exponents = SIExpnt() , |
||
const std::string & | prettyString = "" |
||
) |
Alternate constructor.
Specify the abbreviation of the scale, rather than its exponent. Example:
SIUnit myEnergy("k",SIExpnt(1,2,-2),"J"); std::cout << myEnergy; // produces "kJ
[in] | scaleAbbreviation | is string equal to a scale abbreviation. For instance "k" for kilo. |
[in] | exponents | holds the exponents for each base unit. |
[in] | prettyString | optional string to use in place of standardString. |
|
inlinevirtual |
|
related |
|
related |
|
related |
|
related |
|
related |
Volt (V) = W/A = J/C = kg*m^2/s^3*A.
|
related |
Farad (F) = C/V = C^2/J = s^4*A^2/kg*m^2.
|
related |
Coulomb (C) = s*A.
|
related |
|
related |
Ohm (ohm) = V/A = W/A^2 = kg*m^2/s^3*A^2.
|
related |
Joule (J) = N*m = kg*m^2/s^2.
|
related |
J/m^2 = kg/s^2.
That this is measured on an annual basis is implied.
|
related |
Newton (N) = kg*m/s^2.
|
related |
Hertz (Hz) = cycles/s.
Making the distinction between 1/s and cycles/s here mainly to be consistent with the rotations per minute (rpm) designation made elsewhere.
|
related |
J/m^2*K = kg/s^2*K.
|
related |
Lux (lux or lx) = lm/m^2 = cd*sr/m^2.
|
related |
Henry (H) = Wb/A = s*V/A = kg*m^2/s^2*A^2.
|
related |
|
related |
Lumen (lm) = cd*sr.
|
related |
|
related |
Tesla (T) = Wb/m^2 = J/m^2*A = kg/s^2*A.
|
related |
Weber (Wb) = J/A = kg*m^2/s^2*A.
|
related |
|
related |
|
related |
Watt (W) = J/s = N*m/s = kg*m^2/s^3.
|
related |
W/m^2 = kg/s^3.
|
related |
W/person = kg*m^2/s^3*person.
|
related |
Pa = N/m^2 = kg/m*s^2.
|
related |
|
related |
|
related |
W/m^2*K = kg/s^3*K.
|
related |
m^2*K/W = s^3*K/kg
|
related |
|
related |
|
related |