Cantera  3.1.0a1
MixTransport Class Reference

Class MixTransport implements mixture-averaged transport properties for ideal gas mixtures. More...

#include <MixTransport.h>

Inheritance diagram for MixTransport:
[legend]

Detailed Description

Class MixTransport implements mixture-averaged transport properties for ideal gas mixtures.

The model is based on that described in Kee, et al. [15].

The viscosity is computed using the Wilke mixture rule (kg /m /s)

\[ \mu = \sum_k \frac{\mu_k X_k}{\sum_j \Phi_{k,j} X_j}. \]

Here \( \mu_k \) is the viscosity of pure species k, and

\[ \Phi_{k,j} = \frac{\left[1 + \sqrt{\left(\frac{\mu_k}{\mu_j}\sqrt{\frac{M_j}{M_k}}\right)}\right]^2} {\sqrt{8}\sqrt{1 + M_k/M_j}} \]

The thermal conductivity is computed from the following mixture rule:

\[ \lambda = 0.5 \left( \sum_k X_k \lambda_k + \frac{1}{\sum_k X_k/\lambda_k} \right) \]

It's used to compute the flux of energy due to a thermal gradient

\[ j_T = - \lambda \nabla T \]

The flux of energy has units of energy (kg m2 /s2) per second per area.

The units of lambda are W / m K which is equivalent to kg m / s^3 K.

Definition at line 54 of file MixTransport.h.

Public Member Functions

 MixTransport ()=default
 Default constructor. More...
 
string transportModel () const override
 Identifies the model represented by this Transport object. More...
 
void getThermalDiffCoeffs (double *const dt) override
 Return the thermal diffusion coefficients. More...
 
double thermalConductivity () override
 Returns the mixture thermal conductivity (W/m /K) More...
 
void getMobilities (double *const mobil) override
 Get the Electrical mobilities (m^2/V/s). More...
 
void update_T () override
 Update the internal parameters whenever the temperature has changed. More...
 
void update_C () override
 Update the internal parameters whenever the concentrations have changed. More...
 
void getSpeciesFluxes (size_t ndim, const double *const grad_T, size_t ldx, const double *const grad_X, size_t ldf, double *const fluxes) override
 Get the species diffusive mass fluxes wrt to the mass averaged velocity, given the gradients in mole fraction and temperature. More...
 
void init (ThermoPhase *thermo, int mode=0, int log_level=0) override
 Initialize a transport manager. More...
 
- Public Member Functions inherited from GasTransport
double viscosity () override
 Viscosity of the mixture (kg /m /s) More...
 
void getSpeciesViscosities (double *const visc) override
 Get the pure-species viscosities. More...
 
void getBinaryDiffCoeffs (const size_t ld, double *const d) override
 Returns the matrix of binary diffusion coefficients. More...
 
void getMixDiffCoeffs (double *const d) override
 Returns the Mixture-averaged diffusion coefficients [m^2/s]. More...
 
void getMixDiffCoeffsMole (double *const d) override
 Returns the mixture-averaged diffusion coefficients [m^2/s]. More...
 
void getMixDiffCoeffsMass (double *const d) override
 Returns the mixture-averaged diffusion coefficients [m^2/s]. More...
 
void getViscosityPolynomial (size_t i, double *coeffs) const override
 Return the polynomial fits to the viscosity of species i. More...
 
void getConductivityPolynomial (size_t i, double *coeffs) const override
 Return the temperature fits of the heat conductivity of species i. More...
 
void getBinDiffusivityPolynomial (size_t i, size_t j, double *coeffs) const override
 Return the polynomial fits to the binary diffusivity of species pair (i, j) More...
 
void getCollisionIntegralPolynomial (size_t i, size_t j, double *astar_coeffs, double *bstar_coeffs, double *cstar_coeffs) const override
 Return the polynomial fits to the collision integral of species pair (i, j) More...
 
void setViscosityPolynomial (size_t i, double *coeffs) override
 Modify the polynomial fits to the viscosity of species i. More...
 
void setConductivityPolynomial (size_t i, double *coeffs) override
 Modify the temperature fits of the heat conductivity of species i. More...
 
void setBinDiffusivityPolynomial (size_t i, size_t j, double *coeffs) override
 Modify the polynomial fits to the binary diffusivity of species pair (i, j) More...
 
void setCollisionIntegralPolynomial (size_t i, size_t j, double *astar_coeffs, double *bstar_coeffs, double *cstar_coeffs, bool actualT) override
 Modify the polynomial fits to the collision integral of species pair (i, j) More...
 
