Cantera  3.2.0a4
Loading...
Searching...
No Matches
Transport.cpp
Go to the documentation of this file.
1/**
2 * @file Transport.cpp
3 * Mixture-averaged transport properties for ideal gas mixtures.
4 */
5
6// This file is part of Cantera. See License.txt in the top-level directory or
7// at https://cantera.org/license.txt for license and copyright information.
8
10#include "cantera/base/AnyMap.h"
12
13namespace Cantera
14{
15
16shared_ptr<Transport> Transport::clone(shared_ptr<ThermoPhase> thermo) const
17{
19}
20
21void Transport::checkSpeciesIndex(size_t k) const
22{
23 if (k >= m_nsp) {
24 throw IndexError("Transport::checkSpeciesIndex", "species", k, m_nsp);
25 }
26}
27
29{
30 if (m_nsp > kk) {
31 throw ArraySizeError("Transport::checkSpeciesArraySize", kk, m_nsp);
32 }
33}
34
36{
37 AnyMap out;
39 if (name != "") {
40 out["transport"] = name;
41 }
42 return out;
43}
44
45}
Header file defining class TransportFactory (see TransportFactory)
Headers for the Transport object, which is the virtual base class for all transport property evaluato...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:431
Array size error.
string canonicalize(const string &name)
Get the canonical name registered for a type.
Definition FactoryBase.h:94
An array index is out of range.
static TransportFactory * factory()
Return a pointer to a TransportFactory instance.
void checkSpeciesIndex(size_t k) const
Check that the specified species index is in range.
Definition Transport.cpp:21
virtual string transportModel() const
Identifies the model represented by this Transport object.
Definition Transport.h:101
AnyMap parameters() const
Return the parameters for a phase definition which are needed to reconstruct an identical object usin...
Definition Transport.cpp:35
size_t m_nsp
Number of species in the phase.
Definition Transport.h:452
shared_ptr< Transport > clone(shared_ptr< ThermoPhase > thermo) const
Create a new Transport object using the same transport model and species transport properties as this...
Definition Transport.cpp:16
ThermoPhase & thermo()
Phase object.
Definition Transport.h:111
void checkSpeciesArraySize(size_t kk) const
Check that an array size is at least m_nsp.
Definition Transport.cpp:28
shared_ptr< Transport > newTransport(shared_ptr< ThermoPhase > thermo, const string &model)
Create a new Transport instance.
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595