Cantera
2.2.1
|
Namespace for the Cantera kernel. More...
Classes | |
class | Application |
Class to hold global data. More... | |
class | Unit |
Unit conversion utility. More... | |
class | XML_Error |
Classs representing a generic XML error condition. More... | |
class | XML_TagMismatch |
Class representing a specific type of XML file formatting error. More... | |
class | XML_NoChild |
Class representing a specific type of XML file formatting error. More... | |
class | PropertyCalculator |
Classes used by ChemEquil. More... | |
class | CVodeErr |
Exception thrown when a CVODE error is encountered. More... | |
class | CVodeInt |
Wrapper class for 'CVODE' integrator from LLNL. 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... | |
struct | awData |
class | ElementsFrozen |
Exception class to indicate a fixed set of elements. More... | |
class | NasaThermo |
A species thermodynamic property manager for the NASA polynomial parameterization with two temperature ranges. More... | |
class | ShomateThermo |
A species thermodynamic property manager for the Shomate polynomial parameterization. More... | |
class | UnknownVPSSMgrModel |
Throw a named error for an unknown or missing vpss species thermo model. More... | |
class | VPSSMgrFactory |
Factory to build instances of classes that manage the standard-state thermodynamic properties of a set of species. More... | |
class | LTPError |
Exception thrown if an error is encountered while reading the transport database. More... | |
class | LTPmodelError |
Exception thrown if an error is encountered while reading the transport database. More... | |
class | MMCollisionInt |
Calculation of Collision integrals. More... | |
class | TransportDBError |
Exception thrown if an error is encountered while reading the transport database. More... | |
class | Array2D |
A class for 2D arrays stored in column-major (Fortran-compatible) form. More... | |
class | clockWC |
The class provides the wall clock timer in seconds. More... | |
class | CanteraError |
Base class for exceptions thrown by Cantera classes. More... | |
class | ArraySizeError |
Array size error. More... | |
class | IndexError |
An array index is out of range. More... | |
class | NotImplementedError |
An error indicating that an unimplemented function has been called. More... | |
class | FactoryBase |
Base class for factories. More... | |
class | Logger |
Base class for 'loggers' that write text messages to log files. More... | |
struct | timesConstant |
Unary operator to multiply the argument by a constant. More... | |
struct | CachedValue |
class | ValueCache |
class | XML_Reader |
Class XML_Reader reads an XML file into an XML_Node object. More... | |
class | XML_Node |
Class XML_Node is a tree-based representation of the contents of an XML file. More... | |
class | Edge |
Convenience class which inherits from both EdgePhase and EdgeKinetics. More... | |
class | EquilOpt |
Chemical equilibrium options. More... | |
class | ChemEquil |
Class ChemEquil implements a chemical equilibrium solver for single-phase solutions. More... | |
class | MultiPhase |
A class for multiphase mixtures. More... | |
class | MultiPhaseEquil |
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_PROB |
Interface class for the vcs thermo equilibrium solver package, which generally describes the problem to be solved. 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 | IdealGasMix |
Convenience class which inherits from both IdealGasPhase and GasKinetics. More... | |
class | IncompressibleSolid |
Wrapper for ConstDensityThermo with constructor from file. More... | |
class | Interface |
An interface between multiple bulk phases. More... | |
class | AqueousKinetics |
Kinetics manager for elementary aqueous-phase chemistry. More... | |
class | BulkKinetics |
Partial specialization of Kinetics for chemistry in a single bulk phase. More... | |
class | EdgeKinetics |
Heterogeneous reactions at one-dimensional interfaces between multiple adjacent two-dimensional surfaces. More... | |
class | ElectrodeKinetics |
A kinetics manager for heterogeneous reaction mechanisms. More... | |
class | Enhanced3BConc |
Computes enhanced third-body concentrations. More... | |
class | ExtraGlobalRxn |
Class describing an extra global reaction, which is defined as a linear combination of actuals reactions, global or mass-action, creating a global stoichiometric result. More... | |
class | Falloff |
Base class for falloff function calculators. More... | |
class | Troe |
The 3- or 4-parameter Troe falloff parameterization. More... | |
class | SRI |
The SRI falloff function. 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 | GasKinetics |
Kinetics manager for elementary gas-phase chemistry. More... | |
class | Group |
Class Group is an internal class used by class ReactionPath. More... | |
class | ImplicitSurfChem |
Advances the surface coverages of the associated set of SurfacePhase objects in time. More... | |
struct | ReactionRules |
Rules for parsing and installing reactions. More... | |
class | RxnOrders |
forward orders More... | |
class | InterfaceKinetics |
A kinetics manager for heterogeneous reaction mechanisms. More... | |
class | Kinetics |
Public interface for kinetics managers. More... | |
class | KineticsFactory |
Factory for kinetics managers. More... | |
class | Rate1 |
This rate coefficient manager supports one parameterization of the rate constant of any type. More... | |
class | Reaction |
Intermediate class which stores data about a reaction and its rate parameterization so that it can be added to a Kinetics object. More... | |
class | ElementaryReaction |
A reaction which follows mass-action kinetics with a modified Arrhenius reaction rate. More... | |
class | ThirdBody |
A class for managing third-body efficiencies, including default values. More... | |
class | ThreeBodyReaction |
A reaction with a non-reacting third body "M" that acts to add or remove energy from the reacting species. More... | |
class | FalloffReaction |
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 | ChemicallyActivatedReaction |
A reaction where the rate decreases as pressure increases due to collisional stabilization of a reaction intermediate. More... | |
class | PlogReaction |
A pressure-dependent reaction parameterized by logarithmically interpolating between Arrhenius rate expressions at various pressures. More... | |
class | ChebyshevReaction |
A pressure-dependent reaction parameterized by a bi-variate Chebyshev polynomial in temperature and pressure. More... | |
struct | CoverageDependency |
Modifications to an InterfaceReaction rate based on a surface species coverage. More... | |
class | InterfaceReaction |
A reaction occurring on an interface (i.e. a SurfPhase or an EdgePhase) More... | |
class | ElectrochemicalReaction |
An interface reaction which involves charged species. More... | |
class | ReactionData |
Intermediate class which stores data about a reaction and its rate parameterization before adding the reaction to a Kinetics object. More... | |
class | SpeciesNode |
Nodes in reaction path graphs. More... | |
class | ReactionPathDiagram |
Reaction path diagrams (graphs). More... | |
class | ReactionStoichMgr |
Reaction mechanism stoichiometry manager. More... | |
class | RxnMolChange |
Class that includes some bookeeping entries for a reaction or a global reaction defined on a surface. More... | |
class | Arrhenius |
Arrhenius reaction rate type depends only on temperature. More... | |
class | SurfaceArrhenius |
An Arrhenius rate with coverage-dependent terms. More... | |
class | ExchangeCurrent |
Arrhenius reaction rate type depends only on temperature. More... | |
class | Plog |
Pressure-dependent reaction rate expressed by logarithmically interpolating between Arrhenius rate expressions at various pressures. More... | |
class | ChebyshevRate |
Pressure-dependent rate expression where the rate coefficient is expressed as a bivariate Chebyshev polynomial in temperature and pressure. More... | |
class | solveSP |
Method to solve a pseudo steady state surface problem. More... | |
class | C1 |
Handles one species in a reaction. More... | |
class | C2 |
Handles two species in a single reaction. More... | |
class | C3 |
Handles three species in a reaction. More... | |
class | C_AnyN |
Handles any number of species in a reaction, including fractional stoichiometric coefficients, and arbitrary reaction orders. More... | |
class | ThirdBodyCalc |
Calculate and apply third-body effects on reaction rates, including non- unity third-body efficiencies. More... | |
class | ThirdBodyMgr |
class | Metal |
Wrapper for MetalPhase with constructor from file. More... | |
class | BandMatrix |
A class for banded matrices, involving matrix inversion processes. More... | |
class | BEulerErr |
Exception class thrown when a BEuler error is encountered. More... | |
class | BEulerInt |
class | CVodesErr |
Exception thrown when a CVODES error is encountered. More... | |
class | CVodesIntegrator |
Wrapper class for 'cvodes' integrator from LLNL. More... | |
class | DAE_Solver |
Wrapper for DAE solvers. More... | |
class | CELapackError |
Exception thrown when an LAPACK error is encountered associated with inverting or solving a matrix. More... | |
class | DenseMatrix |
A class for full (non-sparse) matrices with Fortran-compatible data storage, which adds matrix operations to class Array2D. More... | |
class | Func1 |
Base class for 'functor' classes that evaluate a function of one variable. More... | |
class | Sin1 |
implements the sin() function More... | |
class | Cos1 |
cos More... | |
class | Exp1 |
exp More... | |
class | Pow1 |
pow More... | |
class | Const1 |
Constant. More... | |
class | Sum1 |
Sum of two functions. More... | |
class | Diff1 |
Difference of two functions. More... | |
class | Product1 |
Product of two functions. More... | |
class | TimesConstant1 |
Product of two functions. More... | |
class | PlusConstant1 |
A function plus a constant. More... | |
class | Ratio1 |
Ratio of two functions. More... | |
class | Composite1 |
Composite function. More... | |
class | Gaussian |
A Gaussian. More... | |
class | Poly1 |
Polynomial of degree n. More... | |
class | Fourier1 |
Fourier cosine/sine series. More... | |
class | Arrhenius1 |
Sum of Arrhenius terms. More... | |
class | Periodic1 |
Periodic function. More... | |
class | FuncEval |
Virtual base class for ODE right-hand-side function evaluators. More... | |
class | GeneralMatrix |
Generic matrix. More... | |
class | IDA_Err |
Exception thrown when a IDA error is encountered. More... | |
class | Integrator |
Abstract base class for ODE system integrators. More... | |
class | NonlinearSolver |
Class that calculates the solution to a nonlinear system. 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 | RootFind |
Root finder for 1D problems. More... | |
class | solveProb |
Method to solve a pseudo steady state of a nonlinear problem. More... | |
class | SquareMatrix |
A class for full (non-sparse) matrices with Fortran-compatible data storage. More... | |
class | Domain1D |
Base class for one-dimensional domains. More... | |
class | Bdry1D |
The base class for boundaries between one-dimensional spatial domains. More... | |
class | Inlet1D |
An inlet. More... | |
class | Empty1D |
A terminator that does nothing. More... | |
class | Symm1D |
A symmetry plane. More... | |
class | Outlet1D |
An outlet. More... | |
class | OutletRes1D |
An outlet with specified composition. More... | |
class | Surf1D |
A non-reacting surface. More... | |
class | ReactingSurf1D |
A reacting surface. More... | |
class | MultiJac |
Class MultiJac evaluates the Jacobian of a system of equations defined by a residual function supplied by an instance of class OneDim. More... | |
class | MultiNewton |
Newton iterator for multi-domain, one-dimensional problems. More... | |
class | OneDim |
Container class for multiple-domain 1D problems. More... | |
class | Refiner |
Refine Domain1D grids so that profiles satisfy adaptation tolerances. More... | |
class | Sim1D |
One-dimensional simulations. More... | |
class | StFlow |
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemically-reacting, axisymmetric, flows. More... | |
class | AxiStagnFlow |
A class for axisymmetric stagnation flows. More... | |
class | FreeFlame |
A class for freely-propagating premixed flames. More... | |
class | PureFluid |
Wrapper for PureFluidPhase with constructor from file. More... | |
class | Adsorbate |
An adsorbed surface species. More... | |
class | ConstCpPoly |
A constant-heat capacity species thermodynamic property manager class. More... | |
class | ConstDensityThermo |
Overloads the virtual methods of class ThermoPhase to implement the incompressible equation of state. More... | |
class | DebyeHuckel |
Class DebyeHuckel represents a dilute liquid electrolyte phase which obeys the Debye Huckel formulation for nonideality. More... | |
class | EdgePhase |
A thermodynamic phase representing a one dimensional edge between two surfaces. More... | |
class | Elements |
Object containing the elements that make up species in a phase. More... | |
class | FixedChemPotSSTP |
Class FixedChemPotSSTP represents a stoichiometric (fixed composition) incompressible substance. More... | |
class | GeneralSpeciesThermo |
A species thermodynamic property manager for a phase. More... | |
class | GibbsExcessVPSSTP |
class | HMWSoln |
Class HMWSoln represents a dilute or concentrated liquid electrolyte phase which obeys the Pitzer formulation for nonideality. More... | |
class | IdealGasPhase |
Class IdealGasPhase represents low-density gases that obey the ideal gas equation of state. More... | |
class | IdealMolalSoln |
This phase is based upon the mixing-rule assumption that all molality-based activity coefficients are equal to one. More... | |
class | IdealSolidSolnPhase |
Class IdealSolidSolnPhase represents a condensed phase ideal solution compound. More... | |
class | IdealSolnGasVPSS |
An ideal solution or an ideal gas approximation of a phase. More... | |
class | IonsFromNeutralVPSSTP |
class | LatticePhase |
A simple thermodynamic model for a bulk phase, assuming a lattice of solid atoms. More... | |
class | LatticeSolidPhase |
A phase that is comprised of a fixed additive combination of other lattice phases. More... | |
class | MargulesVPSSTP |
MargulesVPSSTP is a derived class of GibbsExcessVPSSTP that employs the Margules approximation for the excess Gibbs free energy. More... | |
class | 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 | MetalPhase |
Class MetalPhase represents electrons in a metal. More... | |
class | MetalSHEelectrons |
Class MetalSHEelectrons represents electrons within a metal, adjacent to an aqueous electrolyte, that are consistent with the SHE reference electrode. More... | |
class | MineralEQ3 |
Class MineralEQ3 represents a stoichiometric (fixed composition) incompressible substance based on EQ3's parameterization. More... | |
class | MixedSolventElectrolyte |
MixedSolventElectrolyte is a derived class of GibbsExcessVPSSTP that employs the DH and local Marguless approximations for the excess Gibbs free energy. More... | |
class | MixtureFugacityTP |
This is a filter class for ThermoPhase that implements some preparatory steps for efficiently handling mixture of gases that whose standard states are defined as ideal gases, but which describe also non-ideal solutions. More... | |
class | MolalityVPSSTP |
class | MolarityIonicVPSSTP |
class | Mu0Poly |
The Mu0Poly class implements an interpolation of the Gibbs free energy based on a piecewise constant heat capacity approximation. More... | |
class | Nasa9Poly1 |
The NASA 9 polynomial parameterization for one temperature range. More... | |
class | Nasa9PolyMultiTempRegion |
The NASA 9 polynomial parameterization for a single species encompassing multiple temperature regions. More... | |
class | NasaPoly1 |
The NASA polynomial parameterization for one temperature range. More... | |
class | NasaPoly2 |
The NASA polynomial parameterization for two temperature ranges. More... | |
class | PDSS |
Virtual base class for a species with a pressure dependent standard state. More... | |
class | PDSS_Molar |
Base class for PDSS classes which compute molar properties directly. More... | |
class | PDSS_Nondimensional |
Base class for PDSS classes which compute nondimensional properties directly. More... | |
class | PDSS_ConstVol |
Class for pressure dependent standard states that use a constant volume model. More... | |
class | PDSS_HKFT |
Class for pressure dependent standard states corresponding to ionic solutes in electrolyte water. More... | |
class | PDSS_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_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 | 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, species mass/mole fraction, and other generalized forces and intrinsic properties (such as electric potential) that define the thermodynamic state. More... | |
class | PhaseCombo_Interaction |
PhaseCombo_Interaction is a derived class of GibbsExcessVPSSTP that employs the Margules approximation for the excess Gibbs free energy while eliminating the entropy of mixing term. More... | |
class | PseudoBinaryVPSSTP |
class | PureFluidPhase |
This phase object consists of a single component that can be a gas, a liquid, a mixed gas-liquid fluid, or a fluid beyond its critical point. More... | |
class | RedlichKisterVPSSTP |
RedlichKisterVPSSTP is a derived class of GibbsExcessVPSSTP that employs the Redlich-Kister approximation for the excess Gibbs free energy. More... | |
class | RedlichKwongMFTP |
This class can handle either an ideal solution or an ideal gas approximation of a phase. More... | |
class | SemiconductorPhase |
Class SemiconductorPhase represents electrons and holes in a semiconductor. 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 | SimpleThermo |
class | SingleSpeciesTP |
The SingleSpeciesTP class is a filter class for ThermoPhase. More... | |
class | Species |
Contains data about a single chemical species. More... | |
class | SpeciesThermo |
Pure Virtual base class for the species thermo manager classes. More... | |
class | UnknownSpeciesThermoModel |
Throw a named error for an unknown or missing species thermo model. More... | |
class | SpeciesThermoFactory |
Factory to build instances of classes that manage the standard-state thermodynamic properties of a set of species. More... | |
class | SpeciesThermoInterpType |
Pure Virtual Base class for the thermodynamic manager for an individual species' reference state. More... | |
class | STITbyPDSS |
Class for the thermodynamic manager for an individual species' reference state which uses the PDSS base class to satisfy the requests. More... | |
class | UnknownSpeciesThermo |
Unknown species thermo manager string error. More... | |
class | SpeciesThermoDuo |
This species thermo manager requires that all species have one of two parameterizations. More... | |
class | StatMech |
Statistical mechanics. More... | |
class | StoichSubstance |
Class StoichSubstance represents a stoichiometric (fixed composition) incompressible substance. More... | |
class | StoichSubstanceSSTP |
Class StoichSubstanceSSTP represents a stoichiometric (fixed composition) incompressible substance. More... | |
class | electrodeElectron |
Class electrodeElectron represents an electron in a metal using the Standard hydrogen reference electrode. More... | |
class | SurfPhase |
A simple thermodynamic model for a surface phase, assuming an ideal solution model. More... | |
class | UnknownThermoPhaseModel |
Specific error to be thrown if the type of Thermo manager is unrecognized. More... | |
class | ThermoFactory |
Factory class for thermodynamic property managers. More... | |
class | ThermoPhase |
Base class for a phase with thermodynamic properties. More... | |
class | VPSSMgr |
Virtual base class for the classes that manage the calculation of standard state properties for all the species in a phase. More... | |
class | VPSSMgr_ConstVol |
Constant Molar Volume e VPSS species thermo manager class. More... | |
class | VPSSMgr_General |
Class that handles the calculation of standard state thermo properties for a set of species belonging to a single phase in a completely general but slow way. More... | |
class | VPSSMgr_IdealGas |
A VPSSMgr where all species in the phase obey an ideal gas equation of state. More... | |
class | VPSSMgr_Water_ConstVol |
Handles the calculation of standard state thermo properties for real water and a set of species which have a constant molar volume pressure dependence. More... | |
class | VPSSMgr_Water_HKFT |
Manages standard state thermo properties for real water and a set of species which have the HKFT equation of state. More... | |
class | VPStandardStateTP |
This is a filter class for ThermoPhase that implements some prepatory steps for efficiently handling a variable pressure standard state for species. More... | |
class | WaterProps |
The WaterProps class is used to house several approximation routines for properties of water. More... | |
class | WaterPropsIAPWS |
Class for calculating the equation of state of water. More... | |
class | WaterPropsIAPWSphi |
Low level class for the real description of water. More... | |
class | WaterSSTP |
Class for single-component water. More... | |
class | AqueousTransport |
Class AqueousTransport implements mixture-averaged transport properties for brine phases. More... | |
class | DustyGasTransport |
Class DustyGasTransport implements the Dusty Gas model for transport in porous media. More... | |
class | GasTransport |
Class GasTransport implements some functions and properties that are shared by the MixTransport and MultiTransport classes. More... | |
class | HighPressureGasTransport |
Class MultiTransport implements transport properties for high pressure gas mixtures. More... | |
class | LiquidTranInteraction |
Base class to handle transport property evaluation in a mixture. More... | |
class | LTI_MoleFracs |
Simple mole fraction weighting of transport properties. More... | |
class | LTI_MassFracs |
Simple mass fraction weighting of transport properties. More... | |
class | LTI_Log_MoleFracs |
Mixing rule using logarithms of the mole fractions. More... | |
class | LTI_Pairwise_Interaction |
Transport properties that act like pairwise interactions as in binary diffusion coefficients. More... | |
class | LTI_StefanMaxwell_PPN |
Stefan Maxwell Diffusion Coefficients can be solved for given ion conductivity, mobility ratios, and self diffusion coeffs. More... | |
class | LTI_MoleFracs_ExpT |
Simple mole fraction weighting of transport properties. More... | |
class | LiquidTransport |
Class LiquidTransport implements models for transport properties for liquid phases. More... | |
class | LiquidTransportData |
Class LiquidTransportData holds transport parameters for a specific liquid-phase species. More... | |
class | LiquidTransportParams |
Class LiquidTransportParams holds transport model parameters relevant to transport in mixtures. More... | |
class | LTPspecies |
Class LTPspecies holds transport parameterizations for a specific liquid-phase species. More... | |
class | LTPspecies_Const |
Class LTPspecies_Const holds transport parameters for a specific liquid-phase species (LTPspecies) when the transport property is just a constant value. More... | |
class | LTPspecies_Arrhenius |
Class LTPspecies_Arrhenius holds transport parameters for a specific liquid-phase species (LTPspecies) when the transport property is expressed in Arrhenius form. More... | |
class | LTPspecies_Poly |
Class LTPspecies_Poly holds transport parameters for a specific liquid-phase species (LTPspecies) when the transport property is expressed as a polynomial in temperature. More... | |
class | LTPspecies_ExpT |
Class LTPspecies_ExpT holds transport parameters for a specific liquid- phase species (LTPspecies) when the transport property is expressed as an exponential in temperature. More... | |
class | MixTransport |
Class MixTransport implements mixture-averaged transport properties for ideal gas mixtures. More... | |
class | MultiTransport |
Class MultiTransport implements multicomponent transport properties for ideal gas mixtures. More... | |
class | PecosTransport |
Class PecosTransport implements mixture-averaged transport properties for ideal gas mixtures. More... | |
class | SimpleTransport |
Class SimpleTransport implements mixture-averaged transport properties for liquid phases. More... | |
class | SolidTransport |
Class SolidTransport implements transport properties for solids. More... | |
class | SolidTransportData |
Class SolidTransportData holds transport parameters for a specific solid-phase species. More... | |
class | Tortuosity |
Specific Class to handle tortuosity corrections for diffusive transport in porous media using the Bruggeman exponent. More... | |
class | TortuosityPercolation |
This class implements transport coefficient corrections appropriate for porous media where percolation theory applies. More... | |
class | TortuosityMaxwell |
This class implements transport coefficient corrections appropriate for porous media with a dispersed phase. More... | |
class | Transport |
Base class for transport property managers. More... | |
class | TransportData |
Base class for transport data for a single species. More... | |
class | GasTransportData |
Transport data for a single gas-phase species which can be used in mixture-averaged or multicomponent transport models. More... | |
class | TransportFactory |
Factory class for creating new instances of classes derived from Transport. More... | |
class | TransportParams |
Base structure to hold transport model parameters. More... | |
class | GasTransportParams |
This structure holds transport model parameters relevant to transport in ideal gases with a kinetic theory of gases derived transport model. More... | |
class | WaterTransport |
Transport Parameters for pure water. More... | |
class | ConstPressureReactor |
Class ConstPressureReactor is a class for constant-pressure reactors. More... | |
class | MassFlowController |
A class for mass flow controllers. More... | |
class | PressureController |
A class for flow controllers where the flow rate is equal to the flow rate of a "master" mass flow controller plus a correction proportional to the pressure difference between the inlet and outlet. More... | |
class | Valve |
Supply a mass flow rate that is a function of the pressure drop across the valve. More... | |
class | FlowDevice |
Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors. More... | |
class | FlowReactor |
Adiabatic flow in a constant-area duct. More... | |
class | IdealGasConstPressureReactor |
Class ConstPressureReactor is a class for constant-pressure reactors. More... | |
class | IdealGasReactor |
Class IdealGasReactor is a class for stirred reactors that is specifically optimized for ideal gases. More... | |
class | Reactor |
Class Reactor is a general-purpose class for stirred reactors. More... | |
class | ReactorBase |
Base class for stirred reactors. More... | |
class | ReactorNet |
A class representing a network of connected reactors. More... | |
class | Wall |
Represents a wall between between two ReactorBase objects. More... | |
Typedefs | |
typedef std::map< std::string, doublereal > | compositionMap |
Map connecting a string name with a double. More... | |
typedef std::map< std::string, doublereal > | 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 boost::mutex | mutex_t |
typedef boost::mutex::scoped_lock | ScopedLock |
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 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 | CT_RealNumber_Range_Behavior { DONOTHING_CTRB = -1, CHANGE_OVERFLOW_CTRB, THROWON_OVERFLOW_CTRB, FENV_CHECK_CTRB, THROWON_OVERFLOW_DEBUGMODEONLY_CTRB } |
Enum containing Cantera's behavior for situations where overflow or underflow of real variables may occur. More... | |
enum | flow_t { NetFlow, OneWayFlow } |
enum | BEulerMethodType { BEulerFixedStep, BEulerVarStep } |
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 | SSVolume_Model_enumType { cSSVOLUME_CONSTANT = 0, cSSVOLUME_TPOLY, cSSVOLUME_DENSITY_TPOLY } |
Types of general formulations for the specification of the standard state volume. More... | |
enum | PDSS_enumType { cPDSS_UNDEF = 100, cPDSS_IDEALGAS, cPDSS_CONSTVOL, cPDSS_SSVOL, cPDSS_MOLAL_CONSTVOL, cPDSS_WATER, cPDSS_MOLAL_HKFT, cPDSS_IONSFROMNEUTRAL } |
Types of PDSS's. More... | |
enum | VPSSMgr_enumType { cVPSSMGR_UNDEF = 1000, cVPSSMGR_IDEALGAS, cVPSSMGR_CONSTVOL, cVPSSMGR_PUREFLUID, cVPSSMGR_WATER_CONSTVOL, cVPSSMGR_WATER_HKFT, cVPSSMGR_GENERAL } |
enum for VPSSMgr types that are responsible for calculating the species standard state and reference-state thermodynamic properties. More... | |
enum | LiquidTranMixingModel { LTI_MODEL_NOTSET =-1, LTI_MODEL_SOLVENT, LTI_MODEL_MOLEFRACS, LTI_MODEL_MASSFRACS, LTI_MODEL_LOG_MOLEFRACS, LTI_MODEL_PAIRWISE_INTERACTION, LTI_MODEL_STEFANMAXWELL_PPN, LTI_MODEL_STOKES_EINSTEIN, LTI_MODEL_MOLEFRACS_EXPT, LTI_MODEL_NONE, LTI_MODEL_MULTIPLE } |
Composition dependence type for liquid mixture transport properties. More... | |
enum | TransportPropertyType { TP_UNKNOWN = -1, TP_VISCOSITY = 0, TP_IONCONDUCTIVITY, TP_MOBILITYRATIO, TP_SELFDIFFUSION, TP_THERMALCOND, TP_DIFFUSIVITY, TP_HYDRORADIUS, TP_ELECTCOND, TP_DEFECTCONC, TP_DEFECTDIFF } |
Enumeration of the types of transport properties that can be handled by the variables in the various Transport classes. More... | |
enum | LTPTemperatureDependenceType { LTP_TD_NOTSET =-1, LTP_TD_CONSTANT, LTP_TD_ARRHENIUS, LTP_TD_POLY, LTP_TD_EXPT } |
Temperature dependence type for standard state species properties. More... | |
Functions | |
cthreadId_t | getThisThreadId () |
static int | get_modified_time (const std::string &path) |
void | checkFinite (const double tmp) |
Check to see that a number is finite (not NaN, +Inf or -Inf) More... | |
static string | pypath () |
return the full path to the Python interpreter. More... | |
void | ct2ctml (const char *file, const int debug=0) |
Convert a cti file into a ctml file. More... | |
static std::string | call_ctml_writer (const std::string &text, bool isfile) |
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... | |
void | get_CTML_Tree (XML_Node *node, const std::string &file, const int debug=0) |
Read an ctml file from a file and fill up an XML tree. More... | |
XML_Node | getCtmlTree (const std::string &file) |
Read an ctml file from a file and fill up an XML tree. More... | |
bool | check_FENV_OverUnder_Flow () |
Quick check on whether there has been an underflow or overflow condition in the floating point unit. More... | |
void | clear_FENV () |
Clear all the flags for floating-point exceptions. More... | |
void | addInteger (XML_Node &node, const std::string &titleString, const int value, const std::string &unitsString="", const std::string &typeString="") |
This function adds a child node with the name, "integer", with a value consisting of a single integer. 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... | |
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. 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 | 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... | |
void | getNamedStringValue (const XML_Node &node, const std::string &nameString, std::string &valueString, std::string &typeString) |
This function attempts to read a named child node and returns with the contents in the value string. 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... | |
doublereal | getFloatDefaultUnits (const XML_Node &parent, const std::string &name, const std::string &defaultUnits, const std::string &type="toSI") |
Get a floating-point value from a child element with a defined units field. 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... | |
int | getInteger (const XML_Node &parent, const std::string &name) |
Get an integer value from a child element. More... | |
size_t | getFloatArray (const XML_Node &node, std::vector< doublereal > &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 | 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 | getStringArray (const XML_Node &node, std::vector< std::string > &v) |
This function interprets the value portion of an XML element as a string. More... | |
static Application * | app () |
Return a pointer to the application object. More... | |
void | setLogger (Logger *logwriter) |
Install a logger. More... | |
void | writelog (const std::string &msg) |
Write a message to the screen. More... | |
void | writelogf (const char *fmt,...) |
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, bool endl_before) |
void | error (const std::string &msg) |
Write an error message and quit. More... | |
void | warn_deprecated (const std::string &method, const std::string &extra="") |
Print a warning indicating that method is deprecated. More... | |
void | suppress_deprecation_warnings () |
Globally disable printing of deprecation warnings. 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... | |
XML_Node * | get_XML_File (const std::string &file, int debug=0) |
Return a pointer to the XML tree for a Cantera input file. More... | |
XML_Node * | get_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... | |
int | nErrors () |
Return the number of errors that have been encountered so far. More... | |
void | popError () |
Discard the last error message. More... | |
string | lastErrorMessage () |
Retrieve the last error message in a string. More... | |
void | showErrors (std::ostream &f) |
Prints all of the error messages to an ostream. More... | |
void | showErrors () |
Prints all of the error messages using writelog. More... | |
void | setError (const std::string &r, const std::string &msg) |
Set an error condition in the application class without throwing an exception. More... | |
void | addDirectory (const std::string &dir) |
Add a directory to the data file search path. More... | |
std::string | findInputFile (const std::string &name) |
Find an input file. 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... | |
string | canteraRoot () |
Returns root directory where Cantera is installed. 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... | |
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. More... | |
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. 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... | |
std::string | fp2str (const double x, const std::string &fmt="%g") |
Convert a double into a c++ string. More... | |
std::string | int2str (const int n, const std::string &fmt="%d") |
Convert an int to a string using a format converter. More... | |
std::string | int2str (const size_t n) |
Convert an unsigned integer to a string. 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 | lowercase (const std::string &s) |
Cast a copy of a string to lower case. More... | |
static int | firstChar (const std::string &s) |
Return the position of the first printable character in the string. More... | |
static int | lastChar (const std::string &s) |
Return the position of the last printable character in the string. More... | |
std::string | stripws (const std::string &s) |
Strip the leading and trailing white space from a string. 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... | |
void | split (const std::string &ss, std::vector< std::string > &w) |
Parse a composition string into individual key:composition pairs. More... | |
int | fillArrayFromString (const std::string &str, doublereal *const a, const char delim= ' ') |
Interpret a string as a list of floats, and convert it to a vector of floats. More... | |
std::string | getBaseName (const std::string &fullPath) |
Get the file name without the path or extension. 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 | logfileName (const std::string &infile) |
Generate a logfile name based on an input file name. More... | |
std::string | wrapString (const std::string &s, const int len=70) |
Line wrap a string via a copy operation. 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... | |
static std::string::size_type | findFirstWS (const std::string &val) |
Find the first white space in a string. More... | |
static std::string::size_type | findFirstNotOfWS (const std::string &val) |
Find the first non-white space in a string. 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... | |
void | 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... | |
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... | |
XML_Node * | findXMLPhase (XML_Node *root, const std::string &phaseName) |
Search an XML_Node tree for a named phase XML_Node. More... | |
int | _equilflag (const char *xy) |
map property strings to integers More... | |
doublereal | equilibrate (MultiPhase &s, const char *XY, doublereal rtol=1.0e-9, int maxsteps=5000, int maxiter=100, int loglevel=-99) |
Equilibrate a MultiPhase object. More... | |
int | equilibrate (thermo_t &s, const char *XY, int solver=-1, doublereal rtol=1.0e-9, int maxsteps=VCS_MAXSTEPS, int maxiter=100, int loglevel=-99) |
Equilibrate a ThermoPhase object. More... | |
int | vcs_equilibrate (thermo_t &s, const char *XY, int estimateEquil=0, int printLvl=0, int solver=-1, doublereal rtol=1.0e-9, int maxsteps=VCS_MAXSTEPS, int maxiter=100, int loglevel=-99) |
Set a single-phase chemical solution to chemical equilibrium. More... | |
int | vcs_equilibrate (MultiPhase &s, const char *XY, int estimateEquil=0, int printLvl=0, int solver=2, doublereal rtol=1.0e-9, int maxsteps=VCS_MAXSTEPS, int maxiter=100, int loglevel=-99) |
Set a multi-phase chemical solution to chemical equilibrium. More... | |
int | vcs_equilibrate_1 (MultiPhase &s, int ixy, int estimateEquil=0, int printLvl=0, int solver=2, doublereal rtol=1.0e-9, int maxsteps=VCS_MAXSTEPS, int maxiter=100, int loglevel=-99) |
Set a multi-phase chemical solution to chemical equilibrium. More... | |
int | vcs_determine_PhaseStability (MultiPhase &s, int iphase, double &funcStab, int printLvl, int loglevel) |
Determine the phase stability of a single phase given the current conditions in a MultiPhase object. More... | |
int | vcs_Cantera_to_vprob (MultiPhase *mphase, VCS_PROB *vprob) |
Translate a MultiPhase object into a VCS_PROB problem definition object. More... | |
int | vcs_Cantera_update_vprob (MultiPhase *mphase, VCS_PROB *vprob) |
Translate a MultiPhase information into a VCS_PROB problem definition object. More... | |
static int | basisOptMax1 (const double *const molNum, const int n) |
static void | print_funcEval (FILE *fp, double xval, double fval, int its) |
int | vcsUtil_root1d (double xmin, double xmax, size_t itmax, VCS_FUNC_PTR func, void *fptrPassthrough, double FuncTargVal, int varID, double *xbest, int printLvl=0) |
One dimensional root finder. More... | |
static void | printProgress (const vector< string > &spName, const vector< double > &soln, const vector< double > &ff) |
double | vcs_l2norm (const std::vector< double > vec) |
determine the l2 norm of a vector of doubles More... | |
size_t | vcs_optMax (const double *x, const double *xSize, size_t j, size_t n) |
Finds the location of the maximum component in a double vector. More... | |
int | vcs_max_int (const int *vector, int length) |
Returns the maximum integer in a list. More... | |
double | vcsUtil_gasConstant (int mu_units) |
Returns the value of the gas constant in the units specified by parameter. 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... | |
void | vcs_print_stringTrunc (const char *str, size_t space, int alignment) |
Print a string within a given space limit. More... | |
bool | vcs_doubleEqual (double d1, double d2) |
Simple routine to check whether two doubles are equal up to roundoff error. More... | |
std::string | string16_EOSType (int EOSType) |
Return a string representing the equation of state. 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) |
static void | erase_vd (std::vector< doublereal > &m_vec, int index) |
static void | erase_vi (std::vector< int > &m_vec, int index) |
static void | addV (int kkinspec, double ps, std::vector< int > &m_Products, std::vector< doublereal > &m_ProductStoich) |
add the species into the list of products or reactants More... | |
shared_ptr< Falloff > | newFalloff (int type, const vector_fp &c) |
Return a pointer to a new falloff function calculator. More... | |
std::ostream & | operator<< (std::ostream &s, const Cantera::Group &g) |
void | checkRxnElementBalance (Kinetics &kin, const ReactionData &rdata, doublereal errorTolerance=1.0e-3) |
This function will check a specific reaction to see if the elements balance. More... | |
bool | getReagents (const XML_Node &rxn, Kinetics &kin, int rp, std::string default_phase, std::vector< size_t > &spnum, vector_fp &stoich, vector_fp &order, const ReactionRules &rules) |
Get the reactants or products of a reaction. More... | |
static void | getArrhenius (const XML_Node &node, int &labeled, doublereal &A, doublereal &b, doublereal &E) |
getArrhenius() parses the XML element called Arrhenius. More... | |
static void | getStick (const XML_Node &node, Kinetics &kin, ReactionData &r, doublereal &A, doublereal &b, doublereal &E) |
getStick() processes the XML element called Stick that specifies the sticking coefficient reaction. More... | |
static void | getCoverageDependence (const XML_Node &node, thermo_t &surfphase, ReactionData &rdata) |
Read the XML data concerning the coverage dependence of an interfacial reaction. More... | |
static void | getFalloff (const XML_Node &f, ReactionData &rdata) |
Get falloff parameters for a reaction. More... | |
static void | getEfficiencies (const XML_Node &eff, Kinetics &kin, ReactionData &rdata, const ReactionRules &rules) |
Get the enhanced collision efficiencies. More... | |
void | getRateCoefficient (const XML_Node &kf, Kinetics &kin, ReactionData &rdata, const ReactionRules &rules) |
Read the rate coefficient data from the XML file. More... | |
doublereal | isDuplicateReaction (std::map< int, doublereal > &r1, std::map< int, doublereal > &r2) |
This function returns a ratio if two reactions are duplicates of one another, and 0.0 otherwise. 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... | |
Arrhenius | readArrhenius (const XML_Node &arrhenius_node) |
void | readFalloff (FalloffReaction &R, const XML_Node &rc_node) |
Parse falloff parameters, given a rateCoeff node. More... | |
void | readEfficiencies (ThirdBody &tbody, const XML_Node &rc_node) |
void | setupReaction (Reaction &R, const XML_Node &rxn_node) |
void | setupElementaryReaction (ElementaryReaction &R, const XML_Node &rxn_node) |
void | setupThreeBodyReaction (ThreeBodyReaction &R, const XML_Node &rxn_node) |
void | setupFalloffReaction (FalloffReaction &R, const XML_Node &rxn_node) |
void | setupChemicallyActivatedReaction (ChemicallyActivatedReaction &R, const XML_Node &rxn_node) |
void | setupPlogReaction (PlogReaction &R, const XML_Node &rxn_node) |
void | setupChebyshevReaction (ChebyshevReaction &R, const XML_Node &rxn_node) |
void | setupInterfaceReaction (InterfaceReaction &R, const XML_Node &rxn_node) |
void | setupElectrochemicalReaction (ElectrochemicalReaction &R, const XML_Node &rxn_node) |
shared_ptr< Reaction > | newReaction (const XML_Node &rxn_node) |
Create a new Reaction object for the reaction defined in rxn_node More... | |
std::vector< shared_ptr < Reaction > > | getReactions (const XML_Node &node) |
Create Reaction objects for all <reaction> nodes in an XML document. More... | |
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) |
ostream & | operator<< (std::ostream &s, const BandMatrix &m) |
Utility routine to print out the matrix. More... | |
static void | print_time_step1 (int order, int n_time_step, double time, double delta_t_n, double delta_t_nm1, bool step_failed, int num_failures) |
static void | print_time_step2 (int time_step_num, int order, double time, double time_error_factor, double delta_t_n, double delta_t_np1) |
static void | print_time_fail (bool convFailure, int time_step_num, double time, double delta_t_n, double delta_t_np1, double time_error_factor) |
static void | print_final (double time, int step_failed, int time_step_num, int num_newt_its, int total_linear_solves, int numConvFails, int numTruncFails, int nfe, int nJacEval) |
static void | print_lvl1_Header (int nTimes) |
static void | print_lvl1_summary (int time_step_num, double time, const char *rslt, double delta_t_n, int newt_its, int aztec_its, int bktr_stps, double time_error_factor, const char *comment) |
double | subtractRD (doublereal a, doublereal b) |
This routine subtracts two numbers for one another. More... | |
static int | cvodes_rhs (realtype t, N_Vector y, N_Vector ydot, void *f_data) |
Function called by cvodes to evaluate ydot given y. More... | |
static void | cvodes_err (int error_code, const char *module, const char *function, char *msg, void *eh_data) |
Function called by CVodes when an error is encountered instead of writing to stdout. More... | |
DAE_Solver * | newDAE_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... | |
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) |
Func1 & | newSumFunction (Func1 &f1, Func1 &f2) |
Func1 & | newDiffFunction (Func1 &f1, Func1 &f2) |
Func1 & | newProdFunction (Func1 &f1, Func1 &f2) |
Func1 & | newRatioFunction (Func1 &f1, Func1 &f2) |
Func1 & | newCompositeFunction (Func1 &f1, Func1 &f2) |
Func1 & | newTimesConstFunction (Func1 &f, doublereal c) |
Func1 & | newPlusConstFunction (Func1 &f, doublereal c) |
doublereal | linearInterp (doublereal x, const vector_fp &xpts, const vector_fp &fpts) |
Linearly interpolate a function defined on a discrete grid. More... | |
doublereal | polyfit (int n, doublereal *x, doublereal *y, doublereal *w, int maxdeg, int &ndeg, doublereal eps, doublereal *r) |
Fits a polynomial function to a set of data points. More... | |
Integrator * | newIntegrator (const std::string &itype) |
static void | print_funcEval (FILE *fp, doublereal xval, doublereal fval, int its) |
Print out a form for the current function evaluation. More... | |
static doublereal | calcWeightedNorm (const doublereal[], const doublereal dx[], size_t) |
static int | interp_est (const std::string &estString) |
Utility function to assign an integer value from a string for the ElectrolyteSpeciesType field. More... | |
doublereal | LookupWtElements (const std::string &ename) |
Function to look up an atomic weight This function looks up the argument string in the database above and returns the associated molecular weight. More... | |
static double | factorOverlap (const std::vector< std::string > &elnamesVN, const std::vector< double > &elemVectorN, const size_t nElementsN, const std::vector< std::string > &elnamesVI, const std::vector< double > &elemVectorI, const size_t nElementsI) |
Return the factor overlap. More... | |
doublereal | xlogx (doublereal x) |
Mu0Poly * | newMu0ThermoFromXML (const XML_Node &Mu0Node) |
Install a Mu0 polynomial thermodynamic reference state. More... | |
static doublereal | JoyceDixon (doublereal r) |
shared_ptr< Species > | newSpecies (const XML_Node &species_node) |
Create a new Species object from a 'species' XML_Node. More... | |
std::vector< shared_ptr < Species > > | getSpecies (const XML_Node &node) |
Generate Species objects for all <species> nodes in an XML document. More... | |
static void | getSpeciesThermoTypes (std::vector< XML_Node * > &spDataNodeList, int &has_nasa, int &has_shomate, int &has_simple, int &has_other) |
Examine the types of species thermo parameterizations, and return a flag indicating the type of reference state thermo manager that will be needed in order to evaluate them all. More... | |
SpeciesThermoInterpType * | newSpeciesThermoInterpType (int type, double tlow, double thigh, double pref, const double *coeffs) |
Create a new SpeciesThermoInterpType object given a corresponding constant. More... | |
SpeciesThermoInterpType * | newSpeciesThermoInterpType (const std::string &type, double tlow, double thigh, double pref, const double *coeffs) |
Create a new SpeciesThermoInterpType object given a string. More... | |
static SpeciesThermoInterpType * | newNasaThermoFromXML (vector< XML_Node * > nodes) |
Create a NASA polynomial thermodynamic property parameterization for a species from a set ! of XML nodes. More... | |
SpeciesThermoInterpType * | newShomateForMineralEQ3 (const XML_Node &MinEQ3node) |
Create a Shomate polynomial from an XML node giving the 'EQ3' coefficients. More... | |
static SpeciesThermoInterpType * | newShomateThermoFromXML (vector< XML_Node * > &nodes) |
Create a Shomate polynomial thermodynamic property parameterization for a species. More... | |
static SpeciesThermoInterpType * | newConstCpThermoFromXML (XML_Node &f) |
Create a "simple" constant heat capacity thermodynamic property parameterization for a ! species. More... | |
static SpeciesThermoInterpType * | newNasa9ThermoFromXML (const std::vector< XML_Node * > &tp) |
Create a NASA9 polynomial thermodynamic property parameterization for a species. More... | |
static StatMech * | newStatMechThermoFromXML (XML_Node &f) |
Create a stat mech based property solver for a species. More... | |
static SpeciesThermoInterpType * | newAdsorbateThermoFromXML (const XML_Node &f) |
Create an Adsorbate polynomial thermodynamic property parameterization for a species. More... | |
SpeciesThermoInterpType * | newSpeciesThermoInterpType (const XML_Node &thermoNode) |
Create a new SpeciesThermoInterpType object from XML_Node. More... | |
SpeciesThermo * | newSpeciesThermoMgr (int type, SpeciesThermoFactory *f=0) |
Create a new species thermo manager instance, by specifying the type and (optionally) a pointer to the factory to use to create it. More... | |
SpeciesThermo * | newSpeciesThermoMgr (const std::string &stype, SpeciesThermoFactory *f=0) |
Create a new species thermo manager instance, by specifying the type and (optionally) a pointer to the factory to use to create it. More... | |
SpeciesThermo * | newSpeciesThermoMgr (std::vector< XML_Node * > spDataNodeList, SpeciesThermoFactory *f=0) |
Function to return SpeciesThermo manager. More... | |
std::string | eosTypeString (int ieos, int length=100) |
Translate the eosType id into a string. More... | |
ThermoPhase * | newPhase (XML_Node &phase) |
Create a new ThermoPhase object and initializes it according to the XML tree. More... | |
ThermoPhase * | newPhase (const std::string &infile, std::string id="") |
Create and Initialize a ThermoPhase object from an XML input file. More... | |
static void | formSpeciesXMLNodeList (std::vector< XML_Node * > &spDataNodeList, std::vector< std::string > &spNamesList, std::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... | |
bool | importPhase (XML_Node &phase, ThermoPhase *th, SpeciesThermoFactory *spfactory=0) |
Import a phase information into an empty 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... | |
bool | installSpecies (size_t k, const XML_Node &s, thermo_t &p, SpeciesThermo *spthermo_ptr, int rule, XML_Node *phaseNode_ptr=0, VPSSMgr *vpss_ptr=0, SpeciesThermoFactory *factory=0) |
Install a species into a ThermoPhase object, which defines the phase thermodynamics and speciation. More... | |
const XML_Node * | speciesXML_Node (const std::string &kname, const XML_Node *phaseSpeciesData) |
Search an XML tree for species data. More... | |
static void | getVPSSMgrTypes (std::vector< XML_Node * > &spDataNodeList, int &has_nasa_idealGas, int &has_nasa_constVol, int &has_shomate_idealGas, int &has_shomate_constVol, int &has_simple_idealGas, int &has_simple_constVol, int &has_water, int &has_tpx, int &has_hptx, int &has_other) |
Examine the types of species thermo parameterizations, and return a flag indicating the type of parameterization needed by the species. More... | |
VPSSMgr * | newVPSSMgr (VPSSMgr_enumType type, VPStandardStateTP *vp_ptr, VPSSMgrFactory *f=0) |
Create a new species thermo manager instance, by specifying the type and (optionally) a pointer to the factory to use to create it. More... | |
VPSSMgr * | newVPSSMgr (VPStandardStateTP *vp_ptr, XML_Node *phaseNode_ptr, std::vector< XML_Node * > &spDataNodeList, VPSSMgrFactory *f=0) |
Function to return VPSSMgr manager. More... | |
static void | getArrhenius (const XML_Node &node, doublereal &A, doublereal &b, doublereal &E) |
Parses the XML element called Arrhenius. More... | |
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) |
shared_ptr< TransportData > | newTransportData (const XML_Node &transport_node) |
Create a new TransportData object from a 'transport' XML_Node. More... | |
Transport * | newTransportMgr (const std::string &transportModel="", thermo_t *thermo=0, int loglevel=0, TransportFactory *f=0, int ndim=1) |
Create a new transport manager instance. More... | |
Transport * | newDefaultTransportMgr (thermo_t *thermo, int loglevel=0, TransportFactory *f=0) |
Create a new transport manager instance. More... | |
std::ostream & | operator<< (std::ostream &s, const Array2D &m) |
Output the current contents of the Array2D object. More... | |
void | operator*= (Array2D &m, doublereal a) |
Overload the times equals operator for multiplication of a matrix and a scalar. More... | |
void | operator+= (Array2D &x, const Array2D &y) |
Overload the plus equals operator for addition of one matrix with another. More... | |
void | writelog (const std::string &msg, int loglevel) |
Write a message to the log only if loglevel > 0. More... | |
template<class T > | |
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... | |
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 V > | |
doublereal | dot6 (const V &x, const V &y) |
Templated Inner product of two vectors of length 6. 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 InputIter , class OutputIter , class S > | |
void | increment_scale (InputIter begin, InputIter end, OutputIter out, S scale_factor) |
template<class InputIter , class OutputIter > | |
void | multiply_each (OutputIter x_begin, OutputIter x_end, InputIter y_begin) |
Multiply each entry in x by the corresponding entry in y. More... | |
template<class InputIter > | |
void | resize_each (int m, InputIter begin, InputIter end) |
Invoke method 'resize' with argument m for a sequence of objects (templated version) More... | |
template<class InputIter > | |
doublereal | absmax (InputIter begin, InputIter end) |
The maximum absolute value (templated version) More... | |
template<class InputIter , class OutputIter > | |
void | normalize (InputIter begin, InputIter end, OutputIter out) |
Normalize the values in a sequence, such that they sum to 1.0 (templated version) More... | |
template<class InputIter , class OutputIter > | |
void | divide_each (OutputIter x_begin, OutputIter x_end, InputIter y_begin) |
Templated divide of each element of x by the corresponding element of y. More... | |
template<class InputIter , class OutputIter > | |
void | sum_each (OutputIter x_begin, OutputIter x_end, InputIter y_begin) |
Increment each entry in x by the corresponding entry in y. More... | |
template<class InputIter , class OutputIter , class IndexIter > | |
void | scatter_copy (InputIter begin, InputIter end, OutputIter result, IndexIter index) |
Copies a contiguous range in a sequence to indexed positions in another sequence. More... | |
template<class InputIter , class RandAccessIter , class IndexIter > | |
void | scatter_mult (InputIter mult_begin, InputIter mult_end, RandAccessIter data, IndexIter index) |
Multiply selected elements in an array by a contiguous sequence of multipliers. More... | |
template<class InputIter , class OutputIter , class IndexIter > | |
void | scatter_divide (InputIter begin, InputIter end, OutputIter result, IndexIter index) |
Divide selected elements in an array by a contiguous sequence of divisors. More... | |
template<class InputIter > | |
doublereal | sum_xlogx (InputIter begin, InputIter end) |
Compute
\[ \sum_k x_k \log x_k. \] . More... | |
template<class InputIter1 , class InputIter2 > | |
doublereal | sum_xlogQ (InputIter1 begin, InputIter1 end, InputIter2 Q_begin) |
Compute
\[ \sum_k x_k \log Q_k. \] . More... | |
template<class OutputIter > | |
void | scale (int N, double alpha, OutputIter x) |
Scale a templated vector by a constant factor. More... | |
template<class D , class R > | |
R | poly6 (D x, R *c) |
Templated evaluation of a polynomial of order 6. More... | |
template<class D , class R > | |
R | poly8 (D x, R *c) |
Templated evaluation of a polynomial of order 8. More... | |
template<class D , class R > | |
R | poly10 (D x, R *c) |
Templated evaluation of a polynomial of order 10. More... | |
template<class D , class R > | |
R | poly5 (D x, R *c) |
Templated evaluation of a polynomial of order 5. More... | |
template<class D , class R > | |
R | poly4 (D x, R *c) |
Evaluates a polynomial of order 4. More... | |
template<class D , class R > | |
R | poly3 (D x, R *c) |
Templated evaluation of a polynomial of order 3. More... | |
template<class D > | |
void | deepStdVectorPointerCopy (const std::vector< D * > &fromVec, std::vector< D * > &toVec) |
Templated deep copy of a std vector of pointers. More... | |
template<class T , class U > | |
const U & | getValue (const std::map< T, U > &m, const T &key) |
Const accessor for a value in a std::map. 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... | |
template<class T > | |
void | copyn (size_t n, const T &x, T &y) |
Templated function that copies the first n entries from x to y. More... | |
template<class T > | |
void | divide_each (T &x, const T &y) |
Divide each element of x by the corresponding element of y. More... | |
template<class T > | |
void | multiply_each (T &x, const T &y) |
Multiply each element of x by the corresponding element of y. More... | |
template<class T , class S > | |
void | scale (T &x, S scale_factor) |
Multiply each element of x by scale_factor. More... | |
template<class T > | |
doublereal | dot_product (const T &x, const T &y) |
Return the templated dot product of two objects. More... | |
template<class T > | |
doublereal | dot_ratio (const T &x, const T &y) |
Returns the templated dot ratio of two objects. More... | |
template<class T > | |
void | add_each (T &x, const T &y) |
Returns a templated addition operation of two objects. More... | |
template<class InputIter , class S > | |
doublereal | _dot_ratio (InputIter x_begin, InputIter x_end, InputIter y_begin, S start_value) |
Templated dot ratio class. More... | |
template<class T > | |
T | absmax (const std::vector< T > &v) |
Finds the entry in a vector with maximum absolute value, and return this value. More... | |
template<class T > | |
std::ostream & | operator<< (std::ostream &os, const std::vector< T > &v) |
Write a vector to a stream. More... | |
std::ostream & | operator<< (std::ostream &s, Cantera::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... | |
size_t | 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... | |
Interface * | importInterface (const std::string &infile, const std::string &id, std::vector< Cantera::ThermoPhase * > phases) |
Import an instance of class Interface from a specification in an input file. More... | |
Kinetics * | newKineticsMgr (XML_Node &phase, std::vector< ThermoPhase * > th, KineticsFactory *f=0) |
Create a new kinetics manager. More... | |
Kinetics * | newKineticsMgr (const std::string &model, KineticsFactory *f=0) |
Create a new kinetics manager. More... | |
static doublereal | ppow (doublereal x, doublereal order) |
static std::string | fmt (const std::string &r, size_t n) |
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 > | |
static void | _writeIncrementSpecies (InputIter begin, InputIter end, const std::string &r, std::map< size_t, std::string > &out) |
template<class InputIter > | |
static void | _writeDecrementSpecies (InputIter begin, InputIter end, const std::string &r, std::map< size_t, std::string > &out) |
template<class InputIter > | |
static void | _writeIncrementReaction (InputIter begin, InputIter end, const std::string &r, std::map< size_t, std::string > &out) |
template<class InputIter > | |
static void | _writeDecrementReaction (InputIter begin, InputIter end, const std::string &r, std::map< size_t, std::string > &out) |
template<class InputIter > | |
static void | _writeMultiply (InputIter begin, InputIter end, const std::string &r, std::map< size_t, std::string > &out) |
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) |
ThermoPhase * | newThermoPhase (const std::string &model, ThermoFactory *f=0) |
Create a new thermo manager instance. More... | |
ReactorBase * | newReactor (const std::string &model, ReactorFactory *f=0) |
Variables | |
static mutex_t | dir_mutex |
Mutex for input directory access. More... | |
static mutex_t | app_mutex |
Mutex for creating singletons within the application object. More... | |
static mutex_t | xml_mutex |
Mutex for controlling access to XML file storage. More... | |
static mutex_t | msg_mutex |
Mutex for access to string messages. More... | |
static const char * | stars = "***********************************************************************\n" |
std::string | FP_Format = "%23.15E" |
int | BasisOptimize_print_lvl = 0 |
External int that is used to turn on debug printing for the BasisOptimze program. More... | |
static char | pprefix [20] = " --- vcs_inest: " |
int | vcs_timing_print_lvl = 1 |
Global hook for turning on and off time printing. More... | |
const double | DampFactor = 4 |
Dampfactor is the factor by which the damping factor is reduced by when a reduction in step length is warranted. More... | |
const int | NDAMP = 10 |
Number of damping steps that are carried out before the solution is deemed a failure. More... | |
static struct awData | aWTable [] |
aWTable is a vector containing the atomic weights database. More... | |
static int | ntypes = 27 |
Define the number of ThermoPhase types for use in this factory routine. More... | |
static string | _types [] |
Define the string name of the ThermoPhase types that are handled by this factory routine. More... | |
static int | _itypes [] |
Define the integer id of the ThermoPhase types that are handled by this factory routine. More... | |
static const doublereal | H [4] = {1., 0.978197, 0.579829, -0.202354} |
static const doublereal | Hij [6][7] |
static const doublereal | rhoStar = 317.763 |
static const doublereal | presStar = 22.115E6 |
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... | |
static int | ntypes = 6 |
static string | _types [] |
static int | _itypes [] |
const doublereal | Pi = 3.14159265358979323846 |
Pi. More... | |
const doublereal | SmallNumber = 1.e-300 |
smallest number to compare to zero. More... | |
const doublereal | BigNumber = 1.e300 |
largest number to compare to inf. More... | |
const doublereal | MaxExp = 690.775527898 |
largest x such that exp(x) is valid More... | |
const doublereal | Undef = -999.1234 |
Fairly random number to be used to initialize variables against to see if they are subsequently defined. More... | |
const doublereal | Tiny = 1.e-20 |
Small number to compare differences of mole fractions against. More... | |
const size_t | npos = static_cast<size_t>(-1) |
index returned by functions to indicate "no position" More... | |
const std::string | CTML_Version = "1.4.1" |
const Specifying the CTML version number More... | |
int | ChemEquil_print_lvl = 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 | 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 | cFlowType = 50 |
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 int | LeftInlet = 1 |
const int | RightInlet = -1 |
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_Y = 4 |
const int | c_Mixav_Transport = 0 |
const int | c_Multi_Transport = 1 |
const int | c_Soret = 2 |
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 | cHMWSoln0 = 45010 |
eosTypes returned for this ThermoPhase Object More... | |
const int | cHMWSoln1 = 45011 |
const int | cHMWSoln2 = 45012 |
const int | cDebyeHuckel0 = 46010 |
eosTypes returned for this ThermoPhase Object More... | |
const int | cDebyeHuckel1 = 46011 |
const int | cDebyeHuckel2 = 46012 |
const int | cNone = 0 |
This generic id is used as the default in virtual base classes that employ id's. More... | |
const int | cNASA = 1 |
const int | cShomate = 2 |
const int | cNASA96 = 3 |
const int | cHarmonicOsc = 4 |
const int | cIdealGas = 1 |
Equation of state types: More... | |
const int | cIncompressible = 2 |
const int | cSurf = 3 |
A surface phase. Used by class SurfPhase. More... | |
const int | cMetal = 4 |
A metal phase. More... | |
const int | cStoichSubstance = 5 |
const int | cSemiconductor = 7 |
const int | cMineralEQ3 = 8 |
const int | cMetalSHEelectrons = 9 |
const int | cLatticeSolid = 20 |
const int | cLattice = 21 |
const int | cPureFluid = 10 |
const int | cEdge = 6 |
An edge between two 2D surfaces. More... | |
const int | cFixedChemPot = 70 |
Stoichiometric compound with a constant chemical potential. More... | |
const int | cIdealSolidSolnPhase = 5009 |
Constant partial molar volume solution IdealSolidSolnPhase.h. More... | |
const int | cMaskellSolidSolnPhase = 5010 |
const int | cHMW = 40 |
HMW - Strong electrolyte using the Pitzer formulation. More... | |
const int | cDebyeHuckel = 50 |
DebyeHuckel - Weak electrolyte using various Debye-Huckel formulations. More... | |
const int | cIdealMolalSoln = 60 |
IdealMolalSoln - molality based solution with molality-based act coeffs of 1. More... | |
const int | cIdealSolnGasVPSS = 500 |
const int | cIdealSolnGasVPSS_iscv = 501 |
const int | cMixtureFugacityTP = 700 |
Fugacity Models. More... | |
const int | cRedlichKwongMFTP = 701 |
const int | cMargulesVPSSTP = 301 |
const int | cRedlichKisterVPSSTP = 303 |
const int | cMolarityIonicVPSSTP = 401 |
const int | cMixedSolventElectrolyte = 402 |
const int | cPhaseCombo_Interaction = 305 |
const int | cIonsFromNeutral = 2000 |
const int | cVPSS_IdealGas = 1001 |
Variable Pressure Standard State ThermoPhase objects. More... | |
const int | cVPSS_ConstVol = 1002 |
const int | cVPSS_PureFluid = 1010 |
const int | cVPSS_HMW = 1040 |
const int | cVPSS_DebyeHuckel = 1050 |
const int | cVPSS_MolalSoln = 1060 |
const int | cGasKinetics = 2 |
const int | cInterfaceKinetics = 4 |
const int | cLineKinetics = 5 |
const int | cEdgeKinetics = 6 |
const int | cSolidKinetics = 7 |
const int | cAqueousKinetics = 8 |
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 int | cElectron = 0 |
const int | cHole = 1 |
const VelocityBasis | VB_MASSAVG = -1 |
Diffusion velocities are based on the mass averaged velocity. More... | |
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... | |
const int | MFC_Type = 1 |
const int | PressureController_Type = 2 |
const int | Valve_Type = 3 |
const int | ReservoirType = 1 |
const int | ReactorType = 2 |
const int | FlowReactorType = 3 |
const int | ConstPressureReactorType = 4 |
const int | IdealGasReactorType = 5 |
const int | IdealGasConstPressureReactorType = 6 |
Variations of the Gas Constant | |
Cantera uses the MKS system of units. The unit for moles is defined to be the kmol. | |
const doublereal | Avogadro = 6.02214129e26 |
Avogadro's Number [number/kmol]. More... | |
const doublereal | GasConstant = 8314.4621 |
Universal Gas Constant. [J/kmol/K]. More... | |
const doublereal | logGasConstant = std::log(GasConstant) |
const doublereal | OneAtm = 1.01325e5 |
One atmosphere [Pa]. More... | |
const doublereal | OneBar = 1.0E5 |
const doublereal | GasConst_cal_mol_K = GasConstant / 4184.0 |
Universal gas constant in cal/mol/K. More... | |
const doublereal | Boltzmann = GasConstant / Avogadro |
Boltzmann's constant [J/K]. More... | |
const doublereal | Planck = 6.62607009e-34 |
Planck's constant. [J-s]. More... | |
const doublereal | Planck_bar = Planck / (2 * Pi) |
const doublereal | logBoltz_Planck = std::log(Boltzmann / Planck) |
log(k/h) More... | |
const doublereal | StefanBoltz = 5.670373e-8 |
Stefan-Boltzmann constant. More... | |
Electron Properties | |
const doublereal | ElectronCharge = 1.602176565e-19 |
const doublereal | ElectronMass = 9.10938291e-31 |
const doublereal | Faraday = ElectronCharge * Avogadro |
Electromagnetism | |
Cantera uses the MKS unit system. | |
const doublereal | lightSpeed = 299792458.0 |
Speed of Light (m/s). More... | |
const doublereal | permeability_0 = 4.0e-7*Pi |
Permeability of free space \( \mu_0 \) in N/A^2. More... | |
const doublereal | epsilon_0 = 1.0 / (lightSpeed*lightSpeed*permeability_0) |
Permittivity of free space \( \epsilon_0 \) in F/m. More... | |
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... | |
const int | BUTLERVOLMER_NOACTIVITYCOEFFS_RXN = 25 |
This is a surface reaction that is formulated using the Butler-Volmer formulation and using concentrations instead of activity concentrations for its exchange current density formula. More... | |
const int | BUTLERVOLMER_RXN = 26 |
This is a surface reaction that is formulated using the Butler-Volmer formulation. More... | |
const int | SURFACEAFFINITY_RXN = 27 |
This is a surface reaction that is formulated using the affinity representation, common in the geochemistry community. More... | |
const int | EDGE_RXN = 22 |
A reaction occurring at a one-dimensional interface between two surface phases. More... | |
const int | GLOBAL_RXN = 30 |
A global reaction. More... | |
Rate Coefficient Types | |
These types define the supported rate coefficient types for elementary reactions. Any of these may also be used as the high and low-pressure limits of falloff and chemical activation reactions. Note that not all of these are currently implemented!
| |
const int | ARRHENIUS_REACTION_RATECOEFF_TYPE = 1 |
const int | LANDAUTELLER_REACTION_RATECOEFF_TYPE = 2 |
const int | TSTRATE_REACTION_RATECOEFF_TYPE = 3 |
const int | SURF_ARRHENIUS_REACTION_RATECOEFF_TYPE = 4 |
const int | ARRHENIUS_SUM_REACTION_RATECOEFF_TYPE = 5 |
const int | EXCHANGE_CURRENT_REACTION_RATECOEFF_TYPE = 6 |
const int | PLOG_REACTION_RATECOEFF_TYPE = 7 |
const int | CHEBYSHEV_REACTION_RATECOEFF_TYPE = 8 |
Falloff Function Types | |
const int | SIMPLE_FALLOFF = 100 |
const int | TROE_FALLOFF = 110 |
const int | SRI_FALLOFF = 112 |
CONSTANTS - Models for the Standard State of IdealSolidSolnPhase's | |
const int | cIdealSolidSolnPhase0 = 5010 |
const int | cIdealSolidSolnPhase1 = 5011 |
const int | cIdealSolidSolnPhase2 = 5012 |
CONSTANTS | |
Models for the Standard State of an IdealSolnPhase | |
const int | cIdealSolnGasPhaseG = 6009 |
const int | cIdealSolnGasPhase0 = 6010 |
const int | cIdealSolnGasPhase1 = 6011 |
const int | cIdealSolnGasPhase2 = 6012 |
CONSTANTS - Specification of the Molality convention | |
const int | cAC_CONVENTION_MOLAR = 0 |
Standard state uses the molar convention. More... | |
const int | cAC_CONVENTION_MOLALITY = 1 |
Standard state uses the molality convention. More... | |
CONSTANTS - Specification of the SS convention | |
const int | cSS_CONVENTION_TEMPERATURE = 0 |
Standard state uses the molar convention. More... | |
const int | cSS_CONVENTION_VPSS = 1 |
Standard state uses the molality convention. More... | |
const int | cSS_CONVENTION_SLAVE = 2 |
Standard state thermodynamics is obtained from slave ThermoPhase objects. More... | |
const int | LVISC_CONSTANT = 0 |
const int | LVISC_WILKES = 1 |
const int | LVISC_MIXTUREAVG = 2 |
const int | LDIFF_MIXDIFF_UNCORRECTED = 0 |
const int | LDIFF_MIXDIFF_FLUXCORRECTED = 1 |
const int | LDIFF_MULTICOMP_STEFANMAXWELL = 2 |
Namespace for the Cantera kernel.
Namespace for classes implementing zero-dimensional reactor networks.
typedef std::map<std::string, doublereal> compositionMap |
typedef std::map<std::string, doublereal> Composition |
typedef std::vector<double> vector_fp |
typedef std::vector<int> vector_int |
typedef std::vector<std::vector<size_t> > grouplist_t |
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 107 of file vcs_internal.h.
typedef ThermoPhase thermo_t |
typedef for the ThermoPhase class
Definition at line 1660 of file ThermoPhase.h.
Enum containing Cantera's behavior for situations where overflow or underflow of real variables may occur.
Note this frequently occurs when taking exponentials of delta Gibbs energies of reactions or when taking the exponentials of logs of activity coefficients.
Enumerator | |
---|---|
DONOTHING_CTRB |
For this specification of range behavior, nothing is done. This is the fastest behavior when all calculations are believed to be ranged well. For situations where there are range errors, NaN's or INF's will be introduced. |
CHANGE_OVERFLOW_CTRB |
For this specification of range behavior, the overflow or underflow calculation is changed. Cantera will proceed by bounding the real number to maintain its viability, silently changing the actual answer. |
THROWON_OVERFLOW_CTRB |
When an overflow or underflow occurs, Cantera will throw an error. |
FENV_CHECK_CTRB |
Cantera will use the fenv check capability introduced in C99 to check for overflow and underflow conditions at crucial points. It will throw an error if these conditions occur. |
THROWON_OVERFLOW_DEBUGMODEONLY_CTRB |
Cantera will throw an error in debug mode but will not in production mode. (default) |
Definition at line 64 of file ctexceptions.h.
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 31 of file Integrator.h.
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 40 of file Integrator.h.
enum ResidEval_Type_Enum |
Differentiates the type of residual evaluations according to functionality.
Definition at line 24 of file ResidJacEval.h.
enum 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 33 of file IonsFromNeutralVPSSTP.h.
Types of general formulations for the specification of the standard state volume.
Definition at line 104 of file mix_defs.h.
enum PDSS_enumType |
Types of PDSS's.
Definition at line 121 of file mix_defs.h.
enum VPSSMgr_enumType |
enum for VPSSMgr types that are responsible for calculating the species standard state and reference-state thermodynamic properties.
Definition at line 135 of file mix_defs.h.
Composition dependence type for liquid mixture transport properties.
Types of temperature dependencies:
* <transport model="Liquid"> * <viscosity> * <compositionDependence model="logMoleFractions"> * <interaction> * <speciesA> LiCl(L) </speciesA> * <speciesB> KCl(L) </speciesB> * <Eij units="J/kmol"> -1.0 </Eij> * <Sij units="J/kmol/K"> 1.0E-1 </Sij> * -or- <Sij> * <floatArray units="J/kmol/K"> 1.0E-1, 0.001 0.01 </floatArray> * </Sij> * -same form for Hij,Aij,Bij- * </interaction> * </compositionDependence> * </viscosity> * <speciesDiffusivity> * <compositionDependence model="pairwiseInteraction"> * <interaction> * <speciesA> Li+ </speciesA> * <speciesB> K+ </speciesB> * <Dij units="m2/s"> 1.5 </Dij> * </interaction> * <interaction> * <speciesA> K+ </speciesA> * <speciesB> Cl- </speciesB> * <Dij units="m2/s"> 1.0 </Dij> * </interaction> * <interaction> * <speciesA> Li+ </speciesA> * <speciesB> Cl- </speciesB> * <Dij units="m2/s"> 1.2 </Dij> * </interaction> * </compositionDependence> * </speciesDiffusivity> * <thermalConductivity> * <compositionDependence model="massFractions"/> * </thermalConductivity> * <hydrodynamicRadius> * <compositionDependence model="none"/> * </hydrodynamicRadius> * </transport> *
Definition at line 70 of file LiquidTranInteraction.h.
Enumeration of the types of transport properties that can be handled by the variables in the various Transport classes.
Not all of these are handled by each class and each class should handle exceptions where the transport property is not handled.
Transport properties currently on the list
0 - viscosity 1 - Ionic conductivity 2 - Mobility Ratio 3 - Self Diffusion coefficient 4 - Thermal conductivity 5 - species diffusivity 6 - hydrodynamic radius 7 - electrical conductivity
Definition at line 31 of file LTPspecies.h.
Temperature dependence type for standard state species properties.
Types of temperature dependencies: 0 - Independent of temperature 1 - extended arrhenius form 2 - polynomial in temperature form 3 - exponential temperature polynomial
Definition at line 53 of file LTPspecies.h.
void checkFinite | ( | const double | tmp | ) |
Check to see that a number is finite (not NaN, +Inf or -Inf)
Definition at line 43 of file checkFinite.cpp.
Referenced by NonlinearSolver::beuler_jac(), NonlinearSolver::computeResidWts(), BEulerInt::dampStep(), NonlinearSolver::doCauchyPointSolve(), RootFind::func(), NonlinearSolver::residErrorNorm(), NonlinearSolver::scaleMatrix(), and VCS_SOLVE::vcs_deltag().
|
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 41 of file ct2ctml.cpp.
References stripws().
Referenced by 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.
in_file | input file containing species and reactions |
thermo_file | optional input file containing thermo data |
transport_file | optional input file containing transport parameters |
id_tag | id of the phase |
Definition at line 188 of file ct2ctml.cpp.
References pypath(), stripws(), and writelog().
void get_CTML_Tree | ( | XML_Node * | node, |
const std::string & | file, | ||
const int | debug = 0 |
||
) |
Read an ctml file from a file and fill up an XML tree.
This is the main routine that reads a ctml file and puts it into an XML_Node tree
node | Root of the tree |
file | Name of the file |
debug | Turn on debugging printing |
Definition at line 277 of file ct2ctml.cpp.
References XML_Node::copy(), get_XML_File(), and warn_deprecated().
XML_Node getCtmlTree | ( | const std::string & | file | ) |
Read an ctml file from a file and fill up an XML tree.
file | Name of the file |
Definition at line 285 of file ct2ctml.cpp.
References XML_Node::copy(), get_XML_File(), and warn_deprecated().
bool check_FENV_OverUnder_Flow | ( | ) |
Quick check on whether there has been an underflow or overflow condition in the floating point unit.
Definition at line 82 of file ctexceptions.cpp.
Referenced by GibbsExcessVPSSTP::getActivityCoefficients().
void clear_FENV | ( | ) |
Clear all the flags for floating-point exceptions.
Definition at line 93 of file ctexceptions.cpp.
void addInteger | ( | XML_Node & | node, |
const std::string & | titleString, | ||
const int | value, | ||
const std::string & | unitsString = "" , |
||
const std::string & | typeString = "" |
||
) |
This function adds a child node with the name, "integer", with a value consisting of a single integer.
This function will add a child node to the current XML node, with the name "integer". It will have a title attribute, and the body of the XML node will be filled out with a single integer
Example:
Code snippet:
Creates the following the snippet in the XML file:
<parentNode> <integer title="maxIterations" type="optional"> 100 <\integer> <\parentNode>
node | reference to the XML_Node object of the parent XML element |
titleString | String name of the title attribute |
value | Value - single integer |
unitsString | String name of the Units attribute. The default is to have an empty string. |
typeString | String type. This is an optional parameter. The default is to have an empty string. |
Definition at line 17 of file ctml.cpp.
References XML_Node::addAttribute().
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:
Code snippet:
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>
node | reference to the XML_Node object of the parent XML element |
titleString | String name of the title attribute |
value | Value - single integer |
unitsString | String name of the Units attribute. The default is to have an empty string. |
typeString | String type. This is an optional parameter. The default is to have an empty string. |
minval | Minimum allowed value of the float. The default is the special double, Undef, which means to ignore the entry. |
maxval | Maximum allowed value of the float. The default is the special double, Undef, which means to ignore the entry. |
Definition at line 30 of file ctml.cpp.
References XML_Node::addAttribute(), and Undef.
Referenced by StFlow::save(), Inlet1D::save(), OutletRes1D::save(), Surf1D::save(), ReactingSurf1D::save(), and FreeFlame::save().
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:
Code snippet:
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>
node | reference to the XML_Node object of the parent XML element |
titleString | String name of the title attribute |
n | Length of the doubles vector. |
values | Pointer to a vector of doubles |
unitsString | String name of the Units attribute. This is an optional parameter. The default is to have an empty string. |
typeString | String type. This is an optional parameter. The default is to have an empty string. |
minval | Minimum allowed value of the int. This is an optional parameter. The default is the special double, Undef, which means to ignore the entry. |
maxval | Maximum allowed value of the int. This is an optional parameter. The default is the special double, Undef, which means to ignore the entry. |
Definition at line 51 of file ctml.cpp.
References XML_Node::addAttribute(), fp2str(), and Undef.
Referenced by StFlow::save(), and Domain1D::save().
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:
Code snipet:
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>
parentNode | reference to the XML_Node object of the parent XML element |
name | Name of the XML node |
n | Length of the doubles vector. |
vals | Pointer to a vector of doubles |
units | String name of the Units attribute. This is an optional parameter. The default is to have an empty string. |
type | String type. This is an optional parameter. The default is to have an empty string. |
minval | Minimum allowed value of the int. This is an optional parameter. The default is the special double, Undef, which means to ignore the entry. |
maxval | Maximum allowed value of the int. This is an optional parameter. The default is the special double, Undef, which means to ignore the entry. |
Definition at line 84 of file ctml.cpp.
References XML_Node::addAttribute(), fp2str(), and Undef.
Referenced by StFlow::save().
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:
Code snippet:
Creates the following the snippet in the XML file:
<string title="titleString" type="typeString"> valueString <\string>
node | reference to the XML_Node object of the parent XML element |
valueString | Value string to be used in the new XML node. |
titleString | String name of the title attribute |
typeString | String type. This is an optional parameter. |
Definition at line 122 of file ctml.cpp.
References XML_Node::addAttribute().
Referenced by StFlow::save().
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.
node | Current node from which to conduct the search |
title | Name of the title attribute |
Definition at line 133 of file ctml.cpp.
References XML_Node::findByAttr(), and XML_Node::parent().
Referenced by getNamedStringValue(), getString(), and newMu0ThermoFromXML().
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.
Code snippet:
returns valueString = "O(V)"
from the following the snippet in the XML file:
<vacancySpecies> O(V) <\vacancySpecies>
parent | parent reference to the XML_Node object of the parent XML element |
nameString | Name of the child XML_Node to read the value from. |
Definition at line 142 of file ctml.cpp.
References XML_Node::hasChild().
Referenced by DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), LatticePhase::setParametersFromXML(), SurfPhase::setStateFromXML(), MixtureFugacityTP::setStateFromXML(), MolalityVPSSTP::setStateFromXML(), and ThermoPhase::setStateFromXML().
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:
Code snipet:
Reads the following the snippet in the XML file:
<string title="titleString" type="typeString"> valueString <\string>
node | Reference to the XML_Node object of the parent XML element |
titleString | String name of the title attribute of the child node |
valueString | Value string that is found in the child node. output variable |
typeString | String type. This is an optional output variable. It is filled with the attribute "type" of the XML entry. |
Definition at line 150 of file ctml.cpp.
References XML_Node::attrib(), getByTitle(), XML_Node::name(), and XML_Node::value().
void getNamedStringValue | ( | const XML_Node & | node, |
const std::string & | nameString, | ||
std::string & | valueString, | ||
std::string & | typeString | ||
) |
This function attempts to read a named child node and returns with the contents in the value string.
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:
Code snippet:
Reads the following the snippet in the XML file:
<nameString type="typeString"> valueString <\nameString>
or alternatively as a retrofit and special case, it also reads the following case:
<string title="nameString" type="typeString"> valueString <\string>
node | Reference to the XML_Node object of the parent XML element | |
[in] | nameString | Name of the XML Node |
[out] | valueString | Value string that is found in the child node. |
[out] | typeString | String type. This is an optional output variable. It is filled with the attribute "type" of the XML entry. |
Definition at line 163 of file ctml.cpp.
References XML_Node::attrib(), XML_Node::child(), getByTitle(), XML_Node::hasChild(), XML_Node::name(), XML_Node::value(), and warn_deprecated().
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 created by the function addInteger(). One value per XML_node is expected.
Example:
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
node | Current XML node to get the values from |
v | Output map of the results. |
Definition at line 182 of file ctml.cpp.
References XML_Node::getChildren().
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:
Code snippet:
reads the corresponding XML file:
<state> <pressure units="Pa"> 101325.0 </pressure> <\state>
parent | reference to the XML_Node object of the parent XML element |
name | Name of the XML child element |
type | String type. Currently known types are "toSI" and "actEnergy", and "" , for no conversion. The default value is "", which implies that no conversion is allowed. |
Definition at line 194 of file ctml.cpp.
References XML_Node::child(), getFloatCurrent(), XML_Node::hasChild(), and XML_Node::name().
Referenced by PDSS_ConstVol::constructPDSSXML(), PDSS_HKFT::constructPDSSXML(), PDSS_SSVol::constructPDSSXML(), VPSSMgr_Water_ConstVol::createInstallPDSS(), VPSSMgr_ConstVol::createInstallPDSS(), getArrhenius(), getCoverageDependence(), getFloatDefaultUnits(), getOptionalFloat(), getRateCoefficient(), getStick(), LiquidTranInteraction::init(), VPSSMgr_Water_ConstVol::initThermoXML(), VPSSMgr_ConstVol::initThermoXML(), MineralEQ3::initThermoXML(), IdealMolalSoln::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), LTPspecies::LTPspecies(), newAdsorbateThermoFromXML(), newConstCpThermoFromXML(), newMu0ThermoFromXML(), newSpecies(), StFlow::restore(), Inlet1D::restore(), OutletRes1D::restore(), Surf1D::restore(), ReactingSurf1D::restore(), SemiconductorPhase::setParametersFromXML(), EdgePhase::setParametersFromXML(), MetalPhase::setParametersFromXML(), ConstDensityThermo::setParametersFromXML(), StoichSubstance::setParametersFromXML(), SurfPhase::setParametersFromXML(), StoichSubstanceSSTP::setParametersFromXML(), MetalSHEelectrons::setParametersFromXML(), LatticePhase::setParametersFromXML(), MixtureFugacityTP::setStateFromXML(), MolalityVPSSTP::setStateFromXML(), and ThermoPhase::setStateFromXML().
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:
Code snippet:
Reads the corresponding XML file:
<state> <pressure units="Pa"> 101325.0 </pressure> <\state>
currXML | reference to the current XML_Node object |
type | String type. Currently known types are "toSI" and "actEnergy", and "" , for no conversion. The default value is "", which implies that no conversion is allowed. |
Definition at line 206 of file ctml.cpp.
References actEnergyToSI(), XML_Node::fp_value(), fpValue(), XML_Node::name(), Tiny, toSI(), XML_Node::value(), and writelog().
Referenced by getFloat(), and LTPspecies_Const::LTPspecies_Const().
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:
Code snippet:
reads the corresponding XML file:
<state> <pressure units="Pa"> 101325.0 </pressure> <\state>
parent | reference to the XML_Node object of the parent XML element |
name | Name of the XML child element |
fltRtn | Float Return. It will be overridden if the XML element exists. |
type | String type. Currently known types are "toSI" and "actEnergy", and "" , for no conversion. The default value is "", which implies that no conversion is allowed. |
Definition at line 252 of file ctml.cpp.
References getFloat(), and XML_Node::hasChild().
Referenced by HMWSoln::initThermoXML(), HMWSoln::readXMLCroppingCoefficients(), FreeFlame::restore(), and SurfPhase::setStateFromXML().
doublereal getFloatDefaultUnits | ( | const XML_Node & | parent, |
const std::string & | name, | ||
const std::string & | defaultUnits, | ||
const std::string & | type = "toSI" |
||
) |
Get a floating-point value from a child element with a defined units field.
Returns a doublereal value for the child named 'name' of element 'parent'. 'type' must be supplied and match a known unit type. Note, it's an error for the child element not to exist.
Example:
Code snippet:
reads the corresponding XML file:
<state> <pressure units="Pa"> 101325.0 </pressure> <\state>
parent | reference to the XML_Node object of the parent XML element |
name | Name of the XML child element |
defaultUnits | Default units string to be found in the units attribute. If the units string in the XML field is equal to defaultUnits, no units conversion will be carried out. |
type | String type. Currently known types are "toSI" and "actEnergy", and "" , for no conversion. The default value is "", which implies that no conversion is allowed. |
Definition at line 264 of file ctml.cpp.
References actEnergyToSI(), getFloat(), and toSI().
Referenced by MineralEQ3::initThermoXML(), StoichSubstanceSSTP::initThermoXML(), MetalSHEelectrons::initThermoXML(), FixedChemPotSSTP::initThermoXML(), newShomateForMineralEQ3(), and FixedChemPotSSTP::setParametersFromXML().
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:
Code snippet:
reads the corresponding XML file:
<transport model="Simple"> <compositionDependence model="Solvent_Only"/> </transport>
On return modelName is set to "Solvent_Only".
parent | reference to the XML_Node object of the parent XML element |
nodeName | Name of the XML child element |
modelName | On return this contains the contents of the model attribute |
Definition at line 291 of file ctml.cpp.
References XML_Node::child(), and XML_Node::hasChild().
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:
Code snippet:
reads the corresponding XML file:
<state> <numProcs> 10 <numProcs/> <\state>
parent | reference to the XML_Node object of the parent XML element |
name | Name of the XML child element |
Definition at line 301 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().
size_t getFloatArray | ( | const XML_Node & | node, |
std::vector< doublereal > & | 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:
Code snippet:
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.
node | XML parent node of the floatArray |
v | Output vector of floats containing the floatArray information. |
convert | Conversion to SI is carried out if this boolean is True. The default is true. |
unitsString | String 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. |
nodeName | XML Name of the XML node to read. The default value for the node name is floatArray |
Definition at line 323 of file ctml.cpp.
References actEnergyToSI(), XML_Node::attrib(), fp2str(), fpValueCheck(), XML_Node::getChildren(), XML_Node::name(), npos, Tiny, toSI(), Undef, XML_Node::value(), and writelog().
Referenced by PDSS_SSVol::constructPDSSXML(), getRateCoefficient(), LiquidTranInteraction::init(), LTPspecies_ExpT::LTPspecies_ExpT(), LTPspecies_Poly::LTPspecies_Poly(), newAdsorbateThermoFromXML(), newMu0ThermoFromXML(), newNasa9ThermoFromXML(), newNasaThermoFromXML(), newShomateThermoFromXML(), HMWSoln::readXMLBinarySalt(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKwongMFTP::readXMLCrossFluid(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), RedlichKwongMFTP::readXMLPureFluid(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), StFlow::restore(), and Domain1D::restore().
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.
node | Current node |
m | Output Map containing the pairs of values found in the XML Node |
Definition at line 403 of file ctml.cpp.
References getStringArray(), and npos.
Referenced by DebyeHuckel::initThermoXML(), and HMWSoln::initThermoXML().
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" |
node | XML Node |
key | Vector of keys for each entry |
val | Vector of values for each entry |
Definition at line 417 of file ctml.cpp.
References getStringArray(), and npos.
Referenced by PDSS_IonsFromNeutral::constructPDSSXML(), getEfficiencies(), getReagents(), and LatticeSolidPhase::setParametersFromXML().
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
node | XML Node containing the information for the matrix |
keyStringRow | Key string for the row |
keyStringCol | Key string for the column entries |
returnValues | Return Matrix. |
convert | If this is true, and if the node has a units attribute, then conversion to SI units is carried out. Default is true. |
matrixSymmetric | If true entries are made so that the matrix is always symmetric. Default is false. |
Definition at line 435 of file ctml.cpp.
References fpValueCheck(), getStringArray(), Array2D::nColumns(), npos, Array2D::nRows(), and toSI().
Referenced by DebyeHuckel::initThermoXML().
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
node | Node to get the value from |
v | Output vector containing the string tokens |
Definition at line 503 of file ctml.cpp.
References tokenizeString(), and XML_Node::value().
Referenced by Elements::addElementsFromXML(), HMWSoln::constructPhaseXML(), formSpeciesXMLNodeList(), getFalloff(), getMap(), getMatrixValues(), getPairs(), importKinetics(), IdealMolalSoln::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), installElements(), and readFalloff().
|
static |
Return a pointer to the application object.
Definition at line 17 of file global.cpp.
Referenced by addDirectory(), close_XML_File(), error(), findInputFile(), get_XML_File(), get_XML_from_string(), lastErrorMessage(), nErrors(), popError(), setError(), setLogger(), showErrors(), suppress_deprecation_warnings(), thread_complete(), warn_deprecated(), writelog(), and writelogendl().
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
logwriter | Pointer to a logger object |
Definition at line 24 of file global.cpp.
References app(), Logger::error(), and Application::setLogger().
void writelog | ( | 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.
msg | c++ string to be written to the screen |
Definition at line 33 of file global.cpp.
References app(), and Application::writelog().
Referenced by Bdry1D::_getInitialSoln(), ReactorNet::addReactor(), InterfaceKinetics::applyVoltageKfwdCorrection(), BasisOptimize(), NasaThermo::checkContinuity(), ck2cti(), MultiNewton::dampStep(), ChemEquil::dampStep(), ElemRearrange(), ChemEquil::equilibrate(), MultiPhase::equilibrate(), ThermoPhase::equilibrate(), ChemEquil::equilResidual(), ChemEquil::estimateElementPotentials(), ChemEquil::estimateEP_Brinkley(), GasTransport::fitCollisionIntegrals(), GasTransport::fitProperties(), getFloatArray(), getFloatCurrent(), FlowReactor::getInitialConditions(), getInteger(), MMCollisionInt::init(), ChemEquil::initialize(), ReactorNet::initialize(), PDSS_HKFT::initThermo(), PureFluidPhase::initThermo(), NasaThermo::install(), SimpleThermo::install(), ShomateThermo::install(), RedlichKwongMFTP::NicholsSolve(), print_stringTrunc(), Sim1D::refine(), ReactorNet::reinitialize(), Sim1D::restore(), StFlow::restore(), Domain1D::restore(), ChemEquil::setInitialMoles(), GasTransport::setupMM(), Inlet1D::showSolution(), StFlow::showSolution(), Surf1D::showSolution(), ReactingSurf1D::showSolution(), Domain1D::showSolution(), MultiNewton::solve(), RootFind::solve(), OneDim::timeStep(), NasaPoly2::validate(), writelog(), writelogf(), and OneDim::writeStats().
void writelogendl | ( | ) |
Write an end of line character to the screen and flush output.
Definition at line 56 of file global.cpp.
References app(), and Application::writelogendl().
Referenced by RedlichKwongMFTP::NicholsSolve().
void error | ( | const std::string & | msg | ) |
Write an error message and quit.
The default behavior is to write to the standard error stream, and then call exit(). Note that no end-of-line character is appended to the message, and so if one is desired it must be included in the string. Note that this default behavior will terminate the application Cantera is invoked from (MATLAB, Excel, etc.) If this is not desired, then derive a class and reimplement this method.
msg | Error message to be written to cerr. |
Definition at line 72 of file global.cpp.
References app(), Application::logerror(), and warn_deprecated().
Referenced by Phase::addSpecies(), NonlinearSolver::calcSolnToResNormVector(), NonlinearSolver::print_solnDelta_norm_contrib(), NonlinearSolver::residErrorNorm(), BEulerInt::soln_error_norm(), NonlinearSolver::solnErrorNorm(), Phase::throwUndefinedElements(), and BEulerInt::time_error_norm().
void warn_deprecated | ( | const std::string & | method, |
const std::string & | extra = "" |
||
) |
Print a warning indicating that method is deprecated.
Additional information (removal version, alternatives) can be specified in extra. Deprecation warnings are printed once per method per invocation of the application.
Definition at line 78 of file global.cpp.
References app(), and Application::warn_deprecated().
Referenced by _dot_ratio(), vcs_VolPhase::_updateActCoeff(), vcs_VolPhase::_updateG0(), vcs_VolPhase::_updateGStar(), vcs_VolPhase::_updateMoleFractionDependencies(), vcs_VolPhase::_updateVolPM(), vcs_VolPhase::_updateVolStar(), absmax(), add_each(), Phase::addElement(), Phase::addElementsFromXML(), ReactorNet::addReactor(), Phase::addSpecies(), Phase::addUniqueElement(), Phase::addUniqueElementAfterFreeze(), Phase::addUniqueSpecies(), BEulerInt::BEulerInt(), checkRxnElementBalance(), Array2D::copyData(), BandMatrix::copyData(), copyn(), IdealGasPhase::cv_rot(), IdealGasPhase::cv_tr(), IdealGasPhase::cv_trans(), IdealGasPhase::cv_vib(), divide_each(), StFlow::doSpecies(), dot6(), dot_product(), dot_ratio(), electrodeElectron::electrodeElectron(), ElectrodeKinetics::ElectrodeKinetics(), Elements::Elements(), Phase::elementsFrozen(), equilibrate(), MultiPhase::equilibrate(), error(), ExchangeCurrent::ExchangeCurrent(), ExtraGlobalRxn::ExtraGlobalRxn(), SpeciesThermoFactory::factory(), fillArrayFromString(), StFlow::fixSpecies(), Phase::freezeElements(), get_CTML_Tree(), getBaseName(), XML_Node::getChildren(), getCtmlTree(), Phase::getMoleFractionsByName(), getNamedStringValue(), getRateCoefficient(), getReagents(), StoichSubstance::getUnitsStandardConc(), IdealSolnGasVPSS::getUnitsStandardConc(), GibbsExcessVPSSTP::getUnitsStandardConc(), MineralEQ3::getUnitsStandardConc(), RedlichKwongMFTP::getUnitsStandardConc(), StoichSubstanceSSTP::getUnitsStandardConc(), FixedChemPotSSTP::getUnitsStandardConc(), MetalSHEelectrons::getUnitsStandardConc(), IdealMolalSoln::getUnitsStandardConc(), IdealSolidSolnPhase::getUnitsStandardConc(), MolalityVPSSTP::getUnitsStandardConc(), ThermoPhase::getUnitsStandardConc(), DebyeHuckel::getUnitsStandardConc(), HMWSoln::getUnitsStandardConc(), increment_scale(), TransportFactory::initTransport(), FalloffMgr::install(), GeneralSpeciesThermo::install(), installSpecies(), SpeciesThermoFactory::installVPThermoForSpecies(), isDuplicateReaction(), Application::Messages::logerror(), logfileName(), MargulesVPSSTP::MargulesVPSSTP(), Phase::mean_Y(), MixedSolventElectrolyte::MixedSolventElectrolyte(), multiply_each(), SpeciesThermoFactory::newSpeciesThermo(), SpeciesThermoFactory::newSpeciesThermoManager(), newSpeciesThermoMgr(), NonlinearSolver::NonlinearSolver(), XML_Node::operator()(), PhaseCombo_Interaction::PhaseCombo_Interaction(), poly10(), Kinetics::products(), PseudoBinaryVPSSTP::PseudoBinaryVPSSTP(), Kinetics::reactants(), InterfaceKinetics::reactionNumber(), ReactionStoichMgr::ReactionStoichMgr(), RedlichKisterVPSSTP::RedlichKisterVPSSTP(), RedlichKwongMFTP::RedlichKwongMFTP(), resize_each(), RxnMolChange::RxnMolChange(), scale(), scatter_divide(), vcs_VolPhase::setElectricPotential(), SolidTransport::setParameters(), DustyGasTransport::setParameters(), vcs_VolPhase::setPtrThermoPhase(), ThermoPhase::setSpeciesThermo(), vcs_VolPhase::setState_TP(), ShomateThermo::ShomateThermo(), SimpleThermo::SimpleThermo(), solveProb::solveProb(), StFlow::solveSpecies(), SpeciesThermoDuo< T1, T2 >::SpeciesThermoDuo(), SpeciesThermoInterpType::SpeciesThermoInterpType(), split(), StatMech::StatMech(), Phase::sum_xlogQ(), vcs_equilibrate(), vcs_equilibrate_1(), vcs_max_int(), VCS_SOLVE::vcs_rank(), vcsUtil_root1d(), and StFlow::Y_fixed().
void suppress_deprecation_warnings | ( | ) |
Globally disable printing of deprecation warnings.
Used primarily to prevent certain tests from failing.
Definition at line 83 of file global.cpp.
References app(), and Application::suppress_deprecation_warnings().
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 93 of file global.cpp.
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 100 of file global.cpp.
References app(), and Application::thread_complete().
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.
file | String containing the relative or absolute file name |
debug | Debug flag |
Definition at line 105 of file global.cpp.
References app(), and Application::get_XML_File().
Referenced by Elements::addElementsFromXML(), electrodeElectron::electrodeElectron(), FixedChemPotSSTP::FixedChemPotSSTP(), get_CTML_Tree(), get_XML_NameID(), get_XML_Node(), getCtmlTree(), IdealSolnGasVPSS::IdealSolnGasVPSS(), ThermoPhase::initThermoFile(), installElements(), Interface::Interface(), MetalSHEelectrons::MetalSHEelectrons(), MineralEQ3::MineralEQ3(), newPhase(), RedlichKwongMFTP::RedlichKwongMFTP(), StoichSubstanceSSTP::StoichSubstanceSSTP(), and SurfPhase::SurfPhase().
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.
text | CTI or CTML string |
Definition at line 111 of file global.cpp.
References app(), and Application::get_XML_from_string().
void close_XML_File | ( | const std::string & | file | ) |
Close an XML File.
Close a file that is opened by this application object
file | String containing the relative or absolute file name |
Definition at line 116 of file global.cpp.
References app(), and Application::close_XML_File().
void popError | ( | ) |
Discard the last error message.
Cantera saves a stack of exceptions that it has caught in the Application class. This routine eliminates the last exception to be added to that stack.
Definition at line 126 of file global.cpp.
References app(), and Application::popError().
Referenced by SpeciesThermoFactory::newSpeciesThermo(), and VPSSMgrFactory::newVPSSMgr().
std::string lastErrorMessage | ( | ) |
Retrieve the last error message in a string.
This routine will retrieve the last error message and return it in the return string.
Definition at line 131 of file global.cpp.
References app(), and Application::lastErrorMessage().
void showErrors | ( | std::ostream & | f | ) |
Prints all of the error messages to an ostream.
Write out all of the saved error messages to the ostream f using the function Logger::writelog. Cantera saves a stack of exceptions that it has caught in the Application class. This routine writes out all of the error messages to the ostream and then clears them from internal storage.
f | ostream which will receive the error messages |
Definition at line 136 of file global.cpp.
References app(), and Application::getErrors().
Referenced by TransportFactory::getSolidTransportData().
void showErrors | ( | ) |
Prints all of the error messages using writelog.
Print all of the error messages using function writelog. Cantera saves a stack of exceptions that it has caught in the Application class. This routine writes out all of the error messages and then clears them from internal storage.
Definition at line 141 of file global.cpp.
References app(), and Application::logErrors().
void setError | ( | const std::string & | r, |
const std::string & | msg | ||
) |
Set an error condition in the application class without throwing an exception.
This routine adds an error message to the end of the stack of errors that Cantera accumulates in the Application class.
r | Procedure name which is generating the error condition |
msg | Descriptive message of the error condition. |
Definition at line 146 of file global.cpp.
References Application::addError(), and app().
doublereal toSI | ( | const std::string & | unit | ) |
Return the conversion factor to convert unit std::string 'unit' to SI units.
unit | String containing the units |
Definition at line 161 of file global.cpp.
Referenced by getFloatArray(), getFloatCurrent(), getFloatDefaultUnits(), getMatrixValues(), MineralEQ3::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), and strSItoDbl().
doublereal actEnergyToSI | ( | const std::string & | unit | ) |
Return the conversion factor to convert activation energy unit std::string 'unit' to Kelvin.
unit | String containing the activation energy units |
Definition at line 172 of file global.cpp.
Referenced by getFloatArray(), getFloatCurrent(), and getFloatDefaultUnits().
|
static |
split a string at a '#' sign. Used to separate a file name from an id string.
src | Original string to be split up. This is unchanged. |
file | Output string representing the first part of the string, which is the filename. |
id | Output string representing the last part of the string, which is the id. |
Definition at line 202 of file global.cpp.
References npos.
Referenced by get_XML_NameID(), and 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.
file_ID | This 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. |
root | If the file string is empty, searches for the XML element with matching ID attribute are carried out from this XML node. |
Definition at line 214 of file global.cpp.
References XML_Node::findID(), findInputFile(), get_XML_File(), and split_at_pound().
Referenced by IonsFromNeutralVPSSTP::constructPhaseXML(), importPhase(), IonsFromNeutralVPSSTP::initThermoXML(), installReactionArrays(), and Interface::Interface().
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.
nameTarget | This is the XML element name to look for. |
file_ID | This 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. |
root | If the file string is empty, searches for the XML element with matching ID attribute are carried out from this XML node. |
Definition at line 252 of file global.cpp.
References XML_Node::findNameID(), get_XML_File(), and split_at_pound().
Referenced by buildSolutionFromXML(), PDSS_ConstVol::constructPDSSFile(), PDSS_IonsFromNeutral::constructPDSSFile(), PDSS_HKFT::constructPDSSFile(), PDSS_SSVol::constructPDSSFile(), electrodeElectron::electrodeElectron(), FixedChemPotSSTP::FixedChemPotSSTP(), IdealSolnGasVPSS::IdealSolnGasVPSS(), VPSSMgr_Water_ConstVol::initThermoXML(), VPSSMgr_ConstVol::initThermoXML(), VPSSMgr_Water_HKFT::initThermoXML(), IdealMolalSoln::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), MetalSHEelectrons::MetalSHEelectrons(), MineralEQ3::MineralEQ3(), newPhase(), RedlichKwongMFTP::RedlichKwongMFTP(), StoichSubstanceSSTP::StoichSubstanceSSTP(), and SurfPhase::SurfPhase().
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.
fname | Output file name |
fmt | Either TEC or XL or CSV |
plotTitle | Title of the plot |
names | vector of variable names |
data | N x M data array. data(n,m) is the m^th value of the n^th variable. |
Definition at line 13 of file plots.cpp.
References outputExcel(), and outputTEC().
void outputTEC | ( | std::ostream & | s, |
const std::string & | title, | ||
const std::vector< std::string > & | names, | ||
const Array2D & | data | ||
) |
Write a Tecplot data file.
s | output stream |
title | plot title |
names | vector of variable names |
data | N x M data array. data(n,m) is the m^th value of the n^th variable. |
Definition at line 35 of file plots.cpp.
References Array2D::nColumns(), and Array2D::nRows().
Referenced by writePlotFile().
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.
s | output stream |
title | plot title |
names | vector of variable names |
data | N x M data array. data(n,m) is the m^th value of the n^th variable. |
Definition at line 59 of file plots.cpp.
References Array2D::nColumns(), and Array2D::nRows().
Referenced by writePlotFile().
std::string fp2str | ( | const double | x, |
const std::string & | fmt = "%g" |
||
) |
Convert a double into a c++ string.
x | double to be converted |
fmt | Format to be used (printf style) |
Definition at line 28 of file stringUtils.cpp.
Referenced by XML_Node::addAttribute(), addFloatArray(), addNamedFloatArray(), XML_Node::addValue(), InterfaceKinetics::applyVoltageKfwdCorrection(), IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions(), NasaThermo::checkContinuity(), GibbsExcessVPSSTP::checkMFSum(), Kinetics::checkReactionBalance(), checkRxnElementBalance(), WaterProps::coeffThermalExp_IAPWS(), WaterPropsIAPWS::corr(), MixtureFugacityTP::corr0(), WaterPropsIAPWS::corr1(), PDSS_Water::dthermalExpansionCoeffdT(), WaterSSTP::dthermalExpansionCoeffdT(), ChemEquil::equilibrate(), FixedChemPotSSTP::FixedChemPotSSTP(), GibbsExcessVPSSTP::getActivityCoefficients(), getFloatArray(), SRI::init(), ChemEquil::initialize(), PDSS_HKFT::initThermo(), NasaThermo::install(), SimpleThermo::install(), ShomateThermo::install(), WaterProps::isothermalCompressibility_IAPWS(), oxygen::ldens(), nitrogen::ldens(), hydrogen::ldens(), methane::ldens(), Heptane::ldens(), CarbonDioxide::ldens(), RedlichKwongMFTP::NicholsSolve(), water::Psat(), oxygen::Psat(), nitrogen::Psat(), hydrogen::Psat(), methane::Psat(), HFC134a::Psat(), Heptane::Psat(), CarbonDioxide::Psat(), MargulesVPSSTP::readXMLBinarySpecies(), Sim1D::refine(), Substance::Set(), Substance::set_TPp(), Refiner::setCriteria(), vcs_VolPhase::setMoleFractionsState(), vcs_VolPhase::setMolesFromVCSCheck(), PDSS_Water::setPressure(), SurfPhase::setSiteDensity(), SingleSpeciesTP::setState_HP(), ThermoPhase::setState_HPorUV(), SingleSpeciesTP::setState_SP(), ThermoPhase::setState_SPorSV(), SingleSpeciesTP::setState_SV(), SingleSpeciesTP::setState_UV(), vcs_VolPhase::setTotalMoles(), RootFind::solve(), ChemEquil::update(), Plog::update_C(), Substance::update_sat(), MixTransport::update_T(), PecosTransport::update_T(), AqueousTransport::update_T(), SimpleTransport::update_T(), LiquidTransport::update_T(), Reactor::updateState(), GasTransportData::validate(), NasaPoly2::validate(), Plog::validate(), VCS_SOLVE::vcs_dfe(), VCS_SOLVE::vcs_nondim_TP(), VCS_SOLVE::vcs_popPhasePossible(), VCS_SOLVE::vcs_prob_specifyFully(), VCS_SOLVE::vcs_prob_update(), C_AnyN::writeDecrementReaction(), C_AnyN::writeDecrementSpecies(), C_AnyN::writeIncrementReaction(), C_AnyN::writeIncrementSpecies(), and C_AnyN::writeMultiply().
std::string int2str | ( | const int | n, |
const std::string & | fmt = "%d" |
||
) |
Convert an int to a string using a format converter.
n | int to be converted |
fmt | format converter for an int int the printf command |
Definition at line 39 of file stringUtils.cpp.
Referenced by XML_Node::addAttribute(), GasKinetics::addReaction(), AqueousKinetics::addReaction(), ReactorNet::addReactor(), Reactor::addSensitivityReaction(), InterfaceKinetics::applyVoltageKfwdCorrection(), NonlinearSolver::beuler_jac(), NonlinearSolver::boundStep(), Kinetics::checkDuplicates(), Domain1D::componentName(), MultiNewton::dampStep(), VCS_SOLVE::delta_species(), NonlinearSolver::deltaBoundStep(), WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), NonlinearSolver::doAffineNewtonSolve(), Elements::elementName(), ChemEquil::equilibrate(), MultiPhase::equilibrate(), ThermoPhase::equilibrate(), vcs_MultiPhaseEquil::equilibrate_HP(), vcs_MultiPhaseEquil::equilibrate_TV(), IdealGasReactor::evalEqs(), Reactor::evalEqs(), SquareMatrix::factor(), SquareMatrix::factorQR(), EdgeKinetics::finalize(), InterfaceKinetics::finalize(), XML_Node::findNameIDIndex(), fmt(), GibbsExcessVPSSTP::getActivityCoefficients(), getEfficiencies(), getFalloff(), MultiTransport::getMassFluxes(), MultiTransport::getMultiDiffCoeffs(), HighPressureGasTransport::getMultiDiffCoeffs(), getRateCoefficient(), importPhase(), Falloff::init(), Troe::init(), SRI::init(), ReactorNet::initialize(), Rate1< Cantera::Plog >::install(), NasaThermo::install(), SimpleThermo::install(), ShomateThermo::install(), GeneralSpeciesThermo::install_STIT(), LatticeSolidPhase::installSlavePhases(), CVodeInt::integrate(), CVodesIntegrator::integrate(), invert(), GasKinetics::modifyReaction(), Kinetics::modifyReaction(), newSpeciesThermoInterpType(), Sim1D::newtonSolve(), VPSSMgrFactory::newVPSSMgr(), polyfit(), solveProb::print_header(), solveSP::print_header(), NonlinearSolver::print_solnDelta_norm_contrib(), HMWSoln::printCoeffs(), solveProb::printFinal(), solveSP::printIteration(), solveProb::printIteration(), WaterPropsIAPWS::psat(), SquareMatrix::rcond(), BandMatrix::rcond(), SquareMatrix::rcondQR(), readFalloff(), NonlinearSolver::residErrorNorm(), Sim1D::restore(), StFlow::restore(), Domain1D::restore(), MolalityVPSSTP::setpHScale(), Sim1D::setValue(), NonlinearSolver::solnErrorNorm(), SquareMatrix::solve(), MultiNewton::solve(), solve(), SquareMatrix::solveQR(), solveSP::solveSurfProb(), Kinetics::speciesPhaseIndex(), MultiNewton::step(), CVodeInt::step(), CVodesIntegrator::step(), InterfaceKinetics::updateKc(), DustyGasTransport::updateMultiDiffCoeffs(), IdealGasReactor::updateState(), Reactor::updateState(), Sim1D::value(), vcs_Cantera_to_vprob(), vcs_determine_PhaseStability(), VCS_SOLVE::vcs_dfe(), vcs_equilibrate_1(), VCS_SOLVE::vcs_evaluate_speciesType(), VCS_SOLVE::vcs_nondim_Farad(), VCS_SOLVE::vcs_nondimMult_TP(), VCS_SOLVE::vcs_popPhasePossible(), VCS_SOLVE::vcs_printSpeciesChemPot(), VCS_SOLVE::vcs_switch_elem_pos(), VCS_SOLVE::vcs_updateVP(), vcsUtil_gasConstant(), OneDim::writeStats(), and XML_Error::XML_Error().
std::string int2str | ( | const size_t | n | ) |
Convert an unsigned integer to a string.
n | int to be converted |
Definition at line 50 of file stringUtils.cpp.
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)
v | vector to be converted |
fmt | Format to be used (printf style) for each element |
sep | Separator |
Definition at line 57 of file stringUtils.cpp.
Referenced by GasTransport::fitProperties(), and MMCollisionInt::init().
std::string lowercase | ( | const std::string & | s | ) |
Cast a copy of a string to lower case.
s | Input string |
Definition at line 73 of file stringUtils.cpp.
Referenced by PDSS_IonsFromNeutral::constructPDSSXML(), PDSS_HKFT::constructPDSSXML(), IonsFromNeutralVPSSTP::constructPhaseXML(), HMWSoln::constructPhaseXML(), LiquidTranInteraction::init(), VPSSMgr_Water_HKFT::initThermoXML(), MaskellSolidSolnPhase::initThermoXML(), MolarityIonicVPSSTP::initThermoXML(), IdealSolnGasVPSS::initThermoXML(), RedlichKwongMFTP::initThermoXML(), RedlichKisterVPSSTP::initThermoXML(), MixedSolventElectrolyte::initThermoXML(), MargulesVPSSTP::initThermoXML(), IonsFromNeutralVPSSTP::initThermoXML(), PhaseCombo_Interaction::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), interp_est(), HMWSoln::interp_est(), KineticsFactory::newKinetics(), TransportFactory::newLTP(), newReaction(), newSpeciesThermoInterpType(), SpeciesThermoFactory::newSpeciesThermoManager(), readFalloff(), HMWSoln::readXMLBinarySalt(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKwongMFTP::readXMLCrossFluid(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), RedlichKwongMFTP::readXMLPureFluid(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), and VPSSMgrFactory::VPSSMgr_StringConversion().
|
static |
Return the position of the first printable character in the string.
s | input string |
Definition at line 88 of file stringUtils.cpp.
Referenced by stripws().
|
static |
Return the position of the last printable character in the string.
s | input string |
Definition at line 106 of file stringUtils.cpp.
Referenced by stripws().
std::string stripws | ( | const std::string & | s | ) |
Strip the leading and trailing white space from a string.
The command isprint() is used to determine printable characters.
s | Input string |
Definition at line 117 of file stringUtils.cpp.
References firstChar(), and lastChar().
Referenced by Phase::addElement(), Elements::addUniqueElement(), XML_Node::addValue(), ck2cti(), fpValueCheck(), intValue(), parseCompString(), parseSpeciesName(), XML_Reader::parseTag(), pypath(), and XML_Reader::readValue().
std::string stripnonprint | ( | const std::string & | s | ) |
Strip non-printing characters wherever they are.
s | Input string |
Definition at line 124 of file stringUtils.cpp.
Referenced by Application::addDataDirectory().
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
ss | original 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. |
Definition at line 135 of file stringUtils.cpp.
References fpValueCheck(), npos, and stripws().
Referenced by FixedChemPotSSTP::FixedChemPotSSTP(), newSpecies(), SurfPhase::setCoveragesByName(), Phase::setMassFractionsByName(), MolalityVPSSTP::setMolalitiesByName(), Phase::setMoleFractionsByName(), and MultiPhase::setMolesByName().
void split | ( | const std::string & | ss, |
std::vector< std::string > & | w | ||
) |
Parse a composition string into individual key:composition pairs.
ss | original string consisting of multiple key:composition pairs on multiple lines |
w | Output vector consisting of single key:composition items in each index. |
Definition at line 167 of file stringUtils.cpp.
References npos, and warn_deprecated().
int fillArrayFromString | ( | const std::string & | str, |
doublereal *const | a, | ||
const char | delim = ' ' |
||
) |
Interpret a string as a list of floats, and convert it to a vector of floats.
str | String input vector |
a | Output pointer to a vector of floats |
delim | character delimiter. Defaults to a space |
Definition at line 189 of file stringUtils.cpp.
References fpValueCheck(), and warn_deprecated().
std::string getBaseName | ( | const std::string & | fullPath | ) |
Get the file name without the path or extension.
fullPath | Input file name consisting of the full file name |
Definition at line 212 of file stringUtils.cpp.
References warn_deprecated().
Referenced by logfileName().
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.
val | String value of the integer |
Definition at line 230 of file stringUtils.cpp.
References stripws().
Referenced by getInteger(), importPhase(), installElements(), and Sim1D::restore().
doublereal fpValue | ( | const std::string & | val | ) |
Translate a string into one doublereal value.
No error checking is done on the conversion.
val | String value of the double |
Definition at line 235 of file stringUtils.cpp.
Referenced by Elements::addElement(), Phase::addElement(), Elements::addUniqueElement(), fpValueCheck(), getEfficiencies(), getFalloff(), getFloatCurrent(), getRateCoefficient(), getReagents(), MaskellSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), installElements(), newAdsorbateThermoFromXML(), newConstCpThermoFromXML(), newMu0ThermoFromXML(), newNasa9ThermoFromXML(), newNasaThermoFromXML(), newShomateThermoFromXML(), newStatMechThermoFromXML(), and PecosTransport::read_blottner_transport_table().
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.
val | String representation of the number |
Definition at line 244 of file stringUtils.cpp.
References fpValue(), and stripws().
Referenced by Phase::addElement(), Elements::addUniqueElement(), PDSS_IonsFromNeutral::constructPDSSXML(), PDSS_HKFT::constructPDSSXML(), HMWSoln::constructPhaseXML(), fillArrayFromString(), XML_Node::fp_value(), getFloatArray(), getMatrixValues(), HMWSoln::initThermoXML(), installElements(), parseCompString(), readFalloff(), HMWSoln::readXMLBinarySalt(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), LatticeSolidPhase::setParametersFromXML(), and strSItoDbl().
std::string logfileName | ( | const std::string & | infile | ) |
Generate a logfile name based on an input file name.
It tries to find the basename. Then, it appends a .log to it.
infile | Input file name |
Definition at line 290 of file stringUtils.cpp.
References getBaseName(), and warn_deprecated().
std::string wrapString | ( | const std::string & | s, |
const int | len = 70 |
||
) |
Line wrap a string via a copy operation.
s | Input string to be line wrapped |
len | Length at which to wrap. The default is 70. |
Definition at line 298 of file stringUtils.cpp.
Referenced by ReactionStoichMgr::writeCreationRates(), ReactionStoichMgr::writeDestructionRates(), and ReactionStoichMgr::writeNetProductionRates().
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.
[in] | nameStr | Name string containing the phase name and the species name separated by a colon. The phase name is optional. example: "silane:SiH4" |
[out] | phaseName | Name of the phase, if specified. If not specified, a blank string is returned. |
Definition at line 317 of file stringUtils.cpp.
References npos, and stripws().
Referenced by Phase::speciesIndex().
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.
strSI | string to be converted. One or two tokens |
Definition at line 343 of file stringUtils.cpp.
References fpValueCheck(), tokenizeString(), and toSI().
Referenced by PDSS_HKFT::constructPDSSXML(), and newShomateForMineralEQ3().
|
static |
Find the first white space in a string.
Returns the location of the first white space character in a string
val | Input string to be parsed |
Definition at line 367 of file stringUtils.cpp.
References npos.
Referenced by tokenizeString().
|
static |
Find the first non-white space in a string.
Returns the location of the first non-white space character in a string
val | Input string to be parsed |
Definition at line 392 of file stringUtils.cpp.
References npos.
Referenced by 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.
oval | String to be broken up |
v | Output vector of tokens. |
Definition at line 409 of file stringUtils.cpp.
References findFirstNotOfWS(), findFirstWS(), and npos.
Referenced by getStringArray(), and strSItoDbl().
void 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.
Definition at line 433 of file stringUtils.cpp.
|
static |
Find the first position of a character, q, in string, s, which is not immediately preceded by the backslash character.
s | Input string |
q | Search for this character |
istart | Defaults to 0 |
Definition at line 141 of file xml.cpp.
References npos.
Referenced by XML_Reader::findQuotedString().
XML_Node * findXMLPhase | ( | XML_Node * | root, |
const std::string & | phaseName | ||
) |
Search an XML_Node tree for a named phase XML_Node.
Search for a phase Node matching a name.
root | Starting XML_Node* pointer for the search |
phaseName | Name of the phase to search for |
Definition at line 1108 of file xml.cpp.
References XML_Node::children(), XML_Node::id(), XML_Node::name(), and XML_Node::nChildren().
Referenced by PDSS_IdealGas::constructPDSSFile(), PDSS_ConstVol::constructPDSSFile(), PDSS_IonsFromNeutral::constructPDSSFile(), PDSS_HKFT::constructPDSSFile(), PDSS_Water::constructPDSSFile(), PDSS_SSVol::constructPDSSFile(), IonsFromNeutralVPSSTP::constructPhaseFile(), HMWSoln::constructPhaseFile(), DebyeHuckel::DebyeHuckel(), HMWSoln::HMWSoln(), IdealMolalSoln::IdealMolalSoln(), IdealSolidSolnPhase::IdealSolidSolnPhase(), ThermoPhase::initThermoFile(), LatticePhase::LatticePhase(), MargulesVPSSTP::MargulesVPSSTP(), MixedSolventElectrolyte::MixedSolventElectrolyte(), MolarityIonicVPSSTP::MolarityIonicVPSSTP(), Phase::operator=(), PhaseCombo_Interaction::PhaseCombo_Interaction(), RedlichKisterVPSSTP::RedlichKisterVPSSTP(), Phase::setXMLdata(), and WaterSSTP::WaterSSTP().
int _equilflag | ( | const char * | xy | ) |
map property strings to integers
Definition at line 24 of file ChemEquil.cpp.
Referenced by equilibrate(), ChemEquil::equilibrate(), MultiPhase::equilibrate(), and vcs_equilibrate().
int vcs_determine_PhaseStability | ( | MultiPhase & | s, |
int | iphase, | ||
double & | funcStab, | ||
int | printLvl, | ||
int | loglevel | ||
) |
Determine the phase stability of a single phase given the current conditions in a MultiPhase object.
s | The MultiPhase object to be set to an equilibrium state |
iphase | Phase index within the multiphase object to be tested for stability. |
funcStab | Function value that tests equilibrium. > 0 indicates stable < 0 indicates unstable |
printLvl | Determines the amount of printing that gets sent to stdout from the vcs package (Note, you may have to compile with debug flags to get some printing). |
loglevel | Controls amount of diagnostic output. loglevel = 0 suppresses diagnostics, and increasingly-verbose messages are written as loglevel increases. |
Definition at line 161 of file vcs_equilibrate.cpp.
References vcs_MultiPhaseEquil::determine_PhaseStability(), MultiPhase::init(), int2str(), and vcs_MultiPhaseEquil::reportCSV().
int vcs_Cantera_to_vprob | ( | MultiPhase * | mphase, |
VCS_PROB * | vprob | ||
) |
Translate a MultiPhase object into a VCS_PROB problem definition object.
mphase | MultiPhase object that is the source for all of the information |
vprob | VCS_PROB problem definition that gets all of the information |
Note, both objects share the underlying ThermoPhase objects. So, neither can be const objects.
Definition at line 753 of file vcs_MultiPhaseEquil.cpp.
References ThermoPhase::activityConvention(), VCS_PROB::addOnePhaseSpecies(), VCS_PROB::addPhaseElements(), cEdge, VCS_PROB::Charge, Phase::charge(), cIdealGas, cSurf, ThermoPhase::electricPotential(), ThermoPhase::eosType(), VCS_PROB::FormulaMatrix, vcs_SpeciesProperties::FormulaMatrixCol, vcs_VolPhase::G0_calc_one(), VCS_PROB::gai, ThermoPhase::getChemPotentials(), ThermoPhase::getParameters(), VCS_PROB::iest, VCS_SPECIES_THERMO::IndexPhase, VCS_SPECIES_THERMO::IndexSpeciesPhase, int2str(), vcs_VolPhase::m_eqnState, vcs_VolPhase::m_gasPhase, VCS_PROB::m_gibbsSpecies, VCS_PROB::m_printLvl, vcs_VolPhase::m_singleSpecies, VCS_PROB::m_VCS_UnitsFormat, VCS_PROB::mf, Phase::molecularWeight(), MultiPhase::moleFraction(), Phase::name(), VCS_PROB::ne, Phase::nElements(), VCS_PROB::NPhase, MultiPhase::nPhases(), VCS_PROB::nspecies, MultiPhase::nSpecies(), Phase::nSpecies(), vcs_VolPhase::nSpecies(), VCS_SPECIES_THERMO::OwningPhase, vcs_VolPhase::p_activityConvention, vcs_VolPhase::p_VCS_UnitsFormat, MultiPhase::phase(), VCS_PROB::PhaseID, vcs_VolPhase::PhaseName, plogf, VCS_PROB::PresPA, MultiPhase::pressure(), VCS_PROB::prob_type, SpeciesThermo::reportParams(), SpeciesThermo::reportType(), vcs_VolPhase::resize(), VCS_PROB::set_gai(), vcs_VolPhase::setElectricPotential(), vcs_VolPhase::setMolesFromVCS(), vcs_VolPhase::setPtrThermoPhase(), vcs_VolPhase::setState_TP(), vcs_VolPhase::setTotalMoles(), SIMPLE, MultiPhase::speciesMoles(), MultiPhase::speciesName(), vcs_VolPhase::speciesProperty(), VCS_PROB::SpeciesThermo, ThermoPhase::speciesThermo(), VCS_PROB::SpeciesUnknownType, vcs_VolPhase::speciesUnknownType(), vcs_VolPhase::spGlobalIndexVCS(), vcs_SpeciesProperties::SpName, VCS_PROB::SpName, VCS_SPECIES_THERMO::SS0_Cp0, VCS_SPECIES_THERMO::SS0_feSave, VCS_SPECIES_THERMO::SS0_H0, VCS_SPECIES_THERMO::SS0_Model, VCS_SPECIES_THERMO::SS0_S0, VCS_SPECIES_THERMO::SS0_T0, VCS_SPECIES_THERMO::SS0_TSave, VCS_SPECIES_THERMO::SSStar_Model, VCS_SPECIES_THERMO::SSStar_Vol0, VCS_SPECIES_THERMO::SSStar_Vol_Model, string16_EOSType(), VCS_PROB::T, MultiPhase::temperature(), vcs_VolPhase::totalMoles(), vcs_VolPhase::totalMolesInert(), vcs_VolPhase::transferElementsFM(), VCS_SPECIES_THERMO::UseCanteraCalls, vcs_VolPhase::usingCanteraCalls(), VCS_DATA_PTR, VCS_SPECIES_TYPE_INTERFACIALVOLTAGE, VCS_SPECIES_TYPE_MOLNUM, VCS_SSVOL_IDEALGAS, VCS_STATECALC_OLD, VCS_SUCCESS, vcsUtil_gasConstant(), VCS_PROB::Vol, MultiPhase::volume(), vcs_VolPhase::VP_ID_, VCS_PROB::VPhaseList, VCS_PROB::w, and VCS_PROB::WtSpecies.
int vcs_Cantera_update_vprob | ( | MultiPhase * | mphase, |
VCS_PROB * | vprob | ||
) |
Translate a MultiPhase information into a VCS_PROB problem definition object.
This version updates the problem statement information only. All species and phase definitions remain the same.
mphase | MultiPhase object that is the source for all of the information |
vprob | VCS_PROB problem definition that gets all of the information |
Definition at line 1142 of file vcs_MultiPhaseEquil.cpp.
References ThermoPhase::electricPotential(), ThermoPhase::getChemPotentials(), VCS_PROB::iest, vcs_VolPhase::m_eqnState, vcs_VolPhase::m_gasPhase, VCS_PROB::m_gibbsSpecies, VCS_PROB::m_printLvl, vcs_VolPhase::m_singleSpecies, VCS_PROB::mf, MultiPhase::moleFraction(), VCS_PROB::NPhase, MultiPhase::nPhases(), npos, VCS_PROB::nspecies, Phase::nSpecies(), vcs_VolPhase::nSpecies(), MultiPhase::phase(), VCS_PROB::PhaseID, vcs_VolPhase::PhaseName, vcs_VolPhase::phiVarIndex(), plogf, VCS_PROB::PresPA, MultiPhase::pressure(), VCS_PROB::prob_type, VCS_PROB::set_gai(), vcs_VolPhase::setElectricPotential(), vcs_VolPhase::setExistence(), vcs_VolPhase::setMolesFromVCS(), vcs_VolPhase::setState_TP(), MultiPhase::speciesMoles(), VCS_PROB::SpeciesUnknownType, vcs_VolPhase::spGlobalIndexVCS(), VCS_PROB::SpName, string16_EOSType(), VCS_PROB::T, MultiPhase::temperature(), vcs_VolPhase::totalMoles(), vcs_VolPhase::totalMolesInert(), VCS_DATA_PTR, VCS_PHASE_EXIST_ALWAYS, VCS_PHASE_EXIST_NO, VCS_PHASE_EXIST_YES, VCS_SPECIES_TYPE_INTERFACIALVOLTAGE, VCS_STATECALC_OLD, VCS_SUCCESS, VCS_PROB::Vol, MultiPhase::volume(), vcs_VolPhase::VP_ID_, VCS_PROB::VPhaseList, and VCS_PROB::w.
int vcsUtil_root1d | ( | double | xmin, |
double | xmax, | ||
size_t | itmax, | ||
VCS_FUNC_PTR | func, | ||
void * | fptrPassthrough, | ||
double | FuncTargVal, | ||
int | varID, | ||
double * | xbest, | ||
int | printLvl = 0 |
||
) |
One dimensional root finder.
This root finder will find the root of a one dimensional equation
\[ f(x) = 0 \]
where x is a bounded quantity: \( x_{min} < x < x_max \)
The function to be minimized must have the following call structure:
xval is the current value of the x variable. Vtarget is the requested value of f(x), usually 0. varID is an integer that is passed through. fptrPassthrough is a void pointer that is passed through. err is a return error indicator. err = 0 is the norm. anything else is considered a fatal error. The return value of the function is the current value of f(xval).
xmin | Minimum permissible value of the x variable |
xmax | Maximum permissible value of the x parameter |
itmax | Maximum number of iterations |
func | function pointer, pointing to the function to be minimized |
fptrPassthrough | Pointer to void that gets passed through the rootfinder, unchanged, to the func. |
FuncTargVal | Target value of the function. This is usually set to zero. |
varID | Variable ID. This is usually set to zero. |
xbest | Pointer to the initial value of x on input. On output This contains the root value. |
printLvl | Print level of the routine. |
Following is a nontrial example for vcs_root1d() in which the position of a cylinder floating on the water is calculated.
Definition at line 34 of file vcs_root1d.cpp.
References plogf, sign(), VCS_SUCCESS, and warn_deprecated().
double vcs_l2norm | ( | const std::vector< double > | vec | ) |
determine the l2 norm of a vector of doubles
vec | vector of doubles |
Definition at line 23 of file vcs_util.cpp.
Referenced by VCS_SOLVE::vcs_phaseStabilityTest().
size_t vcs_optMax | ( | const double * | x, |
const double * | xSize, | ||
size_t | j, | ||
size_t | n | ||
) |
Finds the location of the maximum component in a double vector.
x | pointer to a vector of doubles |
xSize | pointer to a vector of doubles used as a multiplier to x[] before making the decision. Ignored if set to NULL. |
j | lowest index to search from |
n | highest index to search from |
Definition at line 37 of file vcs_util.cpp.
Referenced by VCS_SOLVE::vcs_report().
int vcs_max_int | ( | const int * | vector, |
int | length | ||
) |
Returns the maximum integer in a list.
vector | pointer to a vector of ints |
length | length of the integer vector |
Definition at line 62 of file vcs_util.cpp.
References warn_deprecated().
double vcsUtil_gasConstant | ( | int | mu_units | ) |
Returns the value of the gas constant in the units specified by parameter.
mu_units | Specifies the units.
|
Definition at line 76 of file vcs_util.cpp.
References GasConst_cal_mol_K, and int2str().
Referenced by vcs_VolPhase::_updateG0(), vcs_VolPhase::_updateGStar(), VCS_SPECIES_THERMO::G0_R_calc(), VCS_SPECIES_THERMO::GStar_R_calc(), and vcs_Cantera_to_vprob().
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.
speciesStatus | Species status integer representing the type of the species. |
length | Maximum length of the string to be returned. Shorter values will yield abbreviated strings. Defaults to a value of 100. |
Definition at line 96 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().
void vcs_print_stringTrunc | ( | const char * | str, |
size_t | space, | ||
int | alignment | ||
) |
Print a string within a given space limit.
This routine limits the amount of the string that will be printed to a maximum of "space" characters. Printing is done to to Cantera's writelog() function.
str | String, which must be null terminated. |
space | space limit for the printing. |
alignment | Alignment of string within the space:
|
Definition at line 154 of file vcs_util.cpp.
References plogf.
Referenced by VCS_SOLVE::vcs_basopt().
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.
d1 | first double |
d2 | second double |
Definition at line 185 of file vcs_util.cpp.
Referenced by vcs_MultiPhaseEquil::reportCSV(), vcs_VolPhase::setMolesFromVCSCheck(), VCS_SOLVE::vcs_dfe(), VCS_SOLVE::vcs_prob_update(), and VCS_SOLVE::vcs_report().
std::string string16_EOSType | ( | int | EOSType | ) |
Return a string representing the equation of state.
EOSType | : integer value of the equation of state |
Definition at line 954 of file vcs_VolPhase.cpp.
Referenced by VCS_PROB::prob_report(), vcs_Cantera_to_vprob(), and vcs_Cantera_update_vprob().
|
static |
This function decides whether a phase has charged species or not.
Definition at line 1122 of file vcs_VolPhase.cpp.
References Phase::charge(), and Phase::nSpecies().
Referenced by chargeNeutralityElement(), and vcs_VolPhase::transferElementsFM().
|
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 1138 of file vcs_VolPhase.cpp.
References ThermoPhase::chargeNeutralityNecessary(), and hasChargedSpecies().
Referenced by vcs_VolPhase::transferElementsFM().
|
static |
add the species into the list of products or reactants
Note this function gets called for both the product and reactant sides. However, it's only called for one side or another.
kkinspec | kinetic species index of the product |
Definition at line 72 of file ExtraGlobalRxn.cpp.
References addV().
Referenced by addV().
shared_ptr< Falloff > newFalloff | ( | int | type, |
const vector_fp & | c | ||
) |
Return a pointer to a new falloff function calculator.
type | Integer flag specifying the type of falloff function. The standard types are defined in file reaction_defs.h. A factory class derived from FalloffFactory may define other types as well. |
c | input vector of doubles which populates the falloff parameterization. |
Definition at line 35 of file FalloffFactory.cpp.
References FalloffFactory::factory().
Referenced by readFalloff().
bool Cantera::getReagents | ( | const XML_Node & | rxn, |
Kinetics & | kin, | ||
int | rp, | ||
std::string | default_phase, | ||
std::vector< size_t > & | spnum, | ||
vector_fp & | stoich, | ||
vector_fp & | order, | ||
const ReactionRules & | rules | ||
) |
Get the reactants or products of a reaction.
The information is returned in the spnum, stoich, and order vectors. The length of the vectors is the number of different types of reactants or products found for the reaction.
[in] | rxn | XML node pointing to the reaction element in the XML tree. |
[in] | kin | Reference to the kinetics object to install the information into. |
[in] | rp | 1 -> Go get the reactants for a reaction; -1 -> Go get the products for a reaction |
[in] | default_phase | Name for the default phase to loop up species in. |
[out] | spnum | vector of species numbers found. Length is number of reactants or products. |
[out] | stoich | stoichiometric coefficient of the reactant or product. Length is number of reactants or products. |
[out] | order | Order of the reactant and product in the reaction rate expression. |
[in] | rules | If rules.skipUndeclaredSpecies is set and we fail to find a species we simply return false, allowing the calling routine to skip this reaction and continue. Otherwise, we will throw an error. |
Definition at line 94 of file importKinetics.cpp.
References XML_Node::child(), XML_Node::fp_value(), fpValue(), XML_Node::getChildren(), getPairs(), XML_Node::hasChild(), Kinetics::kineticsSpeciesIndex(), npos, and warn_deprecated().
|
static |
getArrhenius() parses the XML element called Arrhenius.
The Arrhenius expression is
\[ k = A T^(b) exp (-E_a / RT). \]
Definition at line 203 of file importKinetics.cpp.
References GasConstant, and getFloat().
Referenced by getRateCoefficient(), and LTPspecies_Arrhenius::LTPspecies_Arrhenius().
|
static |
getStick() processes the XML element called Stick that specifies the sticking coefficient reaction.
This routine will translate the sticking coefficient value into a "normal" rate constant for the surface reaction.
Output is the normal Arrhenius expressions for a surface reaction rate constant.
A - units such that rate of rxn has kmol/m^2/s when A is multiplied by activity concentrations of reactants in the normal manner. n - unitless E - Units 1/Kelvin
Definition at line 240 of file importKinetics.cpp.
References cEdge, cSurf, ThermoPhase::eosType(), GasConstant, getFloat(), Kinetics::kineticsSpeciesIndex(), Kinetics::kineticsSpeciesName(), Phase::molecularWeights(), Pi, ReactionData::reactants, ReactionData::rorder, Phase::speciesIndex(), Kinetics::speciesPhase(), Kinetics::speciesPhaseIndex(), ThermoPhase::standardConcentration(), and Kinetics::thermo().
Referenced by getRateCoefficient().
|
static |
Read the XML data concerning the coverage dependence of an interfacial reaction.
node | XML node with name reaction containing the reaction information |
surfphase | Surface phase |
rdata | Reaction data for the reaction. |
Example:
<coverage species="CH3*"> <a> 1.0E-5 </a> <m> 0.0 </m> <actEnergy> 0.0 </actEnergy> </coverage>
Definition at line 328 of file importKinetics.cpp.
References ReactionData::cov, GasConstant, XML_Node::getChildren(), getFloat(), and Phase::speciesIndex().
Referenced by getRateCoefficient().
|
static |
Get falloff parameters for a reaction.
This routine reads the falloff XML node and extracts parameters into a vector of doubles
<falloff type="Troe"> 0.5 73.2 5000. 9999. </falloff>
Definition at line 359 of file importKinetics.cpp.
References ReactionData::falloffParameters, ReactionData::falloffType, fpValue(), getStringArray(), and int2str().
Referenced by getRateCoefficient().
|
static |
Get the enhanced collision efficiencies.
It is assumed that the reaction mechanism is homogeneous, so that all species belong to phase(0) of 'kin'.
Definition at line 393 of file importKinetics.cpp.
References ReactionData::default_3b_eff, fpValue(), getPairs(), Phase::id(), int2str(), Kinetics::kineticsSpeciesIndex(), npos, ReactionData::number, Kinetics::thermo(), and ReactionData::thirdBodyEfficiencies.
Referenced by getRateCoefficient().
void Cantera::readFalloff | ( | FalloffReaction & | 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 288 of file Reaction.cpp.
References XML_Node::child(), FalloffReaction::falloff, fpValueCheck(), getStringArray(), int2str(), lowercase(), and newFalloff().
shared_ptr< Reaction > newReaction | ( | const XML_Node & | rxn_node | ) |
Create a new Reaction object for the reaction defined in rxn_node
Definition at line 607 of file Reaction.cpp.
References XML_Node::child(), XML_Node::hasChild(), and lowercase().
Referenced by getReactions(), and installReactionArrays().
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:
units
directive is included and all reactions take place in bulk (e.g. gas) phases Definition at line 668 of file Reaction.cpp.
References XML_Node::child(), XML_Node::getChildren(), and newReaction().
|
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 617 of file solveSP.cpp.
std::ostream & operator<< | ( | std::ostream & | s, |
const BandMatrix & | m | ||
) |
Utility routine to print out the matrix.
s | ostream to print the matrix out to |
m | Matrix to be printed |
Definition at line 303 of file BandMatrix.cpp.
References BandMatrix::nColumns(), and BandMatrix::nRows().
|
inline |
This routine subtracts two numbers for one another.
This routine subtracts 2 numbers. If the difference is less than 1.0E-14 times the magnitude of the smallest number, then diff returns an exact zero. It also returns an exact zero if the difference is less than 1.0E-300.
returns: a - b
This routine is used in numerical differencing schemes in order to avoid roundoff errors resulting in creating Jacobian terms. Note: This is a slow routine. However, Jacobian errors may cause loss of convergence. Therefore, in practice this routine has proved cost-effective.
a | Value of a |
b | value of b |
Definition at line 468 of file BEulerInt.cpp.
Referenced by BEulerInt::beuler_jac(), and NonlinearSolver::beuler_jac().
|
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 90 of file CVodesIntegrator.cpp.
References CVodesIntegrator::m_error_message.
Referenced by CVodesIntegrator::initialize().
DAE_Solver * newDAE_Solver | ( | const std::string & | itype, |
ResidJacEval & | f | ||
) |
Factor method for choosing a DAE solver.
itype | String identifying the type (IDA is the only option) |
f | Residual function to be solved by the DAE algorithm |
Definition at line 22 of file DAE_solvers.cpp.
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 class 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
A | Dense matrix to be factored |
b | RHS(s) to be solved. |
nrhs | Number of right hand sides to solve |
ldb | Leading dimension of b, if nrhs > 1 |
Definition at line 127 of file DenseMatrix.cpp.
References int2str(), DenseMatrix::ipiv(), DenseMatrix::m_printLevel, DenseMatrix::m_useReturnErrorCode, Array2D::nColumns(), Array2D::nRows(), Array2D::ptrColumn(), and writelogf().
Referenced by ChemEquil::equilibrate(), ChemEquil::estimateElementPotentials(), ChemEquil::estimateEP_Brinkley(), solve(), AqueousTransport::stefan_maxwell_solve(), and LiquidTransport::stefan_maxwell_solve().
int solve | ( | DenseMatrix & | A, |
DenseMatrix & | b | ||
) |
Solve Ax = b for multiple right-hand-side vectors.
A | Dense matrix to be factored |
b | Dense matrix of RHS's. Each column is a RHS |
Definition at line 176 of file DenseMatrix.cpp.
References Array2D::nColumns(), Array2D::nRows(), Array2D::ptrColumn(), and solve().
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} \]
A | input Dense Matrix A with M rows and N columns |
b | input vector b with length N |
prod | output output vector prod length = M |
Definition at line 181 of file DenseMatrix.cpp.
References Array2D::nColumns(), Array2D::nRows(), and Array2D::ptrColumn().
Referenced by DustyGasTransport::getMolarFluxes(), MultiPhaseEquil::MultiPhaseEquil(), MultiPhaseEquil::stepComposition(), PecosTransport::thermalConductivity(), GasTransport::viscosity(), PecosTransport::viscosity(), and AqueousTransport::viscosity().
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} \]
A | input Dense Matrix A with M rows and N columns |
b | input vector b with length N |
prod | output output vector prod length = M |
Definition at line 188 of file DenseMatrix.cpp.
References Array2D::nRows(), and Array2D::ptrColumn().
Referenced by DustyGasTransport::getMolarFluxes().
int invert | ( | DenseMatrix & | A, |
size_t | nn = npos |
||
) |
invert A. A is overwritten with A^-1.
A | Invert the matrix A and store it back in place |
nn | Size of A. This defaults to -1, which means that the number of rows is used as the default size of n |
Definition at line 195 of file DenseMatrix.cpp.
References int2str(), DenseMatrix::ipiv(), DenseMatrix::m_printLevel, DenseMatrix::m_useReturnErrorCode, npos, Array2D::nRows(), Array2D::ptrColumn(), and writelogf().
Referenced by MultiTransport::getMultiDiffCoeffs(), HighPressureGasTransport::getMultiDiffCoeffs(), and DustyGasTransport::updateMultiDiffCoeffs().
doublereal Cantera::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.
x | value of the x coordinate |
xpts | value of the grid points |
fpts | value of the interpolant at the grid points |
Definition at line 35 of file funcs.cpp.
Referenced by StFlow::_finalize(), and Sim1D::setProfile().
doublereal polyfit | ( | int | n, |
doublereal * | x, | ||
doublereal * | y, | ||
doublereal * | w, | ||
int | maxdeg, | ||
int & | ndeg, | ||
doublereal | eps, | ||
doublereal * | r | ||
) |
Fits a polynomial function to a set of data points.
Given a collection of points X(I) and a set of values Y(I) which correspond to some function or measurement at each of the X(I), subroutine DPOLFT computes the weighted least-squares polynomial fits of all degrees up to some degree either specified by the user or determined by the routine. The fits thus obtained are in orthogonal polynomial form. Subroutine DP1VLU may then be called to evaluate the fitted polynomials and any of their derivatives at any point. The subroutine DPCOEF may be used to express the polynomial fits as powers of (X-C) for any specified point C.
n | The number of data points. |
x | A set of grid points on which the data is specified. The array of values of the independent variable. These values may appear in any order and need not all be distinct. There are n of them. |
y | array of corresponding function values. There are n of them |
w | array of positive values to be used as weights. If W[0] is negative, DPOLFT will set all the weights to 1.0, which means unweighted least squares error will be minimized. To minimize relative error, the user should set the weights to: W(I) = 1.0/Y(I)**2, I = 1,...,N . |
maxdeg | maximum degree to be allowed for polynomial fit. MAXDEG may be any non-negative integer less than N. Note – MAXDEG cannot be equal to N-1 when a statistical test is to be used for degree selection, i.e., when input value of EPS is negative. |
ndeg | output degree of the fit computed. |
eps | Specifies the criterion to be used in determining the degree of fit to be computed. (1) If EPS is input negative, DPOLFT chooses the degree based on a statistical F test of significance. One of three possible significance levels will be used: .01, .05 or .10. If EPS=-1.0 , the routine will automatically select one of these levels based on the number of data points and the maximum degree to be considered. If EPS is input as -.01, -.05, or -.10, a significance level of .01, .05, or .10, respectively, will be used. (2) If EPS is set to 0., DPOLFT computes the polynomials of degrees 0 through MAXDEG . (3) If EPS is input positive, EPS is the RMS error tolerance which must be satisfied by the fitted polynomial. DPOLFT will increase the degree of fit until this criterion is met or until the maximum degree is reached. |
r | Output vector containing the first LL+1 Taylor coefficients where LL=ABS(ndeg). P(X) = r[0] + r[1]*(X-C) + ... + r[ndeg] * (X-C)**ndeg ( here C = 0.0) |
Given a collection of points X(I) and a set of values Y(I) which correspond to some function or measurement at each of the X(I), subroutine DPOLFT computes the weighted least-squares polynomial fits of all degrees up to some degree either specified by the user or determined by the routine. The fits thus obtained are in orthogonal polynomial form. Subroutine DP1VLU may then be called to evaluate the fitted polynomials and any of their derivatives at any point. The subroutine DPCOEF may be used to express the polynomial fits as powers of (X-C) for any specified point C.
n | The number of data points. |
x | A set of grid points on which the data is specified. The array of values of the independent variable. These values may appear in any order and need not all be distinct. There are n of them. |
y | array of corresponding function values. There are n of them |
w | array of positive values to be used as weights. If W[0] is negative, DPOLFT will set all the weights to 1.0, which means unweighted least squares error will be minimized. To minimize relative error, the user should set the weights to: W(I) = 1.0/Y(I)**2, I = 1,...,N . |
maxdeg | maximum degree to be allowed for polynomial fit. MAXDEG may be any non-negative integer less than N. Note – MAXDEG cannot be equal to N-1 when a statistical test is to be used for degree selection, i.e., when input value of EPS is negative. |
ndeg | output degree of the fit computed. |
eps | Specifies the criterion to be used in determining the degree of fit to be computed. (1) If EPS is input negative, DPOLFT chooses the degree based on a statistical F test of significance. One of three possible significance levels will be used: .01, .05 or .10. If EPS=-1.0 , the routine will automatically select one of these levels based on the number of data points and the maximum degree to be considered. If EPS is input as -.01, -.05, or -.10, a significance level of .01, .05, or .10, respectively, will be used. (2) If EPS is set to 0., DPOLFT computes the polynomials of degrees 0 through MAXDEG . (3) If EPS is input positive, EPS is the RMS error tolerance which must be satisfied by the fitted polynomial. DPOLFT will increase the degree of fit until this criterion is met or until the maximum degree is reached. |
r | Output vector containing the first ndeg+1 Taylor coefficients P(X) = r[0] + r[1]*(X-C) + ... + r[ndeg] * (X-C)**ndeg ( here C = 0.0) |
Definition at line 117 of file funcs.cpp.
References int2str().
Referenced by GasTransport::fitProperties().
|
static |
Print out a form for the current function evaluation.
fp | Pointer to the FILE object |
xval | Current value of x |
fval | Current value of f |
its | Current iteration value |
Definition at line 35 of file RootFind.cpp.
Referenced by RootFind::solve().
|
static |
Utility function to assign an integer value from a string for the ElectrolyteSpeciesType field.
estString | input string that will be interpreted |
Definition at line 556 of file DebyeHuckel.cpp.
References cEST_solvent, and lowercase().
Referenced by DebyeHuckel::initThermoXML(), and HMWSoln::initThermoXML().
double LookupWtElements | ( | const std::string & | ename | ) |
Function to look up an atomic weight This function looks up the argument string in the database above and returns the associated molecular weight.
The data are from the periodic table.
Note: The idea behind this function is to provide a unified source for the element atomic weights. This helps to ensure that mass is conserved.
ename | String, Only the first 3 characters are significant |
CanteraError | If a match is not found, throws a CanteraError |
Definition at line 171 of file Elements.cpp.
References awData::atomicWeight, and aWTable.
Referenced by Phase::addElement().
|
static |
Return the factor overlap.
elnamesVN | |
elemVectorN | |
nElementsN | |
elnamesVI | |
elemVectorI | |
nElementsI |
Definition at line 819 of file IonsFromNeutralVPSSTP.cpp.
Referenced by IonsFromNeutralVPSSTP::initThermoXML().
shared_ptr< Species > newSpecies | ( | const XML_Node & | species_node | ) |
Create a new Species object from a 'species' XML_Node.
Definition at line 61 of file Species.cpp.
References XML_Node::child(), getFloat(), XML_Node::hasChild(), newSpeciesThermoInterpType(), newTransportData(), parseCompString(), and XML_Node::value().
Referenced by getSpecies(), importPhase(), and installSpecies().
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.
Definition at line 83 of file Species.cpp.
References XML_Node::child(), XML_Node::getChildren(), and newSpecies().
|
static |
Examine the types of species thermo parameterizations, and return a flag indicating the type of reference state thermo manager that will be needed in order to evaluate them all.
spDataNodeList | This vector contains a list of species XML nodes that will be in the phase |
has_nasa | Return int that indicates whether the phase has a NASA polynomial form for one of its species |
has_shomate | Return int that indicates whether the phase has a SHOMATE polynomial form for one of its species |
has_simple | Return int that indicates whether the phase has a SIMPLE polynomial form for one of its species |
has_other | Return int that indicates whether the phase has a form for one of its species that is not one of the ones listed above. |
Definition at line 52 of file SpeciesThermoFactory.cpp.
References XML_Node::attrib(), XML_Node::child(), and XML_Node::hasChild().
Referenced by SpeciesThermoFactory::newSpeciesThermo().
SpeciesThermoInterpType * newSpeciesThermoInterpType | ( | int | type, |
double | tlow, | ||
double | thigh, | ||
double | pref, | ||
const double * | coeffs | ||
) |
Create a new SpeciesThermoInterpType object given a corresponding constant.
type | A constant specifying the type to be created |
tlow | The lowest temperature at which the parameterization is valid |
thigh | The highest temperature at which the parameterization is valid |
pref | The reference pressure for the parameterization |
coeffs | The array of coefficients for the parameterization |
Definition at line 186 of file SpeciesThermoFactory.cpp.
References ADSORBATE, CONSTANT_CP, int2str(), MU0_INTERP, NASA1, NASA2, SHOMATE1, SHOMATE2, and SIMPLE.
Referenced by VPSSMgr_IdealGas::createInstallPDSS(), FixedChemPotSSTP::FixedChemPotSSTP(), GeneralSpeciesThermo::install(), VPSSMgr::installSTSpecies(), and newSpecies().
SpeciesThermoInterpType * newSpeciesThermoInterpType | ( | const std::string & | type, |
double | tlow, | ||
double | thigh, | ||
double | pref, | ||
const double * | coeffs | ||
) |
Create a new SpeciesThermoInterpType object given a string.
type | String name for the species thermo type |
tlow | The lowest temperature at which the parameterization is valid |
thigh | The highest temperature at which the parameterization is valid |
pref | The reference pressure for the parameterization |
coeffs | The array of coefficients for the parameterization |
Definition at line 211 of file SpeciesThermoFactory.cpp.
References ADSORBATE, CONSTANT_CP, lowercase(), MU0_INTERP, NASA1, NASA2, NASA9, NASA9MULTITEMP, newSpeciesThermoInterpType(), SHOMATE1, and SHOMATE2.
|
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.
nodes | vector of 1 or 2 'NASA' XML_Nodes, each defining the coefficients for a temperature range |
Definition at line 249 of file SpeciesThermoFactory.cpp.
References XML_Node::child(), fpValue(), getFloatArray(), XML_Node::hasAttrib(), NASA, newSpeciesThermoInterpType(), and OneAtm.
Referenced by newSpeciesThermoInterpType().
SpeciesThermoInterpType* Cantera::newShomateForMineralEQ3 | ( | const XML_Node & | MinEQ3node | ) |
Create a Shomate polynomial from an XML node giving the 'EQ3' coefficients.
This is called if a 'MinEQ3' node is found in the XML input.
MinEQ3node | The XML_Node containing the MinEQ3 parameterization |
Definition at line 312 of file SpeciesThermoFactory.cpp.
References getFloatDefaultUnits(), newSpeciesThermoInterpType(), SHOMATE1, and strSItoDbl().
Referenced by newSpeciesThermoInterpType().
|
static |
Create a Shomate polynomial thermodynamic property parameterization for a species.
This is called if a 'Shomate' node is found in the XML input.
nodes | vector of 1 or 2 'Shomate' XML_Nodes, each defining the coefficients for a temperature range |
Definition at line 372 of file SpeciesThermoFactory.cpp.
References fpValue(), getFloatArray(), newSpeciesThermoInterpType(), OneAtm, and SHOMATE.
Referenced by newSpeciesThermoInterpType().
|
static |
Create a "simple" constant heat capacity thermodynamic property parameterization for a ! species.
This is called if a 'const_cp' XML node is found
f | 'const_cp' XML node |
Definition at line 445 of file SpeciesThermoFactory.cpp.
References CONSTANT_CP, fpValue(), getFloat(), newSpeciesThermoInterpType(), and OneAtm.
Referenced by newSpeciesThermoInterpType().
|
static |
Create a NASA9 polynomial thermodynamic property parameterization for a species.
This is called if a 'NASA9' Node is found in the XML input.
tp | Vector of XML Nodes that make up the parameterization |
Definition at line 470 of file SpeciesThermoFactory.cpp.
References XML_Node::child(), fpValue(), getFloatArray(), XML_Node::hasAttrib(), XML_Node::hasChild(), XML_Node::name(), and OneAtm.
Referenced by newSpeciesThermoInterpType().
|
static |
Create a stat mech based property solver for a species.
Definition at line 512 of file SpeciesThermoFactory.cpp.
References fpValue(), XML_Node::hasAttrib(), and OneAtm.
Referenced by newSpeciesThermoInterpType().
|
static |
Create an Adsorbate polynomial thermodynamic property parameterization for a species.
This is called if a 'Adsorbate' node is found in the XML input.
f | XML Node that contains the parameterization |
Definition at line 538 of file SpeciesThermoFactory.cpp.
References XML_Node::child(), fpValue(), getFloat(), getFloatArray(), XML_Node::hasAttrib(), XML_Node::hasChild(), and OneAtm.
Referenced by newSpeciesThermoInterpType().
SpeciesThermoInterpType * newSpeciesThermoInterpType | ( | const XML_Node & | thermoNode | ) |
Create a new SpeciesThermoInterpType object from XML_Node.
thermoNode | 'thermo' XML_Node (child of the 'species' node) with child nodes representing parameterizations for one or more temperature ranges |
Definition at line 597 of file SpeciesThermoFactory.cpp.
References XML_Node::children(), lowercase(), newAdsorbateThermoFromXML(), newConstCpThermoFromXML(), newMu0ThermoFromXML(), newNasa9ThermoFromXML(), newNasaThermoFromXML(), newShomateForMineralEQ3(), newShomateThermoFromXML(), and newStatMechThermoFromXML().
Referenced by SpeciesThermoFactory::installThermoForSpecies(), newConstCpThermoFromXML(), newNasaThermoFromXML(), newShomateForMineralEQ3(), newShomateThermoFromXML(), and newSpeciesThermoInterpType().
SpeciesThermo * newSpeciesThermoMgr | ( | int | type, |
SpeciesThermoFactory * | f = 0 |
||
) |
Create a new species thermo manager instance, by specifying the type and (optionally) a pointer to the factory to use to create it.
This utility program will look through species nodes. It will discover what each species needs for its species property managers. Then, it will malloc and return the proper species property manager to use.
These functions allow using a different factory class that derives from SpeciesThermoFactory.
type | Species thermo type. |
f | Pointer to a SpeciesThermoFactory. optional parameter. Defaults to NULL. |
Definition at line 658 of file SpeciesThermoFactory.cpp.
References SpeciesThermoFactory::newSpeciesThermo(), and warn_deprecated().
SpeciesThermo * newSpeciesThermoMgr | ( | const std::string & | stype, |
SpeciesThermoFactory * | f = 0 |
||
) |
Create a new species thermo manager instance, by specifying the type and (optionally) a pointer to the factory to use to create it.
This utility program is a basic factory operation for spawning a new species reference-state thermo manager
These functions allows for using a different factory class that derives from SpeciesThermoFactory. However, no applications of this have been done yet.
stype | String specifying the species thermo type |
f | Pointer to a SpeciesThermoFactory. optional parameter. Defaults to NULL. |
Definition at line 668 of file SpeciesThermoFactory.cpp.
References SpeciesThermoFactory::newSpeciesThermoManager(), and warn_deprecated().
SpeciesThermo * newSpeciesThermoMgr | ( | std::vector< XML_Node * > | spDataNodeList, |
SpeciesThermoFactory * | f = 0 |
||
) |
Function to return SpeciesThermo manager.
This utility program will look through species nodes. It will discover what each species needs for its species property managers. Then, it will malloc and return the proper species reference state manager to use.
These functions allow using a different factory class that derives from SpeciesThermoFactory.
spDataNodeList | This vector contains a list of species XML nodes that will be in the phase |
f | Pointer to a SpeciesThermoFactory. optional parameter. Defaults to NULL. |
Definition at line 679 of file SpeciesThermoFactory.cpp.
References SpeciesThermoFactory::newSpeciesThermo(), and warn_deprecated().
|
static |
Gather a vector of pointers to XML_Nodes for a phase.
spDataNodeList | Output vector of pointer to XML_Nodes which contain the species XML_Nodes for the species in the current phase. |
spNamesList | Output Vector of strings, which contain the names of the species in the phase |
spRuleList | Output Vector of ints, which contain the value of sprule for each species in the phase |
spArray_names | Vector of pointers to the XML_Nodes which contains the names of the species in the phase |
spArray_dbases | Input vector of pointers to species data bases. We search each data base for the required species names |
sprule | Input vector of sprule values |
Definition at line 219 of file ThermoFactory.cpp.
References XML_Node::child(), XML_Node::getChildren(), getStringArray(), and XML_Node::nChildren().
Referenced by importPhase().
|
static |
Examine the types of species thermo parameterizations, and return a flag indicating the type of parameterization needed by the species.
spDataNodeList | Species Data XML node. This node contains a list of species XML nodes underneath it. |
has_nasa_idealGas | Boolean indicating that one species has a NASA ideal gas standard state |
has_nasa_constVol | Boolean indicating that one species has a NASA ideal solution standard state |
has_shomate_idealGas | Boolean indicating that one species has a Shomate ideal gas standard state |
has_shomate_constVol | Boolean indicating that one species has a Shomate ideal solution standard state |
has_simple_idealGas | Boolean indicating that one species has a simple ideal gas standard state |
has_simple_constVol | Boolean indicating that one species has a simple ideal solution standard state |
has_water | Boolean indicating that one species has a water standard state |
has_tpx | Boolean indicating that one species has a tpx standard state |
has_hptx | Boolean indicating that one species has a htpx standard state |
has_other | Boolean indicating that one species has different standard state than the ones listed above |
Definition at line 56 of file VPSSMgrFactory.cpp.
References XML_Node::attrib(), XML_Node::child(), and XML_Node::hasChild().
Referenced by VPSSMgrFactory::newVPSSMgr().
VPSSMgr * newVPSSMgr | ( | VPSSMgr_enumType | type, |
VPStandardStateTP * | vp_ptr, | ||
VPSSMgrFactory * | f = 0 |
||
) |
Create a new species thermo manager instance, by specifying the type and (optionally) a pointer to the factory to use to create it.
This utility program will look through species nodes. It will discover what each species needs for its species property managers. Then, it will malloc and return the proper species property manager to use.
These functions allow using a different factory class that derives from SpeciesThermoFactory.
type | Species thermo type. |
vp_ptr | Variable pressure standard state ThermoPhase object that will be the owner. |
f | Pointer to a SpeciesThermoFactory. optional parameter. Defaults to NULL. |
Definition at line 314 of file VPSSMgrFactory.cpp.
References VPSSMgrFactory::newVPSSMgr().
Referenced by importPhase().
VPSSMgr * newVPSSMgr | ( | VPStandardStateTP * | vp_ptr, |
XML_Node * | phaseNode_ptr, | ||
std::vector< XML_Node * > & | spDataNodeList, | ||
VPSSMgrFactory * | f = 0 |
||
) |
Function to return VPSSMgr manager.
This utility program will look through species nodes. It will discover what each species needs for its species property managers. Then, it will alloc and return the proper species property manager to use.
These functions allow using a different factory class that derives from SpeciesThermoFactory.
vp_ptr | Variable pressure standard state ThermoPhase object that will be the owner. |
phaseNode_ptr | Pointer to the ThermoPhase phase XML Node |
spDataNodeList | This vector contains a list of species XML nodes that will be in the phase |
f | Pointer to a SpeciesThermoFactory. optional parameter. Defaults to NULL. |
Definition at line 324 of file VPSSMgrFactory.cpp.
References VPSSMgrFactory::newVPSSMgr().
Referenced by VPSSMgrFactory::newVPSSMgr().
|
static |
Parses the XML element called Arrhenius.
The Arrhenius expression is
\[ k = A T^(b) exp (-E_a / RT) \]
node | XML_Node to be read |
A | Output pre-exponential factor. The units are variable. |
b | output temperature power |
E | Output activation energy in units of Kelvin |
Definition at line 41 of file LTPspecies.cpp.
References getFloat().
|
inline |
The Parker temperature correction to the rotational collision number.
tr | Reduced temperature \( \epsilon/kT \) |
sqtr | square root of tr. |
Definition at line 27 of file MultiTransport.cpp.
References Pi.
Referenced by MultiTransport::init(), and MultiTransport::updateThermal_T().
shared_ptr< TransportData > newTransportData | ( | const XML_Node & | transport_node | ) |
Create a new TransportData object from a 'transport' XML_Node.
Definition at line 132 of file TransportData.cpp.
Referenced by newSpecies().
|
inline |
Output the current contents of the Array2D object.
Example of usage: s << m << endl;
s | Reference to the ostream to write to |
m | Object of type Array2D that you are querying |
Definition at line 394 of file Array.h.
References Array2D::nColumns(), and Array2D::nRows().
|
inline |
Overload the times equals operator for multiplication of a matrix and a scalar.
Scaled every element of the matrix by the scalar input
m | Matrix |
a | scalar |
Definition at line 416 of file Array.h.
References Array2D::begin(), Array2D::end(), and scale().
|
inline |
Overload the plus equals operator for addition of one matrix with another.
Adds each element of the second matrix into the first matrix
x | First matrix |
y | Second matrix, which is a const |
Definition at line 430 of file Array.h.
References Array2D::begin(), Array2D::end(), and sum_each().
|
inline |
Write a message to the log only if loglevel > 0.
Definition at line 149 of file global.h.
References writelog().
|
inline |
Clip value such that lower <= value <= upper.
Definition at line 270 of file global.h.
Referenced by ChemEquil::equilibrate(), vcs_MultiPhaseEquil::equilibrate_HP(), ChemEquil::estimateEP_Brinkley(), VCS_SOLVE::recheck_deleted_phase(), SingleSpeciesTP::setState_HP(), ThermoPhase::setState_HPorUV(), SingleSpeciesTP::setState_SP(), ThermoPhase::setState_SPorSV(), SingleSpeciesTP::setState_SV(), SingleSpeciesTP::setState_UV(), VCS_SOLVE::vcs_deltag(), VCS_SOLVE::vcs_deltag_Phase(), VCS_SOLVE::vcs_minor_alt_calc(), and VCS_SOLVE::vcs_phaseStabilityTest().
int Cantera::sign | ( | T | x | ) |
Sign of a number. Returns -1 if x < 0, 1 if x > 0 and 0 if x == 0.
Definition at line 276 of file global.h.
Referenced by RootFind::solve(), and vcsUtil_root1d().
|
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.
x | first reference to the templated class V |
y | second reference to the templated class V |
Definition at line 69 of file utilities.h.
Referenced by MixTransport::updateCond_T(), AqueousTransport::updateCond_T(), GasTransport::updateDiff_T(), PecosTransport::updateDiff_T(), AqueousTransport::updateDiff_T(), GasTransport::updateSpeciesViscosities(), and AqueousTransport::updateSpeciesViscosities().
|
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.
x | first reference to the templated class V |
y | second reference to the templated class V |
Definition at line 87 of file utilities.h.
Referenced by MixTransport::updateCond_T(), AqueousTransport::updateCond_T(), GasTransport::updateDiff_T(), PecosTransport::updateDiff_T(), AqueousTransport::updateDiff_T(), GasTransport::updateSpeciesViscosities(), and AqueousTransport::updateSpeciesViscosities().
|
inline |
Templated Inner product of two vectors of length 6.
If either x or y has length greater than 4, only the first 4 elements will be used.
x | first reference to the templated class V |
y | second reference to the templated class V |
Definition at line 106 of file utilities.h.
References warn_deprecated().
|
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>
x_begin | Iterator pointing to the beginning, belonging to the iterator class InputIter. |
x_end | Iterator pointing to the end, belonging to the iterator class InputIter. |
y_begin | Iterator pointing to the beginning of y, belonging to the iterator class InputIter2. |
Definition at line 135 of file utilities.h.
Referenced by IdealSolnGasVPSS::calcDensity(), RedlichKwongMFTP::calcDensity(), IdealSolidSolnPhase::calcDensity(), ChemEquil::equilibrate(), Phase::mean_Y(), and Phase::setMoleFractions_NoNorm().
|
inline |
Multiply elements of an array by a scale factor.
begin | Iterator pointing to the beginning, belonging to the iterator class InputIter. |
end | Iterator pointing to the end, belonging to the iterator class InputIter. |
out | Iterator pointing to the beginning of out, belonging to the iterator class OutputIter. This is the output variable for this routine. |
scale_factor | input scale factor belonging to the class S. |
Definition at line 158 of file utilities.h.
Referenced by ChemEquil::equilibrate(), ChemEquil::estimateElementPotentials(), Phase::getConcentrations(), SurfPhase::getCp_R(), ThermoPhase::getElementPotentials(), SurfPhase::getEnthalpy_RT(), SurfPhase::getEntropy_R(), VPSSMgr_General::getGibbs_ref(), VPSSMgr::getGibbs_ref(), MixtureFugacityTP::getGibbs_ref(), IdealGasPhase::getGibbs_ref(), SurfPhase::getGibbs_RT(), DustyGasTransport::getMolarFluxes(), Phase::getMoleFractions(), IdealSolnGasVPSS::getPartialMolarCp(), RedlichKwongMFTP::getPartialMolarCp(), IdealGasPhase::getPartialMolarCp(), IdealSolnGasVPSS::getPartialMolarEnthalpies(), RedlichKwongMFTP::getPartialMolarEnthalpies(), IdealSolidSolnPhase::getPartialMolarEnthalpies(), LatticePhase::getPartialMolarEnthalpies(), IdealGasPhase::getPartialMolarEnthalpies(), IdealSolnGasVPSS::getPartialMolarEntropies(), RedlichKwongMFTP::getPartialMolarEntropies(), IdealGasPhase::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarIntEnergies(), RedlichKwongMFTP::getPartialMolarIntEnergies(), ConstDensityThermo::getPureGibbs(), MixtureFugacityTP::getPureGibbs(), IdealGasPhase::getPureGibbs(), VPSSMgr::getStandardChemPotentials(), LatticePhase::getStandardChemPotentials(), IdealGasPhase::getStandardChemPotentials(), operator*=(), scale(), ThermoPhase::setElementPotentials(), Phase::setMassFractions(), and VCS_SOLVE::vcs_elabcheck().
|
inline |
Multiply elements of an array, y, by a scale factor, f and add the result to an existing array, x. This is essentially a templated daxpy_ operation.
The template arguments are: template<class InputIter, class OutputIter, class S>
Simple Code Example of the functionality;
Example of the function call to implement the simple code example
It is templated with three parameters. The first template is the iterator, InputIter, which controls access to y[]. The second template is the iterator OutputIter, which controls access to y[]. The third iterator is S, which is f.
begin | InputIter Iterator for beginning of y[] |
end | inputIter Iterator for end of y[] |
out | OutputIter Iterator for beginning of x[] |
scale_factor | Scale Factor to multiply y[i] by |
Definition at line 197 of file utilities.h.
References warn_deprecated().
|
inline |
Multiply each entry in x by the corresponding entry in y.
The template arguments are: template<class InputIter, class OutputIter>
Simple code Equivalent:
Example of function call usage to implement the simple code example:
x_begin | Iterator pointing to the beginning of the vector x, belonging to the iterator class InputIter. |
x_end | Iterator pointing to the end of the vector x, belonging to the iterator class InputIter. The difference between end and begin determines the loop length |
y_begin | Iterator pointing to the beginning of the vector y, belonging to the iterator class outputIter. |
Definition at line 234 of file utilities.h.
Referenced by AqueousKinetics::getFwdRateConstants(), GasKinetics::getFwdRateConstants(), InterfaceKinetics::getFwdRateConstants(), InterfaceKinetics::getRevRateConstants(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().
|
inline |
Invoke method 'resize' with argument m for a sequence of objects (templated version)
The template arguments are: template<class InputIter>
Simple code Equivalent:
Example of function call usage to implement the simple code example:
m | Integer specifying the size that each object should be resized to. |
begin | Iterator pointing to the beginning of the sequence of object, belonging to the iterator class InputIter. |
end | Iterator pointing to the end of the sequence of objects, belonging to the iterator class InputIter. The difference between end and begin determines the loop length |
Definition at line 271 of file utilities.h.
References warn_deprecated().
|
inline |
The maximum absolute value (templated version)
The template arguments are: template<class InputIter>
Simple code Equivalent:
Example of function call usage to implement the simple code example:
begin | Iterator pointing to the beginning of the x vector, belonging to the iterator class InputIter. |
end | Iterator pointing to the end of the x vector, belonging to the iterator class InputIter. The difference between end and begin determines the loop length |
Definition at line 305 of file utilities.h.
|
inline |
Normalize the values in a sequence, such that they sum to 1.0 (templated version)
The template arguments are: template<class InputIter, class OutputIter>
Simple Equivalent:
Example of function call usage:
begin | Iterator pointing to the beginning of the x vector, belonging to the iterator class InputIter. |
end | Iterator pointing to the end of the x vector, belonging to the iterator class InputIter. The difference between end and begin determines the loop length |
out | Iterator pointing to the beginning of the output vector, belonging to the iterator class OutputIter. |
Definition at line 343 of file utilities.h.
|
inline |
Templated divide of each element of x by the corresponding element of y.
The template arguments are: template<class InputIter, class OutputIter>
Simple Equivalent:
Example of code usage:
x_begin | Iterator pointing to the beginning of the x vector, belonging to the iterator class OutputIter. |
x_end | Iterator pointing to the end of the x vector, belonging to the iterator class OutputIter. The difference between end and begin determines the number of inner iterations. |
y_begin | Iterator pointing to the beginning of the yvector, belonging to the iterator class InputIter. |
Definition at line 378 of file utilities.h.
Referenced by DustyGasTransport::getMolarFluxes().
|
inline |
Increment each entry in x by the corresponding entry in y.
The template arguments are: template<class InputIter, class OutputIter>
x_begin | Iterator pointing to the beginning of the x vector, belonging to the iterator class OutputIter. |
x_end | Iterator pointing to the end of the x vector, belonging to the iterator class OutputIter. The difference between end and begin determines the number of inner iterations. |
y_begin | Iterator pointing to the beginning of the yvector, belonging to the iterator class InputIter. |
Definition at line 399 of file utilities.h.
Referenced by operator+=().
|
inline |
Copies a contiguous range in a sequence to indexed positions in another sequence.
The template arguments are: template<class InputIter, class OutputIter, class IndexIter>
Example:
This routine is templated 3 times. InputIter is an iterator for the source vector OutputIter is an iterator for the destination vector IndexIter is an iterator for the index into the destination vector.
begin | Iterator pointing to the beginning of the source vector, belonging to the iterator class InputIter. |
end | Iterator pointing to the end of the source vector, belonging to the iterator class InputIter. The difference between end and begin determines the number of inner iterations. |
result | Iterator pointing to the beginning of the output vector, belonging to the iterator class outputIter. |
index | Iterator pointing to the beginning of the index vector, belonging to the iterator class IndexIter. |
Definition at line 439 of file utilities.h.
|
inline |
Multiply selected elements in an array by a contiguous sequence of multipliers.
The template arguments are: template<class InputIter, class RandAccessIter, class IndexIter>
Example:
mult_begin | Iterator pointing to the beginning of the multiplier vector, belonging to the iterator class InputIter. |
mult_end | Iterator pointing to the end of the multiplier vector, belonging to the iterator class InputIter. The difference between end and begin determines the number of inner iterations. |
data | Iterator pointing to the beginning of the output vector, belonging to the iterator class RandAccessIter, that will be selectively multiplied. |
index | Iterator pointing to the beginning of the index vector, belonging to the iterator class IndexIter. |
Definition at line 475 of file utilities.h.
|
inline |
Divide selected elements in an array by a contiguous sequence of divisors.
The template arguments are: template<class InputIter, class OutputIter, class IndexIter>
Example:
begin | Iterator pointing to the beginning of the source vector, belonging to the iterator class InputIter. |
end | Iterator pointing to the end of the source vector, belonging to the iterator class InputIter. The difference between end and begin determines the number of inner iterations. |
result | Iterator pointing to the beginning of the output vector, belonging to the iterator class outputIter. |
index | Iterator pointing to the beginning of the index vector, belonging to the iterator class IndexIter. |
Definition at line 511 of file utilities.h.
References warn_deprecated().
|
inline |
Compute
\[ \sum_k x_k \log x_k. \]
.
The template arguments are: template<class InputIter>
A small number (1.0E-20) is added before taking the log. This templated class does the indicated sun. The template must be an iterator.
begin | Iterator pointing to the beginning, belonging to the iterator class InputIter. |
end | Iterator pointing to the end, belonging to the iterator class InputIter. |
Definition at line 536 of file utilities.h.
References Tiny.
Referenced by Phase::sum_xlogx().
|
inline |
Compute
\[ \sum_k x_k \log Q_k. \]
.
The template arguments are: template<class InputIter1, class InputIter2>
This class is templated twice. The first template, InputIter1 is the iterator that points to $x_k$. The second iterator InputIter2, point to $Q_k$. A small number (1.0E-20) is added before taking the log.
begin | Iterator pointing to the beginning, belonging to the iterator class InputIter1. |
end | Iterator pointing to the end, belonging to the iterator class InputIter1. |
Q_begin | Iterator pointing to the beginning of Q_k, belonging to the iterator class InputIter2. |
Definition at line 564 of file utilities.h.
References Tiny.
Referenced by Phase::sum_xlogQ().
|
inline |
Scale a templated vector by a constant factor.
The template arguments are: template<class OutputIter>
This function is essentially a wrapper around the stl function scale(). The function is has one template parameter, OutputIter. OutputIter is a templated iterator that points to the vector to be scaled.
N | Length of the vector |
alpha | scale factor - double |
x | Templated Iterator to the start of the vector to be scaled. |
Definition at line 590 of file utilities.h.
References scale(), and warn_deprecated().
R Cantera::poly6 | ( | D | x, |
R * | c | ||
) |
Templated evaluation of a polynomial of order 6.
x | Value of the independent variable - First template parameter |
c | Pointer to the polynomial - Second template parameter |
Definition at line 604 of file utilities.h.
Referenced by MultiTransport::updateThermal_T().
R Cantera::poly8 | ( | D | x, |
R * | c | ||
) |
Templated evaluation of a polynomial of order 8.
x | Value of the independent variable - First template parameter |
c | Pointer to the polynomial - Second template parameter |
Definition at line 616 of file utilities.h.
Referenced by MultiTransport::updateThermal_T().
R Cantera::poly10 | ( | D | x, |
R * | c | ||
) |
Templated evaluation of a polynomial of order 10.
x | Value of the independent variable - First template parameter |
c | Pointer to the polynomial - Second template parameter |
Definition at line 629 of file utilities.h.
References warn_deprecated().
R Cantera::poly5 | ( | D | x, |
R * | c | ||
) |
Templated evaluation of a polynomial of order 5.
x | Value of the independent variable - First template parameter |
c | Pointer to the polynomial - Second template parameter |
Definition at line 644 of file utilities.h.
R Cantera::poly4 | ( | D | x, |
R * | c | ||
) |
Evaluates a polynomial of order 4.
x | Value of the independent variable. |
c | Pointer to the polynomial coefficient array. |
Definition at line 656 of file utilities.h.
Referenced by NasaThermo::cp_R(), and GasTransport::fitProperties().
R Cantera::poly3 | ( | D | x, |
R * | c | ||
) |
Templated evaluation of a polynomial of order 3.
x | Value of the independent variable - First template parameter |
c | Pointer to the polynomial - Second template parameter |
Definition at line 668 of file utilities.h.
Referenced by GasTransport::fitProperties().
void Cantera::deepStdVectorPointerCopy | ( | const std::vector< D * > & | fromVec, |
std::vector< D * > & | toVec | ||
) |
Templated deep copy of a std vector of pointers.
Performs a deep copy of a std vectors of pointers to an object. This template assumes that that the templated object has a functioning copy constructor. It also assumes that pointers are zero when they are not malloced.
fromVec | Vector of pointers to a templated class. This will be deep-copied to the other vector |
toVec | Vector of pointers to a templated class. This will be overwritten and on return will be a copy of the fromVec |
Definition at line 685 of file utilities.h.
const U& Cantera::getValue | ( | const std::map< T, U > & | m, |
const T & | key | ||
) |
Const accessor for a value in a std::map.
This is a const alternative to operator[]. Roughly equivalent to the 'at' member function introduced in C++11. Throws std::out_of_range if the key does not exist.
Definition at line 714 of file utilities.h.
Referenced by InterfaceKinetics::buildSurfaceArrhenius(), ThirdBody::efficiency(), ReactionData::efficiency(), SimpleThermo::maxTemp(), SimpleThermo::minTemp(), NasaThermo::modifyOneHf298(), Kinetics::productStoichCoeff(), GeneralSpeciesThermo::provideSTIT(), Kinetics::reactantStoichCoeff(), NasaThermo::reportOneHf298(), ShomateThermo::reportOneHf298(), NasaThermo::reportParams(), SimpleThermo::reportParams(), ShomateThermo::reportParams(), SpeciesThermoDuo< T1, T2 >::reportType(), SurfPhase::setCoveragesByName(), Phase::setMassFractionsByName(), MolalityVPSSTP::setMolalitiesByName(), Phase::setMoleFractionsByName(), MultiPhase::setMolesByName(), Phase::species(), Phase::speciesIndex(), NasaThermo::update_one(), SimpleThermo::update_one(), and ShomateThermo::update_one().
const U& Cantera::getValue | ( | const std::map< T, U > & | m, |
const T & | key, | ||
const U & | default_val | ||
) |
Const accessor for a value in a std::map.
Definition at line 729 of file utilities.h.
|
inline |
Templated function that copies the first n entries from x to y.
The templated type is the type of x and y
n | Number of elements to copy from x to y |
x | The object x, of templated type const T& |
y | The object y, of templated type T& |
Definition at line 32 of file vec_functions.h.
References warn_deprecated().
|
inline |
Divide each element of x by the corresponding element of y.
This function replaces x[n] by x[n]/y[n], for 0 <= n < x.size()
x | Numerator object of the division operation with template type T At the end of the calculation, it contains the result. |
y | Denominator object of the division template type T |
Definition at line 48 of file vec_functions.h.
References warn_deprecated().
|
inline |
Multiply each element of x by the corresponding element of y.
This function replaces x[n] by x[n]*y[n], for 0 <= n < x.size() This is a templated function with just one template type.
x | First object of the multiplication with template type T At the end of the calculation, it contains the result. |
y | Second object of the multiplication with template type T |
Definition at line 66 of file vec_functions.h.
References warn_deprecated().
|
inline |
Multiply each element of x by scale_factor.
This function replaces x[n] by x[n]*scale_factor, for 0 <= n < x.size()
x | First object of the multiplication with template type T At the end of the calculation, it contains the result. |
scale_factor | scale factor with template type S |
Definition at line 83 of file vec_functions.h.
References scale(), and warn_deprecated().
|
inline |
Return the templated dot product of two objects.
Returns the sum of x[n]*y[n], for 0 <= n < x.size().
x | First object of the dot product with template type T At the end of the calculation, it contains the result. |
y | Second object of the dot product with template type T |
Definition at line 99 of file vec_functions.h.
References warn_deprecated().
|
inline |
Returns the templated dot ratio of two objects.
Returns the sum of x[n]/y[n], for 0 <= n < x.size().
x | First object of the dot product with template type T At the end of the calculation, it contains the result. |
y | Second object of the dot product with template type T |
Definition at line 115 of file vec_functions.h.
References _dot_ratio(), and warn_deprecated().
|
inline |
Returns a templated addition operation of two objects.
Replaces x[n] by x[n] + y[n] for 0 <= n < x.size()
x | First object of the addition with template type T At the end of the calculation, it contains the result. |
y | Second object of the addition with template type T |
Definition at line 131 of file vec_functions.h.
References warn_deprecated().
|
inline |
Templated dot ratio class.
Calculates the quantity:
S += x[n]/y[n]
The first templated type is the iterator type for x[] and y[]. The second templated type is the type of S.
x_begin | InputIter type, indicating the address of the first element of x |
x_end | InputIter type, indicating the address of the last element of x |
y_begin | InputIter type, indicating the address of the first element of y |
start_value | S type, indicating the type of the accumulation result. |
Definition at line 158 of file vec_functions.h.
References warn_deprecated().
Referenced by dot_ratio().
|
inline |
Finds the entry in a vector with maximum absolute value, and return this value.
v | Vector to be queried for maximum value, with template type T |
Definition at line 177 of file vec_functions.h.
References warn_deprecated().
|
inline |
Write a vector to a stream.
Definition at line 190 of file vec_functions.h.
|
inline |
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.
s | ostream |
x | Reference to a MultiPhase |
Definition at line 712 of file MultiPhase.h.
References Phase::name(), MultiPhase::nPhases(), MultiPhase::phase(), MultiPhase::phaseMoles(), and ThermoPhase::report().
|
inline |
Import an instance of class Interface from a specification in an input file.
This is the preferred method to create an Interface instance.
Definition at line 108 of file Interface.h.
|
inline |
Create a new kinetics manager.
Definition at line 82 of file KineticsFactory.h.
|
inline |
Create a new kinetics manager.
Definition at line 94 of file KineticsFactory.h.
|
inlinestatic |
Definition at line 139 of file StoichManager.h.
References int2str().
Referenced by C1::writeDecrementReaction(), C2::writeDecrementReaction(), C3::writeDecrementReaction(), C_AnyN::writeDecrementReaction(), C1::writeDecrementSpecies(), C2::writeDecrementSpecies(), C3::writeDecrementSpecies(), C_AnyN::writeDecrementSpecies(), C1::writeIncrementReaction(), C2::writeIncrementReaction(), C3::writeIncrementReaction(), C_AnyN::writeIncrementReaction(), C1::writeIncrementSpecies(), C2::writeIncrementSpecies(), C3::writeIncrementSpecies(), C_AnyN::writeIncrementSpecies(), C1::writeMultiply(), C2::writeMultiply(), C3::writeMultiply(), and C_AnyN::writeMultiply().
|
inlinestatic |
Definition at line 621 of file StoichManager.h.
|
inlinestatic |
Definition at line 631 of file StoichManager.h.
|
inlinestatic |
Definition at line 641 of file StoichManager.h.
|
inlinestatic |
Definition at line 651 of file StoichManager.h.
|
inlinestatic |
Definition at line 661 of file StoichManager.h.
|
inline |
work | Must be dimensioned equal to greater than 3N |
iwork | Must be dimensioned equal to or greater than N |
Definition at line 441 of file ctlapack.h.
Referenced by SquareMatrix::rcondQR().
|
static |
Mutex for input directory access.
Definition at line 43 of file application.cpp.
Referenced by Application::addDataDirectory(), and Application::findInputFile().
|
static |
Mutex for creating singletons within the application object.
Definition at line 46 of file application.cpp.
Referenced by Application::ApplicationDestroy(), and Application::Instance().
|
static |
Mutex for controlling access to XML file storage.
Definition at line 49 of file application.cpp.
Referenced by Application::close_XML_File(), Application::get_XML_File(), and Application::get_XML_from_string().
|
static |
Mutex for access to string messages.
Definition at line 145 of file application.cpp.
Referenced by Application::ThreadMessages::operator->(), and Application::ThreadMessages::removeThreadMessages().
int BasisOptimize_print_lvl = 0 |
External int that is used to turn on debug printing for the BasisOptimze program.
Set this to 1 if you want debug printing from BasisOptimize.
Definition at line 13 of file BasisOptimize.cpp.
Referenced by BasisOptimize(), and ElemRearrange().
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 26 of file vcs_solve.cpp.
Referenced by VCS_SOLVE::vcs_initSizes().
const doublereal DampFactor = 4 |
Dampfactor is the factor by which the damping factor is reduced by when a reduction in step length is warranted.
Definition at line 1288 of file BEulerInt.cpp.
Referenced by MultiNewton::dampStep(), BEulerInt::dampStep(), and NonlinearSolver::dampStep().
const size_t NDAMP = 10 |
Number of damping steps that are carried out before the solution is deemed a failure.
Definition at line 1289 of file BEulerInt.cpp.
Referenced by NonlinearSolver::dampDogLeg(), MultiNewton::dampStep(), BEulerInt::dampStep(), and NonlinearSolver::dampStep().
|
static |
aWTable is a vector containing the atomic weights database.
The size of the table is given by the initial instantiation.
Definition at line 38 of file Elements.cpp.
Referenced by Elements::LookupWtElements(), and LookupWtElements().
|
static |
Define the number of ThermoPhase types for use in this factory routine.
Definition at line 67 of file ThermoFactory.cpp.
Referenced by eosTypeString(), and ThermoFactory::newThermoPhase().
|
static |
Define the string name of the ThermoPhase types that are handled by this factory routine.
Definition at line 70 of file ThermoFactory.cpp.
Referenced by eosTypeString(), and ThermoFactory::newThermoPhase().
|
static |
Define the integer id of the ThermoPhase types that are handled by this factory routine.
Definition at line 82 of file ThermoFactory.cpp.
Referenced by eosTypeString(), and ThermoFactory::newThermoPhase().
|
static |
Definition at line 329 of file WaterProps.cpp.
const doublereal T_c = 647.096 |
Critical Temperature value (kelvin)
Definition at line 22 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::calcDim(), WaterPropsIAPWSphi::check1(), WaterPropsIAPWSphi::check2(), WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::densSpinodalSteam(), WaterPropsIAPWS::densSpinodalWater(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::enthalpy(), WaterPropsIAPWS::Gibbs(), WaterPropsIAPWS::helmholtzFE(), WaterPropsIAPWS::intEnergy(), WaterPropsIAPWS::phaseState(), WaterPropsIAPWS::pressure(), WaterPropsIAPWS::psat(), and WaterPropsIAPWS::temperature().
|
static |
Critical Pressure (Pascals)
Definition at line 24 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::psat().
const doublereal Rho_c = 322. |
Value of the Density at the critical point (kg m-3)
Definition at line 26 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::calcDim(), WaterPropsIAPWSphi::check1(), WaterPropsIAPWSphi::check2(), WaterPropsIAPWS::coeffThermExp(), WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::densSpinodalSteam(), WaterPropsIAPWS::densSpinodalWater(), WaterPropsIAPWS::isothermalCompressibility(), WaterPropsIAPWS::molarVolume(), WaterPropsIAPWS::phaseState(), and WaterPropsIAPWS::pressure().
|
static |
Molecular Weight of water that is consistent with the paper (kg kmol-1)
Definition at line 28 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::coeffThermExp(), WaterPropsIAPWS::corr1(), WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::molarVolume(), WaterPropsIAPWS::phaseState(), WaterPropsIAPWS::pressure(), and WaterPropsIAPWS::psat().
|
static |
Gas constant that is quoted in the paper.
Definition at line 37 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::coeffThermExp(), WaterPropsIAPWS::corr1(), WaterPropsIAPWS::cp(), WaterPropsIAPWS::cv(), WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::enthalpy(), WaterPropsIAPWS::entropy(), WaterPropsIAPWS::Gibbs(), WaterPropsIAPWS::helmholtzFE(), WaterPropsIAPWS::intEnergy(), WaterPropsIAPWS::phaseState(), WaterPropsIAPWS::pressure(), and WaterPropsIAPWS::psat().
|
static |
Constant to compare dimensionless heat capacities against zero.
Definition at line 537 of file MultiTransport.cpp.
|
static |
Definition at line 23 of file ReactorFactory.cpp.
|
static |
Definition at line 29 of file ReactorFactory.cpp.
const doublereal SmallNumber = 1.e-300 |
smallest number to compare to zero.
Definition at line 126 of file ct_defs.h.
Referenced by MultiNewton::dampStep(), SurfPhase::entropy_mole(), Troe::F(), SRI::F(), ConstDensityThermo::getChemPotentials(), MolarityIonicVPSSTP::getChemPotentials(), IdealSolnGasVPSS::getChemPotentials(), IonsFromNeutralVPSSTP::getChemPotentials(), RedlichKwongMFTP::getChemPotentials(), RedlichKisterVPSSTP::getChemPotentials(), MixedSolventElectrolyte::getChemPotentials(), MargulesVPSSTP::getChemPotentials(), IdealMolalSoln::getChemPotentials(), PhaseCombo_Interaction::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials(), LatticePhase::getChemPotentials(), IdealGasPhase::getChemPotentials(), DebyeHuckel::getChemPotentials(), HMWSoln::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials_RT(), PhaseCombo_Interaction::getdlnActCoeffds(), MolarityIonicVPSSTP::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarEntropies(), IonsFromNeutralVPSSTP::getPartialMolarEntropies(), RedlichKwongMFTP::getPartialMolarEntropies(), RedlichKisterVPSSTP::getPartialMolarEntropies(), MixedSolventElectrolyte::getPartialMolarEntropies(), MargulesVPSSTP::getPartialMolarEntropies(), PhaseCombo_Interaction::getPartialMolarEntropies(), IdealMolalSoln::getPartialMolarEntropies(), IdealSolidSolnPhase::getPartialMolarEntropies(), LatticePhase::getPartialMolarEntropies(), IdealGasPhase::getPartialMolarEntropies(), DebyeHuckel::getPartialMolarEntropies(), HMWSoln::getPartialMolarEntropies(), MolalityVPSSTP::report(), ThermoPhase::report(), ThermoPhase::reportCSV(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnN(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnN_diag(), PhaseCombo_Interaction::s_update_lnActCoeff(), and Troe::updateTemp().
const doublereal BigNumber = 1.e300 |
largest number to compare to inf.
Definition at line 128 of file ct_defs.h.
Referenced by HighPressureGasTransport::thermalConductivity(), and GasKinetics::updateKc().
const doublereal MaxExp = 690.775527898 |
const doublereal Undef = -999.1234 |
Fairly random number to be used to initialize variables against to see if they are subsequently defined.
Definition at line 134 of file ct_defs.h.
Referenced by FreeFlame::_finalize(), addFloat(), addFloatArray(), addNamedFloatArray(), vcs_MultiPhaseEquil::equilibrate_HP(), MultiPhase::equilibrate_MultiPhaseEquil(), vcs_MultiPhaseEquil::equilibrate_SP(), getFloatArray(), and FreeFlame::save().
const doublereal 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 142 of file ct_defs.h.
Referenced by Phase::addSpecies(), MultiPhaseEquil::computeReactionSteps(), HighPressureGasTransport::getBinaryDiffCoeffs(), MultiPhaseEquil::getComponents(), getFloatArray(), getFloatCurrent(), HighPressureGasTransport::getMultiDiffCoeffs(), OneDim::initTimeInteg(), MultiPhaseEquil::stepComposition(), sum_xlogQ(), sum_xlogx(), HighPressureGasTransport::thermalConductivity(), MultiTransport::update_C(), MixTransport::update_C(), PecosTransport::update_C(), AqueousTransport::update_C(), LiquidTransport::update_C(), and DustyGasTransport::updateTransport_C().
const size_t npos = static_cast<size_t>(-1) |
index returned by functions to indicate "no position"
Definition at line 165 of file ct_defs.h.
Referenced by VCS_PROB::addOnePhaseSpecies(), VCS_PROB::addPhaseElements(), Kinetics::addReaction(), Phase::addSpecies(), BasisOptimize(), NonlinearSolver::boundStep(), InterfaceKinetics::buildSurfaceArrhenius(), solveProb::calc_damping(), HMWSoln::calcMolalitiesCropped(), IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions(), MolarityIonicVPSSTP::calcPseudoBinaryMoleFractions(), SquareMatrix::checkColumns(), BandMatrix::checkColumns(), Kinetics::checkDuplicates(), SquareMatrix::checkRows(), BandMatrix::checkRows(), XML_Node::child(), vcs_MultiPhaseEquil::component(), IdealGasReactor::componentIndex(), ConstPressureReactor::componentIndex(), IdealGasConstPressureReactor::componentIndex(), FlowReactor::componentIndex(), Reactor::componentIndex(), ct2ctml(), MultiPhase::elementIndex(), Phase::elementIndex(), ElemRearrange(), ChemEquil::equilibrate(), ChemEquil::estimateEP_Brinkley(), MultiJac::eval(), Inlet1D::eval(), Empty1D::eval(), Symm1D::eval(), Outlet1D::eval(), OutletRes1D::eval(), Surf1D::eval(), StFlow::eval(), Domain1D::eval(), ReactingSurf1D::eval(), Domain1D::evalss(), ReactionPathDiagram::exportToDot(), EdgeKinetics::finalize(), InterfaceKinetics::finalize(), MolalityVPSSTP::findCLMIndex(), findFirstNotOfWS(), findFirstWS(), Application::findInputFile(), XML_Reader::findQuotedString(), findUnbackslashed(), StFlow::fixSpecies(), Application::get_XML_File(), MultiPhaseEquil::getComponents(), getEfficiencies(), getFloatArray(), getMap(), getMatrixValues(), IonsFromNeutralVPSSTP::getNeutralMoleculeMoleGrads(), getPairs(), getReagents(), ElectrodeKinetics::identifyMetalPhase(), ImplicitSurfChem::ImplicitSurfChem(), importKinetics(), LiquidTranInteraction::init(), MultiPhase::init(), ChemEquil::initialize(), WaterSSTP::initThermoXML(), IonsFromNeutralVPSSTP::initThermoXML(), IdealMolalSoln::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), installReactionArrays(), invert(), Kinetics::kineticsSpeciesIndex(), Kinetics::kineticsSpeciesName(), PDSS_HKFT::LookupGe(), MargulesVPSSTP::MargulesVPSSTP(), Phase::massFraction(), GeneralSpeciesThermo::maxTemp(), NasaThermo::maxTemp(), LatticeSolidPhase::maxTemp(), SimpleThermo::maxTemp(), ShomateThermo::maxTemp(), VPSSMgr::maxTemp(), NasaThermo::minTemp(), GeneralSpeciesThermo::minTemp(), LatticeSolidPhase::minTemp(), SimpleThermo::minTemp(), ShomateThermo::minTemp(), VPSSMgr::minTemp(), MixedSolventElectrolyte::MixedSolventElectrolyte(), InterfaceKinetics::modifyReaction(), Phase::moleFraction(), Reactor::nSensParams(), FlowDevice::outletSpeciesMassFlowRate(), parseCompString(), parseSpeciesName(), XML_Reader::parseTag(), PhaseCombo_Interaction::PhaseCombo_Interaction(), Kinetics::phaseIndex(), NonlinearSolver::print_solnDelta_norm_contrib(), solveProb::printFinal(), solveProb::printIteration(), Mu0Poly::processCoeffs(), HMWSoln::readXMLBinarySalt(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKwongMFTP::readXMLCrossFluid(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), RedlichKwongMFTP::readXMLPureFluid(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), RedlichKisterVPSSTP::RedlichKisterVPSSTP(), GeneralSpeciesThermo::refPressure(), VPSSMgr::refPressure(), HMWSoln::relative_molal_enthalpy(), MolalityVPSSTP::report(), NonlinearSolver::residErrorNorm(), vcs_VolPhase::resize(), OneDim::resize(), RedlichKisterVPSSTP::resizeNumInteractions(), MixedSolventElectrolyte::resizeNumInteractions(), MargulesVPSSTP::resizeNumInteractions(), PhaseCombo_Interaction::resizeNumInteractions(), StFlow::restore(), Inlet1D::restore(), OutletRes1D::restore(), ReactingSurf1D::restore(), Application::setDefaultDirectories(), Wall::setKinetics(), MolalityVPSSTP::setMolalitiesByName(), vcs_VolPhase::setMolesFromVCS(), Domain1D::setSteadyTolerances(), Domain1D::setTransientTolerances(), NonlinearSolver::solnErrorNorm(), OneDim::solve(), MultiNewton::solve(), solveProb::solve(), solveSP::solveSP(), StFlow::solveSpecies(), Reactor::speciesIndex(), MultiPhase::speciesIndex(), Phase::speciesIndex(), Kinetics::speciesPhase(), Kinetics::speciesPhaseIndex(), split(), split_at_pound(), OneDim::ssnorm(), MultiNewton::step(), StFlow::StFlow(), STITbyPDSS::STITbyPDSS(), tokenizeString(), Unit::toSI(), vcs_VolPhase::transferElementsFM(), InterfaceKinetics::updateKc(), STITbyPDSS::updatePropertiesTemp(), ElectrodeKinetics::updateROP(), VCS_SOLVE::vcs_basopt(), vcs_Cantera_update_vprob(), VCS_SOLVE::vcs_elcorr(), VCS_SOLVE::vcs_elem_rearrange(), VCS_SOLVE::vcs_phaseStabilityTest(), VCS_SOLVE::vcs_popPhaseID(), VCS_PROB::VCS_PROB(), VCS_SOLVE::vcs_RxnStepSizes(), and XML_Node::write_int().
const std::string CTML_Version = "1.4.1" |
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 30 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), AqueousKinetics::addReaction(), getRateCoefficient(), and GasKinetics::modifyReaction().
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 36 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), Kinetics::checkDuplicates(), getRateCoefficient(), and GasKinetics::modifyReaction().
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 42 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), Kinetics::checkDuplicates(), getRateCoefficient(), GasKinetics::modifyReaction(), and FalloffMgr::pr_to_falloff().
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 50 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), getRateCoefficient(), and GasKinetics::modifyReaction().
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 56 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), getRateCoefficient(), and GasKinetics::modifyReaction().
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 64 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), Kinetics::checkDuplicates(), getRateCoefficient(), and GasKinetics::modifyReaction().
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 72 of file reaction_defs.h.
Referenced by getRateCoefficient().
const int INTERFACE_RXN = 20 |
A reaction occurring on an interface, e.g a surface or edge.
Definition at line 75 of file reaction_defs.h.
const int BUTLERVOLMER_NOACTIVITYCOEFFS_RXN = 25 |
This is a surface reaction that is formulated using the Butler-Volmer formulation and using concentrations instead of activity concentrations for its exchange current density formula.
Definition at line 80 of file reaction_defs.h.
Referenced by InterfaceKinetics::addReaction(), and ElectrodeKinetics::updateROP().
const int BUTLERVOLMER_RXN = 26 |
This is a surface reaction that is formulated using the Butler-Volmer formulation.
Note the B-V equations can be derived from the forward and reverse rate constants for a single step reaction. However, there are some advantages to using the formulation directly.
Definition at line 86 of file reaction_defs.h.
Referenced by InterfaceKinetics::addReaction(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().
const int SURFACEAFFINITY_RXN = 27 |
This is a surface reaction that is formulated using the affinity representation, common in the geochemistry community.
This is generally a global non-mass action reaction with an additional functional form dependence on delta G of reaction.
Definition at line 92 of file reaction_defs.h.
Referenced by InterfaceKinetics::addReaction().
const int EDGE_RXN = 22 |
A reaction occurring at a one-dimensional interface between two surface phases.
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 103 of file reaction_defs.h.
Referenced by getRateCoefficient().
const int GLOBAL_RXN = 30 |
A global reaction.
These may have non-mass action reaction orders, and are not allowed to be reversible.
Definition at line 109 of file reaction_defs.h.
Referenced by InterfaceKinetics::addReaction().
const int cEST_solvent = 0 |
Electrolyte species type.
Definition at line 19 of file electrolytes.h.
Referenced by DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), interp_est(), and HMWSoln::interp_est().
const int cHMWSoln0 = 45010 |
eosTypes returned for this ThermoPhase Object
Definition at line 41 of file electrolytes.h.
Referenced by HMWSoln::eosType().
const int cDebyeHuckel0 = 46010 |
eosTypes returned for this ThermoPhase Object
Definition at line 48 of file electrolytes.h.
Referenced by DebyeHuckel::eosType().
const int cNone = 0 |
This generic id is used as the default in virtual base classes that employ id's.
It is used to indicate the lack of an inherited class that would define the id.
Definition at line 13 of file mix_defs.h.
const int cIdealGas = 1 |
Equation of state types:
These types are used in the member function eosType() of the virtual base class ThermoPhase. They are used to distinguish different types of equation of states. Also, they may be used for upcasting from the ThermoPhase class. Their id's should be distinct.
Users who wish to define their own equation of states which derive from ThermoPhase should define a unique id which doesn't conflict with those listed below. The Cantera Kernel however, will not be know about the class and will therefore not be able to initialize the class within its "factory" routines.
Definition at line 37 of file mix_defs.h.
Referenced by IdealGasPhase::eosType(), ThermoFactory::newThermoPhase(), vcs_VolPhase::setPtrThermoPhase(), IdealGasReactor::setThermoMgr(), IdealGasConstPressureReactor::setThermoMgr(), and vcs_Cantera_to_vprob().
const int cSurf = 3 |
A surface phase. Used by class SurfPhase.
Definition at line 40 of file mix_defs.h.
Referenced by Kinetics::addPhase(), SurfPhase::eosType(), getStick(), ThermoFactory::newThermoPhase(), vcs_VolPhase::setPtrThermoPhase(), and vcs_Cantera_to_vprob().
const int cMetal = 4 |
A metal phase.
Definition at line 43 of file mix_defs.h.
Referenced by MetalPhase::eosType(), ThermoFactory::newThermoPhase(), and vcs_VolPhase::setPtrThermoPhase().
const int cEdge = 6 |
An edge between two 2D surfaces.
Definition at line 58 of file mix_defs.h.
Referenced by Kinetics::addPhase(), EdgePhase::eosType(), getStick(), ThermoFactory::newThermoPhase(), vcs_VolPhase::setPtrThermoPhase(), and vcs_Cantera_to_vprob().
const int cFixedChemPot = 70 |
Stoichiometric compound with a constant chemical potential.
Definition at line 61 of file mix_defs.h.
Referenced by FixedChemPotSSTP::eosType(), and ThermoFactory::newThermoPhase().
const int cIdealSolidSolnPhase = 5009 |
Constant partial molar volume solution IdealSolidSolnPhase.h.
Definition at line 64 of file mix_defs.h.
Referenced by ThermoFactory::newThermoPhase(), and vcs_VolPhase::setPtrThermoPhase().
const int cHMW = 40 |
HMW - Strong electrolyte using the Pitzer formulation.
Definition at line 69 of file mix_defs.h.
Referenced by ThermoFactory::newThermoPhase().
const int cDebyeHuckel = 50 |
DebyeHuckel - Weak electrolyte using various Debye-Huckel formulations.
Definition at line 72 of file mix_defs.h.
Referenced by ThermoFactory::newThermoPhase().
const int cIdealMolalSoln = 60 |
IdealMolalSoln - molality based solution with molality-based act coeffs of 1.
Definition at line 75 of file mix_defs.h.
Referenced by ThermoFactory::newThermoPhase().
const int cMixtureFugacityTP = 700 |
Fugacity Models.
Definition at line 81 of file mix_defs.h.
const int cVPSS_IdealGas = 1001 |
Variable Pressure Standard State ThermoPhase objects.
Definition at line 96 of file mix_defs.h.
Referenced by ThermoFactory::newThermoPhase(), and VPSSMgrFactory::newVPSSMgr().
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 827 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().
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 852 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().
const int cAC_CONVENTION_MOLAR = 0 |
Standard state uses the molar convention.
Definition at line 24 of file ThermoPhase.h.
Referenced by ThermoPhase::activityConvention().
const int cAC_CONVENTION_MOLALITY = 1 |
Standard state uses the molality convention.
Definition at line 26 of file ThermoPhase.h.
Referenced by MolalityVPSSTP::activityConvention(), and LiquidTransport::stefan_maxwell_solve().
const int cSS_CONVENTION_TEMPERATURE = 0 |
Standard state uses the molar convention.
Definition at line 34 of file ThermoPhase.h.
Referenced by MixtureFugacityTP::standardStateConvention().
const int cSS_CONVENTION_VPSS = 1 |
Standard state uses the molality convention.
Definition at line 36 of file ThermoPhase.h.
Referenced by importPhase(), and VPStandardStateTP::standardStateConvention().
const int cSS_CONVENTION_SLAVE = 2 |
Standard state thermodynamics is obtained from slave ThermoPhase objects.
Definition at line 38 of file ThermoPhase.h.
Referenced by importPhase(), and LatticeSolidPhase::standardStateConvention().