16 MixTransport::MixTransport() :
33 for (
size_t k = 0; k <
m_nsp; k++) {
46 doublereal sum1 = 0.0, sum2 = 0.0;
47 for (
size_t k = 0; k <
m_nsp; k++) {
59 for (
size_t k = 0; k <
m_nsp; k++) {
65 size_t ldx,
const doublereal*
const grad_X,
66 size_t ldf, doublereal*
const fluxes)
75 for (
size_t n = 0; n < ndim; n++) {
76 for (
size_t k = 0; k <
m_nsp; k++) {
77 fluxes[n*ldf + k] = -rhon * mw[k] *
m_spwork[k] * grad_X[n*ldx + k];
78 sum[n] += fluxes[n*ldf + k];
82 for (
size_t n = 0; n < ndim; n++) {
83 for (
size_t k = 0; k <
m_nsp; k++) {
84 fluxes[n*ldf + k] -= y[k]*sum[n];
97 "negative temperature {}", t);
99 GasTransport::update_T();
115 for (
size_t k = 0; k <
m_nsp; k++) {
123 for (
size_t k = 0; k <
m_nsp; k++) {
127 for (
size_t k = 0; k <
m_nsp; k++) {
Headers for the MixTransport object, which models transport properties in ideal gas solutions using a...
Base class for exceptions thrown by Cantera classes.
vector_fp m_molefracs
Vector of species mole fractions.
std::vector< vector_fp > m_condcoeffs
temperature fits of the heat conduction
vector_fp m_polytempvec
Powers of the ln temperature, up to fourth order.
bool m_visc_ok
Update boolean for mixture rule for the mixture viscosity.
bool m_bindiff_ok
Update boolean for the binary diffusivities at unit pressure.
doublereal m_temp
Current value of the temperature at which the properties in this object are calculated (Kelvin).
int m_mode
Type of the polynomial fits to temperature.
virtual void getMixDiffCoeffs(doublereal *const d)
Returns the Mixture-averaged diffusion coefficients [m^2/s].
virtual void init(thermo_t *thermo, int mode=0, int log_level=0)
Initialize a transport manager.
vector_fp m_spwork
work space length = m_kk
doublereal m_sqrt_t
current value of temperature to 1/2 power
virtual void getThermalDiffCoeffs(doublereal *const dt)
Return the thermal diffusion coefficients.
virtual doublereal thermalConductivity()
Returns the mixture thermal conductivity (W/m /K)
virtual void update_T()
Update the internal parameters whenever the temperature has changed.
vector_fp m_cond
vector of species thermal conductivities (W/m /K)
bool m_spcond_ok
Update boolean for the species thermal conductivities.
virtual void init(thermo_t *thermo, int mode=0, int log_level=0)
Initialize a transport manager.
virtual void getMobilities(doublereal *const mobil)
Get the Electrical mobilities (m^2/V/s).
void updateCond_T()
Update the temperature dependent parts of the species thermal conductivities.
doublereal m_lambda
Internal storage for the calculated mixture thermal conductivity.
virtual void update_C()
Update the internal parameters whenever the concentrations have changed.
bool m_condmix_ok
Update boolean for the mixture rule for the mixture thermal conductivity.
virtual void getSpeciesFluxes(size_t ndim, const doublereal *const grad_T, size_t ldx, const doublereal *const grad_X, size_t ldf, doublereal *const fluxes)
Get the species diffusive mass fluxes wrt to the mass averaged velocity, given the gradients in mole ...
double molarDensity() const
Molar density (kmol/m^3).
size_t nSpecies() const
Returns the number of species in the phase.
const vector_fp & molecularWeights() const
Return a const reference to the internal vector of molecular weights.
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.
doublereal temperature() const
Temperature (K).
Base class for a phase with thermodynamic properties.
thermo_t * m_thermo
pointer to the object representing the phase
size_t m_nsp
Number of species.
const double Tiny
Small number to compare differences of mole fractions against.
const double Boltzmann
Boltzmann constant [J/K].
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
const double ElectronCharge
Elementary charge [C].
Namespace for the Cantera kernel.
doublereal dot4(const V &x, const V &y)
Templated Inner product of two vectors of length 4.
doublereal dot5(const V &x, const V &y)
Templated Inner product of two vectors of length 5.
Contains declarations for string manipulation functions within Cantera.