Cantera  2.1.2
Variables
Physical Constants
Collaboration diagram for Physical Constants:

Variables

const doublereal Pi = 3.14159265358979323846
 Pi. More...
 
const doublereal SqrtPi = std::sqrt(Pi)
 sqrt(Pi) More...
 

Variations of the Gas Constant

Cantera uses the MKS system of units. The unit for moles is defined to be the kmol.

const doublereal Avogadro = 6.02214129e26
 Avogadro's Number [number/kmol]. More...
 
const doublereal GasConstant = 8314.4621
 Universal Gas Constant. [J/kmol/K]. More...
 
const doublereal logGasConstant = std::log(GasConstant)
 
const doublereal OneAtm = 1.01325e5
 One atmosphere [Pa]. More...
 
const doublereal OneBar = 1.0E5
 
const doublereal GasConst_cal_mol_K = GasConstant / 4184.0
 Universal gas constant in cal/mol/K. More...
 
const doublereal Boltzmann = GasConstant / Avogadro
 Boltzmann's constant [J/K]. More...
 
const doublereal Planck = 6.62607009e-34
 Planck's constant. [J-s]. More...
 
const doublereal Planck_bar = Planck / (2 * Pi)
 
const doublereal logBoltz_Planck = std::log(Boltzmann / Planck)
 log(k/h) More...
 
const doublereal StefanBoltz = 5.670373e-8
 Stefan-Boltzmann constant. More...
 

Electron Properties

const doublereal ElectronCharge = 1.602176565e-19
 
const doublereal ElectronMass = 9.10938291e-31
 
const doublereal Faraday = ElectronCharge * Avogadro
 

Electromagnetism

Cantera uses the MKS unit system.

const doublereal lightSpeed = 299792458.0
 Speed of Light (m/s). More...
 
const doublereal permeability_0 = 4.0e-7*Pi
 Permeability of free space \( \mu_0 \) in N/A^2. More...
 
const doublereal epsilon_0 = 1.0 / (lightSpeed*lightSpeed*permeability_0)
 Permittivity of free space \( \epsilon_0 \) in F/m. More...
 

Detailed Description

All physical constants are stored here.

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.

Variable Documentation

const doublereal Pi = 3.14159265358979323846
const doublereal SqrtPi = std::sqrt(Pi)

sqrt(Pi)

Definition at line 53 of file ct_defs.h.

Referenced by Voigt::F(), Cantera::Frot(), GaussianProfile::profile(), and Voigt::profile().

const doublereal Avogadro = 6.02214129e26

Avogadro's Number [number/kmol].

Definition at line 63 of file ct_defs.h.

Referenced by WaterProps::ADebye(), TransportFactory::fitProperties(), TransportFactory::setupMM(), Unit::Unit(), and VCS_SOLVE::vcs_nondim_Farad().

const doublereal GasConstant = 8314.4621

Universal Gas Constant. [J/kmol/K].

Definition at line 66 of file ct_defs.h.

