Cantera  3.1.0a1
Cantera Namespace Reference

Detailed Description

Namespace for the Cantera kernel.

Classes

class  Application
 Class to hold global data. More...
 
struct  atomicWeightData
 Database for atomic weights. More...
 
struct  isotopeWeightData
 Database for named isotopic weights. More...
 
class  MMCollisionInt
 Calculation of Collision integrals. More...
 
class  AnyBase
 Base class defining common data possessed by both AnyMap and AnyValue objects. More...
 
class  AnyValue
 A wrapper for a variable whose type is determined at runtime. More...
 
class  AnyMap
 A map of string keys to values whose type can vary at runtime. More...
 
class  InputFileError
 Error thrown for problems processing information contained in an AnyMap or AnyValue. More...
 
class  Array2D
 A class for 2D arrays stored in column-major (Fortran-compatible) form. More...
 
class  clockWC
 The class provides the wall clock timer in seconds. More...
 
class  CanteraError
 Base class for exceptions thrown by Cantera classes. More...
 
class  ArraySizeError
 Array size error. More...
 
class  IndexError
 An array index is out of range. More...
 
class  NotImplementedError
 An error indicating that an unimplemented function has been called. More...
 
class  Delegator
 Delegate member functions of a C++ class to externally-specified functions. More...
 
class  ExternalHandle
 A base class for managing the lifetime of an external object, such as a Python object used by a Delegator. More...
 
class  ExtensionManager
 Base class for managing user-defined Cantera extensions written in other languages. More...
 
class  ExtensionManagerFactory
 A factory class for creating ExtensionManager objects. More...
 
class  ExternalLogger
 Logger that delegates to an external source via a callback to produce log output. More...
 
class  FactoryBase
 Base class for factories. More...
 
class  Factory
 Factory class that supports registering functions to create objects. More...
 
class  Interface
 A container class for chemically-reacting interfaces. More...
 
class  Logger
 Base class for 'loggers' that write text messages to log files. More...
 
class  NoExitLogger
 Logger that doesn't exit when an error is thrown. More...
 
class  Solution
 A container class for chemically-reacting solutions. More...
 
class  SolutionArray
 A container class holding arrays of state information. More...
 
class  Storage
 A wrapper class handling storage to HDF. More...
 
class  Units
 A representation of the units associated with a dimensional quantity. More...
 
struct  UnitStack
 Unit aggregation utility. More...
 
class  UnitSystem
 Unit conversion utility. More...
 
struct  CachedValue
 A cached property value and the state at which it was evaluated. More...
 
class  ValueCache
 Storage for cached values. More...
 
class  YamlWriter
 A class for generating full YAML input files from multiple data sources. More...
 
class  EquilOpt
 Chemical equilibrium options. More...
 
class  ChemEquil
 Class ChemEquil implements a chemical equilibrium solver for single-phase solutions. More...
 
class  MultiPhase
 A class for multiphase mixtures. More...
 
class  MultiPhaseEquil
 Multiphase chemical equilibrium solver. More...
 
class  VCS_COUNTERS
 Class to keep track of time and iterations. More...
 
class  vcs_MultiPhaseEquil
 Cantera's Interface to the Multiphase chemical equilibrium solver. More...
 
class  VCS_SOLVE
 This is the main structure used to hold the internal data used in vcs_solve_TP(), and to solve TP systems. More...
 
class  VCS_SPECIES_THERMO
 Identifies the thermo model for the species. More...
 
class  vcs_SpeciesProperties
 Properties of a single species. More...
 
class  vcs_VolPhase
 Phase information and Phase calculations for vcs. More...
 
class  PythonExtensionManager
 Class for managing user-defined Cantera extensions written in Python. More...
 
class  PythonHandle
 Class that holds an owned or weak (borrowed) reference to a Python object. More...
 
struct  ArrheniusData
 Data container holding shared data specific to ArrheniusRate. More...
 
class  ArrheniusBase
 Base class for Arrhenius-type Parameterizations. More...
 
class  ArrheniusRate
 Arrhenius reaction rate type depends only on temperature. More...
 
struct  BlowersMaselData
 Data container holding shared data specific to BlowersMaselRate. More...
 
class  BlowersMaselRate
 Blowers Masel reaction rate type depends on the enthalpy of reaction. More...
 
class  BulkKinetics
 Specialization of Kinetics for chemistry in a single bulk phase. More...
 
struct  ChebyshevData
 Data container holding shared data specific to ChebyshevRate. More...
 
class  ChebyshevRate
 Pressure-dependent rate expression where the rate coefficient is expressed as a bivariate Chebyshev polynomial in temperature and pressure. More...
 
class  CustomFunc1Rate
 Custom reaction rate depending only on temperature. More...
 
class  EdgeKinetics
 Heterogeneous reactions at one-dimensional interfaces between multiple adjacent two-dimensional surfaces. More...
 
struct  FalloffData
 Data container holding shared data specific to Falloff rates. More...
 
class  FalloffRate
 Base class for falloff rate calculators. More...
 
class  LindemannRate
 The Lindemann falloff parameterization. More...
 
class  TroeRate
 The 3- or 4-parameter Troe falloff parameterization. More...
 
class  SriRate
 The SRI falloff function. More...
 
class  TsangRate
 The 1- or 2-parameter Tsang falloff parameterization. More...
 
class  Group
 Class Group is an internal class used by class ReactionPath. More...
 
class  ImplicitSurfChem
 Advances the surface coverages of the associated set of SurfacePhase objects in time. More...
 
class  InterfaceKinetics
 A kinetics manager for heterogeneous reaction mechanisms. More...
 
struct  InterfaceData
 Data container holding shared data for reaction rate specification with interfaces. More...
 
class  InterfaceRateBase
 Base class for rate parameterizations that involve interfaces. More...
 
class  StickingCoverage
 Base class for rate parameterizations that implement sticking coefficients. More...
 
class  InterfaceRate
 A class template for interface reaction rate specifications. More...
 
class  StickingRate
 A class template for interface sticking rate specifications. More...
 
class  Kinetics
 Public interface for kinetics managers. More...
 
class  KineticsFactory
 Factory for kinetics managers. More...
 
class  MultiRate
 A class template handling ReactionRate specializations. More...
 
class  MultiRateBase
 An abstract base class for evaluating all reactions of a particular type. More...
 
struct  PlogData
 Data container holding shared data specific to PlogRate. More...
 
class  PlogRate
 Pressure-dependent reaction rate expressed by logarithmically interpolating between Arrhenius rate expressions at various pressures. More...
 
class  Reaction
 Abstract base class which stores data about a reaction and its rate parameterization so that it can be added to a Kinetics object. More...
 
class  ThirdBody
 A class for managing third-body efficiencies, including default values. More...
 
struct  ReactionData
 Data container holding shared data used for ReactionRate calculation. More...
 
class  SpeciesNode
 Nodes in reaction path graphs. More...
 
class  ReactionPathDiagram
 Reaction path diagrams (graphs). More...
 
class  ReactionRate
 Abstract base class for reaction rate definitions; this base class is used by user-facing APIs to access reaction rate objects. More...
 
class  ReactionDataDelegator
 Delegate methods of the ReactionData class to external functions. More...
 
class  ReactionRateDelegator
 Delegate methods of the ReactionRate class to external functions. More...
 
class  ReactionRateFactory
 Factory class to construct reaction rate calculators. More...
 
class  solveSP
 Method to solve a pseudo steady state surface problem. More...
 
class  C1
 Handles one species in a reaction. More...
 
class  C2
 Handles two species in a single reaction. More...
 
class  C3
 Handles three species in a reaction. More...
 
class  C_AnyN
 Handles any number of species in a reaction, including fractional stoichiometric coefficients, and arbitrary reaction orders. More...
 
class  StoichManagerN
 This class handles operations involving the stoichiometric coefficients on one side of a reaction (reactant or product) for a set of reactions comprising a reaction mechanism. More...
 
class  ThirdBodyCalc
 Calculate and apply third-body effects on reaction rates, including non- unity third-body efficiencies. More...
 
struct  TwoTempPlasmaData
 Data container holding shared data specific to TwoTempPlasmaRate. More...
 
class  TwoTempPlasmaRate
 Two temperature plasma reaction rate type depends on both gas temperature and electron temperature. More...
 
class  AdaptivePreconditioner
 AdaptivePreconditioner a preconditioner designed for use with large mechanisms that leverages sparse solvers. More...
 
class  BandMatrix
 A class for banded matrices, involving matrix inversion processes. More...
 
class  CVodesIntegrator
 Wrapper class for 'cvodes' integrator from LLNL. More...
 
class  DenseMatrix
 A class for full (non-sparse) matrices with Fortran-compatible data storage, which adds matrix operations to class Array2D. More...
 
class  Func1
 Base class for 'functor' classes that evaluate a function of one variable. More...
 
class  Sin1
 Implements the sin() function. More...
 
class  Cos1
 Implements the cos() function. More...
 
class  Exp1
 Implements the exp() (exponential) function. More...
 
class  Log1
 Implements the log() (natural logarithm) function. More...
 
class  Pow1
 Implements the pow() (power) function. More...
 
class  Tabulated1
 Implements a tabulated function. More...
 
class  Const1
 Implements a constant. More...
 
class  Sum1
 Implements the sum of two functions. More...
 
class  Diff1
 Implements the difference of two functions. More...
 
class  Product1
 Implements the product of two functions. More...
 
class  TimesConstant1
 Implements the product of a function and a constant. More...
 
class  PlusConstant1
 Implements the sum of a function and a constant. More...
 
class  Ratio1
 Implements the ratio of two functions. More...
 
class  Composite1
 Implements a composite function. More...
 
class  Gaussian1
 Implements a Gaussian function. More...
 
class  Poly1
 Implements a polynomial of degree n. More...
 
class  Fourier1
 Implements a Fourier cosine/sine series. More...
 
class  Arrhenius1
 Implements a sum of Arrhenius terms. More...
 
class  Periodic1
 Implements a periodic function. More...
 
class  Func1Factory
 Factory class to create Func1 objects. More...
 
class  Math1FactoryA
 Factory class to create Func1 compound objects - version A. More...
 
class  Math1FactoryB
 Factory class to create Func1 compound objects - version B. More...
 
class  FuncEval
 Virtual base class for ODE/DAE right-hand-side function evaluators. More...
 
class  GeneralMatrix
 Generic matrix. More...
 
class  IdasIntegrator
 Wrapper for Sundials IDAS solver. More...
 
class  Integrator
 Abstract base class for ODE system integrators. More...
 
class  PreconditionerBase
 PreconditionerBase serves as an abstract type to extend different preconditioners. More...
 
