Cantera 2.6.0
Classes | Typedefs | Enumerations | Functions | Variables
Cantera Namespace Reference

Namespace for the Cantera kernel. More...

Classes

class  AnyBase
 Base class defining common data possessed by both AnyMap and AnyValue objects. More...
 
class  AnyMap
 A map of string keys to values whose type can vary at runtime. More...
 
class  AnyValue
 A wrapper for a variable whose type is determined at runtime. More...
 
class  Application
 Class to hold global data. More...
 
class  Array2D
 A class for 2D arrays stored in column-major (Fortran-compatible) form. More...
 
class  ArraySizeError
 Array size error. More...
 
class  Arrhenius1
 Sum of Arrhenius terms. More...
 
class  Arrhenius2
 Arrhenius reaction rate type depends only on temperature. More...
 
class  ArrheniusBase
 Base class for Arrhenius-type Parameterizations. More...
 
struct  ArrheniusData
 Data container holding shared data specific to ArrheniusRate. More...
 
class  ArrheniusRate
 Arrhenius reaction rate type depends only on temperature. More...
 
struct  atomicWeightData
 
class  BandMatrix
 A class for banded matrices, involving matrix inversion processes. More...
 
class  BinarySolutionTabulatedThermo
 Overloads the virtual methods of class IdealSolidSolnPhase to implement tabulated standard state thermodynamics for one species in a binary solution. 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  Boundary1D
 The base class for boundaries between one-dimensional spatial domains. More...
 
class  BulkKinetics
 Partial specialization of Kinetics for chemistry in a single bulk phase. 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...
 
struct  CachedValue
 
class  CanteraError
 Base class for exceptions thrown by Cantera classes. 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  ChebyshevReaction2
 A pressure-dependent reaction parameterized by a bi-variate Chebyshev polynomial in temperature and pressure. More...
 
class  ChemEquil
 Class ChemEquil implements a chemical equilibrium solver for single-phase solutions. More...
 
class  ChemicallyActivatedReaction2
 A reaction where the rate decreases as pressure increases due to collisional stabilization of a reaction intermediate. More...
 
class  clockWC
 The class provides the wall clock timer in seconds. More...
 
class  Composite1
 Composite function. More...
 
class  Const1
 The Const1 class implements a constant. More...
 
class  ConstCpPoly
 A constant-heat capacity species thermodynamic property manager class. More...
 
class  ConstPressureReactor
 Class ConstPressureReactor is a class for constant-pressure reactors. More...
 
class  Cos1
 implements the cos() function More...
 
struct  CoverageDependency
 Modifications to an InterfaceReaction2 rate based on a surface species coverage. More...
 
class  CustomFunc1Rate
 Custom reaction rate depending only on temperature. More...
 
class  CustomFunc1Reaction
 A reaction which follows mass-action kinetics with a custom reaction rate defined in Python. More...
 
class  CVodesIntegrator
 Wrapper class for 'cvodes' integrator from LLNL. More...
 
class  DAE_Solver
 Wrapper for DAE solvers. More...
 
class  DebyeHuckel
 Class DebyeHuckel represents a dilute liquid electrolyte phase which obeys the Debye Huckel formulation for nonideality. More...
 
class  Delegator
 Delegate member functions of a C++ class to externally-specified functions. More...
 
class  DenseMatrix
 A class for full (non-sparse) matrices with Fortran-compatible data storage, which adds matrix operations to class Array2D. More...
 
class  Diff1
 Difference of two functions. More...
 
class  Domain1D
 Base class for one-dimensional domains. More...
 
class  DustyGasTransport
 Class DustyGasTransport implements the Dusty Gas model for transport in porous media. More...
 
class  EdgeKinetics
 Heterogeneous reactions at one-dimensional interfaces between multiple adjacent two-dimensional surfaces. More...
 
class  EdgePhase
 A thermodynamic phase representing a one dimensional edge between two surfaces. More...
 
class  ElectrochemicalReaction2
 An interface reaction which involves charged species. More...
 
class  ElementaryReaction2
 A reaction which follows mass-action kinetics with a modified Arrhenius reaction rate. More...
 
class  Empty1D
 A terminator that does nothing. More...
 
class  EquilOpt
 Chemical equilibrium options. More...
 
class  Exp1
 implements the exponential function More...
 
class  Factory
 Factory class that supports registering functions to create objects. More...
 
class  FactoryBase
 Base class for factories. More...
 
struct  FalloffData
 Data container holding shared data specific to Falloff rates. More...
 
class  FalloffFactory
 Factory class to construct falloff function calculators. More...
 
class  FalloffMgr
 A falloff manager that implements any set of falloff functions. More...
 
class  FalloffRate
 Base class for falloff rate calculators. More...
 
class  FalloffReaction2
 A reaction that is first-order in [M] at low pressure, like a third-body reaction, but zeroth-order in [M] as pressure increases. More...
 
class  FalloffReaction3
 A falloff reaction that is first-order in [M] at low pressure, like a third-body reaction, but zeroth-order in [M] as pressure increases. 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. More...
 
class  Fourier1
 Fourier cosine/sine series. More...
 
class  Func1
 Base class for 'functor' classes that evaluate a function of one variable. More...
 
class  FuncEval
 Virtual base class for ODE right-hand-side function evaluators. More...
 
class  GasKinetics
 Kinetics manager for elementary gas-phase chemistry. More...
 
class  GasTransport
 Class GasTransport implements some functions and properties that are shared by the MixTransport and MultiTransport classes. More...
 
class  GasTransportData
 Transport data for a single gas-phase species which can be used in mixture-averaged or multicomponent transport models. More...
 
class  Gaussian
 A Gaussian. More...
 
class  GeneralMatrix
 Generic matrix. More...
 
class  GibbsExcessVPSSTP
 
class  Group
 Class Group is an internal class used by class ReactionPath. More...
 
class  HighPressureGasTransport
 Class MultiTransport implements transport properties for high pressure gas mixtures. More...
 
class  HMWSoln
 Class HMWSoln represents a dilute or concentrated liquid electrolyte phase which obeys the Pitzer formulation for nonideality. More...
 
class  IDA_Solver
 Wrapper for Sundials IDA solver. More...
 
class  IdealGasConstPressureReactor
 Class ConstPressureReactor is a class for constant-pressure reactors. More...
 
class  IdealGasPhase
 Class IdealGasPhase represents low-density gases that obey the ideal gas equation of state. More...
 
class  IdealGasReactor
 Class IdealGasReactor is a class for stirred reactors that is specifically optimized for ideal gases. 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  ImplicitSurfChem
 Advances the surface coverages of the associated set of SurfacePhase objects in time. More...
 
class  IndexError
 An array index is out of range. More...
 
class  Inlet1D
 An inlet. More...
 
class  InputFileError
 Error thrown for problems processing information contained in an AnyMap or AnyValue. More...
 
class  Integrator
 Abstract base class for ODE system integrators. More...
 
class  Interface
 A container class holding managers for all pieces defining an interface. More...
 
struct  InterfaceData
 Data container holding shared data for reaction rate specification with interfaces. More...
 
class  InterfaceKinetics
 A kinetics manager for heterogeneous reaction mechanisms. More...
 
class  InterfaceRate
 A class template for interface reaction rate specifications. More...
 
class  InterfaceRateBase
 Base class for rate parameterizations that involve interfaces. More...
 
class  InterfaceReaction2
 A reaction occurring on an interface (for example, a SurfPhase or an EdgePhase) More...
 
class  IonFlow
 This class models the ion transportation in a flame. More...
 
class  IonGasTransport
 Class IonGasTransport implements Stockmayer-(n,6,4) model for transport of ions. More...
 
class  IonsFromNeutralVPSSTP
 
struct  isotopeWeightData
 
class  Kinetics
 Public interface for kinetics managers. More...
 
class  KineticsFactory
 Factory for kinetics managers. 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  LindemannRate
 The Lindemann falloff parameterization. More...
 
class  Logger
 Base class for 'loggers' that write text messages to log files. More...
 
class  MargulesVPSSTP
 MargulesVPSSTP is a derived class of GibbsExcessVPSSTP that employs the Margules approximation for the excess Gibbs free energy. More...
 
class  MaskellSolidSolnPhase
 Class MaskellSolidSolnPhase represents a condensed phase non-ideal solution with 2 species following the thermodynamic model described in Maskell, Shaw, and Tye, Manganese Dioxide Electrode – IX, Electrochimica Acta 28(2) pp 231-235, 1983. More...
 
class  MassFlowController
 A class for mass flow controllers. More...
 
class  MetalPhase
 Class MetalPhase represents electrons in a metal. More...
 
class  MixTransport
 Class MixTransport implements mixture-averaged transport properties for ideal gas mixtures. 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  MMCollisionInt
 Calculation of Collision integrals. More...
 
class  MolalityVPSSTP
 
class  Mu0Poly
 The Mu0Poly class implements an interpolation of the Gibbs free energy based on a piecewise constant heat capacity approximation. 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  MultiPhase
 A class for multiphase mixtures. More...
 
class  MultiPhaseEquil
 
class  MultiRate
 A class template handling ReactionRate specializations. More...
 
class  MultiRateBase
 An abstract base class for evaluating all reactions of a particular type. More...
 
class  MultiSpeciesThermo
 A species thermodynamic property manager for a phase. More...
 
class  MultiTransport
 Class MultiTransport implements multicomponent transport properties for ideal gas mixtures. 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  NoExitLogger
 Logger that doesn't exit when an error is thrown. More...
 
class  NotImplementedError
 An error indicating that an unimplemented function has been called. More...
 
class  OneDim
 Container class for multiple-domain 1D problems. More...
 
class  Outlet1D
 An outlet. More...
 
class  OutletRes1D
 An outlet with specified composition. More...
 
class  PDSS
 Virtual base class for a species with a pressure dependent standard state. 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_IdealGas
 Derived class for pressure dependent standard states of an ideal gas species. More...
 
class  PDSS_IonsFromNeutral
 Derived class for pressure dependent standard states of an ideal gas species. 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_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  Periodic1
 Periodic function. 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...
 
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  PlogReaction2
 A pressure-dependent reaction parameterized by logarithmically interpolating between Arrhenius rate expressions at various pressures. More...
 
class  PlusConstant1
 A function plus a constant. More...
 
class  Poly1
 Polynomial of degree n. More...
 
class  Pow1
 implements the power function (pow) More...
 
class  PressureController
 A class for flow controllers where the flow rate is equal to the flow rate of a "master" mass flow controller plus a correction proportional to the pressure difference between the inlet and outlet. More...
 
class  Product1
 Product of two functions. 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  Rate1
 This rate coefficient manager supports one parameterization of the rate constant of any type. More...
 
class  Ratio1
 Ratio of two functions. More...
 
class  ReactingSurf1D
 A reacting surface. 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...
 
struct  ReactionData
 Data container holding shared data used for ReactionRate calculation. More...
 
class  ReactionFactory
 Factory class to construct reaction function calculators. 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  ReactionRateFactory
 Factory class to construct reaction rate calculators. More...
 
class  Reactor
 Class Reactor is a general-purpose 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  ReactorBase
 Base class for stirred reactors. 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  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  Refiner
 Refine Domain1D grids so that profiles satisfy adaptation tolerances. More...
 
class  Reservoir
 A source or sink whose state remains constant regardless of any flows or other interactions with other Reactor objects. More...
 
class  ResidData
 A simple class to hold an array of parameter values and a pointer to an instance of a subclass of ResidEval. More...
 
class  ResidEval
 Virtual base class for DAE residual function evaluators. More...
 
class  ResidJacEval
 Wrappers for the function evaluators for Nonlinear solvers and Time steppers. 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  Sim1D
 One-dimensional simulations. More...
 
class  Sin1
 implements the sin() function More...
 
class  SingleSpeciesTP
 The SingleSpeciesTP class is a filter class for ThermoPhase. More...
 
class  Solution
 A container class holding managers for all pieces defining a phase. More...
 
class  solveSP
 Method to solve a pseudo steady state surface problem. More...
 
class  Species
 Contains data about a single chemical species. More...
 
class  SpeciesNode
 Nodes in reaction path graphs. More...
 
class  SpeciesThermoInterpType
 Abstract Base class for the thermodynamic manager for an individual species' reference state. More...
 
class  SriRate
 The SRI falloff function. More...
 
class  StFlow
 This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemically-reacting, axisymmetric flows. More...
 
class  StickingCoverage
 Base class for rate parameterizations that implement sticking coefficients. More...
 
class  StickingRate
 A class template for interface sticking rate specifications. More...
 
class  StoichManagerN
 
class  StoichSubstance
 Class StoichSubstance represents a stoichiometric (fixed composition) incompressible substance. More...
 
class  Sum1
 Sum of two functions. More...
 
class  SundialsContext
 A wrapper for managing a SUNContext object, need for Sundials >= 6.0. More...
 
class  Surf1D
 A non-reacting surface. More...
 
class  SurfaceArrhenius
 An Arrhenius rate with coverage-dependent terms. More...
 
class  SurfPhase
 A simple thermodynamic model for a surface phase, assuming an ideal solution model. More...
 
class  Symm1D
 A symmetry plane. More...
 
class  Tabulated1
 The Tabulated1 class implements a tabulated function. More...
 
class  ThermoFactory
 Factory class for thermodynamic property managers. More...
 
class  ThermoPhase
 Base class for a phase with thermodynamic properties. More...
 
class  ThirdBody
 A class for managing third-body efficiencies, including default values. More...
 
class  ThirdBodyCalc
 Calculate and apply third-body effects on reaction rates, including non- unity third-body efficiencies. More...
 
class  ThirdBodyCalc3
 Calculate and apply third-body effects on reaction rates, including non- unity third-body efficiencies. More...
 
class  ThreeBodyReaction2
 A reaction with a non-reacting third body "M" that acts to add or remove energy from the reacting species. More...
 
class  ThreeBodyReaction3
 A reaction with a non-reacting third body "M" that acts to add or remove energy from the reacting species. More...
 
class  TimesConstant1
 Product of two functions. More...
 
class  Transport
 Base class for transport property managers. More...
 
class  TransportData
 Base class for transport data for a single species. More...
 
class  TransportFactory
 Factory class for creating new instances of classes derived from Transport. More...
 
class  TroeRate
 The 3- or 4-parameter Troe falloff parameterization. More...
 
class  TsangRate
 The 1- or 2-parameter Tsang falloff parameterization. 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  Unit
 Unit conversion utility. 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...
 
class  UnityLewisTransport
 Class UnityLewisTransport implements the unity Lewis number approximation for the mixture-averaged species diffusion coefficients. More...
 
class  UnknownKineticsModel
 
class  UnknownThermoPhaseModel
 Specific error to be thrown if the type of Thermo manager is unrecognized. More...
 
class  ValueCache
 
class  Valve
 Supply a mass flow rate that is a function of the pressure drop across the valve. 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
 
class  vcs_SpeciesProperties
 Properties of a single species. More...
 
class  vcs_VolPhase
 Phase information and Phase calculations for vcs. 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  Wall
 Represents a wall between between two ReactorBase objects. More...
 
class  WallBase
 Base class for 'walls' (walls, pistons, etc.) connecting reactors. More...
 
class  WallFactory
 Factory class to create WallBase objects. 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  WaterTransport
 Transport Parameters for pure water. More...
 
class  XML_Error
 Class representing a generic XML error condition. More...
 
class  XML_NoChild
 Class representing a specific type of XML file formatting error. More...
 
class  XML_Node
 Class XML_Node is a tree-based representation of the contents of an XML file. More...
 
class  XML_Reader
 Class XML_Reader reads an XML file into an XML_Node object. More...
 
class  XML_TagMismatch
 Class representing a specific type of XML file formatting error. More...
 
class  YamlWriter
 A class for generating full YAML input files from multiple data sources. More...
 

Typedefs

typedef std::map< std::string, double > compositionMap
 Map connecting a string name with a double. More...
 
typedef std::map< std::string, double > Composition
 Map from string names to doubles. More...
 
typedef std::vector< double > vector_fp
 Turn on the use of stl vectors for the basic array type within cantera Vector of doubles. More...
 
typedef std::vector< int > vector_int
 Vector of ints. More...
 
typedef std::vector< std::vector< size_t > > grouplist_t
 A grouplist is a vector of groups of species. More...
 
typedef CachedValue< double > & CachedScalar
 
typedef CachedValue< vector_fp > & 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 >
 
using InterfaceBlowersMaselRate = InterfaceRate< BlowersMaselRate, InterfaceData >
 
using StickingArrheniusRate = StickingRate< ArrheniusRate, InterfaceData >
 
using StickingBlowersMaselRate = StickingRate< BlowersMaselRate, InterfaceData >
 
typedef ElementaryReaction2 ElementaryReaction
 
typedef ThreeBodyReaction2 ThreeBodyReaction
 
typedef FalloffReaction2 FalloffReaction
 
typedef ChemicallyActivatedReaction2 ChemicallyActivatedReaction
 
typedef PlogReaction2 PlogReaction
 
typedef ChebyshevReaction2 ChebyshevReaction
 
typedef InterfaceReaction2 InterfaceReaction
 
typedef ElectrochemicalReaction2 ElectrochemicalReaction
 
typedef Arrhenius2 Arrhenius
 
typedef PlogRate Plog
 
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
 
typedef ThermoPhase thermo_t
 typedef for the ThermoPhase class More...
 
typedef int VelocityBasis
 The diffusion fluxes must be referenced to a particular reference fluid velocity. More...
 

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  ResidEval_Type_Enum {
  Base_ResidEval = 0 , JacBase_ResidEval , JacDelta_ResidEval , Base_ShowSolution ,
  Base_LaggedSolutionComponents
}
 Differentiates the type of residual evaluations according to functionality. More...
 
enum  IonSolnType_enumType { cIonSolnType_PASSTHROUGH = 2000 , cIonSolnType_SINGLEANION , cIonSolnType_SINGLECATION , cIonSolnType_MULTICATIONANION }
 enums for molten salt ion solution types More...
 
enum class  ThermoBasis { mass , molar }
 Differentiate between mole fractions and mass fractions for input mixture composition. More...
 
enum class  SensParameterType { reaction , enthalpy }
 

Functions

AnyMap::Iterator begin (const AnyValue &v)
 
AnyMap::Iterator end (const AnyValue &v)
 
void warn_deprecated (const std::string &source, const AnyBase &node, const std::string &message)
 A deprecation warning for syntax in an input file. More...
 
std::string demangle (const std::type_info &type)
 Convert a type name to a human readable string, using boost::core::demangle if available. 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 addFloat (XML_Node &node, const std::string &titleString, const doublereal value, const std::string &unitsString="", const std::string &typeString="", const doublereal minval=Undef, const doublereal maxval=Undef)
 This function adds a child node with the name, "float", with a value consisting of a single floating point number. More...
 
void addFloatArray (XML_Node &node, const std::string &titleString, const size_t n, const doublereal *const values, const std::string &unitsString="", const std::string &typeString="", const doublereal minval=Undef, const doublereal maxval=Undef)
 This function adds a child node with the name, "floatArray", with a value consisting of a comma separated list of floats. More...
 
void addNamedFloatArray (XML_Node &parentNode, const std::string &name, const size_t n, const doublereal *const vals, const std::string units="", const std::string type="", const doublereal minval=Undef, const doublereal maxval=Undef)
 This function adds a child node with the name given by the first parameter with a value consisting of a comma separated list of floats. More...
 
void addString (XML_Node &node, const std::string &titleString, const std::string &valueString, const std::string &typeString="")
 This function adds a child node with the name string with a string value to the current node. More...
 
size_t getFloatArray (const XML_Node &node, vector_fp &v, const bool convert=true, const std::string &unitsString="", const std::string &nodeName="floatArray")
 This function reads the current node or a child node of the current node with the default name, "floatArray", with a value field consisting of a comma separated list of floats. More...
 
void getStringArray (const XML_Node &node, std::vector< std::string > &v)
 This function interprets the value portion of an XML element as a string. More...
 
void getMap (const XML_Node &node, std::map< std::string, std::string > &m)
 This routine is used to interpret the value portions of XML elements that contain colon separated pairs. More...
 
int getPairs (const XML_Node &node, std::vector< std::string > &key, std::vector< std::string > &val)
 This function interprets the value portion of an XML element as a series of "Pairs" separated by white space. More...
 
void getMatrixValues (const XML_Node &node, const std::vector< std::string > &keyStringRow, const std::vector< std::string > &keyStringCol, Array2D &returnValues, const bool convert=true, const bool matrixSymmetric=false)
 This function interprets the value portion of an XML element as a series of "Matrix ids and entries" separated by white space. More...
 
void getIntegers (const XML_Node &node, std::map< std::string, int > &v)
 Get a vector of integer values from a child element. More...
 
doublereal getFloat (const XML_Node &parent, const std::string &name, const std::string &type="")
 Get a floating-point value from a child element. More...
 
doublereal getFloatCurrent (const XML_Node &currXML, const std::string &type="")
 Get a floating-point value from the current XML element. More...
 
bool getOptionalFloat (const XML_Node &parent, const std::string &name, doublereal &fltRtn, const std::string &type="")
 Get an optional floating-point value from a child element. More...
 
int getInteger (const XML_Node &parent, const std::string &name)
 Get an integer value from a child element. More...
 
bool getOptionalModel (const XML_Node &parent, const std::string &nodeName, std::string &modelName)
 Get an optional model name from a named child node. More...
 
XML_NodegetByTitle (const XML_Node &node, const std::string &title)
 Search the child nodes of the current node for an XML Node with a Title attribute of a given name. More...
 
void getString (const XML_Node &node, const std::string &titleString, std::string &valueString, std::string &typeString)
 This function reads a child node with the name string with a specific title attribute named titleString. More...
 
std::string getChildValue (const XML_Node &parent, const std::string &nameString)
 This function reads a child node with the name, nameString, and returns its XML value as the return string. More...
 
void ct2ctml (const char *file, const int debug=0)
 Convert a cti file into a ctml file. More...
 
std::string ct2ctml_string (const std::string &file)
 Get a string with the ctml representation of a cti file. More...
 
std::string ct_string2ctml_string (const std::string &cti)
 Get a string with the ctml representation of a cti input string. More...
 
void ck2cti (const std::string &in_file, const std::string &thermo_file="", const std::string &transport_file="", const std::string &id_tag="gas")
 Convert a Chemkin-format mechanism into a CTI file. More...
 
std::string findInputFile (const std::string &name)
 Find an input file. More...
 
void addDirectory (const std::string &dir)
 Add a directory to the data file search path. More...
 
std::string getDataDirectories (const std::string &sep)
 Get the Cantera data directories. 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...
 
std::string gitCommit ()
 Returns the hash of the git commit from which Cantera was compiled, if known. More...
 
std::string canteraRoot ()
 Returns root directory where Cantera is installed. More...
 
bool debugModeEnabled ()
 Returns true if Cantera was compiled in debug mode. More...
 
void writelog_direct (const std::string &msg)
 Write a message to the screen. More...
 
void debuglog (const std::string &msg, int loglevel)
 Write a message to the log only if loglevel > 0. More...
 
template<typename... Args>
void writelog (const std::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...
 
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=true, bool endl_before=false)
 
void _warn_deprecated (const std::string &method, const std::string &extra="")
 helper function passing deprecation warning to global handler More...
 
template<typename... Args>
void warn_deprecated (const std::string &method, const std::string &msg, const Args &... args)
 Print a deprecation warning raised from method. More...
 
void suppress_deprecation_warnings ()
 Globally disable printing of deprecation warnings. More...
 
void _warn (const std::string &warning, const std::string &method, const std::string &extra)
 helper function passing generic warning to global handler More...
 
template<typename... Args>
void warn (const std::string &warning, const std::string &method, const std::string &msg, const Args &... args)
 Print a generic warning raised from method. More...
 
template<typename... Args>
void warn_user (const std::string &method, const std::string &msg, const Args &... args)
 Print a user warning raised from method as CanteraWarning. More...
 
