Cantera  3.1.0
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
16void Transport::checkSpeciesIndex(size_t k) const
17{
18 if (k >= m_nsp) {
19 throw IndexError("Transport::checkSpeciesIndex", "species", k, m_nsp-1);
20 }
21}
22
24{
25 if (m_nsp > kk) {
26 throw ArraySizeError("Transport::checkSpeciesArraySize", kk, m_nsp);
27 }
28}
29
31{
32 AnyMap out;
34 if (name != "") {
35 out["transport"] = name;
36 }
37 return out;
38}
39
40}
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:16
virtual string transportModel() const
Identifies the model represented by this Transport object.
Definition Transport.h:93
AnyMap parameters() const
Return the parameters for a phase definition which are needed to reconstruct an identical object usin...
Definition Transport.cpp:30
size_t m_nsp
Number of species.
Definition Transport.h:440
void checkSpeciesArraySize(size_t kk) const
Check that an array size is at least nSpecies().
Definition Transport.cpp:23
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595