37 addAlias(
"unity-Lewis-number",
"UnityLewis");
41 addAlias(
"mixture-averaged-CK",
"CK_Mix");
45 addAlias(
"multicomponent-CK",
"CK_Multi");
66 if (transportModel !=
"DustyGas" &&
canonicalize(transportModel) ==
"none") {
67 return create(transportModel);
71 "Valid phase definition required for initialization of "
72 "new '{}' object", transportModel);
79 if (transportModel ==
"DustyGas") {
82 gastr->
init(phase, 0, log_level);
86 tr =
create(transportModel);
87 int mode =
m_CK_mode[transportModel] ? CK_Mode : 0;
88 tr->
init(phase, mode, log_level);
96 std::string transportModel =
"None";
99 if (input.
hasKey(
"transport")) {
100 transportModel = input[
"transport"].asString();
101 }
else if (phaseNode.
hasChild(
"transport")) {
102 transportModel = phaseNode.
child(
"transport").
attrib(
"model");
Headers for the DustyGasTransport object, which models transport properties in porous media using the...
Interface for class HighPressureGasTransport.
Headers for the MixTransport object, which models transport properties in ideal gas solutions using a...
Interface for class MultiTransport.
Header file defining class TransportFactory (see TransportFactory)
Headers for the UnityLewisTransport object, which models transport properties in ideal gas solutions ...
Header file defining class WaterTransport.
A map of string keys to values whose type can vary at runtime.
bool hasKey(const std::string &key) const
Returns true if the map contains an item named key.
Base class for exceptions thrown by Cantera classes.
Class DustyGasTransport implements the Dusty Gas model for transport in porous media.
void initialize(ThermoPhase *phase, Transport *gastr)
Initialization routine called by TransportFactory.
std::string canonicalize(const std::string &name)
Get the canonical name registered for a type.
Transport * create(const std::string &name, Args... args)
Create an object using the object construction function corresponding to "name" and the provided cons...
void addAlias(const std::string &original, const std::string &alias)
Add an alias for an existing registered type.
void reg(const std::string &name, std::function< Transport *(Args...)> f)
Register a new object construction function.
Class MultiTransport implements transport properties for high pressure gas mixtures.
Class IonGasTransport implements Stockmayer-(n,6,4) model for transport of ions.
Class MixTransport implements mixture-averaged transport properties for ideal gas mixtures.
Class MultiTransport implements multicomponent transport properties for ideal gas mixtures.
XML_Node & xml() const
Returns a const reference to the XML_Node that describes the phase.
void saveState(vector_fp &state) const
Save the current internal state of the phase.
void restoreState(const vector_fp &state)
Restore a state saved on a previous call to saveState.
Base class for a phase with thermodynamic properties.
const AnyMap & input() const
Access input data associated with the phase description.
Factory class for creating new instances of classes derived from Transport.
static TransportFactory * s_factory
Static instance of the factor -> This is the only instance of this object allowed.
virtual void deleteFactory()
Deletes the statically allocated factory instance.
static TransportFactory * factory()
Return a pointer to a TransportFactory instance.
std::map< std::string, bool > m_CK_mode
Models included in this map are initialized in CK compatibility mode.
virtual Transport * newTransport(const std::string &model, ThermoPhase *thermo, int log_level=0)
Build a new transport manager using a transport manager that may not be the same as in the phase desc...
static std::mutex transport_mutex
Static instance of the mutex used to ensure the proper reading of the transport database.
TransportFactory()
The constructor is private; use static method factory() to get a pointer to a factory instance.
Base class for transport property managers.
virtual void init(ThermoPhase *thermo, int mode=0, int log_level=0)
Initialize a transport manager.
Class UnityLewisTransport implements the unity Lewis number approximation for the mixture-averaged sp...
Transport Parameters for pure water.
Class XML_Node is a tree-based representation of the contents of an XML file.
std::string attrib(const std::string &attr) const
Function returns the value of an attribute.
bool hasChild(const std::string &ch) const
Tests whether the current node has a child node with a particular name.
XML_Node & child(const size_t n) const
Return a changeable reference to the n'th child of the current node.
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data.
Transport * newDefaultTransportMgr(ThermoPhase *thermo, int loglevel=0)
Create a new transport manager instance.
Namespace for the Cantera kernel.
Transport * newTransportMgr(const std::string &model="", ThermoPhase *thermo=0, int log_level=0)
Build a new transport manager using a transport manager that may not be the same as in the phase desc...
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Contains declarations for string manipulation functions within Cantera.
Various templated functions that carry out common vector operations (see Templated Utility Functions)...