void make_deprecation_warnings_fatal ()
 Turns deprecation warnings into exceptions. 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...
 
void suppress_warnings ()
 Globally disable printing of (user) warnings. More...
 
bool warnings_suppressed ()
 Returns true if warnings should be suppressed. More...
 
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 should be used. More...
 
void setLogger (Logger *logwriter)
 Install a logger. More...
 
doublereal toSI (const std::string &unit)
 Return the conversion factor to convert unit std::string 'unit' to SI units. More...
 
doublereal actEnergyToSI (const std::string &unit)
 Return the conversion factor to convert activation energy unit std::string 'unit' to Kelvin. More...
 
XML_Nodeget_XML_File (const std::string &file, int debug=0)
 Return a pointer to the XML tree for a Cantera input file. More...
 
XML_Nodeget_XML_from_string (const std::string &text)
 Read a CTI or CTML string and fill up an XML tree. More...
 
void close_XML_File (const std::string &file)
 Close an XML File. More...
 
XML_Nodeget_XML_Node (const std::string &file_ID, XML_Node *root)
 This routine will locate an XML node in either the input XML tree or in another input file specified by the file part of the file_ID string. More...
 
XML_Nodeget_XML_NameID (const std::string &nameTarget, const std::string &file_ID, XML_Node *root)
 This routine will locate an XML node in either the input XML tree or in another input file specified by the file part of the file_ID string. 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. Returns -1 if x < 0, 1 if x > 0 and 0 if x == 0. More...
 
shared_ptr< InterfacenewInterface (const std::string &infile, const std::string &name="", const std::vector< std::string > &adjacent={})
 Create and initialize a new Interface from an input file. More...
 
shared_ptr< InterfacenewInterface (const std::string &infile, const std::string &name, const std::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 std::vector< shared_ptr< Solution > > &adjacent={})
 Create and initialize a new Interface from AnyMap objects. More...
 
void writePlotFile (const std::string &fname, const std::string &fmt, const std::string &plotTitle, const std::vector< std::string > &names, const Array2D &data)
 Write a Plotting file. More...
 
void outputTEC (std::ostream &s, const std::string &title, const std::vector< std::string > &names, const Array2D &data)
 Write a Tecplot data file. More...
 
void outputExcel (std::ostream &s, const std::string &title, const std::vector< std::string > &names, const Array2D &data)
 Write an Excel spreadsheet in 'csv' form. More...
 
shared_ptr< SolutionnewSolution (const std::string &infile, const std::string &name, const std::string &transport, const std::vector< std::string > &adjacent)
 Create and initialize a new Solution from an input file. More...
 
shared_ptr< SolutionnewSolution (const std::string &infile, const std::string &name="", const std::string &transport="", const std::vector< shared_ptr< Solution > > &adjacent={})
 Create and initialize a new Solution manager from an input file. More...
 
shared_ptr< SolutionnewSolution (const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap(), const std::string &transport="", const std::vector< shared_ptr< Solution > > &adjacent={}, const std::map< std::string, shared_ptr< Solution > > &related={})
 Create and initialize a new Solution manager from AnyMap objects. More...
 
std::string vec2str (const vector_fp &v, const std::string &fmt="%g", const std::string &sep=", ")
 Convert a vector to a string (separated by commas) More...
 
std::string stripnonprint (const std::string &s)
 Strip non-printing characters wherever they are. More...
 
compositionMap parseCompString (const std::string &ss, const std::vector< std::string > &names=std::vector< std::string >())
 Parse a composition string into a map consisting of individual key:composition pairs. More...
 
int intValue (const std::string &val)
 Translate a string into one integer value. More...
 
doublereal fpValue (const std::string &val)
 Translate a string into one doublereal value. More...
 
doublereal fpValueCheck (const std::string &val)
 Translate a string into one doublereal value, with error checking. More...
 
std::string parseSpeciesName (const std::string &nameStr, std::string &phaseName)
 Parse a name string, separating out the phase name from the species name. More...
 
doublereal strSItoDbl (const std::string &strSI)
 Interpret one or two token string as a single double. More...
 
void tokenizeString (const std::string &oval, std::vector< std::string > &v)
 This function separates a string up into tokens according to the location of white space. More...
 
size_t copyString (const std::string &source, char *dest, size_t length)
 Copy the contents of a std::string into a char array of a given length. More...
 
std::string trimCopy (const std::string &input)
 Trim. More...
 
std::string toLowerCopy (const std::string &input)
 Convert to lower case. More...
 
bool caseInsensitiveEquals (const std::string &input, const std::string &test)
 Case insensitive equality predicate. More...
 
template<class V >
doublereal dot4 (const V &x, const V &y)
 Templated Inner product of two vectors of length 4. More...
 
template<class V >
doublereal dot5 (const V &x, const V &y)
 Templated Inner product of two vectors of length 5. More...
 
template<class InputIter , class InputIter2 >
doublereal 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...
 
void checkFinite (const double tmp)
 Check to see that a number is finite (not NaN, +Inf or -Inf) More...
 
void checkFinite (const std::string &name, double *values, size_t N)
 Check to see that all elements in an array are finite. More...
 
template<class T , class U >
const U & getValue (const std::map< T, U > &m, const T &key, const U &default_val)
 Const accessor for a value in a std::map. More...
 
XML_NodefindXMLPhase (XML_Node *root, const std::string &phaseId)
 Search an XML_Node tree for a named phase XML_Node. 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...
 
size_t BasisOptimize (int *usedZeroedSpecies, bool doFormRxn, MultiPhase *mphase, std::vector< size_t > &orderVectorSpecies, std::vector< size_t > &orderVectorElements, vector_fp &formRxnMatrix)
 Choose the optimum basis of species for the equilibrium calculations. More...
 
void ElemRearrange (size_t nComponents, const vector_fp &elementAbundances, MultiPhase *mphase, std::vector< size_t > &orderVectorSpecies, std::vector< size_t > &orderVectorElements)
 Handles the potential rearrangement of the constraint equations represented by the Formula Matrix. More...
 
double vcs_l2norm (const vector_fp &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...
 
shared_ptr< FalloffnewFalloff (const std::string &type, const vector_fp &c)
 Return a pointer to a new falloff function calculator. More...
 
bool installReactionArrays (const XML_Node &p, Kinetics &kin, std::string default_phase, bool check_for_duplicates=false)
 Install information about reactions into the kinetics object, kin. More...
 
bool importKinetics (const XML_Node &phase, std::vector< ThermoPhase * > th, Kinetics *kin)
 Import a reaction mechanism for a phase or an interface. More...
 
bool buildSolutionFromXML (XML_Node &root, const std::string &id, const std::string &nm, ThermoPhase *th, Kinetics *kin)
 Build a single-phase ThermoPhase object with associated kinetics mechanism. More...
 
bool checkElectrochemReaction (const XML_Node &p, Kinetics &kin, const XML_Node &r)
 Check to ensure that all electrochemical reactions are specified correctly. More...
 
KineticsnewKineticsMgr (XML_Node &phase, std::vector< ThermoPhase * > th)
 Create a new kinetics manager. More...
 
KineticsnewKineticsMgr (const std::string &model)
 Create a new kinetics manager. More...
 
shared_ptr< KineticsnewKinetics (const std::string &model)
 Create a new Kinetics instance. More...
 
unique_ptr< KineticsnewKinetics (const std::vector< ThermoPhase * > &phases, const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap())
 
unique_ptr< KineticsnewKinetics (const std::vector< ThermoPhase * > &phases, const std::string &filename, const std::string &phase_name)
 
void addReactions (Kinetics &kin, const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap())
 
unique_ptr< ReactionnewReaction (const std::string &type)
 Create a new empty Reaction object. More...
 
unique_ptr< ReactionnewReaction (const XML_Node &rxn_node)
 Create a new Reaction object for the reaction defined in rxn_node More...
 
unique_ptr< ReactionnewReaction (const AnyMap &rxn_node, const Kinetics &kin)
 Create a new Reaction object using the specified parameters. More...
 
std::vector< shared_ptr< Reaction > > getReactions (const XML_Node &node)
 Create Reaction objects for all <reaction> nodes in an XML document. More...
 
std::vector< shared_ptr< Reaction > > getReactions (const AnyValue &items, Kinetics &kinetics)
 Create Reaction objects for each item (an AnyMap) in items. More...
 
void parseReactionEquation (Reaction &R, const std::string &equation, const AnyBase &reactionNode, const Kinetics *kin)
 Parse reaction equation. More...
 
void setupReaction (Reaction &R, const XML_Node &rxn_node)
 
void setupElementaryReaction (ElementaryReaction2 &, const XML_Node &)
 
void setupElementaryReaction (ElementaryReaction2 &, const AnyMap &, const Kinetics &)
 
void setupThreeBodyReaction (ThreeBodyReaction2 &, const XML_Node &)
 
void setupThreeBodyReaction (ThreeBodyReaction2 &, const AnyMap &, const Kinetics &)
 
void setupFalloffReaction (FalloffReaction2 &, const XML_Node &)
 
void setupFalloffReaction (FalloffReaction2 &, const AnyMap &, const Kinetics &)
 
void setupChemicallyActivatedReaction (ChemicallyActivatedReaction2 &, const XML_Node &)
 
void setupPlogReaction (PlogReaction2 &, const XML_Node &)
 
void setupPlogReaction (PlogReaction2 &, const AnyMap &, const Kinetics &)
 
void setupChebyshevReaction (ChebyshevReaction2 &, const XML_Node &)
 
void setupChebyshevReaction (ChebyshevReaction2 &, const AnyMap &, const Kinetics &)
 
void setupInterfaceReaction (InterfaceReaction2 &, const XML_Node &)
 
void setupInterfaceReaction (InterfaceReaction2 &, const AnyMap &, const Kinetics &)
 
void setupElectrochemicalReaction (ElectrochemicalReaction2 &, const XML_Node &)
 
void setupElectrochemicalReaction (ElectrochemicalReaction2 &, const AnyMap &, const Kinetics &)
 
shared_ptr< ReactionRatenewReactionRate (const std::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...
 
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)
 
std::ostream & operator<< (std::ostream &s, const BandMatrix &m)
 Utility routine to print out the matrix. More...
 
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)
 
DAE_SolvernewDAE_Solver (const std::string &itype, ResidJacEval &f)
 Factor method for choosing a DAE solver. More...
 
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...
 
Func1newSumFunction (Func1 &f1, Func1 &f2)
 
Func1newDiffFunction (Func1 &f1, Func1 &f2)
 
Func1newProdFunction (Func1 &f1, Func1 &f2)
 
Func1newRatioFunction (Func1 &f1, Func1 &f2)
 
Func1newCompositeFunction (Func1 &f1, Func1 &f2)
 
Func1newTimesConstFunction (Func1 &f1, doublereal c)
 
Func1newPlusConstFunction (Func1 &f1, doublereal c)
 
doublereal linearInterp (doublereal x, const vector_fp &xpts, const vector_fp &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 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 std::string &method, const Eigen::ArrayXd &f, const Eigen::ArrayXd &x)
 Numerical integration of a function. More...
 
IntegratornewIntegrator (const std::string &itype)
 
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...
 
double getElementWeight (const std::string &ename)
 Get the atomic weight of an element. More...
 
double getElementWeight (int atomicNumber)
 Get the atomic weight of an element. More...
 
std::string getElementSymbol (const std::string &ename)
 Get the symbol for an element. More...
 
std::string getElementSymbol (int atomicNumber)
 Get the symbol for an element. More...
 
std::string getElementName (const std::string &ename)
 Get the name of an element. More...
 
std::string getElementName (int atomicNumber)
 Get the name of an element. More...
 
int getAtomicNumber (const std::string &ename)
 Get the atomic number for an element. More...
 
int numElementsDefined ()
 Get the number of named elements defined in Cantera. More...
 
int numIsotopesDefined ()
 Get the number of named isotopes defined in Cantera. More...
 
Mu0PolynewMu0ThermoFromXML (const XML_Node &Mu0Node)
 Install a Mu0 polynomial thermodynamic reference state. More...
 
PDSSnewPDSS (const std::string &model)
 
shared_ptr< SpeciesnewSpecies (const XML_Node &species_node)
 Create a new Species object from a 'species' XML_Node. More...
 
unique_ptr< SpeciesnewSpecies (const AnyMap &node)
 Create a new Species object from an AnyMap specification. More...
 
std::vector< shared_ptr< Species > > getSpecies (const XML_Node &node)
 Generate Species objects for all <species> nodes in an XML document. More...
 
std::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 std::string &type, double tlow, double thigh, double pref, const double *coeffs)
 Create a new SpeciesThermoInterpType object given a string. More...
 
SpeciesThermoInterpTypenewSpeciesThermoInterpType (const XML_Node &thermoNode)
 Create a new SpeciesThermoInterpType object from XML_Node. More...
 
unique_ptr< SpeciesThermoInterpTypenewSpeciesThermo (const AnyMap &thermo_node)
 Create a new SpeciesThermoInterpType object using the specified parameters. More...
 
ThermoPhasenewThermoPhase (const std::string &model)
 Create a new thermodynamic property manager. More...
 
shared_ptr< ThermoPhasenewThermo (const std::string &model)
 Create a new ThermoPhase instance. More...
 
ThermoPhasenewPhase (XML_Node &phase)
 Create a new ThermoPhase object and initializes it according to the XML tree. More...
 
unique_ptr< ThermoPhasenewPhase (const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap())
 Create a new ThermoPhase object and initialize it. More...
 
ThermoPhasenewPhase (const std::string &infile, std::string id="")
 Create and Initialize a ThermoPhase object from an input file. More...
 
void importPhase (XML_Node &phase, ThermoPhase *th)
 Import a phase information into an empty ThermoPhase object. More...
 
void setupPhase (ThermoPhase &phase, const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap())
 Initialize a ThermoPhase object. More...
 
void installElements (Phase &th, const XML_Node &phaseNode)
 Add the elements given in an XML_Node tree to the specified phase. More...
 
const XML_NodespeciesXML_Node (const std::string &kname, const XML_Node *phaseSpeciesData)
 Search an XML tree for species data. More...
 
shared_ptr< TransportDatanewTransportData (const XML_Node &transport_node)
 Create a new TransportData object from a 'transport' XML_Node. More...
 
unique_ptr< TransportDatanewTransportData (const AnyMap &node)
 Create a new TransportData object from an AnyMap specification. More...
 
TransportnewTransportMgr (const std::string &model="", ThermoPhase *thermo=0, int log_level=0)
 Build a new transport manager using a transport manager that may not be the same as in the phase description and return a base class pointer to it. More...
 
shared_ptr< TransportnewTransport (ThermoPhase *thermo, const std::string &model="default")
 Create a new Transport instance. More...
 
TransportnewDefaultTransportMgr (ThermoPhase *thermo, int loglevel=0)
 Create a new transport manager instance. More...
 
FlowDevicenewFlowDevice (const std::string &model)
 Create a FlowDevice object of the specified type. More...
 
ReactorBasenewReactor (const std::string &model)
 Create a Reactor object of the specified type. More...
 
WallBasenewWall (const std::string &model)
 Create a WallBase object of the specified type. More...
 
bool operator== (const std::string &lhs, const AnyValue &rhs)
 
bool operator!= (const std::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)
 
int get_modified_time (const std::string &path)
 
static string pypath ()
 return the full path to the Python interpreter. More...
 
static std::string call_ctml_writer (const std::string &text, bool isfile)
 
static Applicationapp ()
 Return a pointer to the application object. More...
 
static void split_at_pound (const std::string &src, std::string &file, std::string &id)
 split a string at a '#' sign. Used to separate a file name from an id string. More...
 
static std::pair< double, std::string > split_unit (const AnyValue &v)
 
static string::size_type findUnbackslashed (const std::string &s, const char q, std::string::size_type istart=0)
 Find the first position of a character, q, in string, s, which is not immediately preceded by the backslash character. 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)
 
void updateUndeclared (std::vector< std::string > &undeclared, const Composition &comp, const Kinetics &kin)
 
bool isThreeBody (const Reaction &R)
 
Arrhenius2 readArrhenius (const XML_Node &arrhenius_node)
 
Arrhenius2 readArrhenius (const Reaction &R, const AnyValue &rate, const Kinetics &kin, const UnitSystem &units, int pressure_dependence=0)
 
void readFalloff (FalloffReaction2 &R, const XML_Node &rc_node)
 Parse falloff parameters, given a rateCoeff node. More...
 
void readFalloff (FalloffReaction2 &R, const AnyMap &node)
 
void readEfficiencies (ThirdBody &tbody, const XML_Node &rc_node)
 
void readEfficiencies (ThirdBody &tbody, const AnyMap &node)
 
bool detectEfficiencies (ThreeBodyReaction2 &R)
 
void setupReaction (Reaction &R, const AnyMap &node, const Kinetics &kin)
 
string reactionLabel (size_t i, size_t kr, size_t nr, const std::vector< size_t > &slist, const Kinetics &s)
 
static doublereal calc_damping (doublereal *x, doublereal *dx, size_t dim, int *)
 
static doublereal calcWeightedNorm (const doublereal[], const doublereal dx[], size_t)
 
static doublereal calc_damping (doublereal x[], doublereal dxneg[], size_t dim, int *label)
 
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 bool isConstant (Func1 &f)
 
static bool isZero (Func1 &f)
 
static bool isOne (Func1 &f)
 
static bool isTimesConst (Func1 &f)
 
static bool isExp (Func1 &f)
 
static bool isPow (Func1 &f)
 
double basicSimpson (const Eigen::ArrayXd &f, const Eigen::ArrayXd &x)
 Numerical integration of a function using Simpson's rule. More...
 
static int interp_est (const std::string &estString)
 Utility function to assign an integer value from a string for the ElectrolyteSpeciesType field. More...
 
static void check_nParams (const std::string &method, size_t nParams, size_t m_formPitzerTemp)
 
vector_fp getSizedVector (const AnyMap &item, const std::string &key, size_t nCoeffs)
 
void assignTrimmed (AnyMap &interaction, const std::string &key, vector_fp &values)
 
static double factorOverlap (const std::vector< std::string > &elnamesVN, const vector_fp &elemVectorN, const size_t nElementsN, const std::vector< std::string > &elnamesVI, const vector_fp &elemVectorI, const size_t nElementsI)
 Return the factor overlap. More...
 
doublereal xlogx (doublereal x)
 
static SpeciesThermoInterpTypenewNasaThermoFromXML (vector< XML_Node * > nodes)
 Create a NASA polynomial thermodynamic property parameterization for a species from a set ! of XML nodes. More...
 
void setupSpeciesThermo (SpeciesThermoInterpType &thermo, const AnyMap &node)
 
void setupNasaPoly (NasaPoly2 &thermo, const AnyMap &node)
 
static SpeciesThermoInterpTypenewShomateThermoFromXML (vector< XML_Node * > &nodes)
 Create a Shomate polynomial thermodynamic property parameterization for a species. More...
 
void setupShomatePoly (ShomatePoly2 &thermo, const AnyMap &node)
 
static SpeciesThermoInterpTypenewConstCpThermoFromXML (XML_Node &f)
 Create a "simple" constant heat capacity thermodynamic property parameterization for a ! species. More...
 
void setupConstCp (ConstCpPoly &thermo, const AnyMap &node)
 
static SpeciesThermoInterpTypenewNasa9ThermoFromXML (const std::vector< XML_Node * > &tp)
 Create a NASA9 polynomial thermodynamic property parameterization for a species. More...
 
void setupNasa9Poly (Nasa9PolyMultiTempRegion &thermo, const AnyMap &node)
 
void setupMu0 (Mu0Poly &thermo, const AnyMap &node)
 
static void formSpeciesXMLNodeList (std::vector< XML_Node * > &spDataNodeList, std::vector< std::string > &spNamesList, vector_int &spRuleList, const std::vector< XML_Node * > spArray_names, const std::vector< XML_Node * > spArray_dbases, const vector_int sprule)
 Gather a vector of pointers to XML_Nodes for a phase. 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)
 
doublereal quadInterp (doublereal x0, doublereal *x, doublereal *y)
 
doublereal Frot (doublereal tr, doublereal sqtr)
 The Parker temperature correction to the rotational collision number. More...
 
void setupGasTransportData (GasTransportData &tr, const XML_Node &tr_node)
 
void setupGasTransportData (GasTransportData &tr, const AnyMap &node)
 

Variables

const double Pi = 3.14159265358979323846
 Pi. More...
 
const double Sqrt2 = 1.41421356237309504880
 Sqrt(2) 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 MaxExp = 690.775527898
 largest x such that exp(x) is valid 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...
 
int BasisOptimize_print_lvl = 0
 External int that is used to turn on debug printing for the BasisOptimize program. More...
 
int vcs_timing_print_lvl = 1
 Global hook for turning on and off time printing. More...
 
const int INVALID_RXN = 0
 
const int NONE = 0
 
const int cDirect = 0
 
const int cKrylov = 1
 
const int FourierFuncType = 1
 
const int PolyFuncType = 2
 
const int ArrheniusFuncType = 3
 
const int GaussianFuncType = 4
 
const int SumFuncType = 20
 
const int DiffFuncType = 25
 
const int ProdFuncType = 30
 
const int RatioFuncType = 40
 
const int PeriodicFuncType = 50
 
const int CompositeFuncType = 60
 
const int TimesConstantFuncType = 70
 
const int PlusConstantFuncType = 80
 
const int SinFuncType = 100
 
const int CosFuncType = 102
 
const int ExpFuncType = 104
 
const int PowFuncType = 106
 
const int ConstFuncType = 110
 
const int TabulatedFuncType = 120
 
const int DIAG = 1
 
const int DENSE = 2
 
const int NOJAC = 4
 
const int JAC = 8
 
const int GMRES = 16
 
const int BAND = 32
 
const int c_NONE = 0
 
const int c_GE_ZERO = 1
 
const int c_GT_ZERO = 2
 
const int c_LE_ZERO = -1
 
const int c_LT_ZERO = -2
 
const int LeftInlet = 1
 
const int RightInlet = -1
 
const int cFlowType = 50
 
const int cFreeFlow = 51
 
const int cAxisymmetricStagnationFlow = 52
 
const int cConnectorType = 100
 
const int cSurfType = 102
 
const int cInletType = 104
 
const int cSymmType = 105
 
const int cOutletType = 106
 
const int cEmptyType = 107
 
const int cOutletResType = 108
 
const int cPorousType = 109
 
const size_t c_offset_U = 0
 
const size_t c_offset_V = 1
 
const size_t c_offset_T = 2
 
const size_t c_offset_L = 3
 
const size_t c_offset_E = 4
 
const size_t c_offset_Y = 5
 
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...
 
const VelocityBasis VB_MASSAVG = -1
 
const VelocityBasis VB_MOLEAVG = -2
 Diffusion velocities are based on the mole averaged velocities. More...
 
const VelocityBasis VB_SPECIES_0 = 0
 Diffusion velocities are based on the relative motion wrt species 0. More...
 
const VelocityBasis VB_SPECIES_1 = 1
 Diffusion velocities are based on the relative motion wrt species 1. More...
 
const VelocityBasis VB_SPECIES_2 = 2
 Diffusion velocities are based on the relative motion wrt species 2. More...
 
const VelocityBasis VB_SPECIES_3 = 3
 Diffusion velocities are based on the relative motion wrt species 3. More...
 
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 xml_mutex
 Mutex for controlling access to XML file storage. More...
 
static std::mutex msg_mutex
 Mutex for access to string messages. More...
 
static const char * stars
 
std::string FP_Format = "%23.15E"
 
static const double USEDBEFORE = -1
 
const doublereal DampFactor = sqrt(2.0)
 
const size_t NDAMP = 7
 
static struct atomicWeightData atomicWeightTable []
 atomicWeightTable is a vector containing the atomic weights database. More...
 