class  PreconditionerFactory
 Factory class to create preconditioner objects. More...
 
class  SundialsContext
 A wrapper for managing a SUNContext object, need for Sundials >= 6.0. More...
 
class  Boundary1D
 The base class for boundaries between one-dimensional spatial domains. More...
 
class  Inlet1D
 An inlet. More...
 
class  Empty1D
 A terminator that does nothing. More...
 
class  Symm1D
 A symmetry plane. More...
 
class  Outlet1D
 An outlet. More...
 
class  OutletRes1D
 An outlet with specified composition. More...
 
class  Surf1D
 A non-reacting surface. More...
 
class  ReactingSurf1D
 A reacting surface. More...
 
class  Domain1D
 Base class for one-dimensional domains. More...
 
class  DomainFactory
 Factory class to create domain objects. More...
 
class  IonFlow
 This class models the ion transportation in a flame. More...
 
class  MultiJac
 Class MultiJac evaluates the Jacobian of a system of equations defined by a residual function supplied by an instance of class OneDim. More...
 
class  MultiNewton
 Newton iterator for multi-domain, one-dimensional problems. More...
 
class  OneDim
 Container class for multiple-domain 1D problems. More...
 
class  Refiner
 Refine Domain1D grids so that profiles satisfy adaptation tolerances. More...
 
class  Sim1D
 One-dimensional simulations. More...
 
class  StFlow
 This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemically-reacting, axisymmetric flows. More...
 
class  BinarySolutionTabulatedThermo
 Overloads the virtual methods of class IdealSolidSolnPhase to implement tabulated standard state thermodynamics for one species in a binary solution. More...
 
class  ConstCpPoly
 A constant-heat capacity species thermodynamic property manager class. More...
 
class  CoverageDependentSurfPhase
 A thermodynamic model for a coverage-dependent surface phase, applying surface species lateral interaction correction factors to the ideal surface phase properties. More...
 
class  DebyeHuckel
 Class DebyeHuckel represents a dilute liquid electrolyte phase which obeys the Debye Huckel formulation for nonideality. More...
 
class  EdgePhase
 A thermodynamic phase representing a one dimensional edge between two surfaces. More...
 
class  GibbsExcessVPSSTP
 GibbsExcessVPSSTP is a derived class of ThermoPhase that handles variable pressure standard state methods for calculating thermodynamic properties that are further based on expressing the Excess Gibbs free energy as a function of the mole fractions (or pseudo mole fractions) of constituents. More...
 
class  HMWSoln
 Class HMWSoln represents a dilute or concentrated liquid electrolyte phase which obeys the Pitzer formulation for nonideality. More...
 
class  IdealGasPhase
 Class IdealGasPhase represents low-density gases that obey the ideal gas equation of state. More...
 
class  IdealMolalSoln
 This phase is based upon the mixing-rule assumption that all molality-based activity coefficients are equal to one. More...
 
class  IdealSolidSolnPhase
 Class IdealSolidSolnPhase represents a condensed phase ideal solution compound. More...
 
class  IdealSolnGasVPSS
 An ideal solution approximation of a phase. More...
 
class  LatticePhase
 A simple thermodynamic model for a bulk phase, assuming a lattice of solid atoms. More...
 
class  LatticeSolidPhase
 A phase that is comprised of a fixed additive combination of other lattice phases. More...
 
class  MargulesVPSSTP
 MargulesVPSSTP is a derived class of GibbsExcessVPSSTP that employs the Margules approximation for the excess Gibbs free energy. More...
 
class  MetalPhase
 Class MetalPhase represents electrons in a metal. More...
 
class  MixtureFugacityTP
 This is a filter class for ThermoPhase that implements some preparatory steps for efficiently handling mixture of gases that whose standard states are defined as ideal gases, but which describe also non-ideal solutions. More...
 
class  MolalityVPSSTP
 MolalityVPSSTP is a derived class of ThermoPhase that handles variable pressure standard state methods for calculating thermodynamic properties that are further based on molality-scaled activities. More...
 
class  Mu0Poly
 The Mu0Poly class implements an interpolation of the Gibbs free energy based on a piecewise constant heat capacity approximation. More...
 
class  MultiSpeciesThermo
 A species thermodynamic property manager for a phase. More...
 
class  Nasa9Poly1
 The NASA 9 polynomial parameterization for one temperature range. More...
 
class  Nasa9PolyMultiTempRegion
 The NASA 9 polynomial parameterization for a single species encompassing multiple temperature regions. More...
 
class  NasaPoly1
 The NASA polynomial parameterization for one temperature range. More...
 
class  NasaPoly2
 The NASA polynomial parameterization for two temperature ranges. More...
 
class  PDSS
 Virtual base class for a species with a pressure dependent standard state. More...
 
class  PDSS_Molar
 Base class for PDSS classes which compute molar properties directly. More...
 
class  PDSS_Nondimensional
 Base class for PDSS classes which compute nondimensional properties directly. More...
 
class  PDSS_ConstVol
 Class for pressure dependent standard states that use a constant volume model. More...
 
class  PDSS_HKFT
 Class for pressure dependent standard states corresponding to ionic solutes in electrolyte water. More...
 
class  PDSS_SSVol
 Class for pressure dependent standard states that uses a standard state volume model of some sort. More...
 
class  PDSS_Water
 Class for the liquid water pressure dependent standard state. More...
 
class  PengRobinson
 Implementation of a multi-species Peng-Robinson equation of state. More...
 
class  Phase
 Class Phase is the base class for phases of matter, managing the species and elements in a phase, as well as the independent variables of temperature, mass density (compressible substances) or pressure (incompressible substances), species mass/mole fraction, and other generalized forces and intrinsic properties (such as electric potential) that define the thermodynamic state. More...
 
class  PlasmaPhase
 Base class for a phase with plasma properties. More...
 
class  PureFluidPhase
 This phase object consists of a single component that can be a gas, a liquid, a mixed gas-liquid fluid, or a fluid beyond its critical point. More...
 
class  RedlichKisterVPSSTP
 RedlichKisterVPSSTP is a derived class of GibbsExcessVPSSTP that employs the Redlich-Kister approximation for the excess Gibbs free energy. More...
 
class  RedlichKwongMFTP
 Implementation of a multi-species Redlich-Kwong equation of state. More...
 
class  ShomatePoly
 The Shomate polynomial parameterization for one temperature range for one species. More...
 
class  ShomatePoly2
 The Shomate polynomial parameterization for two temperature ranges for one species. More...
 
class  SingleSpeciesTP
 The SingleSpeciesTP class is a filter class for ThermoPhase. More...
 
class  Species
 Contains data about a single chemical species. More...
 
class  SpeciesThermoInterpType
 Abstract Base class for the thermodynamic manager for an individual species' reference state. More...
 
class  StoichSubstance
 Class StoichSubstance represents a stoichiometric (fixed composition) incompressible substance. More...
 
class  SurfPhase
 A simple thermodynamic model for a surface phase, assuming an ideal solution model. More...
 
class  ThermoFactory
 Factory class for thermodynamic property managers. More...
 
class  ThermoPhase
 Base class for a phase with thermodynamic properties. More...
 
class  VPStandardStateTP
 This is a filter class for ThermoPhase that implements some preparatory steps for efficiently handling a variable pressure standard state for species. More...
 
class  WaterProps
 The WaterProps class is used to house several approximation routines for properties of water. More...
 
class  WaterPropsIAPWS
 Class for calculating the equation of state of water. More...
 
class  WaterPropsIAPWSphi
 Low level class for the real description of water. More...
 
class  WaterSSTP
 Class for single-component water. More...
 
class  DustyGasTransport
 Class DustyGasTransport implements the Dusty Gas model for transport in porous media. More...
 
class  GasTransport
 Class GasTransport implements some functions and properties that are shared by the MixTransport and MultiTransport classes. More...
 
class  HighPressureGasTransport
 Class MultiTransport implements transport properties for high pressure gas mixtures. More...
 
class  IonGasTransport
 Class IonGasTransport implements Stockmayer-(n,6,4) model for transport of ions. More...
 
class  MixTransport
 Class MixTransport implements mixture-averaged transport properties for ideal gas mixtures. More...
 
class  MultiTransport
 Class MultiTransport implements multicomponent transport properties for ideal gas mixtures. More...
 
class  Transport
 Base class for transport property managers. More...
 
class  TransportData
 Base class for transport data for a single species. More...
 
class  GasTransportData
 Transport data for a single gas-phase species which can be used in mixture-averaged or multicomponent transport models. More...
 
class  TransportFactory
 Factory class for creating new instances of classes derived from Transport. More...
 
class  UnityLewisTransport
 Class UnityLewisTransport implements the unity Lewis number approximation for the mixture-averaged species diffusion coefficients. More...
 
class  WaterTransport
 Transport Parameters for pure water. More...
 
class  ConstPressureMoleReactor
 ConstPressureMoleReactor is a class for constant-pressure reactors which use a state of moles. More...
 
class  ConstPressureReactor
 Class ConstPressureReactor is a class for constant-pressure reactors. More...
 
class  MassFlowController
 A class for mass flow controllers. More...
 
class  PressureController
 A class for flow controllers where the flow rate is equal to the flow rate of a primary mass flow controller plus a correction proportional to the pressure difference between the inlet and outlet. More...
 
class  Valve
 Supply a mass flow rate that is a function of the pressure drop across the valve. More...
 
class  FlowDevice
 Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors. More...
 
class  FlowDeviceFactory
 Factory class to create FlowDevice objects. More...
 
class  FlowReactor
 Adiabatic flow in a constant-area duct with homogeneous and heterogeneous reactions. More...
 
class  IdealGasConstPressureMoleReactor
 IdealGasConstPressureMoleReactor is a class for ideal gas constant-pressure reactors which use a state of moles. More...
 
class  IdealGasConstPressureReactor
 Class ConstPressureReactor is a class for constant-pressure reactors. More...
 
class  IdealGasMoleReactor
 IdealGasMoleReactor is a class for ideal gas constant-volume reactors which use a state of moles. More...
 
class  IdealGasReactor
 Class IdealGasReactor is a class for stirred reactors that is specifically optimized for ideal gases. More...
 
class  MoleReactor
 MoleReactor is meant to serve the same purpose as the reactor class but with a state vector composed of moles. More...
 
class  Reactor
 Class Reactor is a general-purpose class for stirred reactors. More...
 
class  ReactorBase
 Base class for stirred reactors. More...
 
class  ReactorAccessor
 An abstract base class for providing access to protected capabilities Reactor objects from delegate methods, which would normally only be able to access public Reactor members. More...
 
class  ReactorDelegator
 Delegate methods of the Reactor class to external functions. More...
 
