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