27 for (
size_t k = 0; k <
m_nsp; k++) {
40 double sum1 = 0.0, sum2 = 0.0;
41 for (
size_t k = 0; k <
m_nsp; k++) {
66 for (
size_t k=0; k<
m_nsp; ++k) {
74 double lambda_mono_k = (15./4.) *
m_visc[k] /
m_mw[k];
77 for (
size_t j=0; j<
m_nsp; ++j) {
83 a[k] = lambda_mono_k / (1. + 1.065 * sum /
m_molefracs[k]);
88 for (
size_t k=0; k<
m_nsp-1; ++k) {
89 for (
size_t j=k+1; j<
m_nsp; ++j) {
102 double dt_T = ((1.2*Cstar - 1.0)/(
m_bdiff(k,j)*rp))
105 dt[k] += dt_T * (y[k]*a[j] - y[j]*a[k]);
106 dt[j] += dt_T * (y[j]*a[k] - y[k]*a[j]);
115 for (
size_t k=0; k<
m_nsp; ++k) {
116 dt[k] *= Dm[k] *
m_mw[k] * mmw;
121 for (
size_t k=0; k<
m_nsp; ++k) {
127 size_t ldx,
const double*
const grad_X,
128 size_t ldf,
double*
const fluxes)
136 vector<double> sum(ndim,0.0);
137 for (
size_t n = 0; n < ndim; n++) {
138 for (
size_t k = 0; k <
m_nsp; k++) {
139 fluxes[n*ldf + k] = -rhon * mw[k] *
m_spwork[k] * grad_X[n*ldx + k];
140 sum[n] += fluxes[n*ldf + k];
144 for (
size_t n = 0; n < ndim; n++) {
145 for (
size_t k = 0; k <
m_nsp; k++) {
146 fluxes[n*ldf + k] -= y[k]*sum[n];
157 GasTransport::update_T();
173 for (
size_t k = 0; k <
m_nsp; k++) {
181 for (
size_t k = 0; k <
m_nsp; k++) {
185 for (
size_t k = 0; k <
m_nsp; k++) {
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,...
vector< double > m_mw
Local copy of the species molecular weights.
vector< double > m_molefracs
Vector of species mole fractions.
double m_temp
Current value of the temperature [K] at which the properties in this object are calculated.
bool m_visc_ok
Update boolean for mixture rule for the mixture viscosity.
void getMixDiffCoeffs(double *const d) override
Returns the Mixture-averaged diffusion coefficients [m²/s].
virtual void updateDiff_T()
Update the binary diffusion coefficients.
bool m_bindiff_ok
Update boolean for the binary diffusivities at unit pressure.
DenseMatrix m_epsilon
The effective well depth [J] for (i,j) collisions.
vector< double > m_spwork
work space length = m_nsp
int m_mode
Type of the polynomial fits to temperature.
virtual void updateViscosity_T()
Update the temperature-dependent viscosity terms.
vector< double > m_visc
vector of species viscosities [Pa·s].
double m_sqrt_t
current value of temperature to 1/2 power
DenseMatrix m_bdiff
Matrix of binary diffusion coefficients at the reference pressure and the current temperature Size is...
void init(ThermoPhase *thermo, int mode=0) override
Initialize a transport manager.
vector< double > m_polytempvec
Powers of the ln temperature, up to fourth order.
double m_kbt
Current value of Boltzmann constant times the temperature [J].
vector< vector< int > > m_poly
Indices for the (i,j) interaction in collision integral fits.
vector< vector< double > > m_condcoeffs
temperature fits of the heat conduction
bool m_viscwt_ok
Update boolean for the weighting factors for the mixture viscosity.
vector< vector< double > > m_cstar_poly
Fit for cstar collision integral.
DenseMatrix m_phi
Viscosity weighting function. size = m_nsp * m_nsp.
void update_T() override
Update the internal parameters whenever the temperature has changed.
double thermalConductivity() override
Returns the mixture thermal conductivity [W/m/K].
bool m_spcond_ok
Update boolean for the species thermal conductivities.
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 [kg/m²/s] with respect to the mass averaged velocity,...
double m_lambda
Internal storage for the calculated mixture thermal conductivity [W/m/K].
void init(ThermoPhase *thermo, int mode=0) override
Initialize a transport manager.
void updateCond_T()
Update the temperature dependent parts of the species thermal conductivities.
void getMobilities(double *const mobil) override
Get the electrical mobilities [m²/V/s].
void update_C() override
Update the internal parameters whenever the concentrations have changed.
vector< double > m_cond
vector of species thermal conductivities [W/m/K]
void getThermalDiffCoeffs(double *const dt) override
Return the thermal diffusion coefficients [kg/m/s].
bool m_condmix_ok
Update boolean for the mixture rule for the mixture thermal conductivity.
virtual double molarDensity() const
Molar density (kmol/m^3).
size_t nSpecies() const
Returns the number of species in the phase.
double temperature() const
Temperature (K).
double meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
void getMoleFractions(double *const x) const
Get the species mole fraction vector.
const double * massFractions() const
Return a const pointer to the mass fraction array.
const vector< double > & molecularWeights() const
Return a const reference to the internal vector of molecular weights.
virtual double pressure() const
Return the thermodynamic pressure (Pa).
Base class for a phase with thermodynamic properties.
ThermoPhase * m_thermo
pointer to the object representing the phase
size_t m_nsp
Number of species in the phase.
ThermoPhase & thermo()
Phase object.
double dot5(const V &x, const V &y)
Templated Inner product of two vectors of length 5.
R poly6(D x, R *c)
Templated evaluation of a polynomial of order 6.
R poly8(D x, R *c)
Templated evaluation of a polynomial of order 8.
double dot4(const V &x, const V &y)
Templated Inner product of two vectors of length 4.
const double Boltzmann
Boltzmann constant [J/K].
const double ElectronCharge
Elementary charge [C].
Namespace for the Cantera kernel.
const double Tiny
Small number to compare differences of mole fractions against.
Contains declarations for string manipulation functions within Cantera.
Various templated functions that carry out common vector and polynomial operations (see Templated Arr...