class  ReactorFactory
 Factory class to create reactor objects. More...
 
class  ReactorNet
 A class representing a network of connected reactors. More...
 
class  ReactorSurface
 A surface where reactions can occur that is in contact with the bulk fluid of a Reactor. More...
 
class  Reservoir
 A source or sink whose state remains constant regardless of any flows or other interactions with other Reactor objects. More...
 
class  WallBase
 Base class for 'walls' (walls, pistons, etc.) connecting reactors. More...
 
class  Wall
 Represents a wall between between two ReactorBase objects. More...
 
class  WallFactory
 Factory class to create WallBase objects. More...
 

Typedefs

typedef map< string, double > Composition
 Map from string names to doubles. More...
 
typedef CachedValue< double > & CachedScalar
 
typedef CachedValue< vector< double > > & CachedArray
 
typedef double(* VCS_FUNC_PTR) (double xval, double Vtarget, int varID, void *fptrPassthrough, int *err)
 Definition of the function pointer for the root finder. More...
 
typedef FalloffRate Falloff
 
typedef LindemannRate Lindemann
 
typedef TroeRate Troe
 
typedef SriRate SRI
 
typedef TsangRate Tsang
 
using InterfaceArrheniusRate = InterfaceRate< ArrheniusRate, InterfaceData >
 Arrhenius-type interface reaction rate specifications. More...
 
using InterfaceBlowersMaselRate = InterfaceRate< BlowersMaselRate, InterfaceData >
 Blowers-Masel-type interface reaction rate specifications. More...
 
using StickingArrheniusRate = StickingRate< ArrheniusRate, InterfaceData >
 Arrhenius-type interface sticking rate specifications. More...
 
using StickingBlowersMaselRate = StickingRate< BlowersMaselRate, InterfaceData >
 Blowers-Masel-type interface sticking rate specifications. More...
 
typedef Eigen::Map< Eigen::MatrixXd > MappedMatrix
 
typedef Eigen::Map< const Eigen::MatrixXd > ConstMappedMatrix
 
typedef Eigen::Map< Eigen::VectorXd > MappedVector
 
typedef Eigen::Map< const Eigen::VectorXd > ConstMappedVector
 
typedef Eigen::Map< Eigen::RowVectorXd > MappedRowVector
 
typedef Eigen::Map< const Eigen::RowVectorXd > ConstMappedRowVector
 
typedef std::vector< Eigen::Triplet< double > > SparseTriplets
 

Enumerations

enum  flow_t { NetFlow , OneWayFlow }
 
enum  MethodType { BDF_Method , Adams_Method }
 Specifies the method used to integrate the system of equations. More...
 
enum  IterType { Newton_Iter , Functional_Iter }
 Specifies the method used for iteration. More...
 
enum class  PreconditionerSide { NO_PRECONDITION , LEFT_PRECONDITION , RIGHT_PRECONDITION , BOTH_PRECONDITION }
 Specifies the side of the system on which the preconditioner is applied. More...
 
enum  offset {
  c_offset_U , c_offset_V , c_offset_T , c_offset_L ,
  c_offset_E , c_offset_Y
}
 Offsets of solution components in the 1D solution array. More...
 
enum class  ThermoBasis { mass , molar }
 Differentiate between mole fractions and mass fractions for input mixture composition. More...
 
enum class  SensParameterType { reaction , enthalpy }
 

Functions

bool operator== (const string &lhs, const AnyValue &rhs)
 
bool operator!= (const string &lhs, const AnyValue &rhs)
 
bool operator== (const double &lhs, const AnyValue &rhs)
 
bool operator!= (const double &lhs, const AnyValue &rhs)
 
bool operator== (const long int &lhs, const AnyValue &rhs)
 
bool operator!= (const long int &lhs, const AnyValue &rhs)
 
bool operator== (const int &lhs, const AnyValue &rhs)
 
bool operator!= (const int &lhs, const AnyValue &rhs)
 
AnyMap::Iterator begin (const AnyValue &v)
 
AnyMap::Iterator end (const AnyValue &v)
 
void warn_deprecated (const string &source, const AnyBase &node, const string &message)
 A deprecation warning for syntax in an input file. More...
 
std::ostream & operator<< (std::ostream &s, const Array2D &m)
 Output the current contents of the Array2D object. More...
 
void operator*= (Array2D &m, double a)
 Overload the times equals operator for multiplication of a matrix and a scalar. More...
 
void checkFinite (const double tmp)
 Check to see that a number is finite (not NaN, +Inf or -Inf) More...
 
void checkFinite (const string &name, double *values, size_t N)
 Check to see that all elements in an array are finite. More...
 
static Applicationapp ()
 Return a pointer to the application object. More...
 
void setLogger (Logger *logwriter)
 Install a logger. More...
 
void writelog_direct (const string &msg)
 Write a message to the screen. More...
 
void writelogendl ()
 Write an end of line character to the screen and flush output. More...
 
void writeline (char repeat, size_t count, bool endl_after, bool endl_before)
 
void _warn_deprecated (const string &method, const string &extra)
 
void _warn (const string &warning, const string &method, const string &extra)
 
void use_legacy_rate_constants (bool legacy=true)
 Set definition used for rate constant calculation. More...
 
bool legacy_rate_constants_used ()
 Returns true if legacy rate constant definition is used. More...
 
void printStackTraceOnSegfault ()
 Enables printing a stacktrace to std::err if a segfault occurs. More...
 
void appdelete ()
 Delete and free all memory associated with the application. More...
 
void thread_complete ()
 Delete and free memory allocated per thread in multithreaded applications. More...
 
void addDirectory (const string &dir)
 Add a directory to the data file search path. More...
 
string getDataDirectories (const string &sep)
 Get the Cantera data directories. More...
 
string findInputFile (const string &name)
 Find an input file. More...
 
void loadExtension (const string &extType, const string &name)
 Load an extension implementing user-defined models. More...
 
void loadExtensions (const AnyMap &node)
 Load extensions providing user-defined models from the extensions section of the given node. More...
 
void searchPythonVersions (const string &versions)
 Set the versions of Python to try when loading user-defined extensions, in order of preference. More...
 
bool debugModeEnabled ()
 Returns true if Cantera was compiled in debug mode. More...
 
bool usesHDF5 ()
 Returns true if Cantera was compiled with C++ HDF5 support. More...
 
string demangle (const std::type_info &type)
 Convert a type name to a human readable string, using boost::core::demangle if available. More...
 
shared_ptr< InterfacenewInterface (const string &infile, const string &name="", const vector< string > &adjacent={})
 Create and initialize a new Interface from an input file. More...
 
shared_ptr< InterfacenewInterface (const string &infile, const string &name, const vector< shared_ptr< Solution >> &adjacent)
 Create and initialize a new Interface from an input file. More...
 
shared_ptr< InterfacenewInterface (AnyMap &phaseNode, const AnyMap &rootNode=AnyMap(), const vector< shared_ptr< Solution >> &adjacent={})
 Create and initialize a new Interface from AnyMap objects. More...
 
shared_ptr< SolutionnewSolution (const string &infile, const string &name="", const string &transport="", const vector< shared_ptr< Solution >> &adjacent={})
 Create and initialize a new Solution manager from an input file. More...
 
shared_ptr< SolutionnewSolution (const string &infile, const string &name, const string &transport, const vector< string > &adjacent)
 Create and initialize a new Solution from an input file. More...
 
shared_ptr< SolutionnewSolution (const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap(), const string &transport="", const vector< shared_ptr< Solution >> &adjacent={}, const map< string, shared_ptr< Solution >> &related={})
 Create and initialize a new Solution manager from AnyMap objects. More...
 
bool isSimpleVector (const AnyValue &any)
 
AnyMap preamble (const string &desc)
 
AnyMapopenField (AnyMap &root, const string &name)
 
const AnyMaplocateField (const AnyMap &root, const string &name)
 
string getName (const set< string > &names, const string &name)
 
string vec2str (const vector< double > &v, const string &fmt="%g", const string &sep=", ")
 Convert a vector to a string (separated by commas) More...
 
string stripnonprint (const string &s)
 Strip non-printing characters wherever they are. More...
 
Composition parseCompString (const string &ss, const vector< string > &names=vector< string >())
 Parse a composition string into a map consisting of individual key:composition pairs. More...
 
double fpValue (const string &val)
 Translate a string into one double value. More...
 
double fpValueCheck (const string &val)
 Translate a string into one double value, with error checking. More...
 
void tokenizeString (const string &oval, vector< string > &v)
 This function separates a string up into tokens according to the location of white space. More...
 
void tokenizePath (const string &oval, vector< string > &v)
 This function separates a string up into tokens according to the location of path separators. More...
 
size_t copyString (const string &source, char *dest, size_t length)
 Copy the contents of a string into a char array of a given length. More...
 
string trimCopy (const string &input)
 Trim. More...
 
string toLowerCopy (const string &input)
 Convert to lower case. More...
 
bool caseInsensitiveEquals (const string &input, const string &test)
 Case insensitive equality predicate. More...
 
static pair< double, string > split_unit (const AnyValue &v)
 
size_t BasisOptimize (int *usedZeroedSpecies, bool doFormRxn, MultiPhase *mphase, vector< size_t > &orderVectorSpecies, vector< size_t > &orderVectorElements, vector< double > &formRxnMatrix)
 Choose the optimum basis of species for the equilibrium calculations. More...
 
void ElemRearrange (size_t nComponents, const vector< double > &elementAbundances, MultiPhase *mphase, vector< size_t > &orderVectorSpecies, vector< size_t > &orderVectorElements)
 Handles the potential rearrangement of the constraint equations represented by the Formula Matrix. More...
 
int _equilflag (const char *xy)
 map property strings to integers More...
 
std::ostream & operator<< (std::ostream &s, MultiPhase &x)
 Function to output a MultiPhase description to a stream. More...
 
double vcs_l2norm (const vector< double > &vec)
 determine the l2 norm of a vector of doubles More...
 
const char * vcs_speciesType_string (int speciesStatus, int length=100)
 Returns a const char string representing the type of the species given by the first argument. More...
 
bool vcs_doubleEqual (double d1, double d2)
 Simple routine to check whether two doubles are equal up to roundoff error. More...
 
static bool hasChargedSpecies (const ThermoPhase *const tPhase)
 This function decides whether a phase has charged species or not. More...
 
static bool chargeNeutralityElement (const ThermoPhase *const tPhase)
 This utility routine decides whether a Cantera ThermoPhase needs a constraint equation representing the charge neutrality of the phase. More...
 
std::ostream & operator<< (std::ostream &s, const Group &g)
 
shared_ptr< KineticsnewKinetics (const string &model)
 Create a new Kinetics instance. More...
 
