Cantera  2.1.2
PecosTransport.cpp
Go to the documentation of this file.
1 /**
2  * @file PecosTransport.cpp
3  * Mixture-averaged transport properties.
4  */
5 
13 
14 #include <sstream>
15 
16 using namespace std;
17 
18 namespace Cantera
19 {
20 
21 PecosTransport::PecosTransport() :
22  m_nsp(0),
23  m_temp(-1.0),
24  m_logt(0.0)
25 {
26 }
27 
29 {
30  // constant substance attributes
31  m_thermo = tr.thermo;
32  m_nsp = m_thermo->nSpecies();
33 
34  // make a local copy of the molecular weights
35  m_mw.resize(m_nsp);
36  copy(m_thermo->molecularWeights().begin(),
37  m_thermo->molecularWeights().end(), m_mw.begin());
38 
39  // copy polynomials and parameters into local storage
40  m_poly = tr.poly;
41  m_visccoeffs = tr.visccoeffs;
42  m_condcoeffs = tr.condcoeffs;
43  m_diffcoeffs = tr.diffcoeffs;
44 
45  m_zrot = tr.zrot;
46  m_crot = tr.crot;
47  m_epsilon = tr.epsilon;
48  m_mode = tr.mode_;
49  m_diam = tr.diam;
50  m_eps = tr.eps;
51  m_alpha = tr.alpha;
52  m_dipoleDiag.resize(m_nsp);
53  for (int i = 0; i < m_nsp; i++) {
54  m_dipoleDiag[i] = tr.dipole(i,i);
55  }
56 
57  m_phi.resize(m_nsp, m_nsp, 0.0);
58  m_wratjk.resize(m_nsp, m_nsp, 0.0);
59  m_wratkj1.resize(m_nsp, m_nsp, 0.0);
60  int j, k;
61  for (j = 0; j < m_nsp; j++)
62  for (k = j; k < m_nsp; k++) {
63  m_wratjk(j,k) = sqrt(m_mw[j]/m_mw[k]);
64  m_wratjk(k,j) = sqrt(m_wratjk(j,k));
65  m_wratkj1(j,k) = sqrt(1.0 + m_mw[k]/m_mw[j]);
66  }
67 
68  m_polytempvec.resize(5);
69  m_visc.resize(m_nsp);
70  m_sqvisc.resize(m_nsp);
71  m_cond.resize(m_nsp);
72  m_bdiff.resize(m_nsp, m_nsp);
73 
74  m_molefracs.resize(m_nsp);
75  m_spwork.resize(m_nsp);
76 
77  // set flags all false
78  m_viscmix_ok = false;
79  m_viscwt_ok = false;
80  m_spvisc_ok = false;
81  m_spcond_ok = false;
82  m_condmix_ok = false;
83  m_spcond_ok = false;
84  m_diffmix_ok = false;
85  m_abc_ok = false;
86 
87  // read blottner fit parameters (A,B,C)
89 
90  // set specific heats
91  cv_rot.resize(m_nsp);
92  cp_R.resize(m_nsp);
93  cv_int.resize(m_nsp);
94 
95  for (k = 0; k < m_nsp; k++) {
96  cv_rot[k] = tr.crot[k];
97  cp_R[k] = ((IdealGasPhase*)tr.thermo)->cp_R_ref()[k];
98  cv_int[k] = cp_R[k] - 2.5 - cv_rot[k];
99  }
100  return true;
101 }
102 
104 {
105  update_T();
106  update_C();
107 
108  if (m_viscmix_ok) {
109  return m_viscmix;
110  }
111 
112  doublereal vismix = 0.0;
113  int k;
114  // update m_visc and m_phi if necessary
115  if (!m_viscwt_ok) {
117  }
118 
119  multiply(m_phi, DATA_PTR(m_molefracs), DATA_PTR(m_spwork));
120 
121  for (k = 0; k < m_nsp; k++) {
122  vismix += m_molefracs[k] * m_visc[k]/m_spwork[k]; //denom;
123  }
124  m_viscmix = vismix;
125  return vismix;
126 }
127 
128 void PecosTransport::getBinaryDiffCoeffs(const size_t ld, doublereal* const d)
129 {
130  int i,j;
131 
132  update_T();
133 
134  // if necessary, evaluate the binary diffusion coefficents
135  if (!m_bindiff_ok) {
136  updateDiff_T();
137  }
138 
139  doublereal rp = 1.0/pressure_ig();
140  for (i = 0; i < m_nsp; i++)
141  for (j = 0; j < m_nsp; j++) {
142  d[ld*j + i] = rp * m_bdiff(i,j);
143  }
144 }
145 
146 void PecosTransport::getMobilities(doublereal* const mobil)
147 {
148  int k;
149  getMixDiffCoeffs(DATA_PTR(m_spwork));
150  doublereal c1 = ElectronCharge / (Boltzmann * m_temp);
151  for (k = 0; k < m_nsp; k++) {
152  mobil[k] = c1 * m_spwork[k] * m_thermo->charge(k);
153  }
154 }
155 
157 {
158  int k;
159  doublereal lambda = 0.0;
160 
161  update_T();
162  update_C();
163 
164  // update m_cond and m_phi if necessary
165  if (!m_spcond_ok) {
166  updateCond_T();
167  }
168  if (!m_condmix_ok) {
169 
170  multiply(m_phi, DATA_PTR(m_molefracs), DATA_PTR(m_spwork));
171 
172  for (k = 0; k < m_nsp; k++) {
173  lambda += m_molefracs[k] * m_cond[k]/m_spwork[k]; //denom;
174  }
175 
176  }
177  m_lambda = lambda;
178  return m_lambda;
179 
180 }
181 
182 void PecosTransport::getThermalDiffCoeffs(doublereal* const dt)
183 {
184  int k;
185  for (k = 0; k < m_nsp; k++) {
186  dt[k] = 0.0;
187  }
188 }
189 
191  const doublereal* const grad_T,
192  size_t ldx, const doublereal* const grad_X,
193  size_t ldf, doublereal* const fluxes)
194 {
195  size_t n = 0;
196  int k;
197 
198  update_T();
199  update_C();
200 
201  getMixDiffCoeffs(DATA_PTR(m_spwork));
202 
203  const vector_fp& mw = m_thermo->molecularWeights();
204  const doublereal* y = m_thermo->massFractions();
205  doublereal rhon = m_thermo->molarDensity();
206 
207  vector_fp sum(ndim,0.0);
208 
209  doublereal correction=0.0;
210  // grab 2nd (summation) term -- still need to multiply by mass fraction (\rho_s / \rho)
211  for (k = 0; k < m_nsp; k++) {
212  correction += rhon * mw[k] * m_spwork[k] * grad_X[n*ldx + k];
213  }
214 
215  for (n = 0; n < ndim; n++) {
216  for (k = 0; k < m_nsp; k++) {
217  fluxes[n*ldf + k] = -rhon * mw[k] * m_spwork[k] * grad_X[n*ldx + k] + y[k]*correction;
218  sum[n] += fluxes[n*ldf + k];
219  }
220  }
221  // add correction flux to enforce sum to zero
222  for (n = 0; n < ndim; n++) {
223  for (k = 0; k < m_nsp; k++) {
224  fluxes[n*ldf + k] -= y[k]*sum[n];
225  }
226  }
227 }
228 
229 void PecosTransport::getMixDiffCoeffs(doublereal* const d)
230 {
231  update_T();
232  update_C();
233 
234  // update the binary diffusion coefficients if necessary
235  if (!m_bindiff_ok) {
236  updateDiff_T();
237  }
238 
239  int k, j;
240  doublereal mmw = m_thermo->meanMolecularWeight();
241  doublereal sumxw = 0.0, sum2;
242  doublereal p = pressure_ig();
243  if (m_nsp == 1) {
244  d[0] = m_bdiff(0,0) / p;
245  } else {
246  for (k = 0; k < m_nsp; k++) {
247  sumxw += m_molefracs[k] * m_mw[k];
248  }
249  for (k = 0; k < m_nsp; k++) {
250  sum2 = 0.0;
251  for (j = 0; j < m_nsp; j++) {
252  if (j != k) {
253  sum2 += m_molefracs[j] / m_bdiff(j,k);
254  }
255  }
256  if (sum2 <= 0.0) {
257  d[k] = m_bdiff(k,k) / p;
258  } else {
259  d[k] = (sumxw - m_molefracs[k] * m_mw[k])/(p * mmw * sum2);
260  }
261  }
262  }
263 }
264 
265 void PecosTransport::getMixDiffCoeffsMole(doublereal* const d)
266 {
267  update_T();
268  update_C();
269 
270  // update the binary diffusion coefficients if necessary
271  if (!m_bindiff_ok) {
272  updateDiff_T();
273  }
274 
275  doublereal p = m_thermo->pressure();
276  if (m_nsp == 1) {
277  d[0] = m_bdiff(0,0) / p;
278  } else {
279  for (int k = 0; k < m_nsp; k++) {
280  double sum2 = 0.0;
281  for (int j = 0; j < m_nsp; j++) {
282  if (j != k) {
283  sum2 += m_molefracs[j] / m_bdiff(j,k);
284  }
285  }
286  if (sum2 <= 0.0) {
287  d[k] = m_bdiff(k,k) / p;
288  } else {
289  d[k] = (1 - m_molefracs[k]) / (p * sum2);
290  }
291  }
292  }
293 }
294 
295 void PecosTransport::getMixDiffCoeffsMass(doublereal* const d)
296 {
297  update_T();
298  update_C();
299 
300  // update the binary diffusion coefficients if necessary
301  if (!m_bindiff_ok) {
302  updateDiff_T();
303  }
304 
305  doublereal mmw = m_thermo->meanMolecularWeight();
306  doublereal p = m_thermo->pressure();
307 
308  if (m_nsp == 1) {
309  d[0] = m_bdiff(0,0) / p;
310  } else {
311  for (int k=0; k<m_nsp; k++) {
312  double sum1 = 0.0;
313  double sum2 = 0.0;
314  for (int i=0; i<m_nsp; i++) {
315  if (i==k) {
316  continue;
317  }
318  sum1 += m_molefracs[i] / m_bdiff(k,i);
319  sum2 += m_molefracs[i] * m_mw[i] / m_bdiff(k,i);
320  }
321  sum1 *= p;
322  sum2 *= p * m_molefracs[k] / (mmw - m_mw[k]*m_molefracs[k]);
323  d[k] = 1.0 / (sum1 + sum2);
324  }
325  }
326 }
327 
328 /**
329  * @internal This is called whenever a transport property is
330  * requested from ThermoSubstance if the temperature has changed
331  * since the last call to update_T.
332  */
334 {
335  doublereal t = m_thermo->temperature();
336  if (t == m_temp) {
337  return;
338  }
339  if (t <= 0.0) {
340  throw CanteraError("PecosTransport::update_T",
341  "negative temperature "+fp2str(t));
342  }
343  m_temp = t;
344  m_logt = log(m_temp);
345  m_kbt = Boltzmann * m_temp;
346  m_sqrt_t = sqrt(m_temp);
347  m_t14 = sqrt(m_sqrt_t);
348  m_t32 = m_temp * m_sqrt_t;
349  m_sqrt_kbt = sqrt(Boltzmann*m_temp);
350 
351  // compute powers of log(T)
352  m_polytempvec[0] = 1.0;
353  m_polytempvec[1] = m_logt;
354  m_polytempvec[2] = m_logt*m_logt;
355  m_polytempvec[3] = m_logt*m_logt*m_logt;
356  m_polytempvec[4] = m_logt*m_logt*m_logt*m_logt;
357 
358  // temperature has changed, so polynomial fits will need to be redone.
359  m_viscmix_ok = false;
360  m_spvisc_ok = false;
361  m_viscwt_ok = false;
362  m_spcond_ok = false;
363  m_diffmix_ok = false;
364  m_bindiff_ok = false;
365  m_abc_ok = false;
366  m_condmix_ok = false;
367 }
368 
370 {
371  // signal that concentration-dependent quantities will need to
372  // be recomputed before use, and update the local mole
373  // fractions.
374 
375  m_viscmix_ok = false;
376  m_diffmix_ok = false;
377  m_condmix_ok = false;
378 
379  m_thermo->getMoleFractions(DATA_PTR(m_molefracs));
380 
381  // add an offset to avoid a pure species condition
382  int k;
383  for (k = 0; k < m_nsp; k++) {
384  m_molefracs[k] = std::max(Tiny, m_molefracs[k]);
385  }
386 }
387 
389 {
390  int k;
391  doublereal fivehalves = 5/2;
392  for (k = 0; k < m_nsp; k++) {
393  // need to add cv_elec in the future
394  m_cond[k] = m_visc[k] * (fivehalves * cv_int[k] + cv_rot[k] + m_thermo->cv_vib(k,m_temp));
395  }
396  m_spcond_ok = true;
397  m_condmix_ok = false;
398 }
399 
401 {
402  // evaluate binary diffusion coefficients at unit pressure
403  int i,j;
404  int ic = 0;
405  if (m_mode == CK_Mode) {
406  for (i = 0; i < m_nsp; i++) {
407  for (j = i; j < m_nsp; j++) {
408  m_bdiff(i,j) = exp(dot4(m_polytempvec, m_diffcoeffs[ic]));
409  m_bdiff(j,i) = m_bdiff(i,j);
410  ic++;
411  }
412  }
413  } else {
414  for (i = 0; i < m_nsp; i++) {
415  for (j = i; j < m_nsp; j++) {
416  m_bdiff(i,j) = m_temp * m_sqrt_t*dot5(m_polytempvec,
417  m_diffcoeffs[ic]);
418  m_bdiff(j,i) = m_bdiff(i,j);
419  ic++;
420  }
421  }
422  }
423 
424  m_bindiff_ok = true;
425  m_diffmix_ok = false;
426 }
427 
429 {
430 
431  // blottner
432  // return 0.10*std::exp(_a*(logT*logT) + _b*logT + _c);
433 
434  int k;
435  // iterate over species, update pure-species viscosity
436  for (k = 0; k < m_nsp; k++) {
437  m_visc[k] = 0.10*std::exp(a[k]*(m_logt*m_logt) + b[k]*m_logt + c[k]);
438  m_sqvisc[k] = sqrt(m_visc[k]);
439  }
440 
441  // time to update mixing
442  m_spvisc_ok = true;
443 }
444 
446 {
447  // istringstream blot
448  // ("Air 2.68142000000e-02 3.17783800000e-01 -1.13155513000e+01\n"
449  // "CPAir 2.68142000000e-02 3.17783800000e-01 -1.13155513000e+01\n"
450  // "N 1.15572000000e-02 6.03167900000e-01 -1.24327495000e+01\n"
451  // "N2 2.68142000000e-02 3.17783800000e-01 -1.13155513000e+01\n"
452  // "CPN2 2.68142000000e-02 3.17783800000e-01 -1.13155513000e+01\n"
453  // "NO 4.36378000000e-02 -3.35511000000e-02 -9.57674300000e+00\n"
454  // "O 2.03144000000e-02 4.29440400000e-01 -1.16031403000e+01\n"
455  // "O2 4.49290000000e-02 -8.26158000000e-02 -9.20194750000e+00\n"
456  // "C -8.3285e-3 0.7703240 -12.7378000\n"
457  // "C2 -8.4311e-3 0.7876060 -13.0268000\n"
458  // "C3 -8.4312e-3 0.7876090 -12.8240000\n"
459  // "C2H -2.4241e-2 1.0946550 -14.5835500\n"
460  // "CN -8.3811e-3 0.7860330 -12.9406000\n"
461  // "CO -0.019527394 1.013295 -13.97873\n"
462  // "CO2 -0.019527387 1.047818 -14.32212\n"
463  // "HCN -2.4241e-2 1.0946550 -14.5835500\n"
464  // "H -8.3912e-3 0.7743270 -13.6653000\n"
465  // "H2 -8.3346e-3 0.7815380 -13.5351000\n"
466  // "e 0.00000000000e+00 0.00000000000e+00 -1.16031403000e+01\n");
467 
468  //
469  // from: AIAA-1997-2474 and Sandia Report SC-RR-70-754
470  //
471  // # Air -- Identical to N2 fit
472  // # N -- Sandia Report SC-RR-70-754
473  // # N2 -- Sandia Report SC-RR-70-754
474  // # CPN2 -- Identical to N2 fit
475  // # NO -- Sandia Report SC-RR-70-754
476  // # O -- Sandia Report SC-RR-70-754
477  // # O2 -- Sandia Report SC-RR-70-754
478  // # C -- AIAA-1997-2474
479  // # C2 -- AIAA-1997-2474
480  // # C3 -- AIAA-1997-2474
481  // # C2H -- wild-ass guess: identical to HCN fit
482  // # CN -- AIAA-1997-2474
483  // # CO -- AIAA-1997-2474
484  // # CO2 -- AIAA-1997-2474
485  // # HCN -- AIAA-1997-2474
486  // # H -- AIAA-1997-2474
487  // # H2 -- AIAA-1997-2474
488  // # e -- Sandia Report SC-RR-70-754
489 
490  istringstream blot
491  ("Air 2.68142000000e-02 3.17783800000e-01 -1.13155513000e+01\n"
492  "CPAir 2.68142000000e-02 3.17783800000e-01 -1.13155513000e+01\n"
493  "N 1.15572000000e-02 6.03167900000e-01 -1.24327495000e+01\n"
494  "N2 2.68142000000e-02 3.17783800000e-01 -1.13155513000e+01\n"
495  "CPN2 2.68142000000e-02 3.17783800000e-01 -1.13155513000e+01\n"
496  "NO 4.36378000000e-02 -3.35511000000e-02 -9.57674300000e+00\n"
497  "O 2.03144000000e-02 4.29440400000e-01 -1.16031403000e+01\n"
498  "O2 4.49290000000e-02 -8.26158000000e-02 -9.20194750000e+00\n"
499  "C -8.3285e-3 0.7703240 -12.7378000\n"
500  "C2 -8.4311e-3 0.7876060 -13.0268000\n"
501  "C3 -8.4312e-3 0.7876090 -12.8240000\n"
502  "C2H -2.4241e-2 1.0946550 -14.5835500\n"
503  "CN -8.3811e-3 0.7860330 -12.9406000\n"
504  "CO -0.019527394 1.013295 -13.97873\n"
505  "CO2 -0.019527387 1.047818 -14.32212\n"
506  "HCN -2.4241e-2 1.0946550 -14.5835500\n"
507  "H -8.3912e-3 0.7743270 -13.6653000\n"
508  "H2 -8.3346e-3 0.7815380 -13.5351000\n"
509  "e 0.00000000000e+00 0.00000000000e+00 -1.16031403000e+01\n");
510 
511  string line;
512  string name;
513  string ss1,ss2,ss3,ss4,sss;
514  int k;
515  int i = 0;
516 
517  while (std::getline(blot, line)) {
518 
519  istringstream ss(line);
520  std::getline(ss, ss1, ' ');
521  std::getline(ss, ss2, ' ');
522  std::getline(ss, ss3, ' ');
523  std::getline(ss, ss4, ' ');
524  name = ss1;
525 
526  // now put coefficients in correct species
527  for (k = 0; k < m_nsp; k++) {
528  string sss = m_thermo->speciesName(k);
529 
530  // this is the right species index
531  if (sss.compare(ss1) == 0) {
532  a[k] = fpValue(ss2);
533  b[k] = fpValue(ss3);
534  c[k] = fpValue(ss4);
535 
536  // index
537  i++;
538  } else { // default to air
539 
540  a[k] = 0.026;
541  b[k] = 0.3;
542  c[k] = -11.3;
543  }
544 
545  } // done with for loop
546  }
547 
548 
549  // for (k = 0; k < m_nsp; k++)
550  // {
551  // string sss = m_thermo->speciesName(k);
552  // cout << sss << endl;
553  // cout << a[k] << endl;
554  // cout << b[k] << endl;
555  // cout << c[k] << endl;
556  // }
557 
558  // simple sanity check
559  // if(i != m_nsp-1)
560  // {
561  // std::cout << "error\n" << i << std::endl;
562  // }
563 
564 }
565 
567 {
568  doublereal vratiokj, wratiojk, factor1;
569 
570  if (!m_spvisc_ok) {
572  }
573 
574  // see Eq. (9-5.15) of Reid, Prausnitz, and Poling
575  int j, k;
576  for (j = 0; j < m_nsp; j++) {
577  for (k = j; k < m_nsp; k++) {
578  vratiokj = m_visc[k]/m_visc[j];
579  wratiojk = m_mw[j]/m_mw[k];
580 
581  // Note that m_wratjk(k,j) holds the square root of
582  // m_wratjk(j,k)!
583  factor1 = 1.0 + (m_sqvisc[k]/m_sqvisc[j]) * m_wratjk(k,j);
584  m_phi(k,j) = factor1*factor1 /
585  (SqrtEight * m_wratkj1(j,k));
586  m_phi(j,k) = m_phi(k,j)/(vratiokj * wratiojk);
587  }
588  }
589  m_viscwt_ok = true;
590 }
591 
592 }
doublereal fpValue(const std::string &val)
Translate a string into one doublereal value.
DenseMatrix diam
hard-sphere diameter for (i,j) collision
virtual doublereal thermalConductivity()
Returns the mixture thermal conductivity.
This structure holds transport model parameters relevant to transport in ideal gases with a kinetic t...
vector_fp alpha
Polarizability of each species in the phase.
thermo_t * thermo
Pointer to the ThermoPhase object.
Various templated functions that carry out common vector operations (see Templated Utility Functions)...
doublereal dot4(const V &x, const V &y)
Templated Inner product of two vectors of length 4.
Definition: utilities.h:67
virtual doublereal cv_vib(int, double) const
Definition: ThermoPhase.h:298
virtual void getThermalDiffCoeffs(doublereal *const dt)
Return the thermal diffusion coefficients.
Class IdealGasPhase represents low-density gases that obey the ideal gas equation of state...
thermo_t * m_thermo
pointer to the object representing the phase
virtual doublereal viscosity()
Viscosity of the mixture.
doublereal molarDensity() const
Molar density (kmol/m^3).
Definition: Phase.cpp:597
Header file defining class PecosTransport.
void getMoleFractions(doublereal *const x) const
Get the species mole fraction vector.
Definition: Phase.cpp:519
void read_blottner_transport_table()
Reads the transport table specified (currently defaults to internal file)
Header file defining class TransportFactory (see TransportFactory)
std::vector< vector_fp > diffcoeffs
temperature-fits of the diffusivity
vector_fp zrot
Rotational relaxation number for the species in the current phase.
void resize(size_t n, size_t m, doublereal v=0.0)
Resize the matrix.
Definition: DenseMatrix.cpp:71
vector_fp eps
Lennard-Jones well-depth of the species in the current phase.
ThermoPhase object for the ideal gas equation of state - workhorse for Cantera (see Thermodynamic Pro...
const doublereal SqrtEight
sqrt(8)
Definition: ct_defs.h:134
virtual void update_C()
This is called the first time any transport property is requested from Mixture after the concentratio...
virtual void getMixDiffCoeffs(doublereal *const d)
Mixture-averaged diffusion coefficients [m^2/s].
void getMixDiffCoeffsMass(doublereal *const d)
Returns the mixture-averaged diffusion coefficients [m^2/s].
std::string fp2str(const double x, const std::string &fmt)
Convert a double into a c++ string.
Definition: stringUtils.cpp:29
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 ...
virtual void getMobilities(doublereal *const mobil)
Get the Electrical mobilities (m^2/V/s).
const doublereal * massFractions() const
Return a const pointer to the mass fraction array.
Definition: Phase.h:454
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.
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:68
void updateDiff_T()
Update the binary diffusion coefficients.
virtual void getBinaryDiffCoeffs(const size_t ld, doublereal *const d)
binary diffusion coefficients
vector_fp crot
Dimensionless rotational heat capacity of the species in the current phase.
void updateSpeciesViscosities()
Update the pure-species viscosities.
DenseMatrix epsilon
The effective well depth for (i,j) collisions.
doublereal pressure_ig() const
Calculate the pressure from the ideal gas law.
size_t nSpecies() const
Returns the number of species in the phase.
Definition: Phase.h:252
std::vector< std::vector< int > > poly
This is vector of vectors containing the integer lookup value for the (i,j) interaction.
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
Definition: ThermoPhase.h:314
void updateCond_T()
Update the temperature-dependent parts of the mixture-averaged thermal conductivity.
const vector_fp & molecularWeights() const
Return a const reference to the internal vector of molecular weights.
Definition: Phase.cpp:505
doublereal temperature() const
Temperature (K).
Definition: Phase.h:528
int mode_
Mode parameter.
doublereal dot5(const V &x, const V &y)
Templated Inner product of two vectors of length 5.
Definition: utilities.h:85
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:165
DenseMatrix dipole
The effective dipole moment for (i,j) collisions.
std::vector< vector_fp > visccoeffs
temperature-fit of the viscosity
const doublereal Tiny
Small number to compare differences of mole fractions against.
Definition: ct_defs.h:155
std::vector< vector_fp > condcoeffs
temperature-fits of the heat conduction
doublereal meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
Definition: Phase.h:588
void updateViscosity_T()
Update the temperature-dependent viscosity terms.
Contains declarations for string manipulation functions within Cantera.
#define DATA_PTR(vec)
Creates a pointer to the start of the raw data for a vector.
Definition: ct_defs.h:36
void getMixDiffCoeffsMole(doublereal *const d)
Returns the mixture-averaged diffusion coefficients [m^2/s].
virtual bool initGas(GasTransportParams &tr)
Initialize the transport object.
Header file for class ThermoPhase, the base class for phases with thermodynamic properties, and the text for the Module thermoprops (see Thermodynamic Properties and class ThermoPhase).
Class that holds the data that is read in from the xml file, and which is used for processing of the ...
std::string speciesName(size_t k) const
Name of the species with index k.
Definition: Phase.cpp:246
const doublereal Boltzmann
Boltzmann's constant [J/K].
Definition: ct_defs.h:78
doublereal charge(size_t k) const
Dimensionless electrical charge of a single molecule of species k The charge is normalized by the the...
Definition: Phase.h:504