bool CKMode () const override
 Boolean indicating the form of the transport properties polynomial fits. More...
 
- Public Member Functions inherited from Transport
 Transport ()=default
 Constructor. More...
 
 Transport (const Transport &)=delete
 
Transportoperator= (const Transport &)=delete
 
ThermoPhasethermo ()
 Phase object. More...
 
void checkSpeciesIndex (size_t k) const
 Check that the specified species index is in range. More...
 
void checkSpeciesArraySize (size_t kk) const
 Check that an array size is at least nSpecies(). More...
 
virtual void getMolarFluxes (const double *const state1, const double *const state2, const double delta, double *const cfluxes)
 Get the molar fluxes [kmol/m^2/s], given the thermodynamic state at two nearby points. More...
 
virtual void getMassFluxes (const double *state1, const double *state2, double delta, double *mfluxes)
 Get the mass fluxes [kg/m^2/s], given the thermodynamic state at two nearby points. More...
 
virtual void getMultiDiffCoeffs (const size_t ld, double *const d)
 Return the Multicomponent diffusion coefficients. Units: [m^2/s]. More...
 
AnyMap parameters () const
 Return the parameters for a phase definition which are needed to reconstruct an identical object using the newTransport function. More...
 
virtual double bulkViscosity ()
 The bulk viscosity in Pa-s. More...
 
virtual double electricalConductivity ()
 The electrical conductivity (Siemens/m). More...
 

Protected Member Functions

void updateCond_T ()
 Update the temperature dependent parts of the species thermal conductivities. More...
 
- Protected Member Functions inherited from GasTransport
virtual void updateViscosity_T ()
 Update the temperature-dependent viscosity terms. More...
 
virtual void updateSpeciesViscosities ()
 Update the pure-species viscosities. More...
 
virtual void updateDiff_T ()
 Update the binary diffusion coefficients. More...
 
virtual void setupCollisionParameters ()
 Setup parameters for a new kinetic-theory-based transport manager for low-density gases. More...
 
void setupCollisionIntegral ()
 Setup range for polynomial fits to collision integrals of Monchick & Mason [27]. More...
 
void getTransportData ()
 Read the transport database. More...
 
void makePolarCorrections (size_t i, size_t j, double &f_eps, double &f_sigma)
 Corrections for polar-nonpolar binary diffusion coefficients. More...
 
void fitCollisionIntegrals (MMCollisionInt &integrals)
 Generate polynomial fits to collision integrals. More...
 
virtual void fitProperties (MMCollisionInt &integrals)
 Generate polynomial fits to the viscosity \( \eta \) and conductivity \( \lambda \). More...
 
virtual void fitDiffCoeffs (MMCollisionInt &integrals)
 Generate polynomial fits to the binary diffusion coefficients. More...
 
void getBinDiffCorrection (double t, MMCollisionInt &integrals, size_t k, size_t j, double xk, double xj, double &fkj, double &fjk)
 Second-order correction to the binary diffusion coefficients. More...
 

Protected Attributes

vector< double > m_cond
 vector of species thermal conductivities (W/m /K) More...
 
double m_lambda = 0.0
 Internal storage for the calculated mixture thermal conductivity. More...
 
bool m_spcond_ok = false
 Update boolean for the species thermal conductivities. More...
 
bool m_condmix_ok = false
 Update boolean for the mixture rule for the mixture thermal conductivity. More...
 
- Protected Attributes inherited from GasTransport
vector< double > m_molefracs
 Vector of species mole fractions. More...
 
double m_viscmix = 0.0
 Internal storage for the viscosity of the mixture (kg /m /s) More...
 
bool m_visc_ok = false
 Update boolean for mixture rule for the mixture viscosity. More...
 
bool m_viscwt_ok = false
 Update boolean for the weighting factors for the mixture viscosity. More...
 
bool m_spvisc_ok = false
 Update boolean for the species viscosities. More...
 
bool m_bindiff_ok = false
 Update boolean for the binary diffusivities at unit pressure. More...
 
int m_mode = 0
 Type of the polynomial fits to temperature. More...
 
DenseMatrix m_phi
 m_phi is a Viscosity Weighting Function. size = m_nsp * n_nsp More...
 
vector< double > m_spwork
 work space length = m_kk More...
 
vector< double > m_visc
 vector of species viscosities (kg /m /s). More...
 