shared_ptr< KineticsnewKinetics (const vector< shared_ptr< ThermoPhase >> &phases, const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap(), shared_ptr< Solution > soln={})
 Create a new kinetics manager, initialize it, and add reactions. More...
 
shared_ptr< KineticsnewKinetics (const vector< shared_ptr< ThermoPhase >> &phases, const string &filename)
 Create a new kinetics manager, initialize it, and add reactions. More...
 
void addReactions (Kinetics &kin, const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap())
 Add reactions to a Kinetics object. More...
 
void updateUndeclared (vector< string > &undeclared, const Composition &comp, const Kinetics &kin)
 
unique_ptr< ReactionnewReaction (const string &type)
 Create a new empty Reaction object. More...
 
unique_ptr< ReactionnewReaction (const AnyMap &rxn_node, const Kinetics &kin)
 Create a new Reaction object using the specified parameters. More...
 
void parseReactionEquation (Reaction &R, const string &equation, const AnyBase &reactionNode, const Kinetics *kin)
 Parse reaction equation. More...
 
vector< shared_ptr< Reaction > > getReactions (const AnyValue &items, Kinetics &kinetics)
 Create Reaction objects for each item (an AnyMap) in items. More...
 
string reactionLabel (size_t i, size_t kr, size_t nr, const vector< size_t > &slist, const Kinetics &s)
 
shared_ptr< ReactionRatenewReactionRate (const string &type)
 Create a new empty ReactionRate object. More...
 
shared_ptr< ReactionRatenewReactionRate (const AnyMap &rate_node, const UnitStack &rate_units)
 Create a new Rate object using the specified parameters. More...
 
shared_ptr< ReactionRatenewReactionRate (const AnyMap &rate_node)
 Create a new Rate object using the specified parameters. More...
 
static double calc_damping (double *x, double *dx, size_t dim, int *)
 
static double calcWeightedNorm (const double wtX[], const double dx[], size_t dim)
 This function calculates the norm of an update, dx[], based on the weighted values of x. More...
 
static double calc_damping (double x[], double dxneg[], size_t dim, int *label)
 This function calculates a damping factor for the Newton iteration update vector, dxneg, to insure that all site and bulk fractions, x, remain bounded between zero and one. More...
 
ostream & operator<< (std::ostream &s, const BandMatrix &m)
 Utility routine to print out the matrix. More...
 
static int cvodes_rhs (realtype t, N_Vector y, N_Vector ydot, void *f_data)
 Function called by cvodes to evaluate ydot given y. More...
 
static void cvodes_err (int error_code, const char *module, const char *function, char *msg, void *eh_data)
 Function called by CVodes when an error is encountered instead of writing to stdout. More...
 
static int cvodes_prec_setup (realtype t, N_Vector y, N_Vector ydot, booleantype jok, booleantype *jcurPtr, realtype gamma, void *f_data)
 
static int cvodes_prec_solve (realtype t, N_Vector y, N_Vector ydot, N_Vector r, N_Vector z, realtype gamma, realtype delta, int lr, void *f_data)
 
int solve (DenseMatrix &A, double *b, size_t nrhs=1, size_t ldb=0)
 Solve Ax = b. Array b is overwritten on exit with x. More...
 
int solve (DenseMatrix &A, DenseMatrix &b)
 Solve Ax = b for multiple right-hand-side vectors. More...
 
void multiply (const DenseMatrix &A, const double *const b, double *const prod)
 Multiply A*b and return the result in prod. Uses BLAS routine DGEMV. More...
 
void increment (const DenseMatrix &A, const double *const b, double *const prod)
 Multiply A*b and add it to the result in prod. Uses BLAS routine DGEMV. More...
 
int invert (DenseMatrix &A, size_t nn=npos)
 invert A. A is overwritten with A^-1. More...
 
shared_ptr< Func1newSumFunction (shared_ptr< Func1 > f1, shared_ptr< Func1 > f2)
 Sum of two functions. More...
 
shared_ptr< Func1newDiffFunction (shared_ptr< Func1 > f1, shared_ptr< Func1 > f2)
 Difference of two functions. More...
 
shared_ptr< Func1newProdFunction (shared_ptr< Func1 > f1, shared_ptr< Func1 > f2)
 Product of two functions. More...
 
shared_ptr< Func1newRatioFunction (shared_ptr< Func1 > f1, shared_ptr< Func1 > f2)
 Ratio of two functions. More...
 
shared_ptr< Func1newCompositeFunction (shared_ptr< Func1 > f1, shared_ptr< Func1 > f2)
 Composite of two functions. More...
 
shared_ptr< Func1newTimesConstFunction (shared_ptr< Func1 > f1, double c)
 Product of function and constant. More...
 
shared_ptr< Func1newPlusConstFunction (shared_ptr< Func1 > f1, double c)
 Sum of function and constant. More...
 
shared_ptr< Func1newFunc1 (const string &func1Type, double coeff=1.)
 Create a new simple functor object (see Simple Functors). More...
 
shared_ptr< Func1newFunc1 (const string &func1Type, const vector< double > &params)
 Create a new advanced functor object (see Advanced Functors). More...
 
shared_ptr< Func1newFunc1 (const string &func1Type, const shared_ptr< Func1 > f1, const shared_ptr< Func1 > f2)
 Create a new compound functor object (see Compound Functors). More...
 
shared_ptr< Func1newFunc1 (const string &func1Type, const shared_ptr< Func1 > f, double coeff)
 Create a new modified functor object (see Modified Functors). More...
 
double linearInterp (double x, const vector< double > &xpts, const vector< double > &fpts)
 Linearly interpolate a function defined on a discrete grid. More...
 
double trapezoidal (const Eigen::ArrayXd &f, const Eigen::ArrayXd &x)
 Numerical integration of a function using the trapezoidal rule. More...
 
double basicSimpson (const Eigen::ArrayXd &f, const Eigen::ArrayXd &x)
 Numerical integration of a function using Simpson's rule. More...
 
double simpson (const Eigen::ArrayXd &f, const Eigen::ArrayXd &x)
 Numerical integration of a function using Simpson's rule with flexibility of taking odd and even number of points. More...
 
double numericalQuadrature (const string &method, const Eigen::ArrayXd &f, const Eigen::ArrayXd &x)
 Numerical integration of a function. More...
 
static int ida_rhs (realtype t, N_Vector y, N_Vector ydot, N_Vector r, void *f_data)
 Function called by IDA to evaluate the residual, given y and ydot. More...
 
static void ida_err (int error_code, const char *module, const char *function, char *msg, void *eh_data)
 Function called by IDA when an error is encountered instead of writing to stdout. More...
 
IntegratornewIntegrator (const string &itype)
 Create new Integrator object. More...
 
double polyfit (size_t n, size_t deg, const double *x, const double *y, const double *w, double *p)
 Fits a polynomial function to a set of data points. More...
 
shared_ptr< PreconditionerBasenewPreconditioner (const string &precon)
 Create a Preconditioner object of the specified type. More...
 
static int interp_est (const string &estString)
 Utility function to assign an integer value from a string for the ElectrolyteSpeciesType field. More...
 
vector< string > elementVectorsFromSymbols ()
 
const vector< string > & elementSymbols ()
 Get a vector of the atomic symbols of the elements defined in Cantera. More...
 
vector< string > elementVectorsFromNames ()
 
const vector< string > & elementNames ()
 Get a vector of the names of the elements defined in Cantera. More...
 
map< string, double > mapAtomicWeights ()
 
const map< string, double > & elementWeights ()
 Get a map with the element and isotope symbols and names as keys and weights as values. More...
 
double getElementWeight (const string &ename)
 Get the atomic weight of an element. More...
 
double getElementWeight (int atomicNumber)
 Get the atomic weight of an element. More...
 
string getElementSymbol (const string &ename)
 Get the symbol for an element. More...
 
string getElementSymbol (int atomicNumber)
 Get the symbol for an element. More...
 
string getElementName (const string &ename)
 Get the name of an element. More...
 
string getElementName (int atomicNumber)
 Get the name of an element. More...
 
int getAtomicNumber (const string &ename)
 Get the atomic number for an element. More...
 
size_t numElementsDefined ()
 Get the number of named elements defined in Cantera. More...
 
size_t numIsotopesDefined ()
 Get the number of named isotopes defined in Cantera. More...
 
static void check_nParams (const string &method, size_t nParams, size_t m_formPitzerTemp)
 
vector< double > getSizedVector (const AnyMap &item, const string &key, size_t nCoeffs)
 
void assignTrimmed (AnyMap &interaction, const string &key, vector< double > &values)
 
PDSSnewPDSS (const string &model)
 
unique_ptr< SpeciesnewSpecies (const AnyMap &node)
 Create a new Species object from an AnyMap specification. More...
 
vector< shared_ptr< Species > > getSpecies (const AnyValue &items)
 Generate Species objects for each item (an AnyMap) in items. More...
 
SpeciesThermoInterpTypenewSpeciesThermoInterpType (int type, double tlow, double thigh, double pref, const double *coeffs)
 Create a new SpeciesThermoInterpType object given a corresponding constant. More...
 
SpeciesThermoInterpTypenewSpeciesThermoInterpType (const string &type, double tlow, double thigh, double pref, const double *coeffs)
 Create a new SpeciesThermoInterpType object given a string. More...
 
void setupSpeciesThermo (SpeciesThermoInterpType &thermo, const AnyMap &node)
 
void setupNasaPoly (NasaPoly2 &thermo, const AnyMap &node)
 
void setupShomatePoly (ShomatePoly2 &thermo, const AnyMap &node)
 
void setupConstCp (ConstCpPoly &thermo, const AnyMap &node)
 
void setupNasa9Poly (Nasa9PolyMultiTempRegion &thermo, const AnyMap &node)
 
void setupMu0 (Mu0Poly &thermo, const AnyMap &node)
 
unique_ptr< SpeciesThermoInterpTypenewSpeciesThermo (const AnyMap &thermo_node)
 Create a new SpeciesThermoInterpType object using the specified parameters. More...
 
shared_ptr< ThermoPhasenewThermoModel (const string &model)
 Create a new ThermoPhase instance. More...
 
shared_ptr< ThermoPhasenewThermo (const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap())
 Create a new ThermoPhase object and initialize it. More...
 
shared_ptr< ThermoPhasenewThermo (const string &infile, const string &id="")
 Create and Initialize a ThermoPhase object from an input file. More...
 
void addDefaultElements (ThermoPhase &thermo, const vector< string > &element_names)
 
void addElements (ThermoPhase &thermo, const vector< string > &element_names, const AnyValue &elements, bool allow_default)
 