static struct isotopeWeightData isotopeWeightTable []
 isotopeWeightTable is a vector containing the atomic weights database. More...
 
const doublereal T_c = 647.096
 Critical Temperature value (kelvin) More...
 
static const doublereal P_c = 22.064E6
 Critical Pressure (Pascals) More...
 
const doublereal Rho_c = 322.
 Value of the Density at the critical point (kg m-3) More...
 
static const doublereal M_water = 18.015268
 Molecular Weight of water that is consistent with the paper (kg kmol-1) More...
 
static const doublereal Rgas = 8.314371E3
 Gas constant that is quoted in the paper. More...
 
const int DeltaDegree = 6
 
static const doublereal Min_C_Internal = 0.001
 Constant to compare dimensionless heat capacities against zero. More...
 
Defined Constants

These constants are defined by CODATA to have a particular value. https://physics.nist.gov/cuu/Constants/index.html

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 Planck_bar = Planck / (2 * Pi)
 Reduced Planck constant \( \hbar \) [m2-kg/s]. More...
 
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 logBoltz_Planck = std::log(Boltzmann / Planck)
 log(k_b/h) 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
 
Reaction Types
const int ELEMENTARY_RXN = 1
 A reaction with a rate coefficient that depends only on temperature and voltage that also obeys mass-action kinetics. More...
 
const int THREE_BODY_RXN = 2
 A gas-phase reaction that requires a third-body collision partner. More...
 
const int FALLOFF_RXN = 4
 The general form for a gas-phase association or dissociation reaction, with a pressure-dependent rate. More...
 
const int PLOG_RXN = 5
 A pressure-dependent rate expression consisting of several Arrhenius rate expressions evaluated at different pressures. More...
 
const int CHEBYSHEV_RXN = 6
 A general gas-phase pressure-dependent reaction where k(T,P) is defined in terms of a bivariate Chebyshev polynomial. More...
 
const int CHEMACT_RXN = 8
 A chemical activation reaction. More...
 
const int SURFACE_RXN = 20
 A reaction occurring on a surface. More...
 
const int INTERFACE_RXN = 20
 A reaction occurring on an interface, e.g a surface or edge. More...
 
CONSTANTS - Specification of the Molality convention
const int cAC_CONVENTION_MOLAR = 0
 
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
 
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...
 

Detailed Description

Namespace for the Cantera kernel.

Namespace for classes implementing zero-dimensional reactor networks.

Typedef Documentation

◆ compositionMap

typedef std::map<std::string, double> compositionMap

Map connecting a string name with a double.

This is used mostly to assign concentrations and mole fractions to species.

Definition at line 176 of file ct_defs.h.

◆ Composition

typedef std::map<std::string, double> Composition

Map from string names to doubles.

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

Definition at line 180 of file ct_defs.h.

◆ vector_fp

typedef std::vector<double> vector_fp

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

Definition at line 184 of file ct_defs.h.

◆ vector_int

typedef std::vector<int> vector_int

Vector of ints.

Definition at line 186 of file ct_defs.h.

◆ grouplist_t

typedef std::vector<std::vector<size_t> > grouplist_t

A grouplist is a vector of groups of species.

Definition at line 189 of file ct_defs.h.

◆ CachedScalar

typedef CachedValue<double>& CachedScalar

Definition at line 121 of file ValueCache.h.

◆ CachedArray

Definition at line 122 of file ValueCache.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.

◆ Falloff

Definition at line 621 of file Falloff.h.

◆ Lindemann

Definition at line 622 of file Falloff.h.

◆ Troe

typedef TroeRate Troe

Definition at line 623 of file Falloff.h.

◆ SRI

typedef SriRate SRI

Definition at line 624 of file Falloff.h.

◆ Tsang

typedef TsangRate Tsang

Definition at line 625 of file Falloff.h.

◆ InterfaceArrheniusRate

Definition at line 448 of file InterfaceRate.h.

◆ InterfaceBlowersMaselRate

Definition at line 449 of file InterfaceRate.h.

◆ StickingArrheniusRate

Definition at line 591 of file InterfaceRate.h.

◆ StickingBlowersMaselRate

Definition at line 592 of file InterfaceRate.h.

◆ ElementaryReaction

Definition at line 548 of file Reaction.h.

◆ ThreeBodyReaction

Definition at line 549 of file Reaction.h.

◆ FalloffReaction

Definition at line 550 of file Reaction.h.

◆ ChemicallyActivatedReaction

Definition at line 551 of file Reaction.h.

◆ PlogReaction

Definition at line 552 of file Reaction.h.

◆ ChebyshevReaction

Definition at line 553 of file Reaction.h.

◆ InterfaceReaction

Definition at line 554 of file Reaction.h.

◆ ElectrochemicalReaction

Definition at line 555 of file Reaction.h.

◆ Arrhenius

Definition at line 207 of file RxnRates.h.

◆ Plog

typedef PlogRate Plog

Definition at line 210 of file RxnRates.h.

◆ MappedMatrix

typedef Eigen::Map<Eigen::MatrixXd> MappedMatrix

Definition at line 21 of file eigen_dense.h.

◆ ConstMappedMatrix

typedef Eigen::Map<const Eigen::MatrixXd> ConstMappedMatrix

Definition at line 22 of file eigen_dense.h.

◆ MappedVector

typedef Eigen::Map<Eigen::VectorXd> MappedVector

Definition at line 23 of file eigen_dense.h.

◆ ConstMappedVector

typedef Eigen::Map<const Eigen::VectorXd> ConstMappedVector

Definition at line 24 of file eigen_dense.h.

◆ MappedRowVector

typedef Eigen::Map<Eigen::RowVectorXd> MappedRowVector

Definition at line 25 of file eigen_dense.h.

◆ ConstMappedRowVector

typedef Eigen::Map<const Eigen::RowVectorXd> ConstMappedRowVector

Definition at line 26 of file eigen_dense.h.

◆ SparseTriplets

typedef std::vector<Eigen::Triplet<double> > SparseTriplets

Definition at line 20 of file eigen_sparse.h.

◆ thermo_t

typedef for the ThermoPhase class

Deprecated:
To be removed after Cantera 2.6.

Definition at line 1933 of file ThermoPhase.h.

Enumeration Type Documentation

◆ flow_t

enum flow_t

Definition at line 18 of file ReactionPath.h.

◆ 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 32 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 41 of file Integrator.h.

◆ ResidEval_Type_Enum

Differentiates the type of residual evaluations according to functionality.

Enumerator
Base_ResidEval 

Base residual calculation for the time-stepping function.

JacBase_ResidEval 

Base residual calculation for the Jacobian calculation.

JacDelta_ResidEval 

Delta residual calculation for the Jacobian calculation.

Base_ShowSolution 

Base residual calculation for the showSolution routine.

We calculate this when we want to display a solution

Base_LaggedSolutionComponents 

Base residual calculation containing any lagged components.

We use this to calculate residuals when doing line searches along directions determined by Jacobians that are missing contributions from lagged entries.

Definition at line 20 of file ResidJacEval.h.

◆ IonSolnType_enumType

enums for molten salt ion solution types

Types identify how complicated the solution is. If there is just mixing on one of the sublattices but not the other, then the math is considerably simpler.

Definition at line 25 of file IonsFromNeutralVPSSTP.h.

◆ ThermoBasis

enum class ThermoBasis
strong

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

Definition at line 45 of file ThermoPhase.h.

◆ SensParameterType

enum class SensParameterType
strong

Definition at line 29 of file ReactorBase.h.

Function Documentation

◆ begin()

AnyMap::Iterator begin ( const AnyValue v)

Definition at line 1811 of file AnyMap.cpp.

◆ end()

AnyMap::Iterator end ( const AnyValue v)

Definition at line 1815 of file AnyMap.cpp.

◆ warn_deprecated() [1/2]

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

◆ demangle()

std::string demangle ( const std::type_info &  type)

Convert a type name to a human readable string, using boost::core::demangle if available.

Also has a set of short names for some common types.

Mainly for use by AnyMap and Delegator

Definition at line 297 of file global.cpp.

Referenced by Delegator::makeDelegate(), and AnyValue::type_str().

◆ operator<<() [1/4]

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 106 of file Array.cpp.

References Array2D::nColumns(), and Array2D::nRows().

◆ 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 120 of file Array.cpp.

References Array2D::begin(), Array2D::end(), and scale().

◆ addFloat()

void addFloat ( XML_Node node,
const std::string &  titleString,
const doublereal  value,
const std::string &  unitsString = "",
const std::string &  typeString = "",
const doublereal  minval = Undef,
const doublereal  maxval = Undef 
)

This function adds a child node with the name, "float", with a value consisting of a single floating point number.

This function will add a child node to the current XML node, with the name "float". It will have a title attribute, and the body of the XML node will be filled out with a single float

Example:

const XML_Node &node;
std::string titleString = "activationEnergy";
doublereal value = 50.3;
doublereal maxval = 1.0E3;
doublereal minval = 0.0;
std::string typeString = "optional";
std::string unitsString = "kcal/gmol";
addFloat(node, titleString, value, unitsString, typeString, minval, maxval);
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:103
void addFloat(XML_Node &node, const std::string &titleString, const doublereal value, const std::string &unitsString="", const std::string &typeString="", const doublereal minval=Undef, const doublereal maxval=Undef)
This function adds a child node with the name, "float", with a value consisting of a single floating ...
Definition: ctml.cpp:21

Creates the following the snippet in the XML file:

<parentNode>
  <float title="activationEnergy" type="optional" units="kcal/gmol" min="0.0" max="1.0E3">
     50.3
  <\float>
<\parentNode>
Parameters
nodereference to the XML_Node object of the parent XML element
titleStringString name of the title attribute
valueValue - single integer
unitsStringString name of the Units attribute. The default is to have an empty string.
typeStringString type. This is an optional parameter. The default is to have an empty string.
minvalMinimum allowed value of the float. The default is the special double, Undef, which means to ignore the entry.
maxvalMaximum allowed value of the float. The default is the special double, Undef, which means to ignore the entry.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 21 of file ctml.cpp.

Referenced by Inlet1D::save(), OutletRes1D::save(), Surf1D::save(), ReactingSurf1D::save(), and StFlow::save().

◆ addFloatArray()

void addFloatArray ( XML_Node node,
const std::string &  titleString,
const size_t  n,
const doublereal *const  values,
const std::string &  unitsString = "",
const std::string &  typeString = "",
const doublereal  minval = Undef,
const doublereal  maxval = Undef 
)

This function adds a child node with the name, "floatArray", with a value consisting of a comma separated list of floats.

This function will add a child node to the current XML node, with the name "floatArray". It will have a title attribute, and the body of the XML node will be filled out with a comma separated list of doublereals.

Example:

const XML_Node &node;
std::string titleString = "additionalTemperatures";
int n = 3;
int Tcases[3] = [273.15, 298.15, 373.15];
std::string typeString = "optional";
std::string units = "Kelvin";
addFloatArray(node, titleString, n, &cases[0], typeString, units);
void addFloatArray(XML_Node &node, const std::string &titleString, const size_t n, const doublereal *const values, const std::string &unitsString="", const std::string &typeString="", const doublereal minval=Undef, const doublereal maxval=Undef)
This function adds a child node with the name, "floatArray", with a value consisting of a comma separ...
Definition: ctml.cpp:42

Creates the following the snippet in the XML file:

<parentNode>
  <floatArray title="additionalTemperatures" type="optional" units="Kelvin">
     273.15, 298.15, 373.15
  <\floatArray>
<\parentNode>
Parameters
nodereference to the XML_Node object of the parent XML element
titleStringString name of the title attribute
nLength of the doubles vector.
valuesPointer to a vector of doubles
unitsStringString name of the Units attribute. This is an optional parameter. The default is to have an empty string.
typeStringString type. This is an optional parameter. The default is to have an empty string.
minvalMinimum allowed value of the int. This is an optional parameter. The default is the special double, Undef, which means to ignore the entry.
maxvalMaximum allowed value of the int. This is an optional parameter. The default is the special double, Undef, which means to ignore the entry.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 42 of file ctml.cpp.

Referenced by Domain1D::save(), and StFlow::save().

◆ addNamedFloatArray()

void addNamedFloatArray ( XML_Node parentNode,
const std::string &  name,
const size_t  n,
const doublereal *const  vals,
const std::string  units = "",
const std::string  type = "",
const doublereal  minval = Undef,
const doublereal  maxval = Undef 
)

This function adds a child node with the name given by the first parameter with a value consisting of a comma separated list of floats.

This function will add a child node to the current XML node, with the name given in the list. It will have a title attribute, and the body of the XML node will be filled out with a comma separated list of integers

Example:

const XML_Node &node;
std::string titleString = "additionalTemperatures";
int n = 3;
int Tcases[3] = [273.15, 298.15, 373.15];
std::string typeString = "optional";
std::string units = "Kelvin";
addNamedFloatArray(node, titleString, n, &cases[0], typeString, units);
void addNamedFloatArray(XML_Node &parentNode, const std::string &name, const size_t n, const doublereal *const vals, const std::string units="", const std::string type="", const doublereal minval=Undef, const doublereal maxval=Undef)
This function adds a child node with the name given by the first parameter with a value consisting of...
Definition: ctml.cpp:75

Creates the following the snippet in the XML file:

<parentNode>
  <additionalTemperatures type="optional" vtype="floatArray" size = "3" units="Kelvin">
     273.15, 298.15, 373.15
  <\additionalTemperatures>
<\parentNode>
Parameters
parentNodereference to the XML_Node object of the parent XML element
nameName of the XML node
nLength of the doubles vector.
valsPointer to a vector of doubles
unitsString name of the Units attribute. This is an optional parameter. The default is to have an empty string.
typeString type. This is an optional parameter. The default is to have an empty string.
minvalMinimum allowed value of the int. This is an optional parameter. The default is the special double, Undef, which means to ignore the entry.
maxvalMaximum allowed value of the int. This is an optional parameter. The default is the special double, Undef, which means to ignore the entry.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 75 of file ctml.cpp.

Referenced by StFlow::save().

◆ addString()

void addString ( XML_Node node,
const std::string &  titleString,
const std::string &  valueString,
const std::string &  typeString = "" 
)

This function adds a child node with the name string with a string value to the current node.

This function will add a child node to the current XML node, with the name "string". It will have a title attribute, and the body of the XML node will be filled out with the valueString argument verbatim.

Example:

const XML_Node &node;
addString(node, "titleString", "valueString", "typeString");
void addString(XML_Node &node, const std::string &titleString, const std::string &valueString, const std::string &typeString="")
This function adds a child node with the name string with a string value to the current node.
Definition: ctml.cpp:113

Creates the following the snippet in the XML file:

<string title="titleString" type="typeString">
  valueString
<\string>
Parameters
nodereference to the XML_Node object of the parent XML element
valueStringValue string to be used in the new XML node.
titleStringString name of the title attribute
typeStringString type. This is an optional parameter.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 113 of file ctml.cpp.

References XML_Node::addAttribute().

◆ getFloatArray()

size_t getFloatArray ( const XML_Node node,
vector_fp v,
const bool  convert = true,
const std::string &  unitsString = "",
const std::string &  nodeName = "floatArray" 
)

This function reads the current node or a child node of the current node with the default name, "floatArray", with a value field consisting of a comma separated list of floats.

This function will read either the current XML node or a child node to the current XML node, with the name "floatArray". It will have a title attribute, and the body of the XML node will be filled out with a comma separated list of doublereals. Get an array of floats from the XML Node. The argument field is assumed to consist of an arbitrary number of comma separated floats, with an arbitrary amount of white space separating each field. If the node array has an units attribute field, then the units are used to convert the floats, iff convert is true.

Example:

const XML_Node &State_XMLNode;
bool convert = true;
unitsString = "";
nodeName="floatArray";
getFloatArray(State_XMLNode, v, convert, unitsString, nodeName);
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:184
size_t getFloatArray(const XML_Node &node, vector_fp &v, const bool convert=true, const std::string &unitsString="", const std::string &nodeName="floatArray")
This function reads the current node or a child node of the current node with the default name,...
Definition: ctml.cpp:258

reads the corresponding XML file:

<state>
  <floatArray  units="m3">   32.4, 1, 100. <\floatArray>
<\state>

and will produce the vector:

v[0] = 32.4
v[1] = 1.0
v[2] = 100.
Parameters
nodeXML parent node of the floatArray
vOutput vector of floats containing the floatArray information.
convertConversion to SI is carried out if this boolean is True. The default is true.
unitsStringString name of the type attribute. This is an optional parameter. The default is to have an empty string. The only string that is recognized is actEnergy. Anything else has no effect. This affects what units converter is used.
nodeNameXML Name of the XML node to read. The default value for the node name is floatArray
Returns
the number of floats read into v.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 258 of file ctml.cpp.

References actEnergyToSI(), XML_Node::attrib(), XML_Node::clear(), fpValueCheck(), XML_Node::getChildren(), XML_Node::name(), npos, Tiny, toSI(), Undef, XML_Node::value(), and writelog().

Referenced by BinarySolutionTabulatedThermo::initThermoXML(), newMu0ThermoFromXML(), newNasa9ThermoFromXML(), newNasaThermoFromXML(), newShomateThermoFromXML(), HMWSoln::readXMLBinarySalt(), RedlichKisterVPSSTP::readXMLBinarySpecies(), RedlichKwongMFTP::readXMLCrossFluid(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsi(), RedlichKwongMFTP::readXMLPureFluid(), HMWSoln::readXMLTheta(), HMWSoln::readXMLZetaCation(), Domain1D::restore(), StFlow::restore(), and PDSS_SSVol::setParametersFromXML().

◆ getStringArray()

void getStringArray ( const XML_Node node,
std::vector< std::string > &  v 
)

This function interprets the value portion of an XML element as a string.

It then separates the string up into tokens according to the location of white space.

The separate tokens are returned in the string vector

Parameters
nodeNode to get the value from
vOutput vector containing the string tokens
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 429 of file ctml.cpp.

References tokenizeString(), and XML_Node::value().

Referenced by checkElectrochemReaction(), formSpeciesXMLNodeList(), getMap(), getMatrixValues(), getPairs(), importKinetics(), and installElements().

◆ getMap()

void getMap ( const XML_Node node,
std::map< std::string, std::string > &  m 
)

This routine is used to interpret the value portions of XML elements that contain colon separated pairs.

These are used, for example, in describing the element composition of species.

 <atomArray> H:4 C:1 <atomArray\>

The string is first separated into a string vector according to the location of white space. Then each string is again separated into two parts according to the location of a colon in the string. The first part of the string is used as the key, while the second part of the string is used as the value, in the return map. It is an error to not find a colon in each string pair.

Parameters
nodeCurrent node
mOutput Map containing the pairs of values found in the XML Node
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 332 of file ctml.cpp.

References getStringArray(), and npos.

◆ getPairs()

int getPairs ( const XML_Node node,
std::vector< std::string > &  key,
std::vector< std::string > &  val 
)

This function interprets the value portion of an XML element as a series of "Pairs" separated by white space.

Each pair consists of non-whitespace characters. The first ":" found in the pair string is used to separate the string into two parts. The first part is called the "key" The second part is called the "val". String vectors of key[i] and val[i] are returned in the argument list. Warning: No spaces are allowed in each pair. Quotes get included as part of the string. Example:

<xmlNode>
   red:112    blue:34
   green:banana
</xmlNode>

Returns:

index key val
0 "red" "112"
1 "blue" "34"
2 "green" "banana"
Parameters
nodeXML Node
keyVector of keys for each entry
valVector of values for each entry
Returns
the number of pairs found
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 346 of file ctml.cpp.

References getStringArray(), and npos.

◆ getMatrixValues()

void getMatrixValues ( const XML_Node node,
const std::vector< std::string > &  keyStringRow,
const std::vector< std::string > &  keyStringCol,
Array2D returnValues,
const bool  convert = true,
const bool  matrixSymmetric = false 
)

This function interprets the value portion of an XML element as a series of "Matrix ids and entries" separated by white space.

Each pair consists of non-whitespace characters. The first two ":" found in the pair string is used to separate the string into three parts. The first part is called the first key. The second part is the second key. Both parts must match an entry in the keyString1 and keyString2, respectively, in order to provide a location to place the object in the matrix. The third part is called the value. It is expected to be a double. It is translated into a double and placed into the correct location in the matrix.

Warning: No spaces are allowed in each triplet. Quotes are part of the string.

Example: keyString = red, blue, black, green

<xmlNode>
    red:green:112
    blue:black:3.3E-23
</xmlNode>

Returns:

retnValues(0, 3) = 112
retnValues(1, 2) = 3.3E-23
Parameters
nodeXML Node containing the information for the matrix
keyStringRowKey string for the row
keyStringColKey string for the column entries
returnValuesReturn Matrix.
convertIf this is true, and if the node has a units attribute, then conversion to SI units is carried out. Default is true.
matrixSymmetricIf true entries are made so that the matrix is always symmetric. Default is false.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 364 of file ctml.cpp.

References fpValueCheck(), getStringArray(), Array2D::nColumns(), npos, Array2D::nRows(), and toSI().

◆ getIntegers()

void getIntegers ( const XML_Node node,
std::map< std::string, int > &  v 
)

Get a vector of integer values from a child element.

Returns a std::map containing a keyed values for child XML_Nodes of the current node with the name, "integer". In the keyed mapping there will be a list of titles vs. values for all of the XML nodes. The integer XML_nodes are expected to be in a particular form, with one value per XML_node.

Example:

const XML_Node &State_XMLNode;
std::map<std::string, integer> v;
getInteger(State_XMLNode, v);
int getInteger(const XML_Node &parent, const std::string &name)
Get an integer value from a child element.
Definition: ctml.cpp:236

reads the corresponding XML file:

<state>
  <integer title="i1">   1  <\integer>
  <integer title="i2">   2  <\integer>
  <integer title="i3">   3  <\integer>
<\state>

Will produce the mapping:

v["i1"] = 1
v["i2"] = 2
v["i3"] = 3
Parameters
nodeCurrent XML node to get the values from
vOutput map of the results.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 154 of file ctml.cpp.

References XML_Node::getChildren(), and XML_Node::int_value().

◆ getFloat()

doublereal getFloat ( const XML_Node parent,
const std::string &  name,
const std::string &  type = "" 
)

Get a floating-point value from a child element.

Returns a doublereal value for the child named 'name' of element 'parent'. If 'type' is supplied and matches a known unit type, unit conversion to SI will be done if the child element has an attribute 'units'.

Note, it's an error for the child element not to exist.

Example:

const XML_Node &State_XMLNode;
doublereal pres = OneAtm;
if (state_XMLNode.hasChild("pressure")) {
pres = getFloat(State_XMLNode, "pressure", "toSI");
}
doublereal getFloat(const XML_Node &parent, const std::string &name, const std::string &type="")
Get a floating-point value from a child element.
Definition: ctml.cpp:166
const double OneAtm
One atmosphere [Pa].
Definition: ct_defs.h:81

reads the corresponding XML file:

<state>
  <pressure units="Pa"> 101325.0 </pressure>
<\state>
Parameters
parentreference to the XML_Node object of the parent XML element
nameName of the XML child element
typeString type. Currently known types are "toSI" and "actEnergy", and "" , for no conversion. The default value is "", which implies that no conversion is allowed.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 166 of file ctml.cpp.

Referenced by DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), StoichSubstance::initThermoXML(), IdealMolalSoln::initThermoXML(), newConstCpThermoFromXML(), newMu0ThermoFromXML(), newSpecies(), Inlet1D::restore(), OutletRes1D::restore(), Surf1D::restore(), ReactingSurf1D::restore(), StFlow::restore(), LatticePhase::setParametersFromXML(), MetalPhase::setParametersFromXML(), StoichSubstance::setParametersFromXML(), PDSS_ConstVol::setParametersFromXML(), PDSS_HKFT::setParametersFromXML(), EdgePhase::setParametersFromXML(), SurfPhase::setParametersFromXML(), MixtureFugacityTP::setStateFromXML(), MolalityVPSSTP::setStateFromXML(), and ThermoPhase::setStateFromXML().

◆ getFloatCurrent()

doublereal getFloatCurrent ( const XML_Node currXML,
const std::string &  type = "" 
)

Get a floating-point value from the current XML element.

Returns a doublereal value from the current element. If 'type' is supplied and matches a known unit type, unit conversion to SI will be done if the child element has an attribute 'units'.

Note, it's an error for the child element not to exist.

Example:

const XML_Node &State_XMLNode;
doublereal pres = OneAtm;
if (state_XMLNode.hasChild("pressure")) {
XML_Node *pres_XMLNode = State_XMLNode.getChild("pressure");
pres = getFloatCurrent(pres_XMLNode, "toSI");
}
doublereal getFloatCurrent(const XML_Node &currXML, const std::string &type="")
Get a floating-point value from the current XML element.
Definition: ctml.cpp:179

Reads the corresponding XML file:

<state>
  <pressure units="Pa"> 101325.0 </pressure>
<\state>
Parameters
currXMLreference to the current XML_Node object
typeString type. Currently known types are "toSI" and "actEnergy", and "" , for no conversion. The default value is "", which implies that no conversion is allowed.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 179 of file ctml.cpp.

Referenced by RedlichKwongMFTP::readXMLPureFluid().

◆ getOptionalFloat()

bool getOptionalFloat ( const XML_Node parent,
const std::string &  name,
doublereal &  fltRtn,
const std::string &  type = "" 
)

Get an optional floating-point value from a child element.

Returns a doublereal value for the child named 'name' of element 'parent'. If 'type' is supplied and matches a known unit type, unit conversion to SI will be done if the child element has an attribute 'units'.

Example:

const XML_Node &State_XMLNode;
doublereal pres = OneAtm;
bool exists = getOptionalFloat(State_XMLNode, "pressure", pres, "toSI");
bool getOptionalFloat(const XML_Node &parent, const std::string &name, doublereal &fltRtn, const std::string &type="")
Get an optional floating-point value from a child element.
Definition: ctml.cpp:214

reads the corresponding XML file:

<state>
  <pressure units="Pa"> 101325.0 </pressure>
<\state>
Parameters
parentreference to the XML_Node object of the parent XML element
nameName of the XML child element
fltRtnFloat Return. It will be overridden if the XML element exists.
typeString type. Currently known types are "toSI" and "actEnergy", and "" , for no conversion. The default value is "", which implies that no conversion is allowed.
Returns
true if the child element named "name" exists
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 214 of file ctml.cpp.

Referenced by StFlow::restore(), and SurfPhase::setStateFromXML().

◆ getInteger()

int getInteger ( const XML_Node parent,
const std::string &  name 
)

Get an integer value from a child element.

Returns an integer value for the child named 'name' of element 'parent'. Note, it's an error for the child element not to exist.

Example:

const XML_Node &State_XMLNode;
int number = 1;
if (state_XMLNode.hasChild("NumProcs")) {
number = getInteger(State_XMLNode, "numProcs");
}

reads the corresponding XML file:

<state>
  <numProcs> 10 <numProcs/>
<\state>
Parameters
parentreference to the XML_Node object of the parent XML element
nameName of the XML child element
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 236 of file ctml.cpp.

References XML_Node::child(), XML_Node::hasChild(), XML_Node::int_value(), intValue(), XML_Node::name(), XML_Node::value(), and writelog().

Referenced by newMu0ThermoFromXML().

◆ getOptionalModel()

bool getOptionalModel ( const XML_Node parent,
const std::string &  nodeName,
std::string &  modelName 
)

Get an optional model name from a named child node.

Returns the model name attribute for the child named 'nodeName' of element 'parent'. Note, it's optional for the child node to exist

Example:

std::string modelName = "";
bool exists = getOptionalModel(transportNode, "compositionDependence",
modelName);
bool getOptionalModel(const XML_Node &parent, const std::string &nodeName, std::string &modelName)
Get an optional model name from a named child node.
Definition: ctml.cpp:226

reads the corresponding XML file:

<transport model="Simple">
  <compositionDependence model="Solvent_Only"/>
</transport>

On return modelName is set to "Solvent_Only".

Parameters
parentreference to the XML_Node object of the parent XML element
nodeNameName of the XML child element
modelNameOn return this contains the contents of the model attribute
Returns
True if the nodeName XML node exists. False otherwise.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 226 of file ctml.cpp.

References XML_Node::child(), and XML_Node::hasChild().

◆ getByTitle()

XML_Node * getByTitle ( const XML_Node node,
const std::string &  title 
)

Search the child nodes of the current node for an XML Node with a Title attribute of a given name.

Parameters
nodeCurrent node from which to conduct the search
titleName of the title attribute
Returns
a pointer to the matched child node. Returns 0 if no node is found.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 124 of file ctml.cpp.

References XML_Node::findByAttr(), and XML_Node::parent().

Referenced by getString(), and newMu0ThermoFromXML().

◆ getString()

void getString ( const XML_Node node,
const std::string &  titleString,
std::string &  valueString,
std::string &  typeString 
)

This function reads a child node with the name string with a specific title attribute named titleString.

This function will read a child node to the current XML node with the name "string". It must have a title attribute, named titleString, and the body of the XML node will be read into the valueString output argument.

If the child node is not found then the empty string is returned.

Example:

const XML_Node &node;
getString(XML_Node& node, std::string titleString, std::string valueString,
std::string typeString);
void getString(const XML_Node &node, const std::string &titleString, std::string &valueString, std::string &typeString)
This function reads a child node with the name string with a specific title attribute named titleStri...
Definition: ctml.cpp:141

Reads the following the snippet in the XML file:

<string title="titleString" type="typeString">
  valueString
<\string>
Parameters
nodeReference to the XML_Node object of the parent XML element
titleStringString name of the title attribute of the child node
valueStringValue string that is found in the child node. output variable
typeStringString type. This is an optional output variable. It is filled with the attribute "type" of the XML entry.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 141 of file ctml.cpp.

References XML_Node::attrib(), getByTitle(), XML_Node::name(), and XML_Node::value().

◆ getChildValue()

std::string getChildValue ( const XML_Node parent,
const std::string &  nameString 
)

This function reads a child node with the name, nameString, and returns its XML value as the return string.

If the child XML_node named "name" doesn't exist, the empty string is returned.

Example:

const XML_Node &parent;
string nameString = "vacancy_species";
string valueString = getChildValue(parent, nameString
std::string typeString);
std::string getChildValue(const XML_Node &parent, const std::string &nameString)
This function reads a child node with the name, nameString, and returns its XML value as the return s...
Definition: ctml.cpp:133

returns valueString = "O(V)" from the following the snippet in the XML file:

<vacancySpecies>
  O(V)
<\vacancySpecies>
Parameters
parentparent reference to the XML_Node object of the parent XML element
nameStringName of the child XML_Node to read the value from.
Returns
String value of the child XML_Node
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 133 of file ctml.cpp.

References XML_Node::hasChild().

Referenced by MixtureFugacityTP::setStateFromXML(), MolalityVPSSTP::setStateFromXML(), SurfPhase::setStateFromXML(), and ThermoPhase::setStateFromXML().

◆ ck2cti()

void ck2cti ( const std::string &  in_file,
const std::string &  thermo_file = "",
const std::string &  transport_file = "",
const std::string &  id_tag = "gas" 
)

Convert a Chemkin-format mechanism into a CTI file.

Parameters
in_fileinput file containing species and reactions
thermo_fileoptional input file containing thermo data
transport_fileoptional input file containing transport parameters
id_tagid of the phase
Deprecated:
The CTI input format is deprecated and will be removed in Cantera 3.0.

Definition at line 185 of file ct2ctml.cpp.

References pypath(), trimCopy(), and writelog().

◆ 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 119 of file global.cpp.

References Application::ApplicationDestroy(), FactoryBase::deleteFactories(), and Unit::deleteUnit().

◆ 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 126 of file global.cpp.

References app(), and Application::thread_complete().

◆ gitCommit()

std::string gitCommit ( )

Returns the hash of the git commit from which Cantera was compiled, if known.

Definition at line 131 of file global.cpp.

Referenced by YamlWriter::toYamlString().

◆ debugModeEnabled()

bool debugModeEnabled ( )

Returns true if Cantera was compiled in debug mode.

Used for handling some cases where behavior tested in the test suite changes depending on whether the NDEBUG preprocessor macro is defined.

Definition at line 206 of file global.cpp.

◆ writelog_direct()

void writelog_direct ( const std::string &  msg)

Write a message to the screen.

The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages. It can also be called by user programs. The advantage of using writelog over writing directly to the standard output is that messages written with writelog will display correctly even when Cantera is used from MATLAB or other application that do not have a standard output stream.

Parameters
msgc++ string to be written to the screen

Definition at line 37 of file global.cpp.

References app(), and Application::writelog().

Referenced by debuglog(), writelog(), and writelogf().

◆ debuglog()

void Cantera::debuglog ( const std::string &  msg,
int  loglevel 
)
inline

◆ writelogendl()

void writelogendl ( )

Write an end of line character to the screen and flush output.

Definition at line 42 of file global.cpp.

References app(), and Application::writelogendl().

Referenced by FuncEval::eval_nothrow(), VCS_SOLVE::vcs_basopt(), VCS_SOLVE::vcs_dfe(), and VCS_SOLVE::vcs_inest().

◆ writeline()

void writeline ( char  repeat,
size_t  count,
bool  endl_after = true,
bool  endl_before = false 
)

Definition at line 47 of file global.cpp.

◆ _warn_deprecated()

void _warn_deprecated ( const std::string &  method,
const std::string &  extra = "" 
)

helper function passing deprecation warning to global handler

Definition at line 58 of file global.cpp.

References app(), and Application::warn_deprecated().

Referenced by warn_deprecated().

◆ warn_deprecated() [2/2]

void Cantera::warn_deprecated ( const std::string &  method,
const std::string &  msg,
const Args &...  args 
)

Print a deprecation warning raised from method.

See also
Application::warn_deprecated
Parameters
methodmethod name
msgPython-style format string with the following arguments
argsarguments for the format string

Definition at line 205 of file global.h.

References _warn_deprecated().

◆ suppress_deprecation_warnings()

void suppress_deprecation_warnings ( )

Globally disable printing of deprecation warnings.

Used primarily to prevent certain tests from failing.

Definition at line 69 of file global.cpp.

References app(), and Application::suppress_deprecation_warnings().

◆ _warn()

void _warn ( const std::string &  warning,
const std::string &  method,
const std::string &  extra 
)

helper function passing generic warning to global handler

Definition at line 63 of file global.cpp.

References app(), and Application::warn().

Referenced by warn(), and warn_user().

◆ warn()

void Cantera::warn ( const std::string &  warning,
const std::string &  method,
const std::string &  msg,
const Args &...  args 
)

Print a generic warning raised from method.

See also
Application::warn
Parameters
warningtype of warning;
See also
Logger::warn
Parameters
methodmethod name
msgPython-style format string with the following arguments
argsarguments for the format string

Definition at line 229 of file global.h.

References _warn().

◆ warn_user()

void Cantera::warn_user ( const std::string &  method,
const std::string &  msg,
const Args &...  args 
)

Print a user warning raised from method as CanteraWarning.

Parameters
methodmethod name
msgPython-style format string with the following arguments
argsarguments for the format string

Definition at line 245 of file global.h.

References _warn().

Referenced by PlasmaPhase::checkElectronEnergyDistribution(), BlowersMaselRate::ddTScaledFromStruct(), TwoTempPlasmaRate::ddTScaledFromStruct(), ChemEquil::equilibrate(), ChemEquil::initialize(), PDSS_HKFT::initThermo(), Inlet1D::restore(), OutletRes1D::restore(), ReactingSurf1D::restore(), Sim1D::restore(), Domain1D::restore(), StFlow::restore(), TroeRate::setFalloffCoeffs(), vcs_VolPhase::setPtrThermoPhase(), and NasaPoly2::validate().

◆ make_deprecation_warnings_fatal()

void make_deprecation_warnings_fatal ( )

Turns deprecation warnings into exceptions.

Activated within the test suite to make sure that no deprecated methods are being used.

Definition at line 74 of file global.cpp.

References app(), and Application::make_deprecation_warnings_fatal().

◆ make_warnings_fatal()

void make_warnings_fatal ( )

Turns Cantera warnings into exceptions.

Activated within the test suite to make sure that your warning message are being raised.

Definition at line 89 of file global.cpp.

References app(), and Application::make_warnings_fatal().

◆ suppress_thermo_warnings()

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.

Definition at line 94 of file global.cpp.

References app(), and Application::suppress_thermo_warnings().

◆ thermo_warnings_suppressed()

bool thermo_warnings_suppressed ( )

Returns true if thermo warnings should be suppressed.

Definition at line 99 of file global.cpp.

References app(), and Application::thermo_warnings_suppressed().

Referenced by NasaPoly2::validate().

◆ suppress_warnings()

void suppress_warnings ( )

Globally disable printing of (user) warnings.

Used primarily to prevent certain tests from failing.

Definition at line 79 of file global.cpp.

References app(), and Application::suppress_warnings().

◆ warnings_suppressed()

bool warnings_suppressed ( )

Returns true if warnings should be suppressed.

Definition at line 84 of file global.cpp.

References app(), and Application::warnings_suppressed().

◆ use_legacy_rate_constants()

void use_legacy_rate_constants ( bool  legacy = true)

Set definition used for rate constant calculation.

See also
Kinetics::getFwdRateConstants()

If set to 'false', rate constants of three-body reactions are consistent with conventional definitions. If set to 'true', output for rate constants of three-body reactions is multipied by third-body concentrations (legacy behavior). For the pre-compiled Cantera 2.6 distribution, the default value is set to 'true', which implies no change compared to previous behavior. For user-compiled Cantera, the default behavior can be changed by the SCons flag 'legacy_rate_constants'.

Deprecated:
Behavior to change after Cantera 2.6; for Cantera 2.6, rate constants of three-body reactions are multiplied with third-body concentrations (no change to legacy behavior). After Cantera 2.6, results will no longer include third-body concentrations and be consistent with conventional definitions (see Eq. 9.75 in Kee, Coltrin and Glarborg, 'Chemically Reacting Flow', Wiley Interscience, 2003).

Definition at line 104 of file global.cpp.

References app(), and Application::use_legacy_rate_constants().

◆ legacy_rate_constants_used()

bool legacy_rate_constants_used ( )

Returns true if legacy rate constant definition should be used.

Definition at line 109 of file global.cpp.

References app(), and Application::legacy_rate_constants_used().

Referenced by GasKinetics::getFwdRateConstants().

◆ setLogger()

void setLogger ( Logger logwriter)

Install a logger.

Called by the language interfaces to install an appropriate logger. The logger is used for the writelog() function

Parameters
logwriterPointer to a logger object
See also
Logger.

Definition at line 28 of file global.cpp.

References app(), Logger::error(), and Application::setLogger().

◆ toSI()

doublereal toSI ( const std::string &  unit)

◆ actEnergyToSI()

doublereal actEnergyToSI ( const std::string &  unit)

Return the conversion factor to convert activation energy unit std::string 'unit' to Kelvin.

Parameters
unitString containing the activation energy units
Deprecated:
To be removed after Cantera 2.6. Used only with XML input.

Definition at line 181 of file global.cpp.

References Unit::actEnergyToSI(), and Unit::units().

Referenced by getFloatArray().

◆ get_XML_File()

XML_Node * get_XML_File ( const std::string &  file,
int  debug = 0 
)

Return a pointer to the XML tree for a Cantera input file.

This routine will find the file and read the XML file into an XML tree structure. Then, a pointer will be returned. If the file has already been processed, then just the pointer will be returned.

Parameters
fileString containing the relative or absolute file name
debugDebug flag
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 140 of file global.cpp.

References app(), and Application::get_XML_File().

Referenced by get_XML_NameID(), get_XML_Node(), ThermoPhase::initThermoFile(), installElements(), newKinetics(), and newPhase().

◆ get_XML_from_string()

XML_Node * get_XML_from_string ( const std::string &  text)

Read a CTI or CTML string and fill up an XML tree.

Return a pointer to the XML tree corresponding to the specified CTI or XML string. If the given string has been processed before, the cached XML tree will be returned. Otherwise, the XML tree will be generated and stored in the cache.

Parameters
textCTI or CTML string
Returns
Root of the corresponding XML tree
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 145 of file global.cpp.

References app(), and Application::get_XML_from_string().

◆ close_XML_File()

void close_XML_File ( const std::string &  file)

Close an XML File.

Close a file that is opened by this application object

Parameters
fileString containing the relative or absolute file name

Definition at line 150 of file global.cpp.

References app(), and Application::close_XML_File().

◆ get_XML_Node()

XML_Node * get_XML_Node ( const std::string &  file_ID,
XML_Node root 
)

This routine will locate an XML node in either the input XML tree or in another input file specified by the file part of the file_ID string.

Searches are based on the ID attribute of the XML element only.

Parameters
file_IDThis is a concatenation of two strings separated by the "#" character. The string before the pound character is the file name of an XML file to carry out the search. The string after the # character is the ID attribute of the XML element to search for. The string is interpreted as a file string if no # character is in the string.
rootIf the file string is empty, searches for the XML element with matching ID attribute are carried out from this XML node.
Returns
the XML_Node, if found. Returns null if not found.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 235 of file global.cpp.

References XML_Node::findID(), findInputFile(), get_XML_File(), and split_at_pound().

Referenced by importPhase(), installReactionArrays(), and IonsFromNeutralVPSSTP::setParametersFromXML().

◆ get_XML_NameID()

XML_Node * get_XML_NameID ( const std::string &  nameTarget,
const std::string &  file_ID,
XML_Node root 
)

This routine will locate an XML node in either the input XML tree or in another input file specified by the file part of the file_ID string.

Searches are based on the XML element name and the ID attribute of the XML element. An exact match of both is usually required. However, the ID attribute may be set to "", in which case the first XML element with the correct element name will be returned.

Parameters
nameTargetThis is the XML element name to look for.
file_IDThis is a concatenation of two strings separated by the "#" character. The string before the pound character is the file name of an XML file to carry out the search. The string after the # character is the ID attribute of the XML element to search for. The string is interpreted as a file string if no # character is in the string.
rootIf the file string is empty, searches for the XML element with matching ID attribute are carried out from this XML node.
Returns
the XML_Node, if found. Returns null if not found.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 273 of file global.cpp.

References XML_Node::findNameID(), get_XML_File(), and split_at_pound().

Referenced by buildSolutionFromXML(), newKinetics(), and newPhase().

◆ clip()

T Cantera::clip ( const T &  value,
const T &  lower,
const T &  upper 
)
inline

◆ sign()

int Cantera::sign ( x)

Sign of a number. Returns -1 if x < 0, 1 if x > 0 and 0 if x == 0.

Definition at line 362 of file global.h.

◆ newInterface() [1/3]

shared_ptr< Interface > newInterface ( const std::string &  infile,
const std::string &  name = "",
const std::vector< std::string > &  adjacent = {} 
)

Create and initialize a new Interface from an input file.

This constructor wraps newPhase() and newKinetics()

Parameters
infilename of the input file
namename of the surface phase in the file. If this is blank, the first phase in the file is used.
adjacentvector containing names of adjacent phases that participate in this phases kinetics. If empty, adjacent phases will be instantiated based on the phase definition.
Returns
an initialized Interface object.

Definition at line 40 of file Interface.cpp.

References AnyMap::fromYamlFile(), and newSolution().

Referenced by newInterface().

◆ newInterface() [2/3]

shared_ptr< Interface > newInterface ( const std::string &  infile,
const std::string &  name,
const std::vector< shared_ptr< Solution > > &  adjacent 
)

Create and initialize a new Interface from an input file.

This constructor wraps newPhase() and newKinetics()

Parameters
infilename of the input file
namename of the phase in the file. If this is the empty string, the first phase in the file is used.
adjacentvector containing adjacent Solution objects. If empty, adjacent phases will be instantiated based on the phase definition.
Returns
an initialized Interface object.

Definition at line 54 of file Interface.cpp.

References AnyMap::fromYamlFile(), and newInterface().

◆ newInterface() [3/3]

shared_ptr< Interface > newInterface ( AnyMap phaseNode,
const AnyMap rootNode = AnyMap(),
const std::vector< shared_ptr< Solution > > &  adjacent = {} 
)

Create and initialize a new Interface from AnyMap objects.

This constructor wraps newPhase() and newKinetics()

Parameters
phaseNodethe node containing the phase definition (that is, thermo model, list of species, and initial state)
rootNodethe root node of the tree containing the phase definition, which will be used as the default location from which to read species definitions.
adjacentvector containing adjacent Solution objects. If empty, adjacent phases will be instantiated based on the phase definition.
Returns
an initialized Interface object.

Definition at line 62 of file Interface.cpp.

References newSolution().

◆ writePlotFile()

void writePlotFile ( const std::string &  fname,
const std::string &  fmt,
const std::string &  plotTitle,
const std::vector< std::string > &  names,
const Array2D data 
)

Write a Plotting file.

Parameters
fnameOutput file name
fmtEither TEC or XL or CSV
plotTitleTitle of the plot
namesvector of variable names
dataN x M data array. data(n,m) is the m^th value of the n^th variable.
Deprecated:
To be removed after Cantera 2.6.

Definition at line 16 of file plots.cpp.

References outputExcel(), outputTEC(), and warn_deprecated().

◆ outputTEC()

void outputTEC ( std::ostream &  s,
const std::string &  title,
const std::vector< std::string > &  names,
const Array2D data 
)

Write a Tecplot data file.

Parameters
soutput stream
titleplot title
namesvector of variable names
dataN x M data array. data(n,m) is the m^th value of the n^th variable.
Deprecated:
To be removed after Cantera 2.6.

Definition at line 37 of file plots.cpp.

References Array2D::nColumns(), Array2D::nRows(), and warn_deprecated().

Referenced by writePlotFile().

◆ outputExcel()

void outputExcel ( std::ostream &  s,
const std::string &  title,
const std::vector< std::string > &  names,
const Array2D data 
)

Write an Excel spreadsheet in 'csv' form.

Parameters
soutput stream
titleplot title
namesvector of variable names
dataN x M data array. data(n,m) is the m^th value of the n^th variable.
Deprecated:
To be removed after Cantera 2.6.

Definition at line 62 of file plots.cpp.

References Array2D::nColumns(), Array2D::nRows(), and warn_deprecated().

Referenced by writePlotFile().

◆ newSolution() [1/3]

shared_ptr< Solution > newSolution ( const std::string &  infile,
const std::string &  name,
const std::string &  transport,
const std::vector< std::string > &  adjacent 
)

Create and initialize a new Solution from an input file.

This constructor wraps newPhase(), newKinetics() and newTransportMgr() routines for initialization.

Parameters
infilename of the input file
namename of the phase in the file. If this is blank, the first phase in the file is used.
transportname of the transport model. If blank, the transport model specified in the phase definition is used.
adjacentvector containing names of adjacent phases that participate in this phases kinetics. If empty, adjacent phases will be instantiated based on the phase definition.
Returns
an initialized Solution object.

Definition at line 172 of file Solution.cpp.

References dot(), AnyMap::fromYamlFile(), newSolution(), npos, and toLowerCopy().

Referenced by newInterface(), and newSolution().

◆ newSolution() [2/3]

shared_ptr< Solution > newSolution ( const std::string &  infile,
const std::string &  name = "",
const std::string &  transport = "",
const std::vector< shared_ptr< Solution > > &  adjacent = {} 
)

Create and initialize a new Solution manager from an input file.

This constructor wraps newPhase(), newKinetics() and newTransportMgr() routines for initialization.

Parameters
infilename of the input file
namename of the phase in the file. If this is blank, the first phase in the file is used.
transportname of the transport model.
adjacentvector containing adjacent Solution objects. If empty, adjacent phases will be instantiated based on the phase definition.
Returns
an initialized Solution object.

