compiling dummy constant transport class
This commit is contained in:
parent
ba330a797e
commit
84acb57b4b
2 changed files with 91 additions and 0 deletions
88
include/cantera/transport/ConstantTransport.h
Normal file
88
include/cantera/transport/ConstantTransport.h
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
/**
|
||||
* @file ConstantTransport.h
|
||||
* Headers for the ConstantTransport object, which models transport
|
||||
* properties in ideal gas solutions using the unity Lewis number
|
||||
* approximation
|
||||
* (see \ref tranprops and \link Cantera::ConstantTransport ConstantTransport \endlink) .
|
||||
*/
|
||||
|
||||
// This file is part of Cantera. See License.txt in the top-level directory or
|
||||
// at https://cantera.org/license.txt for license and copyright information.
|
||||
|
||||
#ifndef CT_CONSTANTTRAN_H
|
||||
#define CT_CONSTANTTRAN_H
|
||||
|
||||
#include "MixTransport.h"
|
||||
|
||||
namespace Cantera
|
||||
{
|
||||
//! Class ConstantTransport implements the unity Lewis number approximation
|
||||
//! for the mixture-averaged species diffusion coefficients. Mixture-averaged
|
||||
//! transport properties for viscosity and thermal conductivity are inherited
|
||||
//! from the MixTransport class.
|
||||
//! @ingroup tranprops
|
||||
class ConstantTransport : public MixTransport
|
||||
{
|
||||
public:
|
||||
// ConstantTransport() {}
|
||||
|
||||
virtual std::string transportType() const {
|
||||
return "Constant";
|
||||
}
|
||||
|
||||
//! Returns the unity Lewis number approximation based diffusion
|
||||
//! coefficients [m^2/s].
|
||||
/*!
|
||||
* Returns the unity Lewis number approximation based diffusion coefficients
|
||||
* for a gas, appropriate for calculating the mass averaged diffusive flux
|
||||
* with respect to the mass averaged velocity using gradients of the mole
|
||||
* fraction.
|
||||
*
|
||||
* \f[
|
||||
* D^\prime_{km} = \frac{\lambda}{\rho c_p}
|
||||
* \f]
|
||||
*
|
||||
* In order to obtain the expected behavior from a unity Lewis number model,
|
||||
* this formulation requires that the correction velocity be computed as
|
||||
*
|
||||
* \f[
|
||||
* V_c = \sum \frac{W_k}{\overline{W}} D^\prime_{km} \nabla X_k
|
||||
* \f]
|
||||
*
|
||||
* @param[out] d Vector of diffusion coefficients for each species (m^2/s).
|
||||
* length m_nsp.
|
||||
*/
|
||||
virtual void getMixDiffCoeffs(double* const d) {
|
||||
double Dm = thermalConductivity() / (m_thermo->density() * m_thermo->cp_mass());
|
||||
for (size_t k = 0; k < m_nsp; k++) {
|
||||
d[k] = Dm;
|
||||
}
|
||||
}
|
||||
|
||||
//! Not implemented for unity Lewis number approximation
|
||||
virtual void getMixDiffCoeffsMole(double* const d){
|
||||
throw NotImplementedError("ConstantTransport::getMixDiffCoeffsMole");
|
||||
}
|
||||
|
||||
//! Returns the unity Lewis number approximation based diffusion
|
||||
//! coefficients [m^2/s].
|
||||
/*!
|
||||
* These are the coefficients for calculating the diffusive mass fluxes
|
||||
* from the species mass fraction gradients, computed as
|
||||
*
|
||||
* \f[
|
||||
* D_{km} = \frac{\lambda}{\rho c_p}
|
||||
* \f]
|
||||
*
|
||||
* @param[out] d Vector of diffusion coefficients for each species (m^2/s).
|
||||
* length m_nsp.
|
||||
*/
|
||||
virtual void getMixDiffCoeffsMass(double* const d){
|
||||
double Dm = thermalConductivity() / (m_thermo->density() * m_thermo->cp_mass());
|
||||
for (size_t k = 0; k < m_nsp; k++) {
|
||||
d[k] = Dm;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
#include "cantera/transport/MultiTransport.h"
|
||||
#include "cantera/transport/MixTransport.h"
|
||||
#include "cantera/transport/UnityLewisTransport.h"
|
||||
#include "cantera/transport/ConstantTransport.h"
|
||||
#include "cantera/transport/IonGasTransport.h"
|
||||
#include "cantera/transport/WaterTransport.h"
|
||||
#include "cantera/transport/DustyGasTransport.h"
|
||||
|
|
@ -45,6 +46,8 @@ TransportFactory::TransportFactory()
|
|||
{
|
||||
reg("", []() { return new Transport(); });
|
||||
m_synonyms["None"] = "";
|
||||
reg("Constant", []() { return new ConstantTransport(); });
|
||||
m_synonyms["constant"] = "Constant";
|
||||
reg("UnityLewis", []() { return new UnityLewisTransport(); });
|
||||
m_synonyms["unity-Lewis-number"] = "UnityLewis";
|
||||
reg("Mix", []() { return new MixTransport(); });
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue