Created
May 30, 2012 13:52
-
-
Save speth/2836455 to your computer and use it in GitHub Desktop.
Cantera physical constants
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _USE_MATH_DEFINES | |
#include <cmath> | |
/*! | |
* All physical constants are stored here. | |
* | |
* @defgroup physConstants Physical Constants | |
* %Cantera uses the MKS system of units. The unit for moles | |
* is defined to be the kmol. All values of physical constants | |
* are consistent with the 2010 CODATA recommendations. | |
* @ingroup globalData | |
* @{ | |
*/ | |
//! Pi | |
const doublereal Pi = M_PI; | |
//! sqrt(Pi) | |
const doublereal SqrtPi = std::sqrt(Pi); | |
//! Avogadro's Number | |
/*! | |
* Units are number/kmol | |
*/ | |
const doublereal Avogadro = 6.02214129e26; | |
/// Universal Gas Constant. 2006 CODATA value. | |
const doublereal GasConstant = 8314.4621; // J/kmol/K | |
const doublereal logGasConstant = std::log(GasConstant); | |
//! One atmosphere | |
/*! | |
* Units are Pa | |
*/ | |
const doublereal OneAtm = 1.01325e5; | |
//! Universal gas constant in cal/mol/K | |
const doublereal GasConst_cal_mol_K = GasConstant / 4184.0; | |
//! Boltzmann's constant | |
/*! | |
* Units are J/K | |
*/ | |
const doublereal Boltzmann = GasConstant / Avogadro; | |
/// Planck's constant. Units of J-s 6.62607009e-34; | |
const doublereal Planck = 6.62607009e-34; // J-s | |
const doublereal Planck_bar = Planck / (2 * Pi); // m2-kg/s | |
/// log(k/h) | |
const doublereal logBoltz_Planck = std::log(Boltzmann / Planck); // ln(k_B/h) | |
/// Stefan-Boltzmann constant | |
const doublereal StefanBoltz = 5.670373e-8; | |
/// @name Electron Properties | |
//@{ | |
const doublereal ElectronCharge = 1.602176565e-19; // C | |
const doublereal ElectronMass = 9.10938291e-31; // kg | |
const doublereal Faraday = ElectronCharge * Avogadro; | |
//@} | |
/// @name Electromagnetism | |
/// %Cantera uses the MKS unit system. | |
//@{ | |
/// Speed of Light (m/s). | |
const doublereal lightSpeed = 299792458.0; | |
/// Permeability of free space \f$ \mu_0 \f$ in N/A^2. | |
const doublereal permeability_0 = 4.0e-7*Pi; // N/A^2 | |
/// Permittivity of free space \f$ \epsilon_0 \f$ in F/m. | |
const doublereal epsilon_0 = 1.0 / (lightSpeed*lightSpeed*permeability_0); // Farads/m = C^2/N/m^2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment