14 GasTransportData::GasTransportData()
19 , rotational_relaxation(0.0)
20 , acentric_factor(0.0)
24 GasTransportData::GasTransportData(
25 const std::string& geometry_,
26 double diameter_,
double well_depth_,
double dipole_,
27 double polarizability_,
double rot_relax,
double acentric)
30 , well_depth(well_depth_)
32 , polarizability(polarizability_)
33 , rotational_relaxation(rot_relax)
34 , acentric_factor(acentric)
39 const std::string& geometry_,
40 double diameter_,
double well_depth_,
double dipole_,
41 double polarizability_,
double rot_relax,
double acentric)
56 if (!ba::iequals(elem.first,
"E")) {
57 nAtoms += elem.second;
64 "invalid geometry for species '{}'. 'atom' specified, but " 65 "species contains multiple atoms.", sp.
name);
70 "invalid geometry for species '{}'. 'linear' specified, but " 71 "species does not contain multiple atoms.", sp.
name);
73 }
else if (
geometry ==
"nonlinear") {
76 "invalid geometry for species '{}'. 'nonlinear' specified, but " 77 "species only contains {} atoms.", sp.
name, nAtoms);
81 "invalid geometry for species '{}': '{}'.", sp.
name,
geometry);
86 "negative well depth for species '{}'.", sp.
name);
91 "negative or zero diameter for species '{}'.", sp.
name);
96 "negative dipole moment for species '{}'.", sp.
name);
101 "negative polarizability for species '{}'.", sp.
name);
106 "negative rotation relaxation number for species '{}'.", sp.
name);
112 std::string geometry, dummy;
113 getString(tr_node,
"geometry", geometry, dummy);
115 double diam =
getFloat(tr_node,
"LJ_diameter");
116 double welldepth =
getFloat(tr_node,
"LJ_welldepth");
126 double acentric = 0.0;
135 std::string model = transport_node[
"model"];
136 if (model ==
"gas_transport") {
137 auto tr = make_shared<GasTransportData>();
138 setupGasTransportData(*tr, transport_node);
142 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...
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].
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.
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)
Set the parameters using "customary" units: diameter in Angstroms, well depth in Kelvin, dipole in Debye, and polarizability in Angstroms^3.
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.