8 GasTransport::GasTransport(ThermoPhase* thermo) :
38 GasTransport::GasTransport(
const GasTransport& right) :
67 GasTransport& GasTransport::operator=(
const GasTransport& right)
121 for (
size_t j = 0; j <
m_nsp; j++) {
122 for (
size_t k = j; k <
m_nsp; k++) {
140 void GasTransport::update_T(
void)
178 doublereal vismix = 0.0;
186 for (
size_t k = 0; k <
m_nsp; k++) {
195 doublereal vratiokj, wratiojk, factor1;
202 for (
size_t j = 0; j <
m_nsp; j++) {
203 for (
size_t k = j; k <
m_nsp; k++) {
210 m_phi(j,k) =
m_phi(k,j)/(vratiokj * wratiojk);
220 for (
size_t k = 0; k <
m_nsp; k++) {
225 for (
size_t k = 0; k <
m_nsp; k++) {
240 for (
size_t i = 0; i <
m_nsp; i++) {
241 for (
size_t j = i; j <
m_nsp; j++) {
248 for (
size_t i = 0; i <
m_nsp; i++) {
249 for (
size_t j = i; j <
m_nsp; j++) {
268 throw CanteraError(
" MixTransport::getBinaryDiffCoeffs()",
"ld is too small");
271 for (
size_t i = 0; i <
m_nsp; i++)
272 for (
size_t j = 0; j <
m_nsp; j++) {
273 d[ld*j + i] = rp *
m_bdiff(i,j);
288 doublereal sumxw = 0.0;
293 for (
size_t k = 0; k <
m_nsp; k++) {
296 for (
size_t k = 0; k <
m_nsp; k++) {
298 for (
size_t j = 0; j <
m_nsp; j++) {
326 for (
size_t k = 0; k <
m_nsp; k++) {
328 for (
size_t j = 0; j <
m_nsp; j++) {
358 for (
size_t k=0; k<
m_nsp; k++) {
361 for (
size_t i=0; i<
m_nsp; i++) {
370 d[k] = 1.0 / (sum1 + sum2);
virtual void updateSpeciesViscosities()
Update the pure-species viscosities.
This structure holds transport model parameters relevant to transport in ideal gases with a kinetic t...
bool m_visc_ok
Update boolean for mixture rule for the mixture viscosity.
thermo_t * thermo
Pointer to the ThermoPhase object.
std::vector< vector_fp > m_diffcoeffs
Polynomial fits to the binary diffusivity of each species.
doublereal dot4(const V &x, const V &y)
Templated Inner product of two vectors of length 4.
virtual void getBinaryDiffCoeffs(const size_t ld, doublereal *const d)
Returns the matrix of binary diffusion coefficients.
bool m_bindiff_ok
Update boolean for the binary diffusivities at unit pressure.
thermo_t * m_thermo
pointer to the object representing the phase
DenseMatrix m_wratjk
Holds square roots of molecular weight ratios.
DenseMatrix m_bdiff
Matrix of binary diffusion coefficients at the reference pressure and the current temperature Size is...
doublereal m_temp
Current value of the temperature at which the properties in this object are calculated (Kelvin)...
virtual void updateViscosity_T()
Update the temperature-dependent viscosity terms.
std::vector< vector_fp > diffcoeffs
temperature-fits of the diffusivity
int m_mode
Type of the polynomial fits to temperature.
void resize(size_t n, size_t m, doublereal v=0.0)
Resize the matrix.
doublereal m_sqrt_kbt
current value of Boltzman's constant times the temperature.
virtual void updateDiff_T()
Update the binary diffusion coefficients.
const doublereal SqrtEight
sqrt(8)
vector_fp m_visc
vector of species viscosities (kg /m /s).
vector_fp m_spwork
work space length = m_kk
void multiply(const DenseMatrix &A, const double *const b, double *const prod)
Multiply A*b and return the result in prod. Uses BLAS routine DGEMV.
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.
bool m_spvisc_ok
Update boolean for the species viscosities.
virtual void getMixDiffCoeffsMole(doublereal *const d)
Returns the mixture-averaged diffusion coefficients [m^2/s].
bool m_viscwt_ok
Update boolean for the weighting factors for the mixture viscosity.
DenseMatrix m_phi
m_phi is a Viscosity Weighting Function. size = m_nsp * n_nsp
doublereal m_t14
Current value of temperature to 1/4 power.
virtual void getMixDiffCoeffsMass(doublereal *const d)
Returns the mixture-averaged diffusion coefficients [m^2/s].
virtual bool initGas(GasTransportParams &tr)
Called by TransportFactory to set parameters.
size_t nSpecies() const
Returns the number of species in the phase.
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
const vector_fp & molecularWeights() const
Return a const reference to the internal vector of molecular weights.
doublereal temperature() const
Temperature (K).
vector_fp m_sqvisc
vector of square root of species viscosities sqrt(kg /m /s).
doublereal dot5(const V &x, const V &y)
Templated Inner product of two vectors of length 5.
std::vector< vector_fp > visccoeffs
temperature-fit of the viscosity
doublereal m_sqrt_t
current value of temperature to 1/2 power
doublereal meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
#define DATA_PTR(vec)
Creates a pointer to the start of the raw data for a vector.
size_t m_nsp
Number of species.
doublereal m_logt
Current value of the log of the temperature.
DenseMatrix m_wratkj1
Holds square roots of molecular weight ratios.
doublereal m_viscmix
Internal storage for the viscosity of the mixture (kg /m /s)
doublereal m_kbt
Current value of Boltzman's constant times the temperature (Joules)
doublereal m_t32
Current value of temperature to the 3/2 power.
virtual doublereal viscosity()
Viscosity of the mixture (kg /m /s)
std::vector< vector_fp > m_visccoeffs
Polynomial fits to the viscosity of each species.
Class that holds the data that is read in from the xml file, and which is used for processing of the ...
const doublereal Boltzmann
Boltzmann's constant [J/K].
vector_fp m_molefracs
Vector of species mole fractions.
vector_fp m_mw
Local copy of the species molecular weights.