void addSpecies (ThermoPhase &thermo, const AnyValue &names, const AnyValue &species)
 
void setupPhase (ThermoPhase &phase, const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap())
 Initialize a ThermoPhase object. More...
 
double quadInterp (double x0, double *x, double *y)
 
double Frot (double tr, double sqtr)
 The Parker temperature correction to the rotational collision number. More...
 
void setupGasTransportData (GasTransportData &tr, const AnyMap &node)
 
unique_ptr< TransportDatanewTransportData (const AnyMap &node)
 Create a new TransportData object from an AnyMap specification. More...
 
shared_ptr< TransportnewTransport (shared_ptr< ThermoPhase > thermo, const string &model="default")
 Create a new Transport instance. More...
 
shared_ptr< FlowDevicenewFlowDevice (const string &model)
 Create a FlowDevice object of the specified type. More...
 
shared_ptr< FlowDevicenewFlowDevice3 (const string &model)
 Create a FlowDevice object of the specified type. More...
 
shared_ptr< ReactorBasenewReactor (const string &model)
 Create a Reactor object of the specified type. More...
 
shared_ptr< ReactorBasenewReactor3 (const string &model)
 Create a Reactor object of the specified type. More...
 
shared_ptr< WallBasenewWall (const string &model)
 Create a WallBase object of the specified type. More...
 
shared_ptr< WallBasenewWall3 (const string &model)
 Create a WallBase object of the specified type. More...
 
bool usingSharedLibrary ()
 Returns true if Cantera was loaded as a shared library in the current application. More...
 
void debuglog (const string &msg, int loglevel)
 Write a message to the log only if loglevel > 0. More...
 
template<typename... Args>
void writelog (const string &fmt, const Args &... args)
 Write a formatted message to the screen. More...
 
template<typename... Args>
void writelogf (const char *fmt, const Args &... args)
 Write a formatted message to the screen. More...
 
template<typename... Args>
void warn_deprecated (const string &method, const string &msg, const Args &... args)
 Print a deprecation warning raised from method. More...
 
template<typename... Args>
void warn (const string &warning, const string &method, const string &msg, const Args &... args)
 Print a generic warning raised from method. More...
 
template<typename... Args>
void warn_user (const string &method, const string &msg, const Args &... args)
 Print a user warning raised from method as CanteraWarning. More...
 
template<class T >
clip (const T &value, const T &lower, const T &upper)
 Clip value such that lower <= value <= upper. More...
 
template<typename T >
int sign (T x)
 Sign of a number. More...
 
template<class V >
double dot4 (const V &x, const V &y)
 Templated Inner product of two vectors of length 4. More...
 
template<class V >
double dot5 (const V &x, const V &y)
 Templated Inner product of two vectors of length 5. More...
 
template<class InputIter , class InputIter2 >
double dot (InputIter x_begin, InputIter x_end, InputIter2 y_begin)
 Function that calculates a templated inner product. More...
 
template<class InputIter , class OutputIter , class S >
void scale (InputIter begin, InputIter end, OutputIter out, S scale_factor)
 Multiply elements of an array by a scale factor. More...
 
template<class D , class R >
poly6 (D x, R *c)
 Templated evaluation of a polynomial of order 6. More...
 
template<class D , class R >
poly8 (D x, R *c)
 Templated evaluation of a polynomial of order 8. More...
 
template<class D , class R >
poly5 (D x, R *c)
 Templated evaluation of a polynomial of order 5. More...
 
template<class D , class R >
poly4 (D x, R *c)
 Evaluates a polynomial of order 4. More...
 
template<class D , class R >
poly3 (D x, R *c)
 Templated evaluation of a polynomial of order 3. More...
 
template<class T , class U >
const U & getValue (const map< T, U > &m, const T &key, const U &default_val)
 Const accessor for a value in a map. More...
 
template<class T , class U = int>
len (const T &container)
 Get the size of a container, cast to a signed integer type. More...
 
template<class InputIter , class Vec1 , class Vec2 >
static void _multiply (InputIter begin, InputIter end, const Vec1 &input, Vec2 &output)
 
template<class InputIter , class Vec1 , class Vec2 >
static void _incrementSpecies (InputIter begin, InputIter end, const Vec1 &input, Vec2 &output)
 
template<class InputIter , class Vec1 , class Vec2 >
static void _decrementSpecies (InputIter begin, InputIter end, const Vec1 &input, Vec2 &output)
 
template<class InputIter , class Vec1 , class Vec2 >
static void _incrementReactions (InputIter begin, InputIter end, const Vec1 &input, Vec2 &output)
 
template<class InputIter , class Vec1 , class Vec2 >
static void _decrementReactions (InputIter begin, InputIter end, const Vec1 &input, Vec2 &output)
 
template<class InputIter , class Indices >
static void _resizeCoeffs (InputIter begin, InputIter end, Indices &ix)
 
template<class InputIter , class Vec1 , class Vec2 , class Vec3 >
static void _derivatives (InputIter begin, InputIter end, const Vec1 &S, const Vec2 &R, Vec3 &jac)
 
template<class InputIter , class Vec1 , class Vec2 >
static void _scale (InputIter begin, InputIter end, const Vec1 &in, Vec2 &out, double factor)
 
void ct_dgemv (ctlapack::storage_t storage, ctlapack::transpose_t trans, int m, int n, doublereal alpha, const doublereal *a, int lda, const doublereal *x, int incX, doublereal beta, doublereal *y, int incY)
 
void ct_dgbsv (int n, int kl, int ku, int nrhs, doublereal *a, int lda, integer *ipiv, doublereal *b, int ldb, int &info)
 
void ct_dgelss (size_t m, size_t n, size_t nrhs, doublereal *a, size_t lda, doublereal *b, size_t ldb, doublereal *s, doublereal rcond, size_t &rank, doublereal *work, int &lwork, int &info)
 
void ct_dgbtrf (size_t m, size_t n, size_t kl, size_t ku, doublereal *a, size_t lda, integer *ipiv, int &info)
 
void ct_dgbtrs (ctlapack::transpose_t trans, size_t n, size_t kl, size_t ku, size_t nrhs, doublereal *a, size_t lda, integer *ipiv, doublereal *b, size_t ldb, int &info)
 
void ct_dgetrf (size_t m, size_t n, doublereal *a, size_t lda, integer *ipiv, int &info)
 
void ct_dgetrs (ctlapack::transpose_t trans, size_t n, size_t nrhs, doublereal *a, size_t lda, integer *ipiv, doublereal *b, size_t ldb, int &info)
 
void ct_dgetri (int n, doublereal *a, int lda, integer *ipiv, doublereal *work, int lwork, int &info)
 
void ct_dscal (int n, doublereal da, doublereal *dx, int incx)
 
void ct_dgeqrf (size_t m, size_t n, doublereal *a, size_t lda, doublereal *tau, doublereal *work, size_t lwork, int &info)
 
void ct_dormqr (ctlapack::side_t rlside, ctlapack::transpose_t trans, size_t m, size_t n, size_t k, doublereal *a, size_t lda, doublereal *tau, doublereal *c, size_t ldc, doublereal *work, size_t lwork, int &info)
 
void ct_dtrtrs (ctlapack::upperlower_t uplot, ctlapack::transpose_t trans, const char *diag, size_t n, size_t nrhs, doublereal *a, size_t lda, doublereal *b, size_t ldb, int &info)
 
doublereal ct_dtrcon (const char *norm, ctlapack::upperlower_t uplot, const char *diag, size_t n, doublereal *a, size_t lda, doublereal *work, int *iwork, int &info)
 
void ct_dpotrf (ctlapack::upperlower_t uplot, size_t n, doublereal *a, size_t lda, int &info)
 
void ct_dpotrs (ctlapack::upperlower_t uplot, size_t n, size_t nrhs, doublereal *a, size_t lda, doublereal *b, size_t ldb, int &info)
 
doublereal ct_dgecon (const char norm, size_t n, doublereal *a, size_t lda, doublereal anorm, doublereal *work, int *iwork, int &info)
 
doublereal ct_dgbcon (const char norm, size_t n, size_t kl, size_t ku, doublereal *a, size_t ldab, int *ipiv, doublereal anorm, doublereal *work, int *iwork, int &info)
 
doublereal ct_dlange (const char norm, size_t m, size_t n, doublereal *a, size_t lda, doublereal *work)
 
template<class T = Domain1D>
shared_ptr< T > newDomain (const string &domainType, shared_ptr< Solution > solution, const string &id="")
 Create a Domain object of the specified type. More...
 
Global Warning Settings
void suppress_deprecation_warnings ()
 Globally disable printing of deprecation warnings. More...
 
void make_deprecation_warnings_fatal ()
 Turns deprecation warnings into exceptions. More...
 
void suppress_warnings ()
 Globally disable printing of (user) warnings. More...
 
bool warnings_suppressed ()
 Returns true if warnings should be suppressed. More...
 
void make_warnings_fatal ()
 Turns Cantera warnings into exceptions. More...
 
void suppress_thermo_warnings (bool suppress=true)
 Globally disable printing of warnings about problematic thermo data, such as NASA polynomials with discontinuities at the midpoint temperature. More...
 
bool thermo_warnings_suppressed ()
 Returns true if thermo warnings should be suppressed. More...
 
Cantera Version Information
string version ()
 Returns the Cantera version. More...
 
string gitCommit ()
 Returns the hash of the git commit from which Cantera was compiled, if known. More...
 

Variables

static std::mutex dir_mutex
 Mutex for input directory access. More...
 
static std::mutex app_mutex
 Mutex for creating singletons within the application object. More...
 
static std::mutex msg_mutex
 Mutex for access to string messages. More...
 
static const char * stars
 
int BasisOptimize_print_lvl = 0
 External int that is used to turn on debug printing for the BasisOptimize program. More...
 
static const double USEDBEFORE = -1
 
int vcs_timing_print_lvl = 1
 Global hook for turning on and off time printing. More...
 
const double DampFactor = sqrt(2.0)
 
const size_t NDAMP = 7
 
static vector< atomicWeightDataatomicWeightTable
 atomicWeightTable is a vector containing the atomic weights database. More...
 
static vector< isotopeWeightDataisotopeWeightTable
 isotopeWeightTable is a vector containing the atomic weights database. More...
 
const double T_c = 647.096
 Critical Temperature value (kelvin) More...
 
static const double P_c = 22.064E6
 Critical Pressure (Pascals) More...
 
const double Rho_c = 322.
 Value of the Density at the critical point (kg m-3) More...
 
static const double R_water = 461.51805
 
const int DeltaDegree = 6
 
static const double Min_C_Internal = 0.001
 Constant to compare dimensionless heat capacities against zero. More...
 
const double SmallNumber = 1.e-300
 smallest number to compare to zero. More...
 
const double BigNumber = 1.e300
 largest number to compare to inf. More...
 
const double Undef = -999.1234
 Fairly random number to be used to initialize variables against to see if they are subsequently defined. More...
 
const double Tiny = 1.e-20
 Small number to compare differences of mole fractions against. More...
 
const size_t npos = static_cast<size_t>(-1)
 index returned by functions to indicate "no position" More...
 
const int LeftInlet = 1
 
const int RightInlet = -1
 
const int cEST_solvent = 0
 Electrolyte species type. More...
 
const int cEST_chargedSpecies = 1
 
const int cEST_weakAcidAssociated = 2
 
const int cEST_strongAcidAssociated = 3
 
const int cEST_polarNeutral = 4
 
const int cEST_nonpolarNeutral = 5
 
const int PHSCALE_PITZER = 0
 Scale to be used for the output of single-ion activity coefficients is that used by Pitzer. More...
 
const int PHSCALE_NBS = 1
 Scale to be used for evaluation of single-ion activity coefficients is that used by the NBS standard for evaluation of the pH variable. More...
 
Numerical Constants
const double Pi = 3.14159265358979323846
 Pi. More...
 
const double Sqrt2 = 1.41421356237309504880
 Sqrt(2) More...
 
Defined Constants

These constants are defined by CODATA to have a particular value; see NIST Reference on Constants, Units, and Uncertainty.

const double Avogadro = 6.02214076e26
 Avogadro's Number \( N_{\mathrm{A}} \) [number/kmol]. More...
 
const double Boltzmann = 1.380649e-23
 Boltzmann constant \( k \) [J/K]. More...
 
const double Planck = 6.62607015e-34
 Planck constant \( h \) [J-s]. More...
 
const double ElectronCharge = 1.602176634e-19
 Elementary charge \( e \) [C]. More...
 
const double lightSpeed = 299792458.0
 Speed of Light in a vacuum \( c \) [m/s]. More...
 
const double OneAtm = 1.01325e5
 One atmosphere [Pa]. More...
 
const double OneBar = 1.0E5
 One bar [Pa]. More...
 
Measured Constants

These constants are measured and reported by CODATA

const double fineStructureConstant = 7.2973525693e-3
 Fine structure constant \( \alpha \) []. More...
 
const double ElectronMass = 9.1093837015e-31
 Electron Mass \( m_e \) [kg]. More...
 
Derived Constants

These constants are found from the defined and measured constants

const double GasConstant = Avogadro * Boltzmann
 Universal Gas Constant \( R_u \) [J/kmol/K]. More...
 
const double logGasConstant = std::log(GasConstant)
 
const double GasConst_cal_mol_K = GasConstant / 4184.0
 Universal gas constant in cal/mol/K. More...
 
const double StefanBoltz = 2.0 * std::pow(Pi, 5) * std::pow(Boltzmann, 4) / (15.0 * std::pow(Planck, 3) * lightSpeed * lightSpeed)
 Stefan-Boltzmann constant \( \sigma \) [W/m2/K4]. More...
 
const double Faraday = ElectronCharge * Avogadro
 Faraday constant \( F \) [C/kmol]. More...
 
const double permeability_0 = 2 * fineStructureConstant * Planck / (ElectronCharge * ElectronCharge * lightSpeed)
 Permeability of free space \( \mu_0 \) [N/A2]. More...
 
const double epsilon_0 = 1.0 / (lightSpeed * lightSpeed * permeability_0)
 Permittivity of free space \( \varepsilon_0 \) [F/m]. More...
 
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
 
CONSTANTS - Specification of the Molality convention
const int cAC_CONVENTION_MOLAR = 0
 Standard state uses the molar convention. More...
 
const int cAC_CONVENTION_MOLALITY = 1
 Standard state uses the molality convention. More...
 
CONSTANTS - Specification of the SS convention
const int cSS_CONVENTION_TEMPERATURE = 0
 Standard state uses the molar convention. More...
 
const int cSS_CONVENTION_VPSS = 1
 Standard state uses the molality convention. More...
 
const int cSS_CONVENTION_SLAVE = 2
 Standard state thermodynamics is obtained from slave ThermoPhase objects. More...
 

Typedef Documentation

◆ Composition

typedef map<string, double> Composition

Map from string names to doubles.

Used for defining species mole/mass fractions, elemental compositions, and reaction stoichiometries.

Definition at line 177 of file ct_defs.h.

◆ VCS_FUNC_PTR

typedef double(* VCS_FUNC_PTR) (double xval, double Vtarget, int varID, void *fptrPassthrough, int *err)

Definition of the function pointer for the root finder.

see vcsUtil_root1d for a definition of how to use this.

Definition at line 79 of file vcs_internal.h.

Enumeration Type Documentation

◆ MethodType

enum MethodType

Specifies the method used to integrate the system of equations.

Not all methods are supported by all integrators.

Enumerator
BDF_Method 

Backward Differentiation.

Adams_Method 

Adams.

Definition at line 23 of file Integrator.h.

◆ IterType

enum IterType

Specifies the method used for iteration.

Not all methods are supported by all integrators.

Enumerator
Newton_Iter 

Newton Iteration.

Functional_Iter 

Functional Iteration.

Definition at line 32 of file Integrator.h.

◆ PreconditionerSide

enum PreconditionerSide
strong

Specifies the side of the system on which the preconditioner is applied.

Not all methods are supported by all integrators.

Enumerator
LEFT_PRECONDITION 

No preconditioning.

RIGHT_PRECONDITION 

Left side preconditioning.

BOTH_PRECONDITION 

Right side preconditioning.

Left and right side preconditioning

Definition at line 22 of file PreconditionerBase.h.

◆ offset

enum offset

Offsets of solution components in the 1D solution array.

Enumerator
c_offset_U 

axial velocity

c_offset_V 

strain rate

c_offset_T 

temperature

c_offset_L 

(1/r)dP/dr

c_offset_E 

electric field equation

c_offset_Y 

mass fractions

Definition at line 23 of file StFlow.h.

◆ ThermoBasis

enum ThermoBasis
strong

Differentiate between mole fractions and mass fractions for input mixture composition.

Definition at line 153 of file ThermoPhase.h.

Function Documentation

◆ warn_deprecated()

void warn_deprecated ( const string &  source,
const AnyBase node,
const string &  message 
)

A deprecation warning for syntax in an input file.

Definition at line 1926 of file AnyMap.cpp.

◆ operator<<() [1/3]

std::ostream & operator<< ( std::ostream &  s,
const Array2D m 
)

Output the current contents of the Array2D object.

Example of usage: s << m << endl;

Parameters
sReference to the ostream to write to
mObject of type Array2D that you are querying
Returns
a reference to the ostream.

Definition at line 100 of file Array.cpp.

◆ operator*=()

void operator*= ( Array2D m,
double  a 
)

Overload the times equals operator for multiplication of a matrix and a scalar.

Scaled every element of the matrix by the scalar input

Parameters
mMatrix
ascalar

Definition at line 114 of file Array.cpp.

◆ checkFinite() [1/2]

void checkFinite ( const double  tmp)

Check to see that a number is finite (not NaN, +Inf or -Inf)

Definition at line 15 of file checkFinite.cpp.

◆ checkFinite() [2/2]

void checkFinite ( const string &  name,
double *  values,
size_t  N 
)

Check to see that all elements in an array are finite.

Throws an exception if any element is NaN, +Inf, or -Inf

Parameters
nameName to be used in the exception message if the check fails
valuesArray of N values to be checked
NNumber of elements in values

Definition at line 28 of file checkFinite.cpp.

◆ app()

static Application* Cantera::app ( )
static

Return a pointer to the application object.

Definition at line 20 of file global.cpp.

◆ appdelete()

void appdelete ( )

Delete and free all memory associated with the application.

Delete all global data. It should be called at the end of the application if leak checking is to be done.

Definition at line 134 of file global.cpp.

◆ thread_complete()

void thread_complete ( )

Delete and free memory allocated per thread in multithreaded applications.

Delete the memory allocated per thread by Cantera. It should be called from within the thread just before the thread terminates. If your version of Cantera has not been specifically compiled for thread safety this function does nothing.

Definition at line 140 of file global.cpp.

◆ loadExtension()

void loadExtension ( const string &  extType,
const string &  name 
)

Load an extension implementing user-defined models.

Parameters
extTypeSpecifies the interface / language of the extension, for example "python"
nameSpecifies the name of the extension. The meaning of this parameter depends on the specific extension interface. For example, for Python extensions, this is the name of the Python module containing the models.
Since
New in Cantera 3.0

Definition at line 174 of file global.cpp.

◆ loadExtensions()

void loadExtensions ( const AnyMap node)

Load extensions providing user-defined models from the extensions section of the given node.

See also
Application::loadExtension
Since
New in Cantera 3.0

Definition at line 179 of file global.cpp.

◆ searchPythonVersions()

void searchPythonVersions ( const string &  versions)

Set the versions of Python to try when loading user-defined extensions, in order of preference.

Separate multiple versions with commas, for example "3.11,3.10".

Since
New in Cantera 3.0

Definition at line 189 of file global.cpp.

◆ _equilflag()

int _equilflag ( const char *  xy)

map property strings to integers

Definition at line 20 of file ChemEquil.cpp.

◆ operator<<() [2/3]

std::ostream & operator<< ( std::ostream &  s,
MultiPhase x 
)

Function to output a MultiPhase description to a stream.

Writes out a description of the contents of each phase of the MultiPhase using the report function.

Parameters
sostream
xReference to a MultiPhase
Returns
a reference to the ostream

Definition at line 825 of file MultiPhase.cpp.

◆ vcs_l2norm()

double vcs_l2norm ( const vector< double > &  vec)

determine the l2 norm of a vector of doubles

Parameters
vecvector of doubles
Returns
the l2 norm of the vector

Definition at line 19 of file vcs_util.cpp.

◆ vcs_speciesType_string()

const char * vcs_speciesType_string ( int  speciesStatus,
int  length = 100 
)

Returns a const char string representing the type of the species given by the first argument.

Parameters
speciesStatusSpecies status integer representing the type of the species.
lengthMaximum length of the string to be returned. Shorter values will yield abbreviated strings. Defaults to a value of 100.

Definition at line 31 of file vcs_util.cpp.

◆ vcs_doubleEqual()

bool vcs_doubleEqual ( double  d1,
double  d2 
)

Simple routine to check whether two doubles are equal up to roundoff error.

Currently it's set to check for 10 digits of relative accuracy.

Parameters
d1first double
d2second double
Returns
true if the doubles are "equal" and false otherwise

