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++) {
53 for (
size_t k = 0; k <
m_nsp; k++) {
59 size_t ldx,
const double*
const grad_X,
60 size_t ldf,
double*
const fluxes)
68 vector<double> sum(ndim,0.0);
69 for (
size_t n = 0; n < ndim; n++) {
70 for (
size_t k = 0; k <
m_nsp; k++) {
71 fluxes[n*ldf + k] = -rhon * mw[k] *
m_spwork[k] * grad_X[n*ldx + k];
72 sum[n] += fluxes[n*ldf + k];
76 for (
size_t n = 0; n < ndim; n++) {
77 for (
size_t k = 0; k <
m_nsp; k++) {
78 fluxes[n*ldf + k] -= y[k]*sum[n];
91 "negative temperature {}", t);
93 GasTransport::update_T();
109 for (
size_t k = 0; k <
m_nsp; k++) {
117 for (
size_t k = 0; k <
m_nsp; k++) {
121 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,...
Base class for exceptions thrown by Cantera classes.
vector< double > m_molefracs
Vector of species mole fractions.
double m_temp
Current value of the temperature at which the properties in this object are calculated (Kelvin).
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^2/s].
bool m_bindiff_ok
Update boolean for the binary diffusivities at unit pressure.
vector< double > m_spwork
work space length = m_kk
int m_mode
Type of the polynomial fits to temperature.
double m_sqrt_t
current value of temperature to 1/2 power
vector< double > m_polytempvec
Powers of the ln temperature, up to fourth order.
vector< vector< double > > m_condcoeffs
temperature fits of the heat conduction
void init(ThermoPhase *thermo, int mode=0, int log_level=0) override
Initialize a transport manager.
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 wrt to the mass averaged velocity, given the gradients in mole ...
double m_lambda
Internal storage for the calculated mixture thermal conductivity.
void updateCond_T()
Update the temperature dependent parts of the species thermal conductivities.
void getMobilities(double *const mobil) override
Get the Electrical mobilities (m^2/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.
bool m_condmix_ok
Update boolean for the mixture rule for the mixture thermal conductivity.
void init(ThermoPhase *thermo, int mode=0, int log_level=0) override
Initialize a transport manager.
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).
const double * massFractions() const
Return a const pointer to the mass fraction array.
void getMoleFractions(double *const x) const
Get the species mole fraction vector.
const vector< double > & molecularWeights() const
Return a const reference to the internal vector of molecular weights.
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.
ThermoPhase & thermo()
Phase object.
double dot5(const V &x, const V &y)
Templated Inner product of two vectors of length 5.
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...