Cantera
2.5.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 |
Class 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 | ResidData |
A simple class to hold an array of parameter values and a pointer to an instance of a subclass of ResidEval. More... | |
struct | atomicWeightData |
struct | isotopeWeightData |
class | MMCollisionInt |
Calculation of Collision integrals. More... | |
class | TransportDBError |
Exception thrown if an error is encountered while reading the transport database. More... | |
class | AnyBase |
Base class defining common data possessed by both AnyMap and AnyValue objects. More... | |
class | AnyValue |
A wrapper for a variable whose type is determined at runtime. More... | |
class | AnyMap |
A map of string keys to values whose type can vary at runtime. More... | |
class | InputFileError |
Error thrown for problems processing information contained in an AnyMap or AnyValue. More... | |
class | Array2D |
A class for 2D arrays stored in column-major (Fortran-compatible) form. More... | |
class | clockWC |
The class provides the wall clock timer in seconds. More... | |
class | CanteraError |
Base class for exceptions thrown by Cantera classes. More... | |
class | ArraySizeError |
Array size error. More... | |
class | IndexError |
An array index is out of range. More... | |
class | NotImplementedError |
An error indicating that an unimplemented function has been called. More... | |
class | FactoryBase |
Base class for factories. More... | |
class | Factory |
Factory class that supports registering functions to create objects. More... | |
class | Logger |
Base class for 'loggers' that write text messages to log files. More... | |
class | Solution |
A container class holding managers for all pieces defining a phase. More... | |
class | Units |
A representation of the units associated with a dimensional quantity. More... | |
class | UnitSystem |
Unit conversion utility. 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_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 | 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 | 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... | |
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 | SpeciesNode |
Nodes in reaction path graphs. More... | |
class | ReactionPathDiagram |
Reaction path diagrams (graphs). More... | |
class | Arrhenius |
Arrhenius reaction rate type depends only on temperature. More... | |
class | SurfaceArrhenius |
An Arrhenius rate with coverage-dependent terms. 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 | Metal |
Wrapper for MetalPhase with constructor from file. More... | |
class | BandMatrix |
A class for banded matrices, involving matrix inversion processes. More... | |
class | CVodesIntegrator |
Wrapper class for 'cvodes' integrator from LLNL. More... | |
class | DAE_Solver |
Wrapper for DAE solvers. More... | |
class | DenseMatrix |
A class for full (non-sparse) matrices with Fortran-compatible data storage, which adds matrix operations to class Array2D. More... | |
class | Func1 |
Base class for 'functor' classes that evaluate a function of one variable. More... | |
class | Sin1 |
implements the sin() function More... | |
class | Cos1 |
implements the cos() function More... | |
class | Exp1 |
implements the exponential function More... | |
class | Pow1 |
implements the power function (pow) More... | |
class | Tabulated1 |
The Tabulated1 class implements a tabulated function. More... | |
class | Const1 |
The Const1 class implements a 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_Solver |
Wrapper for Sundials IDA solver. More... | |
class | Integrator |
Abstract base class for ODE system integrators. 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 | Boundary1D |
The base class for boundaries between one-dimensional spatial domains. More... | |
class | Bdry1D |
class | Inlet1D |
An inlet. More... | |
class | Empty1D |
A terminator that does nothing. More... | |
class | Symm1D |
A symmetry plane. More... | |
class | Outlet1D |
An outlet. More... | |
class | OutletRes1D |
An outlet with specified composition. More... | |
class | Surf1D |
A non-reacting surface. More... | |
class | ReactingSurf1D |
A reacting surface. More... | |
class | Domain1D |
Base class for one-dimensional domains. More... | |
class | IonFlow |
This class models the ion transportation in a flame. More... | |
class | MultiJac |
Class MultiJac evaluates the Jacobian of a system of equations defined by a residual function supplied by an instance of class OneDim. More... | |
class | MultiNewton |
Newton iterator for multi-domain, one-dimensional problems. More... | |
class | OneDim |
Container class for multiple-domain 1D problems. More... | |
class | Refiner |
Refine Domain1D grids so that profiles satisfy adaptation tolerances. More... | |
class | Sim1D |
One-dimensional simulations. More... | |
class | StFlow |
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemically-reacting, axisymmetric flows. More... | |
class | PureFluid |
Wrapper for PureFluidPhase with constructor from file. More... | |
class | Water |
Water definition from liquidvapor input file. More... | |
class | BinarySolutionTabulatedThermo |
Overloads the virtual methods of class IdealSolidSolnPhase to implement tabulated standard state thermodynamics for one species in a binary solution. More... | |
class | ConstCpPoly |
A constant-heat capacity species thermodynamic property manager class. More... | |
class | 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 | FixedChemPotSSTP |
Class FixedChemPotSSTP represents a stoichiometric (fixed composition) incompressible substance. 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 | 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 | Mu0Poly |
The Mu0Poly class implements an interpolation of the Gibbs free energy based on a piecewise constant heat capacity approximation. More... | |
class | MultiSpeciesThermo |
A species thermodynamic property manager for a phase. More... | |
class | Nasa9Poly1 |
The NASA 9 polynomial parameterization for one temperature range. More... | |
class | Nasa9PolyMultiTempRegion |
The NASA 9 polynomial parameterization for a single species encompassing multiple temperature regions. More... | |
class | NasaPoly1 |
The NASA polynomial parameterization for one temperature range. More... | |
class | NasaPoly2 |
The NASA polynomial parameterization for two temperature ranges. More... | |
class | PDSS |
Virtual base class for a species with a pressure dependent standard state. More... | |
class | PDSS_Molar |
Base class for PDSS classes which compute molar properties directly. More... | |
class | PDSS_Nondimensional |
Base class for PDSS classes which compute nondimensional properties directly. More... | |
class | PDSS_ConstVol |
Class for pressure dependent standard states that use a constant volume model. More... | |
class | PDSS_HKFT |
Class for pressure dependent standard states corresponding to ionic solutes in electrolyte water. More... | |
class | PDSS_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 (compressible substances) or pressure (incompressible substances), species mass/mole fraction, and other generalized forces and intrinsic properties (such as electric potential) that define the thermodynamic state. More... | |
class | PureFluidPhase |
This phase object consists of a single component that can be a gas, a liquid, a mixed gas-liquid fluid, or a fluid beyond its critical point. More... | |
class | RedlichKisterVPSSTP |
RedlichKisterVPSSTP is a derived class of GibbsExcessVPSSTP that employs the Redlich-Kister approximation for the excess Gibbs free energy. More... | |
class | RedlichKwongMFTP |
Implementation of a multi-species Redlich-Kwong equation of state. More... | |
class | ShomatePoly |
The Shomate polynomial parameterization for one temperature range for one species. More... | |
class | ShomatePoly2 |
The Shomate polynomial parameterization for two temperature ranges for one species. More... | |
class | SingleSpeciesTP |
The SingleSpeciesTP class is a filter class for ThermoPhase. More... | |
class | Species |
Contains data about a single chemical species. More... | |
class | SpeciesThermoInterpType |
Abstract Base class for the thermodynamic manager for an individual species' reference state. More... | |
class | StoichSubstance |
Class StoichSubstance represents a stoichiometric (fixed composition) incompressible substance. More... | |
class | SurfPhase |
A simple thermodynamic model for a surface phase, assuming an ideal solution model. More... | |
class | 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 | VPStandardStateTP |
This is a filter class for ThermoPhase that implements some preparatory steps for efficiently handling a variable pressure standard state for species. More... | |
class | WaterProps |
The WaterProps class is used to house several approximation routines for properties of water. More... | |
class | WaterPropsIAPWS |
Class for calculating the equation of state of water. More... | |
class | WaterPropsIAPWSphi |
Low level class for the real description of water. More... | |
class | WaterSSTP |
Class for single-component water. More... | |
class | DustyGasTransport |
Class DustyGasTransport implements the Dusty Gas model for transport in porous media. More... | |
class | GasTransport |
Class GasTransport implements some functions and properties that are shared by the MixTransport and MultiTransport classes. More... | |
class | HighPressureGasTransport |
Class MultiTransport implements transport properties for high pressure gas mixtures. More... | |
class | IonGasTransport |
Class IonGasTransport implements Stockmayer-(n,6,4) model for transport of ions. More... | |
class | MixTransport |
Class MixTransport implements mixture-averaged transport properties for ideal gas mixtures. More... | |
class | MultiTransport |
Class MultiTransport implements multicomponent transport properties for ideal gas mixtures. More... | |
class | Transport |
Base class for transport property managers. More... | |
class | TransportData |
Base class for transport data for a single species. More... | |
class | GasTransportData |
Transport data for a single gas-phase species which can be used in mixture-averaged or multicomponent transport models. More... | |
class | TransportFactory |
Factory class for creating new instances of classes derived from Transport. More... | |
class | TransportParams |
Base structure to hold transport model parameters. More... | |
class | UnityLewisTransport |
Class UnityLewisTransport implements the unity Lewis number approximation for the mixture-averaged species diffusion coefficients. More... | |
class | WaterTransport |
Transport Parameters for pure water. More... | |
class | 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 | WallBase |
Base class for 'walls' (walls, pistons, etc.) connecting reactors. More... | |
class | Wall |
Represents a wall between between two ReactorBase objects. More... | |
Typedefs | |
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 Eigen::Map< Eigen::MatrixXd > | MappedMatrix |
typedef Eigen::Map< Eigen::VectorXd > | MappedVector |
typedef Eigen::Map< const Eigen::VectorXd > | ConstMappedVector |
typedef int | VelocityBasis |
The diffusion fluxes must be referenced to a particular reference fluid velocity. More... | |
Enumerations | |
enum | flow_t { NetFlow , OneWayFlow } |
enum | MethodType { BDF_Method , Adams_Method } |
Specifies the method used to integrate the system of equations. More... | |
enum | IterType { Newton_Iter , Functional_Iter } |
Specifies the method used for iteration. More... | |
enum | ResidEval_Type_Enum { Base_ResidEval = 0 , JacBase_ResidEval , JacDelta_ResidEval , Base_ShowSolution , Base_LaggedSolutionComponents } |
Differentiates the type of residual evaluations according to functionality. More... | |
enum | IonSolnType_enumType { cIonSolnType_PASSTHROUGH = 2000 , cIonSolnType_SINGLEANION , cIonSolnType_SINGLECATION , cIonSolnType_MULTICATIONANION } |
enums for molten salt ion solution types More... | |
enum class | SensParameterType { reaction , enthalpy } |
Functions | |
bool | operator== (const std::string &lhs, const AnyValue &rhs) |
bool | operator!= (const std::string &lhs, const AnyValue &rhs) |
bool | operator== (const double &lhs, const AnyValue &rhs) |
bool | operator!= (const double &lhs, const AnyValue &rhs) |
bool | operator== (const long int &lhs, const AnyValue &rhs) |
bool | operator!= (const long int &lhs, const AnyValue &rhs) |
bool | operator== (const int &lhs, const AnyValue &rhs) |
bool | operator!= (const int &lhs, const AnyValue &rhs) |
AnyMap::Iterator | begin (const AnyValue &v) |
AnyMap::Iterator | end (const AnyValue &v) |
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... | |
void | checkFinite (const std::string &name, double *values, size_t N) |
Check to see that all elements in an array are finite. 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 | 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 | 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... | |
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, vector_fp &v, const bool convert=true, const std::string &unitsString="", const std::string &nodeName="floatArray") |
This function reads the current node or a child node of the current node with the default name, "floatArray", with a value field consisting of a comma separated list of floats. More... | |
void | 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_direct (const std::string &msg) |
Write a message to the screen. More... | |
void | writelogendl () |
Write an end of line character to the screen and flush output. More... | |
void | writeline (char repeat, size_t count, bool endl_after, bool endl_before) |
void | warn_deprecated (const std::string &method, const std::string &extra="") |
Print a warning indicating that method is deprecated. More... | |
void | _warn_user (const std::string &method, const std::string &extra) |
helper function passing user warning to global handler More... | |
void | suppress_deprecation_warnings () |
Globally disable printing of deprecation warnings. More... | |
void | make_deprecation_warnings_fatal () |
Turns deprecation warnings into exceptions. More... | |
void | suppress_thermo_warnings (bool suppress=true) |
Globally disable printing of warnings about problematic thermo data, e.g. More... | |
bool | thermo_warnings_suppressed () |
Returns true if thermo warnings should be suppressed. More... | |
void | appdelete () |
Delete and free all memory associated with the application. More... | |
void | thread_complete () |
Delete and free memory allocated per thread in multithreaded applications. More... | |
std::string | gitCommit () |
Returns the hash of the git commit from which Cantera was compiled, if known. More... | |
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... | |
void | addDirectory (const std::string &dir) |
Add a directory to the data file search path. More... | |
std::string | getDataDirectories (const std::string &sep) |
Get the Cantera data directories. More... | |
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... | |
shared_ptr< Solution > | newSolution (const std::string &infile, const std::string &name="", const std::string &transport="", const std::vector< shared_ptr< Solution >> &adjacent={}) |
Create and initialize a new Solution manager from an input file. More... | |
std::string | vec2str (const vector_fp &v, const std::string &fmt="%g", const std::string &sep=", ") |
Convert a vector to a string (separated by commas) More... | |
std::string | stripnonprint (const std::string &s) |
Strip non-printing characters wherever they are. More... | |
compositionMap | parseCompString (const std::string &ss, const std::vector< std::string > &names=std::vector< std::string >()) |
Parse a composition string into a map consisting of individual key:composition pairs. More... | |
int | intValue (const std::string &val) |
Translate a string into one integer value. More... | |
doublereal | fpValue (const std::string &val) |
Translate a string into one doublereal value. More... | |
doublereal | fpValueCheck (const std::string &val) |
Translate a string into one doublereal value, with error checking. More... | |
std::string | parseSpeciesName (const std::string &nameStr, std::string &phaseName) |
Parse a name string, separating out the phase name from the species name. More... | |
doublereal | strSItoDbl (const std::string &strSI) |
Interpret one or two token string as a single double. More... | |
void | tokenizeString (const std::string &oval, std::vector< std::string > &v) |
This function separates a string up into tokens according to the location of white space. More... | |
size_t | copyString (const std::string &source, char *dest, size_t length) |
Copy the contents of a std::string into a char array of a given length. More... | |
std::string | trimCopy (const std::string &input) |
Trim. More... | |
std::string | toLowerCopy (const std::string &input) |
Convert to lower case. More... | |
bool | caseInsensitiveEquals (const std::string &input, const std::string &test) |
Case insensitive equality predicate. More... | |
static std::pair< double, std::string > | split_unit (const AnyValue &v) |
static string::size_type | findUnbackslashed (const std::string &s, const char q, std::string::size_type istart=0) |
Find the first position of a character, q, in string, s, which is not immediately preceded by the backslash character. More... | |
XML_Node * | findXMLPhase (XML_Node *root, const std::string &phaseId) |
Search an XML_Node tree for a named phase XML_Node. More... | |
size_t | BasisOptimize (int *usedZeroedSpecies, bool doFormRxn, MultiPhase *mphase, std::vector< size_t > &orderVectorSpecies, std::vector< size_t > &orderVectorElements, vector_fp &formRxnMatrix) |
Choose the optimum basis of species for the equilibrium calculations. More... | |
void | ElemRearrange (size_t nComponents, const vector_fp &elementAbundances, MultiPhase *mphase, std::vector< size_t > &orderVectorSpecies, std::vector< size_t > &orderVectorElements) |
Handles the potential rearrangement of the constraint equations represented by the Formula Matrix. More... | |
int | _equilflag (const char *xy) |
map property strings to integers More... | |
static void | printProgress (const vector< string > &spName, const vector_fp &soln, const vector_fp &ff) |
double | vcs_l2norm (const vector_fp &vec) |
determine the l2 norm of a vector of doubles More... | |
const char * | vcs_speciesType_string (int speciesStatus, int length=100) |
Returns a const char string representing the type of the species given by the first argument. More... | |
bool | vcs_doubleEqual (double d1, double d2) |
Simple routine to check whether two doubles are equal up to roundoff error. More... | |
static bool | hasChargedSpecies (const ThermoPhase *const tPhase) |
This function decides whether a phase has charged species or not. More... | |
static bool | chargeNeutralityElement (const ThermoPhase *const tPhase) |
This utility routine decides whether a Cantera ThermoPhase needs a constraint equation representing the charge neutrality of the phase. More... | |
shared_ptr< Falloff > | newFalloff (int type, const vector_fp &c) |
Return a pointer to a new falloff function calculator. More... | |
shared_ptr< Falloff > | newFalloff (const std::string &type, const vector_fp &c) |
Return a pointer to a new falloff function calculator. More... | |
std::ostream & | operator<< (std::ostream &s, const Group &g) |
bool | installReactionArrays (const XML_Node &p, Kinetics &kin, std::string default_phase, bool check_for_duplicates=false) |
Install information about reactions into the kinetics object, kin. More... | |
bool | importKinetics (const XML_Node &phase, std::vector< ThermoPhase * > th, Kinetics *kin) |
Import a reaction mechanism for a phase or an interface. More... | |
bool | buildSolutionFromXML (XML_Node &root, const std::string &id, const std::string &nm, ThermoPhase *th, Kinetics *kin) |
Build a single-phase ThermoPhase object with associated kinetics mechanism. More... | |
bool | checkElectrochemReaction (const XML_Node &p, Kinetics &kin, const XML_Node &r) |
Check to ensure that all electrochemical reactions are specified correctly. More... | |
unique_ptr< Kinetics > | newKinetics (vector< ThermoPhase * > &phases, const AnyMap &phaseNode, const AnyMap &rootNode) |
unique_ptr< Kinetics > | newKinetics (std::vector< ThermoPhase * > &phases, const std::string &filename, const std::string &phase_name) |
void | addReactions (Kinetics &kin, const AnyMap &phaseNode, const AnyMap &rootNode) |
Arrhenius | readArrhenius (const XML_Node &arrhenius_node) |
Units | rateCoeffUnits (const Reaction &R, const Kinetics &kin, int pressure_dependence=0) |
Arrhenius | readArrhenius (const Reaction &R, const AnyValue &rate, const Kinetics &kin, const UnitSystem &units, int pressure_dependence=0) |
void | readFalloff (FalloffReaction &R, const XML_Node &rc_node) |
Parse falloff parameters, given a rateCoeff node. More... | |
void | readFalloff (FalloffReaction &R, const AnyMap &node) |
void | readEfficiencies (ThirdBody &tbody, const XML_Node &rc_node) |
void | readEfficiencies (ThirdBody &tbody, const AnyMap &node) |
void | setupReaction (Reaction &R, const XML_Node &rxn_node) |
void | parseReactionEquation (Reaction &R, const AnyValue &equation, const Kinetics &kin) |
void | setupReaction (Reaction &R, const AnyMap &node, const Kinetics &kin) |
void | setupElementaryReaction (ElementaryReaction &R, const XML_Node &rxn_node) |
void | setupElementaryReaction (ElementaryReaction &R, const AnyMap &node, const Kinetics &kin) |
void | setupThreeBodyReaction (ThreeBodyReaction &R, const XML_Node &rxn_node) |
void | setupThreeBodyReaction (ThreeBodyReaction &R, const AnyMap &node, const Kinetics &kin) |
void | setupFalloffReaction (FalloffReaction &R, const XML_Node &rxn_node) |
void | setupFalloffReaction (FalloffReaction &R, const AnyMap &node, const Kinetics &kin) |
void | setupChemicallyActivatedReaction (ChemicallyActivatedReaction &R, const XML_Node &rxn_node) |
void | setupPlogReaction (PlogReaction &R, const XML_Node &rxn_node) |
void | setupPlogReaction (PlogReaction &R, const AnyMap &node, const Kinetics &kin) |
void | setupChebyshevReaction (ChebyshevReaction &R, const XML_Node &rxn_node) |
void | setupChebyshevReaction (ChebyshevReaction &R, const AnyMap &node, const Kinetics &kin) |
void | setupInterfaceReaction (InterfaceReaction &R, const XML_Node &rxn_node) |
void | setupInterfaceReaction (InterfaceReaction &R, const AnyMap &node, const Kinetics &kin) |
void | setupElectrochemicalReaction (ElectrochemicalReaction &R, const XML_Node &rxn_node) |
void | setupElectrochemicalReaction (ElectrochemicalReaction &R, const AnyMap &node, const Kinetics &kin) |
bool | isElectrochemicalReaction (Reaction &R, const Kinetics &kin) |
shared_ptr< Reaction > | newReaction (const XML_Node &rxn_node) |
Create a new Reaction object for the reaction defined in rxn_node More... | |
unique_ptr< Reaction > | newReaction (const AnyMap &rxn_node, const Kinetics &kin) |
Create a new Reaction object using the specified parameters. More... | |
std::vector< shared_ptr< Reaction > > | getReactions (const XML_Node &node) |
Create Reaction objects for all <reaction> nodes in an XML document. More... | |
std::vector< shared_ptr< Reaction > > | getReactions (const AnyValue &items, Kinetics &kinetics) |
Create Reaction objects for each item (an AnyMap) in items . More... | |
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 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... | |
Integrator * | newIntegrator (const std::string &itype) |
double | polyfit (size_t n, size_t deg, const double *x, const double *y, const double *w, double *p) |
Fits a polynomial function to a set of data points. More... | |
static int | interp_est (const std::string &estString) |
Utility function to assign an integer value from a string for the ElectrolyteSpeciesType field. More... | |
static void | check_nParams (const std::string &method, size_t nParams, size_t m_formPitzerTemp) |
vector_fp | getSizedVector (const AnyMap &item, const std::string &key, size_t nCoeffs) |
static double | factorOverlap (const std::vector< std::string > &elnamesVN, const vector_fp &elemVectorN, const size_t nElementsN, const std::vector< std::string > &elnamesVI, const vector_fp &elemVectorI, const size_t nElementsI) |
Return the factor overlap. More... | |
doublereal | xlogx (doublereal x) |
Mu0Poly * | newMu0ThermoFromXML (const XML_Node &Mu0Node) |
Install a Mu0 polynomial thermodynamic reference state. More... | |
PDSS * | newPDSS (const std::string &model) |
shared_ptr< Species > | newSpecies (const XML_Node &species_node) |
Create a new Species object from a 'species' XML_Node. More... | |
unique_ptr< Species > | newSpecies (const AnyMap &node) |
Create a new Species object from an AnyMap specification. More... | |
std::vector< shared_ptr< Species > > | getSpecies (const XML_Node &node) |
Generate Species objects for all <species> nodes in an XML document. More... | |
std::vector< shared_ptr< Species > > | getSpecies (const AnyValue &items) |
Generate Species objects for each item (an AnyMap) in items . More... | |
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... | |
void | setupSpeciesThermo (SpeciesThermoInterpType &thermo, const AnyMap &node) |
void | setupNasaPoly (NasaPoly2 &thermo, const AnyMap &node) |
static SpeciesThermoInterpType * | newShomateThermoFromXML (vector< XML_Node * > &nodes) |
Create a Shomate polynomial thermodynamic property parameterization for a species. More... | |
void | setupShomatePoly (ShomatePoly2 &thermo, const AnyMap &node) |
static SpeciesThermoInterpType * | newConstCpThermoFromXML (XML_Node &f) |
Create a "simple" constant heat capacity thermodynamic property parameterization for a ! species. More... | |
void | setupConstCp (ConstCpPoly &thermo, const AnyMap &node) |
static SpeciesThermoInterpType * | newNasa9ThermoFromXML (const std::vector< XML_Node * > &tp) |
Create a NASA9 polynomial thermodynamic property parameterization for a species. More... | |
void | setupNasa9Poly (Nasa9PolyMultiTempRegion &thermo, const AnyMap &node) |
void | setupMu0 (Mu0Poly &thermo, const AnyMap &node) |
SpeciesThermoInterpType * | newSpeciesThermoInterpType (const XML_Node &thermoNode) |
Create a new SpeciesThermoInterpType object from XML_Node. More... | |
unique_ptr< SpeciesThermoInterpType > | newSpeciesThermo (const AnyMap &thermo_node) |
Create a new SpeciesThermoInterpType object using the specified parameters. More... | |
ThermoPhase * | newPhase (XML_Node &phase) |
Create a new ThermoPhase object and initializes it according to the XML tree. More... | |
unique_ptr< ThermoPhase > | newPhase (AnyMap &phaseNode, const AnyMap &rootNode=AnyMap()) |
Create a new ThermoPhase object and initialize it. More... | |
ThermoPhase * | newPhase (const std::string &infile, std::string id="") |
Create and Initialize a ThermoPhase object from an input file. More... | |
static void | formSpeciesXMLNodeList (std::vector< XML_Node * > &spDataNodeList, std::vector< std::string > &spNamesList, vector_int &spRuleList, const std::vector< XML_Node * > spArray_names, const std::vector< XML_Node * > spArray_dbases, const vector_int sprule) |
Gather a vector of pointers to XML_Nodes for a phase. More... | |
void | importPhase (XML_Node &phase, ThermoPhase *th) |
Import a phase information into an empty ThermoPhase object. More... | |
void | addDefaultElements (ThermoPhase &thermo, const vector< string > &element_names) |
void | addElements (ThermoPhase &thermo, const vector< string > &element_names, const AnyValue &elements, bool allow_default) |
void | addSpecies (ThermoPhase &thermo, const AnyValue &names, const AnyValue &species) |
void | setupPhase (ThermoPhase &phase, AnyMap &phaseNode, const AnyMap &rootNode=AnyMap()) |
Initialize a ThermoPhase object. More... | |
void | installElements (Phase &th, const XML_Node &phaseNode) |
Add the elements given in an XML_Node tree to the specified phase. More... | |
const XML_Node * | speciesXML_Node (const std::string &kname, const XML_Node *phaseSpeciesData) |
Search an XML tree for species data. 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) |
void | setupGasTransportData (GasTransportData &tr, const AnyMap &node) |
shared_ptr< TransportData > | newTransportData (const XML_Node &transport_node) |
Create a new TransportData object from a 'transport' XML_Node. More... | |
unique_ptr< TransportData > | newTransportData (const AnyMap &node) |
Create a new TransportData object from an AnyMap specification. More... | |
Transport * | newTransportMgr (const std::string &transportModel="", thermo_t *thermo=0, int loglevel=0, int ndim=-99) |
Build a new transport manager using a transport manager that may not be the same as in the phase description and return a base class pointer to it. More... | |
Transport * | newDefaultTransportMgr (thermo_t *thermo, int loglevel=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 | debuglog (const std::string &msg, int loglevel) |
Write a message to the log only if loglevel > 0. More... | |
template<typename... Args> | |
void | writelog (const std::string &fmt, const Args &... args) |
Write a formatted message to the screen. More... | |
template<typename... Args> | |
void | writelogf (const char *fmt, const Args &... args) |
Write a formatted message to the screen. More... | |
template<typename... Args> | |
void | warn_user (const std::string &method, const std::string &msg, const Args &... args) |
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 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 > | |
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 > | |
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 > | |
doublereal | sum_xlogx (InputIter begin, InputIter end) |
Compute. More... | |
template<class InputIter1 , class InputIter2 > | |
doublereal | sum_xlogQ (InputIter1 begin, InputIter1 end, InputIter2 Q_begin) |
Compute. 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 | 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 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... | |
std::ostream & | operator<< (std::ostream &s, MultiPhase &x) |
Function to output a MultiPhase description to a stream. More... | |
Interface * | importInterface (const std::string &infile, const std::string &id, std::vector< 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) |
Create a new kinetics manager. More... | |
Kinetics * | newKineticsMgr (const std::string &model) |
Create a new kinetics manager. More... | |
template<class InputIter , class Vec1 , class Vec2 > | |
static void | _multiply (InputIter begin, InputIter end, const Vec1 &input, Vec2 &output) |
template<class InputIter , class Vec1 , class Vec2 > | |
static void | _incrementSpecies (InputIter begin, InputIter end, const Vec1 &input, Vec2 &output) |
template<class InputIter , class Vec1 , class Vec2 > | |
static void | _decrementSpecies (InputIter begin, InputIter end, const Vec1 &input, Vec2 &output) |
template<class InputIter , class Vec1 , class Vec2 > | |
static void | _incrementReactions (InputIter begin, InputIter end, const Vec1 &input, Vec2 &output) |
template<class InputIter , class Vec1 , class Vec2 > | |
static void | _decrementReactions (InputIter begin, InputIter end, const Vec1 &input, Vec2 &output) |
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) |
Create a new thermo manager instance. More... | |
FlowDevice * | newFlowDevice (const std::string &model) |
Create a FlowDevice object of the specified type. More... | |
ReactorBase * | newReactor (const std::string &model) |
Create a Reactor object of the specified type. More... | |
WallBase * | newWall (const std::string &model) |
Create a Wall object of the specified type. More... | |
Types of Element Constraint Equations | |
There may be several different types of element constraints handled by the equilibrium program and by Cantera in other contexts. These defines are used to assign each constraint to one category. | |
double | getElementWeight (const std::string &ename) |
Get the atomic weight of an element. More... | |
double | getElementWeight (int atomicNumber) |
Get the atomic weight of an element. More... | |
string | getElementSymbol (const std::string &ename) |
Get the symbol for an element. More... | |
string | getElementSymbol (int atomicNumber) |
Get the symbol for an element. More... | |
string | getElementName (const std::string &ename) |
Get the name of an element. More... | |
string | getElementName (int atomicNumber) |
Get the name of an element. More... | |
int | getAtomicNumber (const std::string &ename) |
Get the atomic number for an element. More... | |
int | numElementsDefined () |
Get the number of named elements defined in Cantera. More... | |
int | numIsotopesDefined () |
Get the number of named isotopes defined in Cantera. More... | |
Variables | |
static std::mutex | dir_mutex |
Mutex for input directory access. More... | |
static std::mutex | app_mutex |
Mutex for creating singletons within the application object. More... | |
static std::mutex | xml_mutex |
Mutex for controlling access to XML file storage. More... | |
static std::mutex | msg_mutex |
Mutex for access to string messages. More... | |
static const char * | stars = "***********************************************************************\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 const double | USEDBEFORE = -1 |
static char | pprefix [20] = " --- vcs_inest: " |
int | vcs_timing_print_lvl = 1 |
Global hook for turning on and off time printing. More... | |
const doublereal | DampFactor = sqrt(2.0) |
const size_t | NDAMP = 7 |
static struct atomicWeightData | atomicWeightTable [] |
atomicWeightTable is a vector containing the atomic weights database. More... | |
static struct isotopeWeightData | isotopeWeightTable [] |
isotopeWeightTable is a vector containing the atomic weights database. More... | |
const doublereal | T_c = 647.096 |
Critical Temperature value (kelvin) More... | |
static const doublereal | P_c = 22.064E6 |
Critical Pressure (Pascals) More... | |
const doublereal | Rho_c = 322. |
Value of the Density at the critical point (kg m-3) More... | |
static const doublereal | M_water = 18.015268 |
Molecular Weight of water that is consistent with the paper (kg kmol-1) More... | |
static const doublereal | Rgas = 8.314371E3 |
Gas constant that is quoted in the paper. More... | |
const int | DeltaDegree = 6 |
static const doublereal | Min_C_Internal = 0.001 |
Constant to compare dimensionless heat capacities against zero. More... | |
const double | Pi = 3.14159265358979323846 |
Pi. More... | |
const int | INVALID_RXN = 0 |
const int | NONE = 0 |
const int | cDirect = 0 |
const int | cKrylov = 1 |
const int | FourierFuncType = 1 |
const int | PolyFuncType = 2 |
const int | ArrheniusFuncType = 3 |
const int | GaussianFuncType = 4 |
const int | SumFuncType = 20 |
const int | DiffFuncType = 25 |
const int | ProdFuncType = 30 |
const int | RatioFuncType = 40 |
const int | PeriodicFuncType = 50 |
const int | CompositeFuncType = 60 |
const int | TimesConstantFuncType = 70 |
const int | PlusConstantFuncType = 80 |
const int | SinFuncType = 100 |
const int | CosFuncType = 102 |
const int | ExpFuncType = 104 |
const int | PowFuncType = 106 |
const int | ConstFuncType = 110 |
const int | TabulatedFuncType = 120 |
const int | DIAG = 1 |
const int | DENSE = 2 |
const int | NOJAC = 4 |
const int | JAC = 8 |
const int | GMRES = 16 |
const int | BAND = 32 |
const int | c_NONE = 0 |
const int | c_GE_ZERO = 1 |
const int | c_GT_ZERO = 2 |
const int | c_LE_ZERO = -1 |
const int | c_LT_ZERO = -2 |
const int | LeftInlet = 1 |
const int | RightInlet = -1 |
const int | cFlowType = 50 |
const int | cFreeFlow = 51 |
const int | cAxisymmetricStagnationFlow = 52 |
const int | cConnectorType = 100 |
const int | cSurfType = 102 |
const int | cInletType = 104 |
const int | cSymmType = 105 |
const int | cOutletType = 106 |
const int | cEmptyType = 107 |
const int | cOutletResType = 108 |
const int | cPorousType = 109 |
const size_t | c_offset_U = 0 |
const size_t | c_offset_V = 1 |
const size_t | c_offset_T = 2 |
const size_t | c_offset_L = 3 |
const size_t | c_offset_E = 4 |
const size_t | c_offset_Y = 5 |
const int | cEST_solvent = 0 |
Electrolyte species type. More... | |
const int | cEST_chargedSpecies = 1 |
const int | cEST_weakAcidAssociated = 2 |
const int | cEST_strongAcidAssociated = 3 |
const int | cEST_polarNeutral = 4 |
const int | cEST_nonpolarNeutral = 5 |
const int | PHSCALE_PITZER = 0 |
Scale to be used for the output of single-ion activity coefficients is that used by Pitzer. More... | |
const int | PHSCALE_NBS = 1 |
Scale to be used for evaluation of single-ion activity coefficients is that used by the NBS standard for evaluation of the pH variable. More... | |
const VelocityBasis | VB_MASSAVG = -1 |
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 |
Magic numbers. More... | |
const int | PressureController_Type = 2 |
const int | Valve_Type = 3 |
const int | ReservoirType = 1 |
Magic numbers. More... | |
const int | ReactorType = 2 |
const int | FlowReactorType = 3 |
const int | ConstPressureReactorType = 4 |
const int | IdealGasReactorType = 5 |
const int | IdealGasConstPressureReactorType = 6 |
const int | WallType = 1 |
Magic numbers. More... | |
Defined Constants | |
These constants are defined by CODATA to have a particular value. https://physics.nist.gov/cuu/Constants/index.html | |
const double | Avogadro = 6.02214076e26 |
Avogadro's Number \( N_{\mathrm{A}} \) [number/kmol]. More... | |
const double | Boltzmann = 1.380649e-23 |
Boltzmann constant \( k \) [J/K]. More... | |
const double | Planck = 6.62607015e-34 |
Planck constant \( h \) [J-s]. More... | |
const double | ElectronCharge = 1.602176634e-19 |
Elementary charge \( e \) [C]. More... | |
const double | lightSpeed = 299792458.0 |
Speed of Light in a vacuum \( c \) [m/s]. More... | |
const double | OneAtm = 1.01325e5 |
One atmosphere [Pa]. More... | |
const double | OneBar = 1.0E5 |
One bar [Pa]. More... | |
Measured Constants | |
These constants are measured and reported by CODATA | |
const double | fineStructureConstant = 7.2973525693e-3 |
Fine structure constant \( \alpha \) []. More... | |
const double | ElectronMass = 9.1093837015e-31 |
Electron Mass \( m_e \) [kg]. More... | |
Derived Constants | |
These constants are found from the defined and measured constants | |
const double | Planck_bar = Planck / (2 * Pi) |
Reduced Planck constant \( \hbar \) [m2-kg/s]. More... | |
const double | GasConstant = Avogadro * Boltzmann |
Universal Gas Constant \( R_u \) [J/kmol/K]. More... | |
const double | logGasConstant = std::log(GasConstant) |
const double | GasConst_cal_mol_K = GasConstant / 4184.0 |
Universal gas constant in cal/mol/K. More... | |
const double | logBoltz_Planck = std::log(Boltzmann / Planck) |
log(k_b/h) More... | |
const double | StefanBoltz = Pi * Pi * std::pow(Boltzmann, 4.0) / (60.0 * std::pow(Planck_bar, 3.0) * lightSpeed * lightSpeed) |
Stefan-Boltzmann constant \( \sigma \) [W/m2/K4]. More... | |
const double | Faraday = ElectronCharge * Avogadro |
Faraday constant \( F \) [C/kmol]. More... | |
const double | permeability_0 = 2 * fineStructureConstant * Planck / (ElectronCharge * ElectronCharge * lightSpeed) |
Permeability of free space \( \mu_0 \) [N/A2]. More... | |
const double | epsilon_0 = 1.0 / (lightSpeed * lightSpeed * permeability_0) |
Permittivity of free space \( \varepsilon_0 \) [F/m]. More... | |
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!
Magic numbers
| |
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 | |
Magic numbers
| |
const int | SIMPLE_FALLOFF = 100 |
const int | TROE_FALLOFF = 110 |
const int | SRI_FALLOFF = 112 |
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 | |
enum class | ThermoBasis { mass , molar } |
Differentiate between mole fractions and mass fractions for input mixture composition. More... | |
typedef ThermoPhase | thermo_t |
typedef for the ThermoPhase class More... | |
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... | |
Thermodynamic Equilibrium Constraints | |
Integer numbers representing pairs of thermodynamic variables which are held constant during equilibration. | |
typedef std::map< std::string, double > | compositionMap |
Map connecting a string name with a double. More... | |
typedef std::map< std::string, double > | Composition |
Map from string names to doubles. More... | |
typedef std::vector< double > | vector_fp |
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles. More... | |
typedef std::vector< int > | vector_int |
Vector of ints. More... | |
typedef std::vector< std::vector< size_t > > | grouplist_t |
A grouplist is a vector of groups of species. More... | |
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 |
const double | SmallNumber = 1.e-300 |
smallest number to compare to zero. More... | |
const double | BigNumber = 1.e300 |
largest number to compare to inf. More... | |
const double | MaxExp = 690.775527898 |
largest x such that exp(x) is valid More... | |
const double | Undef = -999.1234 |
Fairly random number to be used to initialize variables against to see if they are subsequently defined. More... | |
const double | Tiny = 1.e-20 |
Small number to compare differences of mole fractions against. More... | |
const size_t | npos = static_cast<size_t>(-1) |
index returned by functions to indicate "no position" More... | |
Namespace for the Cantera kernel.
Namespace for classes implementing zero-dimensional reactor networks.
@file ConstDensityThermo.cpp
Declarations for a Thermo manager for incompressible ThermoPhases (see Thermodynamic Properties and ConstDensityThermo ).
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 82 of file vcs_internal.h.
typedef ThermoPhase thermo_t |
typedef for the ThermoPhase class
Definition at line 1908 of file ThermoPhase.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 32 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 41 of file Integrator.h.
enum ResidEval_Type_Enum |
Differentiates the type of residual evaluations according to functionality.
Definition at line 20 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 25 of file IonsFromNeutralVPSSTP.h.
|
strong |
Differentiate between mole fractions and mass fractions for input mixture composition.
Definition at line 44 of file ThermoPhase.h.
void checkFinite | ( | const double | tmp | ) |
Check to see that a number is finite (not NaN, +Inf or -Inf)
Definition at line 15 of file checkFinite.cpp.
Referenced by ReactorNet::eval(), and ReactorNet::updateState().
void checkFinite | ( | const std::string & | name, |
double * | values, | ||
size_t | N | ||
) |
Check to see that all elements in an array are finite.
Throws an exception if any element is NaN, +Inf, or -Inf
name | Name to be used in the exception message if the check fails |
values | Array of N values to be checked |
N | Number of elements in values |
Definition at line 28 of file checkFinite.cpp.
|
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 42 of file ct2ctml.cpp.
References trimCopy().
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 183 of file ct2ctml.cpp.
References pypath(), trimCopy(), and writelog().
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:
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 19 of file ctml.cpp.
Referenced by Inlet1D::save(), OutletRes1D::save(), Surf1D::save(), ReactingSurf1D::save(), and StFlow::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:
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 40 of file ctml.cpp.
Referenced by Domain1D::save(), and StFlow::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:
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 73 of file ctml.cpp.
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:
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 111 of file ctml.cpp.
References XML_Node::addAttribute().
Referenced by StFlow::save().
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 122 of file ctml.cpp.
References XML_Node::findByAttr(), and XML_Node::parent().
Referenced by 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.
Example:
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 131 of file ctml.cpp.
References XML_Node::hasChild().
Referenced by MixtureFugacityTP::setStateFromXML(), MolalityVPSSTP::setStateFromXML(), SurfPhase::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:
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 139 of file ctml.cpp.
References XML_Node::attrib(), getByTitle(), XML_Node::name(), and XML_Node::value().
void getIntegers | ( | const XML_Node & | node, |
std::map< std::string, int > & | v | ||
) |
Get a vector of integer values from a child element.
Returns a std::map containing a keyed values for child XML_Nodes of the current node with the name, "integer". In the keyed mapping there will be a list of titles vs. values for all of the XML nodes. The integer XML_nodes are expected to be in a particular form, with one value per XML_node.
Example:
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 152 of file ctml.cpp.
References XML_Node::getChildren(), and XML_Node::int_value().
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:
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 164 of file ctml.cpp.
Referenced by DebyeHuckel::initThermoXML(), FixedChemPotSSTP::initThermoXML(), HMWSoln::initThermoXML(), StoichSubstance::initThermoXML(), IdealMolalSoln::initThermoXML(), newConstCpThermoFromXML(), newMu0ThermoFromXML(), newSpecies(), Inlet1D::restore(), OutletRes1D::restore(), Surf1D::restore(), ReactingSurf1D::restore(), StFlow::restore(), ConstDensityThermo::setParametersFromXML(), FixedChemPotSSTP::setParametersFromXML(), LatticePhase::setParametersFromXML(), MetalPhase::setParametersFromXML(), StoichSubstance::setParametersFromXML(), PDSS_ConstVol::setParametersFromXML(), PDSS_HKFT::setParametersFromXML(), EdgePhase::setParametersFromXML(), SurfPhase::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:
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 177 of file ctml.cpp.
Referenced by RedlichKwongMFTP::readXMLPureFluid().
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:
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 212 of file ctml.cpp.
Referenced by StFlow::restore(), and SurfPhase::setStateFromXML().
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:
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 224 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:
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 234 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, |
vector_fp & | v, | ||
const bool | convert = true , |
||
const std::string & | unitsString = "" , |
||
const std::string & | nodeName = "floatArray" |
||
) |
This function reads the current node or a child node of the current node with the default name, "floatArray", with a value field consisting of a comma separated list of floats.
This function will read either the current XML node or a child node to the current XML node, with the name "floatArray". It will have a title attribute, and the body of the XML node will be filled out with a comma separated list of doublereals. Get an array of floats from the XML Node. The argument field is assumed to consist of an arbitrary number of comma separated floats, with an arbitrary amount of white space separating each field. If the node array has an units attribute field, then the units are used to convert the floats, iff convert is true.
Example:
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 256 of file ctml.cpp.
References actEnergyToSI(), XML_Node::attrib(), XML_Node::clear(), fpValueCheck(), XML_Node::getChildren(), XML_Node::name(), npos, Tiny, toSI(), Undef, XML_Node::value(), and writelog().
Referenced by BinarySolutionTabulatedThermo::initThermoXML(), newMu0ThermoFromXML(), newNasa9ThermoFromXML(), newNasaThermoFromXML(), newShomateThermoFromXML(), HMWSoln::readXMLBinarySalt(), RedlichKisterVPSSTP::readXMLBinarySpecies(), RedlichKwongMFTP::readXMLCrossFluid(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsi(), RedlichKwongMFTP::readXMLPureFluid(), HMWSoln::readXMLTheta(), HMWSoln::readXMLZetaCation(), Domain1D::restore(), StFlow::restore(), and PDSS_SSVol::setParametersFromXML().
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 330 of file ctml.cpp.
References getStringArray(), and npos.
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 344 of file ctml.cpp.
References getStringArray(), and npos.
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 362 of file ctml.cpp.
References fpValueCheck(), getStringArray(), Array2D::nColumns(), npos, Array2D::nRows(), and toSI().
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 427 of file ctml.cpp.
References tokenizeString(), and XML_Node::value().
Referenced by checkElectrochemReaction(), formSpeciesXMLNodeList(), getMap(), getMatrixValues(), getPairs(), importKinetics(), and installElements().
|
static |
Return a pointer to the application object.
Definition at line 17 of file global.cpp.
Referenced by _warn_user(), addDirectory(), close_XML_File(), findInputFile(), get_XML_File(), get_XML_from_string(), getDataDirectories(), make_deprecation_warnings_fatal(), setLogger(), suppress_deprecation_warnings(), suppress_thermo_warnings(), thermo_warnings_suppressed(), thread_complete(), warn_deprecated(), writelog_direct(), and writelogendl().
|
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 182 of file global.cpp.
References npos.
Referenced by get_XML_NameID(), and get_XML_Node().
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 15 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().
shared_ptr< Solution > newSolution | ( | const std::string & | infile, |
const std::string & | name = "" , |
||
const std::string & | transport = "" , |
||
const std::vector< shared_ptr< Solution >> & | adjacent = {} |
||
) |
Create and initialize a new Solution manager from an input file.
This constructor wraps newPhase(), newKinetics() and newTransportMgr() routines for initialization.
infile | name of the input file |
name | name of the phase in the file. If this is blank, the first phase in the file is used. |
transport | name of the transport model. |
adjacent | vector containing adjacent solution objects. |
Definition at line 61 of file Solution.cpp.
References Solution::create(), newDefaultTransportMgr(), newKinetics(), newPhase(), and newTransportMgr().
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 34 of file stringUtils.cpp.
Referenced by GasTransport::fitDiffCoeffs(), IonGasTransport::fitDiffCoeffs(), and GasTransport::fitProperties().
std::string stripnonprint | ( | const std::string & | s | ) |
Strip non-printing characters wherever they are.
s | Input string |
Definition at line 49 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 60 of file stringUtils.cpp.
References fpValueCheck(), getValue(), and npos.
Referenced by checkElectrochemReaction(), ThermoPhase::equivalenceRatio(), Phase::findIsomers(), FixedChemPotSSTP::FixedChemPotSSTP(), ThermoPhase::mixtureFraction(), newSpecies(), SurfPhase::setCoveragesByName(), ThermoPhase::setEquivalenceRatio(), Phase::setMassFractionsByName(), ThermoPhase::setMixtureFraction(), MolalityVPSSTP::setMolalitiesByName(), Phase::setMoleFractionsByName(), MultiPhase::setMolesByName(), LatticeSolidPhase::setParametersFromXML(), PDSS_IonsFromNeutral::setParametersFromXML(), and ThermoPhase::stoichAirFuelRatio().
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 124 of file stringUtils.cpp.
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 129 of file stringUtils.cpp.
Referenced by fpValueCheck(), DebyeHuckel::initThermoXML(), MaskellSolidSolnPhase::initThermoXML(), installElements(), newConstCpThermoFromXML(), newMu0ThermoFromXML(), newNasa9ThermoFromXML(), newNasaThermoFromXML(), and newShomateThermoFromXML().
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 138 of file stringUtils.cpp.
References fpValue().
Referenced by Phase::addElement(), XML_Node::fp_value(), getFloatArray(), getMatrixValues(), HMWSoln::initThermoXML(), installElements(), parseCompString(), PDSS_HKFT::setParametersFromXML(), strSItoDbl(), and Units::Units().
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 194 of file stringUtils.cpp.
References npos.
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 220 of file stringUtils.cpp.
References fpValueCheck(), tokenizeString(), and toSI().
Referenced by RedlichKwongMFTP::getCoeff(), and PDSS_HKFT::setParametersFromXML().
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 236 of file stringUtils.cpp.
Referenced by getStringArray(), and strSItoDbl().
size_t copyString | ( | const std::string & | source, |
char * | dest, | ||
size_t | length | ||
) |
Copy the contents of a std::string into a char array of a given length.
If length is less than the size of source, the string will be truncated and the function will return the length of the buffer required to hold source. Otherwise, returns 0.
Definition at line 248 of file stringUtils.cpp.
std::string trimCopy | ( | const std::string & | input | ) |
Trim.
Remove all leading and trailing spaces (with default locale).
Definition at line 260 of file stringUtils.cpp.
Referenced by XML_Node::addValue(), ck2cti(), getAtomicNumber(), getElementName(), getElementSymbol(), getElementWeight(), XML_Reader::parseTag(), pypath(), XML_Reader::readValue(), and Units::Units().
std::string toLowerCopy | ( | const std::string & | input | ) |
Convert to lower case.
Convert the given string to lower case (with default locale).
Definition at line 264 of file stringUtils.cpp.
Referenced by Phase::addSpecies(), Phase::findSpeciesLower(), getAtomicNumber(), RedlichKwongMFTP::getCoeff(), getElementSymbol(), getElementWeight(), KineticsFactory::newKinetics(), newKinetics(), newPhase(), newSpeciesThermoInterpType(), tpx::newSubstance(), RedlichKisterVPSSTP::readXMLBinarySpecies(), RedlichKwongMFTP::readXMLCrossFluid(), and RedlichKwongMFTP::readXMLPureFluid().
bool caseInsensitiveEquals | ( | const std::string & | input, |
const std::string & | test | ||
) |
Case insensitive equality predicate.
Returns true if and only if all elements in both strings are the same when compared case insensitively (with default locale).
Definition at line 268 of file stringUtils.cpp.
Referenced by XML_Node::getChildren(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), MargulesVPSSTP::initThermoXML(), MaskellSolidSolnPhase::initThermoXML(), RedlichKisterVPSSTP::initThermoXML(), RedlichKwongMFTP::initThermoXML(), BinarySolutionTabulatedThermo::initThermoXML(), interp_est(), newSpeciesThermoInterpType(), IdealMolalSoln::setCutoffModel(), DebyeHuckel::setDebyeHuckelModel(), PDSS_HKFT::setParametersFromXML(), PDSS_IonsFromNeutral::setParametersFromXML(), IdealMolalSoln::setStandardConcentrationModel(), IdealSolidSolnPhase::setStandardConcentrationModel(), IdealSolnGasVPSS::setStandardConcentrationModel(), and GasTransportData::validate().
|
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 136 of file xml.cpp.
References npos.
Referenced by XML_Reader::findQuotedString().
Search an XML_Node tree for a named phase XML_Node.
Search for a phase Node matching an id.
root | Starting XML_Node* pointer for the search |
phaseId | id of the phase to search for |
Definition at line 1038 of file xml.cpp.
References XML_Node::children(), XML_Node::id(), XML_Node::name(), and XML_Node::nChildren().
Referenced by ThermoPhase::initThermoFile(), and Phase::setXMLdata().
int _equilflag | ( | const char * | xy | ) |
map property strings to integers
Definition at line 21 of file ChemEquil.cpp.
Referenced by MultiPhase::equilibrate(), and ChemEquil::equilibrate().
double vcs_l2norm | ( | const vector_fp & | vec | ) |
determine the l2 norm of a vector of doubles
vec | vector of doubles |
Definition at line 21 of file vcs_util.cpp.
Referenced by VCS_SOLVE::vcs_phaseStabilityTest().
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 33 of file vcs_util.cpp.
References VCS_SPECIES_ACTIVEBUTZERO, VCS_SPECIES_COMPONENT, VCS_SPECIES_DELETED, VCS_SPECIES_INTERFACIALVOLTAGE, VCS_SPECIES_MAJOR, VCS_SPECIES_MINOR, VCS_SPECIES_STOICHZERO, VCS_SPECIES_ZEROEDMS, VCS_SPECIES_ZEROEDPHASE, and VCS_SPECIES_ZEROEDSS.
Referenced by VCS_SOLVE::vcs_evaluate_speciesType(), and VCS_SOLVE::vcs_RxnStepSizes().
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 91 of file vcs_util.cpp.
Referenced by vcs_VolPhase::setMolesFromVCSCheck(), VCS_SOLVE::vcs_dfe(), and VCS_SOLVE::vcs_report().
|
static |
This function decides whether a phase has charged species or not.
Definition at line 798 of file vcs_VolPhase.cpp.
References Phase::charge(), and Phase::nSpecies().
Referenced by chargeNeutralityElement(), and vcs_VolPhase::transferElementsFM().
|
static |
This utility routine decides whether a Cantera ThermoPhase needs a constraint equation representing the charge neutrality of the phase.
It does this by searching for charged species. If it finds one, and if the phase needs one, then it returns true.
Definition at line 812 of file vcs_VolPhase.cpp.
References ThermoPhase::chargeNeutralityNecessary(), and hasChargedSpecies().
Referenced by vcs_VolPhase::transferElementsFM().
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 48 of file FalloffFactory.cpp.
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 54 of file FalloffFactory.cpp.
Check to ensure that all electrochemical reactions are specified correctly.
This function ensures the user has correctly specified all electrochemical reactions. The routine counts the amount of charge (i.e. number of electron elements specified for each species in each phase) for both reactants and products. If net charge transfer phases during a reaction, the reaction is electrochemical. If not already specified as such, the function defines the reaction as electrochemical, corrects the reaction attributes, and sets beta = 0.5.
p | This is an XML node containing a description of the owning phase for the kinetics object. |
kin | This is a pointer to a kinetics manager class. |
r | This is the reaction node that is being evaluated |
Definition at line 218 of file importKinetics.cpp.
References Phase::charge(), XML_Node::child(), getStringArray(), XML_Node::hasChild(), Kinetics::kineticsSpeciesIndex(), Phase::name(), npos, parseCompString(), Phase::speciesIndex(), Kinetics::speciesPhase(), and XML_Node::value().
Referenced by installReactionArrays().
unique_ptr< Kinetics > newKinetics | ( | std::vector< ThermoPhase * > & | phases, |
const AnyMap & | phaseNode, | ||
const AnyMap & | rootNode = AnyMap() |
||
) |
Create a new kinetics manager, initialize it, and add reactions
phases | Vector of phases containing species which participate in reactions, with the phase where the reactions occur (lowest-dimensional phase) listed first. |
phaseNode | Phase entry for the phase where the reactions occur. This phase definition is used to determine the source of the reactions added to the Kinetics object. |
rootNode | The root node of the file containing the phase definition, which will be treated as the default source for reactions |
Definition at line 55 of file KineticsFactory.cpp.
References addReactions(), AnyMap::getString(), and newKinetics().
Referenced by newSolution().
unique_ptr< Kinetics > newKinetics | ( | std::vector< ThermoPhase * > & | phases, |
const std::string & | filename, | ||
const std::string & | phase_name | ||
) |
Create a new kinetics manager, initialize it, and add reactions
phases | Vector of phases containing species which participate in reactions, with the phase where the reactions occur (lowest-dimensional phase) listed first. |
filename | File containing the phase definition for the phase where the reactions occur. Searches the Cantera data for this file. |
phase_name | The name of the reacting phase in the input file (i.e. the name of the first phase in the phases vector) |
Definition at line 69 of file KineticsFactory.cpp.
References dot(), get_XML_File(), get_XML_NameID(), newKineticsMgr(), npos, and toLowerCopy().
Referenced by newKinetics(), and KineticsFactory::newKinetics().
Add reactions to a Kinetics object
kin | The Kinetics object to be initialized |
phaseNode | Phase entry for the phase where the reactions occur. This phase definition is used to determine the source of the reactions added to the Kinetics object. |
rootNode | The root node of the file containing the phase definition, which will be treated as the default source for reactions |
Definition at line 95 of file KineticsFactory.cpp.
References AnyMap::at(), AnyMap::getBool(), AnyMap::hasKey(), Kinetics::kineticsType(), Kinetics::skipUndeclaredSpecies(), and Kinetics::skipUndeclaredThirdBodies().
Referenced by newKinetics().
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 358 of file Reaction.cpp.
Create a new Reaction object for the reaction defined in rxn_node
Definition at line 1010 of file Reaction.cpp.
Referenced by getReactions(), and installReactionArrays().
Create a new Reaction object using the specified parameters.
Definition at line 1064 of file Reaction.cpp.
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) phasesDefinition at line 1116 of file Reaction.cpp.
References XML_Node::child(), XML_Node::getChildren(), and newReaction().
Create Reaction objects for each item (an AnyMap) in items
.
The species involved in these reactions must exist in the phases associated with the Kinetics object kinetics
.
Definition at line 1125 of file Reaction.cpp.
References AnyValue::asVector().
|
static |
This function calculates a damping factor for the Newton iteration update vector, dxneg, to insure that all site and bulk fractions, x, remain bounded between zero and one.
dxneg[] = negative of the update vector.
The constant "APPROACH" sets the fraction of the distance to the boundary that the step can take. If the full step would not force any fraction outside of 0-1, then Newton's method is allowed to operate normally.
Definition at line 500 of file solveSP.cpp.
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 331 of file BandMatrix.cpp.
References BandMatrix::nRows().
|
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 70 of file CVodesIntegrator.cpp.
References CVodesIntegrator::m_error_message.
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 16 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 function uses the LAPACK routine dgetrf to invert the m xy n matrix.
The factorization has the form
A = P * L * U
where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m > n), and U is upper triangular (upper trapezoidal if m < n).
The system is then solved using the LAPACK routine dgetrs
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 142 of file DenseMatrix.cpp.
Referenced by ChemEquil::equilibrate(), ChemEquil::estimateElementPotentials(), MultiTransport::getMassFluxes(), MultiTransport::getSpeciesFluxes(), solveSP::solveSurfProb(), and VCS_SOLVE::vcs_basopt().
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 211 of file DenseMatrix.cpp.
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} \]
[in] | A | Dense Matrix A with M rows and N columns |
[in] | b | vector b with length N |
[out] | prod | vector prod length = M |
Definition at line 216 of file DenseMatrix.cpp.
Referenced by DustyGasTransport::getMolarFluxes(), MultiPhaseEquil::MultiPhaseEquil(), MultiPhaseEquil::stepComposition(), GasTransport::viscosity(), and IonGasTransport::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} \]
[in] | A | Dense Matrix A with M rows and N columns |
[in] | b | vector b with length N |
[out] | prod | vector prod length = M |
Definition at line 221 of file DenseMatrix.cpp.
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 235 of file DenseMatrix.cpp.
Referenced by HighPressureGasTransport::getMultiDiffCoeffs(), MultiTransport::getMultiDiffCoeffs(), and DustyGasTransport::updateMultiDiffCoeffs().
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 13 of file funcs.cpp.
Referenced by StFlow::_finalize(), and Sim1D::setProfile().
double polyfit | ( | size_t | n, |
size_t | deg, | ||
const double * | x, | ||
const double * | y, | ||
const double * | w, | ||
double * | p | ||
) |
Fits a polynomial function to a set of data points.
Given a collection of n points x and a set of values y of some function evaluated at those points, this function computes the weighted least-squares polynomial fit of degree deg:
\[ f(x) = p[0] + p[1]*x + p[2]*x^2 + \cdots + p[deg]*x^deg \]
n | The number of points at which the function is evaluated | |
deg | The degree of the polynomial fit to be computed. deg <= n - 1. | |
x | Array of points at which the function is evaluated. Length n. | |
y | Array of function values at the points in x. Length n. | |
w | Array of weights. If w == nullptr or w[0] < 0, then all the weights will be set to 1.0. | |
[out] | p | Array of polynomial coefficients, starting with the constant term. Length deg+1. |
Definition at line 14 of file polyfit.cpp.
Referenced by GasTransport::fitDiffCoeffs(), IonGasTransport::fitDiffCoeffs(), GasTransport::fitProperties(), IonGasTransport::init(), and IonFlow::setElectronTransport().
|
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 312 of file DebyeHuckel.cpp.
References caseInsensitiveEquals(), and cEST_solvent.
Referenced by DebyeHuckel::addSpecies().
double getElementWeight | ( | const std::string & | ename | ) |
Get the atomic weight of an element.
Get the atomic weight of an element defined in Cantera by its symbol or by its name. This includes the named isotopes defined in Cantera.
ename | String, name or symbol of the element |
CanteraError | if a match for ename is not found or the element has no stable isotopes, and therefore no standard atomic weight |
Definition at line 207 of file Elements.cpp.
References atomicWeightData::atomicWeight, isotopeWeightData::atomicWeight, atomicWeightTable, isotopeWeightTable, numElementsDefined(), numIsotopesDefined(), toLowerCopy(), and trimCopy().
Referenced by Phase::addElement().
double getElementWeight | ( | int | atomicNumber | ) |
Get the atomic weight of an element.
Get the atomic weight of an element defined in Cantera by its atomic number. The named isotopes cannot be accessed from this function, since the atomic number of the isotopes is the same as the regular element from which they are derived.
atomicNumber | Integer, atomic number of the element |
IndexError | if the passed atomic number less than 1 or larger than the number of elements defined |
CanteraError | if the element has no stable isotopes, and therefore no standard atomic weight |
Definition at line 239 of file Elements.cpp.
References atomicWeightData::atomicWeight, atomicWeightTable, getElementName(), and numElementsDefined().
std::string getElementSymbol | ( | const std::string & | ename | ) |
Get the symbol for an element.
Get the symbol for an element defined in Cantera by its name. This includes the named isotopes defined in Cantera.
ename | String, name of the element |
CanteraError | if a match for ename is not found |
Definition at line 253 of file Elements.cpp.
References atomicWeightTable, isotopeWeightTable, numElementsDefined(), numIsotopesDefined(), atomicWeightData::symbol, isotopeWeightData::symbol, toLowerCopy(), and trimCopy().
std::string getElementSymbol | ( | int | atomicNumber | ) |
Get the symbol for an element.
Get the symbol for an element defined in Cantera by its atomic number. The named isotopes cannot be accessed from this function, since the atomic number of the isotopes is the same as the regular element from which they are derived.
atomicNumber | Integer, atomic number of the element |
IndexError | if the passed atomic number less than 1 or larger than the number of elements defined |
Definition at line 271 of file Elements.cpp.
References atomicWeightTable, numElementsDefined(), and atomicWeightData::symbol.
std::string getElementName | ( | const std::string & | ename | ) |
Get the name of an element.
Get the name of an element defined in Cantera by its symbol. This includes the named isotopes defined in Cantera.
ename | String, symbol for the element |
CanteraError | if a match for ename is not found |
Definition at line 281 of file Elements.cpp.
References atomicWeightTable, atomicWeightData::fullName, isotopeWeightData::fullName, isotopeWeightTable, numElementsDefined(), numIsotopesDefined(), and trimCopy().
std::string getElementName | ( | int | atomicNumber | ) |
Get the name of an element.
Get the name of an element defined in Cantera by its atomic number. The named isotopes cannot be accessed from this function, since the atomic number of the isotopes is the same as the regular element from which they are derived.
atomicNumber | Integer, atomic number of the element |
CanteraError | IndexError if the passed atomic number less than 1 or larger than the number of elements defined |
Definition at line 299 of file Elements.cpp.
References atomicWeightTable, atomicWeightData::fullName, and numElementsDefined().
Referenced by getElementWeight().
int getAtomicNumber | ( | const std::string & | ename | ) |
Get the atomic number for an element.
Get the atomic number of an element defined in Cantera by its symbol or name. This includes the named isotopes included in Cantera.
ename | String, name or symbol of the element |
CanteraError | if a match for ename is not found |
Definition at line 309 of file Elements.cpp.
References isotopeWeightData::atomicNumber, atomicWeightTable, isotopeWeightTable, numElementsDefined(), numIsotopesDefined(), toLowerCopy(), and trimCopy().
int numElementsDefined | ( | ) |
Get the number of named elements defined in Cantera.
This array excludes named isotopes
Definition at line 332 of file Elements.cpp.
References atomicWeightTable.
Referenced by getAtomicNumber(), getElementName(), getElementSymbol(), and getElementWeight().
int numIsotopesDefined | ( | ) |
Get the number of named isotopes defined in Cantera.
This array excludes the named elements
Definition at line 337 of file Elements.cpp.
References isotopeWeightTable.
Referenced by getAtomicNumber(), getElementName(), getElementSymbol(), and getElementWeight().
|
static |
Return the factor overlap.
elnamesVN | |
elemVectorN | |
nElementsN | |
elnamesVI | |
elemVectorI | |
nElementsI |
Definition at line 456 of file IonsFromNeutralVPSSTP.cpp.
Referenced by IonsFromNeutralVPSSTP::initThermo().
Create a new Species object from a 'species' XML_Node.
Definition at line 36 of file Species.cpp.
References XML_Node::attrib(), XML_Node::child(), XML_Node::findByName(), getFloat(), XML_Node::hasChild(), newSpeciesThermoInterpType(), newTransportData(), parseCompString(), and XML_Node::value().
Referenced by getSpecies(), and importPhase().
Create a new Species object from an AnyMap specification.
Definition at line 89 of file Species.cpp.
References AnyMap::getDouble(), AnyMap::hasKey(), newSpeciesThermo(), newTransportData(), and AnyMap::units().
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 125 of file Species.cpp.
References XML_Node::child(), XML_Node::getChildren(), and newSpecies().
Generate Species objects for each item (an AnyMap) in items
.
Definition at line 134 of file Species.cpp.
References AnyValue::asVector(), and newSpecies().
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 30 of file SpeciesThermoFactory.cpp.
Referenced by FixedChemPotSSTP::FixedChemPotSSTP(), 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 55 of file SpeciesThermoFactory.cpp.
|
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 91 of file SpeciesThermoFactory.cpp.
References XML_Node::child(), fpValue(), getFloatArray(), XML_Node::hasAttrib(), NASA, newSpeciesThermoInterpType(), and OneAtm.
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 183 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 278 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 318 of file SpeciesThermoFactory.cpp.
References XML_Node::child(), fpValue(), getFloatArray(), XML_Node::hasAttrib(), XML_Node::hasChild(), XML_Node::name(), 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 399 of file SpeciesThermoFactory.cpp.
References caseInsensitiveEquals(), XML_Node::children(), newConstCpThermoFromXML(), newMu0ThermoFromXML(), newNasa9ThermoFromXML(), newNasaThermoFromXML(), newShomateThermoFromXML(), and toLowerCopy().
Referenced by newConstCpThermoFromXML(), newNasaThermoFromXML(), and newShomateThermoFromXML().
unique_ptr< SpeciesThermoInterpType > newSpeciesThermo | ( | const AnyMap & | thermo_node | ) |
Create a new SpeciesThermoInterpType object using the specified parameters.
thermo_node | An AnyMap specifying the model type (e.g. "NASA") and any model parameters necessary to instantiate the object |
Definition at line 454 of file SpeciesThermoFactory.cpp.
Referenced by newSpecies().
unique_ptr< ThermoPhase > newPhase | ( | AnyMap & | phaseNode, |
const AnyMap & | rootNode = AnyMap() |
||
) |
Create a new ThermoPhase object and initialize it.
phaseNode | The node containing the phase definition (i.e. thermo model, list of species, and initial state) |
rootNode | The root node of the tree containing the phase definition, which will be used as the default location from which to read species definitions. |
Definition at line 112 of file ThermoFactory.cpp.
References newThermoPhase(), and setupPhase().
ThermoPhase * newPhase | ( | const std::string & | infile, |
std::string | id = "" |
||
) |
Create and Initialize a ThermoPhase object from an input file.
For YAML input files, this function uses AnyMap::fromYamlFile() to read the input file, newThermoPhase() to create an empty ThermoPhase of the appropriate type, and setupPhase() to initialize the phase.
For CTI and XML input files, this function uses get_XML_File() to read the input file and newPhase(XML_Node) to create and initialize the phase.
infile | name of the input file |
id | name (id) of the phase in the file. If this is blank, the first phase in the file is used. |
Definition at line 119 of file ThermoFactory.cpp.
References dot(), get_XML_File(), get_XML_NameID(), newThermoPhase(), npos, setupPhase(), and toLowerCopy().
|
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 162 of file ThermoFactory.cpp.
References XML_Node::child(), XML_Node::getChildren(), getStringArray(), and XML_Node::nChildren().
Referenced by importPhase().
void setupPhase | ( | ThermoPhase & | phase, |
AnyMap & | phaseNode, | ||
const AnyMap & | rootNode = AnyMap() |
||
) |
Initialize a ThermoPhase object.
phase | The ThermoPhase object to be initialized |
phaseNode | The node containing the phase definition (i.e. thermo model, list of species, and initial state) |
rootNode | The root node of the tree containing the phase definition, which will be used as the default location from which to read species definitions. |
Definition at line 447 of file ThermoFactory.cpp.
References AnyMap::getBool(), AnyMap::getString(), AnyMap::hasKey(), Phase::ignoreUndefinedElements(), Phase::setName(), Phase::throwUndefinedElements(), and warn_deprecated().
Referenced by ThermoPhase::initThermoFile(), and newPhase().
Add the elements given in an XML_Node tree to the specified phase.
Definition at line 594 of file ThermoFactory.cpp.
References Phase::addElement(), XML_Node::attrib(), XML_Node::child(), ENTROPY298_UNKNOWN, XML_Node::findByAttr(), fpValue(), fpValueCheck(), get_XML_File(), getStringArray(), XML_Node::hasAttrib(), XML_Node::hasChild(), intValue(), and XML_Node::root().
Referenced by importPhase().
Search an XML tree for species data.
This utility routine will search the XML tree for the species named by the string, kname. It will return the XML_Node pointer to the species data for that species. Failures of any kind return the null pointer.
kname | String containing the name of the species. |
phaseSpeciesData | Pointer to the XML speciesData element containing the species data for that phase. |
Definition at line 655 of file ThermoFactory.cpp.
References XML_Node::getChildren(), and XML_Node::name().
doublereal Cantera::Frot | ( | doublereal | tr, |
doublereal | sqtr | ||
) |
The Parker temperature correction to the rotational collision number.
tr | Reduced temperature \( \epsilon/kT \) |
sqtr | square root of tr. |
Definition at line 26 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 177 of file TransportData.cpp.
Referenced by newSpecies().
unique_ptr< TransportData > newTransportData | ( | const AnyMap & | node | ) |
Create a new TransportData object from an AnyMap specification.
Definition at line 190 of file TransportData.cpp.
References AnyMap::getString().
Transport * newTransportMgr | ( | const std::string & | transportModel = "" , |
thermo_t * | thermo = 0 , |
||
int | loglevel = 0 , |
||
int | ndim = -99 |
||
) |
Build a new transport manager using a transport manager that may not be the same as in the phase description and return a base class pointer to it.
model | String name for the transport manager |
thermo | ThermoPhase object |
log_level | log level |
ndim | Number of dimensions for fluxes |
ndim
parameter is unused and will be removed after Cantera 2.5. Definition at line 117 of file TransportFactory.cpp.
References TransportFactory::newTransport().
Referenced by newSolution().
|
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 326 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 348 of file Array.h.
References Array2D::begin(), Array2D::end(), and scale().
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 360 of file Array.h.
References Array2D::begin(), Array2D::end(), and sum_each().
|
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 70 of file utilities.h.
Referenced by MixTransport::updateCond_T(), GasTransport::updateDiff_T(), and GasTransport::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 85 of file utilities.h.
Referenced by MixTransport::updateCond_T(), GasTransport::updateDiff_T(), and GasTransport::updateSpeciesViscosities().
|
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 112 of file utilities.h.
Referenced by IdealSolidSolnPhase::calcDensity(), IdealSolnGasVPSS::calcDensity(), RedlichKwongMFTP::calcDensity(), ChemEquil::equilibrate(), ThermoPhase::initThermoFile(), Phase::moleFractionsToMassFractions(), newKinetics(), newPhase(), 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 135 of file utilities.h.
Referenced by ChemEquil::equilibrate(), ChemEquil::estimateElementPotentials(), Phase::getConcentrations(), SurfPhase::getCp_R(), SurfPhase::getEnthalpy_RT(), SurfPhase::getEntropy_R(), IdealGasPhase::getGibbs_ref(), MixtureFugacityTP::getGibbs_ref(), VPStandardStateTP::getGibbs_ref(), SurfPhase::getGibbs_RT(), DustyGasTransport::getMolarFluxes(), Phase::getMoleFractions(), IdealGasPhase::getPartialMolarCp(), IdealSolnGasVPSS::getPartialMolarCp(), RedlichKwongMFTP::getPartialMolarCp(), IdealGasPhase::getPartialMolarEnthalpies(), IdealSolidSolnPhase::getPartialMolarEnthalpies(), IdealSolnGasVPSS::getPartialMolarEnthalpies(), LatticePhase::getPartialMolarEnthalpies(), RedlichKwongMFTP::getPartialMolarEnthalpies(), IdealGasPhase::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarEntropies(), RedlichKwongMFTP::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarIntEnergies(), RedlichKwongMFTP::getPartialMolarIntEnergies(), ConstDensityThermo::getPureGibbs(), IdealGasPhase::getPureGibbs(), MixtureFugacityTP::getPureGibbs(), VPStandardStateTP::getPureGibbs(), IdealGasPhase::getStandardChemPotentials(), LatticePhase::getStandardChemPotentials(), operator*=(), ReactorNet::registerSensitivityParameter(), Phase::setMassFractions(), Phase::setMoleFractions_NoNorm(), and VCS_SOLVE::vcs_elabcheck().
|
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 169 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 204 of file utilities.h.
References warn_deprecated().
|
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 245 of file utilities.h.
References warn_deprecated().
|
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 282 of file utilities.h.
References warn_deprecated().
|
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 305 of file utilities.h.
References warn_deprecated().
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 347 of file utilities.h.
References warn_deprecated().
|
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 386 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 sum. 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 410 of file utilities.h.
References Tiny, and warn_deprecated().
|
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 438 of file utilities.h.
References Tiny, 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 455 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 467 of file utilities.h.
Referenced by MultiTransport::updateThermal_T().
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 479 of file utilities.h.
Referenced by IonGasTransport::fitDiffCoeffs(), and IonFlow::updateTransport().
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 491 of file utilities.h.
Referenced by GasTransport::fitDiffCoeffs(), IonGasTransport::fitDiffCoeffs(), 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 503 of file utilities.h.
Referenced by GasTransport::fitDiffCoeffs(), and GasTransport::fitProperties().
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 528 of file utilities.h.
Referenced by InterfaceKinetics::buildSurfaceArrhenius(), ThirdBody::efficiency(), parseCompString(), Kinetics::productStoichCoeff(), Kinetics::reactantStoichCoeff(), SurfPhase::setCoveragesByName(), LatticeSolidPhase::setLatticeStoichiometry(), MolalityVPSSTP::setMolalitiesByName(), and MultiPhase::setMolesByName().
|
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 669 of file MultiPhase.h.
References Phase::name(), MultiPhase::nPhases(), MultiPhase::phase(), MultiPhase::phaseMoles(), ThermoPhase::report(), and MultiPhase::updatePhases().
|
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 94 of file Interface.h.
References warn_deprecated().
|
inline |
Create a new kinetics manager.
Definition at line 87 of file KineticsFactory.h.
Referenced by newKinetics().
|
inline |
Create a new kinetics manager.
Definition at line 95 of file KineticsFactory.h.
|
inline |
work | Must be dimensioned equal to greater than 3N |
iwork | Must be dimensioned equal to or greater than N |
Definition at line 407 of file ctlapack.h.
|
inline |
Create a new thermo manager instance.
model | String to look up the model against |
Definition at line 100 of file ThermoFactory.h.
References Factory< T, Args >::create(), and ThermoFactory::factory().
Referenced by newPhase().
|
inline |
Create a FlowDevice object of the specified type.
Definition at line 68 of file FlowDeviceFactory.h.
|
inline |
Create a Reactor object of the specified type.
Definition at line 68 of file ReactorFactory.h.
|
inline |
Create a Wall object of the specified type.
Definition at line 68 of file WallFactory.h.
|
static |
Mutex for input directory access.
Definition at line 33 of file application.cpp.
Referenced by Application::addDataDirectory(), and Application::findInputFile().
|
static |
Mutex for creating singletons within the application object.
Definition at line 36 of file application.cpp.
Referenced by Application::ApplicationDestroy(), and Application::Instance().
|
static |
Mutex for controlling access to XML file storage.
Definition at line 39 of file application.cpp.
Referenced by Application::close_XML_File(), Application::get_XML_File(), and Application::get_XML_from_string().
|
static |
Mutex for access to string messages.
Definition at line 101 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 15 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 22 of file vcs_solve.cpp.
Referenced by VCS_SOLVE::disableTiming(), and VCS_SOLVE::VCS_SOLVE().
|
static |
atomicWeightTable is a vector containing the atomic weights database.
atomicWeightTable[] is a static variable with scope limited to this file. It can only be referenced via the functions in this file.
The size of the table is given by the initial instantiation.
Definition at line 1 of file Elements.cpp.
Referenced by getAtomicNumber(), getElementName(), getElementSymbol(), getElementWeight(), and numElementsDefined().
|
static |
isotopeWeightTable is a vector containing the atomic weights database.
isotopeWeightTable[] is a static function with scope limited to this file. It can only be referenced via the functions in this file.
The size of the table is given by the initial instantiation.
Definition at line 1 of file Elements.cpp.
Referenced by getAtomicNumber(), getElementName(), getElementSymbol(), getElementWeight(), and numIsotopesDefined().
const doublereal T_c = 647.096 |
Critical Temperature value (kelvin)
Definition at line 20 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::calcDim(), WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::densSpinodalSteam(), WaterPropsIAPWS::densSpinodalWater(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::enthalpy(), WaterPropsIAPWS::Gibbs(), WaterPropsIAPWS::helmholtzFE(), WaterPropsIAPWS::intEnergy(), WaterPropsIAPWS::pressure(), WaterPropsIAPWS::psat(), and WaterPropsIAPWS::temperature().
|
static |
Critical Pressure (Pascals)
Definition at line 22 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::density(), and WaterPropsIAPWS::psat().
const doublereal Rho_c = 322. |
Value of the Density at the critical point (kg m-3)
Definition at line 24 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::calcDim(), WaterPropsIAPWS::density(), WaterPropsIAPWS::densSpinodalSteam(), WaterPropsIAPWS::densSpinodalWater(), WaterPropsIAPWS::isothermalCompressibility(), WaterPropsIAPWS::molarVolume(), and WaterPropsIAPWS::pressure().
|
static |
Molecular Weight of water that is consistent with the paper (kg kmol-1)
Definition at line 26 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::molarVolume(), and WaterPropsIAPWS::pressure().
|
static |
Gas constant that is quoted in the paper.
Definition at line 35 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::cp(), WaterPropsIAPWS::cv(), WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::enthalpy(), WaterPropsIAPWS::entropy(), WaterPropsIAPWS::Gibbs(), WaterPropsIAPWS::helmholtzFE(), WaterPropsIAPWS::intEnergy(), and WaterPropsIAPWS::pressure().
|
static |
Constant to compare dimensionless heat capacities against zero.
Definition at line 481 of file MultiTransport.cpp.
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 32 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), 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 38 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), 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 44 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), 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 52 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), 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 58 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), 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 66 of file reaction_defs.h.
Referenced by GasKinetics::addReaction(), 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 74 of file reaction_defs.h.
const int INTERFACE_RXN = 20 |
A reaction occurring on an interface, e.g a surface or edge.
Definition at line 77 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 83 of file reaction_defs.h.
Referenced by InterfaceKinetics::addReaction().
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 90 of file reaction_defs.h.
Referenced by InterfaceKinetics::addReaction().
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 97 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 105 of file reaction_defs.h.
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 112 of file reaction_defs.h.
Referenced by InterfaceKinetics::addReaction().
const int cEST_solvent = 0 |
Electrolyte species type.
Definition at line 18 of file electrolytes.h.
Referenced by DebyeHuckel::addSpecies(), and interp_est().
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 627 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 652 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 26 of file ThermoPhase.h.
Referenced by ThermoPhase::activityConvention().
const int cAC_CONVENTION_MOLALITY = 1 |
Standard state uses the molality convention.
Definition at line 28 of file ThermoPhase.h.
Referenced by MolalityVPSSTP::activityConvention().
const int cSS_CONVENTION_TEMPERATURE = 0 |
Standard state uses the molar convention.
Definition at line 36 of file ThermoPhase.h.
Referenced by MixtureFugacityTP::standardStateConvention().
const int cSS_CONVENTION_VPSS = 1 |
Standard state uses the molality convention.
Definition at line 38 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 40 of file ThermoPhase.h.
Referenced by importPhase(), and LatticeSolidPhase::standardStateConvention().
const VelocityBasis VB_MASSAVG = -1 |
Diffusion velocities are based on the mass averaged velocity.
Definition at line 64 of file TransportBase.h.
const VelocityBasis VB_MOLEAVG = -2 |
Diffusion velocities are based on the mole averaged velocities.
Definition at line 66 of file TransportBase.h.
const VelocityBasis VB_SPECIES_0 = 0 |
Diffusion velocities are based on the relative motion wrt species 0.
Definition at line 68 of file TransportBase.h.
const VelocityBasis VB_SPECIES_1 = 1 |
Diffusion velocities are based on the relative motion wrt species 1.
Definition at line 70 of file TransportBase.h.
const VelocityBasis VB_SPECIES_2 = 2 |
Diffusion velocities are based on the relative motion wrt species 2.
Definition at line 72 of file TransportBase.h.
const VelocityBasis VB_SPECIES_3 = 3 |
Diffusion velocities are based on the relative motion wrt species 3.
Definition at line 74 of file TransportBase.h.
const int MFC_Type = 1 |
Magic numbers.
Definition at line 21 of file FlowDevice.h.
const int ReservoirType = 1 |
Magic numbers.
Definition at line 22 of file ReactorBase.h.
const int WallType = 1 |