Rearrange the physical constants

This commit is contained in:
Bryan W. Weber 2019-06-14 10:21:05 -04:00 committed by Ray Speth
parent 3e6e57edbf
commit 541fddb15e

View file

@ -53,61 +53,79 @@ using std::isnan; // workaround for bug in libstdc++ 4.8
const double Pi = 3.14159265358979323846;
/*!
* @name Variations of the Gas Constant
* %Cantera uses the MKS system of units. The unit for moles
* is defined to be the kmol.
* @name Defined Constants
* These constants are defined by CODATA to have a particular value.
* https://physics.nist.gov/cuu/Constants/index.html
*/
//@{
//! Avogadro's Number [number/kmol]
//! Avogadro's Number \f$ N_{\mathrm{A}} $\f [number/kmol]
const double Avogadro = 6.02214076e26;
//! Boltzmann's constant [J/K]
//! Boltzmann constant \f$ k $\f [J/K]
const double Boltzmann = 1.380649e-23;
/// Universal Gas Constant. [J/kmol/K]
//! Planck constant \f$ h $\f [J-s]
const double Planck = 6.62607015e-34;
//! Elementary charge \f$ e $\f [C]
const double ElectronCharge = 1.602176634e-19;
/// Speed of Light in a vacuum \f$ c $\f [m/s]
const double lightSpeed = 299792458.0;
//! One atmosphere [Pa]
const double OneAtm = 1.01325e5;
//! One bar [Pa]
const double OneBar = 1.0E5;
//@}
/*!
* @name Measured Constants
* These constants are measured and reported by CODATA
*/
//@{
//! Fine structure constant \f$ \alpha $\f []
const double fineStructureConstant = 7.2973525693e-3;
//! Electron Mass \f$ m_e $\f [kg]
const double ElectronMass = 9.1093837015e-31;
//@}
/*!
* @name Derived Constants
* These constants are found from the defined and measured constants
*/
//@{
//! Reduced Planck constant \f$ \hbar $\f [m2-kg/s]
const double Planck_bar = Planck / (2 * Pi);
//! Universal Gas Constant \f$ R_u $\f [J/kmol/K]
const double GasConstant = Avogadro * Boltzmann;
const double logGasConstant = std::log(GasConstant);
//! One atmosphere [Pa]
const double OneAtm = 1.01325e5;
const double OneBar = 1.0E5;
//! Universal gas constant in cal/mol/K
const double GasConst_cal_mol_K = GasConstant / 4184.0;
/// Planck's constant. [J-s]
const double Planck = 6.62607015e-34; // J-s
const double Planck_bar = Planck / (2 * Pi); // m2-kg/s
//! log(k_b/h)
const double logBoltz_Planck = std::log(Boltzmann / Planck);
/// log(k/h)
const double logBoltz_Planck = std::log(Boltzmann / Planck); // ln(k_B/h)
/// Stefan-Boltzmann constant
const double StefanBoltz = 5.670374419e-8;
//! Stefan-Boltzmann constant \f$ \sigma $\f [W/m2/K4]
const double StefanBoltz = Pi * Pi * std::pow(Boltzmann, 4.0) / (60.0 * std::pow(Planck_bar, 3.0) * lightSpeed * lightSpeed); // 5.670374419e-8
//@}
/// @name Electron Properties
//@{
const double ElectronCharge = 1.602176634e-19; // C
const double ElectronMass = 9.1093837015e-31; // kg
//! Faraday constant \f$ F $\f [C/kmol]
const double Faraday = ElectronCharge * Avogadro;
//@}
/// @name Electromagnetism
/// %Cantera uses the MKS unit system.
//@{
/// Speed of Light (m/s).
const double lightSpeed = 299792458.0;
//! Fine structure constant []
const double fineStructureConstant = 7.2973525693e-3;
/// Permeability of free space \f$ \mu_0 \f$ in N/A^2.
//! Permeability of free space \f$ \mu_0 $\f [N/A2]
const double permeability_0 = 2 * fineStructureConstant * Planck / (ElectronCharge * ElectronCharge * lightSpeed);
/// Permittivity of free space \f$ \epsilon_0 \f$ in F/m.
//! Permittivity of free space \f$ \varepsilon_0 $\f [F/m]
const double epsilon_0 = 1.0 / (lightSpeed * lightSpeed * permeability_0);
//@}