14 GasTransportData::GasTransportData()
19 , rotational_relaxation(0.0)
20 , acentric_factor(0.0)
21 , dispersion_coefficient(0.0)
22 , quadrupole_polarizability(0.0)
26 GasTransportData::GasTransportData(
27 const std::string& geometry_,
28 double diameter_,
double well_depth_,
double dipole_,
29 double polarizability_,
double rot_relax,
double acentric,
30 double dispersion,
double quad_polar)
33 , well_depth(well_depth_)
35 , polarizability(polarizability_)
36 , rotational_relaxation(rot_relax)
37 , acentric_factor(acentric)
38 , dispersion_coefficient(dispersion)
39 , quadrupole_polarizability(quad_polar)
44 const std::string& geometry_,
45 double diameter_,
double well_depth_,
double dipole_,
46 double polarizability_,
double rot_relax,
double acentric,
47 double dispersion,
double quad_polar)
65 nAtoms += elem.second;
72 "invalid geometry for species '{}'. 'atom' specified, but " 73 "species contains multiple atoms.", sp.
name);
78 "invalid geometry for species '{}'. 'linear' specified, but " 79 "species does not contain multiple atoms.", sp.
name);
81 }
else if (
geometry ==
"nonlinear") {
84 "invalid geometry for species '{}'. 'nonlinear' specified, but " 85 "species only contains {} atoms.", sp.
name, nAtoms);
89 "invalid geometry for species '{}': '{}'.", sp.
name,
geometry);
94 "negative well depth for species '{}'.", sp.
name);
99 "negative or zero diameter for species '{}'.", sp.
name);
104 "negative dipole moment for species '{}'.", sp.
name);
109 "negative polarizability for species '{}'.", sp.
name);
114 "negative rotation relaxation number for species '{}'.", sp.
name);
119 "negative dispersion coefficient for species '{}'.", sp.
name);
124 "negative quadrupole polarizability for species '{}'.", sp.
name);
130 std::string geometry, dummy;
131 getString(tr_node,
"geometry", geometry, dummy);
133 double diam =
getFloat(tr_node,
"LJ_diameter");
134 double welldepth =
getFloat(tr_node,
"LJ_welldepth");
144 double acentric = 0.0;
147 double dispersion = 0.0;
154 rot, acentric, dispersion, quad);
159 std::string model = transport_node[
"model"];
160 if (model ==
"gas_transport") {
161 auto tr = make_shared<GasTransportData>();
162 setupGasTransportData(*tr, transport_node);
166 return make_shared<TransportData>();
Transport data for a single gas-phase species which can be used in mixture-averaged or multicomponent...
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data...
double quadrupole_polarizability
quadrupole. Default 0.0.
void setCustomaryUnits(const std::string &geometry, double diameter, double well_depth, double dipole=0.0, double polarizability=0.0, double rot_relax=0.0, double acentric=0.0, double dispersion=0.0, double quad_polar=0.0)
Set the parameters using "customary" units: diameter in Angstroms, well depth in Kelvin, dipole in Debye, and polarizability in Angstroms^3.
Class XML_Node is a tree-based representation of the contents of an XML file.
double rotational_relaxation
The rotational relaxation number (the number of collisions it takes to equilibrate the rotational deg...
double well_depth
The Lennard-Jones well depth [J].
virtual void validate(const Species &species)
Check transport data for invalid parameters such as a geometry inconsistent with the atomic compositi...
std::string name
The name of the species.
double diameter
The Lennard-Jones collision diameter [m].
double dispersion_coefficient
dispersion normalized by e^2. [m^5] Default 0.0.
bool caseInsensitiveEquals(const std::string &input, const std::string &test)
Case insensitive equality predicate.
Base class for exceptions thrown by Cantera classes.
void getString(const XML_Node &node, const std::string &titleString, std::string &valueString, std::string &typeString)
This function reads a child node with the name string with a specific title attribute named titleStri...
double dipole
The permanent dipole moment of the molecule [Coulomb-m]. Default 0.0.
compositionMap composition
The elemental composition of the species.
Contains declarations for string manipulation functions within Cantera.
doublereal getFloat(const XML_Node &parent, const std::string &name, const std::string &type)
Get a floating-point value from a child element.
std::string geometry
A string specifying the molecular geometry.
Contains data about a single chemical species.
double polarizability
The polarizability of the molecule [m^3]. Default 0.0.
double acentric_factor
Pitzer's acentric factor [dimensionless]. Default 0.0.
Declaration for class Cantera::Species.
const doublereal lightSpeed
Speed of Light (m/s).
Namespace for the Cantera kernel.
const doublereal Boltzmann
Boltzmann's constant [J/K].
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
shared_ptr< TransportData > newTransportData(const XML_Node &transport_node)
Create a new TransportData object from a 'transport' XML_Node.
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.