Definition at line 122 of file Solution.cpp.

References Solution::create(), dot(), AnyMap::fromYamlFile(), newDefaultTransportMgr(), newKinetics(), newPhase(), newSolution(), newTransportMgr(), npos, and toLowerCopy().

◆ newSolution() [3/3]

shared_ptr< Solution > newSolution ( const AnyMap phaseNode,
const AnyMap rootNode = AnyMap(),
const std::string &  transport = "",
const std::vector< shared_ptr< Solution > > &  adjacent = {},
const std::map< std::string, shared_ptr< Solution > > &  related = {} 
)

Create and initialize a new Solution manager from AnyMap objects.

This constructor wraps newPhase(), newKinetics() and newTransportMgr() routines for initialization.

Parameters
phaseNodethe node containing the phase definition (that is, thermo model, list of species, and initial state)
rootNodethe root node of the tree containing the phase definition, which will be used as the default location from which to read species definitions.
transportname of the transport model.
adjacentvector containing adjacent Solution objects. If empty, adjacent phases will be instantiated based on the phase definition.
relatedvector of phases related to the same root Solution object. Used internally by newSolution() when creating complex interfaces where a phase may be adjacent to multiple other phases but should be instantiated only once.
Returns
an initialized Solution object.

Definition at line 201 of file Solution.cpp.

References Interface::create(), Solution::create(), AnyMap::fromYamlFile(), AnyValue::getMapWhere(), AnyMap::getString(), AnyMap::hasKey(), newDefaultTransportMgr(), newKinetics(), newPhase(), newSolution(), and newTransportMgr().

◆ vec2str()

std::string vec2str ( const vector_fp v,
const std::string &  fmt = "%g",
const std::string &  sep = ", " 
)

Convert a vector to a string (separated by commas)

Parameters
vvector to be converted
fmtFormat to be used (printf style) for each element
sepSeparator

Definition at line 33 of file stringUtils.cpp.

Referenced by GasTransport::fitDiffCoeffs(), IonGasTransport::fitDiffCoeffs(), GasTransport::fitProperties(), and MMCollisionInt::init().

◆ stripnonprint()

std::string stripnonprint ( const std::string &  s)

Strip non-printing characters wherever they are.

Parameters
sInput string
Returns
a copy of the string, stripped of all non- printing characters.

Definition at line 48 of file stringUtils.cpp.

Referenced by Application::addDataDirectory().

◆ parseCompString()

compositionMap parseCompString ( const std::string &  ss,
const std::vector< std::string > &  names = std::vector<std::string>() 
)

Parse a composition string into a map consisting of individual key:composition pairs.

Elements present in names but not in the composition string will have a value of 0. Elements present in the composition string but not in names will generate an exception. The composition is a double. Example:

Input is

"ice:1 snow:2" names = ["fire", "ice", "snow"]

Output is x["fire"] = 0 x["ice"] = 1 x["snow"] = 2

Parameters
ssoriginal string consisting of multiple key:composition pairs on multiple lines
names(optional) valid names for elements in the composition map. If empty or unspecified, all values are allowed.
Returns
map of names to values

Definition at line 59 of file stringUtils.cpp.

References fpValueCheck(), getValue(), and npos.

Referenced by checkElectrochemReaction(), ThermoPhase::equivalenceRatio(), Phase::findIsomers(), ThermoPhase::mixtureFraction(), newSpecies(), SurfPhase::setCoveragesByName(), ThermoPhase::setEquivalenceRatio(), Phase::setMassFractionsByName(), ThermoPhase::setMixtureFraction(), MolalityVPSSTP::setMolalitiesByName(), Phase::setMoleFractionsByName(), MultiPhase::setMolesByName(), LatticeSolidPhase::setParametersFromXML(), PDSS_IonsFromNeutral::setParametersFromXML(), and ThermoPhase::stoichAirFuelRatio().

◆ intValue()

int intValue ( const std::string &  val)

Translate a string into one integer value.

No error checking is done on the conversion. The c stdlib function atoi() is used.

Parameters
valString value of the integer
Returns
an integer
Deprecated:
To be removed after Cantera 2.6. Use std::stoi instead.

Definition at line 123 of file stringUtils.cpp.

Referenced by getInteger(), importPhase(), installElements(), and Sim1D::restore().

◆ fpValue()

doublereal fpValue ( const std::string &  val)

Translate a string into one doublereal value.

No error checking is done on the conversion.

Parameters
valString value of the double
Returns
a double

Definition at line 128 of file stringUtils.cpp.

Referenced by fpValueCheck(), DebyeHuckel::initThermoXML(), MaskellSolidSolnPhase::initThermoXML(), installElements(), newConstCpThermoFromXML(), newMu0ThermoFromXML(), newNasa9ThermoFromXML(), newNasaThermoFromXML(), and newShomateThermoFromXML().

◆ fpValueCheck()

doublereal fpValueCheck ( const std::string &  val)

Translate a string into one doublereal value, with error checking.

fpValueCheck is a wrapper around the C++ stringstream double parser. It does quite a bit more error checking than atof() or strtod(), and is quite a bit more restrictive.

First it interprets both E, e, d, and D as exponents. stringstreams only interpret e or E as an exponent character.

It only accepts a string as well formed if it consists as a single token. Multiple words will raise an exception. It will raise a CanteraError for NAN and inf entries as well, in contrast to atof() or strtod(). The user needs to know that a serious numerical issue has occurred.

It does not accept hexadecimal numbers.

It always use the C locale, regardless of any locale settings.

Parameters
valString representation of the number
Returns
a double

Definition at line 137 of file stringUtils.cpp.

References fpValue().

Referenced by XML_Node::fp_value(), getFloatArray(), getMatrixValues(), HMWSoln::initThermoXML(), installElements(), parseCompString(), PDSS_HKFT::setParametersFromXML(), strSItoDbl(), and Units::Units().

◆ parseSpeciesName()

std::string parseSpeciesName ( const std::string &  nameStr,
std::string &  phaseName 
)

Parse a name string, separating out the phase name from the species name.

Name strings must not contain these internal characters "; \n \t ," Only one colon is allowed, the one separating the phase name from the species name. Therefore, names may not include a colon.

Parameters
[in]nameStrName string containing the phase name and the species name separated by a colon. The phase name is optional. example: "silane:SiH4"
[out]phaseNameName of the phase, if specified. If not specified, a blank string is returned.
Returns
species name. If nameStr is blank an empty string is returned.
Deprecated:
To be removed after Cantera 2.6.

Definition at line 191 of file stringUtils.cpp.

References npos, and warn_deprecated().

◆ strSItoDbl()

doublereal strSItoDbl ( const std::string &  strSI)

Interpret one or two token string as a single double.

This is similar to atof(). However, the second token is interpreted as an MKS units string and a conversion factor to MKS is applied.

Example: "1.0 atm" results in the number 1.01325e5.

Parameters
strSIstring to be converted. One or two tokens
Returns
a converted double
Deprecated:
To be removed after Cantera 2.6.

Definition at line 218 of file stringUtils.cpp.

References fpValueCheck(), tokenizeString(), and toSI().

Referenced by PDSS_HKFT::setParametersFromXML().

◆ tokenizeString()

void tokenizeString ( const std::string &  oval,
std::vector< std::string > &  v 
)

This function separates a string up into tokens according to the location of white space.

White space includes the new line character. tokens are stripped of leading and trailing white space.

The separate tokens are returned in a string vector, v.

Parameters
ovalString to be broken up
vOutput vector of tokens.

Definition at line 234 of file stringUtils.cpp.

Referenced by getStringArray(), and strSItoDbl().

◆ copyString()

size_t copyString ( const std::string &  source,
char *  dest,
size_t  length 
)

Copy the contents of a std::string into a char array of a given length.

If length is less than the size of source, the string will be truncated and the function will return the length of the buffer required to hold source. Otherwise, returns 0.

Definition at line 246 of file stringUtils.cpp.

◆ trimCopy()

std::string trimCopy ( const std::string &  input)

Trim.

Remove all leading and trailing spaces (with default locale).

Definition at line 258 of file stringUtils.cpp.

Referenced by XML_Node::addValue(), ck2cti(), getAtomicNumber(), getElementName(), getElementSymbol(), getElementWeight(), XML_Reader::parseTag(), pypath(), XML_Reader::readValue(), YamlWriter::toYamlString(), and Units::Units().

◆ toLowerCopy()

std::string toLowerCopy ( const std::string &  input)

◆ caseInsensitiveEquals()

bool caseInsensitiveEquals ( const std::string &  input,
const std::string &  test 
)

◆ dot4()

doublereal Cantera::dot4 ( const V &  x,
const V &  y 
)
inline

Templated Inner product of two vectors of length 4.

If either x or y has length greater than 4, only the first 4 elements will be used.

Parameters
xfirst reference to the templated class V
ysecond reference to the templated class V
Returns
This class returns a hard-coded type, doublereal.

Definition at line 35 of file utilities.h.

Referenced by MixTransport::updateCond_T(), GasTransport::updateDiff_T(), and GasTransport::updateSpeciesViscosities().

◆ dot5()

doublereal Cantera::dot5 ( const V &  x,
const V &  y 
)
inline

Templated Inner product of two vectors of length 5.

If either x or y has length greater than 4, only the first 4 elements will be used.

Parameters
xfirst reference to the templated class V
ysecond reference to the templated class V
Returns
This class returns a hard-coded type, doublereal.

Definition at line 50 of file utilities.h.

Referenced by MixTransport::updateCond_T(), GasTransport::updateDiff_T(), and GasTransport::updateSpeciesViscosities().

◆ dot()

doublereal Cantera::dot ( InputIter  x_begin,
InputIter  x_end,
InputIter2  y_begin 
)
inline

Function that calculates a templated inner product.

This inner product is templated twice. The output variable is hard coded to return a doublereal.

template<class InputIter, class InputIter2>

double x[8], y[8];
doublereal dsum = dot<double *,double *>(x, &x+7, y);
Parameters
x_beginIterator pointing to the beginning, belonging to the iterator class InputIter.
x_endIterator pointing to the end, belonging to the iterator class InputIter.
y_beginIterator pointing to the beginning of y, belonging to the iterator class InputIter2.
Returns
The return is hard-coded to return a double.

Definition at line 77 of file utilities.h.

Referenced by IdealSolidSolnPhase::calcDensity(), IdealSolnGasVPSS::calcDensity(), ChemEquil::equilibrate(), ConstPressureReactor::eval(), IdealGasConstPressureReactor::eval(), IdealGasReactor::eval(), Reactor::eval(), ThermoPhase::initThermoFile(), Phase::moleFractionsToMassFractions(), newKinetics(), newPhase(), newSolution(), Sim1D::restore(), and Phase::setMoleFractions_NoNorm().

◆ scale()

void Cantera::scale ( InputIter  begin,
InputIter  end,
OutputIter  out,
scale_factor 
)
inline

Multiply elements of an array by a scale factor.

vector_fp in(8, 1.0), out(8);
scale(in.begin(), in.end(), out.begin(), factor);
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
Definition: utilities.h:100
Parameters
beginIterator pointing to the beginning, belonging to the iterator class InputIter.
endIterator pointing to the end, belonging to the iterator class InputIter.
outIterator pointing to the beginning of out, belonging to the iterator class OutputIter. This is the output variable for this routine.
scale_factorinput scale factor belonging to the class S.

Definition at line 100 of file utilities.h.

Referenced by AnyValue::applyUnits(), ChemEquil::equilibrate(), ChemEquil::estimateElementPotentials(), Phase::getConcentrations(), SurfPhase::getCp_R(), SurfPhase::getEnthalpy_RT(), SurfPhase::getEntropy_R(), IdealGasPhase::getGibbs_ref(), MixtureFugacityTP::getGibbs_ref(), VPStandardStateTP::getGibbs_ref(), SurfPhase::getGibbs_RT(), DustyGasTransport::getMolarFluxes(), Phase::getMoleFractions(), IdealGasPhase::getPartialMolarCp(), IdealSolnGasVPSS::getPartialMolarCp(), PengRobinson::getPartialMolarEnthalpies(), IdealGasPhase::getPartialMolarEnthalpies(), IdealSolnGasVPSS::getPartialMolarEnthalpies(), LatticePhase::getPartialMolarEnthalpies(), RedlichKwongMFTP::getPartialMolarEnthalpies(), IdealGasPhase::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarEntropies(), RedlichKwongMFTP::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarIntEnergies(), IdealGasPhase::getPureGibbs(), MixtureFugacityTP::getPureGibbs(), VPStandardStateTP::getPureGibbs(), IdealGasPhase::getStandardChemPotentials(), LatticePhase::getStandardChemPotentials(), operator*=(), ReactorNet::registerSensitivityParameter(), Phase::setMassFractions(), Phase::setMoleFractions_NoNorm(), and VCS_SOLVE::vcs_elabcheck().

◆ poly6()

R Cantera::poly6 ( x,
R *  c 
)

Templated evaluation of a polynomial of order 6.

Parameters
xValue of the independent variable - First template parameter
cPointer to the polynomial - Second template parameter

Definition at line 113 of file utilities.h.

Referenced by MultiTransport::updateThermal_T().

◆ poly8()

R Cantera::poly8 ( x,
R *  c 
)

Templated evaluation of a polynomial of order 8.

Parameters
xValue of the independent variable - First template parameter
cPointer to the polynomial - Second template parameter

Definition at line 125 of file utilities.h.

Referenced by MultiTransport::updateThermal_T().

◆ poly5()

R Cantera::poly5 ( x,
R *  c 
)

Templated evaluation of a polynomial of order 5.

Parameters
xValue of the independent variable - First template parameter
cPointer to the polynomial - Second template parameter

Definition at line 137 of file utilities.h.

Referenced by IonGasTransport::fitDiffCoeffs(), and IonFlow::updateTransport().

◆ poly4()

R Cantera::poly4 ( x,
R *  c 
)

Evaluates a polynomial of order 4.

Parameters
xValue of the independent variable.
cPointer to the polynomial coefficient array.

Definition at line 149 of file utilities.h.

Referenced by GasTransport::fitDiffCoeffs(), IonGasTransport::fitDiffCoeffs(), and GasTransport::fitProperties().

◆ poly3()

R Cantera::poly3 ( x,
R *  c 
)

Templated evaluation of a polynomial of order 3.

Parameters
xValue of the independent variable - First template parameter
cPointer to the polynomial - Second template parameter

Definition at line 161 of file utilities.h.

Referenced by GasTransport::fitDiffCoeffs(), and GasTransport::fitProperties().

◆ 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.

Referenced by ReactorNet::updateState().

◆ checkFinite() [2/2]

void checkFinite ( const std::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.

◆ getValue()

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

◆ findXMLPhase()

XML_Node * findXMLPhase ( XML_Node root,
const std::string &  phaseId 
)

Search an XML_Node tree for a named phase XML_Node.

Search for a phase Node matching an id.

Parameters
rootStarting XML_Node* pointer for the search
phaseIdid of the phase to search for
Returns
the XML_Node pointer if the phase is found. If the phase is not found, it returns 0
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 1049 of file xml.cpp.

References XML_Node::children(), findXMLPhase(), XML_Node::id(), XML_Node::name(), and XML_Node::nChildren().

Referenced by findXMLPhase(), ThermoPhase::initThermoFile(), and Phase::setXMLdata().

◆ _equilflag()

int _equilflag ( const char *  xy)

map property strings to integers

Definition at line 22 of file ChemEquil.cpp.

Referenced by MultiPhase::equilibrate(), and ChemEquil::equilibrate().

◆ operator<<() [2/4]

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 840 of file MultiPhase.cpp.

References Phase::name(), MultiPhase::nPhases(), MultiPhase::phase(), MultiPhase::phaseMoles(), ThermoPhase::report(), and MultiPhase::updatePhases().

◆ vcs_l2norm()

double vcs_l2norm ( const vector_fp vec)

determine the l2 norm of a vector of doubles

Parameters
vecvector of doubles
Returns
the l2 norm of the vector

Definition at line 21 of file vcs_util.cpp.

Referenced by VCS_SOLVE::vcs_phaseStabilityTest().

◆ 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 33 of file vcs_util.cpp.

References VCS_SPECIES_ACTIVEBUTZERO, VCS_SPECIES_COMPONENT, VCS_SPECIES_DELETED, VCS_SPECIES_INTERFACIALVOLTAGE, VCS_SPECIES_MAJOR, VCS_SPECIES_MINOR, VCS_SPECIES_STOICHZERO, VCS_SPECIES_ZEROEDMS, VCS_SPECIES_ZEROEDPHASE, and VCS_SPECIES_ZEROEDSS.

Referenced by VCS_SOLVE::vcs_evaluate_speciesType(), and VCS_SOLVE::vcs_RxnStepSizes().

◆ 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 91 of file vcs_util.cpp.

Referenced by vcs_VolPhase::setMolesFromVCSCheck(), VCS_SOLVE::vcs_dfe(), and VCS_SOLVE::vcs_report().

◆ newFalloff()

shared_ptr< Falloff > newFalloff ( const std::string &  type,
const vector_fp c 
)

Return a pointer to a new falloff function calculator.

Parameters
typeString identifier specifying the type of falloff function. The standard types match class names defined in Falloff.h. A factory class derived from FalloffFactory may define other types as well.
cinput vector of doubles which populates the falloff parameterization.
Returns
a pointer to a new Falloff class.

Definition at line 36 of file FalloffFactory.cpp.

◆ checkElectrochemReaction()

bool checkElectrochemReaction ( const XML_Node p,
Kinetics kin,
const XML_Node r 
)

Check to ensure that all electrochemical reactions are specified correctly.

This function ensures the user has correctly specified all electrochemical reactions. The routine counts the amount of charge (that is, number of electron elements specified for each species in each phase) for both reactants and products. If net charge transfer phases during a reaction, the reaction is electrochemical. If not already specified as such, the function defines the reaction as electrochemical, corrects the reaction attributes, and sets beta = 0.5.

Parameters
pThis is an XML node containing a description of the owning phase for the kinetics object.
kinThis is a pointer to a kinetics manager class.
rThis is the reaction node that is being evaluated
Returns
The function always returns true.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 220 of file importKinetics.cpp.

References Phase::charge(), XML_Node::child(), getStringArray(), XML_Node::hasChild(), Kinetics::kineticsSpeciesIndex(), Phase::name(), npos, parseCompString(), Phase::speciesIndex(), Kinetics::speciesPhase(), and XML_Node::value().

Referenced by installReactionArrays().

◆ newKineticsMgr() [1/2]

Kinetics * Cantera::newKineticsMgr ( XML_Node phase,
std::vector< ThermoPhase * >  th 
)
inline

Create a new kinetics manager.

Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 92 of file KineticsFactory.h.

Referenced by newKinetics().

◆ newKineticsMgr() [2/2]

Kinetics * Cantera::newKineticsMgr ( const std::string &  model)
inline

Create a new kinetics manager.

Definition at line 100 of file KineticsFactory.h.

◆ newKinetics() [1/3]

shared_ptr< Kinetics > Cantera::newKinetics ( const std::string &  model)
inline

Create a new Kinetics instance.

Definition at line 108 of file KineticsFactory.h.

References newKinetics().

Referenced by newKinetics(), and newSolution().

◆ newKinetics() [2/3]

unique_ptr< Kinetics > newKinetics ( const std::vector< ThermoPhase * > &  phases,
const AnyMap phaseNode,
const AnyMap rootNode = AnyMap() 
)

Create a new kinetics manager, initialize it, and add reactions

Parameters
phasesVector of phases containing species which participate in reactions, with the phase where the reactions occur (lowest-dimensional phase) listed first.
phaseNodePhase entry for the phase where the reactions occur. This phase definition is used to determine the source of the reactions added to the Kinetics object.
rootNodeThe root node of the file containing the phase definition, which will be treated as the default source for reactions

Definition at line 63 of file KineticsFactory.cpp.

References addReactions(), AnyMap::getString(), and newKinetics().

◆ newKinetics() [3/3]

unique_ptr< Kinetics > newKinetics ( const std::vector< ThermoPhase * > &  phases,
const std::string &  filename,
const std::string &  phase_name 
)

Create a new kinetics manager, initialize it, and add reactions

Parameters
phasesVector of phases containing species which participate in reactions, with the phase where the reactions occur (lowest-dimensional phase) listed first.
filenameFile containing the phase definition for the phase where the reactions occur. Searches the Cantera data for this file.
phase_nameThe name of the reacting phase in the input file (that is, the name of the first phase in the phases vector)

Definition at line 92 of file KineticsFactory.cpp.

References dot(), AnyMap::fromYamlFile(), get_XML_File(), get_XML_NameID(), newKinetics(), newKineticsMgr(), npos, and toLowerCopy().

◆ addReactions()

void addReactions ( Kinetics kin,
const AnyMap phaseNode,
const AnyMap rootNode = AnyMap() 
)

Add reactions to a Kinetics object

Parameters
kinThe Kinetics object to be initialized
phaseNodePhase entry for the phase where the reactions occur. This phase definition is used to determine the source of the reactions added to the Kinetics object.
rootNodeThe root node of the file containing the phase definition, which will be treated as the default source for reactions

Definition at line 118 of file KineticsFactory.cpp.

References AnyMap::at(), AnyMap::fromYamlFile(), AnyMap::getBool(), AnyMap::getString(), AnyMap::hasKey(), Kinetics::kineticsType(), Kinetics::skipUndeclaredSpecies(), and Kinetics::skipUndeclaredThirdBodies().

Referenced by newKinetics().

◆ newReaction() [1/3]

unique_ptr< Reaction > newReaction ( const std::string &  type)

Create a new empty Reaction object.

Parameters
typestring identifying type of reaction.
Deprecated:
To be removed after Cantera 2.6. Only used for legacy reaction types.

Definition at line 1307 of file Reaction.cpp.

Referenced by getReactions(), and installReactionArrays().

◆ newReaction() [2/3]

unique_ptr< Reaction > newReaction ( const XML_Node rxn_node)

Create a new Reaction object for the reaction defined in rxn_node

Parameters
rxn_nodeXML node describing reaction.

Definition at line 1315 of file Reaction.cpp.

◆ newReaction() [3/3]

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 1343 of file Reaction.cpp.

◆ getReactions() [1/2]

std::vector< shared_ptr< Reaction > > getReactions ( const XML_Node node)

Create Reaction objects for all <reaction> nodes in an XML document.

The <reaction> nodes are assumed to be children of the <reactionData> node in an XML document with a <ctml> root node, as in the case of XML files produced by conversion from CTI files.

This function can be used in combination with get_XML_File() and get_XML_from_string() to get Reaction objects from either a file or a string, respectively, where the string or file is formatted as either CTI or XML.

If Reaction objects are being created from a CTI definition that does not contain corresponding phase definitions, then one of the following must be true, or the resulting rate constants will be incorrect:

  • The rate constants are expressed in (kmol, meter, second) units
  • A units directive is included and all reactions take place in bulk (for example, gas) phases
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 2000 of file Reaction.cpp.

References XML_Node::child(), XML_Node::getChildren(), and newReaction().

◆ getReactions() [2/2]

std::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 2009 of file Reaction.cpp.

References AnyValue::asVector().

◆ parseReactionEquation()

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

Parse reaction equation.

Definition at line 1560 of file Reaction.cpp.

Referenced by Reaction::setEquation().

◆ setupReaction() [1/2]

void setupReaction ( Reaction R,
const XML_Node rxn_node 
)

Definition at line 1541 of file Reaction.cpp.

◆ setupElementaryReaction() [1/2]

void setupElementaryReaction ( ElementaryReaction2 R,
const XML_Node rxn_node 
)

Definition at line 1650 of file Reaction.cpp.

◆ setupElementaryReaction() [2/2]

void setupElementaryReaction ( ElementaryReaction2 R,
const AnyMap node,
const Kinetics kin 
)

May be changed without notice in future versions

Definition at line 1672 of file Reaction.cpp.

◆ setupThreeBodyReaction() [1/2]

void setupThreeBodyReaction ( ThreeBodyReaction2 R,
const XML_Node rxn_node 
)

Definition at line 1680 of file Reaction.cpp.

◆ setupThreeBodyReaction() [2/2]

void setupThreeBodyReaction ( ThreeBodyReaction2 R,
const AnyMap node,
const Kinetics kin 
)
Deprecated:
Cantera 2.6 (replaced by setParameters)

Definition at line 1689 of file Reaction.cpp.

◆ setupFalloffReaction() [1/2]

void setupFalloffReaction ( FalloffReaction2 R,
const XML_Node rxn_node 
)

Definition at line 1706 of file Reaction.cpp.

◆ setupFalloffReaction() [2/2]

void setupFalloffReaction ( FalloffReaction2 R,
const AnyMap node,
const Kinetics kin 
)
Deprecated:
Cantera 2.6 (replaced by setParameters)

Definition at line 1737 of file Reaction.cpp.

◆ setupChemicallyActivatedReaction()

void setupChemicallyActivatedReaction ( ChemicallyActivatedReaction2 R,
const XML_Node rxn_node 
)
Deprecated:
Cantera 2.6 (replaced by setParameters)

Definition at line 1783 of file Reaction.cpp.

◆ setupPlogReaction() [1/2]

void setupPlogReaction ( PlogReaction2 R,
const XML_Node rxn_node 
)

Definition at line 1812 of file Reaction.cpp.

◆ setupPlogReaction() [2/2]

void setupPlogReaction ( PlogReaction2 R,
const AnyMap node,
const Kinetics kin 
)
Deprecated:
Cantera 2.6 (replaced by setParameters)

Definition at line 1824 of file Reaction.cpp.

◆ setupChebyshevReaction() [1/2]

void setupChebyshevReaction ( ChebyshevReaction2 R,
const XML_Node rxn_node 
)

Definition at line 1841 of file Reaction.cpp.

◆ setupChebyshevReaction() [2/2]

void setupChebyshevReaction ( ChebyshevReaction2 R,
const AnyMap node,
const Kinetics kin 
)
Deprecated:
Cantera 2.6 (replaced by setParameters)

Definition at line 1864 of file Reaction.cpp.

◆ setupInterfaceReaction() [1/2]

void setupInterfaceReaction ( InterfaceReaction2 R,
const XML_Node rxn_node 
)

Definition at line 1892 of file Reaction.cpp.

◆ setupInterfaceReaction() [2/2]

void setupInterfaceReaction ( InterfaceReaction2 R,
const AnyMap node,
const Kinetics kin 
)

May be changed without notice in future versions

Definition at line 1922 of file Reaction.cpp.

◆ setupElectrochemicalReaction() [1/2]

void setupElectrochemicalReaction ( ElectrochemicalReaction2 R,
const XML_Node rxn_node 
)

Definition at line 1961 of file Reaction.cpp.

◆ setupElectrochemicalReaction() [2/2]

void setupElectrochemicalReaction ( ElectrochemicalReaction2 R,
const AnyMap node,
const Kinetics kin 
)

May be changed without notice in future versions

Definition at line 1991 of file Reaction.cpp.

◆ newReactionRate() [1/3]

shared_ptr< ReactionRate > newReactionRate ( const std::string &  type)

Create a new empty ReactionRate object.

Parameters
typestring identifying type of reaction rate.

Definition at line 103 of file ReactionRateFactory.cpp.

Referenced by newReactionRate(), and Reaction::Reaction().

◆ newReactionRate() [2/3]

shared_ptr< ReactionRate > newReactionRate ( const AnyMap rate_node,
const UnitStack rate_units 
)

Create a new Rate object using the specified parameters.

Parameters
rate_nodeAnyMap node describing reaction rate.
rate_unitsVector describing unit system of the reaction rate; each element specifies Unit and exponent applied to the unit.

Definition at line 109 of file ReactionRateFactory.cpp.

◆ newReactionRate() [3/3]

shared_ptr< ReactionRate > newReactionRate ( const AnyMap rate_node)

Create a new Rate object using the specified parameters.

Parameters
rate_nodeAnyMap node describing reaction rate.

Definition at line 138 of file ReactionRateFactory.cpp.

References AnyMap::at(), UnitSystem::convertTo(), newReactionRate(), and AnyMap::units().

◆ _multiply()

static void Cantera::_multiply ( InputIter  begin,
InputIter  end,
const Vec1 &  input,
Vec2 &  output 
)
inlinestatic

Definition at line 486 of file StoichManager.h.

◆ _incrementSpecies()

static void Cantera::_incrementSpecies ( InputIter  begin,
InputIter  end,
const Vec1 &  input,
Vec2 &  output 
)
inlinestatic

Definition at line 495 of file StoichManager.h.

◆ _decrementSpecies()

static void Cantera::_decrementSpecies ( InputIter  begin,
InputIter  end,
const Vec1 &  input,
Vec2 &  output 
)
inlinestatic

Definition at line 504 of file StoichManager.h.

◆ _incrementReactions()

static void Cantera::_incrementReactions ( InputIter  begin,
InputIter  end,
const Vec1 &  input,
Vec2 &  output 
)
inlinestatic

Definition at line 513 of file StoichManager.h.

◆ _decrementReactions()

static void Cantera::_decrementReactions ( InputIter  begin,
InputIter  end,
const Vec1 &  input,
Vec2 &  output 
)
inlinestatic

Definition at line 522 of file StoichManager.h.

◆ _resizeCoeffs()

static void Cantera::_resizeCoeffs ( InputIter  begin,
InputIter  end,
Indices &  ix 
)
inlinestatic

Definition at line 531 of file StoichManager.h.

◆ _derivatives()

static void Cantera::_derivatives ( InputIter  begin,
InputIter  end,
const Vec1 &  S,
const Vec2 &  R,
Vec3 &  jac 
)
inlinestatic

Definition at line 539 of file StoichManager.h.

◆ _scale()

static void Cantera::_scale ( InputIter  begin,
InputIter  end,
const Vec1 &  in,
Vec2 &  out,
double  factor 
)
inlinestatic

Definition at line 548 of file StoichManager.h.

◆ operator<<() [3/4]

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 323 of file BandMatrix.cpp.

References BandMatrix::nRows().

◆ ct_dgemv()

void Cantera::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 
)
inline

