OpenStudio:utilities
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages

#include "SIUnit.hpp"

Inheritance diagram for openstudio::SIUnit:

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

Related Functions

typedef boost::optional< SIUnitOptionalSIUnit
typedef std::vector< SIUnitSIUnitVector
SIUnit createSIMass ()
SIUnit createSILength ()
SIUnit createSITime ()
SIUnit createSITemperature ()
SIUnit createSIElectricCurrent ()
SIUnit createSILuminousIntensity ()
SIUnit createSIAmountOfSubstance ()
SIUnit createSIAngle ()
SIUnit createSISolidAngle ()
SIUnit createSIPeople ()
SIUnit createSICycle ()
SIUnit createSICurrency ()
SIUnit createSIForce ()
SIUnit createSIEnergy ()
SIUnit createSIPower ()
SIUnit createSIElectricCharge ()
SIUnit createSIElectricalPotential ()
SIUnit createSIElectricCapacitance ()
SIUnit createSIElectricResistance ()
SIUnit createSIMagneticFlux ()
SIUnit createSIMagneticFieldStrength ()
SIUnit createSIInductance ()
SIUnit createSILuminousFlux ()
SIUnit createSIIlluminance ()
SIUnit createSIFrequency ()
SIUnit createSIEnergyUseIntensity ()
SIUnit createSIPowerDensity ()
SIUnit createSIPowerPerPerson ()
SIUnit createSIPressure ()
SIUnit createSIThermalConductance ()
SIUnit createSIThermalResistance ()
SIUnit createSIHeatCapacity ()

Detailed Description

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.

Constructor & Destructor Documentation

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" 
Parameters
[in]exponentsholds the exponents for each base unit.
[in]scaleExponentexponent for scale. For instance 3 for kilo.
[in]prettyStringoptional 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 
Parameters
[in]scaleAbbreviationis string equal to a scale abbreviation. For instance "k" for kilo.
[in]exponentsholds the exponents for each base unit.
[in]prettyStringoptional string to use in place of standardString.
virtual openstudio::SIUnit::~SIUnit ( )
inlinevirtual

Friends And Related Function Documentation

SIUnit createSIAmountOfSubstance ( )
related
SIUnit createSIAngle ( )
related
SIUnit createSICurrency ( )
related
SIUnit createSICycle ( )
related
SIUnit createSIElectricalPotential ( )
related

Volt (V) = W/A = J/C = kg*m^2/s^3*A.

SIUnit createSIElectricCapacitance ( )
related

Farad (F) = C/V = C^2/J = s^4*A^2/kg*m^2.

SIUnit createSIElectricCharge ( )
related

Coulomb (C) = s*A.

SIUnit createSIElectricCurrent ( )
related
SIUnit createSIElectricResistance ( )
related

Ohm (ohm) = V/A = W/A^2 = kg*m^2/s^3*A^2.

SIUnit createSIEnergy ( )
related

Joule (J) = N*m = kg*m^2/s^2.

SIUnit createSIEnergyUseIntensity ( )
related

J/m^2 = kg/s^2.

That this is measured on an annual basis is implied.

SIUnit createSIForce ( )
related

Newton (N) = kg*m/s^2.

SIUnit createSIFrequency ( )
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.

SIUnit createSIHeatCapacity ( )
related

J/m^2*K = kg/s^2*K.

SIUnit createSIIlluminance ( )
related

Lux (lux or lx) = lm/m^2 = cd*sr/m^2.

SIUnit createSIInductance ( )
related

Henry (H) = Wb/A = s*V/A = kg*m^2/s^2*A^2.

SIUnit createSILength ( )
related
SIUnit createSILuminousFlux ( )
related

Lumen (lm) = cd*sr.

SIUnit createSILuminousIntensity ( )
related
SIUnit createSIMagneticFieldStrength ( )
related

Tesla (T) = Wb/m^2 = J/m^2*A = kg/s^2*A.

SIUnit createSIMagneticFlux ( )
related

Weber (Wb) = J/A = kg*m^2/s^2*A.

SIUnit createSIMass ( )
related
SIUnit createSIPeople ( )
related
SIUnit createSIPower ( )
related

Watt (W) = J/s = N*m/s = kg*m^2/s^3.

SIUnit createSIPowerDensity ( )
related

W/m^2 = kg/s^3.

SIUnit createSIPowerPerPerson ( )
related

W/person = kg*m^2/s^3*person.

SIUnit createSIPressure ( )
related

Pa = N/m^2 = kg/m*s^2.

SIUnit createSISolidAngle ( )
related
SIUnit createSITemperature ( )
related
SIUnit createSIThermalConductance ( )
related

W/m^2*K = kg/s^3*K.

SIUnit createSIThermalResistance ( )
related

m^2*K/W = s^3*K/kg

SIUnit createSITime ( )
related
typedef boost::optional<SIUnit> OptionalSIUnit
related
typedef std::vector<SIUnit> SIUnitVector
related