Definition at line 89 of file vcs_util.cpp.

◆ hasChargedSpecies()

static bool Cantera::hasChargedSpecies ( const ThermoPhase *const  tPhase)
static

This function decides whether a phase has charged species or not.

Definition at line 763 of file vcs_VolPhase.cpp.

◆ chargeNeutralityElement()

static bool Cantera::chargeNeutralityElement ( const ThermoPhase *const  tPhase)
static

This utility routine decides whether a Cantera ThermoPhase needs a constraint equation representing the charge neutrality of the phase.

It does this by searching for charged species. If it finds one, and if the phase needs one, then it returns true.

Definition at line 777 of file vcs_VolPhase.cpp.

◆ newReaction() [1/2]

unique_ptr< Reaction > newReaction ( const string &  type)

Create a new empty Reaction object.

Parameters
typestring identifying type of reaction.

Definition at line 832 of file Reaction.cpp.

◆ newReaction() [2/2]

unique_ptr< Reaction > newReaction ( const AnyMap rxn_node,
const Kinetics kin 
)

Create a new Reaction object using the specified parameters.

Parameters
rxn_nodeAnyMap node describing reaction.
kinkinetics manager

Definition at line 837 of file Reaction.cpp.

◆ parseReactionEquation()

void parseReactionEquation ( Reaction R,
const string &  equation,
const AnyBase reactionNode,
const Kinetics kin 
)

Parse reaction equation.

Definition at line 842 of file Reaction.cpp.

◆ getReactions()

vector< shared_ptr< Reaction > > getReactions ( const AnyValue items,
Kinetics kinetics 
)

Create Reaction objects for each item (an AnyMap) in items.

The species involved in these reactions must exist in the phases associated with the Kinetics object kinetics.

Definition at line 912 of file Reaction.cpp.

◆ calcWeightedNorm()

static double calcWeightedNorm ( const double  wtX[],
const double  dx[],
size_t  dim 
)
static

This function calculates the norm of an update, dx[], based on the weighted values of x.

Definition at line 518 of file solveSP.cpp.

◆ calc_damping()

static double Cantera::calc_damping ( double  x[],
double  dxneg[],
size_t  dim,
int *  label 
)
static

This function calculates a damping factor for the Newton iteration update vector, dxneg, to insure that all site and bulk fractions, x, remain bounded between zero and one.

 dxneg[] = negative of the update vector.

The constant "APPROACH" sets the fraction of the distance to the boundary that the step can take. If the full step would not force any fraction outside of 0-1, then Newton's method is allowed to operate normally.

Definition at line 472 of file solveSP.cpp.

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream &  s,
const BandMatrix m 
)

Utility routine to print out the matrix.

Parameters
sostream to print the matrix out to
mMatrix to be printed
Returns
a reference to the ostream

Definition at line 293 of file BandMatrix.cpp.

◆ cvodes_err()

static void Cantera::cvodes_err ( int  error_code,
const char *  module,
const char *  function,
char *  msg,
void *  eh_data 
)
static

Function called by CVodes when an error is encountered instead of writing to stdout.

Here, save the error message provided by CVodes so that it can be included in the subsequently raised CanteraError.

Definition at line 48 of file CVodesIntegrator.cpp.

◆ solve() [1/2]

int solve ( DenseMatrix A,
double *  b,
size_t  nrhs = 1,
size_t  ldb = 0 
)

Solve Ax = b. Array b is overwritten on exit with x.

The solve function uses the LAPACK routine dgetrf to invert the m xy n matrix.

The factorization has the form

A = P * L * U

where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m > n), and U is upper triangular (upper trapezoidal if m < n).

The system is then solved using the LAPACK routine dgetrs

Parameters
ADense matrix to be factored
bRHS(s) to be solved.
nrhsNumber of right hand sides to solve
ldbLeading dimension of b, if nrhs > 1

Definition at line 133 of file DenseMatrix.cpp.

◆ solve() [2/2]

int solve ( DenseMatrix A,
DenseMatrix b 
)

Solve Ax = b for multiple right-hand-side vectors.

Parameters
ADense matrix to be factored
bDense matrix of RHS's. Each column is a RHS

Definition at line 202 of file DenseMatrix.cpp.

◆ multiply()

void multiply ( const DenseMatrix A,
const double *const  b,
double *const  prod 
)

Multiply A*b and return the result in prod. Uses BLAS routine DGEMV.

\[ prod_i = sum^N_{j = 1}{A_{ij} b_j} \]

Parameters
[in]ADense Matrix A with M rows and N columns
[in]bvector b with length N
[out]prodvector prod length = M

Definition at line 207 of file DenseMatrix.cpp.

◆ increment()

void increment ( const DenseMatrix A,
const double *const  b,
double *const  prod 
)

Multiply A*b and add it to the result in prod. Uses BLAS routine DGEMV.

\[ prod_i += sum^N_{j = 1}{A_{ij} b_j} \]

Parameters
[in]ADense Matrix A with M rows and N columns
[in]bvector b with length N
[out]prodvector prod length = M

Definition at line 212 of file DenseMatrix.cpp.

◆ invert()

int invert ( DenseMatrix A,
size_t  nn = npos 
)

invert A. A is overwritten with A^-1.

Parameters
AInvert the matrix A and store it back in place
nnSize of A. This defaults to -1, which means that the number of rows is used as the default size of n

Definition at line 226 of file DenseMatrix.cpp.

◆ basicSimpson()

double Cantera::basicSimpson ( const Eigen::ArrayXd &  f,
const Eigen::ArrayXd &  x 
)

Numerical integration of a function using Simpson's rule.

Only for odd number of points. This function is used only by calling simpson.

Vector x contains a monotonic sequence of grid points, and Vector f contains function values defined at these points. The size of x and f must be the same.

Parameters
fvector of function value
xvector of function coordinate

Definition at line 59 of file funcs.cpp.

◆ ida_rhs()

static int Cantera::ida_rhs ( realtype  t,
N_Vector  y,
N_Vector  ydot,
N_Vector  r,
void *  f_data 
)
static

Function called by IDA to evaluate the residual, given y and ydot.

IDA allows passing in a void* pointer to access external data. Instead of requiring the user to provide a residual function directly to IDA (which would require using the Sundials data types N_Vector, etc.), we define this function as the single function that IDA always calls. The real evaluation of the residual is done by the FuncEval::evalDae() method of an instance of a subclass of FuncEval that is passed into this function as the f_data parameter.

Definition at line 40 of file IdasIntegrator.cpp.

◆ ida_err()

static void Cantera::ida_err ( int  error_code,
const char *  module,
const char *  function,
char *  msg,
void *  eh_data 
)
static

Function called by IDA when an error is encountered instead of writing to stdout.

Here, save the error message provided by IDA so that it can be included in the subsequently raised CanteraError.

Definition at line 49 of file IdasIntegrator.cpp.

◆ newPreconditioner()

shared_ptr< PreconditionerBase > newPreconditioner ( const string &  precon)

Create a Preconditioner object of the specified type.

Definition at line 35 of file PreconditionerFactory.cpp.

◆ interp_est()

static int Cantera::interp_est ( const string &  estString)
static

Utility function to assign an integer value from a string for the ElectrolyteSpeciesType field.

Parameters
estStringinput string that will be interpreted

Definition at line 256 of file DebyeHuckel.cpp.

◆ elementSymbols()

const vector< string > & elementSymbols ( )

Get a vector of the atomic symbols of the elements defined in Cantera.

Since
New in version 3.0

Definition at line 212 of file Elements.cpp.

◆ elementNames()

const vector< string > & elementNames ( )

Get a vector of the names of the elements defined in Cantera.

Since
New in version 3.0

Definition at line 227 of file Elements.cpp.

◆ elementWeights()

const map< string, double > & elementWeights ( )

Get a map with the element and isotope symbols and names as keys and weights as values.

This is a constant in the application so it is only generated once when it is first needed.

Since
New in version 3.0

Definition at line 246 of file Elements.cpp.

◆ getElementWeight() [1/2]

double getElementWeight ( const string &  ename)

Get the atomic weight of an element.

Get the atomic weight of an element defined in Cantera by its symbol or by its name. This includes the named isotopes defined in Cantera.

Parameters
enameString, name or symbol of the element
Returns
The atomic weight of the element
Exceptions
CanteraErrorif a match for ename is not found or the element has no stable isotopes, and therefore no standard atomic weight

Definition at line 251 of file Elements.cpp.

◆ getElementWeight() [2/2]

double getElementWeight ( int  atomicNumber)

Get the atomic weight of an element.

Get the atomic weight of an element defined in Cantera by its atomic number. The named isotopes cannot be accessed from this function, since the atomic number of the isotopes is the same as the regular element from which they are derived.

Parameters
atomicNumberInteger, atomic number of the element
Returns
The atomic weight of the element
Exceptions
IndexErrorif the passed atomic number less than 1 or larger than the number of elements defined
CanteraErrorif the element has no stable isotopes, and therefore no standard atomic weight

Definition at line 275 of file Elements.cpp.

◆ getElementSymbol() [1/2]

string getElementSymbol ( const string &  ename)

Get the symbol for an element.

Get the symbol for an element defined in Cantera by its name. This includes the named isotopes defined in Cantera.

Parameters
enameString, name of the element
Returns
The symbol of the element in a string
Exceptions
CanteraErrorif a match for ename is not found

Definition at line 289 of file Elements.cpp.

◆ getElementSymbol() [2/2]

string getElementSymbol ( int  atomicNumber)

Get the symbol for an element.

Get the symbol for an element defined in Cantera by its atomic number. The named isotopes cannot be accessed from this function, since the atomic number of the isotopes is the same as the regular element from which they are derived.

Parameters
atomicNumberInteger, atomic number of the element
Returns
The symbol of the element in a string
Exceptions
IndexErrorif the passed atomic number less than 1 or larger than the number of elements defined

Definition at line 305 of file Elements.cpp.

◆ getElementName() [1/2]

string getElementName ( const string &  ename)

Get the name of an element.

Get the name of an element defined in Cantera by its symbol. This includes the named isotopes defined in Cantera.

Parameters
enameString, symbol for the element
Returns
The name of the element, in a string
Exceptions
CanteraErrorif a match for ename is not found

Definition at line 314 of file Elements.cpp.

◆ getElementName() [2/2]

string getElementName ( int  atomicNumber)

Get the name of an element.

Get the name of an element defined in Cantera by its atomic number. The named isotopes cannot be accessed from this function, since the atomic number of the isotopes is the same as the regular element from which they are derived.

Parameters
atomicNumberInteger, atomic number of the element
Returns
The name of the element, in a string
Exceptions
CanteraErrorIndexError if the passed atomic number less than 1 or larger than the number of elements defined

