16 MixTransport::MixTransport() :
34 MixTransport& MixTransport::operator=(
const MixTransport& right)
39 GasTransport::operator=(right);
69 for (
size_t k = 0; k <
m_nsp; k++) {
82 doublereal sum1 = 0.0, sum2 = 0.0;
83 for (
size_t k = 0; k <
m_nsp; k++) {
95 for (
size_t k = 0; k <
m_nsp; k++) {
101 size_t ldx,
const doublereal*
const grad_X,
102 size_t ldf, doublereal*
const fluxes)
111 for (
size_t n = 0; n < ndim; n++) {
112 for (
size_t k = 0; k <
m_nsp; k++) {
113 fluxes[n*ldf + k] = -rhon * mw[k] *
m_spwork[k] * grad_X[n*ldx + k];
114 sum[n] += fluxes[n*ldf + k];
118 for (
size_t n = 0; n < ndim; n++) {
119 for (
size_t k = 0; k <
m_nsp; k++) {
120 fluxes[n*ldf + k] -= y[k]*sum[n];
133 "negative temperature {}", t);
135 GasTransport::update_T();
151 for (
size_t k = 0; k <
m_nsp; k++) {
159 for (
size_t k = 0; k <
m_nsp; k++) {
163 for (
size_t k = 0; k <
m_nsp; k++) {
const vector_fp & molecularWeights() const
Return a const reference to the internal vector of molecular weights.
virtual Transport * duplMyselfAsTransport() const
Duplication routine for objects which inherit from Transport.
vector_fp m_cond
vector of species thermal conductivities (W/m /K)
bool m_visc_ok
Update boolean for mixture rule for the mixture viscosity.
doublereal temperature() const
Temperature (K).
const doublereal * massFractions() const
Return a const pointer to the mass fraction array.
doublereal dot4(const V &x, const V &y)
Templated Inner product of two vectors of length 4.
bool m_condmix_ok
Update boolean for the mixture rule for the mixture thermal conductivity.
virtual void update_C()
Update the internal parameters whenever the concentrations have changed.
bool m_bindiff_ok
Update boolean for the binary diffusivities at unit pressure.
thermo_t * m_thermo
pointer to the object representing the phase
Base class for transport property managers.
size_t nSpecies() const
Returns the number of species in the phase.
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 ...
doublereal m_temp
Current value of the temperature at which the properties in this object are calculated (Kelvin)...
bool m_spcond_ok
Update boolean for the species thermal conductivities.
virtual void getMobilities(doublereal *const mobil)
Get the Electrical mobilities (m^2/V/s).
Base class for a phase with thermodynamic properties.
int m_mode
Type of the polynomial fits to temperature.
virtual void update_T()
Update the internal parameters whenever the temperature has changed.
void updateCond_T()
Update the temperature dependent parts of the species thermal conductivities.
doublereal molarDensity() const
Molar density (kmol/m^3).
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
virtual void getMixDiffCoeffs(doublereal *const d)
Returns the Mixture-averaged diffusion coefficients [m^2/s].
Base class for exceptions thrown by Cantera classes.
vector_fp m_polytempvec
Powers of the ln temperature, up to fourth order.
void getMoleFractions(doublereal *const x) const
Get the species mole fraction vector.
MixTransport()
Default constructor.
doublereal m_lambda
Internal storage for the calculated mixture thermal conductivity.
bool m_debug
Debug flag - turns on more printing.
doublereal dot5(const V &x, const V &y)
Templated Inner product of two vectors of length 5.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
doublereal m_sqrt_t
current value of temperature to 1/2 power
const doublereal Tiny
Small number to compare differences of mole fractions against.
Contains declarations for string manipulation functions within Cantera.
size_t m_nsp
Number of species.
virtual void getThermalDiffCoeffs(doublereal *const dt)
Return the thermal diffusion coefficients.
virtual void init(thermo_t *thermo, int mode=0, int log_level=0)
Initialize a transport manager.
std::vector< vector_fp > m_condcoeffs
temperature fits of the heat conduction
Namespace for the Cantera kernel.
Class MixTransport implements mixture-averaged transport properties for ideal gas mixtures...
virtual doublereal thermalConductivity()
Returns the mixture thermal conductivity (W/m /K)
Headers for the MixTransport object, which models transport properties in ideal gas solutions using a...
const doublereal Boltzmann
Boltzmann's constant [J/K].
vector_fp m_molefracs
Vector of species mole fractions.
Class GasTransport implements some functions and properties that are shared by the MixTransport and M...