Definition at line 217 of file ctlapack.h.

◆ ct_dgbsv()

void Cantera::ct_dgbsv ( int  n,
int  kl,
int  ku,
int  nrhs,
doublereal *  a,
int  lda,
integer *  ipiv,
doublereal *  b,
int  ldb,
int &  info 
)
inline

Definition at line 235 of file ctlapack.h.

◆ ct_dgelss()

void Cantera::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 
)
inline

Definition at line 246 of file ctlapack.h.

◆ ct_dgbtrf()

void Cantera::ct_dgbtrf ( size_t  m,
size_t  n,
size_t  kl,
size_t  ku,
doublereal *  a,
size_t  lda,
integer *  ipiv,
int &  info 
)
inline

Definition at line 267 of file ctlapack.h.

◆ ct_dgbtrs()

void Cantera::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 
)
inline

Definition at line 280 of file ctlapack.h.

◆ ct_dgetrf()

void Cantera::ct_dgetrf ( size_t  m,
size_t  n,
doublereal *  a,
size_t  lda,
integer *  ipiv,
int &  info 
)
inline

Definition at line 303 of file ctlapack.h.

◆ ct_dgetrs()

void Cantera::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 
)
inline

Definition at line 314 of file ctlapack.h.

◆ ct_dgetri()

void Cantera::ct_dgetri ( int  n,
doublereal *  a,
int  lda,
integer *  ipiv,
doublereal *  work,
int  lwork,
int &  info 
)
inline

Definition at line 333 of file ctlapack.h.

◆ ct_dscal()

void Cantera::ct_dscal ( int  n,
doublereal  da,
doublereal *  dx,
int  incx 
)
inline

Definition at line 340 of file ctlapack.h.

◆ ct_dgeqrf()

void Cantera::ct_dgeqrf ( size_t  m,
size_t  n,
doublereal *  a,
size_t  lda,
doublereal *  tau,
doublereal *  work,
size_t  lwork,
int &  info 
)
inline

Definition at line 346 of file ctlapack.h.

◆ ct_dormqr()

void Cantera::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 
)
inline

Definition at line 358 of file ctlapack.h.

◆ ct_dtrtrs()

void Cantera::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 
)
inline

Definition at line 380 of file ctlapack.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.

◆ ct_dpotrf()

void Cantera::ct_dpotrf ( ctlapack::upperlower_t  uplot,
size_t  n,
doublereal *  a,
size_t  lda,
int &  info 
)
inline

Definition at line 433 of file ctlapack.h.

◆ ct_dpotrs()

void Cantera::ct_dpotrs ( ctlapack::upperlower_t  uplot,
size_t  n,
size_t  nrhs,
doublereal *  a,
size_t  lda,
doublereal *  b,
size_t  ldb,
int &  info 
)
inline

Definition at line 449 of file ctlapack.h.

◆ ct_dgecon()

doublereal Cantera::ct_dgecon ( const char  norm,
size_t  n,
doublereal *  a,
size_t  lda,
doublereal  anorm,
doublereal *  work,
int *  iwork,
int &  info 
)
inline

Definition at line 468 of file ctlapack.h.

◆ ct_dgbcon()

doublereal Cantera::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 
)
inline

Definition at line 489 of file ctlapack.h.

◆ ct_dlange()

doublereal Cantera::ct_dlange ( const char  norm,
size_t  m,
size_t  n,
doublereal *  a,
size_t  lda,
doublereal *  work 
)
inline

Definition at line 513 of file ctlapack.h.

◆ newDAE_Solver()

DAE_Solver * newDAE_Solver ( const std::string &  itype,
ResidJacEval f 
)

Factor method for choosing a DAE solver.

Parameters
itypeString identifying the type (IDA is the only option)
fResidual function to be solved by the DAE algorithm
Returns
a point to the instantiated DAE_Solver object

Definition at line 16 of file DAE_solvers.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 143 of file DenseMatrix.cpp.

Referenced by BasisOptimize(), ChemEquil::equilibrate(), ChemEquil::estimateElementPotentials(), MultiTransport::getMassFluxes(), MultiTransport::getSpeciesFluxes(), solveSP::solveSurfProb(), and VCS_SOLVE::vcs_basopt().

◆ 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 212 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 217 of file DenseMatrix.cpp.

Referenced by DustyGasTransport::getMolarFluxes(), MultiPhaseEquil::MultiPhaseEquil(), MultiPhaseEquil::stepComposition(), GasTransport::viscosity(), and IonGasTransport::viscosity().

◆ 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 222 of file DenseMatrix.cpp.

Referenced by DustyGasTransport::getMolarFluxes().

◆ 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 236 of file DenseMatrix.cpp.

Referenced by HighPressureGasTransport::getMultiDiffCoeffs(), MultiTransport::getMultiDiffCoeffs(), and DustyGasTransport::updateMultiDiffCoeffs().

◆ newSumFunction()

Func1 & newSumFunction ( Func1 f1,
Func1 f2 
)

Definition at line 467 of file Func1.cpp.

◆ newDiffFunction()

Func1 & newDiffFunction ( Func1 f1,
Func1 f2 
)

Definition at line 491 of file Func1.cpp.

◆ newProdFunction()

Func1 & newProdFunction ( Func1 f1,
Func1 f2 
)

Definition at line 513 of file Func1.cpp.

◆ newRatioFunction()

Func1 & newRatioFunction ( Func1 f1,
Func1 f2 
)

Definition at line 591 of file Func1.cpp.

◆ newCompositeFunction()

Func1 & newCompositeFunction ( Func1 f1,
Func1 f2 
)

Definition at line 613 of file Func1.cpp.

◆ newTimesConstFunction()

Func1 & newTimesConstFunction ( Func1 f1,
doublereal  c 
)

Definition at line 642 of file Func1.cpp.

◆ newPlusConstFunction()

Func1 & newPlusConstFunction ( Func1 f1,
doublereal  c 
)

Definition at line 658 of file Func1.cpp.

◆ linearInterp()

doublereal linearInterp ( doublereal  x,
const vector_fp xpts,
const vector_fp fpts 
)

Linearly interpolate a function defined on a discrete grid.

Vector xpts contains a monotonic sequence of grid points, and vector fpts contains function values defined at these points. The value returned is the linear interpolate at point x. If x is outside the range of xpts, the value of fpts at the nearest end is returned.

Parameters
xvalue of the x coordinate
xptsvalue of the grid points
fptsvalue of the interpolant at the grid points
Returns
the value of of the interpolated function at x.

Definition at line 15 of file funcs.cpp.

Referenced by StFlow::_finalize(), and Sim1D::setProfile().

◆ trapezoidal()

double trapezoidal ( const Eigen::ArrayXd &  f,
const Eigen::ArrayXd &  x 
)

Numerical integration of a function using the trapezoidal rule.

Vector x contanins 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 32 of file funcs.cpp.

Referenced by numericalQuadrature().

◆ simpson()

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.

For even number, Simpson's rule is used for the first N-2 intervals with a trapezoidal rule on the last interval.

Vector x contanins 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 90 of file funcs.cpp.

References basicSimpson().

Referenced by numericalQuadrature().

◆ numericalQuadrature()

double numericalQuadrature ( const std::string &  method,
const Eigen::ArrayXd &  f,
const Eigen::ArrayXd &  x 
)

Numerical integration of a function.

Vector x contanins 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
methodmethod name
fvector of function value
xvector of function coordinate

Definition at line 115 of file funcs.cpp.

References simpson(), and trapezoidal().

Referenced by PlasmaPhase::normalizeElectronEnergyDistribution(), and PlasmaPhase::updateElectronTemperatureFromEnergyDist().

◆ newIntegrator()

Integrator * newIntegrator ( const std::string &  itype)

Definition at line 13 of file ODE_integrators.cpp.

◆ polyfit()

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.

Given a collection of n points x and a set of values y of some function evaluated at those points, this function computes the weighted least-squares polynomial fit of degree deg:

\[ f(x) = p[0] + p[1]*x + p[2]*x^2 + \cdots + p[deg]*x^deg \]

Parameters
nThe number of points at which the function is evaluated
degThe degree of the polynomial fit to be computed. deg <= n - 1.
xArray of points at which the function is evaluated. Length n.
yArray of function values at the points in x. Length n.
wArray of weights. If w == nullptr or w[0] < 0, then all the weights will be set to 1.0.
[out]pArray of polynomial coefficients, starting with the constant term. Length deg+1.
Returns
the root mean squared error of the fit at the input points.

Definition at line 14 of file polyfit.cpp.

Referenced by GasTransport::fitDiffCoeffs(), IonGasTransport::fitDiffCoeffs(), GasTransport::fitProperties(), IonGasTransport::init(), and IonFlow::setElectronTransport().

◆ getElementWeight() [1/2]

