ct_defs.h File Reference

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 <cmath>
#include "config.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <map>
#include <numeric>
#include <string>
#include <algorithm>
Include dependency graph for ct_defs.h:

Go to the source code of this file.

Namespaces

namespace  Cantera
 

Namespace for the Cantera kernel.


Defines

#define TYPENAME_KEYWORD   typename
 create a define for the typename command
#define DATA_PTR(vec)   &vec[0]
 Creates a pointer to the start of the raw data for a ctvector.
#define USE_STL_VECTOR
 Turn on the use of stl vectors for the basic array type within cantera.

Typedefs

typedef std::map< std::string,
doublereal > 
compositionMap
 Map connecting a string name with a double.
typedef ct::ctvector_fp array_fp
typedef ct::ctvector_fp vector_fp
typedef ct::ctvector_int array_int
typedef ct::ctvector_int vector_int
typedef vector_int group_t
 typedef for a group of species.
typedef std::vector< group_t > grouplist_t
 typedef for a vector of groups of species.
typedef doublereal * workPtr
 Typedef for a pointer to temporary work storage.
typedef const doublereal * const_workPtr
 typedef for a pointer to temporary work storage which is treated as constant

Functions

doublereal fmaxx (doublereal x, doublereal y)
 inline function to return the max value of two doubles.
doublereal fminn (doublereal x, doublereal y)
 inline function to return the min value of two doubles.

Variables

const doublereal Pi = 3.1415926
 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.
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.02214179e26
 Avogadro's Number.
const doublereal GasConstant = 8314.47215
 Universal Gas Constant. 2006 CODATA value.
const doublereal logGasConstant = 9.025752908
const doublereal OneAtm = 1.01325e5
 One atmosphere.
const doublereal GasConst_cal_mol_K = 1.987
 Universal gas constant in cal/mol/K.
const doublereal Boltzmann = GasConstant / Avogadro
 Boltzmann's constant.
const doublereal Planck = 6.62606896e-34
 Planck's constant. Units of J-s.
const doublereal Planck_bar = 1.05457162853e-34
const doublereal logBoltz_Planck = 23.7599032
 log(k/h)
const doublereal StefanBoltz = 5.6704004e-8
 Stefan-Boltzmann constant.
Electron Properties

const doublereal ElectronCharge = 1.60217648740e-19
const doublereal ElectronMass = 9.1093821545e-31
const doublereal Faraday = ElectronCharge * Avogadro
Electromagnetism

Cantera uses the MKS unit system.

const doublereal epsilon_0 = 8.85417817e-12
 Permittivity of free space $ \epsilon_0 $ in F/m.
const doublereal permeability_0 = 4.0e-7*Pi
 Permeability of free space $ \mu_0 $ in N/A^2.
const doublereal lightSpeed = 1.0/std::sqrt(epsilon_0 * permeability_0)
 Speed of Light (m/s).
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

Detailed Description

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 Documentation

#define DATA_PTR ( vec   )     &vec[0]

Creates a pointer to the start of the raw data for a ctvector.

Definition at line 53 of file ct_defs.h.

Referenced by SurfPhase::_updateThermo(), SingleSpeciesTP::_updateThermo(), IdealSolidSolnPhase::_updateThermo(), MultiPhase::addSpeciesMoles(), Cantera::BasisOptimize(), MolalityVPSSTP::calcMolalities(), IdealSolnGasVPSS::cp_mole(), IdealSolidSolnPhase::cp_mole(), IdealMolalSoln::cp_mole(), DebyeHuckel::cp_mole(), HMWSoln::cv_mole(), SurfPhase::enthalpy_mole(), IdealSolnGasVPSS::enthalpy_mole(), IdealMolalSoln::enthalpy_mole(), DebyeHuckel::enthalpy_mole(), IdealSolnGasVPSS::entropy_mole(), IdealSolidSolnPhase::entropy_mole(), IdealMolalSoln::entropy_mole(), DebyeHuckel::entropy_mole(), SurfPhase::getChemPotentials(), IdealSolidSolnPhase::getGibbs_RT(), IdealSolidSolnPhase::getPureGibbs(), IdealSolidSolnPhase::gibbs_mole(), IdealMolalSoln::gibbs_mole(), HMWSoln::gibbs_mole(), DebyeHuckel::gibbs_mole(), SurfPhase::initThermo(), IdealSolidSolnPhase::intEnergy_mole(), IdealMolalSoln::intEnergy_mole(), MolalityVPSSTP::osmoticCoefficient(), MultiPhase::phase(), HMWSoln::readXMLBinarySalt(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), HMWSoln::relative_enthalpy(), HMWSoln::s_update_dlnMolalityActCoeff_dP(), HMWSoln::s_update_dlnMolalityActCoeff_dT(), HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dT(), HMWSoln::s_updatePitzer_lnMolalityActCoeff(), SurfPhase::setCoverages(), SurfPhase::setCoveragesByName(), SurfPhase::setCoveragesNoNorm(), MolalityVPSSTP::setMolalities(), MolalityVPSSTP::setMolalitiesByName(), MultiPhase::setMoles(), MultiPhase::setMolesByName(), ThermoPhase::setReferenceComposition(), IdealSolidSolnPhase::setToEquilState(), HMWSoln::standardConcentration(), MultiPhase::updatePhases(), and MultiPhase::uploadMoleFractionsFromPhases().

#define TYPENAME_KEYWORD   typename

create a define for the typename command

Definition at line 46 of file ct_defs.h.

#define USE_STL_VECTOR

Turn on the use of stl vectors for the basic array type within cantera.

Definition at line 191 of file ct_defs.h.

Generated by  doxygen 1.6.3