Standard units of length, mass, volume, and pressure, and their conversion factors.
More...
Standard units of length, mass, volume, and pressure, and their conversion factors.
This is a set of numerical constants used to define and convert units of length, mass, and pressure. The standard unit defined for each quantity is as follows:
- standard mass unit : grammes(KVUnits::g)
- standard length unit : centimetres (KVUnits::cm)
- standard pressure unit : torr (KVUnits::torr)
- standard mass unit : grammes (KVUnits::gr)
- standard volume unit : cc/ml (KVUnits::cc)
- standard energy unit : MeV (KVUnits::MeV)
- standard time unit : fm/c (KVUnits::fmpc)
- standard density unit : nuc/fm3 (KVUnits::nucpfm3)
- standard temperature unit : MeV/kb (KVUnits::MeVpkb)
The value of the corresponding numerical constant for each of the standard units is 1. The other available units are:
- mass units: microgramme (KVUnits::ug), milligramme (KVUnits::mg), kilogramme (KVUnits::kg)
- length units: micron/micrometre (KVUnits::um), millimetre (KVUnits::mm), metre (KVUnits::m)
- pressure units: millibar (KVUnits::mbar), pascal (KVUnits::Pa), atmosphere (KVUnits::atm)
Unit conversion
If x is a quantity expressed in terms of one of the standard units, the corresponding quantity in terms of a different unit is obtained by dividing x by the appropriate numerical constant:
- x = pressure in torr: (x/KVUnits::mbar) is pressure in millibar;
- x = mass in grammes: (x/KVUnitsmg) is mass in milligrammes;
- x = length in centimetres: (x/KVUnitsum) is length in microns/micrometres.
On the other hand, if x is a quantity expressed in arbitrary units, then in order to express it in terms of standard units multiply x by the appropriate numerical constant:
- x = pressure in atmospheres: (x*KVUnits::atm) is pressure in torr;
- x = mass in microgrammes: (x*KVUnits::ug) is mass in grammes;
- x = length in millimetres: (x*KVUnitsmm) is length in centimetres.
Composite units
Similar conversions can be achieved by combinations of numerical constants. For example, if x is a density expressed in kilogrammes per cubic metre, the corresponding density in standard units ( \(g/cm^3\)) is
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)