Cantera
2.0
|
This file contains definitions of terms that are used in internal routines and are unlikely to need modifying (text for module physConstants (see Physical Constants) is found here). More...
#include "config.h"
#include <cmath>
#include <cstdlib>
#include <vector>
#include <map>
#include <string>
Go to the source code of this file.
Namespaces | |
namespace | Cantera |
Provides class Nucleus. | |
Macros | |
#define | DEPRECATED(func) func |
#define | DATA_PTR(vec) &vec[0] |
Creates a pointer to the start of the raw data for a vector. | |
Typedefs | |
typedef std::map< std::string, doublereal > | compositionMap |
Map connecting a string name with a double. | |
typedef std::vector< double > | vector_fp |
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles. | |
typedef std::vector< int > | vector_int |
Vector of ints. | |
typedef std::vector < std::vector< size_t > > | grouplist_t |
A grouplist is a vector of groups of species. | |
Variables | |
const doublereal | Pi = 3.14159265358979323846 |
Pi. | |
const doublereal | SqrtPi = std::sqrt(Pi) |
sqrt(Pi) | |
const doublereal | OneThird = 1.0/3.0 |
1/3 | |
const doublereal | FiveSixteenths = 5.0/16.0 |
5/16 | |
const doublereal | SqrtTen = std::sqrt(10.0) |
sqrt(10) | |
const doublereal | SqrtEight = std::sqrt(8.0) |
sqrt(8) | |
const doublereal | SqrtTwo = std::sqrt(2.0) |
sqrt(2) | |
const doublereal | SmallNumber = 1.e-300 |
smallest number to compare to zero. | |
const doublereal | BigNumber = 1.e300 |
largest number to compare to inf. | |
const doublereal | MaxExp = 690.775527898 |
largest x such that exp(x) is valid | |
const doublereal | Undef = -999.1234 |
Fairly random number to be used to initialize variables against to see if they are subsequently defined. | |
const doublereal | Tiny = 1.e-20 |
Small number to compare differences of mole fractions against. | |
const size_t | npos = static_cast<size_t>(-1) |
index returned by functions to indicate "no position" | |
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]. | |
const doublereal | GasConstant = 8314.4621 |
Universal Gas Constant. [J/kmol/K]. | |
const doublereal | logGasConstant = std::log(GasConstant) |
const doublereal | OneAtm = 1.01325e5 |
One atmosphere [Pa]. | |
const doublereal | GasConst_cal_mol_K = GasConstant / 4184.0 |
Universal gas constant in cal/mol/K. | |
const doublereal | Boltzmann = GasConstant / Avogadro |
Boltzmann's constant [J/K]. | |
const doublereal | Planck = 6.62607009e-34 |
Planck's constant. [J-s]. | |
const doublereal | Planck_bar = Planck / (2 * Pi) |
const doublereal | logBoltz_Planck = std::log(Boltzmann / Planck) |
log(k/h) | |
const doublereal | StefanBoltz = 5.670373e-8 |
Stefan-Boltzmann constant. | |
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). | |
const doublereal | permeability_0 = 4.0e-7*Pi |
Permeability of free space \( \mu_0 \) in N/A^2. | |
const doublereal | epsilon_0 = 1.0 / (lightSpeed*lightSpeed*permeability_0) |
Permittivity of free space \( \epsilon_0 \) in F/m. | |
Thermodynamic Equilibrium Constraints | |
Integer numbers representing pairs of thermodynamic variables which are held constant during equilibration. | |
const int | TV = 100 |
const int | HP = 101 |
const int | SP = 102 |
const int | PV = 103 |
const int | TP = 104 |
const int | UV = 105 |
const int | ST = 106 |
const int | SV = 107 |
const int | UP = 108 |
const int | VH = 109 |
const int | TH = 110 |
const int | SH = 111 |
const int | PX = 112 |
const int | TX = 113 |
const int | VT = -100 |
const int | PH = -101 |
const int | PS = -102 |
const int | VP = -103 |
const int | PT = -104 |
const int | VU = -105 |
const int | TS = -106 |
const int | VS = -107 |
const int | PU = -108 |
const int | HV = -109 |
const int | HT = -110 |
const int | HS = -111 |
const int | XP = -112 |
const int | XT = -113 |
This file contains definitions of terms that are used in internal routines and are unlikely to need modifying (text for module physConstants (see Physical Constants) is found here).
This file is included in every file that is in the Cantera Namespace.
All physical constants are stored here. The module physConstants is defined here.
Definition in file ct_defs.h.
#define DATA_PTR | ( | vec | ) | &vec[0] |
Creates a pointer to the start of the raw data for a vector.
Definition at line 47 of file ct_defs.h.
Referenced by InterfaceKinetics::_update_rates_C(), InterfaceKinetics::_update_rates_T(), SurfPhase::_updateThermo(), LatticeSolidPhase::_updateThermo(), SingleSpeciesTP::_updateThermo(), IdealSolidSolnPhase::_updateThermo(), MultiPhase::addSpeciesMoles(), InterfaceKinetics::applyButlerVolmerCorrection(), MMCollisionInt::astar(), NonlinearSolver::beuler_jac(), MMCollisionInt::bstar(), solveSP::calc_t(), NonlinearSolver::calcColumnScales(), RedlichKwongMFTP::calcDensity(), ChemEquil::calcEmoles(), IonsFromNeutralVPSSTP::calcIonMoleFractions(), MolalityVPSSTP::calcMolalities(), HMWSoln::calcMolalitiesCropped(), MultiPhaseEquil::computeReactionSteps(), Array2D::copyData(), BandMatrix::copyData(), IdealSolnGasVPSS::cp_mole(), RedlichKwongMFTP::cp_mole(), IonsFromNeutralVPSSTP::cp_mole(), IdealSolidSolnPhase::cp_mole(), IdealMolalSoln::cp_mole(), DebyeHuckel::cp_mole(), HMWSoln::cp_mole(), PDSS_IonsFromNeutral::cp_R(), PDSS_IonsFromNeutral::cp_R_ref(), MMCollisionInt::cstar(), IonsFromNeutralVPSSTP::cv_mole(), cvodes_rhs(), NonlinearSolver::dampDogLeg(), NonlinearSolver::dampStep(), NonlinearSolver::decideStep(), NonlinearSolver::descentComparison(), vcs_MultiPhaseEquil::determine_PhaseStability(), NonlinearSolver::doAffineNewtonSolve(), NonlinearSolver::doCauchyPointSolve(), NonlinearSolver::doNewtonSolve(), NonlinearSolver::doResidualCalc(), IdealSolnGasVPSS::enthalpy_mole(), RedlichKwongMFTP::enthalpy_mole(), IonsFromNeutralVPSSTP::enthalpy_mole(), IdealMolalSoln::enthalpy_mole(), SurfPhase::enthalpy_mole(), DebyeHuckel::enthalpy_mole(), HMWSoln::enthalpy_mole(), PDSS_IonsFromNeutral::enthalpy_RT(), PDSS_IonsFromNeutral::enthalpy_RT_ref(), IdealSolnGasVPSS::entropy_mole(), RedlichKwongMFTP::entropy_mole(), IonsFromNeutralVPSSTP::entropy_mole(), IdealSolidSolnPhase::entropy_mole(), IdealMolalSoln::entropy_mole(), DebyeHuckel::entropy_mole(), HMWSoln::entropy_mole(), PDSS_IonsFromNeutral::entropy_R(), PDSS_IonsFromNeutral::entropy_R_ref(), ChemEquil::equilibrate(), ChemEquil::estimateElementPotentials(), ChemEquil::estimateEP_Brinkley(), MultiJac::eval(), ImplicitSurfChem::eval(), OneDim::eval(), ReactingSurf1D::eval(), SquareMatrix::factor(), BandMatrix::factor(), SquareMatrix::factorQR(), Sim1D::finalize(), MultiPhaseEquil::finish(), MMCollisionInt::fit(), MMCollisionInt::fit_omega22(), TransportFactory::fitCollisionIntegrals(), MMCollisionInt::fitDelta(), TransportFactory::fitProperties(), solveSP::fun_eval(), GibbsExcessVPSSTP::getActivities(), RedlichKwongMFTP::getActivityConcentrations(), SemiconductorPhase::getChemPotentials(), SurfPhase::getChemPotentials(), IonsFromNeutralVPSSTP::getChemPotentials(), InterfaceKinetics::getDeltaElectrochemPotentials(), InterfaceKinetics::getDeltaEnthalpy(), InterfaceKinetics::getDeltaEntropy(), InterfaceKinetics::getDeltaGibbs(), InterfaceKinetics::getDeltaSSEnthalpy(), InterfaceKinetics::getDeltaSSEntropy(), InterfaceKinetics::getDeltaSSGibbs(), IonsFromNeutralVPSSTP::getdlnActCoeffds(), InterfaceKinetics::getEquilibriumConstants(), AqueousTransport::getFluidMobilities(), SimpleTransport::getFluidMobilities(), LiquidTransport::getFluidMobilities(), IdealSolidSolnPhase::getGibbs_RT(), MultiTransport::getMassFluxes(), MixTransport::getMobilities(), AqueousTransport::getMobilities(), SimpleTransport::getMobilities(), LiquidTransport::getMobilities(), DustyGasTransport::getMolarFluxes(), MultiTransport::getMultiDiffCoeffs(), RedlichKwongMFTP::getPartialMolarEntropies(), IdealSolidSolnPhase::getPureGibbs(), InterfaceKinetics::getRevRateConstants(), MultiTransport::getSpeciesFluxes(), MixTransport::getSpeciesFluxes(), AqueousTransport::getSpeciesFluxesExt(), SimpleTransport::getSpeciesFluxesExt(), SimpleTransport::getSpeciesVdiff(), SimpleTransport::getSpeciesVdiffES(), IonsFromNeutralVPSSTP::gibbs_mole(), IdealSolidSolnPhase::gibbs_mole(), IdealMolalSoln::gibbs_mole(), DebyeHuckel::gibbs_mole(), HMWSoln::gibbs_mole(), PDSS_IonsFromNeutral::gibbs_RT(), PDSS_IonsFromNeutral::gibbs_RT_ref(), MMCollisionInt::init(), Inlet1D::init(), ReactingSurf1D::init(), CVodeInt::initialize(), DustyGasTransport::initialize(), SurfPhase::initThermo(), GibbsExcessVPSSTP::initThermo(), LatticeSolidPhase::initThermo(), HMWSoln::initThermoXML(), OneDim::initTimeInteg(), Cantera::installNasa9ThermoFromXML(), LatticeSolidPhase::installSlavePhases(), IdealSolidSolnPhase::intEnergy_mole(), IdealMolalSoln::intEnergy_mole(), PDSS_IonsFromNeutral::molarVolume(), PDSS_IonsFromNeutral::molarVolume_ref(), L_Matrix::mult(), MultiPhaseEquil::MultiPhaseEquil(), Sim1D::newtonSolve(), MMCollisionInt::omega22(), MolalityVPSSTP::osmoticCoefficient(), MultiPhase::phase(), HMWSoln::printCoeffs(), solveProb::printIteration(), SquareMatrix::rcond(), BandMatrix::rcond(), SquareMatrix::rcondQR(), NonlinearSolver::readjustTrustVector(), HMWSoln::readXMLBinarySalt(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), Sim1D::refine(), HMWSoln::relative_enthalpy(), HMWSoln::relative_molal_enthalpy(), NonlinearSolver::residualComparisonLeg(), solveProb::resjac_eval(), solveSP::resjac_eval(), Sim1D::restore(), IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnN_diag(), IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnX_diag(), IonsFromNeutralVPSSTP::s_update_dlnActCoeffdT(), IonsFromNeutralVPSSTP::s_update_lnActCoeff(), HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dT(), HMWSoln::s_updatePitzer_lnMolalityActCoeff(), StFlow::save(), MixtureFugacityTP::setConcentrations(), GibbsExcessVPSSTP::setConcentrations(), IonsFromNeutralVPSSTP::setConcentrations(), SurfPhase::setCoverages(), SurfPhase::setCoveragesByName(), SurfPhase::setCoveragesNoNorm(), Sim1D::setFixedTemperature(), StFlow::setGasAtMidpoint(), MultiPhaseEquil::setInitialMoles(), LatticeSolidPhase::setLatticeMoleFractionsByName(), MixtureFugacityTP::setMassFractions(), GibbsExcessVPSSTP::setMassFractions(), IonsFromNeutralVPSSTP::setMassFractions(), MixtureFugacityTP::setMassFractions_NoNorm(), GibbsExcessVPSSTP::setMassFractions_NoNorm(), IonsFromNeutralVPSSTP::setMassFractions_NoNorm(), MolalityVPSSTP::setMolalities(), MolalityVPSSTP::setMolalitiesByName(), Inlet1D::setMoleFractions(), OutletRes1D::setMoleFractions(), LatticeSolidPhase::setMoleFractions(), MixtureFugacityTP::setMoleFractions(), GibbsExcessVPSSTP::setMoleFractions(), IonsFromNeutralVPSSTP::setMoleFractions(), MixtureFugacityTP::setMoleFractions_NoNorm(), GibbsExcessVPSSTP::setMoleFractions_NoNorm(), IonsFromNeutralVPSSTP::setMoleFractions_NoNorm(), MultiPhase::setMoles(), MultiPhase::setMolesByName(), ThermoPhase::setReferenceComposition(), MixtureFugacityTP::setState_TP(), MixtureFugacityTP::setState_TR(), OneDim::setSteadyMode(), ChemEquil::setToEquilState(), RedlichKwongMFTP::setToEquilState(), IdealSolidSolnPhase::setToEquilState(), NonlinearSolver::setupDoubleDogleg(), Sim1D::showSolution(), Sim1D::Sim1D(), MultiNewton::solve(), OneDim::solve(), SquareMatrix::solve(), solveProb::solve(), BandMatrix::solve(), NonlinearSolver::solve_nonlinear_problem(), MultiTransport::solveLMatrixEquation(), ImplicitSurfChem::solvePseudoSteadyStateProblem(), SquareMatrix::solveQR(), solveSP::solveSurfProb(), RedlichKwongMFTP::standardConcentration(), HMWSoln::standardConcentration(), AqueousTransport::stefan_maxwell_solve(), LiquidTransport::stefan_maxwell_solve(), MultiPhaseEquil::stepComposition(), StFlow::StFlow(), NonlinearSolver::trustRegionLength(), ChemEquil::update(), MixTransport::update_C(), MultiTransport::update_C(), AqueousTransport::update_C(), SimpleTransport::update_C(), LiquidTransport::update_C(), LiquidTransport::update_Grad_lnAC(), InterfaceKinetics::updateKc(), MultiPhase::updatePhases(), InterfaceKinetics::updateROP(), MultiTransport::updateThermal_T(), StFlow::updateTransport(), DustyGasTransport::updateTransport_C(), MultiPhase::uploadMoleFractionsFromPhases(), VCS_SOLVE::vcs_popPhaseRxnStepSizes(), GasTransport::viscosity(), and AqueousTransport::viscosity().