Referenced by ThermoPhase::_RT(), MixtureFugacityTP::_updateReferenceStateThermo(), VPSSMgr_Water_ConstVol::_updateRefStateThermo(), VPSSMgr_Water_HKFT::_updateRefStateThermo(), VPSSMgr_IdealGas::_updateStandardStateThermo(), VPSSMgr_Water_ConstVol::_updateStandardStateThermo(), VPSSMgr_ConstVol::_updateStandardStateThermo(), VPSSMgr_Water_HKFT::_updateStandardStateThermo(), SurfPhase::_updateThermo(), IdealSolidSolnPhase::_updateThermo(), IdealGasPhase::_updateThermo(), vcs_VolPhase::_updateVolPM(), WaterProps::ADebye(), HMWSoln::ADebye_J(), HMWSoln::ADebye_L(), HMWSoln::ADebye_V(), InterfaceKinetics::applyButlerVolmerCorrection(), InterfaceKinetics::applyExchangeCurrentDensityFormulation(), IdealSolnGasVPSS::calcDensity(), MixtureFugacityTP::calculatePsat(), MultiPhaseEquil::computeReactionSteps(), ConstCpPoly::ConstCpPoly(), PDSS_Water::constructSet(), ConstDensityThermo::cp_mole(), IdealSolnGasVPSS::cp_mole(), PDSS_ConstVol::cp_mole(), PDSS_IdealGas::cp_mole(), StoichSubstance::cp_mole(), PDSS_IonsFromNeutral::cp_mole(), RedlichKwongMFTP::cp_mole(), SingleSpeciesTP::cp_mole(), IdealSolidSolnPhase::cp_mole(), PDSS_SSVol::cp_mole(), LatticePhase::cp_mole(), IdealGasPhase::cp_mole(), PDSS::cp_R(), PDSS_Water::cp_R_ref(), PDSS::cpDelp_mole(), IdealSolnGasVPSS::cv_mole(), PDSS_IdealGas::cv_mole(), RedlichKwongMFTP::cv_mole(), RedlichKisterVPSSTP::cv_mole(), MixedSolventElectrolyte::cv_mole(), MargulesVPSSTP::cv_mole(), PhaseCombo_Interaction::cv_mole(), IdealGasPhase::cv_mole(), IdealGasPhase::cv_trans(), PDSS_IdealGas::density(), PDSS_IonsFromNeutral::density(), WaterProps::density_T(), RedlichKwongMFTP::densityCalc(), MixtureFugacityTP::densityCalc(), RedlichKwongMFTP::dpdVCalc(), ConstDensityThermo::enthalpy_mole(), IdealSolnGasVPSS::enthalpy_mole(), PDSS_ConstVol::enthalpy_mole(), PDSS_IdealGas::enthalpy_mole(), PDSS_IonsFromNeutral::enthalpy_mole(), IdealSolidSolnPhase::enthalpy_mole(), PDSS_SSVol::enthalpy_mole(), LatticePhase::enthalpy_mole(), IdealGasPhase::enthalpy_mole(), PDSS_HKFT::enthalpy_RT(), PDSS::enthalpy_RT(), PDSS_Water::enthalpy_RT_ref(), PDSS::enthalpyDelp_mole(), ConstDensityThermo::entropy_mole(), IdealSolnGasVPSS::entropy_mole(), PDSS_ConstVol::entropy_mole(), PDSS_IdealGas::entropy_mole(), StoichSubstance::entropy_mole(), PDSS_IonsFromNeutral::entropy_mole(), RedlichKwongMFTP::entropy_mole(), IdealSolidSolnPhase::entropy_mole(), PDSS_SSVol::entropy_mole(), LatticePhase::entropy_mole(), IdealGasPhase::entropy_mole(), PDSS::entropy_R(), PDSS_Water::entropy_R_ref(), PDSS::entropyDelp_mole(), ChemEquil::equilibrate(), ChemEquil::estimateElementPotentials(), StFlow::eval(), TransportFactory::fitProperties(), FixedChemPotSSTP::FixedChemPotSSTP(), RedlichKwongMFTP::getActivityCoefficients(), Cantera::getArrhenius(), ConstDensityThermo::getChemPotentials(), MolarityIonicVPSSTP::getChemPotentials(), SurfPhase::getChemPotentials(), IdealSolnGasVPSS::getChemPotentials(), IonsFromNeutralVPSSTP::getChemPotentials(), RedlichKwongMFTP::getChemPotentials(), RedlichKisterVPSSTP::getChemPotentials(), MixedSolventElectrolyte::getChemPotentials(), MargulesVPSSTP::getChemPotentials(), PhaseCombo_Interaction::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials(), IdealMolalSoln::getChemPotentials(), LatticePhase::getChemPotentials(), IdealGasPhase::getChemPotentials(), DebyeHuckel::getChemPotentials(), HMWSoln::getChemPotentials(), StoichSubstance::getChemPotentials_RT(), SingleSpeciesTP::getChemPotentials_RT(), IdealSolidSolnPhase::getChemPotentials_RT(), WaterSSTP::getCp_R(), StoichSubstance::getCp_R(), SurfPhase::getCp_R(), VPSSMgr_Water_ConstVol::getCp_R_ref(), WaterSSTP::getCp_R_ref(), GasKinetics::getDeltaSSEnthalpy(), AqueousKinetics::getDeltaSSEnthalpy(), InterfaceKinetics::getDeltaSSEnthalpy(), GasKinetics::getDeltaSSEntropy(), AqueousKinetics::getDeltaSSEntropy(), InterfaceKinetics::getDeltaSSEntropy(), MixedSolventElectrolyte::getdlnActCoeffds(), MargulesVPSSTP::getdlnActCoeffds(), PhaseCombo_Interaction::getdlnActCoeffds(), ThermoPhase::getElementPotentials(), WaterSSTP::getEnthalpy_RT(), StoichSubstance::getEnthalpy_RT(), MineralEQ3::getEnthalpy_RT(), StoichSubstanceSSTP::getEnthalpy_RT(), SurfPhase::getEnthalpy_RT(), IdealSolidSolnPhase::getEnthalpy_RT(), LatticePhase::getEnthalpy_RT(), VPSSMgr_Water_ConstVol::getEnthalpy_RT_ref(), WaterSSTP::getEnthalpy_RT_ref(), WaterSSTP::getEntropy_R(), StoichSubstance::getEntropy_R(), PureFluidPhase::getEntropy_R(), SurfPhase::getEntropy_R(), VPSSMgr_Water_ConstVol::getEntropy_R_ref(), WaterSSTP::getEntropy_R_ref(), GasKinetics::getEquilibriumConstants(), AqueousKinetics::getEquilibriumConstants(), InterfaceKinetics::getEquilibriumConstants(), AqueousTransport::getFluidMobilities(), SimpleTransport::getFluidMobilities(), LiquidTransport::getFluidMobilities(), VPSSMgr_Water_HKFT::getGibbs_ref(), VPSSMgr_Water_ConstVol::getGibbs_ref(), VPSSMgr_General::getGibbs_ref(), StoichSubstance::getGibbs_ref(), PureFluidPhase::getGibbs_ref(), SingleSpeciesTP::getGibbs_ref(), VPSSMgr::getGibbs_ref(), LatticeSolidPhase::getGibbs_ref(), IdealSolidSolnPhase::getGibbs_ref(), LatticePhase::getGibbs_ref(), WaterSSTP::getGibbs_RT(), StoichSubstance::getGibbs_RT(), SurfPhase::getGibbs_RT(), VPSSMgr_Water_ConstVol::getGibbs_RT_ref(), WaterSSTP::getGibbs_RT_ref(), WaterSSTP::getIntEnergy_RT(), VPSSMgr::getIntEnergy_RT(), MineralEQ3::getIntEnergy_RT(), StoichSubstanceSSTP::getIntEnergy_RT(), IdealSolidSolnPhase::getIntEnergy_RT(), MineralEQ3::getIntEnergy_RT_ref(), StoichSubstanceSSTP::getIntEnergy_RT_ref(), MetalSHEelectrons::getIntEnergy_RT_ref(), IdealSolidSolnPhase::getIntEnergy_RT_ref(), LTI_StefanMaxwell_PPN::getMatrixTransProp(), DustyGasTransport::getMolarFluxes(), MolarityIonicVPSSTP::getPartialMolarCp(), SurfPhase::getPartialMolarCp(), SingleSpeciesTP::getPartialMolarCp(), IdealSolnGasVPSS::getPartialMolarCp(), RedlichKwongMFTP::getPartialMolarCp(), RedlichKisterVPSSTP::getPartialMolarCp(), MixedSolventElectrolyte::getPartialMolarCp(), MargulesVPSSTP::getPartialMolarCp(), PhaseCombo_Interaction::getPartialMolarCp(), IdealSolidSolnPhase::getPartialMolarCp(), IdealMolalSoln::getPartialMolarCp(), LatticePhase::getPartialMolarCp(), IdealGasPhase::getPartialMolarCp(), DebyeHuckel::getPartialMolarCp(), HMWSoln::getPartialMolarCp(), MolarityIonicVPSSTP::getPartialMolarEnthalpies(), SurfPhase::getPartialMolarEnthalpies(), SingleSpeciesTP::getPartialMolarEnthalpies(), IdealSolnGasVPSS::getPartialMolarEnthalpies(), IonsFromNeutralVPSSTP::getPartialMolarEnthalpies(), RedlichKwongMFTP::getPartialMolarEnthalpies(), RedlichKisterVPSSTP::getPartialMolarEnthalpies(), MixedSolventElectrolyte::getPartialMolarEnthalpies(), MargulesVPSSTP::getPartialMolarEnthalpies(), PhaseCombo_Interaction::getPartialMolarEnthalpies(), IdealSolidSolnPhase::getPartialMolarEnthalpies(), LatticePhase::getPartialMolarEnthalpies(), IdealGasPhase::getPartialMolarEnthalpies(), DebyeHuckel::getPartialMolarEnthalpies(), HMWSoln::getPartialMolarEnthalpies(), MolarityIonicVPSSTP::getPartialMolarEntropies(), SurfPhase::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarEntropies(), SingleSpeciesTP::getPartialMolarEntropies(), IonsFromNeutralVPSSTP::getPartialMolarEntropies(), RedlichKwongMFTP::getPartialMolarEntropies(), RedlichKisterVPSSTP::getPartialMolarEntropies(), MixedSolventElectrolyte::getPartialMolarEntropies(), MargulesVPSSTP::getPartialMolarEntropies(), PhaseCombo_Interaction::getPartialMolarEntropies(), IdealSolidSolnPhase::getPartialMolarEntropies(), IdealMolalSoln::getPartialMolarEntropies(), LatticePhase::getPartialMolarEntropies(), IdealGasPhase::getPartialMolarEntropies(), DebyeHuckel::getPartialMolarEntropies(), HMWSoln::getPartialMolarEntropies(), SingleSpeciesTP::getPartialMolarIntEnergies(), IdealSolnGasVPSS::getPartialMolarIntEnergies(), RedlichKwongMFTP::getPartialMolarIntEnergies(), IdealGasPhase::getPartialMolarIntEnergies(), RedlichKwongMFTP::getPartialMolarVolumes(), DebyeHuckel::getPartialMolarVolumes(), HMWSoln::getPartialMolarVolumes(), SingleSpeciesTP::getPureGibbs(), LatticePhase::getPureGibbs(), Cantera::getRateCoefficient(), MineralEQ3::getStandardChemPotentials(), VPSSMgr::getStandardChemPotentials(), StoichSubstanceSSTP::getStandardChemPotentials(), MetalSHEelectrons::getStandardChemPotentials(), IdealGasPhase::getStandardChemPotentials(), Cantera::getStick(), MultiTransport::getThermalDiffCoeffs(), PDSS_ConstVol::gibbs_mole(), PDSS_IdealGas::gibbs_mole(), PDSS_IonsFromNeutral::gibbs_mole(), IdealSolidSolnPhase::gibbs_mole(), PDSS_SSVol::gibbs_mole(), PDSS::gibbs_RT(), PDSS_Water::gibbs_RT_ref(), PDSS::gibbsDelp_mole(), RedlichKwongMFTP::hresid(), LiquidTranInteraction::init(), GasKinetics::init(), PureFluidPhase::initThermo(), WaterSSTP::initThermoXML(), SimpleThermo::install(), ConstDensityThermo::intEnergy_mole(), PDSS_ConstVol::intEnergy_mole(), StoichSubstance::intEnergy_mole(), PDSS_IdealGas::intEnergy_mole(), PDSS_IonsFromNeutral::intEnergy_mole(), IdealSolidSolnPhase::intEnergy_mole(), PDSS_SSVol::intEnergy_mole(), LatticePhase::intEnergy_mole(), IdealGasPhase::intEnergy_mole(), IdealGasPhase::logStandardConc(), ConstCpPoly::modifyParameters(), PDSS_IdealGas::molarVolume(), PDSS_IdealGas::molarVolume_ref(), RedlichKwongMFTP::NicholsSolve(), MixtureFugacityTP::phaseState(), RedlichKwongMFTP::pressure(), IdealGasPhase::pressure(), MixTransport::pressure_ig(), PecosTransport::pressure_ig(), RedlichKwongMFTP::pressureCalc(), RedlichKwongMFTP::pressureDerivatives(), Mu0Poly::processCoeffs(), HMWSoln::relative_enthalpy(), ThermoPhase::report(), ConstCpPoly::reportParameters(), StatMech::reportParameters(), Mu0Poly::reportParameters(), SimpleThermo::reportParams(), MixedSolventElectrolyte::s_update_dlnActCoeff_dlnN(), MargulesVPSSTP::s_update_dlnActCoeff_dlnN(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnN(), MixedSolventElectrolyte::s_update_dlnActCoeff_dlnN_diag(), MargulesVPSSTP::s_update_dlnActCoeff_dlnN_diag(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnN_diag(), MixedSolventElectrolyte::s_update_dlnActCoeff_dlnX_diag(), MargulesVPSSTP::s_update_dlnActCoeff_dlnX_diag(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnX_diag(), MixedSolventElectrolyte::s_update_dlnActCoeff_dT(), MargulesVPSSTP::s_update_dlnActCoeff_dT(), PhaseCombo_Interaction::s_update_dlnActCoeff_dT(), RedlichKisterVPSSTP::s_update_lnActCoeff(), MixedSolventElectrolyte::s_update_lnActCoeff(), MargulesVPSSTP::s_update_lnActCoeff(), PhaseCombo_Interaction::s_update_lnActCoeff(), ThermoPhase::setElementPotentials(), PDSS_ConstVol::setPressure(), PDSS_IdealGas::setPressure(), PDSS_SSVol::setPressure(), IdealGasPhase::setPressure(), PDSS_IdealGas::setState_TR(), PDSS_ConstVol::setTemperature(), PDSS_IdealGas::setTemperature(), PDSS_SSVol::setTemperature(), RedlichKwongMFTP::sresid(), IdealSolnGasVPSS::standardConcentration(), IdealGasPhase::standardConcentration(), AqueousTransport::stefan_maxwell_solve(), LiquidTransport::stefan_maxwell_solve(), WaterProps::thermalConductivityWater(), Unit::Unit(), ShomateThermo::update(), ShomateThermo::update_one(), SimpleTransport::updateDiff_T(), GasKinetics::updateKc(), AqueousKinetics::updateKc(), InterfaceKinetics::updateKc(), DustyGasTransport::updateKnudsenDiffCoeffs(), StatMech::updateProperties(), ShomatePoly::updatePropertiesTemp(), MultiTransport::updateThermal_T(), VCS_SOLVE::vcs_nondim_Farad(), VCS_SOLVE::vcs_nondimMult_TP(), VCS_SOLVE::vcs_printSpeciesChemPot(), VCSnonideal::vcsUtil_gasConstant(), RedlichKisterVPSSTP::Vint(), and VCS_SPECIES_THERMO::VolStar_calc().

const doublereal OneAtm = 1.01325e5
const doublereal GasConst_cal_mol_K = GasConstant / 4184.0

Universal gas constant in cal/mol/K.

Definition at line 75 of file ct_defs.h.

Referenced by VCS_SOLVE::vcs_nondimMult_TP(), and VCSnonideal::vcsUtil_gasConstant().

const doublereal Boltzmann = GasConstant / Avogadro
const doublereal Planck = 6.62607009e-34

Planck's constant. [J-s].

Definition at line 81 of file ct_defs.h.

Referenced by Cantera::wnum_to_J().

const doublereal logBoltz_Planck = std::log(Boltzmann / Planck)

log(k/h)

Definition at line 85 of file ct_defs.h.

const doublereal StefanBoltz = 5.670373e-8

Stefan-Boltzmann constant.

Definition at line 87 of file ct_defs.h.

Referenced by Wall::Q().

const doublereal lightSpeed = 299792458.0

Speed of Light (m/s).

Definition at line 102 of file ct_defs.h.

Referenced by Cantera::hz_to_wnum(), and Cantera::wnum_to_J().

const doublereal permeability_0 = 4.0e-7*Pi

Permeability of free space \( \mu_0 \) in N/A^2.

Definition at line 105 of file ct_defs.h.

const doublereal epsilon_0 = 1.0 / (lightSpeed*lightSpeed*permeability_0)

Permittivity of free space \( \epsilon_0 \) in F/m.

Definition at line 108 of file ct_defs.h.

Referenced by WaterProps::ADebye().