Cantera 2.6.0
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() {}
29
30 virtual std::string transportType() const {
31 return "UnityLewis";
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 virtual void getMixDiffCoeffs(double* const d) {
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 virtual void getMixDiffCoeffsMole(double* const d){
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 virtual void getMixDiffCoeffsMass(double* const d){
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.
Definition: MixTransport.h:57
virtual doublereal thermalConductivity()
Returns the mixture thermal conductivity (W/m /K)
An error indicating that an unimplemented function has been called.
Definition: ctexceptions.h:187
virtual double density() const
Density (kg/m^3).
Definition: Phase.h:679
doublereal cp_mass() const
Specific heat at constant pressure. Units: J/kg/K.
Definition: ThermoPhase.h:768
ThermoPhase * m_thermo
pointer to the object representing the phase
size_t m_nsp
Number of species.
Class UnityLewisTransport implements the unity Lewis number approximation for the mixture-averaged sp...
virtual void getMixDiffCoeffsMole(double *const d)
Not implemented for unity Lewis number approximation.
virtual void getMixDiffCoeffs(double *const d)
Returns the unity Lewis number approximation based diffusion coefficients [m^2/s].
virtual std::string transportType() const
Identifies the Transport object type.
virtual void getMixDiffCoeffsMass(double *const d)
Returns the unity Lewis number approximation based diffusion coefficients [m^2/s].
Namespace for the Cantera kernel.
Definition: AnyMap.h:29