Cantera  2.0
LiquidTransport.h
Go to the documentation of this file.
1 /**
2  * @file LiquidTransport.h
3  * Header file defining class LiquidTransport
4  */
5 #ifndef CT_LIQUIDTRAN_H
6 #define CT_LIQUIDTRAN_H
7 
8 
9 
10 // STL includes
11 #include <vector>
12 #include <string>
13 #include <map>
14 #include <numeric>
15 #include <algorithm>
16 
17 // Cantera includes
18 #include "TransportBase.h"
20 #include "TransportParams.h"
21 #include "LiquidTransportParams.h"
22 
23 namespace Cantera
24 {
25 
26 // Forward references
27 class LiquidTransportParams;
28 
29 
30 //! Class LiquidTransport implements models for transport
31 //! properties for liquid phases.
32 /*!
33  * Liquid Transport is set up with some flexibility in
34  * this class. Transport properties like viscosity
35  * and thermal conductivity are allowed flexibility within
36  * the constraints of the LiquidTransportProperty and
37  * LiquidTransportInteractions classes. For species
38  * diffusion, the LiquidTransport class focuses on
39  * the Stefan-Maxwell equation to determine the diffusion
40  * velocities. Other options for liquid diffusion include
41  * solvent-dominated diffusion, and a class SolventTransport
42  * should be forthcoming.
43  *
44  * The class LiquidTransport has several roles.
45  * -# It brings together the individual species transport
46  * properties, expressed as subclasses of LTPspecies
47  * (Liquid Transport Properties of Species) through
48  * LiquidTransportData, with models for
49  * the composition dependence of liquid transport properties
50  * expressed as subclasses of LiquidTranInteraction
51  * (mixing rules) through LiquidTransportParams. Calculating
52  * mixture properties generally consists of calling the
53  * getMixTansProp member of LiquidTranInteraction by passing
54  * a vector of LTPSpecies
55  * -# It calculates the bulk velocity \f$ \vec{v} \f$ and
56  * individual species diffusion velocities, \f$ \vec{V_i} \f$
57  * using the Stefan-Maxwell equations. It is possible to set a
58  * flag to calculate relative to a mass-averaged bulk velocity,
59  * relative to a mole-averaged bulk velocity or relative to a
60  * single species velocity using the <velocityBasis basis="mass">,
61  * <velocityBasis basis="mass">, or <velocityBasis basis="Cl-">
62  * keyword. Mass-averaged velocities are the default for which
63  * the diffusion velocities satisfy
64  * \f[
65  * \sum_{i} Y_i \vec{V_i} = 0
66  * \f]
67  * for mass fraction \f$ Y_i \f$. For mole-averaged velocities
68  * \f[
69  * \sum_{i} X_i \vec{V_i} = 0
70  * \f]
71  * for mole fraction \f$ X_i \f$. or
72  * \f[
73  * \vec{V_i} = 0
74  * \f]
75  * for reference species \f$ i \f$.
76  * -# It provides access to a number of derived quantities
77  * related to transport properties as described in the
78  * various methods below.
79  *
80  *
81  * Within LiquidTransport, the state is presumed to be
82  * defined in terms of the species mole fraction,
83  * temperature and pressure. Charged species are expected
84  * and quantities like the electric current are computed
85  * based on a combined electrochemcial potential.
86  *
87  *
88  * @ingroup tranprops
89  */
90 class LiquidTransport : public Transport
91 {
92 public:
93  //! Default constructor.
94  /*!
95  * This requires call to initLiquid(LiquidTransportParams& tr)
96  * after filling LiquidTransportParams to complete instantiation.
97  * The filling of LiquidTransportParams is currently carried out
98  * in the TransportFactory class, but might be moved at some point.
99  *
100  * @param thermo ThermoPhase object holding species information.
101  * @param ndim Number of spatial dimensions.
102  */
103  LiquidTransport(thermo_t* thermo = 0, int ndim = 1);
104 
105  //! Copy Constructor for the %LiquidThermo object.
106  /*!
107  * @param right %LiquidTransport to be copied
108  */
109  LiquidTransport(const LiquidTransport& right);
110 
111  //! Assignment operator
112  /*!
113  * This is NOT a virtual function.
114  *
115  * @param right Reference to %LiquidTransport object to be copied
116  * into the current one.
117  */
119 
120  //! Duplication routine for objects which inherit from
121  //! %Transport
122  /*!
123  * This virtual routine can be used to duplicate %Transport objects
124  * inherited from %Transport even if the application only has
125  * a pointer to %Transport to work with.
126  *
127  * These routines are basically wrappers around the derived copy
128  * constructor.
129  */
130  virtual Transport* duplMyselfAsTransport() const;
131 
132 
133  //! virtual destructor
134  virtual ~LiquidTransport();
135 
136  //! Initialize the transport object
137  /*!
138  * Here we change all of the internal dimensions to be sufficient.
139  * We get the object ready to do property evaluations.
140  * A lot of the input required to do property evaluations is
141  * contained in the LiquidTransportParams class that is
142  * filled in TransportFactory.
143  *
144  * @param tr Transport parameters for all of the species
145  * in the phase.
146  */
147  virtual bool initLiquid(LiquidTransportParams& tr);
148 
149  friend class TransportFactory;
150 
151 
152  //! Return the model id for this transport parameterization
153  virtual int model() const {
154  return cLiquidTransport;
155  }
156 
157 
158  //! Returns the viscosity of the solution
159  /*!
160  * The viscosity calculation is handled by subclasses of
161  * LiquidTranInteraction as specified in the input file.
162  * These in turn employ subclasses of LTPspecies to
163  * determine the individual species viscosities.
164  */
165  virtual doublereal viscosity();
166 
167  //! Returns the pure species viscosities for all species
168  /*!
169  * The pure species viscosities are evaluated using the
170  * appropriate subclasses of LTPspecies as specified in the
171  * input file.
172  *
173  * @param visc array of length "number of species"
174  * to hold returned viscosities.
175  */
176  virtual void getSpeciesViscosities(doublereal* const visc);
177 
178  //! Returns the ionic conductivity of the solution
179  /*!
180  * The ionic conductivity calculation is handled by subclasses of
181  * LiquidTranInteraction as specified in the input file.
182  * These in turn employ subclasses of LTPspecies to
183  * determine the individual species ionic conductivities.
184  */
185  virtual doublereal ionConductivity();
186 
187  //! Returns the pure species ionic conductivities for all species
188  /*!
189  * The pure species ionic conductivities are evaluated using the
190  * appropriate subclasses of LTPspecies as specified in the
191  * input file.
192  *
193  * @param ionCond Array of length "number of species" to hold returned ionic conductivities.
194  */
195  virtual void getSpeciesIonConductivity(doublereal* const ionCond);
196 
197  //! Returns the pointer to the mobility ratios of the binary
198  //! combinations of the transported species for the solution
199  //! Has size of the number of binary interactions = nsp*nsp
200  /*!
201  * The mobility ratio calculation is handled by subclasses of
202  * LiquidTranInteraction as specified in the input file.
203  * These in turn employ subclasses of LTPspecies to
204  * determine the mobility ratios in the pure species.
205  *
206  * @param mobRat Vector of mobility ratios
207  */
208  virtual void mobilityRatio(doublereal* mobRat);
209 
210  //! Returns a double pointer to the mobility ratios of the
211  //! transported species in each pure species phase.
212  /*!
213  * Has size of the number of binary interactions by the number
214  * of species (nsp*nsp X nsp)
215  * The pure species mobility ratios are evaluated using the
216  * appropriate subclasses of LTPspecies as specified in the
217  * input file.
218  *
219  * @param mobRat array of length "number of species"
220  * to hold returned mobility ratios.
221  */
222  virtual void getSpeciesMobilityRatio(doublereal** mobRat);
223 
224  //! Returns the self diffusion coefficients of the species in the phase.
225  //! Has size of nsp(coeffs)
226  /*!
227  * The self diffusion coefficient is the diffusion coefficient of a tracer species
228  * at the current temperature and composition of the species. Therefore,
229  * the dilute limit of transport is assumed for the tracer species.
230  * The effective formula may be calculated from the stefan-maxwell formulation by
231  * adding another row for the tracer species, assigning all D's to be equal
232  * to the respective species D's, and then taking the limit as the
233  * tracer species mole fraction goes to zero. The corresponding flux equation
234  * for the tracer species k in units of kmol m-2 s-1 is.
235  *
236  * \f[
237  * J_k = - D^{sd}_k \frac{C_k}{R T} \nabla \mu_k
238  * \f]
239  *
240  * The derivative is taken at constant T and P.
241  *
242  * The self diffusion calculation is handled by subclasses of
243  * LiquidTranInteraction as specified in the input file.
244  * These in turn employ subclasses of LTPspecies to
245  * determine the individual species self diffusion coeffs.
246  *
247  * @param selfDiff Vector of self-diffusion coefficients
248  * Length = number of species in phase
249  * units = m**2 s-1
250  */
251  virtual void selfDiffusion(doublereal* const selfDiff);
252 
253  //! Returns the self diffusion coefficients in the pure species phases.
254  //! Has size of nsp(coeffs) x nsp(phases)
255  /*!
256  * The pure species molar volumes are evaluated using the
257  * appropriate subclasses of LTPspecies as specified in the
258  * input file.
259  *
260  * @param selfDiff array of length "number of species"
261  * to hold returned self diffusion coeffs.
262  */
263  virtual void getSpeciesSelfDiffusion(doublereal** selfDiff);
264 
265  //! Returns the hydrodynamic radius for all species
266  /*!
267  * The species hydrodynamic radii are evaluated using the
268  * appropriate subclasses of LTPspecies as specified in the
269  * input file.
270  *
271  * @param radius array of length "number of species"
272  * to hold returned radii.
273  */
274  virtual void getSpeciesHydrodynamicRadius(doublereal* const radius);
275 
276  //! Returns the binary diffusion coefficients
277  /*!
278  * The binary diffusion coefficients are specified in the input
279  * file through the LiquidTransportInteractions class. These
280  * are the binary interaction coefficients employed in the
281  * Stefan-Maxwell equation.
282  *
283  * @param ld number of species in system
284  * @param d vector of binary diffusion coefficients
285  * units = m2 s-1. length = ld*ld = (number of species)^2
286  */
287  virtual void getBinaryDiffCoeffs(const size_t ld, doublereal* const d);
288 
289  //! Get the Mixture diffusion coefficients
290  /*!
291  * The mixture diffusion coefficients are not well defined
292  * in the context of LiquidTransport because the Stefan Maxwell
293  * equation is solved. Here the mixture diffusion coefficients
294  * are defined according to Ficks law:
295  * \f[
296  * X_i \vec{V_i} = -D_i \nabla X_i.
297  * \f]
298  * Solving Ficks Law for \f$ D_i \f$ gives a mixture diffusion
299  * coefficient
300  * \f[
301  * D_i = - X_i \vec{V_i} / ( \nabla X_i ).
302  * \f]
303  * If \f$ \nabla X_i = 0 \f$ this is undefined and the
304  * nonsensical value -1 is returned.
305  *
306  * Note that this evaluation of \f$ \vec{V_i} \f$ requires
307  * a solve of the Stefan Maxwell equation making this
308  * determination of the mixture averaged diffusion coefficients
309  * a \e slow method for obtaining diffusion coefficients.
310  *
311  * Also note that the Stefan Maxwell solve will be based upon
312  * the thermodynamic state (including gradients) most recently
313  * set. Gradients can be set specifically using set_Grad_V,
314  * set_Grad_X and set_Grad_T or through calls to
315  * getSpeciesFluxes, getSpeciesFluxesES, getSpeciesVdiff,
316  * getSpeciesVdiffES, etc.
317  *
318  * @param d vector of mixture diffusion coefficients
319  * units = m2 s-1. length = number of species
320  */
321  virtual void getMixDiffCoeffs(doublereal* const d);
322 
323 
324  //! Return the thermal diffusion coefficients
325  /*!
326  * These are all zero for this simple implementaion
327  *
328  * @param dt thermal diffusion coefficients
329  */
330  virtual void getThermalDiffCoeffs(doublereal* const dt);
331 
332  //! Return the thermal conductivity of the solution
333  /*!
334  * The thermal conductivity calculation is handled by subclasses of
335  * LiquidTranInteraction as specified in the input file.
336  * These in turn employ subclasses of LTPspecies to
337  * determine the individual species thermal condictivities.
338  */
339  virtual doublereal thermalConductivity();
340 
341  //! Get the Electrical mobilities (m^2/V/s).
342  /*!
343  * The electrical mobilities are not well defined
344  * in the context of LiquidTransport because the Stefan Maxwell
345  * equation is solved. Here the electrical mobilities
346  * are calculated from the mixture-averaged
347  * diffusion coefficients through a call to getMixDiffCoeffs()
348  * using the Einstein relation
349  *
350  * \f[
351  * \mu^e_k = \frac{F D_k}{R T}
352  * \f]
353  *
354  * Note that this call to getMixDiffCoeffs() requires
355  * a solve of the Stefan Maxwell equation making this
356  * determination of the mixture averaged diffusion coefficients
357  * a \e slow method for obtaining diffusion coefficients.
358  *
359  * Also note that the Stefan Maxwell solve will be based upon
360  * the thermodynamic state (including gradients) most recently
361  * set. Gradients can be set specifically using set_Grad_V,
362  * set_Grad_X and set_Grad_T or through calls to
363  * getSpeciesFluxes, getSpeciesFluxesES, getSpeciesVdiff,
364  * getSpeciesVdiffES, etc.
365  *
366  * @param mobil_e Returns the electrical mobilities of
367  * the species in array \c mobil_e. The array must be
368  * dimensioned at least as large as the number of species.
369  */
370  virtual void getMobilities(doublereal* const mobil_e);
371 
372  //! Get the fluid mobilities (s kmol/kg).
373  /*!
374  * The fluid mobilities are not well defined
375  * in the context of LiquidTransport because the Stefan Maxwell
376  * equation is solved. Here the fluid mobilities
377  * are calculated from the mixture-averaged
378  * diffusion coefficients through a call to getMixDiffCoeffs()
379  * using the Einstein relation
380  *
381  * \f[
382  * \mu^f_k = \frac{D_k}{R T}
383  * \f]
384  *
385  * Note that this call to getMixDiffCoeffs() requires
386  * a solve of the Stefan Maxwell equation making this
387  * determination of the mixture averaged diffusion coefficients
388  * a \e slow method for obtaining diffusion coefficients.
389  *
390  * Also note that the Stefan Maxwell solve will be based upon
391  * the thermodynamic state (including gradients) most recently
392  * set. Gradients can be set specifically using set_Grad_V,
393  * set_Grad_X and set_Grad_T or through calls to
394  * getSpeciesFluxes, getSpeciesFluxesES, getSpeciesVdiff,
395  * getSpeciesVdiffES, etc.
396  *
397  * @param mobil_f Returns the fluid mobilities of
398  * the species in array \c mobil_f. The array must be
399  * dimensioned at least as large as the number of species.
400  */
401  virtual void getFluidMobilities(doublereal* const mobil_f);
402 
403  //! Specify the value of the gradient of the voltage
404  /*!
405  *
406  * @param grad_V Gradient of the voltage (length num dimensions);
407  */
408  virtual void set_Grad_V(const doublereal* const grad_V);
409 
410  //! Specify the value of the gradient of the temperature
411  /*!
412  * @param grad_T Gradient of the temperature (length num dimensions);
413  */
414  virtual void set_Grad_T(const doublereal* const grad_T);
415 
416  //! Specify the value of the gradient of the MoleFractions
417  /*!
418  *
419  * @param grad_X Gradient of the mole fractions(length nsp * num dimensions);
420  */
421  virtual void set_Grad_X(const doublereal* const grad_X);
422 
423  //! Compute the mixture electrical conductivity from
424  //! the Stefan-Maxwell equation.
425  /*!
426  * To compute the mixture electrical conductance, the Stefan
427  * Maxwell equation is solved for zero species gradients and
428  * for unit potential gradient, \f$ \nabla V \f$.
429  * The species fluxes are converted to current by summing over
430  * the charge-weighted fluxes according to
431  * \f[
432  * \vec{i} = \sum_{i} z_i F \rho \vec{V_i} / W_i
433  * \f]
434  * where \f$ z_i \f$ is the charge on species i,
435  * \f$ F \f$ is Faradays constant, \f$ \rho \f$ is the density,
436  * \f$ W_i \f$ is the molecular mass of species i.
437  * The conductance, \f$ \kappa \f$ is obtained from
438  * \f[
439  * \kappa = \vec{i} / \nabla V.
440  * \f]
441  *
442  */
443  virtual doublereal getElectricConduct();
444 
445  //! Compute the electric current density in A/m^2
446  /*!
447  * The electric current is computed first by computing the
448  * species diffusive fluxes using the Stefan Maxwell solution
449  * and then the current, \f$ \vec{i} \f$ by summing over
450  * the charge-weighted fluxes according to
451  * \f[
452  * \vec{i} = \sum_{i} z_i F \rho \vec{V_i} / W_i
453  * \f]
454  * where \f$ z_i \f$ is the charge on species i,
455  * \f$ F \f$ is Faradays constant, \f$ \rho \f$ is the density,
456  * \f$ W_i \f$ is the molecular mass of species \c i.
457  *
458  * @param ndim The number of spatial dimensions (1, 2, or 3).
459  * @param grad_T The temperature gradient (ignored in this model).
460  * @param ldx Leading dimension of the grad_X array.
461  * @param grad_X Gradients of the mole fraction
462  * Flat vector with the m_nsp in the inner loop.
463  * length = ldx * ndim
464  * @param ldf Leading dimension of the grad_V and current vectors.
465  * @param grad_V The electrostatic potential gradient.
466  * @param current The electric current in A/m^2.
467  */
468  virtual void getElectricCurrent(int ndim,
469  const doublereal* grad_T,
470  int ldx,
471  const doublereal* grad_X,
472  int ldf,
473  const doublereal* grad_V,
474  doublereal* current);
475 
476 
477  //! Get the species diffusive velocities wrt to the averaged velocity,
478  //! given the gradients in mole fraction and temperature
479  /*!
480  * The average velocity can be computed on a mole-weighted
481  * or mass-weighted basis, or the diffusion velocities may
482  * be specified as relative to a specific species (i.e. a
483  * solvent) all according to the velocityBasis input parameter.
484  *
485  * Units for the returned velocities are m s-1.
486  *
487  * @param ndim Number of dimensions in the flux expressions
488  * @param grad_T Gradient of the temperature
489  * (length = ndim)
490  * @param ldx Leading dimension of the grad_X array
491  * (usually equal to m_nsp but not always)
492  * @param grad_X Gradients of the mole fraction
493  * Flat vector with the m_nsp in the inner loop.
494  * length = ldx * ndim
495  * @param ldf Leading dimension of the fluxes array
496  * (usually equal to m_nsp but not always)
497  * @param Vdiff Output of the diffusive velocities.
498  * Flat vector with the m_nsp in the inner loop.
499  * length = ldx * ndim
500  */
501  virtual void getSpeciesVdiff(size_t ndim,
502  const doublereal* grad_T,
503  int ldx,
504  const doublereal* grad_X,
505  int ldf,
506  doublereal* Vdiff);
507 
508  //! Get the species diffusive velocities wrt to the averaged velocity,
509  //! given the gradients in mole fraction, temperature and electrostatic potential.
510  /*!
511  * The average velocity can be computed on a mole-weighted
512  * or mass-weighted basis, or the diffusion velocities may
513  * be specified as relative to a specific species (i.e. a
514  * solvent) all according to the velocityBasis input parameter.
515  *
516  * Units for the returned velocities are m s-1.
517  *
518  * @param ndim Number of dimensions in the flux expressions
519  * @param grad_T Gradient of the temperature
520  * (length = ndim)
521  * @param ldx Leading dimension of the grad_X array
522  * (usually equal to m_nsp but not always)
523  * @param grad_X Gradients of the mole fraction
524  * Flat vector with the m_nsp in the inner loop.
525  * length = ldx * ndim
526  * @param ldf Leading dimension of the fluxes array
527  * (usually equal to m_nsp but not always)
528  * @param grad_Phi Gradients of the electrostatic potential
529  * (length = ndim)
530  * @param Vdiff Output of the species diffusion velocities
531  * Flat vector with the m_nsp in the inner loop.
532  * length = ldx * ndim
533  */
534  virtual void getSpeciesVdiffES(size_t ndim, const doublereal* grad_T,
535  int ldx, const doublereal* grad_X,
536  int ldf, const doublereal* grad_Phi,
537  doublereal* Vdiff) ;
538 
539 
540  //! Return the species diffusive mass fluxes wrt to
541  //! the averaged velocity in [kmol/m^2/s].
542  /*!
543  *
544  * The diffusive mass flux of species \e k [kmol/m^2/s] is computed
545  * using the Stefan-Maxwell equation
546  *
547  * \f[
548  * X_i \nabla \mu_i = RT \sum_i \frac{X_i X_j}{D_{ij}}
549  * ( \vec{V}_j - \vec{V}_i )
550  * \f]
551  *
552  * to determine the diffusion velocity and
553  *
554  * \f[
555  * \vec{N}_i = C_T X_i \vec{V}_i
556  * \f]
557  *
558  * to determine the diffusion flux. Here \f$ C_T \f$ is the
559  * total concentration of the mixture [kmol/m^3], \f$ D_{ij} \f$
560  * are the Stefa-Maxwell interaction parameters in [m^2/s],
561  * \f$ \vec{V}_{i} \f$ is the diffusion velocity of species \e i,
562  * \f$ \mu_i \f$ is the electrochemical potential of species \e i.
563  *
564  * Note that for this method, there is no argument for the
565  * gradient of the electric potential (voltage). Electric
566  * potential gradients can be set with set_Grad_V() or
567  * method getSpeciesFluxesES() can be called.x
568  *
569  * The diffusion velocity is relative to an average velocity
570  * that can be computed on a mole-weighted
571  * or mass-weighted basis, or the diffusion velocities may
572  * be specified as relative to a specific species (i.e. a
573  * solvent) all according to the \verbatim <velocityBasis> \endverbatim input parameter.
574  *
575  * @param ndim The number of spatial dimensions (1, 2, or 3).
576  * @param grad_T The temperature gradient (ignored in this model).
577  * (length = ndim)
578  * @param ldx Leading dimension of the grad_X array.
579  * (usually equal to m_nsp but not always)
580  * @param grad_X Gradients of the mole fraction
581  * Flat vector with the m_nsp in the inner loop.
582  * length = ldx * ndim
583  * @param ldf Leading dimension of the fluxes array
584  * (usually equal to m_nsp but not always)
585  * @param fluxes Output of the diffusive mass fluxes
586  * Flat vector with the m_nsp in the inner loop.
587  * length = ldx * ndim
588  */
589  virtual void getSpeciesFluxes(size_t ndim, const doublereal* const grad_T,
590  size_t ldx, const doublereal* const grad_X,
591  size_t ldf, doublereal* const fluxes);
592 
593  //! Return the species diffusive mass fluxes wrt to
594  //! the averaged velocity in [kmol/m^2/s].
595  /*!
596  *
597  * The diffusive mass flux of species \e k is computed
598  * using the Stefan-Maxwell equation
599  * \f[
600  * X_i \nabla \mu_i
601  * = RT \sum_i \frac{X_i X_j}{D_{ij}}
602  * ( \vec{V}_j - \vec{V}_i )
603  * \f]
604  * to determine the diffusion velocity and
605  * \f[
606  * \vec{N}_i = C_T X_i \vec{V}_i
607  * \f]
608  * to determine the diffusion flux. Here \f$ C_T \f$ is the
609  * total concentration of the mixture [kmol/m^3], \f$ D_{ij} \f$
610  * are the Stefa-Maxwell interaction parameters in [m^2/s],
611  * \f$ \vec{V}_{i} \f$ is the diffusion velocity of species \e i,
612  * \f$ \mu_i \f$ is the electrochemical potential of species \e i.
613  *
614  * The diffusion velocity is relative to an average velocity
615  * that can be computed on a mole-weighted
616  * or mass-weighted basis, or the diffusion velocities may
617  * be specified as relative to a specific species (i.e. a
618  * solvent) all according to the \verbatim <velocityBasis>
619  * \endverbatim input parameter.
620 
621  * @param ndim The number of spatial dimensions (1, 2, or 3).
622  * @param grad_T The temperature gradient (ignored in this model).
623  * (length = ndim)
624  * @param ldx Leading dimension of the grad_X array.
625  * (usually equal to m_nsp but not always)
626  * @param grad_X Gradients of the mole fraction
627  * Flat vector with the m_nsp in the inner loop.
628  * length = ldx * ndim
629  * @param ldf Leading dimension of the fluxes array
630  * (usually equal to m_nsp but not always)
631  * @param grad_Phi Gradients of the electrostatic potential
632  * length = ndim
633  * @param fluxes Output of the diffusive mass fluxes
634  * Flat vector with the m_nsp in the inner loop.
635  * length = ldx * ndim
636  */
637  virtual void getSpeciesFluxesES(size_t ndim,
638  const doublereal* grad_T,
639  int ldx,
640  const doublereal* grad_X,
641  int ldf,
642  const doublereal* grad_Phi,
643  doublereal* fluxes);
644 
645  //! Return the species diffusive velocities relative to
646  //! the averaged velocity.
647  /*!
648  * This method acts similarly to getSpeciesVdiffES() but
649  * requires all gradients to be preset using methods
650  * set_Grad_X(), set_Grad_V(), set_Grad_T().
651  * See the documentation of getSpeciesVdiffES() for details.
652  *
653  * @param ldf Leading dimension of the Vdiff array.
654  * @param Vdiff Output of the diffusive velocities.
655  * Flat vector with the m_nsp in the inner loop.
656  * length = ldx * ndim
657  */
658  virtual void getSpeciesVdiffExt(size_t ldf, doublereal* Vdiff);
659 
660  //! Return the species diffusive fluxes relative to
661  //! the averaged velocity.
662  /*!
663  * This method acts similarly to getSpeciesFluxesES() but
664  * requires all gradients to be preset using methods
665  * set_Grad_X(), set_Grad_V(), set_Grad_T().
666  * See the documentation of getSpeciesFluxesES() for details.
667  *
668  * units = kg/m2/s
669  *
670  * @param ldf Leading dimension of the Vdiff array.
671  * @param fluxes Output of the diffusive fluxes.
672  * Flat vector with the m_nsp in the inner loop.
673  * length = ldx * ndim
674  */
675  virtual void getSpeciesFluxesExt(size_t ldf, doublereal* fluxes);
676 
677 protected:
678  //! Returns true if temperature has changed,
679  //! in which case flags are set to recompute transport properties.
680  /*!
681  * This is called whenever a transport property is requested.
682  * The first task is to check whether the temperature has changed
683  * since the last call to update_T().
684  * If it hasn't then an immediate return is carried out.
685  *
686  *
687  * Note this should be a lightweight function since it's
688  * part of all of the interfaces.
689  *
690  * @internal
691  *
692  * @return Returns true if the temperature has changed, and false otherwise
693  */
694  virtual bool update_T();
695 
696  //! Returns true if mixture composition has changed,
697  //! in which case flags are set to recompute transport properties.
698  /*!
699  * This is called for every interface call to check whether
700  * the concentrations have changed. Concentrations change
701  * whenever the pressure or the mole fraction has changed.
702  * If it has changed, the recalculations should be done.
703  *
704  * Note this should be a lightweight function since it's
705  * part of all of the interfaces.
706  *
707  * @internal
708  *
709  * @return Returns true if the mixture composition has changed, and false otherwise.
710  */
711  virtual bool update_C();
712 
713 
714  //! Updates the internal value of the gradient of the
715  //! logarithm of the activity, which is
716  //! used in the gradient of the chemical potential.
717  /*!
718  * Evaluate the gradients of the activity
719  * as they alter the diffusion coefficient.
720  *
721  * The gradient of the chemical potential can be written in terms of
722  * gradient of the logarithm of the mole fraction times a correction
723  * associated with the gradient of the activity coefficient relative to
724  * that of the mole fraction. Specifically, the gradients of the
725  * logarithms of each are involved according to the formula
726  *
727  * \f[
728  * \nabla \mu_k = RT \left[ \nabla ( \ln X_k ) +
729  * \nabla ( \ln \gamma_k ) \right] = RT \left[
730  * \nabla ( \ln a_k ) \right]
731  * \f]
732  *
733  * The gradient in the activity coefficient requires the use of thermophase
734  * getdlnActCoeff that calculates its change based on a chane in the state
735  * (i.e. temperature and composition of each species) which was first
736  * implemented in MargulesVPSSTP.cpp (LiquidTransport.h doxygen)
737  */
738  virtual void update_Grad_lnAC();
739 
740 
741  //! Solve the stefan_maxell equations for the diffusive fluxes.
742  /*!
743  * The diffusive mass flux of species \e k is computed
744  * using the Stefan-Maxwell equation
745  * \f[
746  * X_i \nabla \mu_i
747  * = RT \sum_i \frac{X_i X_j}{D_{ij}}
748  * ( \vec{V}_j - \vec{V}_i )
749  * \f]
750  * to determine the diffusion velocity and
751  * \f[
752  * \vec{N}_i = C_T X_i \vec{V}_i
753  * \f]
754  * to determine the diffusion flux. Here \f$ C_T \f$ is the
755  * total concentration of the mixture [kmol/m^3], \f$ D_{ij} \f$
756  * are the Stefa-Maxwell interaction parameters in [m^2/s],
757  * \f$ \vec{V}_{i} \f$ is the diffusion velocity of species \e i,
758  * \f$ \mu_i \f$ is the electrochemical potential of species \e i.
759  *
760  * The diffusion velocity is relative to an average velocity
761  * that can be computed on a mole-weighted
762  * or mass-weighted basis, or the diffusion velocities may
763  * be specified as relative to a specific species (i.e. a
764  * solvent) all according to the \verbatim <velocityBasis>
765  * \endverbatim input para
766  * The gradient in the activity coefficient requires the use of thermophase
767  * getdlnActCoeff that calculates its change based on a change in the state
768  * i.e. temperature and composition of each species.
769  * First implemented in MargulesVPSSTP.cppmeter.
770  *
771  * One of the Stefan Maxwell equations is replaced by the appropriate
772  * definition of the mass-averaged velocity, the mole-averaged velocity
773  * or the specification that velocities are relative to that
774  * of one species.
775  */
776  void stefan_maxwell_solve();
777 
778  //! Updates the array of pure species viscosities internally.
779  /*!
780  * The flag m_visc_ok is set to true.
781  *
782  * Note that for viscosity, a positive activation energy
783  * corresponds to the typical case of a positive argument
784  * to the exponential so that the Arrhenius expression is
785  *
786  * \f[
787  * \mu = A T^n \exp( + E / R T )
788  * \f]
789  */
790  void updateViscosity_T();
791 
792  //! Update the temperature-dependent ionic conductivity terms
793  //! for each species internally
794  /*!
795  * The flag m_ionCond_temp_ok is set to true.
796  */
798 
799  //! Updates the array of pure species mobility ratios internally.
800  /*!
801  * The flag m_mobRat_ok is set to true.
802  */
803  void updateMobilityRatio_T();
804 
805  //! Updates the array of pure species self diffusion coeffs internally.
806  /*!
807  * The flag m_selfDiff_ok is set to true.
808  */
809  void updateSelfDiffusion_T();
810 
811  //! Update the temperature-dependent hydrodynamic radius terms
812  //! for each species internally
813  /*!
814  * The flag m_radi_temp_ok is set to true.
815  */
817 
818  //! Update the temperature-dependent parts of the mixture-averaged
819  //! thermal conductivity internally
820  void updateCond_T();
821 
822  //! Update the concentration parts of the viscosities
823  /*!
824  * Internal routine is run whenever the update_boolean
825  * m_visc_conc_ok is false. Currently there is no concentration
826  * dependence for the pure species viscosities.
827  *
828  * @internal
829  */
830  void updateViscosities_C();
831 
832  //! Update the concentration parts of the ionic conductivity
833  /*!
834  * Internal routine is run whenever the update_boolean
835  * m_ionCond_conc_ok is false. Currently there is no concentration
836  * dependence for the pure species ionic conductivity.
837  *
838  * @internal
839  */
841 
842  //! Update the concentration parts of the mobility ratio
843  /*!
844  * Internal routine is run whenever the update_boolean
845  * m_mobRat_conc_ok is false. Currently there is no concentration
846  * dependence for the pure species mobility ratio.
847  *
848  * @internal
849  */
850  void updateMobilityRatio_C();
851 
852  //! Update the concentration parts of the self diffusion
853  /*!
854  * Internal routine is run whenever the update_boolean
855  * m_selfDiff_conc_ok is false. Currently there is no concentration
856  * dependence for the pure species self diffusion.
857  *
858  * @internal
859  */
860  void updateSelfDiffusion_C();
861 
862  //! Update the concentration dependence of the hydrodynamic radius
863  /*!
864  * Internal routine is run whenever the update_boolean
865  * m_radi_conc_ok is false. Currently there is no concentration
866  * dependence for the hydrodynamic radius.
867  *
868  * @internal
869  */
871 
872  //! Update the binary Stefan-Maxwell diffusion coefficients
873  //! wrt T using calls to the appropriate LTPspecies subclass
874  void updateDiff_T();
875 
876 
877 private:
878  //! Number of species squared
879  size_t m_nsp2;
880 
881  //! Minimum temperature applicable to the transport property eval
882  doublereal m_tmin;
883 
884  //! Maximum temperature applicable to the transport property evaluator
885  doublereal m_tmax;
886 
887  //! Local copy of the molecular weights of the species
888  /*!
889  * Length is equal to the number of species in the phase
890  */
892 
893  //! Viscosity for each species expressed as an appropriate subclass
894  //! of LTPspecies
895  /*!
896  * These subclasses of LTPspecies evaluate the species-specific
897  * transport properties according to the parameters parsed in
898  * TransportFactory::getLiquidSpeciesTransportData().
899  */
900  std::vector<LTPspecies*> m_viscTempDep_Ns;
901 
902  //! Viscosity of the mixture expressed as a subclass of
903  //! LiquidTranInteraction
904  /*!
905  * These subclasses of LiquidTranInteraction evaluate the
906  * mixture transport properties according to the parameters parsed in
907  * TransportFactory::getLiquidInteractionsTransportData().
908  */
910 
911  //! Ionic conductivity for each species expressed as an appropriate subclass
912  //! of LTPspecies
913  /*!
914  * These subclasses of LTPspecies evaluate the species-specific
915  * transport properties according to the parameters parsed in
916  * TransportFactory::getLiquidSpeciesTransportData().
917  */
918  std::vector<LTPspecies*> m_ionCondTempDep_Ns;
919 
920  //! Ionic Conductivity of the mixture expressed as a subclass of
921  //! LiquidTranInteraction
922  /*!
923  * These subclasses of LiquidTranInteraction evaluate the
924  * mixture transport properties according to the parameters parsed in
925  * TransportFactory::getLiquidInteractionsTransportData().
926  */
928 
929  //! Type def for LTPvector equating it with a vector of pointers to LTPspecies
930  typedef std::vector<LTPspecies*> LTPvector;
931 
932  //! Mobility ratio for the binary cominations of each species in each
933  //! pure phase expressed as an appropriate subclass of LTPspecies
934  /*!
935  * These subclasses of LTPspecies evaluate the species-specific
936  * transport properties according to the parameters parsed in
937  * TransportFactory::getLiquidSpeciesTransportData().
938  */
939  std::vector<LTPvector> m_mobRatTempDep_Ns;
940 
941  //! Mobility ratio for each binary combination of mobile species in the mixture
942  //! expressed as a subclass of LiquidTranInteraction
943  /*!
944  * These subclasses of LiquidTranInteraction evaluate the
945  * mixture transport properties according to the parameters parsed in
946  * TransportFactory::getLiquidInteractionsTransportData().
947  */
948  std::vector<LiquidTranInteraction*> m_mobRatMixModel;
949 
950  //! Self Diffusion for each species in each pure species phase
951  //! expressed as an appropriate subclass of LTPspecies
952  /*!
953  * These subclasses of LTPspecies evaluate the species-specific
954  * transport properties according to the parameters parsed in
955  * TransportFactory::getLiquidSpeciesTransportData().
956  */
957  std::vector<LTPvector> m_selfDiffTempDep_Ns;
958 
959  //! Self Diffusion for each species in the mixture expressed as a subclass of
960  //! LiquidTranInteraction
961  /*!
962  * These subclasses of LiquidTranInteraction evaluate the
963  * mixture transport properties according to the parameters parsed in
964  * TransportFactory::getLiquidInteractionsTransportData().
965  */
966  std::vector<LiquidTranInteraction*> m_selfDiffMixModel;
967 
968  //! Thermal conductivity for each species expressed as an
969  //! appropriate subclass of LTPspecies
970  /*!
971  * These subclasses of LTPspecies evaluate the species-specific
972  * transport properties according to the parameters parsed in
973  * TransportFactory::getLiquidSpeciesTransportData().
974  */
975  std::vector<LTPspecies*> m_lambdaTempDep_Ns;
976 
977  //! Thermal conductivity of the mixture expressed as a subclass of
978  //! LiquidTranInteraction
979  /*!
980  * These subclasses of LiquidTranInteraction evaluate the
981  * mixture transport properties according to the parameters parsed in
982  * TransportFactory::getLiquidInteractionsTransportData().
983  */
985 
986  //! (NOT USED IN LiquidTransport.)
987  //! Diffusion coefficient model for each species expressed as an
988  //! appropriate subclass of LTPspecies
989  /*!
990  * These subclasses of LTPspecies evaluate the species-specific
991  * transport properties according to the parameters parsed in
992  * TransportFactory::getLiquidSpeciesTransportData().
993  *
994  * Since the LiquidTransport class uses the Stefan-Maxwell equation
995  * to describe species diffusivity, the species-specific
996  * diffusivity is irrelevant.
997  */
998  std::vector<LTPspecies*> m_diffTempDep_Ns;
999 
1000  //! Species diffusivity of the mixture expressed as a subclass of
1001  //! LiquidTranInteraction. This will return an array of
1002  //! Stefan-Maxwell interaction parameters for use in the
1003  //! Stefan-Maxwell solution.
1004  /*!
1005  * These subclasses of LiquidTranInteraction evaluate the
1006  * mixture transport properties according to the parameters parsed in
1007  * TransportFactory::getLiquidInteractionsTransportData().
1008  */
1010 
1011  //! Setfan-Maxwell diffusion coefficients
1013 
1014 
1015  //! Hydrodynamic radius for each species expressed as an appropriate subclass of LTPspecies
1016  /*!
1017  * These subclasses of LTPspecies evaluate the species-specific
1018  * transport properties according to the parameters parsed in
1019  * TransportFactory::getLiquidSpeciesTransportData().
1020  * length = nsp
1021  */
1022  std::vector<LTPspecies*> m_radiusTempDep_Ns;
1023 
1024  //! (Not used in LiquidTransport)
1025  //! Hydrodynamic radius of the mixture expressed as a subclass of
1026  //! LiquidTranInteraction
1027  /*!
1028  * These subclasses of LiquidTranInteraction evaluate the
1029  * mixture transport properties according to the parameters parsed in
1030  * TransportFactory::getLiquidInteractionsTransportData().
1031  */
1033 
1034  //! Species hydrodynamic radius
1036 
1037  //! Hydrodynamic radius
1038 
1039 
1040  //! Internal value of the gradient of the mole fraction vector
1041  /*!
1042  * Note, this is the only gradient value that can and perhaps
1043  * should reflect the true state of the mole fractions in the
1044  * application solution vector. In other words no cropping or
1045  * massaging of the values to make sure they are above zero
1046  * should occur. - developing ....
1047  *
1048  * m_nsp is the number of species in the fluid
1049  * k is the species index
1050  * n is the dimensional index (x, y, or z). It has a length
1051  * equal to m_nDim
1052  *
1053  * m_Grad_X[n*m_nsp + k]
1054  */
1056 
1057  //! Gradient of the logarithm of the activity
1058  /*!
1059  * This quantity appears in the gradient of the chemical potential.
1060  * It replaces the gradient of the mole fraction, and in this way
1061  * serves to "modify" the diffusion coefficient.
1062  *
1063  * \f[
1064  * m\_Grad\_lnAC[k] = \nabla ( \ln X_k ) +
1065  * \nabla ( \ln \gamma_k )
1066  * \f]
1067  *
1068  * k is the species index
1069  * n is the dimensional index (x, y, or z). It has a length
1070  * equal to m_nDim
1071  *
1072  * m_Grad_X[n*m_nsp + k]
1073  *
1074  */
1076 
1077  //! Internal value of the gradient of the Temperature vector
1078  /*!
1079  * Generally, if a transport property needs this
1080  * in its evaluation it will look to this place
1081  * to get it.
1082  *
1083  * No internal property is precalculated based on gradients.
1084  * Gradients are assumed to be freshly updated before
1085  * every property call.
1086  */
1088 
1089  //! Internal value of the gradient of the Pressure vector
1090  /*!
1091  * Generally, if a transport property needs this
1092  * in its evaluation it will look to this place
1093  * to get it.
1094  *
1095  * No internal property is precalculated based on gradients.
1096  * Gradients are assumed to be freshly updated before
1097  * every property call.
1098  */
1100 
1101  //! Internal value of the gradient of the Electric Voltage
1102  /*!
1103  * Generally, if a transport property needs this
1104  * in its evaluation it will look to this place
1105  * to get it.
1106  *
1107  * No internal property is precalculated based on gradients.
1108  * Gradients are assumed to be freshly updated before
1109  * every property call.
1110  */
1112 
1113  //! Gradient of the electrochemical potential
1114  /*!
1115  * m_nsp is the number of species in the fluid
1116  * k is the species index
1117  * n is the dimensional index (x, y, or z)
1118  *
1119  * \f[
1120  * m\_Grad\_mu[n*m_nsp + k]
1121  * \f]
1122  */
1124 
1125  // property values
1126 
1127  //! Array of Binary Diffusivities
1128  /*!
1129  * These are evaluated according to the subclass of
1130  * LiquidTranInteraction stored in m_diffMixModel.
1131  *
1132  * This has a size equal to nsp x nsp
1133  * It is a symmetric matrix.
1134  * D_ii is the self diffusion coefficient. D_ii is not
1135  * needed except for when there is one species in the mixture.
1136  *
1137  * units m2/sec
1138  */
1140 
1141  //! Internal value of the species viscosities
1142  /*!
1143  * Viscosity of the species evaluated using subclass of LTPspecies
1144  * held in m_viscTempDep_Ns.
1145  *
1146  * Length = number of species
1147  *
1148  * controlling update boolean -> m_visc_temp_ok
1149  */
1151 
1152  //! Internal value of the species ionic conductivities
1153  /*!
1154  * Ionic conductivity of the species evaluated using subclass of LTPspecies
1155  * held in m_ionCondTempDep_Ns.
1156  *
1157  * Length = number of species
1158  *
1159  * controlling update boolean -> m_ionCond_temp_ok
1160  */
1162 
1163  //! Internal value of the species mobility ratios
1164  /*!
1165  * Mobility ratio of the species evaluated using subclass of LTPspecies
1166  * held in m_mobRatTempDep_Ns.
1167  *
1168  * Length = number of species
1169  *
1170  * controlling update boolean -> m_mobRat_temp_ok
1171  */
1173 
1174  //! Internal value of the species self diffusion coefficients
1175  /*!
1176  * Self diffusion of the species evaluated using subclass of LTPspecies
1177  * held in m_selfDiffTempDep_Ns.
1178  *
1179  * Length = number of species
1180  *
1181  * controlling update boolean -> m_selfDiff_temp_ok
1182  */
1184 
1185  //! Internal value of the species individual thermal conductivities
1186  /*!
1187  * Thermal conductivities of the species evaluated using subclass
1188  * of LTPspecies held in m_lambdaTempDep_Ns.
1189  *
1190  * Length = number of species
1191  *
1192  */
1194 
1195  //! State of the mole fraction vector.
1197 
1198  //! Local copy of the mass fractions of the species in the phase
1199  /*!
1200  * The mass fraction vector comes from the ThermoPhase object.
1201  *
1202  * length = m_nsp
1203  */
1205 
1206  //! Local copy of the mass fractions of the species in the phase
1207  /**
1208  * This version of the mass fraction vector is adjusted to a
1209  * minimum lower bound of MIN_X for use in transport calculations.
1210  */
1212 
1213  //! Local copy of the mole fractions of the species in the phase
1214  /*!
1215  * The mole fractions here are assumed to be bounded by 0.0 and 1.0
1216  * and they are assumed to add up to one exactly. This mole
1217  * fraction vector comes from the ThermoPhase object. Derivative
1218  * quantities from this are referred to as bounded.
1219  *
1220  * Update info?
1221  * length = m_nsp
1222  */
1224 
1225  //! Non-zero mole fraction vector used in transport property calculations
1226  /*!
1227  * The mole fractions here are assumed to be bounded by MIN_X and 1.0
1228  * and they may not be assumed to add up to one. This
1229  * mole fraction vector is created from the ThermoPhase object.
1230  * Derivative quantities of this use the _tran suffix.
1231  *
1232  * Update info?
1233  * length = m_nsp
1234  */
1236 
1237  //! Local copy of the concentrations of the species in the phase
1238  /*!
1239  * The concentrations are consistent with the m_molefracs
1240  * vector which is bounded and sums to one.
1241  *
1242  * Update info?
1243  * length = m_nsp
1244  */
1246 
1247  //! Local copy of the total concentration.
1248  /*!
1249  * This is consistent with the m_concentrations[] and
1250  * m_molefracs[] vector.
1251  */
1252  doublereal concTot_;
1253 
1254  //! Local copy of the total concentration.
1255  /*!
1256  * This is consistent with the x_molefracs_tran vector and
1257  * with the concTot_ number;
1258  */
1259  doublereal concTot_tran_;
1260 
1261  //! Mean molecular mass
1263 
1264  //! Density
1265  doublereal dens_;
1266 
1267  //! Local copy of the charge of each species
1268  /*!
1269  * Contains the charge of each species (length m_nsp)
1270  */
1272 
1273  //! Specific volume for each species. Local copy from thermo object.
1275 
1276  //! Vector of activity coefficients
1278 
1279  //! RHS to the stefan-maxwell equation
1281 
1282  //! Matrix for the stefan maxwell equation.
1284 
1285  //! Current Temperature -> locally stored
1286  /*!
1287  * This is used to test whether new temperature computations
1288  * should be performed.
1289  */
1290  doublereal m_temp;
1291 
1292  //! Current value of the pressure
1293  doublereal m_press;
1294 
1295  //! Solution of the Stefan Maxwell equation in terms of flux
1296  /*!
1297  * This is the mass flux of species k
1298  * in units of kg m-3 s-1.
1299  */
1301 
1302  //! Solution of the Stefan Maxwell equation
1303  /*!
1304  * This is the diffusion velocity of species k
1305  * in units of m/s and relative to the mole-averaged velocity.
1306  */
1308 
1309  //! Saved value of the mixture thermal conductivity
1310  doublereal m_lambda;
1311 
1312  //! Saved value of the mixture viscosity
1313  doublereal m_viscmix;
1314 
1315  //! Saved value of the mixture ionic conductivity
1316  doublereal m_ionCondmix;
1317 
1318  //! Saved values of the mixture mobility ratios
1320 
1321  //! Saved values of the mixture self diffusion coefficients
1323 
1324  //! work space
1325  /*!
1326  * Length is equal to m_nsp
1327  */
1329 
1330 
1331 
1332 private:
1333  //! Boolean indicating that the top-level mixture viscosity is current
1334  /*!
1335  * This is turned false for every change in T, P, or C.
1336  */
1338 
1339  //! Boolean indicating that weight factors wrt viscosity is current
1341 
1342  //! Flag to indicate that the pure species viscosities
1343  //! are current wrt the concentration
1345 
1346  //! Boolean indicating that the top-level mixture ionic conductivity is current
1347  /*!
1348  * This is turned false for every change in T, P, or C.
1349  */
1351 
1352  //! Boolean indicating that weight factors wrt ionic conductivty is current
1354 
1355  //! Flag to indicate that the pure species ionic conductivities
1356  //! are current wrt the concentration
1358 
1359  //! Flag to indicate that the mixture conductivity is current
1361 
1362  //! Boolean indicating that the top-level mixture mobility ratio is current
1363  /*!
1364  * This is turned false for every change in T, P, or C.
1365  */
1367 
1368  //! Boolean indicating that weight factors wrt mobility ratio is current
1370 
1371  //! Flag to indicate that the pure species mobility ratios
1372  //! are current wrt the concentration
1374 
1375  //! Boolean indicating that the top-level mixture self diffusion is current
1376  /*!
1377  * This is turned false for every change in T, P, or C.
1378  */
1380 
1381  //! Boolean indicating that weight factors wrt self diffusion is current
1383 
1384  //! Flag to indicate that the pure species self diffusion
1385  //! are current wrt the concentration
1387 
1388  //! Boolean indicating that mixture diffusion coeffs are current
1390 
1391  //! Boolean indicating that temperature dependence of
1392  //! hydrodynamic radius is current
1394 
1395  //! Flag to indicate that the hydrodynamic radius is current
1396  //! is current wrt the concentration
1398 
1399  //! Boolean indicating that mixture diffusion coeffs are current
1401 
1402  //! Boolean indicating that binary diffusion coeffs are current
1404 
1405  //! Flag to indicate that the pure species conductivities
1406  //! are current wrt the temperature
1408 
1409  //! Boolean indicating that mixture conductivity is current
1411 
1412  //! Mode indicator for transport models -- currently unused.
1413  int m_mode;
1414 
1415  //! Debugging flags
1416  /*!
1417  * Turn on to get debugging information
1418  */
1419  bool m_debug;
1420 
1421  //! Number of dimensions
1422  /*!
1423  * Either 1, 2, or 3
1424  */
1425  size_t m_nDim;
1426 
1427  //! Throw an exception if this method is invoked.
1428  /*!
1429  * This probably indicates something is not yet implemented.
1430  *
1431  * @param msg Indicates the member function which is not implemented
1432  */
1433  doublereal err(std::string msg) const;
1434 
1435 };
1436 }
1437 #endif
1438 
1439 
1440 
1441 
1442 
1443