Cantera  2.4.0
SimpleTransport.h
Go to the documentation of this file.
1 /**
2  * @file SimpleTransport.h
3  * Header file for the class SimpleTransport which provides simple
4  * transport properties for liquids and solids
5  * (see \ref tranprops and \link Cantera::SimpleTransport SimpleTransport \endlink) .
6  */
7 
8 // This file is part of Cantera. See License.txt in the top-level directory or
9 // at http://www.cantera.org/license.txt for license and copyright information.
10 
11 #ifndef CT_SIMPLETRAN_H
12 #define CT_SIMPLETRAN_H
13 
14 #include "LiquidTransportParams.h"
15 
16 namespace Cantera
17 {
18 //! Class SimpleTransport implements mixture-averaged transport properties for
19 //! liquid phases.
20 /*!
21  * @deprecated To be removed after Cantera 2.4
22  *
23  * The model is based on that described by Newman, Electrochemical Systems
24  *
25  * The velocity of species i may be described by the following equation p. 297
26  * (12.1)
27  *
28  * \f[
29  * c_i \nabla \mu_i = R T \sum_j \frac{c_i c_j}{c_T D_{ij}}
30  * (\mathbf{v}_j - \mathbf{v}_i)
31  * \f]
32  *
33  * This as written is degenerate by 1 dof.
34  *
35  * To fix this we must add in the definition of the mass averaged velocity of
36  * the solution. We will call the simple bold-faced \f$\mathbf{v} \f$ symbol the
37  * mass-averaged velocity. Then, the relation between \f$\mathbf{v}\f$ and the
38  * individual species velocities is \f$\mathbf{v}_i\f$
39  *
40  * \f[
41  * \rho_i \mathbf{v}_i = \rho_i \mathbf{v} + \mathbf{j}_i
42  * \f]
43  * where \f$\mathbf{j}_i\f$ are the diffusional fluxes of species i with respect
44  * to the mass averaged velocity and
45  *
46  * \f[
47  * \sum_i \mathbf{j}_i = 0
48  * \f]
49  *
50  * and
51  *
52  * \f[
53  * \sum_i \rho_i \mathbf{v}_i = \rho \mathbf{v}
54  * \f]
55  *
56  * Using these definitions, we can write
57  *
58  * \f[
59  * \mathbf{v}_i = \mathbf{v} + \frac{\mathbf{j}_i}{\rho_i}
60  * \f]
61  *
62  * \f[
63  * c_i \nabla \mu_i = R T \sum_j \frac{c_i c_j}{c_T D_{ij}}
64  * (\frac{\mathbf{j}_j}{\rho_j} - \frac{\mathbf{j}_i}{\rho_i})
65  * = R T \sum_j \frac{1}{D_{ij}}
66  * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i})
67  * \f]
68  *
69  * The equations that we actually solve are
70  *
71  * \f[
72  * c_i \nabla \mu_i =
73  * = R T \sum_j \frac{1}{D_{ij}}
74  * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i})
75  * \f]
76  * and we replace the 0th equation with the following:
77  *
78  * \f[
79  * \sum_i \mathbf{j}_i = 0
80  * \f]
81  *
82  * When there are charged species, we replace the RHS with the gradient of the
83  * electrochemical potential to obtain the modified equation
84  *
85  * \f[
86  * c_i \nabla \mu_i + c_i F z_i \nabla \Phi
87  * = R T \sum_j \frac{1}{D_{ij}}
88  * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i})
89  * \f]
90  *
91  * With this formulation we may solve for the diffusion velocities, without
92  * having to worry about what the mass averaged velocity is.
93  *
94  * ## Viscosity Calculation
95  *
96  * The viscosity calculation may be broken down into two parts. In the first
97  * part, the viscosity of the pure species are calculated In the second part, a
98  * mixing rule is applied. There are two mixing rules. Solvent-only and mixture-
99  * averaged.
100  *
101  * For the solvent-only mixing rule, we use the pure species viscosity
102  * calculated for the solvent as the viscosity of the entire mixture. For the
103  * mixture averaged rule we do a mole fraction based average of the pure species
104  * viscosities:
105  *
106  * Solvent-only:
107  * \f[
108  * \mu = \mu_0
109  * \f]
110  * Mixture-average:
111  * \f[
112  * \mu = \sum_k {\mu_k X_k}
113  * \f]
114  *
115  * ## Calculate of the Binary Diffusion Coefficients
116  *
117  * The binary diffusion coefficients are obtained from the pure species
118  * diffusion coefficients using an additive process
119  *
120  * \f[
121  * D_{i,j} = \frac{1}{2} \left( D^0_i(T) + D^0_j(T) \right)
122  * \f]
123  *
124  * ## Electrical Mobilities
125  *
126  * The mobility \f$ \mu^e_k \f$ is calculated from the diffusion coefficient
127  * using the Einstein relation.
128  *
129  * \f[
130  * \mu^e_k = \frac{F D_k}{R T}
131  * \f]
132  *
133  * The diffusion coefficients, \f$ D_k \f$ , is calculated from a call to the
134  * mixture diffusion coefficient routine.
135  *
136  * ## Species Diffusive Fluxes
137  *
138  * The diffusive mass flux of species \e k is computed from the following
139  * formula
140  *
141  * Usually the specified solution average velocity is the mass averaged
142  * velocity. This is changed in some subclasses, however.
143  *
144  * \f[
145  * j_k = - c^T M_k D_k \nabla X_k - \rho Y_k V_c
146  * \f]
147  *
148  * where V_c is the correction velocity
149  *
150  * \f[
151  * \rho V_c = - \sum_j {c^T M_j D_j \nabla X_j}
152  * \f]
153  *
154  * In the above equation, \f$ D_k \f$ is the mixture diffusivity for species k
155  * calculated for the current conditions, which may depend on T, P, and X_k. \f$
156  * C^T \f$ is the total concentration of the phase.
157  *
158  * When this is electrical migration, the formulas above are enhanced to
159  *
160  * \f[
161  * j_k = - C^T M_k D_k \nabla X_k + F C^T M_k \frac{D_k}{ R T } X_k z_k \nabla V - \rho Y_k V_c
162  * \f]
163  *
164  * where V_c is the correction velocity
165  *
166  * \f[
167  * \rho V_c = - \sum_j {c^T M_j D_j \nabla X_j} + \sum_j F C^T M_j \frac{D_j}{ R T } X_j z_j \nabla V
168  * \f]
169  *
170  * ## Species Diffusional Velocities
171  *
172  * Species diffusional velocities are calculated from the species diffusional
173  * fluxes, within this object, using the following formula for the diffusional
174  * velocity of the kth species, \f$ V_k^d \f$
175  *
176  * \f[
177  * j_k = \rho Y_k V_k^d
178  * \f]
179  *
180  * TODO: This object has to be made compatible with different types of reference
181  * velocities. Right now, elements of the formulas are only compatible with the
182  * mass-averaged velocity.
183  *
184  * @ingroup tranprops
185  */
187 {
188 public:
189  //! Default constructor.
190  /*!
191  * This requires call to initLiquid(LiquidTransportParams& tr) after filling
192  * LiquidTransportParams to complete instantiation. The filling of
193  * LiquidTransportParams is currently carried out in the TransportFactory
194  * class, but might be moved at some point.
195  *
196  * @param thermo ThermoPhase object holding species information.
197  * @param ndim Number of spatial dimensions.
198  */
199  SimpleTransport(thermo_t* thermo = 0, int ndim = 1);
200 
201  virtual ~SimpleTransport();
202 
203  //! Initialize the transport object
204  /*!
205  * Here we change all of the internal dimensions to be sufficient.
206  * We get the object ready to do property evaluations.
207  *
208  * @param tr Transport parameters for all of the species in the phase.
209  */
210  virtual bool initLiquid(LiquidTransportParams& tr);
211 
212  void setCompositionDependence(LiquidTranMixingModel model) {
213  compositionDepType_ = model;
214  }
215 
216  virtual std::string transportType() const {
217  return "Simple";
218  }
219 
220  //! Returns the mixture viscosity of the solution
221  /*!
222  * The viscosity is computed using the general mixture rules
223  * specified in the variable compositionDepType_.
224  *
225  * Solvent-only:
226  * \f[
227  * \mu = \mu_0
228  * \f]
229  * Mixture-average:
230  * \f[
231  * \mu = \sum_k {\mu_k X_k}
232  * \f]
233  *
234  * Here \f$ \mu_k \f$ is the viscosity of pure species \e k.
235  *
236  * units are Pa s or kg/m/s
237  *
238  * @see updateViscosity_T();
239  */
240  virtual doublereal viscosity();
241 
242  //! Returns the pure species viscosities
243  /*!
244  * The pure species viscosities are to be given in an Arrhenius form in
245  * accordance with activated-jump-process dominated transport.
246  *
247  * units are Pa s or kg/m/s
248  *
249  * @param visc Return the species viscosities as a vector of length m_nsp
250  */
251  virtual void getSpeciesViscosities(doublereal* const visc);
252 
253  //! Returns the binary diffusion coefficients
254  virtual void getBinaryDiffCoeffs(const size_t ld, doublereal* const d);
255 
256  //! Get the Mixture diffusion coefficients
257  /*!
258  * @param d vector of mixture diffusion coefficients
259  * units = m2 s-1. length = number of species
260  */
261  virtual void getMixDiffCoeffs(doublereal* const d);
262 
263  //! Return the thermal diffusion coefficients
264  /*!
265  * These are all zero for this simple implementation
266  *
267  * @param dt thermal diffusion coefficients
268  */
269  virtual void getThermalDiffCoeffs(doublereal* const dt);
270 
271  //! Returns the mixture thermal conductivity of the solution
272  /*!
273  * The thermal is computed using the general mixture rules
274  * specified in the variable compositionDepType_.
275  *
276  * Controlling update boolean = m_condmix_ok
277  *
278  * Units are in W/m/K or equivalently kg m / s3 / K
279  *
280  * Solvent-only:
281  * \f[
282  * \lambda = \lambda_0
283  * \f]
284  * Mixture-average:
285  * \f[
286  * \lambda = \sum_k {\lambda_k X_k}
287  * \f]
288  *
289  * Here \f$ \lambda_k \f$ is the thermal conductivity of pure species \e k.
290  *
291  * @see updateCond_T();
292  */
293  virtual doublereal thermalConductivity();
294 
295  virtual void getMobilities(doublereal* const mobil_e);
296 
297  virtual void getFluidMobilities(doublereal* const mobil_f);
298 
299  //! Specify the value of the gradient of the voltage
300  /*!
301  * @param grad_V Gradient of the voltage (length num dimensions);
302  */
303  virtual void set_Grad_V(const doublereal* const grad_V);
304 
305  //! Specify the value of the gradient of the temperature
306  /*!
307  * @param grad_T Gradient of the temperature (length num dimensions);
308  */
309  virtual void set_Grad_T(const doublereal* const grad_T);
310 
311  //! Specify the value of the gradient of the MoleFractions
312  /*!
313  * @param grad_X Gradient of the mole fractions(length nsp * num dimensions);
314  */
315  virtual void set_Grad_X(const doublereal* const grad_X);
316 
317  //! Get the species diffusive velocities wrt to the averaged velocity,
318  //! given the gradients in mole fraction and temperature
319  /*!
320  * The average velocity can be computed on a mole-weighted
321  * or mass-weighted basis, or the diffusion velocities may
322  * be specified as relative to a specific species (i.e. a
323  * solvent) all according to the velocityBasis input parameter.
324  *
325  * Units for the returned velocities are m s-1.
326  *
327  * @param ndim Number of dimensions in the flux expressions
328  * @param grad_T Gradient of the temperature (length = ndim)
329  * @param ldx Leading dimension of the grad_X array (usually equal to
330  * m_nsp but not always)
331  * @param grad_X Gradients of the mole fraction. Flat vector with the m_nsp
332  * in the inner loop. length = ldx * ndim
333  * @param ldf Leading dimension of the fluxes array (usually equal to
334  * m_nsp but not always)
335  * @param Vdiff Output of the diffusive velocities. Flat vector with the
336  * m_nsp in the inner loop. length = ldx * ndim
337  */
338  virtual void getSpeciesVdiff(size_t ndim,
339  const doublereal* grad_T,
340  int ldx,
341  const doublereal* grad_X,
342  int ldf,
343  doublereal* Vdiff);
344 
345  //! Get the species diffusive velocities wrt to the averaged velocity, given
346  //! the gradients in mole fraction, temperature and electrostatic potential.
347  /*!
348  * The average velocity can be computed on a mole-weighted
349  * or mass-weighted basis, or the diffusion velocities may
350  * be specified as relative to a specific species (i.e. a
351  * solvent) all according to the velocityBasis input parameter.
352  *
353  * Units for the returned velocities are m s-1.
354  *
355  * @param ndim Number of dimensions in the flux expressions
356  * @param grad_T Gradient of the temperature (length = ndim)
357  * @param ldx Leading dimension of the grad_X array (usually equal
358  * to m_nsp but not always)
359  * @param grad_X Gradients of the mole fraction. Flat vector with the
360  * m_nsp in the inner loop. length = ldx * ndim
361  * @param ldf Leading dimension of the fluxes array (usually equal to
362  * m_nsp but not always)
363  * @param grad_Phi Gradients of the electrostatic potential (length =
364  * ndim)
365  * @param Vdiff Output of the species diffusion velocities. Flat vector
366  * with the m_nsp in the inner loop. length = ldx * ndim
367  */
368  virtual void getSpeciesVdiffES(size_t ndim, const doublereal* grad_T,
369  int ldx, const doublereal* grad_X,
370  int ldf, const doublereal* grad_Phi,
371  doublereal* Vdiff);
372 
373  //! Get the species diffusive mass fluxes wrt to the specified solution
374  //! averaged velocity, given the gradients in mole fraction and temperature
375  /*!
376  * units = kg/m2/s
377  *
378  * The diffusive mass flux of species \e k is computed from the following
379  * formula
380  *
381  * Usually the specified solution average velocity is the mass averaged
382  * velocity. This is changed in some subclasses, however.
383  *
384  * \f[
385  * j_k = - \rho M_k D_k \nabla X_k - Y_k V_c
386  * \f]
387  *
388  * where V_c is the correction velocity
389  *
390  * \f[
391  * V_c = - \sum_j {\rho M_j D_j \nabla X_j}
392  * \f]
393  *
394  * @param ndim The number of spatial dimensions (1, 2, or 3).
395  * @param grad_T The temperature gradient (ignored in this model).
396  * @param ldx Leading dimension of the grad_X array.
397  * @param grad_X Gradient of the mole fractions(length nsp * num dimensions);
398  * @param ldf Leading dimension of the fluxes array.
399  * @param fluxes Output fluxes of species.
400  */
401  virtual void getSpeciesFluxes(size_t ndim, const doublereal* const grad_T,
402  size_t ldx, const doublereal* const grad_X,
403  size_t ldf, doublereal* const fluxes);
404 
405  //! Return the species diffusive mass fluxes wrt to the mass averaged
406  //! velocity,
407  /*!
408  * units = kg/m2/s
409  *
410  * Internally, gradients in the in mole fraction, temperature
411  * and electrostatic potential contribute to the diffusive flux
412  *
413  * The diffusive mass flux of species \e k is computed from the following
414  * formula
415  *
416  * \f[
417  * j_k = - \rho M_k D_k \nabla X_k - Y_k V_c
418  * \f]
419  *
420  * where V_c is the correction velocity
421  *
422  * \f[
423  * V_c = - \sum_j {\rho M_j D_j \nabla X_j}
424  * \f]
425  *
426  * @param ldf stride of the fluxes array. Must be equal to or greater
427  * than the number of species.
428  * @param fluxes Vector of calculated fluxes
429  */
430  virtual void getSpeciesFluxesExt(size_t ldf, doublereal* fluxes);
431 
432 protected:
433  //! Handles the effects of changes in the Temperature, internally within the
434  //! object.
435  /*!
436  * This is called whenever a transport property is requested. The first task
437  * is to check whether the temperature has changed since the last call to
438  * update_T(). If it hasn't then an immediate return is carried out.
439  *
440  * @returns true if the temperature has changed, and false otherwise
441  */
442  virtual bool update_T();
443 
444  //! Handles the effects of changes in the mixture concentration
445  /*!
446  * This is called for every interface call to check whether the
447  * concentrations have changed. Concentrations change whenever the pressure
448  * or the mole fraction has changed. If it has changed, the recalculations
449  * should be done.
450  *
451  * Note this should be a lightweight function since it's part of all of the
452  * interfaces.
453  */
454  virtual bool update_C();
455 
456  //! Update the temperature-dependent viscosity terms. Updates the array of
457  //! pure species viscosities, and the weighting functions in the viscosity
458  //! mixture rule.
459  /*!
460  * The flag m_visc_temp_ok is set to true.
461  */
462  void updateViscosity_T();
463 
464  //! Update the temperature-dependent parts of the mixture-averaged
465  //! thermal conductivity.
466  void updateCond_T();
467 
468  //! Update the binary diffusion coefficients wrt T.
469  /*!
470  * These are evaluated from the polynomial fits at unit pressure (1 Pa).
471  */
472  void updateDiff_T();
473 
474 private:
475  //! Composition dependence of the transport properties
476  /*!
477  * The following coefficients are allowed to have simple composition
478  * dependencies:
479  * - mixture viscosity
480  * - mixture thermal conductivity
481  *
482  * Permissible types of composition dependencies
483  * 0 - Solvent values (i.e., species 0) contributes only
484  * 1 - linear combination of mole fractions;
485  */
487 
488  //! Boolean indicating whether to use the hydrodynamic radius formulation
489  /*!
490  * If true, then the diffusion coefficient is calculated from the
491  * hydrodynamic radius.
492  */
494 
495  //! Boolean indicating whether electro-migration term should be added
497 
498  //! Local Copy of the molecular weights of the species
499  /*!
500  * Length is Equal to the number of species in the mechanism.
501  */
503 
504  //! Pure species viscosities in Arrhenius temperature-dependent form.
505  std::vector<LTPspecies*> m_coeffVisc_Ns;
506 
507  //! Pure species thermal conductivities in Arrhenius temperature-dependent form.
508  std::vector<LTPspecies*> m_coeffLambda_Ns;
509 
510  //! Pure species viscosities in Arrhenius temperature-dependent form.
511  std::vector<LTPspecies*> m_coeffDiff_Ns;
512 
513  //! Hydrodynamic radius in LTPspecies form
514  std::vector<LTPspecies*> m_coeffHydroRadius_Ns;
515 
516  //! Internal value of the gradient of the mole fraction vector
517  /*!
518  * Note, this is the only gradient value that can and perhaps should reflect
519  * the true state of the mole fractions in the application solution vector.
520  * In other words no cropping or massaging of the values to make sure they
521  * are above zero should occur. - developing ....
522  *
523  * m_nsp is the number of species in the fluid
524  * k is the species index
525  * n is the dimensional index (x, y, or z). It has a length equal to m_nDim
526  *
527  * m_Grad_X[n*m_nsp + k]
528  */
530 
531  //! Internal value of the gradient of the Temperature vector
532  /*!
533  * Generally, if a transport property needs this in its evaluation it
534  * will look to this place to get it.
535  *
536  * No internal property is precalculated based on gradients. Gradients
537  * are assumed to be freshly updated before every property call.
538  */
540 
541  //! Internal value of the gradient of the Pressure vector
542  /*!
543  * Generally, if a transport property needs this in its evaluation it
544  * will look to this place to get it.
545  *
546  * No internal property is precalculated based on gradients. Gradients
547  * are assumed to be freshly updated before every property call.
548  */
550 
551  //! Internal value of the gradient of the Electric Voltage
552  /*!
553  * Generally, if a transport property needs this in its evaluation it
554  * will look to this place to get it.
555  *
556  * No internal property is precalculated based on gradients. Gradients
557  * are assumed to be freshly updated before every property call.
558  */
560 
561  // property values
562 
563  //! Vector of Species Diffusivities
564  /*!
565  * Depends on the temperature. We have set the pressure dependence to zero
566  * for this liquid phase constituitve model
567  *
568  * units m2/s
569  */
571 
572  //! Species viscosities
573  /*!
574  * Viscosity of the species
575  * Length = number of species
576  *
577  * Depends on the temperature. We have set the pressure dependence to zero
578  * for this model
579  *
580  * controlling update boolean -> m_visc_temp_ok
581  */
583 
584  //! Internal value of the species individual thermal conductivities
585  /*!
586  * Then a mixture rule is applied to get the solution conductivities
587  *
588  * Depends on the temperature and perhaps pressure, but
589  * not the species concentrations
590  *
591  * controlling update boolean -> m_cond_temp_ok
592  */
594 
595  //! State of the mole fraction vector.
597 
598  //! Local copy of the mole fractions of the species in the phase
599  /*!
600  * The mole fractions here are assumed to be bounded by 0.0 and 1.0 and they
601  * are assumed to add up to one exactly. This mole fraction vector comes
602  * from the ThermoPhase object. Derivative quantities from this are referred
603  * to as bounded.
604  *
605  * Update info?
606  * length = m_nsp
607  */
609 
610  //! Local copy of the concentrations of the species in the phase
611  /*!
612  * The concentrations are consistent with the m_molefracs vector which is
613  * bounded and sums to one.
614  *
615  * Update info?
616  * length = m_nsp
617  */
619 
620  //! Local copy of the total concentration.
621  /*!
622  * This is consistent with the m_concentrations[] and m_molefracs[] vector.
623  */
624  doublereal concTot_;
625 
626  //! Mean molecular weight
628 
629  //! Density
630  doublereal dens_;
631 
632  //! Local copy of the charge of each species
633  /*!
634  * Contains the charge of each species (length m_nsp)
635  */
637 
638  //! Current Temperature -> locally stored
639  /*!
640  * This is used to test whether new temperature computations should be
641  * performed.
642  */
643  doublereal m_temp;
644 
645  //! Current value of the pressure
646  doublereal m_press;
647 
648  //! Saved value of the mixture thermal conductivity
649  doublereal m_lambda;
650 
651  //! Saved value of the mixture viscosity
652  doublereal m_viscmix;
653 
654  //! work space
655  /*!
656  * Length is equal to m_nsp
657  */
659 
660  vector_fp m_fluxes;
661 
662  //! Boolean indicating that the top-level mixture viscosity is current
663  /*!
664  * This is turned false for every change in T, P, or C.
665  */
667 
668  //! Boolean indicating that weight factors wrt viscosity is current
670 
671  //! Boolean indicating that mixture diffusion coeffs are current
673 
674  //! Boolean indicating that binary diffusion coeffs are current
676 
677  //! Flag to indicate that the pure species conductivities
678  //! are current wrt the temperature
680 
681  //! Boolean indicating that mixture conductivity is current
683 
684  //! Number of dimensions
685  /*!
686  * Either 1, 2, or 3
687  */
688  size_t m_nDim;
689 
690  //! Temporary variable that stores the rho Vc value
691  double rhoVc[3];
692 };
693 }
694 #endif
bool m_visc_temp_ok
Boolean indicating that weight factors wrt viscosity is current.
vector_fp m_Grad_T
Internal value of the gradient of the Temperature vector.
vector_fp m_Grad_V
Internal value of the gradient of the Electric Voltage.
vector_fp m_Grad_P
Internal value of the gradient of the Pressure vector.
virtual bool initLiquid(LiquidTransportParams &tr)
Initialize the transport object.
vector_fp m_spwork
work space
bool m_visc_mix_ok
Boolean indicating that the top-level mixture viscosity is current.
virtual void getBinaryDiffCoeffs(const size_t ld, doublereal *const d)
Returns the binary diffusion coefficients.
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 specified solution averaged velocity, given the gradients in mole fraction and temperature.
doublereal m_viscmix
Saved value of the mixture viscosity.
double rhoVc[3]
Temporary variable that stores the rho Vc value.
virtual bool update_T()
Handles the effects of changes in the Temperature, internally within the object.
bool m_cond_mix_ok
Boolean indicating that mixture conductivity is current.
Base class for transport property managers.
enum LiquidTranMixingModel compositionDepType_
Composition dependence of the transport properties.
void updateDiff_T()
Update the binary diffusion coefficients wrt T.
virtual void getMobilities(doublereal *const mobil_e)
Get the Electrical mobilities (m^2/V/s).
virtual bool update_C()
Handles the effects of changes in the mixture concentration.
doublereal m_lambda
Saved value of the mixture thermal conductivity.
vector_fp m_Grad_X
Internal value of the gradient of the mole fraction vector.
void updateCond_T()
Update the temperature-dependent parts of the mixture-averaged thermal conductivity.
int m_iStateMF
State of the mole fraction vector.
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:93
Class LiquidTransportParams holds transport model parameters relevant to transport in mixtures...
Header file defining class LiquidTransportParams.
doublereal meanMolecularWeight_
Mean molecular weight.
bool m_diff_temp_ok
Boolean indicating that binary diffusion coeffs are current.
virtual void getFluidMobilities(doublereal *const mobil_f)
Get the fluid mobilities (s kmol/kg).
std::vector< LTPspecies * > m_coeffVisc_Ns
Pure species viscosities in Arrhenius temperature-dependent form.
virtual void getMixDiffCoeffs(doublereal *const d)
Get the Mixture diffusion coefficients.
virtual void getSpeciesVdiffES(size_t ndim, const doublereal *grad_T, int ldx, const doublereal *grad_X, int ldf, const doublereal *grad_Phi, doublereal *Vdiff)
Get the species diffusive velocities wrt to the averaged velocity, given the gradients in mole fracti...
vector_fp m_diffSpecies
Vector of Species Diffusivities.
vector_fp m_viscSpecies
Species viscosities.
LiquidTranMixingModel
Composition dependence type for liquid mixture transport properties.
std::vector< LTPspecies * > m_coeffLambda_Ns
Pure species thermal conductivities in Arrhenius temperature-dependent form.
SimpleTransport(thermo_t *thermo=0, int ndim=1)
Default constructor.
doublereal m_press
Current value of the pressure.
std::vector< LTPspecies * > m_coeffHydroRadius_Ns
Hydrodynamic radius in LTPspecies form.
virtual std::string transportType() const
Identifies the Transport object type.
virtual void set_Grad_X(const doublereal *const grad_X)
Specify the value of the gradient of the MoleFractions.
virtual void getSpeciesVdiff(size_t ndim, const doublereal *grad_T, int ldx, const doublereal *grad_X, int ldf, doublereal *Vdiff)
Get the species diffusive velocities wrt to the averaged velocity, given the gradients in mole fracti...
virtual doublereal thermalConductivity()
Returns the mixture thermal conductivity of the solution.
thermo_t & thermo()
virtual void set_Grad_V(const doublereal *const grad_V)
Specify the value of the gradient of the voltage.
doublereal concTot_
Local copy of the total concentration.
vector_fp m_concentrations
Local copy of the concentrations of the species in the phase.
void updateViscosity_T()
Update the temperature-dependent viscosity terms.
virtual void getThermalDiffCoeffs(doublereal *const dt)
Return the thermal diffusion coefficients.
doublereal dens_
Density.
virtual doublereal viscosity()
Returns the mixture viscosity of the solution.
doublereal m_temp
Current Temperature -> locally stored.
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:157
vector_fp m_condSpecies
Internal value of the species individual thermal conductivities.
bool doMigration_
Boolean indicating whether electro-migration term should be added.
bool useHydroRadius_
Boolean indicating whether to use the hydrodynamic radius formulation.
virtual void getSpeciesFluxesExt(size_t ldf, doublereal *fluxes)
Return the species diffusive mass fluxes wrt to the mass averaged velocity,.
size_t m_nDim
Number of dimensions.
vector_fp m_chargeSpecies
Local copy of the charge of each species.
bool m_cond_temp_ok
Flag to indicate that the pure species conductivities are current wrt the temperature.
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:8
vector_fp m_molefracs
Local copy of the mole fractions of the species in the phase.
virtual void getSpeciesViscosities(doublereal *const visc)
Returns the pure species viscosities.
virtual void set_Grad_T(const doublereal *const grad_T)
Specify the value of the gradient of the temperature.
std::vector< LTPspecies * > m_coeffDiff_Ns
Pure species viscosities in Arrhenius temperature-dependent form.
Class SimpleTransport implements mixture-averaged transport properties for liquid phases...
bool m_diff_mix_ok
Boolean indicating that mixture diffusion coeffs are current.
vector_fp m_mw
Local Copy of the molecular weights of the species.