11 GasTransportData::GasTransportData()
16 , rotational_relaxation(0.0)
17 , acentric_factor(0.0)
21 GasTransportData::GasTransportData(
22 const std::string& geometry_,
23 double diameter_,
double well_depth_,
double dipole_,
24 double polarizability_,
double rot_relax,
double acentric)
27 , well_depth(well_depth_)
29 , polarizability(polarizability_)
30 , rotational_relaxation(rot_relax)
31 , acentric_factor(acentric)
36 const std::string& geometry_,
37 double diameter_,
double well_depth_,
double dipole_,
38 double polarizability_,
double rot_relax,
double acentric)
52 for (compositionMap::const_iterator iter = sp.
composition.begin();
55 nAtoms += iter->second;
61 "invalid geometry for species '" + sp.
name +
"'. 'atom' "
62 "specified, but species contains multiple atoms.");
67 "invalid geometry for species '" + sp.
name +
"'. 'linear'"
68 " specified, but species only contains one atom.");
70 }
else if (
geometry ==
"nonlinear") {
73 "invalid geometry for species '" + sp.
name +
"'. 'nonlinear'"
74 " specified, but species only contains " +
fp2str(nAtoms) +
79 "invalid geometry for species '" + sp.
name +
"': '" +
85 "negative well depth for species '" + sp.
name +
"'.");
90 "negative or zero diameter for species '" + sp.
name +
"'.");
95 "negative dipole moment for species '" + sp.
name +
"'.");
100 "negative polarizability for species '" + sp.
name +
"'.");
105 "negative rotation relaxation number for species '" + sp.
name +
"'");
111 std::string geometry, dummy;
112 getString(tr_node,
"geometry", geometry, dummy);
114 double diam =
getFloat(tr_node,
"LJ_diameter");
115 double welldepth =
getFloat(tr_node,
"LJ_welldepth");
125 double acentric = 0.0;
134 std::string model = transport_node[
"model"];
135 if (model ==
"gas_transport") {
137 setupGasTransportData(*tr, transport_node);
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 transport data for a single species.
std::string fp2str(const double x, const std::string &fmt)
Convert a double into a c++ string.
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).
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.