Added more units strings.

Took out frequency conversion, until we reevalulate it
This commit is contained in:
Harry Moffat 2010-05-07 14:48:15 +00:00
parent 7b046ad00f
commit 94d0d85925

View file

@ -173,11 +173,15 @@ namespace Cantera {
static boost::mutex units_mutex;
#endif
/*!
* Units class constructor, containing the default mappings between
* strings and units.
*/
Unit(){
//! Units class constructor, containing the default mappings between
//! strings and units.
Unit() :
m_u(),
m_act_u()
{
// unity
m_u["1"] = 1.0;
// length
m_u["m"] = 1.0;
@ -197,6 +201,9 @@ namespace Cantera {
m_u["kcal"] = 4184.0;
m_u["eV"] = Faraday; //1.60217733e-19;
// resistance
m_u["ohm"] = 1.0;
// quantity
m_u["mol"] = 1.0e-3;
m_u["gmol"] = 1.0e-3;
@ -210,6 +217,7 @@ namespace Cantera {
m_u["C"] = 1.0;
// mass
m_u["gm"] = 1.0e-3;
m_u["g"] = 1.0e-3;
m_u["kg"] = 1.0;
@ -224,18 +232,32 @@ namespace Cantera {
m_u["hr"] = 3600.0;
m_u["ms"] = 0.001;
// frequency
/*
// frequency - Took frequency out to reevaluate it. Inverse cm is probably the wrong default unit
m_u["hZ"] = 0.01/(lightSpeed);
m_u["cm^-1"] = 1.0;
m_u["m^-1"] = 0.1;
m_u["cm-1"] = m_u["cm^-1"];
m_u["m-1"] = m_u["m^-1"];
m_u["wavenumbers"] = m_u["cm^-1"];
*/
// viscosity
m_u["Pa-s"] = 1;
m_u["poise"] = 0.1;
m_u["centipoise"] = 0.001;
m_u["P"] = 0.1;
m_u["cP"] = 0.001;
// volume
m_u["kL"] = 1.0;
m_u["liter"] = 0.001;
m_u["L"] = 0.001;
m_u["l"] = 0.001;
m_u["mL"] = 1.0e-6;
m_u["ml"] = 1.0e-6;
m_u["cc"] = 1.0e-6;
m_act_u["eV"] = m_u["eV"]; // /m_u["molec"];
m_act_u["K"] = GasConstant;
m_act_u["Kelvin"] = GasConstant;