vector< vector< double > > m_visccoeffs
 Polynomial fits to the viscosity of each species. More...
 
vector< double > m_mw
 Local copy of the species molecular weights. More...
 
DenseMatrix m_wratjk
 Holds square roots of molecular weight ratios. More...
 
DenseMatrix m_wratkj1
 Holds square roots of molecular weight ratios. More...
 
vector< double > m_sqvisc
 vector of square root of species viscosities sqrt(kg /m /s). More...
 
vector< double > m_polytempvec
 Powers of the ln temperature, up to fourth order. More...
 
double m_temp = -1.0
 Current value of the temperature at which the properties in this object are calculated (Kelvin). More...
 
double m_kbt = 0.0
 Current value of Boltzmann constant times the temperature (Joules) More...
 
double m_sqrt_t = 0.0
 current value of temperature to 1/2 power More...
 
double m_logt = 0.0
 Current value of the log of the temperature. More...
 
double m_t14 = 0.0
 Current value of temperature to 1/4 power. More...
 
vector< vector< double > > m_diffcoeffs
 Polynomial fits to the binary diffusivity of each species. More...
 
DenseMatrix m_bdiff
 Matrix of binary diffusion coefficients at the reference pressure and the current temperature Size is nsp x nsp. More...
 
vector< vector< double > > m_condcoeffs
 temperature fits of the heat conduction More...
 
vector< vector< int > > m_poly
 Indices for the (i,j) interaction in collision integral fits. More...
 
vector< vector< double > > m_omega22_poly
 Fit for omega22 collision integral. More...
 
vector< vector< int > > m_star_poly_uses_actualT
 Flag to indicate for which (i,j) interaction pairs the actual temperature is used instead of the reduced temperature. More...
 
vector< vector< double > > m_astar_poly
 Fit for astar collision integral. More...
 
vector< vector< double > > m_bstar_poly
 Fit for bstar collision integral. More...
 
vector< vector< double > > m_cstar_poly
 Fit for cstar collision integral. More...
 
vector< double > m_zrot
 Rotational relaxation number for each species. More...
 
vector< double > m_crot
 Dimensionless rotational heat capacity of each species. More...
 
vector< bool > m_polar
 Vector of booleans indicating whether a species is a polar molecule. More...
 
vector< double > m_alpha
 Polarizability of each species in the phase. More...
 
vector< double > m_eps
 Lennard-Jones well-depth of the species in the current phase. More...
 
vector< double > m_sigma
 Lennard-Jones diameter of the species in the current phase. More...
 
DenseMatrix m_reducedMass
 This is the reduced mass of the interaction between species i and j. More...
 
DenseMatrix m_diam
 hard-sphere diameter for (i,j) collision More...
 
DenseMatrix m_epsilon
 The effective well depth for (i,j) collisions. More...
 
DenseMatrix m_dipole
 The effective dipole moment for (i,j) collisions. More...
 
DenseMatrix m_delta
 Reduced dipole moment of the interaction between two species. More...
 
vector< double > m_w_ac
 Pitzer acentric factor. More...
 
vector< double > m_disp
 Dispersion coefficient. More...
 
vector< double > m_quad_polar
 Quadrupole polarizability. More...
 
int m_log_level = 0
 Level of verbose printing during initialization. More...
 
- Protected Attributes inherited from Transport
ThermoPhasem_thermo
 pointer to the object representing the phase More...
 
size_t m_nsp = 0
 Number of species. More...
 

Constructor & Destructor Documentation

◆ MixTransport()

MixTransport ( )
default

Default constructor.

Member Function Documentation

◆ transportModel()

string transportModel ( ) const
inlineoverridevirtual

Identifies the model represented by this Transport object.

Each derived class should override this method to return a meaningful identifier.

Since
New in Cantera 3.0. The name returned by this method corresponds to the canonical name used in the YAML input format.

Reimplemented from Transport.

Reimplemented in UnityLewisTransport.

Definition at line 60 of file MixTransport.h.

◆ getThermalDiffCoeffs()

void getThermalDiffCoeffs ( double *const  dt)
overridevirtual

Return the thermal diffusion coefficients.

For this approximation, these are all zero.

Parameters
dtVector of thermal diffusion coefficients. Units = kg/m/s

Reimplemented from Transport.

Definition at line 51 of file MixTransport.cpp.

◆ thermalConductivity()

double thermalConductivity ( )
overridevirtual

Returns the mixture thermal conductivity (W/m /K)

The thermal conductivity is computed from the following mixture rule:

\[ \lambda = 0.5 \left( \sum_k X_k \lambda_k + \frac{1}{\sum_k X_k/\lambda_k} \right) \]

It's used to compute the flux of energy due to a thermal gradient

\[ j_T = - \lambda \nabla T \]

The flux of energy has units of energy (kg m2 /s2) per second per area.

The units of lambda are W / m K which is equivalent to kg m / s^3 K.

Returns
the mixture thermal conductivity, with units of W/m/K

Reimplemented from Transport.

Definition at line 32 of file MixTransport.cpp.

◆ getMobilities()

void getMobilities ( double *const  mobil)
overridevirtual

Get the Electrical mobilities (m^2/V/s).

This function returns the mobilities. In some formulations this is equal to the normal mobility multiplied by Faraday's constant.

Here, the mobility is calculated from the diffusion coefficient using the Einstein relation

\[ \mu^e_k = \frac{F D_k}{R T} \]

Parameters
mobilReturns the mobilities of the species in array mobil. The array must be dimensioned at least as large as the number of species.

Reimplemented from Transport.

Definition at line 23 of file MixTransport.cpp.

◆ update_T()

void update_T ( )
overridevirtual

Update the internal parameters whenever the temperature has changed.

This is called whenever a transport property is requested if the temperature has changed since the last call to update_T().

Reimplemented from GasTransport.

Definition at line 83 of file MixTransport.cpp.

◆ update_C()

void update_C ( )
overridevirtual

Update the internal parameters whenever the concentrations have changed.

This is called whenever a transport property is requested if the concentrations have changed since the last call to update_C().

Implements GasTransport.

Definition at line 100 of file MixTransport.cpp.

◆ getSpeciesFluxes()

void getSpeciesFluxes ( size_t  ndim,
const double *const  grad_T,
size_t  ldx,
const double *const  grad_X,
size_t  ldf,
double *const  fluxes 
)
overridevirtual

Get the species diffusive mass fluxes wrt to the mass averaged velocity, given the gradients in mole fraction and temperature.

Units for the returned fluxes are kg m-2 s-1.

The diffusive mass flux of species k is computed from

\[ \vec{j}_k = -n M_k D_k \nabla X_k. \]

Parameters
ndimNumber of dimensions in the flux expressions
grad_TGradient of the temperature (length = ndim)
ldxLeading dimension of the grad_X array (usually equal to m_nsp but not always)
grad_XGradients of the mole fraction. Flat vector with the m_nsp in the inner loop. length = ldx * ndim
ldfLeading dimension of the fluxes array (usually equal to m_nsp but not always)
fluxesOutput of the diffusive mass fluxes. Flat vector with the m_nsp in the inner loop. length = ldx * ndim

Reimplemented from Transport.

Definition at line 58 of file MixTransport.cpp.

◆ init()

void init ( ThermoPhase thermo,
int  mode = 0,
int  log_level = 0 
)
overridevirtual

Initialize a transport manager.

This routine sets up a transport manager. It calculates the collision integrals and populates species-dependent data structures.

Parameters
thermoPointer to the ThermoPhase object
modeChemkin compatible mode or not. This alters the specification of the collision integrals. defaults to no.
log_levelDefaults to zero, no logging

Reimplemented from GasTransport.

Definition at line 17 of file MixTransport.cpp.

◆ updateCond_T()

void updateCond_T ( )
protected

Update the temperature dependent parts of the species thermal conductivities.

These are evaluated from the polynomial fits of the temperature and are assumed to be independent of pressure

Definition at line 114 of file MixTransport.cpp.

Member Data Documentation

◆ m_cond

vector<double> m_cond
protected

vector of species thermal conductivities (W/m /K)

These are used in wilke's rule to calculate the viscosity of the solution. units = W /m /K = kg m /s^3 /K. length = m_kk.

Definition at line 166 of file MixTransport.h.

◆ m_lambda

double m_lambda = 0.0
protected

Internal storage for the calculated mixture thermal conductivity.

Units = W /m /K

Definition at line 172 of file MixTransport.h.

◆ m_spcond_ok

bool m_spcond_ok = false
protected

Update boolean for the species thermal conductivities.

Definition at line 175 of file MixTransport.h.

◆ m_condmix_ok

bool m_condmix_ok = false
protected

Update boolean for the mixture rule for the mixture thermal conductivity.

Definition at line 178 of file MixTransport.h.


The documentation for this class was generated from the following files: