Cantera  2.5.1
TransportData.h
Go to the documentation of this file.
1 //! @file TransportData.h
2 
3 // This file is part of Cantera. See License.txt in the top-level directory or
4 // at https://cantera.org/license.txt for license and copyright information.
5 
6 #ifndef CT_TRANSPORTDATA_H
7 #define CT_TRANSPORTDATA_H
8 
9 #include "cantera/base/ct_defs.h"
10 #include "cantera/base/AnyMap.h"
11 
12 namespace Cantera
13 {
14 
15 class Species;
16 class XML_Node;
17 
18 //! Base class for transport data for a single species
20 {
21 public:
22  TransportData() {}
23  virtual ~TransportData() {}
24 
25  virtual void validate(const Species& species) {}
26 
27  //! Input data used for specific models
29 };
30 
31 //! Transport data for a single gas-phase species which can be used in
32 //! mixture-averaged or multicomponent transport models.
34 {
35 public:
37 
38  //! Construct a GasTransportData object using MKS units for all parameters.
39  GasTransportData(const std::string& geometry, double diameter,
40  double well_depth, double dipole=0.0,
41  double polarizability=0.0, double rot_relax=0.0,
42  double acentric=0.0, double dispersion=0.0,
43  double quad_polar=0.0);
44 
45  //! Set the parameters using "customary" units: diameter in Angstroms, well
46  //! depth in Kelvin, dipole in Debye, and polarizability in Angstroms^3.
47  //! These are the units used in in CK-style input files.
48  void setCustomaryUnits(const std::string& geometry, double diameter,
49  double well_depth, double dipole=0.0,
50  double polarizability=0.0, double rot_relax=0.0,
51  double acentric=0.0, double dispersion=0.0,
52  double quad_polar=0.0);
53 
54  //! Check transport data for invalid parameters such as a geometry
55  //! inconsistent with the atomic composition, non-positive diameter, or
56  //! negative values for well depth, dipole, polarizability, or
57  //! rotational relaxation number.
58  virtual void validate(const Species& species);
59 
60  //! A string specifying the molecular geometry. One of `atom`, `linear`, or
61  //! `nonlinear`.
62  std::string geometry;
63 
64  //! The Lennard-Jones collision diameter [m]
65  double diameter;
66 
67  //! The Lennard-Jones well depth [J]
68  double well_depth;
69 
70  //! The permanent dipole moment of the molecule [Coulomb-m]. Default 0.0.
71  double dipole;
72 
73  //! The polarizability of the molecule [m^3]. Default 0.0.
75 
76  //! The rotational relaxation number (the number of collisions it takes to
77  //! equilibrate the rotational degrees of freedom with the temperature).
78  //! Default 0.0.
80 
81  //! Pitzer's acentric factor [dimensionless]. Default 0.0.
83 
84  //! dispersion normalized by e^2. [m^5] Default 0.0.
86 
87  //! quadrupole. Default 0.0.
89 };
90 
91 //! Create a new TransportData object from a 'transport' XML_Node.
92 //!
93 //! @deprecated The XML input format is deprecated and will be removed in
94 //! Cantera 3.0.
95 shared_ptr<TransportData> newTransportData(const XML_Node& transport_node);
96 
97 //! Create a new TransportData object from an AnyMap specification
98 unique_ptr<TransportData> newTransportData(const AnyMap& node);
99 
100 }
101 
102 #endif
A map of string keys to values whose type can vary at runtime.
Definition: AnyMap.h:360
Transport data for a single gas-phase species which can be used in mixture-averaged or multicomponent...
Definition: TransportData.h:34
double polarizability
The polarizability of the molecule [m^3]. Default 0.0.
Definition: TransportData.h:74
std::string geometry
A string specifying the molecular geometry.
Definition: TransportData.h:62
double diameter
The Lennard-Jones collision diameter [m].
Definition: TransportData.h:65
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,...
double acentric_factor
Pitzer's acentric factor [dimensionless]. Default 0.0.
Definition: TransportData.h:82
double quadrupole_polarizability
quadrupole. Default 0.0.
Definition: TransportData.h:88
double rotational_relaxation
The rotational relaxation number (the number of collisions it takes to equilibrate the rotational deg...
Definition: TransportData.h:79
double dispersion_coefficient
dispersion normalized by e^2. [m^5] Default 0.0.
Definition: TransportData.h:85
double dipole
The permanent dipole moment of the molecule [Coulomb-m]. Default 0.0.
Definition: TransportData.h:71
double well_depth
The Lennard-Jones well depth [J].
Definition: TransportData.h:68
virtual void validate(const Species &species)
Check transport data for invalid parameters such as a geometry inconsistent with the atomic compositi...
Contains data about a single chemical species.
Definition: Species.h:25
Base class for transport data for a single species.
Definition: TransportData.h:20
AnyMap input
Input data used for specific models.
Definition: TransportData.h:28
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:104
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:264
shared_ptr< TransportData > newTransportData(const XML_Node &transport_node)
Create a new TransportData object from a 'transport' XML_Node.