Cantera  2.5.1
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"
16 
17 namespace Cantera
18 {
19 //! Class UnityLewisTransport implements the unity Lewis number approximation
20 //! for the mixture-averaged species diffusion coefficients. Mixture-averaged
21 //! transport properties for viscosity and thermal conductivity are inherited
22 //! from the MixTransport class.
23 //! @ingroup tranprops
25 {
26 public:
27 // UnityLewisTransport() {}
28 
29  virtual std::string transportType() const {
30  return "UnityLewis";
31  }
32 
33  //! Returns the unity Lewis number approximation based diffusion
34  //! coefficients [m^2/s].
35  /*!
36  * Returns the unity Lewis number approximation based diffusion coefficients
37  * for a gas, appropriate for calculating the mass averaged diffusive flux
38  * with respect to the mass averaged velocity using gradients of the mole
39  * fraction.
40  *
41  * \f[
42  * D^\prime_{km} = \frac{\lambda}{\rho c_p}
43  * \f]
44  *
45  * In order to obtain the expected behavior from a unity Lewis number model,
46  * this formulation requires that the correction velocity be computed as
47  *
48  * \f[
49  * V_c = \sum \frac{W_k}{\overline{W}} D^\prime_{km} \nabla X_k
50  * \f]
51  *
52  * @param[out] d Vector of diffusion coefficients for each species (m^2/s).
53  * length m_nsp.
54  */
55  virtual void getMixDiffCoeffs(double* const d) {
56  double Dm = thermalConductivity() / (m_thermo->density() * m_thermo->cp_mass());
57  for (size_t k = 0; k < m_nsp; k++) {
58  d[k] = Dm;
59  }
60  }
61 
62  //! Not implemented for unity Lewis number approximation
63  virtual void getMixDiffCoeffsMole(double* const d){
64  throw NotImplementedError("UnityLewisTransport::getMixDiffCoeffsMole");
65  }
66 
67  //! Returns the unity Lewis number approximation based diffusion
68  //! coefficients [m^2/s].
69  /*!
70  * These are the coefficients for calculating the diffusive mass fluxes
71  * from the species mass fraction gradients, computed as
72  *
73  * \f[
74  * D_{km} = \frac{\lambda}{\rho c_p}
75  * \f]
76  *
77  * @param[out] d Vector of diffusion coefficients for each species (m^2/s).
78  * length m_nsp.
79  */
80  virtual void getMixDiffCoeffsMass(double* const d){
81  double Dm = thermalConductivity() / (m_thermo->density() * m_thermo->cp_mass());
82  for (size_t k = 0; k < m_nsp; k++) {
83  d[k] = Dm;
84  }
85  }
86 };
87 }
88 #endif
Headers for the MixTransport object, which models transport properties in ideal gas solutions using a...
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:685
doublereal cp_mass() const
Specific heat at constant pressure. Units: J/kg/K.
Definition: ThermoPhase.h:762
thermo_t * 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.cpp:264