double getElementWeight ( const std::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 207 of file Elements.cpp.

References atomicWeightData::atomicWeight, isotopeWeightData::atomicWeight, atomicWeightTable, isotopeWeightTable, numElementsDefined(), numIsotopesDefined(), toLowerCopy(), and trimCopy().

Referenced by Phase::addElement().

◆ 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 239 of file Elements.cpp.

References atomicWeightData::atomicWeight, atomicWeightTable, getElementName(), and numElementsDefined().

◆ getElementSymbol() [1/2]

string getElementSymbol ( const std::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 253 of file Elements.cpp.

References atomicWeightTable, isotopeWeightTable, numElementsDefined(), numIsotopesDefined(), atomicWeightData::symbol, isotopeWeightData::symbol, toLowerCopy(), and trimCopy().

◆ 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 271 of file Elements.cpp.

References atomicWeightTable, numElementsDefined(), and atomicWeightData::symbol.

◆ getElementName() [1/2]

string getElementName ( const std::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 281 of file Elements.cpp.

References atomicWeightTable, atomicWeightData::fullName, isotopeWeightData::fullName, isotopeWeightTable, numElementsDefined(), numIsotopesDefined(), and trimCopy().

Referenced by getElementWeight().

◆ 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 299 of file Elements.cpp.

References atomicWeightTable, atomicWeightData::fullName, and numElementsDefined().

◆ getAtomicNumber()

int getAtomicNumber ( const std::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 309 of file Elements.cpp.

References isotopeWeightData::atomicNumber, atomicWeightTable, isotopeWeightTable, numElementsDefined(), numIsotopesDefined(), toLowerCopy(), and trimCopy().

◆ numElementsDefined()

int numElementsDefined ( )

Get the number of named elements defined in Cantera.

This array excludes named isotopes

Definition at line 332 of file Elements.cpp.

References atomicWeightTable.

Referenced by getAtomicNumber(), getElementName(), getElementSymbol(), and getElementWeight().

◆ numIsotopesDefined()

int numIsotopesDefined ( )

Get the number of named isotopes defined in Cantera.

This array excludes the named elements

Definition at line 337 of file Elements.cpp.

References isotopeWeightTable.

Referenced by getAtomicNumber(), getElementName(), getElementSymbol(), and getElementWeight().

◆ newPDSS()

PDSS * newPDSS ( const std::string &  model)

Definition at line 45 of file PDSSFactory.cpp.

◆ newSpecies() [1/2]

shared_ptr< Species > newSpecies ( const XML_Node species_node)

Create a new Species object from a 'species' XML_Node.

Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 77 of file Species.cpp.

References XML_Node::attrib(), XML_Node::child(), XML_Node::findByName(), getFloat(), XML_Node::hasChild(), newSpeciesThermoInterpType(), newTransportData(), parseCompString(), and XML_Node::value().

Referenced by getSpecies(), and importPhase().

◆ newSpecies() [2/2]

unique_ptr< Species > newSpecies ( const AnyMap node)

Create a new Species object from an AnyMap specification.

Definition at line 130 of file Species.cpp.

References AnyMap::getDouble(), AnyMap::hasKey(), newSpeciesThermo(), newTransportData(), and AnyMap::units().

◆ getSpecies() [1/2]

std::vector< shared_ptr< Species > > getSpecies ( const XML_Node node)

Generate Species objects for all <species> nodes in an XML document.

The <species> nodes are assumed to be children of the <speciesData> node in an XML document with a <ctml> root node, as in the case of XML files produced by conversion from CTI files.

This function can be used in combination with get_XML_File and get_XML_from_string to get Species objects from either a file or a string, respectively, where the string or file is formatted as either CTI or XML.

Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 168 of file Species.cpp.

References XML_Node::child(), XML_Node::getChildren(), and newSpecies().

◆ getSpecies() [2/2]

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

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

Definition at line 177 of file Species.cpp.

References AnyValue::asVector(), and newSpecies().

◆ newSpeciesThermoInterpType() [1/3]

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 30 of file SpeciesThermoFactory.cpp.

Referenced by newConstCpThermoFromXML(), newNasaThermoFromXML(), newShomateThermoFromXML(), and newSpecies().

◆ newSpeciesThermoInterpType() [2/3]

SpeciesThermoInterpType * newSpeciesThermoInterpType ( const std::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 55 of file SpeciesThermoFactory.cpp.

◆ newSpeciesThermoInterpType() [3/3]

SpeciesThermoInterpType * newSpeciesThermoInterpType ( const XML_Node thermoNode)

Create a new SpeciesThermoInterpType object from XML_Node.

Parameters
thermoNode'thermo' XML_Node (child of the 'species' node) with child nodes representing parameterizations for one or more temperature ranges
Returns
the pointer to the newly allocated SpeciesThermoInterpType object
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 400 of file SpeciesThermoFactory.cpp.

References caseInsensitiveEquals(), XML_Node::children(), newConstCpThermoFromXML(), newMu0ThermoFromXML(), newNasa9ThermoFromXML(), newNasaThermoFromXML(), newShomateThermoFromXML(), and toLowerCopy().

◆ 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 455 of file SpeciesThermoFactory.cpp.

Referenced by newSpecies().

◆ newThermoPhase()

ThermoPhase * Cantera::newThermoPhase ( const std::string &  model)
inline

Create a new thermodynamic property manager.

Parameters
modelThe name of the thermo model
Returns
a pointer to a new ThermoPhase object of the type specified. Throws a CanteraError if the named model isn't registered with ThermoFactory.

Definition at line 98 of file ThermoFactory.h.

References Factory< T, Args >::create(), and ThermoFactory::factory().

Referenced by newPhase().

◆ newThermo()

shared_ptr< ThermoPhase > Cantera::newThermo ( const std::string &  model)
inline

Create a new ThermoPhase instance.

Parameters
modelString to look up the model against
Returns
a shared pointer to a new ThermoPhase instance matching the model string.

Definition at line 108 of file ThermoFactory.h.

References Factory< T, Args >::create(), and ThermoFactory::factory().

◆ newPhase() [1/2]

unique_ptr< ThermoPhase > newPhase ( const AnyMap phaseNode,
const AnyMap rootNode = AnyMap() 
)

Create a new ThermoPhase object and initialize it.

Parameters
phaseNodeThe node containing the phase definition (that is, thermo model, list of species, and initial state)
rootNodeThe root node of the tree containing the phase definition, which will be used as the default location from which to read species definitions.

Definition at line 122 of file ThermoFactory.cpp.

References AnyMap::hasKey(), newThermoPhase(), and setupPhase().

◆ newPhase() [2/2]

ThermoPhase * newPhase ( const std::string &  infile,
std::string  id = "" 
)

Create and Initialize a ThermoPhase object from an input file.

For YAML input files, this function uses AnyMap::fromYamlFile() to read the input file, newThermoPhase() to create an empty ThermoPhase of the appropriate type, and setupPhase() to initialize the phase.

For CTI and XML input files, this function uses get_XML_File() to read the input file and newPhase(XML_Node) to create and initialize the phase.

Parameters
infilename of the input file
idname (id) of the phase in the file. If this is blank, the first phase in the file is used.
Returns
an initialized ThermoPhase object.

Definition at line 134 of file ThermoFactory.cpp.

References dot(), AnyMap::fromYamlFile(), get_XML_File(), get_XML_NameID(), newPhase(), npos, and toLowerCopy().

◆ setupPhase()

void setupPhase ( ThermoPhase phase,
const AnyMap phaseNode,
const AnyMap rootNode = AnyMap() 
)

Initialize a ThermoPhase object.

Parameters
phaseThe ThermoPhase object to be initialized
phaseNodeThe node containing the phase definition (that is, thermo model, list of species, and initial state)
rootNodeThe root node of the tree containing the phase definition, which will be used as the default location from which to read species definitions.

Definition at line 460 of file ThermoFactory.cpp.

References Phase::addUndefinedElements(), AnyMap::at(), AnyMap::fromYamlFile(), AnyMap::getBool(), AnyMap::getString(), AnyMap::hasKey(), Phase::ignoreUndefinedElements(), ThermoPhase::initThermo(), Phase::nSpecies(), OneAtm, Phase::setName(), ThermoPhase::setParameters(), ThermoPhase::setState(), ThermoPhase::setState_TP(), Phase::species(), Phase::throwUndefinedElements(), and warn_deprecated().

Referenced by ThermoPhase::initThermoFile(), and newPhase().

◆ installElements()

void installElements ( Phase th,
const XML_Node phaseNode 
)

Add the elements given in an XML_Node tree to the specified phase.

Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 605 of file ThermoFactory.cpp.

References Phase::addElement(), XML_Node::attrib(), XML_Node::child(), ENTROPY298_UNKNOWN, XML_Node::findByAttr(), fpValue(), fpValueCheck(), get_XML_File(), getStringArray(), XML_Node::hasAttrib(), XML_Node::hasChild(), intValue(), and XML_Node::root().

Referenced by importPhase().

◆ speciesXML_Node()

const XML_Node * speciesXML_Node ( const std::string &  kname,
const XML_Node phaseSpeciesData 
)

Search an XML tree for species data.

This utility routine will search the XML tree for the species named by the string, kname. It will return the XML_Node pointer to the species data for that species. Failures of any kind return the null pointer.

Parameters
knameString containing the name of the species.
phaseSpeciesDataPointer to the XML speciesData element containing the species data for that phase.
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 666 of file ThermoFactory.cpp.

References XML_Node::getChildren(), and XML_Node::name().

◆ newTransportData() [1/2]

shared_ptr< TransportData > newTransportData ( const XML_Node transport_node)

Create a new TransportData object from a 'transport' XML_Node.

Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Definition at line 223 of file TransportData.cpp.

Referenced by newSpecies().

◆ newTransportData() [2/2]

unique_ptr< TransportData > newTransportData ( const AnyMap node)

Create a new TransportData object from an AnyMap specification.

Definition at line 236 of file TransportData.cpp.

References AnyMap::getString().

◆ newTransportMgr()

Transport * newTransportMgr ( const std::string &  model = "",
ThermoPhase thermo = 0,
int  log_level = 0 
)

Build a new transport manager using a transport manager that may not be the same as in the phase description and return a base class pointer to it.

Parameters
modelString name for the transport manager
thermoThermoPhase object
log_levellog level

Definition at line 107 of file TransportFactory.cpp.

References TransportFactory::factory(), and TransportFactory::newTransport().

Referenced by newSolution().

◆ operator==() [1/4]

bool Cantera::operator== ( const std::string &  lhs,
const AnyValue rhs 
)

Definition at line 734 of file AnyMap.cpp.

◆ operator!=() [1/4]

bool Cantera::operator!= ( const std::string &  lhs,
const AnyValue rhs 
)

Definition at line 739 of file AnyMap.cpp.

◆ operator==() [2/4]

bool Cantera::operator== ( const double &  lhs,
const AnyValue rhs 
)

Definition at line 825 of file AnyMap.cpp.

◆ operator!=() [2/4]

bool Cantera::operator!= ( const double &  lhs,
const AnyValue rhs 
)

Definition at line 830 of file AnyMap.cpp.

◆ operator==() [3/4]

bool Cantera::operator== ( const long int &  lhs,
const AnyValue rhs 
)

Definition at line 914 of file AnyMap.cpp.

◆ operator!=() [3/4]

bool Cantera::operator!= ( const long int &  lhs,
const AnyValue rhs 
)

Definition at line 919 of file AnyMap.cpp.

◆ operator==() [4/4]

bool Cantera::operator== ( const int &  lhs,
const AnyValue rhs 
)

Definition at line 924 of file AnyMap.cpp.

◆ operator!=() [4/4]

bool Cantera::operator!= ( const int &  lhs,
const AnyValue rhs 
)

Definition at line 929 of file AnyMap.cpp.

◆ get_modified_time()

int get_modified_time ( const std::string &  path)

Definition at line 41 of file application.cpp.

◆ pypath()

static string Cantera::pypath ( )
static

return the full path to the Python interpreter.

Use the environment variable PYTHON_CMD if it is set. If not, return the string 'python'.

Note, there are hidden problems here that really direct us to use a full pathname for the location of python. Basically the system call will use the shell /bin/sh, in order to launch python. This default shell may not be the shell that the user is employing. Therefore, the default path to python may be different during a system call than during the default user shell environment. This is quite a headache. The answer is to always set the PYTHON_CMD environmental variable in the user environment to an absolute path to locate the python executable. Then this issue goes away.

Definition at line 44 of file ct2ctml.cpp.

References trimCopy().

Referenced by ck2cti().

◆ call_ctml_writer()

static std::string Cantera::call_ctml_writer ( const std::string &  text,
bool  isfile 
)
static

Definition at line 82 of file ct2ctml.cpp.

◆ app()

static Application * Cantera::app ( )
static

◆ split_at_pound()

static void Cantera::split_at_pound ( const std::string &  src,
std::string &  file,
std::string &  id 
)
static

split a string at a '#' sign. Used to separate a file name from an id string.

Parameters
srcOriginal string to be split up. This is unchanged.
fileOutput string representing the first part of the string, which is the filename.
idOutput string representing the last part of the string, which is the id.

Definition at line 223 of file global.cpp.

References npos.

Referenced by get_XML_NameID(), and get_XML_Node().

◆ split_unit()

static std::pair< double, std::string > Cantera::split_unit ( const AnyValue v)
static

Definition at line 607 of file Units.cpp.

◆ findUnbackslashed()

static string::size_type Cantera::findUnbackslashed ( const std::string &  s,
const char  q,
std::string::size_type  istart = 0 
)
static

Find the first position of a character, q, in string, s, which is not immediately preceded by the backslash character.

Parameters
sInput string
qSearch for this character
istartDefaults to 0

Definition at line 137 of file xml.cpp.

References npos.

Referenced by XML_Reader::findQuotedString().

◆ hasChargedSpecies()

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

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

Definition at line 798 of file vcs_VolPhase.cpp.

References Phase::charge(), and Phase::nSpecies().

Referenced by chargeNeutralityElement(), and vcs_VolPhase::transferElementsFM().

◆ 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 812 of file vcs_VolPhase.cpp.

References ThermoPhase::chargeNeutralityNecessary(), and hasChargedSpecies().

Referenced by vcs_VolPhase::transferElementsFM().

◆ operator<<() [4/4]

std::ostream & Cantera::operator<< ( std::ostream &  s,
const Group g 
)

Definition at line 61 of file Group.cpp.

◆ updateUndeclared()

void Cantera::updateUndeclared ( std::vector< std::string > &  undeclared,
const Composition comp,
const Kinetics kin 
)

Definition at line 388 of file Reaction.cpp.

◆ isThreeBody()

bool Cantera::isThreeBody ( const Reaction R)

Definition at line 1269 of file Reaction.cpp.

◆ readArrhenius() [1/2]

Arrhenius2 Cantera::readArrhenius ( const XML_Node arrhenius_node)

Definition at line 1368 of file Reaction.cpp.

◆ readArrhenius() [2/2]

Arrhenius2 Cantera::readArrhenius ( const Reaction R,
const AnyValue rate,
const Kinetics kin,
const UnitSystem units,
int  pressure_dependence = 0 
)

Definition at line 1375 of file Reaction.cpp.

◆ readFalloff() [1/2]

void Cantera::readFalloff ( FalloffReaction2 R,
const XML_Node rc_node 
)

Parse falloff parameters, given a rateCoeff node.

<falloff type="Troe"> 0.5 73.2 5000. 9999. </falloff>

Definition at line 1405 of file Reaction.cpp.

◆ readFalloff() [2/2]

void Cantera::readFalloff ( FalloffReaction2 R,
const AnyMap node 
)

Definition at line 1446 of file Reaction.cpp.

◆ readEfficiencies() [1/2]

void Cantera::readEfficiencies ( ThirdBody tbody,
const XML_Node rc_node 
)

Definition at line 1485 of file Reaction.cpp.

◆ readEfficiencies() [2/2]

void Cantera::readEfficiencies ( ThirdBody tbody,
const AnyMap node 
)

Definition at line 1496 of file Reaction.cpp.

◆ detectEfficiencies()

bool Cantera::detectEfficiencies ( ThreeBodyReaction2 R)

Definition at line 1501 of file Reaction.cpp.

◆ setupReaction() [2/2]

void Cantera::setupReaction ( Reaction R,
const AnyMap node,
const Kinetics kin 
)

Definition at line 1627 of file Reaction.cpp.

◆ reactionLabel()

string Cantera::reactionLabel ( size_t  i,
size_t  kr,
size_t  nr,
const std::vector< size_t > &  slist,
const Kinetics s 
)

Definition at line 678 of file ReactionPath.cpp.

◆ calcWeightedNorm()

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

Definition at line 546 of file solveSP.cpp.

◆ calc_damping()

static doublereal Cantera::calc_damping ( doublereal  x[],
doublereal  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 500 of file solveSP.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 83 of file CVodesIntegrator.cpp.

References CVodesIntegrator::m_error_message.

◆ isConstant()

static bool Cantera::isConstant ( Func1 f)
static

Definition at line 413 of file Func1.cpp.

◆ isZero()

static bool Cantera::isZero ( Func1 f)
static

Definition at line 422 of file Func1.cpp.

◆ isOne()

static bool Cantera::isOne ( Func1 f)
static

Definition at line 431 of file Func1.cpp.

◆ isTimesConst()

static bool Cantera::isTimesConst ( Func1 f)
static

Definition at line 440 of file Func1.cpp.

◆ isExp()

static bool Cantera::isExp ( Func1 f)
static

Definition at line 449 of file Func1.cpp.

◆ isPow()

static bool Cantera::isPow ( Func1 f)
static

Definition at line 458 of file Func1.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 contanins 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 62 of file funcs.cpp.

Referenced by simpson().

◆ interp_est()

static int Cantera::interp_est ( const std::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 283 of file DebyeHuckel.cpp.

References caseInsensitiveEquals(), and cEST_solvent.

Referenced by DebyeHuckel::addSpecies().

◆ check_nParams()

static void Cantera::check_nParams ( const std::string &  method,
size_t  nParams,
size_t  m_formPitzerTemp 
)
static

Definition at line 389 of file HMWSoln.cpp.

◆ getSizedVector()

vector_fp Cantera::getSizedVector ( const AnyMap item,
const std::string &  key,
size_t  nCoeffs 
)

Definition at line 620 of file HMWSoln.cpp.

◆ assignTrimmed()

void Cantera::assignTrimmed ( AnyMap interaction,
const std::string &  key,
vector_fp values 
)

Definition at line 803 of file HMWSoln.cpp.

◆ factorOverlap()

static double Cantera::factorOverlap ( const std::vector< std::string > &  elnamesVN,
const vector_fp elemVectorN,
const size_t  nElementsN,
const std::vector< std::string > &  elnamesVI,
const vector_fp elemVectorI,
const size_t  nElementsI 
)
static

Return the factor overlap.

Parameters
elnamesVN
elemVectorN
nElementsN
elnamesVI
elemVectorI
nElementsI

Definition at line 448 of file IonsFromNeutralVPSSTP.cpp.

Referenced by IonsFromNeutralVPSSTP::initThermo().

◆ xlogx()

doublereal Cantera::xlogx ( doublereal  x)

Definition at line 46 of file MaskellSolidSolnPhase.cpp.

◆ newNasaThermoFromXML()

static SpeciesThermoInterpType * Cantera::newNasaThermoFromXML ( vector< XML_Node * >  nodes)
static

Create a NASA polynomial thermodynamic property parameterization for a species from a set ! of XML nodes.

This is called if a 'NASA' node is found in the XML input.

Parameters
nodesvector of 1 or 2 'NASA' XML_Nodes, each defining the coefficients for a temperature range

Definition at line 91 of file SpeciesThermoFactory.cpp.

References XML_Node::child(), fpValue(), getFloatArray(), XML_Node::hasAttrib(), NASA, newSpeciesThermoInterpType(), and OneAtm.

Referenced by newSpeciesThermoInterpType().

◆ setupSpeciesThermo()

void Cantera::setupSpeciesThermo ( SpeciesThermoInterpType thermo,
const AnyMap node 
)

Definition at line 147 of file SpeciesThermoFactory.cpp.

◆ setupNasaPoly()

void Cantera::setupNasaPoly ( NasaPoly2 thermo,
const AnyMap node 
)

Definition at line 155 of file SpeciesThermoFactory.cpp.

◆ newShomateThermoFromXML()

static SpeciesThermoInterpType * Cantera::newShomateThermoFromXML ( vector< XML_Node * > &  nodes)
static

Create a Shomate polynomial thermodynamic property parameterization for a species.

This is called if a 'Shomate' node is found in the XML input.

Parameters
nodesvector of 1 or 2 'Shomate' XML_Nodes, each defining the coefficients for a temperature range

Definition at line 184 of file SpeciesThermoFactory.cpp.

References fpValue(), getFloatArray(), newSpeciesThermoInterpType(), OneAtm, and SHOMATE.

Referenced by newSpeciesThermoInterpType().

◆ setupShomatePoly()

void Cantera::setupShomatePoly ( ShomatePoly2 thermo,
const AnyMap node 
)

Definition at line 251 of file SpeciesThermoFactory.cpp.

◆ newConstCpThermoFromXML()

static SpeciesThermoInterpType * Cantera::newConstCpThermoFromXML ( XML_Node f)
static

Create a "simple" constant heat capacity thermodynamic property parameterization for a ! species.

This is called if a 'const_cp' XML node is found

Parameters
f'const_cp' XML node

Definition at line 279 of file SpeciesThermoFactory.cpp.

References CONSTANT_CP, fpValue(), getFloat(), newSpeciesThermoInterpType(), and OneAtm.

Referenced by newSpeciesThermoInterpType().

◆ setupConstCp()

void Cantera::setupConstCp ( ConstCpPoly thermo,
const AnyMap node 
)

Definition at line 296 of file SpeciesThermoFactory.cpp.

◆ newNasa9ThermoFromXML()

static SpeciesThermoInterpType * Cantera::newNasa9ThermoFromXML ( const std::vector< XML_Node * > &  tp)
static

Create a NASA9 polynomial thermodynamic property parameterization for a species.

This is called if a 'NASA9' Node is found in the XML input.

Parameters
tpVector of XML Nodes that make up the parameterization

Definition at line 319 of file SpeciesThermoFactory.cpp.

References XML_Node::child(), fpValue(), getFloatArray(), XML_Node::hasAttrib(), XML_Node::hasChild(), XML_Node::name(), and OneAtm.

Referenced by newSpeciesThermoInterpType().

◆ setupNasa9Poly()

void Cantera::setupNasa9Poly ( Nasa9PolyMultiTempRegion thermo,
const AnyMap node 
)

Definition at line 358 of file SpeciesThermoFactory.cpp.

◆ setupMu0()

void Cantera::setupMu0 ( Mu0Poly thermo,
const AnyMap node 
)

Definition at line 377 of file SpeciesThermoFactory.cpp.

◆ formSpeciesXMLNodeList()

static void Cantera::formSpeciesXMLNodeList ( std::vector< XML_Node * > &  spDataNodeList,
std::vector< std::string > &  spNamesList,
vector_int spRuleList,
const std::vector< XML_Node * >  spArray_names,
const std::vector< XML_Node * >  spArray_dbases,
const vector_int  sprule 
)
static

Gather a vector of pointers to XML_Nodes for a phase.

Parameters
spDataNodeListOutput vector of pointer to XML_Nodes which contain the species XML_Nodes for the species in the current phase.
spNamesListOutput Vector of strings, which contain the names of the species in the phase
spRuleListOutput Vector of ints, which contain the value of sprule for each species in the phase
spArray_namesVector of pointers to the XML_Nodes which contains the names of the species in the phase
spArray_dbasesInput vector of pointers to species data bases. We search each data base for the required species names
spruleInput vector of sprule values

Definition at line 175 of file ThermoFactory.cpp.

References XML_Node::child(), XML_Node::getChildren(), getStringArray(), and XML_Node::nChildren().

Referenced by importPhase().

◆ addDefaultElements()

void Cantera::addDefaultElements ( ThermoPhase thermo,
const vector< string > &  element_names 
)

Definition at line 410 of file ThermoFactory.cpp.

◆ addElements()

void Cantera::addElements ( ThermoPhase thermo,
const vector< string > &  element_names,
const AnyValue elements,
bool  allow_default 
)

Definition at line 416 of file ThermoFactory.cpp.

◆ addSpecies()

void Cantera::addSpecies ( ThermoPhase thermo,
const AnyValue names,
const AnyValue species 
)

Definition at line 436 of file ThermoFactory.cpp.

◆ quadInterp()

doublereal Cantera::quadInterp ( doublereal  x0,
doublereal *  x,
doublereal *  y 
)

Definition at line 24 of file MMCollisionInt.cpp.

◆ Frot()

doublereal Cantera::Frot ( doublereal  tr,
doublereal  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.

References Pi.

Referenced by MultiTransport::init(), and MultiTransport::updateThermal_T().

◆ setupGasTransportData() [1/2]

void Cantera::setupGasTransportData ( GasTransportData tr,
const XML_Node tr_node 
)

Definition at line 176 of file TransportData.cpp.

◆ setupGasTransportData() [2/2]

void Cantera::setupGasTransportData ( GasTransportData tr,
const AnyMap node 
)

Definition at line 205 of file TransportData.cpp.

Variable Documentation

◆ Avogadro

const double Avogadro = 6.02214076e26

◆ Boltzmann

const double Boltzmann = 1.380649e-23

◆ Planck

const double Planck = 6.62607015e-34

Planck constant \( h \) [J-s].

Definition at line 72 of file ct_defs.h.

◆ ElectronCharge

const double ElectronCharge = 1.602176634e-19

◆ lightSpeed

const double lightSpeed = 299792458.0

Speed of Light in a vacuum \( c \) [m/s].

Definition at line 78 of file ct_defs.h.

Referenced by GasTransportData::getParameters(), and GasTransportData::setCustomaryUnits().

◆ OneAtm

const double OneAtm = 1.01325e5

◆ OneBar

const double OneBar = 1.0E5

One bar [Pa].

Definition at line 84 of file ct_defs.h.

◆ fineStructureConstant

const double fineStructureConstant = 7.2973525693e-3

Fine structure constant \( \alpha \) [].

Definition at line 95 of file ct_defs.h.

◆ ElectronMass

const double ElectronMass = 9.1093837015e-31

Electron Mass \( m_e \) [kg].

Definition at line 98 of file ct_defs.h.

◆ Planck_bar

const double Planck_bar = Planck / (2 * Pi)

Reduced Planck constant \( \hbar \) [m2-kg/s].

Deprecated:
Unused. To be removed after Cantera 2.6.

Definition at line 110 of file ct_defs.h.

◆ GasConstant

const double GasConstant = Avogadro * Boltzmann

Universal Gas Constant \( R_u \) [J/kmol/K].

Definition at line 113 of file ct_defs.h.

Referenced by BinarySolutionTabulatedThermo::_updateThermo(), SurfPhase::_updateThermo(), vcs_VolPhase::_updateVolPM(), TwoTempPlasmaRate::activationElectronEnergy(), ArrheniusBase::activationEnergy(), BlowersMaselRate::activationEnergy(), Reactor::addSensitivitySpeciesEnthalpy(), BlowersMaselRate::bondEnergy(), InterfaceKinetics::buildSurfaceArrhenius(), MixtureFugacityTP::calculatePsat(), MultiPhaseEquil::computeReactionSteps(), UnitSystem::convertActivationEnergy(), UnitSystem::convertActivationEnergyFrom(), IdealGasPhase::cp_mole(), IdealSolidSolnPhase::cp_mole(), IdealSolnGasVPSS::cp_mole(), LatticePhase::cp_mole(), PDSS_Nondimensional::cp_mole(), RedlichKwongMFTP::cp_mole(), SingleSpeciesTP::cp_mole(), PDSS_Molar::cp_R(), PDSS::cpDelp_mole(), MixtureFugacityTP::critCompressibility(), IdealGasPhase::cv_mole(), IdealSolnGasVPSS::cv_mole(), MargulesVPSSTP::cv_mole(), PDSS_IdealGas::cv_mole(), RedlichKisterVPSSTP::cv_mole(), RedlichKwongMFTP::cv_mole(), BlowersMaselRate::deltaH(), PDSS_IonsFromNeutral::density(), MixtureFugacityTP::densityCalc(), RedlichKwongMFTP::dpdVCalc(), PDSS_Nondimensional::enthalpy_mole(), PDSS_Molar::enthalpy_RT(), PDSS::enthalpyDelp_mole(), IdealGasPhase::entropy_mole(), IdealSolidSolnPhase::entropy_mole(), IdealSolnGasVPSS::entropy_mole(), LatticePhase::entropy_mole(), MixtureFugacityTP::entropy_mole(), PDSS_Nondimensional::entropy_mole(), SurfPhase::entropy_mole(), PDSS_Molar::entropy_R(), PDSS::entropyDelp_mole(), ChemEquil::estimateElementPotentials(), StFlow::evalResidual(), GasTransport::fitProperties(), IdealSolidSolnPhase::getChemPotentials_RT(), SurfPhase::getCp_R(), WaterSSTP::getCp_R(), BulkKinetics::getDeltaSSEntropy(), InterfaceKinetics::getDeltaSSEntropy(), PureFluidPhase::getEntropy_R(), SurfPhase::getEntropy_R(), WaterSSTP::getEntropy_R(), WaterSSTP::getGibbs_RT(), WaterSSTP::getIntEnergy_RT(), DustyGasTransport::getMolarFluxes(), ConstCpPoly::getParameters(), Mu0Poly::getParameters(), ShomatePoly::getParameters(), DebyeHuckel::getPartialMolarCp(), HMWSoln::getPartialMolarCp(), IdealGasPhase::getPartialMolarCp(), IdealMolalSoln::getPartialMolarCp(), IdealSolidSolnPhase::getPartialMolarCp(), IdealSolnGasVPSS::getPartialMolarCp(), LatticePhase::getPartialMolarCp(), SingleSpeciesTP::getPartialMolarCp(), SurfPhase::getPartialMolarCp(), DebyeHuckel::getPartialMolarEntropies(), HMWSoln::getPartialMolarEntropies(), IdealGasPhase::getPartialMolarEntropies(), IdealMolalSoln::getPartialMolarEntropies(), IdealSolidSolnPhase::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarEntropies(), IonsFromNeutralVPSSTP::getPartialMolarEntropies(), LatticePhase::getPartialMolarEntropies(), RedlichKwongMFTP::getPartialMolarEntropies(), SingleSpeciesTP::getPartialMolarEntropies(), SurfPhase::getPartialMolarEntropies(), MultiTransport::getThermalDiffCoeffs(), PDSS_Nondimensional::gibbs_mole(), PDSS_Molar::gibbs_RT(), PDSS::gibbsDelp_mole(), PDSS_ConstVol::intEnergy_mole(), PDSS_IdealGas::intEnergy_mole(), PDSS_IonsFromNeutral::intEnergy_mole(), PDSS_SSVol::intEnergy_mole(), ConstCpPoly::modifyOneHf298(), NasaPoly1::modifyOneHf298(), ShomatePoly::modifyOneHf298(), IdealGasPhase::pressure(), RedlichKwongMFTP::pressureDerivatives(), ConstCpPoly::reportHf298(), NasaPoly1::reportHf298(), ShomatePoly::reportHf298(), ThermoPhase::RT(), MargulesVPSSTP::s_update_dlnActCoeff_dT(), StickingCoverage::setContext(), UnitSystem::setDefaultActivationEnergy(), BlowersMaselRate::setDeltaH(), ShomatePoly::setParameters(), Mu0Poly::setParameters(), PDSS_ConstVol::setPressure(), PDSS_IdealGas::setPressure(), PDSS_SSVol::setPressure(), IdealGasPhase::setState_RP(), PDSS_IdealGas::setState_TR(), StickingCoverage::setStickingWeight(), PDSS_ConstVol::setTemperature(), PDSS_IdealGas::setTemperature(), PDSS_SSVol::setTemperature(), ShomatePoly::ShomatePoly(), PengRobinson::speciesCritTemperature(), PengRobinson::sresid(), StickingCoverage::stickingWeight(), Unit::Unit(), BlowersMaselRate::updateFromStruct(), InterfaceRateBase::updateFromStruct(), DustyGasTransport::updateKnudsenDiffCoeffs(), MultiTransport::updateThermal_T(), VCS_SOLVE::vcs_evalSS_TP(), VCS_SOLVE::vcs_prob_specifyFully(), VCS_SOLVE::vcs_report(), VCS_SOLVE::vcs_solve_TP(), and VCS_SOLVE::vcs_TP().

◆ logGasConstant

const double logGasConstant = std::log(GasConstant)

Definition at line 115 of file ct_defs.h.

◆ GasConst_cal_mol_K

const double GasConst_cal_mol_K = GasConstant / 4184.0

Universal gas constant in cal/mol/K.

Definition at line 118 of file ct_defs.h.

◆ logBoltz_Planck

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

log(k_b/h)

Deprecated:
Unused. To be removed after Cantera 2.6.

Definition at line 122 of file ct_defs.h.

◆ StefanBoltz

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].

Definition at line 125 of file ct_defs.h.

Referenced by StFlow::evalResidual(), and Wall::Q().

◆ Faraday

const double Faraday = ElectronCharge * Avogadro

◆ permeability_0

const double permeability_0 = 2 * fineStructureConstant * Planck / (ElectronCharge * ElectronCharge * lightSpeed)

Permeability of free space \( \mu_0 \) [N/A2].

Definition at line 131 of file ct_defs.h.

◆ epsilon_0

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

Permittivity of free space \( \varepsilon_0 \) [F/m].

Definition at line 134 of file ct_defs.h.

Referenced by GasTransport::makePolarCorrections(), GasTransport::setupCollisionParameters(), and IonGasTransport::setupN64().

◆ TV

const int TV = 100

Definition at line 144 of file ct_defs.h.

◆ HP

const int HP = 101

Definition at line 144 of file ct_defs.h.

◆ SP

const int SP = 102

Definition at line 144 of file ct_defs.h.

◆ PV

const int PV = 103

Definition at line 144 of file ct_defs.h.

◆ TP

const int TP = 104

Definition at line 144 of file ct_defs.h.

◆ UV

const int UV = 105

Definition at line 144 of file ct_defs.h.

◆ ST

const int ST = 106

Definition at line 145 of file ct_defs.h.

◆ SV

const int SV = 107

Definition at line 145 of file ct_defs.h.

◆ UP

const int UP = 108

Definition at line 145 of file ct_defs.h.

◆ VH

const int VH = 109

Definition at line 145 of file ct_defs.h.

◆ TH

const int TH = 110

Definition at line 145 of file ct_defs.h.

◆ SH

const int SH = 111

Definition at line 145 of file ct_defs.h.

◆ PX

const int PX = 112

Definition at line 146 of file ct_defs.h.

◆ TX

const int TX = 113

Definition at line 146 of file ct_defs.h.

◆ VT

const int VT = -100

Definition at line 147 of file ct_defs.h.

◆ PH

const int PH = -101

Definition at line 147 of file ct_defs.h.

◆ PS

const int PS = -102

Definition at line 147 of file ct_defs.h.

◆ VP

const int VP = -103

Definition at line 147 of file ct_defs.h.

◆ PT

const int PT = -104

Definition at line 147 of file ct_defs.h.

◆ VU

const int VU = -105

Definition at line 148 of file ct_defs.h.

◆ TS

const int TS = -106

Definition at line 148 of file ct_defs.h.

◆ VS

const int VS = -107

Definition at line 148 of file ct_defs.h.

◆ PU

const int PU = -108

Definition at line 148 of file ct_defs.h.

◆ HV

const int HV = -109

Definition at line 148 of file ct_defs.h.

◆ HT

const int HT = -110

Definition at line 149 of file ct_defs.h.

◆ HS

const int HS = -111

Definition at line 149 of file ct_defs.h.

◆ XP

const int XP = -112

Definition at line 149 of file ct_defs.h.

◆ XT

const int XT = -113

Definition at line 149 of file ct_defs.h.

◆ SmallNumber

const double SmallNumber = 1.e-300

◆ BigNumber

const double BigNumber = 1.e300

largest number to compare to inf.

Definition at line 155 of file ct_defs.h.

Referenced by BinarySolutionTabulatedThermo::_updateThermo(), HighPressureGasTransport::thermalConductivity(), and GasKinetics::updateKc().

◆ MaxExp

const double MaxExp = 690.775527898

largest x such that exp(x) is valid

Definition at line 157 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 161 of file ct_defs.h.

Referenced by StFlow::_finalize(), vcs_MultiPhaseEquil::equilibrate_HP(), MultiPhase::equilibrate_MultiPhaseEquil(), vcs_MultiPhaseEquil::equilibrate_SP(), getFloatArray(), FlowDevice::massFlowRate(), StFlow::save(), and StFlow::serialize().

◆ 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 170 of file ct_defs.h.

Referenced by Phase::addSpecies(), MultiPhaseEquil::computeReactionSteps(), HighPressureGasTransport::getBinaryDiffCoeffs(), MultiPhaseEquil::getComponents(), getFloatArray(), HighPressureGasTransport::getMultiDiffCoeffs(), OneDim::initTimeInteg(), MultiPhaseEquil::stepComposition(), MixTransport::update_C(), MultiTransport::update_C(), and DustyGasTransport::updateTransport_C().

◆ npos

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

index returned by functions to indicate "no position"

Definition at line 192 of file ct_defs.h.

Referenced by RedlichKisterVPSSTP::addBinaryInteraction(), Application::addDataDirectory(), GasKinetics::addFalloffReaction(), VCS_SOLVE::addOnePhaseSpecies(), VCS_SOLVE::addPhaseElements(), IonsFromNeutralVPSSTP::addSpecies(), Phase::addSpecies(), PlasmaPhase::addSpecies(), Phase::addSpeciesAlias(), GasKinetics::addThreeBodyReaction(), BasisOptimize(), InterfaceKinetics::buildSurfaceArrhenius(), HMWSoln::calcMolalitiesCropped(), IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions(), Reaction::checkBalance(), BandMatrix::checkColumns(), checkElectrochemReaction(), BandMatrix::checkRows(), XML_Node::child(), OneDim::component(), ConstPressureReactor::componentIndex(), FlowReactor::componentIndex(), IdealGasConstPressureReactor::componentIndex(), IdealGasReactor::componentIndex(), Reactor::componentIndex(), ct2ctml(), IonGasTransport::electricalConductivity(), MultiPhase::elementIndex(), Phase::elementIndex(), YAML::emitString(), ChemEquil::equilibrate(), ThermoPhase::equivalenceRatio(), MultiJac::eval(), OneDim::eval(), StFlow::eval(), Inlet1D::eval(), Symm1D::eval(), Outlet1D::eval(), OutletRes1D::eval(), Surf1D::eval(), ReactingSurf1D::eval(), StFlow::evalResidual(), ReactionPathDiagram::exportToDot(), MolalityVPSSTP::findCLMIndex(), Application::findInputFile(), XML_Reader::findQuotedString(), Phase::findSpeciesLower(), findUnbackslashed(), IonFlow::fixElectricField(), AnyMap::fromYamlFile(), MultiPhaseEquil::getComponents(), Phase::getCompositionFromMap(), getFloatArray(), getMap(), getMatrixValues(), IonsFromNeutralVPSSTP::getNeutralMoleculeMoleGrads(), getPairs(), LatticeSolidPhase::getSpeciesParameters(), importKinetics(), MultiPhase::init(), InterfaceKinetics::init(), ChemEquil::initialize(), BinarySolutionTabulatedThermo::initThermo(), IonsFromNeutralVPSSTP::initThermo(), PlasmaPhase::initThermo(), WaterSSTP::initThermo(), ThermoPhase::initThermoFile(), BinarySolutionTabulatedThermo::initThermoXML(), ThirdBodyCalc3::install(), installReactionArrays(), Kinetics::kineticsSpeciesIndex(), Kinetics::kineticsSpeciesName(), PDSS_HKFT::LookupGe(), Phase::massFraction(), LatticeSolidPhase::maxTemp(), MultiSpeciesThermo::maxTemp(), VPStandardStateTP::maxTemp(), LatticeSolidPhase::minTemp(), MultiSpeciesThermo::minTemp(), VPStandardStateTP::minTemp(), ThermoPhase::mixtureFraction(), Phase::moleFraction(), newKinetics(), newPhase(), newSolution(), ThermoPhase::o2Required(), FlowDevice::outletSpeciesMassFlowRate(), parseCompString(), parseSpeciesName(), XML_Reader::parseTag(), Kinetics::phaseIndex(), HMWSoln::readXMLBinarySalt(), RedlichKisterVPSSTP::readXMLBinarySpecies(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsi(), HMWSoln::readXMLTheta(), HMWSoln::readXMLZetaCation(), MultiSpeciesThermo::refPressure(), HMWSoln::relative_molal_enthalpy(), LatticeSolidPhase::resetHf298(), ThermoPhase::resetHf298(), OneDim::resize(), vcs_VolPhase::resize(), Sim1D::restore(), Inlet1D::restore(), OutletRes1D::restore(), ReactingSurf1D::restore(), StFlow::restore(), Reactor::setAdvanceLimit(), DebyeHuckel::setBeta(), PengRobinson::setBinaryCoeffs(), RedlichKwongMFTP::setBinaryCoeffs(), ThermoPhase::setEquivalenceRatio(), Sim1D::setFixedTemperature(), ReactorSurface::setKinetics(), ThermoPhase::setMixtureFraction(), MolalityVPSSTP::setMolalitiesByName(), vcs_VolPhase::setMolesFromVCS(), Reaction::setParameters(), Mu0Poly::setParameters(), PengRobinson::setSpeciesCoeffs(), RedlichKwongMFTP::setSpeciesCoeffs(), Domain1D::setSteadyTolerances(), Domain1D::setTransientTolerances(), OneDim::solve(), MultiNewton::solve(), IonFlow::solveElectricField(), solveSP::solveSP(), Phase::species(), Phase::speciesIndex(), Reactor::speciesIndex(), MultiPhase::speciesIndex(), Kinetics::speciesPhase(), Kinetics::speciesPhaseIndex(), split_at_pound(), OneDim::ssnorm(), MultiNewton::step(), StFlow::StFlow(), ThermoPhase::stoichAirFuelRatio(), Unit::toSI(), vcs_VolPhase::transferElementsFM(), Units::Units(), InterfaceKinetics::updateKc(), StFlow::updateProperties(), VCS_SOLVE::vcs_basopt(), VCS_SOLVE::vcs_elcorr(), VCS_SOLVE::vcs_phaseStabilityTest(), VCS_SOLVE::vcs_popPhaseID(), VCS_SOLVE::vcs_RxnStepSizes(), and XML_Node::write_int().

◆ 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 17 of file BasisOptimize.cpp.

Referenced by BasisOptimize(), and ElemRearrange().

◆ 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 41 of file vcs_solve.cpp.

Referenced by VCS_SOLVE::disableTiming(), and VCS_SOLVE::VCS_SOLVE().

◆ INVALID_RXN

const int INVALID_RXN = 0

Definition at line 19 of file reaction_defs.h.

◆ NONE

const int NONE = 0

Definition at line 20 of file reaction_defs.h.

◆ ELEMENTARY_RXN

const int ELEMENTARY_RXN = 1

A reaction with a rate coefficient that depends only on temperature and voltage that also obeys mass-action kinetics.

Here mass-action kinetics is defined as the reaction orders being equal to the reaction's stoichiometry.

temperature. Example: O + OH <-> O2 + H

Definition at line 34 of file reaction_defs.h.

◆ THREE_BODY_RXN

const int THREE_BODY_RXN = 2

A gas-phase reaction that requires a third-body collision partner.

Example: O2 + M <-> O + O + M

Definition at line 40 of file reaction_defs.h.

◆ FALLOFF_RXN

const int FALLOFF_RXN = 4

The general form for a gas-phase association or dissociation reaction, with a pressure-dependent rate.

Example: CH3 + H (+M) <-> CH4 (+M)

Definition at line 46 of file reaction_defs.h.

Referenced by FalloffMgr::install().

◆ PLOG_RXN

const int PLOG_RXN = 5

A pressure-dependent rate expression consisting of several Arrhenius rate expressions evaluated at different pressures.

The final rate is calculated by logarithmically interpolating between the two rates that bracket the current pressure.

Definition at line 54 of file reaction_defs.h.

◆ CHEBYSHEV_RXN

const int CHEBYSHEV_RXN = 6

A general gas-phase pressure-dependent reaction where k(T,P) is defined in terms of a bivariate Chebyshev polynomial.

Definition at line 60 of file reaction_defs.h.

◆ CHEMACT_RXN

const int CHEMACT_RXN = 8

A chemical activation reaction.

For these reactions, the rate falls off as the pressure increases, due to collisional stabilization of a reaction intermediate. Example: Si + SiH4 (+M) <-> Si2H2 + H2 (+M), which competes with Si + SiH4 (+M) <-> Si2H4 (+M).

Definition at line 68 of file reaction_defs.h.

◆ SURFACE_RXN

const int SURFACE_RXN = 20

A reaction occurring on a surface.

NOTE: This is a bit ambiguous, and will be taken out in the future The dimensionality of the interface is a separate concept from the type of the reaction.

Definition at line 76 of file reaction_defs.h.

Referenced by InterfaceKinetics::addReaction(), and InterfaceKinetics::modifyReaction().

◆ INTERFACE_RXN

const int INTERFACE_RXN = 20

A reaction occurring on an interface, e.g a surface or edge.

Definition at line 79 of file reaction_defs.h.

◆ cDirect

const int cDirect = 0

Definition at line 60 of file DAE_Solver.h.

◆ cKrylov

const int cKrylov = 1

Definition at line 61 of file DAE_Solver.h.

◆ FourierFuncType

const int FourierFuncType = 1

Definition at line 19 of file Func1.h.

◆ PolyFuncType

const int PolyFuncType = 2

Definition at line 20 of file Func1.h.

◆ ArrheniusFuncType

const int ArrheniusFuncType = 3

Definition at line 21 of file Func1.h.

◆ GaussianFuncType

const int GaussianFuncType = 4

Definition at line 22 of file Func1.h.

◆ SumFuncType

const int SumFuncType = 20

Definition at line 23 of file Func1.h.

◆ DiffFuncType

const int DiffFuncType = 25

Definition at line 24 of file Func1.h.

◆ ProdFuncType

const int ProdFuncType = 30

Definition at line 25 of file Func1.h.

◆ RatioFuncType

const int RatioFuncType = 40

Definition at line 26 of file Func1.h.

◆ PeriodicFuncType

const int PeriodicFuncType = 50

Definition at line 27 of file Func1.h.

◆ CompositeFuncType

const int CompositeFuncType = 60

Definition at line 28 of file Func1.h.

◆ TimesConstantFuncType

const int TimesConstantFuncType = 70

Definition at line 29 of file Func1.h.

◆ PlusConstantFuncType

const int PlusConstantFuncType = 80

Definition at line 30 of file Func1.h.

◆ SinFuncType

const int SinFuncType = 100

Definition at line 31 of file Func1.h.

◆ CosFuncType

const int CosFuncType = 102

Definition at line 32 of file Func1.h.

◆ ExpFuncType

const int ExpFuncType = 104

Definition at line 33 of file Func1.h.

◆ PowFuncType

const int PowFuncType = 106

Definition at line 34 of file Func1.h.

◆ ConstFuncType

const int ConstFuncType = 110

Definition at line 35 of file Func1.h.

◆ TabulatedFuncType

const int TabulatedFuncType = 120

Definition at line 36 of file Func1.h.

◆ DIAG

const int DIAG = 1

Definition at line 21 of file Integrator.h.

◆ DENSE

const int DENSE = 2

Definition at line 22 of file Integrator.h.

◆ NOJAC

const int NOJAC = 4

Definition at line 23 of file Integrator.h.

◆ JAC

const int JAC = 8

Definition at line 24 of file Integrator.h.

◆ GMRES

const int GMRES = 16

Definition at line 25 of file Integrator.h.

◆ BAND

const int BAND = 32

Definition at line 26 of file Integrator.h.

◆ c_NONE

const int c_NONE = 0

Definition at line 17 of file ResidEval.h.

◆ c_GE_ZERO

const int c_GE_ZERO = 1

Definition at line 18 of file ResidEval.h.

◆ c_GT_ZERO

const int c_GT_ZERO = 2

Definition at line 19 of file ResidEval.h.

◆ c_LE_ZERO

const int c_LE_ZERO = -1

Definition at line 20 of file ResidEval.h.

◆ c_LT_ZERO

const int c_LT_ZERO = -2

Definition at line 21 of file ResidEval.h.

◆ LeftInlet

const int LeftInlet = 1

Definition at line 21 of file Boundary1D.h.

◆ RightInlet

const int RightInlet = -1

Definition at line 22 of file Boundary1D.h.

◆ cFlowType

const int cFlowType = 50

Definition at line 15 of file Domain1D.h.

◆ cFreeFlow

const int cFreeFlow = 51

Definition at line 16 of file Domain1D.h.

◆ cAxisymmetricStagnationFlow

const int cAxisymmetricStagnationFlow = 52

Definition at line 17 of file Domain1D.h.

◆ cConnectorType

const int cConnectorType = 100

Definition at line 18 of file Domain1D.h.

◆ cSurfType

const int cSurfType = 102

Definition at line 19 of file Domain1D.h.

◆ cInletType

const int cInletType = 104

Definition at line 20 of file Domain1D.h.

◆ cSymmType

const int cSymmType = 105

Definition at line 21 of file Domain1D.h.

◆ cOutletType

const int cOutletType = 106

Definition at line 22 of file Domain1D.h.

◆ cEmptyType

const int cEmptyType = 107

Definition at line 23 of file Domain1D.h.

◆ cOutletResType

const int cOutletResType = 108

Definition at line 24 of file Domain1D.h.

◆ cPorousType

const int cPorousType = 109

Definition at line 25 of file Domain1D.h.

◆ c_offset_U

const size_t c_offset_U = 0

Definition at line 22 of file StFlow.h.

◆ c_offset_V

const size_t c_offset_V = 1

Definition at line 23 of file StFlow.h.

◆ c_offset_T

const size_t c_offset_T = 2

Definition at line 24 of file StFlow.h.

◆ c_offset_L

const size_t c_offset_L = 3

Definition at line 25 of file StFlow.h.

◆ c_offset_E

const size_t c_offset_E = 4

Definition at line 26 of file StFlow.h.

◆ c_offset_Y

const size_t c_offset_Y = 5

Definition at line 27 of file StFlow.h.

◆ cEST_solvent

const int cEST_solvent = 0

Electrolyte species type.

Definition at line 18 of file electrolytes.h.

Referenced by DebyeHuckel::addSpecies(), DebyeHuckel::getSpeciesParameters(), and interp_est().

◆ cEST_chargedSpecies

const int cEST_chargedSpecies = 1

Definition at line 19 of file electrolytes.h.

◆ cEST_weakAcidAssociated

const int cEST_weakAcidAssociated = 2

Definition at line 20 of file electrolytes.h.

◆ cEST_strongAcidAssociated

const int cEST_strongAcidAssociated = 3

Definition at line 26 of file electrolytes.h.

◆ cEST_polarNeutral

const int cEST_polarNeutral = 4

Definition at line 31 of file electrolytes.h.

◆ cEST_nonpolarNeutral

const int cEST_nonpolarNeutral = 5

Definition at line 32 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 626 of file MolalityVPSSTP.h.

Referenced by HMWSoln::applyphScale(), HMWSoln::s_updateScaling_pHScaling(), HMWSoln::s_updateScaling_pHScaling_dP(), HMWSoln::s_updateScaling_pHScaling_dT(), HMWSoln::s_updateScaling_pHScaling_dT2(), and MolalityVPSSTP::setpHScale().

◆ 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 651 of file MolalityVPSSTP.h.

Referenced by HMWSoln::applyphScale(), HMWSoln::s_updateScaling_pHScaling(), HMWSoln::s_updateScaling_pHScaling_dP(), HMWSoln::s_updateScaling_pHScaling_dT(), HMWSoln::s_updateScaling_pHScaling_dT2(), and MolalityVPSSTP::setpHScale().

◆ cAC_CONVENTION_MOLAR

const int cAC_CONVENTION_MOLAR = 0

Standard state uses the molar convention

Definition at line 27 of file ThermoPhase.h.

Referenced by ThermoPhase::activityConvention().

◆ cAC_CONVENTION_MOLALITY

const int cAC_CONVENTION_MOLALITY = 1

Standard state uses the molality convention.

Definition at line 29 of file ThermoPhase.h.

Referenced by MolalityVPSSTP::activityConvention().

◆ cSS_CONVENTION_TEMPERATURE

const int cSS_CONVENTION_TEMPERATURE = 0

Standard state uses the molar convention

Definition at line 37 of file ThermoPhase.h.

Referenced by MixtureFugacityTP::standardStateConvention().

◆ cSS_CONVENTION_VPSS

const int cSS_CONVENTION_VPSS = 1

Standard state uses the molality convention.

Definition at line 39 of file ThermoPhase.h.

Referenced by importPhase(), and VPStandardStateTP::standardStateConvention().

◆ cSS_CONVENTION_SLAVE

const int cSS_CONVENTION_SLAVE = 2

Standard state thermodynamics is obtained from slave ThermoPhase objects.

Definition at line 41 of file ThermoPhase.h.

Referenced by importPhase(), and LatticeSolidPhase::standardStateConvention().

◆ dir_mutex

std::mutex dir_mutex
static

Mutex for input directory access.

Definition at line 33 of file application.cpp.

Referenced by Application::addDataDirectory(), and Application::findInputFile().

◆ app_mutex

std::mutex app_mutex
static

Mutex for creating singletons within the application object.

Definition at line 36 of file application.cpp.

Referenced by Application::ApplicationDestroy(), and Application::Instance().

◆ xml_mutex

std::mutex xml_mutex
static

Mutex for controlling access to XML file storage.

Definition at line 39 of file application.cpp.

Referenced by Application::close_XML_File(), Application::get_XML_File(), and Application::get_XML_from_string().

◆ msg_mutex

std::mutex msg_mutex
static

Mutex for access to string messages.

Definition at line 106 of file application.cpp.

Referenced by Application::ThreadMessages::operator->(), and Application::ThreadMessages::removeThreadMessages().

◆ stars

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

Definition at line 17 of file ctexceptions.cpp.

◆ FP_Format

std::string FP_Format = "%23.15E"

Definition at line 19 of file ctml.cpp.

◆ USEDBEFORE

const double USEDBEFORE = -1
static

Definition at line 18 of file BasisOptimize.cpp.

◆ DampFactor

const doublereal DampFactor = sqrt(2.0)

Definition at line 129 of file MultiNewton.cpp.

◆ NDAMP

const size_t NDAMP = 7

Definition at line 130 of file MultiNewton.cpp.

◆ atomicWeightTable

static struct 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 69 of file Elements.cpp.

Referenced by getAtomicNumber(), getElementName(), getElementSymbol(), getElementWeight(), and numElementsDefined().

◆ isotopeWeightTable

static struct 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:66
const double ElectronMass
Electron Mass [kg].
Definition: ct_defs.h:98

isotopeWeightTable is a vector containing the atomic weights database.

isotopeWeightTable[] is a static function 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 199 of file Elements.cpp.

Referenced by getAtomicNumber(), getElementName(), getElementSymbol(), getElementWeight(), and numIsotopesDefined().

◆ T_c

const doublereal T_c = 647.096

◆ P_c

const doublereal P_c = 22.064E6
static

Critical Pressure (Pascals)

Definition at line 22 of file WaterPropsIAPWS.cpp.

Referenced by WaterPropsIAPWS::density(), and WaterPropsIAPWS::psat().

◆ Rho_c

const doublereal Rho_c = 322.

◆ M_water

const doublereal M_water = 18.015268
static

Molecular Weight of water that is consistent with the paper (kg kmol-1)

Definition at line 26 of file WaterPropsIAPWS.cpp.

Referenced by WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::molarVolume(), and WaterPropsIAPWS::pressure().

◆ Rgas

const doublereal Rgas = 8.314371E3
static

◆ DeltaDegree

const int DeltaDegree = 6

Definition at line 18 of file MMCollisionInt.cpp.

◆ Min_C_Internal

const doublereal Min_C_Internal = 0.001
static

Constant to compare dimensionless heat capacities against zero.

Definition at line 484 of file MultiTransport.cpp.