Definition at line 330 of file Elements.cpp.

◆ getAtomicNumber()

int getAtomicNumber ( const string &  ename)

Get the atomic number for an element.

Get the atomic number of an element defined in Cantera by its symbol or name. This includes the named isotopes included in Cantera.

Parameters
enameString, name or symbol of the element
Returns
The integer atomic number of the element
Exceptions
CanteraErrorif a match for ename is not found

Definition at line 339 of file Elements.cpp.

◆ numElementsDefined()

size_t numElementsDefined ( )

Get the number of named elements defined in Cantera.

This array excludes named isotopes

Since
Type is size_t in Cantera 3.0

Definition at line 362 of file Elements.cpp.

◆ numIsotopesDefined()

size_t numIsotopesDefined ( )

Get the number of named isotopes defined in Cantera.

This array excludes the named elements

Since
Type is size_t in Cantera 3.0

Definition at line 367 of file Elements.cpp.

◆ newSpecies()

unique_ptr< Species > newSpecies ( const AnyMap node)

Create a new Species object from an AnyMap specification.

Definition at line 105 of file Species.cpp.

◆ getSpecies()

vector< shared_ptr< Species > > getSpecies ( const AnyValue items)

Generate Species objects for each item (an AnyMap) in items.

Definition at line 143 of file Species.cpp.

◆ newSpeciesThermoInterpType() [1/2]

SpeciesThermoInterpType * newSpeciesThermoInterpType ( int  type,
double  tlow,
double  thigh,
double  pref,
const double *  coeffs 
)

Create a new SpeciesThermoInterpType object given a corresponding constant.

Parameters
typeA constant specifying the type to be created
tlowThe lowest temperature at which the parameterization is valid
thighThe highest temperature at which the parameterization is valid
prefThe reference pressure for the parameterization
coeffsThe array of coefficients for the parameterization
Returns
The pointer to the newly allocated SpeciesThermoInterpType object

Definition at line 27 of file SpeciesThermoFactory.cpp.

◆ newSpeciesThermoInterpType() [2/2]

SpeciesThermoInterpType * newSpeciesThermoInterpType ( const string &  type,
double  tlow,
double  thigh,
double  pref,
const double *  coeffs 
)

Create a new SpeciesThermoInterpType object given a string.

Parameters
typeString name for the species thermo type
tlowThe lowest temperature at which the parameterization is valid
thighThe highest temperature at which the parameterization is valid
prefThe reference pressure for the parameterization
coeffsThe array of coefficients for the parameterization
Returns
the pointer to the newly allocated SpeciesThermoInterpType object

Definition at line 52 of file SpeciesThermoFactory.cpp.

◆ newSpeciesThermo()

unique_ptr< SpeciesThermoInterpType > newSpeciesThermo ( const AnyMap thermo_node)

Create a new SpeciesThermoInterpType object using the specified parameters.

Parameters
thermo_nodeAn AnyMap specifying the model type (for example, "NASA") and any model parameters necessary to instantiate the object

Definition at line 186 of file SpeciesThermoFactory.cpp.

◆ Frot()

double Cantera::Frot ( double  tr,
double  sqtr 
)

The Parker temperature correction to the rotational collision number.

Parameters
trReduced temperature \( \epsilon/kT \)
sqtrsquare root of tr.

Definition at line 27 of file MultiTransport.cpp.

◆ newTransportData()

unique_ptr< TransportData > newTransportData ( const AnyMap node)

Create a new TransportData object from an AnyMap specification.

Definition at line 179 of file TransportData.cpp.

◆ getValue()

const U& Cantera::getValue ( const map< T, U > &  m,
const T &  key,
const U &  default_val 
)

Const accessor for a value in a map.

Definition at line 190 of file utilities.h.

◆ ct_dtrcon()

doublereal Cantera::ct_dtrcon ( const char *  norm,
ctlapack::upperlower_t  uplot,
const char *  diag,
size_t  n,
doublereal *  a,
size_t  lda,
doublereal *  work,
int *  iwork,
int &  info 
)
inline
  • work must be dimensioned equal to greater than 3N
  • iwork must be dimensioned equal to or greater than N

Definition at line 407 of file ctlapack.h.

Variable Documentation

◆ dir_mutex

std::mutex dir_mutex
static

Mutex for input directory access.

Definition at line 33 of file application.cpp.

◆ app_mutex

std::mutex app_mutex
static

Mutex for creating singletons within the application object.

Definition at line 36 of file application.cpp.

◆ msg_mutex

std::mutex msg_mutex
static

Mutex for access to string messages.

Definition at line 85 of file application.cpp.

◆ stars

const char* stars
static
Initial value:
= ("*****************************************"
"**************************************\n")

Definition at line 17 of file ctexceptions.cpp.

◆ BasisOptimize_print_lvl

int BasisOptimize_print_lvl = 0

External int that is used to turn on debug printing for the BasisOptimize program.

Set this to 1 if you want debug printing from BasisOptimize.

Definition at line 15 of file BasisOptimize.cpp.

◆ vcs_timing_print_lvl

int vcs_timing_print_lvl = 1

Global hook for turning on and off time printing.

Default is to allow printing. But, you can assign this to zero globally to turn off all time printing. This is helpful for test suite purposes where you are interested in differences in text files.

Definition at line 42 of file vcs_solve.cpp.

◆ atomicWeightTable

static vector< atomicWeightData > atomicWeightTable
static

atomicWeightTable is a vector containing the atomic weights database.

atomicWeightTable is a static variable with scope limited to this file. It can only be referenced via the functions in this file.

The size of the table is given by the initial instantiation.

Definition at line 64 of file Elements.cpp.

◆ isotopeWeightTable

static vector< isotopeWeightData > isotopeWeightTable
static
Initial value:
{
{"D", "deuterium", 2.0141017781, 1},
{"Tr", "tritium", 3.0160492820, 1},
{"E", "electron", ElectronMass * Avogadro, 0},
}
const double Avogadro
Avogadro's Number [number/kmol].
Definition: ct_defs.h:81
const double ElectronMass
Electron Mass [kg].
Definition: ct_defs.h:111

isotopeWeightTable is a vector containing the atomic weights database.

isotopeWeightTable is a static variable with scope limited to this file. It can only be referenced via the functions in this file.

The size of the table is given by the initial instantiation.

Definition at line 194 of file Elements.cpp.

◆ T_c

const double T_c = 647.096

Critical Temperature value (kelvin)

Definition at line 21 of file WaterPropsIAPWS.cpp.

◆ P_c

const double P_c = 22.064E6
static

Critical Pressure (Pascals)

Definition at line 23 of file WaterPropsIAPWS.cpp.

◆ Rho_c

const double Rho_c = 322.

Value of the Density at the critical point (kg m-3)

Definition at line 25 of file WaterPropsIAPWS.cpp.

◆ Min_C_Internal

const double Min_C_Internal = 0.001
static

Constant to compare dimensionless heat capacities against zero.

Definition at line 476 of file MultiTransport.cpp.

◆ SmallNumber

const double SmallNumber = 1.e-300

smallest number to compare to zero.

Definition at line 158 of file ct_defs.h.

◆ BigNumber

const double BigNumber = 1.e300

largest number to compare to inf.

Definition at line 160 of file ct_defs.h.

◆ Undef

const double Undef = -999.1234

Fairly random number to be used to initialize variables against to see if they are subsequently defined.

Definition at line 164 of file ct_defs.h.

◆ Tiny

const double Tiny = 1.e-20

Small number to compare differences of mole fractions against.

This number is used for the interconversion of mole fraction and mass fraction quantities when the molecular weight of a species is zero. It's also used for the matrix inversion of transport properties when mole fractions must be positive.

Definition at line 173 of file ct_defs.h.

◆ npos

const size_t npos = static_cast<size_t>(-1)

index returned by functions to indicate "no position"

Definition at line 180 of file ct_defs.h.

◆ cEST_solvent

const int cEST_solvent = 0

Electrolyte species type.

Definition at line 18 of file electrolytes.h.

◆ PHSCALE_PITZER

const int PHSCALE_PITZER = 0

Scale to be used for the output of single-ion activity coefficients is that used by Pitzer.

This is the internal scale used within the code. One property is that the activity coefficients for the cation and anion of a single salt will be equal. This scale is the one presumed by the formulation of the single-ion activity coefficients described in this report.

Activity coefficients for species k may be altered between scales s1 to s2 using the following formula

\[ \ln(\gamma_k^{s2}) = \ln(\gamma_k^{s1}) + \frac{z_k}{z_j} \left( \ln(\gamma_j^{s2}) - \ln(\gamma_j^{s1}) \right) \]

where j is any one species.

Definition at line 44 of file MolalityVPSSTP.h.

◆ PHSCALE_NBS

const int PHSCALE_NBS = 1

Scale to be used for evaluation of single-ion activity coefficients is that used by the NBS standard for evaluation of the pH variable.

This is not the internal scale used within the code.

Activity coefficients for species k may be altered between scales s1 to s2 using the following formula

\[ \ln(\gamma_k^{s2}) = \ln(\gamma_k^{s1}) + \frac{z_k}{z_j} \left( \ln(\gamma_j^{s2}) - \ln(\gamma_j^{s1}) \right) \]

where j is any one species. For the NBS scale, j is equal to the Cl- species and

\[ \ln(\gamma_{Cl-}^{s2}) = \frac{-A_{\phi} \sqrt{I}}{1.0 + 1.5 \sqrt{I}} \]

This is the NBS pH scale, which is used in all conventional pH measurements. and is based on the Bates-Guggenheim equations.

Definition at line 69 of file MolalityVPSSTP.h.

◆ cAC_CONVENTION_MOLAR

const int cAC_CONVENTION_MOLAR = 0

Standard state uses the molar convention.

Definition at line 135 of file ThermoPhase.h.

◆ cAC_CONVENTION_MOLALITY

const int cAC_CONVENTION_MOLALITY = 1

Standard state uses the molality convention.

Definition at line 137 of file ThermoPhase.h.

◆ cSS_CONVENTION_TEMPERATURE

const int cSS_CONVENTION_TEMPERATURE = 0

Standard state uses the molar convention.

Definition at line 144 of file ThermoPhase.h.

◆ cSS_CONVENTION_VPSS

const int cSS_CONVENTION_VPSS = 1

Standard state uses the molality convention.

Definition at line 146 of file ThermoPhase.h.

◆ cSS_CONVENTION_SLAVE

const int cSS_CONVENTION_SLAVE = 2

Standard state thermodynamics is obtained from slave ThermoPhase objects.

Definition at line 148 of file ThermoPhase.h.