Cantera  3.1.0
Loading...
Searching...
No Matches
UnityLewisTransport.h
Go to the documentation of this file.
1/**
2 * @file UnityLewisTransport.h
3 * Headers for the UnityLewisTransport object, which models transport
4 * properties in ideal gas solutions using the unity Lewis number
5 * approximation
6 * (see @ref tranprops and @link Cantera::UnityLewisTransport UnityLewisTransport @endlink) .
7 */
8
9// This file is part of Cantera. See License.txt in the top-level directory or
10// at https://cantera.org/license.txt for license and copyright information.
11
12#ifndef CT_UNITYLEWISTRAN_H
13#define CT_UNITYLEWISTRAN_H
14
15#include "MixTransport.h"
17
18namespace Cantera
19{
20//! Class UnityLewisTransport implements the unity Lewis number approximation
21//! for the mixture-averaged species diffusion coefficients. Mixture-averaged
22//! transport properties for viscosity and thermal conductivity are inherited
23//! from the MixTransport class.
24//! @ingroup tranprops
26{
27public:
28 UnityLewisTransport() = default;
29
30 string transportModel() const override {
31 return "unity-Lewis-number";
32 }
33
34 //! Returns the unity Lewis number approximation based diffusion
35 //! coefficients [m^2/s].
36 /*!
37 * Returns the unity Lewis number approximation based diffusion coefficients
38 * for a gas, appropriate for calculating the mass averaged diffusive flux
39 * with respect to the mass averaged velocity using gradients of the mole
40 * fraction.
41 *
42 * @f[
43 * D^\prime_{km} = \frac{\lambda}{\rho c_p}
44 * @f]
45 *
46 * In order to obtain the expected behavior from a unity Lewis number model,
47 * this formulation requires that the correction velocity be computed as
48 *
49 * @f[
50 * V_c = \sum \frac{W_k}{\overline{W}} D^\prime_{km} \nabla X_k
51 * @f]
52 *
53 * @param[out] d Vector of diffusion coefficients for each species (m^2/s).
54 * length m_nsp.
55 */
56 void getMixDiffCoeffs(double* const d) override {
57 double Dm = thermalConductivity() / (m_thermo->density() * m_thermo->cp_mass());
58 for (size_t k = 0; k < m_nsp; k++) {
59 d[k] = Dm;
60 }
61 }
62
63 //! Not implemented for unity Lewis number approximation
64 void getMixDiffCoeffsMole(double* const d) override {
65 throw NotImplementedError("UnityLewisTransport::getMixDiffCoeffsMole");
66 }
67
68 //! Returns the unity Lewis number approximation based diffusion
69 //! coefficients [m^2/s].
70 /*!
71 * These are the coefficients for calculating the diffusive mass fluxes
72 * from the species mass fraction gradients, computed as
73 *
74 * @f[
75 * D_{km} = \frac{\lambda}{\rho c_p}
76 * @f]
77 *
78 * @param[out] d Vector of diffusion coefficients for each species (m^2/s).
79 * length m_nsp.
80 */
81 void getMixDiffCoeffsMass(double* const d) override {
82 double Dm = thermalConductivity() / (m_thermo->density() * m_thermo->cp_mass());
83 for (size_t k = 0; k < m_nsp; k++) {
84 d[k] = Dm;
85 }
86 }
87};
88}
89#endif
Headers for the MixTransport object, which models transport properties in ideal gas solutions using a...
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
Class MixTransport implements mixture-averaged transport properties for ideal gas mixtures.
double thermalConductivity() override
Returns the mixture thermal conductivity (W/m /K)
An error indicating that an unimplemented function has been called.
virtual double density() const
Density (kg/m^3).
Definition Phase.h:587
double cp_mass() const
Specific heat at constant pressure. Units: J/kg/K.
ThermoPhase * m_thermo
pointer to the object representing the phase
Definition Transport.h:437
size_t m_nsp
Number of species.
Definition Transport.h:440
Class UnityLewisTransport implements the unity Lewis number approximation for the mixture-averaged sp...
void getMixDiffCoeffs(double *const d) override
Returns the unity Lewis number approximation based diffusion coefficients [m^2/s].
void getMixDiffCoeffsMole(double *const d) override
Not implemented for unity Lewis number approximation.
string transportModel() const override
Identifies the model represented by this Transport object.
void getMixDiffCoeffsMass(double *const d) override
Returns the unity Lewis number approximation based diffusion coefficients [m^2/s].
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595