Clean up Doxygen docs and comments for Transport classes

This commit is contained in:
Ray Speth 2015-11-10 17:23:57 -05:00
parent fe4035647f
commit 0c8bf1fd08
27 changed files with 1553 additions and 1907 deletions

View file

@ -1,8 +1,8 @@
/** /**
* @file DustyGasTransport.h * @file DustyGasTransport.h Headers for the DustyGasTransport object, which
* Headers for the DustyGasTransport object, which models transport properties * models transport properties in porous media using the dusty gas
* in porous media using the dusty gas approximation * approximation (see \ref tranprops and \link Cantera::DustyGasTransport
* (see \ref tranprops and \link Cantera::DustyGasTransport DustyGasTransport \endlink) . * DustyGasTransport \endlink) .
*/ */
// Copyright 2003 California Institute of Technology // Copyright 2003 California Institute of Technology
@ -18,45 +18,44 @@ namespace Cantera
{ {
//! Class DustyGasTransport implements the Dusty Gas model for transport in porous media. //! Class DustyGasTransport implements the Dusty Gas model for transport in porous media.
/*! /*!
* As implemented here, only species transport is handled. The viscosity, * As implemented here, only species transport is handled. The viscosity,
* thermal conductivity, and thermal diffusion coefficients are not * thermal conductivity, and thermal diffusion coefficients are not implemented.
* implemented.
* *
* The dusty gas model includes the effects of Darcy's law. There is a net * The dusty gas model includes the effects of Darcy's law. There is a net flux
* flux of species due to a pressure gradient that is part of Darcy's law. * of species due to a pressure gradient that is part of Darcy's law.
* *
* The dusty gas model expresses the value of the molar flux of species \f$ k * The dusty gas model expresses the value of the molar flux of species
* \f$, \f$ J_k \f$ by the following formula. * \f$ k \f$, \f$ J_k \f$ by the following formula.
* *
* \f[ * \f[
* \sum_{j \ne k}{\frac{X_j J_k - X_k J_j}{D^e_{kj}}} + \frac{J_k}{\mathcal{D}^{e}_{k,knud}} = * \sum_{j \ne k}{\frac{X_j J_k - X_k J_j}{D^e_{kj}}} + \frac{J_k}{\mathcal{D}^{e}_{k,knud}} =
* - \nabla C_k - \frac{C_k}{\mathcal{D}^{e}_{k,knud}} \frac{\kappa}{\mu} \nabla p * - \nabla C_k - \frac{C_k}{\mathcal{D}^{e}_{k,knud}} \frac{\kappa}{\mu} \nabla p
* \f] * \f]
* *
* \f$ j \f$ is a sum over all species in the gas. * \f$ j \f$ is a sum over all species in the gas.
* *
* The effective Knudsen diffusion coefficients are given by the following form * The effective Knudsen diffusion coefficients are given by the following form
* *
* \f[ * \f[
* \mathcal{D}^e_{k,knud} = \frac{2}{3} \frac{r_{pore} \phi}{\tau} \left( \frac{8 R T}{\pi W_k} \right)^{1/2} * \mathcal{D}^e_{k,knud} = \frac{2}{3} \frac{r_{pore} \phi}{\tau} \left( \frac{8 R T}{\pi W_k} \right)^{1/2}
* \f] * \f]
* *
* The effective knudsen diffusion coefficients take into account the effects of collisions of gas-phase * The effective knudsen diffusion coefficients take into account the effects of
* molecules with the wall. * collisions of gas-phase molecules with the wall.
* *
* References for the Dusty Gas Model * References for the Dusty Gas Model
* *
* (1) H. Zhu, R. J. Kee, "Modeling Electrochemical Impedance Spectra in SOFC Button Cells with * 1. H. Zhu, R. J. Kee, "Modeling Electrochemical Impedance Spectra in SOFC
* Internal Methane Reforming," J. Electrochem. Soc., 153(9) A1765-1772 (2006). * Button Cells with Internal Methane Reforming," J. Electrochem. Soc.,
* * 153(9) A1765-1772 (2006).
* (2) H. Zhu, R. J. Kee, V. M. Janardhanan, O. Deutschmann, D. G. Goodwin, J. Electrochem. Soc., 152, A2427 (2005). * 2. H. Zhu, R. J. Kee, V. M. Janardhanan, O. Deutschmann, D. G. Goodwin, J.
* * Electrochem. Soc., 152, A2427 (2005).
* (3) E. A. Mason, A. P. Malinauskas," Gas Transport in Porous Media: the Dusty-Gas Model", * 3. E. A. Mason, A. P. Malinauskas," Gas Transport in Porous Media: the Dusty-
* American Elsevier, New York (1983). * Gas Model", American Elsevier, New York (1983).
* * 4. J. W. Veldsink, R. M. J. van Damme, G. F. Versteeg, W. P. M. van Swaaij,
* (4) J. W. Veldsink, R. M. J. van Damme, G. F. Versteeg, W. P. M. van Swaaij, * "The use of the dusty gas model for the description of mass transport with
* "The use of the dusty gas model for the description of mass transport with chemical reaction in porous media," * chemical reaction in porous media," Chemical Engineering Journal, 57, 115
* Chemical Engineering Journal, 57, 115 - 125 (1995). * - 125 (1995).
* @ingroup tranprops * @ingroup tranprops
*/ */
class DustyGasTransport : public Transport class DustyGasTransport : public Transport
@ -64,7 +63,8 @@ class DustyGasTransport : public Transport
public: public:
//! default constructor //! default constructor
/*! /*!
* @param thermo Pointer to the ThermoPhase object for this phase. Defaults to zero. * @param thermo Pointer to the ThermoPhase object for this phase.
* Defaults to zero.
*/ */
DustyGasTransport(thermo_t* thermo=0); DustyGasTransport(thermo_t* thermo=0);
@ -72,9 +72,10 @@ public:
//! Assignment operator //! Assignment operator
/*! /*!
* Warning -> Shallow pointer copies are made of m_thermo and m_gastran.. gastran may not point to the correct * Warning -> Shallow pointer copies are made of m_thermo and m_gastran.
* object after this copy. The routine initialize() must be called after this * gastran may not point to the correct object after this copy.
* routine to complete the copy. * The routine initialize() must be called after this routine to
* complete the copy.
* *
* @param right Reference to DustyGasTransport object to be copied * @param right Reference to DustyGasTransport object to be copied
* into the current one. * into the current one.
@ -83,8 +84,7 @@ public:
virtual Transport* duplMyselfAsTransport() const; virtual Transport* duplMyselfAsTransport() const;
//--------------------------------------------------------- // overloaded base class methods
// overloaded base class methods
virtual void setThermo(thermo_t& thermo); virtual void setThermo(thermo_t& thermo);
@ -92,15 +92,6 @@ public:
return cDustyGasTransport; return cDustyGasTransport;
} }
//! Return the Multicomponent diffusion coefficients. Units: [m^2/s].
/*!
* Returns the array of multicomponent diffusion coefficients.
*
* @param ld The dimension of the inner loop of d (usually equal to m_nsp)
* @param d flat vector of diffusion coefficients, fortran ordering.
* d[ld*j+i] is the D_ij diffusion coefficient (the diffusion
* coefficient for species i due to species j).
*/
virtual void getMultiDiffCoeffs(const size_t ld, doublereal* const d); virtual void getMultiDiffCoeffs(const size_t ld, doublereal* const d);
//! Get the molar fluxes [kmol/m^2/s], given the thermodynamic state at two nearby points. //! Get the molar fluxes [kmol/m^2/s], given the thermodynamic state at two nearby points.
@ -119,32 +110,31 @@ public:
const doublereal* const state2, const doublereal delta, const doublereal* const state2, const doublereal delta,
doublereal* const fluxes); doublereal* const fluxes);
//-----------------------------------------------------------
// new methods added in this class // new methods added in this class
//! Set the porosity (dimensionless) //! Set the porosity (dimensionless)
/*! /*!
* @param porosity Set the value of the porosity * @param porosity Set the value of the porosity
*/ */
void setPorosity(doublereal porosity); void setPorosity(doublereal porosity);
//! Set the tortuosity (dimensionless) //! Set the tortuosity (dimensionless)
/*! /*!
* Tortuosity is considered to be constant within the object * Tortuosity is considered to be constant within the object
* *
* @param tort Value of the tortuosity * @param tort Value of the tortuosity
*/ */
void setTortuosity(doublereal tort); void setTortuosity(doublereal tort);
//! Set the mean pore radius (m) //! Set the mean pore radius (m)
/*! /*!
* @param rbar Value of the pore radius ( m) * @param rbar Value of the pore radius ( m)
*/ */
void setMeanPoreRadius(doublereal rbar); void setMeanPoreRadius(doublereal rbar);
//! Set the mean particle diameter //! Set the mean particle diameter
/*! /*!
* @param dbar Set the mean particle diameter (m) * @param dbar Set the mean particle diameter (m)
*/ */
void setMeanParticleDiameter(doublereal dbar); void setMeanParticleDiameter(doublereal dbar);
@ -152,12 +142,12 @@ public:
/*! /*!
* If not set, the value for close-packed spheres will be used by default. * If not set, the value for close-packed spheres will be used by default.
* *
* The value for close-packed spheres is given below, where p is the porosity, * The value for close-packed spheres is given below, where p is the
* t is the tortuosity, and d is the diameter of the sphere * porosity, t is the tortuosity, and d is the diameter of the sphere
* *
* \f[ * \f[
* \kappa = \frac{p^3 d^2}{72 t (1 - p)^2} * \kappa = \frac{p^3 d^2}{72 t (1 - p)^2}
* \f] * \f]
* *
* @param B set the permeability of the media (units = m^2) * @param B set the permeability of the media (units = m^2)
*/ */
@ -166,86 +156,88 @@ public:
//! Return a reference to the transport manager used to compute the gas //! Return a reference to the transport manager used to compute the gas
//! binary diffusion coefficients and the viscosity. //! binary diffusion coefficients and the viscosity.
/*! /*!
* @return Returns a reference to the gas transport object * @returns a reference to the gas transport object
*/ */
Transport& gasTransport(); Transport& gasTransport();
//! Make the TransportFactory object a friend, because this object has restricted its //! Make the TransportFactory object a friend, because this object has
//! instantiation to classes which are friends. //! restricted its instantiation to classes which are friends.
friend class TransportFactory; friend class TransportFactory;
protected: protected:
//! Initialization routine called by TransportFactory //! Initialization routine called by TransportFactory
/*! /*!
* The DustyGas model is a subordinate model to the gas phase transport model. Here we * The DustyGas model is a subordinate model to the gas phase transport
* set the gas phase models. * model. Here we set the gas phase models.
* *
* This is a protected routine, so that initialization of the Model must occur within Cantera's setup * This is a protected routine, so that initialization of the Model must
* occur within Cantera's setup
* *
* @param phase Pointer to the underlying ThermoPhase model for the gas phase * @param phase Pointer to the underlying ThermoPhase model for the gas phase
* @param gastr Pointer to the underlying Transport model for transport in the gas phase. * @param gastr Pointer to the underlying Transport model for transport in
* the gas phase.
*/ */
void initialize(ThermoPhase* phase, Transport* gastr); void initialize(ThermoPhase* phase, Transport* gastr);
private: private:
//! Update temperature-dependent quantities within the object //! Update temperature-dependent quantities within the object
/*! /*!
* The object keeps a value m_temp, which is the temperature at which * The object keeps a value m_temp, which is the temperature at which
* quantities were last evaluated at. If the temperature is changed, * quantities were last evaluated at. If the temperature is changed, update
* update Booleans are set false, triggering recomputation. * Booleans are set false, triggering recomputation.
*/ */
void updateTransport_T(); void updateTransport_T();
//! Update concentration-dependent quantities within the object //! Update concentration-dependent quantities within the object
/*! /*!
* The object keeps a value m_temp, which is the temperature at which * The object keeps a value m_temp, which is the temperature at which
* quantities were last evaluated at. If the temperature is changed, * quantities were last evaluated at. If the temperature is changed, update
* update Booleans are set false, triggering recomputation. * Booleans are set false, triggering recomputation.
*/ */
void updateTransport_C(); void updateTransport_C();
//! Private routine to update the dusty gas binary diffusion coefficients //! Private routine to update the dusty gas binary diffusion coefficients
/*! /*!
* The dusty gas binary diffusion coefficients \f$ D^{dg}_{i,j} \f$ are * The dusty gas binary diffusion coefficients \f$ D^{dg}_{i,j} \f$ are
* evaluated from the binary gas-phase diffusion coefficients \f$ * evaluated from the binary gas-phase diffusion coefficients \f$
* D^{bin}_{i,j} \f$ using the following formula * D^{bin}_{i,j} \f$ using the following formula
* *
* \f[ * \f[
* D^{dg}_{i,j} = \frac{\phi}{\tau} D^{bin}_{i,j} * D^{dg}_{i,j} = \frac{\phi}{\tau} D^{bin}_{i,j}
* \f] * \f]
* *
* where \f$ \phi \f$ is the porosity of the media and \f$ \tau \f$ is * where \f$ \phi \f$ is the porosity of the media and \f$ \tau \f$ is the
* the tortuosity of the media. * tortuosity of the media.
*/ */
void updateBinaryDiffCoeffs(); void updateBinaryDiffCoeffs();
//! Update the Multicomponent diffusion coefficients that are used in the //! Update the Multicomponent diffusion coefficients that are used in the
//! approximation //! approximation
/*! /*!
* This routine updates the H matrix and then inverts it. * This routine updates the H matrix and then inverts it.
*/ */
void updateMultiDiffCoeffs(); void updateMultiDiffCoeffs();
//! Update the Knudsen diffusion coefficients //! Update the Knudsen diffusion coefficients
/*! /*!
* The Knudsen diffusion coefficients are given by the following form * The Knudsen diffusion coefficients are given by the following form
* *
* \f[ * \f[
* \mathcal{D}^{knud}_k = \frac{2}{3} \frac{r_{pore} \phi}{\tau} \left( \frac{8 R T}{\pi W_k} \right)^{1/2} * \mathcal{D}^{knud}_k = \frac{2}{3} \frac{r_{pore} \phi}{\tau} \left( \frac{8 R T}{\pi W_k} \right)^{1/2}
* \f] * \f]
*/ */
void updateKnudsenDiffCoeffs(); void updateKnudsenDiffCoeffs();
//! Calculate the H matrix //! Calculate the H matrix
/*! /*!
* The multicomponent diffusion H matrix \f$ H_{k,l} \f$ is given by the following form * The multicomponent diffusion H matrix \f$ H_{k,l} \f$ is given by the following form
* *
* \f[ * \f[
* H_{k,l} = - \frac{X_k}{D_{k,l}} * H_{k,l} = - \frac{X_k}{D_{k,l}}
* \f] * \f]
* \f[ * \f[
* H_{k,k} = \frac{1}{\mathcal(D)^{knud}_{k}} + \sum_{j \ne k}^N{ \frac{X_j}{D_{k,j}} } * H_{k,k} = \frac{1}{\mathcal(D)^{knud}_{k}} + \sum_{j \ne k}^N{ \frac{X_j}{D_{k,j}} }
* \f] * \f]
*/ */
void eval_H_matrix(); void eval_H_matrix();
@ -262,36 +254,19 @@ private:
//! mole fractions //! mole fractions
vector_fp m_x; vector_fp m_x;
//! Knudsen diffusion coefficients //! Knudsen diffusion coefficients. @see updateKnudsenDiffCoeffs()
/*!
* The Knudsen diffusion coefficients are given by the following form
*
* \f[
* \mathcal{D}^{knud}_k = \frac{2}{3} \frac{r_{pore} \phi}{\tau} \left( \frac{8 R T}{\pi W_k} \right)^{1/2}
* \f]
*/
vector_fp m_dk; vector_fp m_dk;
//! temperature //! temperature
doublereal m_temp; doublereal m_temp;
//! Multicomponent diffusion coefficients //! Multicomponent diffusion coefficients. @see eval_H_matrix()
/*!
* The multicomponent diffusion matrix \f$ H_{k,l} \f$ is given by the following form
*
* \f[
* H_{k,l} = - \frac{X_k}{D_{k,l}}
* \f]
* \f[
* H_{k,k} = \frac{1}{\mathcal(D)^{knud}_{k}} + \sum_{j \ne k}^N{ \frac{X_j}{D_{k,j}} }
* \f]
*/
DenseMatrix m_multidiff; DenseMatrix m_multidiff;
//! work space of size m_nsp; //! work space of size m_nsp;
vector_fp m_spwork; vector_fp m_spwork;
//! work space of size m_nsp; //! work space of size m_nsp;
vector_fp m_spwork2; vector_fp m_spwork2;
//! Pressure Gradient //! Pressure Gradient
@ -314,24 +289,22 @@ private:
//! Particle diameter //! Particle diameter
/*! /*!
* The medium is assumed to consist of particles of size m_diam * The medium is assumed to consist of particles of size m_diam. units = m
* units = m
*/ */
doublereal m_diam; doublereal m_diam;
//! Permeability of the media //! Permeability of the media
/*! /*!
* The permeability is the proportionality constant for Darcy's * The permeability is the proportionality constant for Darcy's law which
* law which relates discharge rate and viscosity to the applied * relates discharge rate and viscosity to the applied pressure gradient.
* pressure gradient.
* *
* Below is Darcy's law, where \f$ \kappa \f$ is the permeability * Below is Darcy's law, where \f$ \kappa \f$ is the permeability
* *
* \f[ * \f[
* v = \frac{\kappa}{\mu} \frac{\delta P}{\delta x} * v = \frac{\kappa}{\mu} \frac{\delta P}{\delta x}
* \f] * \f]
* *
* units are m2 * units are m2
*/ */
doublereal m_perm; doublereal m_perm;

View file

@ -26,19 +26,19 @@ public:
/*! /*!
* The viscosity is computed using the Wilke mixture rule (kg /m /s) * The viscosity is computed using the Wilke mixture rule (kg /m /s)
* *
* \f[ * \f[
* \mu = \sum_k \frac{\mu_k X_k}{\sum_j \Phi_{k,j} X_j}. * \mu = \sum_k \frac{\mu_k X_k}{\sum_j \Phi_{k,j} X_j}.
* \f] * \f]
* *
* Here \f$ \mu_k \f$ is the viscosity of pure species \e k, and * Here \f$ \mu_k \f$ is the viscosity of pure species \e k, and
* *
* \f[ * \f[
* \Phi_{k,j} = \frac{\left[1 * \Phi_{k,j} = \frac{\left[1
* + \sqrt{\left(\frac{\mu_k}{\mu_j}\sqrt{\frac{M_j}{M_k}}\right)}\right]^2} * + \sqrt{\left(\frac{\mu_k}{\mu_j}\sqrt{\frac{M_j}{M_k}}\right)}\right]^2}
* {\sqrt{8}\sqrt{1 + M_k/M_j}} * {\sqrt{8}\sqrt{1 + M_k/M_j}}
* \f] * \f]
* *
* @return Returns the viscosity of the mixture ( units = Pa s = kg /m /s) * @returns the viscosity of the mixture (units = Pa s = kg /m /s)
* *
* @see updateViscosity_T(); * @see updateViscosity_T();
*/ */
@ -53,7 +53,7 @@ public:
//! Returns the matrix of binary diffusion coefficients. //! Returns the matrix of binary diffusion coefficients.
/*! /*!
* d[ld*j + i] = rp * m_bdiff(i,j); * d[ld*j + i] = rp * m_bdiff(i,j);
* *
* @param ld offset of rows in the storage * @param ld offset of rows in the storage
* @param d output vector of diffusion coefficients. Units of m**2 / s * @param d output vector of diffusion coefficients. Units of m**2 / s
@ -69,14 +69,14 @@ public:
* returns the self-diffusion coefficient. This is needed to avoid a Nan * returns the self-diffusion coefficient. This is needed to avoid a Nan
* result in the formula below. * result in the formula below.
* *
* This is Eqn. 12.180 from "Chemically Reacting Flow" * This is Eqn. 12.180 from "Chemically Reacting Flow"
* *
* \f[ * \f[
* D_{km}' = \frac{\left( \bar{M} - X_k M_k \right)}{ \bar{\qquad M \qquad } } {\left( \sum_{j \ne k} \frac{X_j}{D_{kj}} \right) }^{-1} * D_{km}' = \frac{\left( \bar{M} - X_k M_k \right)}{ \bar{\qquad M \qquad } } {\left( \sum_{j \ne k} \frac{X_j}{D_{kj}} \right) }^{-1}
* \f] * \f]
* *
* @param[out] d Vector of mixture diffusion coefficients, \f$ D_{km}' \f$ , * @param[out] d Vector of mixture diffusion coefficients, \f$ D_{km}' \f$ ,
* for each species (m^2/s). length m_nsp * for each species (m^2/s). length m_nsp
*/ */
virtual void getMixDiffCoeffs(doublereal* const d); virtual void getMixDiffCoeffs(doublereal* const d);
@ -166,17 +166,17 @@ protected:
* pairs. For more information about this correction, see Dixon-Lewis, Proc. * pairs. For more information about this correction, see Dixon-Lewis, Proc.
* Royal Society (1968). * Royal Society (1968).
* *
* @param i Species one - this is a bimolecular correction routine * @param i Species one - this is a bimolecular correction routine
* @param j species two - this is a bimolecular correction routine * @param j species two - this is a bimolecular correction routine
* @param f_eps Multiplicative correction factor to be applied to epsilon(i,j) * @param f_eps Multiplicative correction factor to be applied to epsilon(i,j)
* @param f_sigma Multiplicative correction factor to be applied to diam(i,j) * @param f_sigma Multiplicative correction factor to be applied to diam(i,j)
*/ */
void makePolarCorrections(size_t i, size_t j, doublereal& f_eps, void makePolarCorrections(size_t i, size_t j, doublereal& f_eps,
doublereal& f_sigma); doublereal& f_sigma);
//! Generate polynomial fits to collision integrals //! Generate polynomial fits to collision integrals
/*! /*!
* @param integrals interpolator for the collision integrals * @param integrals interpolator for the collision integrals
*/ */
void fitCollisionIntegrals(MMCollisionInt& integrals); void fitCollisionIntegrals(MMCollisionInt& integrals);
@ -184,23 +184,23 @@ protected:
//! the binary diffusion coefficients //! the binary diffusion coefficients
/*! /*!
* If CK_mode, then the fits are of the form * If CK_mode, then the fits are of the form
* \f[ * \f[
* \log(\eta(i)) = \sum_{n = 0}^3 a_n(i) (\log T)^n * \log(\eta(i)) = \sum_{n = 0}^3 a_n(i) (\log T)^n
* \f] * \f]
* and * and
* \f[ * \f[
* \log(D(i,j)) = \sum_{n = 0}^3 a_n(i,j) (\log T)^n * \log(D(i,j)) = \sum_{n = 0}^3 a_n(i,j) (\log T)^n
* \f] * \f]
* Otherwise the fits are of the form * Otherwise the fits are of the form
* \f[ * \f[
* \eta(i)/sqrt(k_BT) = \sum_{n = 0}^4 a_n(i) (\log T)^n * \eta(i)/sqrt(k_BT) = \sum_{n = 0}^4 a_n(i) (\log T)^n
* \f] * \f]
* and * and
* \f[ * \f[
* D(i,j)/sqrt(k_BT)) = \sum_{n = 0}^4 a_n(i,j) (\log T)^n * D(i,j)/sqrt(k_BT)) = \sum_{n = 0}^4 a_n(i,j) (\log T)^n
* \f] * \f]
* *
* @param integrals interpolator for the collision integrals * @param integrals interpolator for the collision integrals
*/ */
void fitProperties(MMCollisionInt& integrals); void fitProperties(MMCollisionInt& integrals);
@ -321,9 +321,9 @@ protected:
//! Polynomial fits to the binary diffusivity of each species //! Polynomial fits to the binary diffusivity of each species
/*! /*!
* m_diffcoeff[ic] is vector of polynomial coefficients for species i * m_diffcoeff[ic] is vector of polynomial coefficients for species i
* species j that fits the binary diffusion coefficient. The relationship * species j that fits the binary diffusion coefficient. The relationship
* between i j and ic is determined from the following algorithm: * between i j and ic is determined from the following algorithm:
* *
* int ic = 0; * int ic = 0;
* for (i = 0; i < m_nsp; i++) { * for (i = 0; i < m_nsp; i++) {
@ -354,33 +354,33 @@ protected:
//! Fit for omega22 collision integral //! Fit for omega22 collision integral
/*! /*!
* m_omega22_poly[m_poly[i][j]] is the vector of polynomial coefficients * m_omega22_poly[m_poly[i][j]] is the vector of polynomial coefficients
* (length degree+1) for the collision integral fit for the species pair * (length degree+1) for the collision integral fit for the species pair
* (i,j). * (i,j).
*/ */
std::vector<vector_fp> m_omega22_poly; std::vector<vector_fp> m_omega22_poly;
//! Fit for astar collision integral //! Fit for astar collision integral
/*! /*!
* m_astar_poly[m_poly[i][j]] is the vector of polynomial coefficients * m_astar_poly[m_poly[i][j]] is the vector of polynomial coefficients
* (length degree+1) for the collision integral fit for the species pair * (length degree+1) for the collision integral fit for the species pair
* (i,j). * (i,j).
*/ */
std::vector<vector_fp> m_astar_poly; std::vector<vector_fp> m_astar_poly;
//! Fit for bstar collision integral //! Fit for bstar collision integral
/*! /*!
* m_bstar_poly[m_poly[i][j]] is the vector of polynomial coefficients * m_bstar_poly[m_poly[i][j]] is the vector of polynomial coefficients
* (length degree+1) for the collision integral fit for the species pair * (length degree+1) for the collision integral fit for the species pair
* (i,j). * (i,j).
*/ */
std::vector<vector_fp> m_bstar_poly; std::vector<vector_fp> m_bstar_poly;
//! Fit for cstar collision integral //! Fit for cstar collision integral
/*! /*!
* m_bstar_poly[m_poly[i][j]] is the vector of polynomial coefficients * m_bstar_poly[m_poly[i][j]] is the vector of polynomial coefficients
* (length degree+1) for the collision integral fit for the species pair * (length degree+1) for the collision integral fit for the species pair
* (i,j). * (i,j).
*/ */
std::vector<vector_fp> m_cstar_poly; std::vector<vector_fp> m_cstar_poly;
@ -392,21 +392,21 @@ protected:
//! Dimensionless rotational heat capacity of each species //! Dimensionless rotational heat capacity of each species
/*! /*!
* These values are 0, 1 and 1.5 for single-molecule, linear, and nonlinear * These values are 0, 1 and 1.5 for single-molecule, linear, and nonlinear
* species respectively length is the number of species in the phase. * species respectively length is the number of species in the phase.
* Dimensionless (Cr / R) * Dimensionless (Cr / R)
*/ */
vector_fp m_crot; vector_fp m_crot;
//! Vector of booleans indicating whether a species is a polar molecule //! Vector of booleans indicating whether a species is a polar molecule
/*! /*!
* Length is nsp * Length is nsp
*/ */
std::vector<bool> m_polar; std::vector<bool> m_polar;
//! Polarizability of each species in the phase //! Polarizability of each species in the phase
/*! /*!
* Length = nsp. Units = m^3 * Length = nsp. Units = m^3
*/ */
vector_fp m_alpha; vector_fp m_alpha;
@ -419,8 +419,7 @@ protected:
//! Lennard-Jones diameter of the species in the current phase //! Lennard-Jones diameter of the species in the current phase
/*! /*!
* length is the number of species in the phase * length is the number of species in the phase. units are in meters.
* units are in meters.
*/ */
vector_fp m_sigma; vector_fp m_sigma;
@ -448,7 +447,7 @@ protected:
* epsilon(i,j) = sqrt(eps[i]*eps[j]); * epsilon(i,j) = sqrt(eps[i]*eps[j]);
* Units are Joules (note, no kmol -> this is a per molecule amount) * Units are Joules (note, no kmol -> this is a per molecule amount)
* *
* Length nsp * nsp. This is a symmetric matrix. * Length nsp * nsp. This is a symmetric matrix.
*/ */
DenseMatrix m_epsilon; DenseMatrix m_epsilon;

View file

@ -17,10 +17,10 @@ namespace Cantera
//! Class MultiTransport implements transport properties for //! Class MultiTransport implements transport properties for
//! high pressure gas mixtures. //! high pressure gas mixtures.
/*! /*!
* The implementation employs a method of corresponding states, using * The implementation employs a method of corresponding states, using the
* the Takahashi approach for binary diffusion coefficients, (using * Takahashi approach for binary diffusion coefficients, (using multicomponent
* multicomponent averaging rules for the mixture properties, and the * averaging rules for the mixture properties, and the Lucas method for the
* Lucas method for the viscosity of a high-pressure gas mixture. * viscosity of a high-pressure gas mixture.
* *
* @ingroup tranprops * @ingroup tranprops
*/ */

View file

@ -58,13 +58,14 @@ enum LTPTemperatureDependenceType {
LTP_TD_EXPT LTP_TD_EXPT
}; };
//! Class LTPspecies holds transport parameterizations for a specific liquid-phase species. //! Class LTPspecies holds transport parameterizations for a specific liquid-
//! phase species.
/*! /*!
* Subclasses handle different means of specifying transport properties * Subclasses handle different means of specifying transport properties like
* like constant, %Arrhenius or polynomial temperature fits. In its current state, * constant, %Arrhenius or polynomial temperature fits. In its current state,
* it is primarily suitable for specifying temperature dependence, but * it is primarily suitable for specifying temperature dependence, but the
* the adjustCoeffsForComposition() method can be implemented to * adjustCoeffsForComposition() method can be implemented to adjust for the
* adjust for the composition dependence. * composition dependence.
* *
* Mixing rules for computing mixture transport properties are handled * Mixing rules for computing mixture transport properties are handled
* separately in the LiquidTranInteraction subclasses. * separately in the LiquidTranInteraction subclasses.
@ -74,37 +75,25 @@ class LTPspecies
public: public:
//! Construct an LTPspecies object for a liquid transport property. //! Construct an LTPspecies object for a liquid transport property.
/*! /*!
* The species transport property is constructed from the XML node, * The species transport property is constructed from the XML node,
* `<propNode>` that is a child of the `<transport>` node in the * `<propNode>` that is a child of the `<transport>` node in the species
* species block and specifies a type of transport property (like * block and specifies a type of transport property (like viscosity)
* viscosity)
* *
* @param propNode Pointer to the XML node that contains the property information. A default * @param propNode Pointer to the XML node that contains the property
* value of 0 is allowed for the base class, but not for classes which * information. A default value of 0 is allowed for the base class, but
* are assumed to be parameterized by reading XML_Node information. * not for classes which are assumed to be parameterized by reading
* @param name String containing the species name * XML_Node information.
* @param tp_ind enum TransportPropertyType containing the property id that this object * @param name String containing the species name
* is creating a parameterization for (e.g., viscosity) * @param tp_ind enum TransportPropertyType containing the property id
* @param thermo const pointer to the ThermoPhase object, which is used to find the temperature. * that this object is creating a parameterization for (e.g., viscosity)
* @param thermo const pointer to the ThermoPhase object, which is
* used to find the temperature.
*/ */
LTPspecies(const XML_Node* const propNode = 0, const std::string name = "-", LTPspecies(const XML_Node* const propNode = 0, const std::string name = "-",
TransportPropertyType tp_ind = TP_UNKNOWN, const thermo_t* thermo = 0); TransportPropertyType tp_ind = TP_UNKNOWN, const thermo_t* thermo = 0);
//! Copy Constructor
/*!
* @param right Object to be copied
*/
LTPspecies(const LTPspecies& right); LTPspecies(const LTPspecies& right);
//! Assignment operator
/*!
* @param right Object to be copied
*
* @return returns a reference to the current object
*/
LTPspecies& operator=(const LTPspecies& right); LTPspecies& operator=(const LTPspecies& right);
//! Destructor
virtual ~LTPspecies() {} virtual ~LTPspecies() {}
//! Duplication routine //! Duplication routine
@ -117,13 +106,12 @@ public:
//! Returns the vector of standard state species transport property //! Returns the vector of standard state species transport property
/*! /*!
* The standard state species transport property * The standard state species transport property is returned. Any
* is returned. Any temperature and composition dependence will be * temperature and composition dependence will be adjusted internally
* adjusted internally according to the information provided by the * according to the information provided by the subclass object.
* subclass object.
* *
* @return Returns a single double containing the property evaluation * @returns a single double containing the property evaluation at the
* at the current ThermoPhase temperature. * current ThermoPhase temperature.
*/ */
virtual doublereal getSpeciesTransProp(); virtual doublereal getSpeciesTransProp();
@ -136,9 +124,9 @@ public:
private: private:
//! Internal model to adjust species-specific properties for the composition. //! Internal model to adjust species-specific properties for the composition.
/*! /*!
* Currently just a place holder, but this method could take * Currently just a place holder, but this method could take the composition
* the composition from the thermo object and adjust coefficients * from the thermo object and adjust coefficients according to some yet
* according to some yet unspecified model. * unspecified model.
*/ */
virtual void adjustCoeffsForComposition(); virtual void adjustCoeffsForComposition();
@ -160,24 +148,24 @@ protected:
//! Weighting used for mixing. //! Weighting used for mixing.
/*! /*!
* This weighting can be employed to allow salt transport * This weighting can be employed to allow salt transport properties to be
* properties to be represented by specific ions. * represented by specific ions. For example, to have Li+ and Ca+ represent
* For example, to have Li+ and Ca+ represent the mixing * the mixing transport properties of LiCl and CaCl2, the weightings for Li+
* transport properties of LiCl and CaCl2, the weightings for * would be 2.0, for K+ would be 3.0 and for Cl- would be 0.0. The transport
* Li+ would be 2.0, for K+ would be 3.0 and for Cl- would be 0.0. * properties for Li+ would be those for LiCl and the transport properties
* The transport properties for Li+ would be those for LiCl and * for Ca+ would be those for CaCl2. The transport properties for Cl- should
* the transport properties for Ca+ would be those for CaCl2. * be something innoccuous like 1.0--note that 0.0 is not innocuous if there
* The transport properties for Cl- should be something innoccuous like * are logarithms involved.
* 1.0--note that 0.0 is not innocuous if there are logarithms involved.
*/ */
doublereal m_mixWeight; doublereal m_mixWeight;
}; };
//! Class LTPspecies_Const holds transport parameters for a //! Class LTPspecies_Const holds transport parameters for a specific liquid-
//! specific liquid-phase species (LTPspecies) when the transport property is just a constant value. //! phase species (LTPspecies) when the transport property is just a constant
//! value.
/*! /*!
* As an example of the input required for LTPspecies_Const * As an example of the input required for LTPspecies_Const consider the
* consider the following XML fragment * following XML fragment
* *
* \verbatim * \verbatim
* <species> * <species>
@ -194,54 +182,34 @@ protected:
class LTPspecies_Const : public LTPspecies class LTPspecies_Const : public LTPspecies
{ {
public: public:
//! Construct an LTPspecies object for a liquid transport property expressed as a constant value. //! Construct an LTPspecies object for a liquid transport property expressed
//! as a constant value.
/*! /*!
* The transport property is constructed from the XML node, * The transport property is constructed from the XML node, `<propNode>`,
* `<propNode>`, that is a child of the `<transport>` node and specifies * that is a child of the `<transport>` node and specifies a type of
* a type of transport property (e.g., viscosity). * transport property (e.g., viscosity).
* *
* @param propNode Reference to the XML node that contains the property information. * @param propNode Reference to the XML node that contains the property
* @param name String containing the species name * information.
* @param tp_ind enum TransportPropertyType containing the property id that this object * @param name String containing the species name
* is creating a parameterization for (e.g., viscosity) * @param tp_ind enum TransportPropertyType containing the property id
* @param thermo const pointer to the ThermoPhase object, which is used to find the temperature. * that this object is creating a parameterization for (e.g., viscosity)
* @param thermo const pointer to the ThermoPhase object, which is used
* to find the temperature.
*/ */
LTPspecies_Const(const XML_Node& propNode, const std::string name, LTPspecies_Const(const XML_Node& propNode, const std::string name,
TransportPropertyType tp_ind, const thermo_t* const thermo); TransportPropertyType tp_ind, const thermo_t* const thermo);
//! Copy Constructor
/*!
* @param right Object to be copied
*/
LTPspecies_Const(const LTPspecies_Const& right); LTPspecies_Const(const LTPspecies_Const& right);
//! Assignment operator
/*!
* @param right Object to be copied
*
* @return returns a reference to the current object
*/
LTPspecies_Const& operator=(const LTPspecies_Const& right); LTPspecies_Const& operator=(const LTPspecies_Const& right);
//! Duplicates the current object given the parent class reference
/*!
* @return returns a malloced duplicate to the current object
* using the base class pointer
*/
virtual LTPspecies* duplMyselfAsLTPspecies() const; virtual LTPspecies* duplMyselfAsLTPspecies() const;
//! Returns the standard state species transport property
/*!
* The standard species transport property
* is returned. Any temperature and composition dependence will be
* adjusted internally according to the information provided.
*/
doublereal getSpeciesTransProp(); doublereal getSpeciesTransProp();
}; };
//! Class LTPspecies_Arrhenius holds transport parameters for a //! Class LTPspecies_Arrhenius holds transport parameters for a specific liquid-
//! specific liquid-phase species (LTPspecies) when the //! phase species (LTPspecies) when the transport property is expressed in
//! transport property is expressed in Arrhenius form. //! Arrhenius form.
/*! /*!
* Used for standard state species properties with equations of the form * Used for standard state species properties with equations of the form
* \f[ * \f[
@ -249,8 +217,8 @@ public:
* \f] * \f]
* where A, b, and E are passed in the XML input file. * where A, b, and E are passed in the XML input file.
* *
* As an example of the input required for LTPspecies_Arrhenius * As an example of the input required for LTPspecies_Arrhenius consider the
* consider the following XML fragment * following XML fragment
* *
* \verbatim * \verbatim
* <species> * <species>
@ -273,43 +241,28 @@ public:
//! Construct an LTPspecies object for a liquid transport property //! Construct an LTPspecies object for a liquid transport property
//! expressed in extended Arrhenius form. //! expressed in extended Arrhenius form.
/*! /*!
* The transport property is constructed from the XML node, `<propNode>`, * The transport property is constructed from the XML node, `<propNode>`,
* that is a child of the `<transport>` node and specifies a type of * that is a child of the `<transport>` node and specifies a type of
* transport property (like viscosity) * transport property (like viscosity)
* *
* @param propNode Reference to the XML node that contains the property information.This class * @param propNode Reference to the XML node that contains the property
* is assumed to be parameterized by reading XML_Node information. * information.This class is assumed to be parameterized by reading
* @param name String containing the species name * XML_Node information.
* @param tp_ind enum TransportPropertyType containing the property id that this object * @param name String containing the species name
* is creating a parameterization for (e.g., viscosity) * @param tp_ind enum TransportPropertyType containing the property id
* @param thermo const pointer to the ThermoPhase object, which is used to find the temperature. * that this object is creating a parameterization for (e.g., viscosity)
* @param thermo const pointer to the ThermoPhase object, which is used
* to find the temperature.
*/ */
LTPspecies_Arrhenius(const XML_Node& propNode, const std::string name, LTPspecies_Arrhenius(const XML_Node& propNode, const std::string name,
TransportPropertyType tp_ind, const thermo_t* thermo); TransportPropertyType tp_ind, const thermo_t* thermo);
//! Copy Constructor
/*!
* @param right Object to be copied
*/
LTPspecies_Arrhenius(const LTPspecies_Arrhenius& right); LTPspecies_Arrhenius(const LTPspecies_Arrhenius& right);
//! Assignment operator
/*!
* @param right Object to be copied
*
* @return returns a reference to the current object
*/
LTPspecies_Arrhenius& operator=(const LTPspecies_Arrhenius& right); LTPspecies_Arrhenius& operator=(const LTPspecies_Arrhenius& right);
//! Duplicates the current object given the parent class reference
/*!
* @return returns a malloced duplicate to the current object
* using the base class pointer
*/
virtual LTPspecies* duplMyselfAsLTPspecies() const; virtual LTPspecies* duplMyselfAsLTPspecies() const;
//! Return the standard state species value for this transport property evaluated //! Return the standard state species value for this transport property
//! from the Arrhenius expression //! evaluated from the Arrhenius expression
/*! /*!
* In general the Arrhenius expression is * In general the Arrhenius expression is
* *
@ -325,8 +278,8 @@ public:
* \mu = A T^n \exp( + E / R T ). * \mu = A T^n \exp( + E / R T ).
* \f] * \f]
* *
* Any temperature and composition dependence will be * Any temperature and composition dependence will be adjusted internally
* adjusted internally according to the information provided. * according to the information provided.
*/ */
doublereal getSpeciesTransProp(); doublereal getSpeciesTransProp();
@ -344,9 +297,9 @@ protected:
doublereal m_logProp; doublereal m_logProp;
}; };
//! Class LTPspecies_Poly holds transport parameters for a //! Class LTPspecies_Poly holds transport parameters for a specific liquid-phase
//! specific liquid-phase species (LTPspecies) when the transport //! species (LTPspecies) when the transport property is expressed as a
//! property is expressed as a polynomial in temperature. //! polynomial in temperature.
/*! /*!
* Used for standard state species properties with equations of the form * Used for standard state species properties with equations of the form
* \f[ * \f[
@ -354,8 +307,8 @@ protected:
* \f] * \f]
* where f[i] are elements of the float array passed in. * where f[i] are elements of the float array passed in.
* *
* As an example of the input required for LTPspecies_Poly * As an example of the input required for LTPspecies_Poly consider the
* consider the following XML fragment * following XML fragment
* *
* \verbatim * \verbatim
* <species> * <species>
@ -372,47 +325,28 @@ protected:
class LTPspecies_Poly : public LTPspecies class LTPspecies_Poly : public LTPspecies
{ {
public: public:
//! Construct an LTPspecies object for a liquid transport property expressed as a polynomial in temperature. //! Construct an LTPspecies object for a liquid transport property expressed
//! as a polynomial in temperature.
/*! /*!
* The transport property is constructed from the XML node, `<propNode>`, * The transport property is constructed from the XML node, `<propNode>`,
* that is a child of the `<transport>` node and specifies a type of * that is a child of the `<transport>` node and specifies a type of
* transport property (like viscosity). * transport property (like viscosity).
* *
* @param propNode Reference to the XML node that contains the property information. This class * @param propNode Reference to the XML node that contains the property
* must be parameterized by reading XML_Node information. * information. This class must be parameterized by reading XML_Node
* @param name String containing the species name * information.
* @param tp_ind enum TransportPropertyType containing the property id that this object * @param name String containing the species name
* is creating a parameterization for (e.g., viscosity) * @param tp_ind enum TransportPropertyType containing the property id
* @param thermo const pointer to the ThermoPhase object, which is used to find the temperature. * that this object is creating a parameterization for (e.g., viscosity)
* @param thermo const pointer to the ThermoPhase object, which is used
* to find the temperature.
*/ */
LTPspecies_Poly(const XML_Node& propNode, const std::string name, TransportPropertyType tp_ind, const thermo_t* thermo); LTPspecies_Poly(const XML_Node& propNode, const std::string name, TransportPropertyType tp_ind, const thermo_t* thermo);
//! Copy Constructor
/*!
* @param right Object to be copied
*/
LTPspecies_Poly(const LTPspecies_Poly& right); LTPspecies_Poly(const LTPspecies_Poly& right);
//! Assignment operator
/*!
* @param right Object to be copied
* @return returns a reference to the current object
*/
LTPspecies_Poly& operator=(const LTPspecies_Poly& right); LTPspecies_Poly& operator=(const LTPspecies_Poly& right);
//! Duplicates the current object given the parent class reference
/*!
* @return returns a malloced duplicate to the current object
* using the base class pointer
*/
virtual LTPspecies* duplMyselfAsLTPspecies() const; virtual LTPspecies* duplMyselfAsLTPspecies() const;
//! Returns the standard state species transport property
/*!
* The standard state species transport property
* is returned. Any temperature and composition dependence will be
* adjusted internally according to the information provided.
*/
doublereal getSpeciesTransProp(); doublereal getSpeciesTransProp();
protected: protected:
@ -429,14 +363,14 @@ protected:
/*! /*!
* Used for standard state species properties with equations of the form * Used for standard state species properties with equations of the form
* *
* \f[ * \f[
* x = f[0] \exp( f[1] T + ... + f[N] T^{N} ) * x = f[0] \exp( f[1] T + ... + f[N] T^{N} )
* \f] * \f]
* *
* where f[i] are elements of the float array passed in. * where f[i] are elements of the float array passed in.
* *
* As an example of the input required for LTPspecies_ExpT * As an example of the input required for LTPspecies_ExpT consider the
* consider the following XML fragment * following XML fragment
* *
* \verbatim * \verbatim
* <species> * <species>
@ -456,46 +390,26 @@ public:
//! Construct an LTPspecies object for a liquid transport property //! Construct an LTPspecies object for a liquid transport property
//! expressed as an exponential in temperature. //! expressed as an exponential in temperature.
/*! /*!
* The transport property is constructed from the XML node, `<propNode>`, * The transport property is constructed from the XML node, `<propNode>`,
* that is a child of the `<transport>` node and specifies a type of * that is a child of the `<transport>` node and specifies a type of
* transport property (like viscosity). * transport property (like viscosity).
* *
* @param propNode Reference to the XML node that contains the property information. This class * @param propNode Reference to the XML node that contains the property
* must be parameterized by reading XML_Node information. * information. This class must be parameterized by reading XML_Node
* @param name String containing the species name * information.
* @param tp_ind enum TransportPropertyType containing the property id that this object * @param name String containing the species name
* is creating a parameterization for (e.g., viscosity) * @param tp_ind enum TransportPropertyType containing the property id
* @param thermo const pointer to the ThermoPhase object, which is used to find the temperature. * that this object is creating a parameterization for (e.g., viscosity)
* @param thermo const pointer to the ThermoPhase object, which is used
* to find the temperature.
*/ */
LTPspecies_ExpT(const XML_Node& propNode, const std::string name, LTPspecies_ExpT(const XML_Node& propNode, const std::string name,
TransportPropertyType tp_ind, const thermo_t* thermo); TransportPropertyType tp_ind, const thermo_t* thermo);
//! Copy Constructor
/*!
* @param right Object to be copied
*/
LTPspecies_ExpT(const LTPspecies_ExpT& right); LTPspecies_ExpT(const LTPspecies_ExpT& right);
//! Assignment operator
/*!
* @param right Object to be copied
* @return returns a reference to the current object
*/
LTPspecies_ExpT& operator=(const LTPspecies_ExpT& right); LTPspecies_ExpT& operator=(const LTPspecies_ExpT& right);
//! Duplicates the current object given the parent class reference
/*!
* @return returns a malloced duplicate to the current object
* using the base class pointer
*/
virtual LTPspecies* duplMyselfAsLTPspecies() const; virtual LTPspecies* duplMyselfAsLTPspecies() const;
//! Returns the standard state species transport property
/*!
* The standard state species transport property
* is returned. Any temperature and composition dependence will be
* adjusted internally according to the information provided.
*/
doublereal getSpeciesTransProp(); doublereal getSpeciesTransProp();
protected: protected:

View file

@ -83,22 +83,20 @@ enum LiquidTranMixingModel {
//! Base class to handle transport property evaluation in a mixture. //! Base class to handle transport property evaluation in a mixture.
/*! /*!
* In a mixture, the mixture transport properties will generally depend on * In a mixture, the mixture transport properties will generally depend on the
* the contributions of each of the standard state species transport properties. * contributions of each of the standard state species transport properties.
* Many composition dependencies are possible. This class, * Many composition dependencies are possible. This class,
* LiquidTranInteraction, is designed to be a base class for the * LiquidTranInteraction, is designed to be a base class for the implementation
* implementation of various models for the mixing of standard state species * of various models for the mixing of standard state species transport
* transport properties. * properties.
* *
* There are two very broad types of transport properties to consider. * There are two very broad types of transport properties to consider. First,
* First, there are properties for which a mixture value can be * there are properties for which a mixture value can be obtained through some
* obtained through some mixing rule. These are obtained using the * mixing rule. These are obtained using the method getMixTransProp().
* method getMixTransProp(). Viscosity is typical of this. * Viscosity is typical of this. Second, there are properties for which a matrix
* Second, there are properties for which a matrix of properties may * of properties may exist. This matrix of properties is obtained from the
* exist. This matrix of properties is obtained from the method * method getMatrixTransProp(). Diffusion coefficients are of this type.
* getMatrixTransProp(). Diffusion coefficients are of this type. * Subclasses should implement the appropriate one or both of these methods.
* Subclasses should implement the appropriate one or both of
* these methods.
*/ */
class LiquidTranInteraction class LiquidTranInteraction
{ {
@ -138,8 +136,7 @@ public:
} }
protected: protected:
//! Model for species interaction effects //! Model for species interaction effects. Takes enum LiquidTranMixingModel
//! Takes enum LiquidTranMixingModel
LiquidTranMixingModel m_model; LiquidTranMixingModel m_model;
//! enum indicating what property this is (i.e viscosity) //! enum indicating what property this is (i.e viscosity)
@ -148,23 +145,23 @@ protected:
//! pointer to thermo object to get current temperature //! pointer to thermo object to get current temperature
thermo_t* m_thermo; thermo_t* m_thermo;
//! Matrix of interaction coefficients for polynomial in molefraction*weight of //! Matrix of interaction coefficients for polynomial in molefraction*weight
//! speciesA (no temperature dependence, dimensionless) //! of speciesA (no temperature dependence, dimensionless)
std::vector<DenseMatrix*> m_Aij; std::vector<DenseMatrix*> m_Aij;
//! Matrix of interaction coefficients for polynomial in molefraction*weight of //! Matrix of interaction coefficients for polynomial in molefraction*weight
//! speciesA (linear temperature dependence, units 1/K) //! of speciesA (linear temperature dependence, units 1/K)
std::vector<DenseMatrix*> m_Bij; std::vector<DenseMatrix*> m_Bij;
//! Matrix of interactions (in energy units, 1/RT temperature dependence) //! Matrix of interactions (in energy units, 1/RT temperature dependence)
DenseMatrix m_Eij; DenseMatrix m_Eij;
//! Matrix of interaction coefficients for polynomial in molefraction*weight of //! Matrix of interaction coefficients for polynomial in molefraction*weight
//! speciesA (in energy units, 1/RT temperature dependence) //! of speciesA (in energy units, 1/RT temperature dependence)
std::vector<DenseMatrix*> m_Hij; std::vector<DenseMatrix*> m_Hij;
//! Matrix of interaction coefficients for polynomial in molefraction*weight of //! Matrix of interaction coefficients for polynomial in molefraction*weight
//! speciesA (in entropy units, divided by R) //! of speciesA (in entropy units, divided by R)
std::vector<DenseMatrix*> m_Sij; std::vector<DenseMatrix*> m_Sij;
//! Matrix of interactions //! Matrix of interactions

File diff suppressed because it is too large Load diff

View file

@ -22,9 +22,9 @@ namespace Cantera
* need to be careful about deleting pointers to LTPspecies objects created in * need to be careful about deleting pointers to LTPspecies objects created in
* the TransportFactory. * the TransportFactory.
* *
* All of the pointers in this class are shallow pointers. Therefore, this * All of the pointers in this class are shallow pointers. Therefore, this
* is a passthrough class, which keeps track of pointer ownership by zeroing * is a passthrough class, which keeps track of pointer ownership by zeroing
* pointers as we go. Yes, Yes, yes, this is not good. * pointers as we go. Yes, Yes, yes, this is not good.
*/ */
class LiquidTransportData class LiquidTransportData
{ {
@ -39,51 +39,27 @@ public:
std::string speciesName; std::string speciesName;
//! Model type for the hydroradius //! Model type for the hydroradius
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* hydroRadius; LTPspecies* hydroRadius;
//! Model type for the viscosity //! Model type for the viscosity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* viscosity; LTPspecies* viscosity;
//! Model type for the ionic conductivity //! Model type for the ionic conductivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* ionConductivity; LTPspecies* ionConductivity;
//! Model type for the mobility ratio //! Model type for the mobility ratio
/*!
* shallow pointers that should be zero during destructor
*/
std::vector<LTPspecies*> mobilityRatio; std::vector<LTPspecies*> mobilityRatio;
//! Model type for the self diffusion coefficients //! Model type for the self diffusion coefficients
/*!
* shallow pointers that should be zero during destructor
*/
std::vector<LTPspecies*> selfDiffusion; std::vector<LTPspecies*> selfDiffusion;
//! Model type for the thermal conductivity //! Model type for the thermal conductivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* thermalCond; LTPspecies* thermalCond;
//! Model type for the electrical conductivity //! Model type for the electrical conductivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* electCond; LTPspecies* electCond;
//! Model type for the speciesDiffusivity //! Model type for the speciesDiffusivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* speciesDiffusivity; LTPspecies* speciesDiffusivity;
}; };

View file

@ -12,8 +12,8 @@
namespace Cantera namespace Cantera
{ {
//! Class LiquidTransportParams holds transport model parameters //! Class LiquidTransportParams holds transport model parameters relevant to
//! relevant to transport in mixtures. //! transport in mixtures.
/*! /*!
* This class is used by TransportFactory to initialize transport objects. * This class is used by TransportFactory to initialize transport objects.
*/ */
@ -34,23 +34,25 @@ public:
//! Object that specifes the ionic Conductivity of the mixture //! Object that specifes the ionic Conductivity of the mixture
LiquidTranInteraction* ionConductivity; LiquidTranInteraction* ionConductivity;
//! Vector of pointer to the LiquidTranInteraction object which handles the calculation of //! Vector of pointer to the LiquidTranInteraction object which handles the
//! the mobility ratios for the phase //! calculation of the mobility ratios for the phase
/*! /*!
* The mobility ratio is defined via the following quantity where i and j are species indecises. * The mobility ratio is defined via the following quantity where i and j
* are species indecises.
* *
* mobRat(i,j) = mu_i / mu_j * mobRat(i,j) = mu_i / mu_j
* *
* It is returned in fortran-ordering format. ie. it is returned as mobRat[k], where * It is returned in fortran-ordering format. ie. it is returned as
* mobRat[k], where
* *
* k = j * nsp + i * k = j * nsp + i
* *
* Length = nsp * nsp * Length = nsp * nsp
*/ */
std::vector<LiquidTranInteraction*> mobilityRatio; std::vector<LiquidTranInteraction*> mobilityRatio;
//! Vector of pointer to the LiquidTranInteraction object which handles //! Vector of pointer to the LiquidTranInteraction object which handles the
//! the calculation of each species' self diffusion coefficient for the phase //! calculation of each species' self diffusion coefficient for the phase
std::vector<LiquidTranInteraction*> selfDiffusion; std::vector<LiquidTranInteraction*> selfDiffusion;
//! Pointer to the LiquidTranInteraction object which handles the //! Pointer to the LiquidTranInteraction object which handles the
@ -95,8 +97,7 @@ public:
* This is used for either LTI_MODEL_MASSFRACS or LTI_MODEL_MOLEFRACS. The * This is used for either LTI_MODEL_MASSFRACS or LTI_MODEL_MOLEFRACS. The
* overall formula for the mixture viscosity is * overall formula for the mixture viscosity is
* *
* \f[ \eta_{mix} = \sum_i X_i \eta_i * \f[ \eta_{mix} = \sum_i X_i \eta_i + \sum_i \sum_j X_i X_j A_{i,j} \f].
* + \sum_i \sum_j X_i X_j A_{i,j} \f].
*/ */
DenseMatrix thermalCond_Aij; DenseMatrix thermalCond_Aij;

View file

@ -15,7 +15,8 @@
namespace Cantera namespace Cantera
{ {
//! Class MixTransport implements mixture-averaged transport properties for ideal gas mixtures. //! Class MixTransport implements mixture-averaged transport properties for
//! ideal gas mixtures.
/*! /*!
* The model is based on that described in: R. J. Kee, M. J. Coltrin, and P. * The model is based on that described in: R. J. Kee, M. J. Coltrin, and P.
* Glarborg, "Chemically Reacting Flow: Theory & Practice", John Wiley & Sons, * Glarborg, "Chemically Reacting Flow: Theory & Practice", John Wiley & Sons,
@ -23,33 +24,33 @@ namespace Cantera
* *
* The viscosity is computed using the Wilke mixture rule (kg /m /s) * The viscosity is computed using the Wilke mixture rule (kg /m /s)
* *
* \f[ * \f[
* \mu = \sum_k \frac{\mu_k X_k}{\sum_j \Phi_{k,j} X_j}. * \mu = \sum_k \frac{\mu_k X_k}{\sum_j \Phi_{k,j} X_j}.
* \f] * \f]
* *
* Here \f$ \mu_k \f$ is the viscosity of pure species \e k, and * Here \f$ \mu_k \f$ is the viscosity of pure species \e k, and
* *
* \f[ * \f[
* \Phi_{k,j} = \frac{\left[1 * \Phi_{k,j} = \frac{\left[1
* + \sqrt{\left(\frac{\mu_k}{\mu_j}\sqrt{\frac{M_j}{M_k}}\right)}\right]^2} * + \sqrt{\left(\frac{\mu_k}{\mu_j}\sqrt{\frac{M_j}{M_k}}\right)}\right]^2}
* {\sqrt{8}\sqrt{1 + M_k/M_j}} * {\sqrt{8}\sqrt{1 + M_k/M_j}}
* \f] * \f]
* *
* The thermal conductivity is computed from the following mixture rule: * The thermal conductivity is computed from the following mixture rule:
* \f[ * \f[
* \lambda = 0.5 \left( \sum_k X_k \lambda_k + \frac{1}{\sum_k X_k/\lambda_k} \right) * \lambda = 0.5 \left( \sum_k X_k \lambda_k + \frac{1}{\sum_k X_k/\lambda_k} \right)
* \f] * \f]
* *
* It's used to compute the flux of energy due to a thermal gradient * It's used to compute the flux of energy due to a thermal gradient
* *
* \f[ * \f[
* j_T = - \lambda \nabla T * j_T = - \lambda \nabla T
* \f] * \f]
* *
* The flux of energy has units of energy (kg m2 /s2) per second per area. * The flux of energy has units of energy (kg m2 /s2) per second per area.
* *
* The units of lambda are W / m K which is equivalent to kg m / s^3 K. * The units of lambda are W / m K which is equivalent to kg m / s^3 K.
* @ingroup tranprops * @ingroup tranprops
*/ */
class MixTransport : public GasTransport class MixTransport : public GasTransport
{ {
@ -73,8 +74,6 @@ public:
/*! /*!
* For this approximation, these are all zero. * For this approximation, these are all zero.
* *
* Eqns. (12.168) shows how they are used in an expression for the species flux.
*
* @param dt Vector of thermal diffusion coefficients. Units = kg/m/s * @param dt Vector of thermal diffusion coefficients. Units = kg/m/s
*/ */
virtual void getThermalDiffCoeffs(doublereal* const dt); virtual void getThermalDiffCoeffs(doublereal* const dt);
@ -82,19 +81,19 @@ public:
//! Returns the mixture thermal conductivity (W/m /K) //! Returns the mixture thermal conductivity (W/m /K)
/*! /*!
* The thermal conductivity is computed from the following mixture rule: * The thermal conductivity is computed from the following mixture rule:
* \f[ * \f[
* \lambda = 0.5 \left( \sum_k X_k \lambda_k + \frac{1}{\sum_k X_k/\lambda_k} \right) * \lambda = 0.5 \left( \sum_k X_k \lambda_k + \frac{1}{\sum_k X_k/\lambda_k} \right)
* \f] * \f]
* *
* It's used to compute the flux of energy due to a thermal gradient * It's used to compute the flux of energy due to a thermal gradient
* *
* \f[ * \f[
* j_T = - \lambda \nabla T * j_T = - \lambda \nabla T
* \f] * \f]
* *
* The flux of energy has units of energy (kg m2 /s2) per second per area. * The flux of energy has units of energy (kg m2 /s2) per second per area.
* *
* The units of lambda are W / m K which is equivalent to kg m / s^3 K. * The units of lambda are W / m K which is equivalent to kg m / s^3 K.
* *
* @return Returns the mixture thermal conductivity, with units of W/m/K * @return Returns the mixture thermal conductivity, with units of W/m/K
*/ */
@ -102,57 +101,56 @@ public:
//! Get the Electrical mobilities (m^2/V/s). //! Get the Electrical mobilities (m^2/V/s).
/*! /*!
* This function returns the mobilities. In some formulations * This function returns the mobilities. In some formulations this is equal
* this is equal to the normal mobility multiplied by Faraday's constant. * to the normal mobility multiplied by Faraday's constant.
* *
* Here, the mobility is calculated from the diffusion coefficient using the Einstein relation * Here, the mobility is calculated from the diffusion coefficient using the
* Einstein relation
* *
* \f[ * \f[
* \mu^e_k = \frac{F D_k}{R T} * \mu^e_k = \frac{F D_k}{R T}
* \f] * \f]
* *
* @param mobil Returns the mobilities of the species in array \c mobil. The array must be * @param mobil Returns the mobilities of the species in array \c mobil.
* dimensioned at least as large as the number of species. * The array must be dimensioned at least as large as the
* number of species.
*/ */
virtual void getMobilities(doublereal* const mobil); virtual void getMobilities(doublereal* const mobil);
//! Update the internal parameters whenever the temperature has changed //! Update the internal parameters whenever the temperature has changed
/*! /*!
* This is called whenever a transport property is requested if * This is called whenever a transport property is requested if the
* the temperature has changed since the last call to update_T(). * temperature has changed since the last call to update_T().
*/ */
virtual void update_T(); virtual void update_T();
//! Update the internal parameters whenever the concentrations have changed //! Update the internal parameters whenever the concentrations have changed
/*! /*!
* This is called whenever a transport property is requested if the * This is called whenever a transport property is requested if the
* concentrations have changed since the last call to update_C(). * concentrations have changed since the last call to update_C().
*/ */
virtual void update_C(); virtual void update_C();
//! Get the species diffusive mass fluxes wrt to the mass averaged velocity, //! Get the species diffusive mass fluxes wrt to the mass averaged velocity,
//! given the gradients in mole fraction and temperature //! given the gradients in mole fraction and temperature
/*! /*!
* Units for the returned fluxes are kg m-2 s-1. * Units for the returned fluxes are kg m-2 s-1.
* *
* The diffusive mass flux of species \e k is computed from * The diffusive mass flux of species \e k is computed from
* \f[ * \f[
* \vec{j}_k = -n M_k D_k \nabla X_k. * \vec{j}_k = -n M_k D_k \nabla X_k.
* \f] * \f]
* *
* @param ndim Number of dimensions in the flux expressions * @param ndim Number of dimensions in the flux expressions
* @param grad_T Gradient of the temperature * @param grad_T Gradient of the temperature (length = ndim)
* (length = ndim) * @param ldx Leading dimension of the grad_X array
* @param ldx Leading dimension of the grad_X array * (usually equal to m_nsp but not always)
* (usually equal to m_nsp but not always) * @param grad_X Gradients of the mole fraction. Flat vector with the
* @param grad_X Gradients of the mole fraction * m_nsp in the inner loop. length = ldx * ndim
* Flat vector with the m_nsp in the inner loop. * @param ldf Leading dimension of the fluxes array
* length = ldx * ndim * (usually equal to m_nsp but not always)
* @param ldf Leading dimension of the fluxes array * @param fluxes Output of the diffusive mass fluxes. Flat vector with
* (usually equal to m_nsp but not always) * the m_nsp in the inner loop. length = ldx * ndim
* @param fluxes Output of the diffusive mass fluxes
* Flat vector with the m_nsp in the inner loop.
* length = ldx * ndim
*/ */
virtual void getSpeciesFluxes(size_t ndim, const doublereal* const grad_T, virtual void getSpeciesFluxes(size_t ndim, const doublereal* const grad_T,
size_t ldx, const doublereal* const grad_X, size_t ldx, const doublereal* const grad_X,
@ -167,7 +165,8 @@ private:
m_thermo->temperature()); m_thermo->temperature());
} }
//! Update the temperature dependent parts of the species thermal conductivities //! Update the temperature dependent parts of the species thermal
//! conductivities
/*! /*!
* These are evaluated from the polynomial fits of the temperature and are * These are evaluated from the polynomial fits of the temperature and are
* assumed to be independent of pressure * assumed to be independent of pressure
@ -176,8 +175,8 @@ private:
//! vector of species thermal conductivities (W/m /K) //! vector of species thermal conductivities (W/m /K)
/*! /*!
* These are used in wilke's rule to calculate the viscosity of the * These are used in wilke's rule to calculate the viscosity of the
* solution. units = W /m /K = kg m /s^3 /K. length = m_kk. * solution. units = W /m /K = kg m /s^3 /K. length = m_kk.
*/ */
vector_fp m_cond; vector_fp m_cond;

View file

@ -28,7 +28,7 @@ class MultiTransport : public GasTransport
public: public:
//! default constructor //! default constructor
/*! /*!
* @param thermo Optional parameter for the pointer to the ThermoPhase object * @param thermo Optional parameter for the pointer to the ThermoPhase object
*/ */
MultiTransport(thermo_t* thermo=0); MultiTransport(thermo_t* thermo=0);
@ -42,10 +42,11 @@ public:
//! Return the thermal diffusion coefficients (kg/m/s) //! Return the thermal diffusion coefficients (kg/m/s)
/*! /*!
* Eqn. (12.126) displays how they are calculated. The reference work is from * Eqn. (12.126) displays how they are calculated. The reference work is
* Dixon-Lewis. * from Dixon-Lewis.
* *
* Eqns. (12.168) shows how they are used in an expression for the species flux. * Eqns. (12.168) shows how they are used in an expression for the species
* flux.
* *
* @param dt Vector of thermal diffusion coefficients. Units = kg/m/s * @param dt Vector of thermal diffusion coefficients. Units = kg/m/s
*/ */
@ -58,39 +59,35 @@ public:
//! Get the species diffusive mass fluxes wrt to the mass averaged velocity, //! Get the species diffusive mass fluxes wrt to the mass averaged velocity,
//! given the gradients in mole fraction and temperature //! given the gradients in mole fraction and temperature
/*! /*!
* Units for the returned fluxes are kg m-2 s-1. * Units for the returned fluxes are kg m-2 s-1.
* *
* @param ndim Number of dimensions in the flux expressions * @param ndim Number of dimensions in the flux expressions
* @param grad_T Gradient of the temperature * @param grad_T Gradient of the temperature (length = ndim)
* (length = ndim) * @param ldx Leading dimension of the grad_X array. (usually equal to
* @param ldx Leading dimension of the grad_X array * m_nsp but not always)
* (usually equal to m_nsp but not always) * @param grad_X Gradients of the mole fraction. Flat vector with the
* @param grad_X Gradients of the mole fraction * m_nsp in the inner loop. length = ldx * ndim
* Flat vector with the m_nsp in the inner loop. * @param ldf Leading dimension of the fluxes array. (usually equal to
* length = ldx * ndim * m_nsp but not always)
* @param ldf Leading dimension of the fluxes array * @param fluxes Output of the diffusive mass fluxes. Flat vector with the
* (usually equal to m_nsp but not always) * m_nsp in the inner loop. length = ldx * ndim
* @param fluxes Output of the diffusive mass fluxes
* Flat vector with the m_nsp in the inner loop.
* length = ldx * ndim
*/ */
virtual void getSpeciesFluxes(size_t ndim, const doublereal* const grad_T, virtual void getSpeciesFluxes(size_t ndim, const doublereal* const grad_T,
size_t ldx, const doublereal* const grad_X, size_t ldx, const doublereal* const grad_X,
size_t ldf, doublereal* const fluxes); size_t ldf, doublereal* const fluxes);
//! Get the molar diffusional fluxes [kmol/m^2/s] of the species, given the thermodynamic //! Get the molar diffusional fluxes [kmol/m^2/s] of the species, given the
//! state at two nearby points. //! thermodynamic state at two nearby points.
/*! /*!
* The molar diffusional fluxes are calculated with reference to the mass averaged * The molar diffusional fluxes are calculated with reference to the mass
* velocity. This is a one-dimensional vector * averaged velocity. This is a one-dimensional vector
* *
* @param state1 Array of temperature, density, and mass * @param state1 Array of temperature, density, and mass
* fractions for state 1. * fractions for state 1.
* @param state2 Array of temperature, density, and mass * @param state2 Array of temperature, density, and mass
* fractions for state 2. * fractions for state 2.
* @param delta Distance from state 1 to state 2 (m). * @param delta Distance from state 1 to state 2 (m).
* @param fluxes Output molar fluxes of the species. * @param fluxes Output molar fluxes of the species. (length = m_nsp)
* (length = m_nsp)
*/ */
virtual void getMolarFluxes(const doublereal* const state1, virtual void getMolarFluxes(const doublereal* const state1,
const doublereal* const state2, const doublereal* const state2,
@ -108,8 +105,7 @@ public:
* @param state2 Array of temperature, density, and mass * @param state2 Array of temperature, density, and mass
* fractions for state 2. * fractions for state 2.
* @param delta Distance from state 1 to state 2 (m). * @param delta Distance from state 1 to state 2 (m).
* @param fluxes Output mass fluxes of the species. * @param fluxes Output mass fluxes of the species. (length = m_nsp)
* (length = m_nsp)
*/ */
virtual void getMassFluxes(const doublereal* state1, virtual void getMassFluxes(const doublereal* state1,
const doublereal* state2, doublereal delta, const doublereal* state2, doublereal delta,
@ -118,10 +114,12 @@ public:
virtual void init(ThermoPhase* thermo, int mode=0, int log_level=0); virtual void init(ThermoPhase* thermo, int mode=0, int log_level=0);
protected: protected:
//! Update basic temperature-dependent quantities if the temperature has changed. //! Update basic temperature-dependent quantities if the temperature has
//! changed.
void update_T(); void update_T();
//! Update basic concentration-dependent quantities if the concentrations have changed. //! Update basic concentration-dependent quantities if the concentrations
//! have changed.
void update_C(); void update_C();
//! Update the temperature-dependent terms needed to compute the thermal //! Update the temperature-dependent terms needed to compute the thermal

View file

@ -11,169 +11,169 @@
namespace Cantera namespace Cantera
{ {
//! Class SimpleTransport implements mixture-averaged transport //! Class SimpleTransport implements mixture-averaged transport properties for
//! properties for liquid phases. //! liquid phases.
/*! /*!
* The model is based on that described by Newman, Electrochemical Systems * The model is based on that described by Newman, Electrochemical Systems
* *
* The velocity of species i may be described by the * The velocity of species i may be described by the following equation p. 297
* following equation p. 297 (12.1) * (12.1)
* *
* \f[ * \f[
* c_i \nabla \mu_i = R T \sum_j \frac{c_i c_j}{c_T D_{ij}} * c_i \nabla \mu_i = R T \sum_j \frac{c_i c_j}{c_T D_{ij}}
* (\mathbf{v}_j - \mathbf{v}_i) * (\mathbf{v}_j - \mathbf{v}_i)
* \f] * \f]
* *
* This as written is degenerate by 1 dof. * This as written is degenerate by 1 dof.
* *
* To fix this we must add in the definition of the mass averaged * To fix this we must add in the definition of the mass averaged velocity of
* velocity of the solution. We will call the simple bold-faced * the solution. We will call the simple bold-faced \f$\mathbf{v} \f$ symbol the
* \f$\mathbf{v} \f$ * mass-averaged velocity. Then, the relation between \f$\mathbf{v}\f$ and the
* symbol the mass-averaged velocity. Then, the relation * individual species velocities is \f$\mathbf{v}_i\f$
* between \f$\mathbf{v}\f$ and the individual species velocities is
* \f$\mathbf{v}_i\f$
* *
* \f[ * \f[
* \rho_i \mathbf{v}_i = \rho_i \mathbf{v} + \mathbf{j}_i * \rho_i \mathbf{v}_i = \rho_i \mathbf{v} + \mathbf{j}_i
* \f] * \f]
* where \f$\mathbf{j}_i\f$ are the diffusional fluxes of species i * where \f$\mathbf{j}_i\f$ are the diffusional fluxes of species i with respect
* with respect to the mass averaged velocity and * to the mass averaged velocity and
* *
* \f[ * \f[
* \sum_i \mathbf{j}_i = 0 * \sum_i \mathbf{j}_i = 0
* \f] * \f]
* *
* and * and
* *
* \f[ * \f[
* \sum_i \rho_i \mathbf{v}_i = \rho \mathbf{v} * \sum_i \rho_i \mathbf{v}_i = \rho \mathbf{v}
* \f] * \f]
* *
* Using these definitions, we can write * Using these definitions, we can write
* *
* \f[ * \f[
* \mathbf{v}_i = \mathbf{v} + \frac{\mathbf{j}_i}{\rho_i} * \mathbf{v}_i = \mathbf{v} + \frac{\mathbf{j}_i}{\rho_i}
* \f] * \f]
* *
* \f[ * \f[
* c_i \nabla \mu_i = R T \sum_j \frac{c_i c_j}{c_T D_{ij}} * c_i \nabla \mu_i = R T \sum_j \frac{c_i c_j}{c_T D_{ij}}
* (\frac{\mathbf{j}_j}{\rho_j} - \frac{\mathbf{j}_i}{\rho_i}) * (\frac{\mathbf{j}_j}{\rho_j} - \frac{\mathbf{j}_i}{\rho_i})
* = R T \sum_j \frac{1}{D_{ij}} * = R T \sum_j \frac{1}{D_{ij}}
* (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i}) * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i})
* \f] * \f]
* *
* The equations that we actually solve are * The equations that we actually solve are
* *
* \f[ * \f[
* c_i \nabla \mu_i = * c_i \nabla \mu_i =
* = R T \sum_j \frac{1}{D_{ij}} * = R T \sum_j \frac{1}{D_{ij}}
* (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i}) * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i})
* \f] * \f]
* and we replace the 0th equation with the following: * and we replace the 0th equation with the following:
* *
* \f[ * \f[
* \sum_i \mathbf{j}_i = 0 * \sum_i \mathbf{j}_i = 0
* \f] * \f]
* *
* When there are charged species, we replace the RHS with the * When there are charged species, we replace the RHS with the gradient of the
* gradient of the electrochemical potential to obtain the * electrochemical potential to obtain the modified equation
* modified equation
* *
* \f[ * \f[
* c_i \nabla \mu_i + c_i F z_i \nabla \Phi * c_i \nabla \mu_i + c_i F z_i \nabla \Phi
* = R T \sum_j \frac{1}{D_{ij}} * = R T \sum_j \frac{1}{D_{ij}}
* (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i}) * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i})
* \f] * \f]
* *
* With this formulation we may solve for the diffusion velocities, * With this formulation we may solve for the diffusion velocities, without
* without having to worry about what the mass averaged velocity * having to worry about what the mass averaged velocity is.
* is.
* *
* <H2> Viscosity Calculation </H2> * <H2> Viscosity Calculation </H2>
* *
* The viscosity calculation may be broken down into two parts. * The viscosity calculation may be broken down into two parts. In the first
* In the first part, the viscosity of the pure species are calculated * part, the viscosity of the pure species are calculated In the second part, a
* In the second part, a mixing rule is applied. There are two mixing rules. * mixing rule is applied. There are two mixing rules. Solvent-only and mixture-
* Solvent-only and mixture-averaged. * averaged.
* *
* For the solvent-only mixing rule, we use the pure species viscosity calculated for * For the solvent-only mixing rule, we use the pure species viscosity
* the solvent as the viscosity of the entire mixture. For the mixture averaged rule * calculated for the solvent as the viscosity of the entire mixture. For the
* we do a mole fraction based average of the pure species viscosities: * mixture averaged rule we do a mole fraction based average of the pure species
* viscosities:
* *
* Solvent-only: * Solvent-only:
* \f[ * \f[
* \mu = \mu_0 * \mu = \mu_0
* \f] * \f]
* Mixture-average: * Mixture-average:
* \f[ * \f[
* \mu = \sum_k {\mu_k X_k} * \mu = \sum_k {\mu_k X_k}
* \f] * \f]
* *
* <H2> Calculate of the Binary Diffusion Coefficients </H2> * <H2> Calculate of the Binary Diffusion Coefficients </H2>
* *
* The binary diffusion coefficients are obtained from the pure species diffusion coefficients * The binary diffusion coefficients are obtained from the pure species
* using an additive process * diffusion coefficients using an additive process
* *
* \f[ * \f[
* D_{i,j} = \frac{1}{2} \left( D^0_i(T) + D^0_j(T) \right) * D_{i,j} = \frac{1}{2} \left( D^0_i(T) + D^0_j(T) \right)
* \f] * \f]
* *
* <H2> Electrical Mobilities </H2> * <H2> Electrical Mobilities </H2>
* *
* The mobility \f$ \mu^e_k \f$ is calculated from the diffusion coefficient using the Einstein relation. * The mobility \f$ \mu^e_k \f$ is calculated from the diffusion coefficient
* using the Einstein relation.
* *
* \f[ * \f[
* \mu^e_k = \frac{F D_k}{R T} * \mu^e_k = \frac{F D_k}{R T}
* \f] * \f]
* *
* The diffusion coefficients, \f$ D_k \f$ , is calculated from a call to the mixture diffusion * The diffusion coefficients, \f$ D_k \f$ , is calculated from a call to the
* coefficient routine. * mixture diffusion coefficient routine.
* *
* <H2> Species Diffusive Fluxes </H2> * <H2> Species Diffusive Fluxes </H2>
* *
* The diffusive mass flux of species \e k is computed from the following * The diffusive mass flux of species \e k is computed from the following
* formula * formula
* *
* Usually the specified solution average velocity is the mass averaged velocity. * Usually the specified solution average velocity is the mass averaged
* This is changed in some subclasses, however. * velocity. This is changed in some subclasses, however.
* *
* \f[ * \f[
* j_k = - c^T M_k D_k \nabla X_k - \rho Y_k V_c * j_k = - c^T M_k D_k \nabla X_k - \rho Y_k V_c
* \f] * \f]
* *
* where V_c is the correction velocity * where V_c is the correction velocity
* *
* \f[ * \f[
* \rho V_c = - \sum_j {c^T M_j D_j \nabla X_j} * \rho V_c = - \sum_j {c^T M_j D_j \nabla X_j}
* \f] * \f]
* *
* In the above equation, \f$ D_k \f$ is the mixture diffusivity for species k calculated for the current * In the above equation, \f$ D_k \f$ is the mixture diffusivity for species k
* conditions, which may depend on T, P, and X_k. \f$ C^T \f$ is the total concentration of the phase. * calculated for the current conditions, which may depend on T, P, and X_k. \f$
* C^T \f$ is the total concentration of the phase.
* *
* When this is electrical migration, the formulas above are enhanced to * When this is electrical migration, the formulas above are enhanced to
* *
* \f[ * \f[
* 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 * 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
* \f] * \f]
* *
* where V_c is the correction velocity * where V_c is the correction velocity
* *
* \f[ * \f[
* \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 * \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
* \f] * \f]
* *
* <H2> Species Diffusional Velocities </H2> * <H2> Species Diffusional Velocities </H2>
* *
* Species diffusional velocities are calculated from the species diffusional fluxes, within this object, * Species diffusional velocities are calculated from the species diffusional
* using the following formula for the diffusional velocity of the kth species, \f$ V_k^d \f$ * fluxes, within this object, using the following formula for the diffusional
* velocity of the kth species, \f$ V_k^d \f$
* *
* \f[ * \f[
* j_k = \rho Y_k V_k^d * j_k = \rho Y_k V_k^d
* \f] * \f]
* *
* TODO * TODO: This object has to be made compatible with different types of reference
* This object has to be made compatible with different types of reference velocities. Right now, elements * velocities. Right now, elements of the formulas are only compatible with the
* of the formulas are only compatible with the mass-averaged velocity. * mass-averaged velocity.
* *
* @ingroup tranprops * @ingroup tranprops
*/ */
@ -182,10 +182,10 @@ class SimpleTransport : public Transport
public: public:
//! Default constructor. //! Default constructor.
/*! /*!
* This requires call to initLiquid(LiquidTransportParams& tr) * This requires call to initLiquid(LiquidTransportParams& tr) after filling
* after filling LiquidTransportParams to complete instantiation. * LiquidTransportParams to complete instantiation. The filling of
* The filling of LiquidTransportParams is currently carried out * LiquidTransportParams is currently carried out in the TransportFactory
* in the TransportFactory class, but might be moved at some point. * class, but might be moved at some point.
* *
* @param thermo ThermoPhase object holding species information. * @param thermo ThermoPhase object holding species information.
* @param ndim Number of spatial dimensions. * @param ndim Number of spatial dimensions.
@ -234,20 +234,16 @@ public:
//! Returns the pure species viscosities //! Returns the pure species viscosities
/*! /*!
* The pure species viscosities are to be given in an Arrhenius * The pure species viscosities are to be given in an Arrhenius form in
* form in accordance with activated-jump-process dominated transport. * accordance with activated-jump-process dominated transport.
* *
* units are Pa s or kg/m/s * units are Pa s or kg/m/s
* *
* @param visc Return the species viscosities as a vector of length m_nsp * @param visc Return the species viscosities as a vector of length m_nsp
*/ */
virtual void getSpeciesViscosities(doublereal* const visc); virtual void getSpeciesViscosities(doublereal* const visc);
//! Returns the binary diffusion coefficients //! Returns the binary diffusion coefficients
/*!
* @param ld
* @param d
*/
virtual void getBinaryDiffCoeffs(const size_t ld, doublereal* const d); virtual void getBinaryDiffCoeffs(const size_t ld, doublereal* const d);
//! Get the Mixture diffusion coefficients //! Get the Mixture diffusion coefficients
@ -270,19 +266,18 @@ public:
* The thermal is computed using the general mixture rules * The thermal is computed using the general mixture rules
* specified in the variable compositionDepType_. * specified in the variable compositionDepType_.
* *
* Controlling update boolean = m_condmix_ok * Controlling update boolean = m_condmix_ok
* *
* Units are in W/m/K or equivalently kg m / s3 / K * Units are in W/m/K or equivalently kg m / s3 / K
* *
* Solvent-only: * Solvent-only:
* \f[ * \f[
* \lambda = \lambda_0 * \lambda = \lambda_0
* * \f]
* \f]
* Mixture-average: * Mixture-average:
* \f[ * \f[
* \lambda = \sum_k {\lambda_k X_k} * \lambda = \sum_k {\lambda_k X_k}
* \f] * \f]
* *
* Here \f$ \lambda_k \f$ is the thermal conductivity of pure species \e k. * Here \f$ \lambda_k \f$ is the thermal conductivity of pure species \e k.
* *
@ -320,21 +315,18 @@ public:
* be specified as relative to a specific species (i.e. a * be specified as relative to a specific species (i.e. a
* solvent) all according to the velocityBasis input parameter. * solvent) all according to the velocityBasis input parameter.
* *
* Units for the returned velocities are m s-1. * Units for the returned velocities are m s-1.
* *
* @param ndim Number of dimensions in the flux expressions * @param ndim Number of dimensions in the flux expressions
* @param grad_T Gradient of the temperature * @param grad_T Gradient of the temperature (length = ndim)
* (length = ndim) * @param ldx Leading dimension of the grad_X array (usually equal to
* @param ldx Leading dimension of the grad_X array * m_nsp but not always)
* (usually equal to m_nsp but not always) * @param grad_X Gradients of the mole fraction. Flat vector with the m_nsp
* @param grad_X Gradients of the mole fraction * in the inner loop. length = ldx * ndim
* Flat vector with the m_nsp in the inner loop. * @param ldf Leading dimension of the fluxes array (usually equal to
* length = ldx * ndim * m_nsp but not always)
* @param ldf Leading dimension of the fluxes array * @param Vdiff Output of the diffusive velocities. Flat vector with the
* (usually equal to m_nsp but not always) * m_nsp in the inner loop. length = ldx * ndim
* @param Vdiff Output of the diffusive velocities.
* Flat vector with the m_nsp in the inner loop.
* length = ldx * ndim
*/ */
virtual void getSpeciesVdiff(size_t ndim, virtual void getSpeciesVdiff(size_t ndim,
const doublereal* grad_T, const doublereal* grad_T,
@ -343,57 +335,54 @@ public:
int ldf, int ldf,
doublereal* Vdiff); doublereal* Vdiff);
//! Get the species diffusive velocities wrt to the averaged velocity, //! Get the species diffusive velocities wrt to the averaged velocity, given
//! given the gradients in mole fraction, temperature and electrostatic potential. //! the gradients in mole fraction, temperature and electrostatic potential.
/*! /*!
* The average velocity can be computed on a mole-weighted * The average velocity can be computed on a mole-weighted
* or mass-weighted basis, or the diffusion velocities may * or mass-weighted basis, or the diffusion velocities may
* be specified as relative to a specific species (i.e. a * be specified as relative to a specific species (i.e. a
* solvent) all according to the velocityBasis input parameter. * solvent) all according to the velocityBasis input parameter.
* *
* Units for the returned velocities are m s-1. * Units for the returned velocities are m s-1.
* *
* @param ndim Number of dimensions in the flux expressions * @param ndim Number of dimensions in the flux expressions
* @param grad_T Gradient of the temperature * @param grad_T Gradient of the temperature (length = ndim)
* (length = ndim) * @param ldx Leading dimension of the grad_X array (usually equal
* @param ldx Leading dimension of the grad_X array * to m_nsp but not always)
* (usually equal to m_nsp but not always) * @param grad_X Gradients of the mole fraction. Flat vector with the
* @param grad_X Gradients of the mole fraction * m_nsp in the inner loop. length = ldx * ndim
* Flat vector with the m_nsp in the inner loop. * @param ldf Leading dimension of the fluxes array (usually equal to
* length = ldx * ndim * m_nsp but not always)
* @param ldf Leading dimension of the fluxes array * @param grad_Phi Gradients of the electrostatic potential (length =
* (usually equal to m_nsp but not always) * ndim)
* @param grad_Phi Gradients of the electrostatic potential * @param Vdiff Output of the species diffusion velocities. Flat vector
* (length = ndim) * with the m_nsp in the inner loop. length = ldx * ndim
* @param Vdiff Output of the species diffusion velocities
* Flat vector with the m_nsp in the inner loop.
* length = ldx * ndim
*/ */
virtual void getSpeciesVdiffES(size_t ndim, const doublereal* grad_T, virtual void getSpeciesVdiffES(size_t ndim, const doublereal* grad_T,
int ldx, const doublereal* grad_X, int ldx, const doublereal* grad_X,
int ldf, const doublereal* grad_Phi, int ldf, const doublereal* grad_Phi,
doublereal* Vdiff); doublereal* Vdiff);
//! Get the species diffusive mass fluxes wrt to the specified solution averaged velocity, //! Get the species diffusive mass fluxes wrt to the specified solution
//! given the gradients in mole fraction and temperature //! averaged velocity, given the gradients in mole fraction and temperature
/*! /*!
* units = kg/m2/s * units = kg/m2/s
* *
* The diffusive mass flux of species \e k is computed from the following * The diffusive mass flux of species \e k is computed from the following
* formula * formula
* *
* Usually the specified solution average velocity is the mass averaged velocity. * Usually the specified solution average velocity is the mass averaged
* This is changed in some subclasses, however. * velocity. This is changed in some subclasses, however.
* *
* \f[ * \f[
* j_k = - \rho M_k D_k \nabla X_k - Y_k V_c * j_k = - \rho M_k D_k \nabla X_k - Y_k V_c
* \f] * \f]
* *
* where V_c is the correction velocity * where V_c is the correction velocity
* *
* \f[ * \f[
* V_c = - \sum_j {\rho M_j D_j \nabla X_j} * V_c = - \sum_j {\rho M_j D_j \nabla X_j}
* \f] * \f]
* *
* @param ndim The number of spatial dimensions (1, 2, or 3). * @param ndim The number of spatial dimensions (1, 2, or 3).
* @param grad_T The temperature gradient (ignored in this model). * @param grad_T The temperature gradient (ignored in this model).
@ -406,10 +395,10 @@ public:
size_t ldx, const doublereal* const grad_X, size_t ldx, const doublereal* const grad_X,
size_t ldf, doublereal* const fluxes); size_t ldf, doublereal* const fluxes);
//! Return the species diffusive mass fluxes wrt to //! Return the species diffusive mass fluxes wrt to the mass averaged
//! the mass averaged velocity, //! velocity,
/*! /*!
* units = kg/m2/s * units = kg/m2/s
* *
* Internally, gradients in the in mole fraction, temperature * Internally, gradients in the in mole fraction, temperature
* and electrostatic potential contribute to the diffusive flux * and electrostatic potential contribute to the diffusive flux
@ -417,30 +406,29 @@ public:
* The diffusive mass flux of species \e k is computed from the following * The diffusive mass flux of species \e k is computed from the following
* formula * formula
* *
* \f[ * \f[
* j_k = - \rho M_k D_k \nabla X_k - Y_k V_c * j_k = - \rho M_k D_k \nabla X_k - Y_k V_c
* \f] * \f]
* *
* where V_c is the correction velocity * where V_c is the correction velocity
* *
* \f[ * \f[
* V_c = - \sum_j {\rho M_j D_j \nabla X_j} * V_c = - \sum_j {\rho M_j D_j \nabla X_j}
* \f] * \f]
* *
* @param ldf stride of the fluxes array. Must be equal to * @param ldf stride of the fluxes array. Must be equal to or greater
* or greater than the number of species. * than the number of species.
* @param fluxes Vector of calculated fluxes * @param fluxes Vector of calculated fluxes
*/ */
virtual void getSpeciesFluxesExt(size_t ldf, doublereal* fluxes); virtual void getSpeciesFluxesExt(size_t ldf, doublereal* fluxes);
protected: protected:
//! Handles the effects of changes in the Temperature, internally //! Handles the effects of changes in the Temperature, internally within the
//! within the object. //! object.
/*! /*!
* This is called whenever a transport property is requested. * This is called whenever a transport property is requested. The first task
* The first task is to check whether the temperature has changed * is to check whether the temperature has changed since the last call to
* since the last call to update_T(). * update_T(). If it hasn't then an immediate return is carried out.
* If it hasn't then an immediate return is carried out.
* *
* @return Returns true if the temperature has changed, and false otherwise * @return Returns true if the temperature has changed, and false otherwise
*/ */
@ -448,19 +436,19 @@ protected:
//! Handles the effects of changes in the mixture concentration //! Handles the effects of changes in the mixture concentration
/*! /*!
* This is called for every interface call to check whether * This is called for every interface call to check whether the
* the concentrations have changed. Concentrations change * concentrations have changed. Concentrations change whenever the pressure
* whenever the pressure or the mole fraction has changed. * or the mole fraction has changed. If it has changed, the recalculations
* If it has changed, the recalculations should be done. * should be done.
* *
* Note this should be a lightweight function since it's * Note this should be a lightweight function since it's part of all of the
* part of all of the interfaces. * interfaces.
*/ */
virtual bool update_C(); virtual bool update_C();
//! Update the temperature-dependent viscosity terms. //! Update the temperature-dependent viscosity terms. Updates the array of
//! Updates the array of pure species viscosities, and the //! pure species viscosities, and the weighting functions in the viscosity
//! weighting functions in the viscosity mixture rule. //! mixture rule.
/*! /*!
* The flag m_visc_temp_ok is set to true. * The flag m_visc_temp_ok is set to true.
*/ */
@ -472,25 +460,25 @@ protected:
//! Update the concentration parts of the viscosities //! Update the concentration parts of the viscosities
/*! /*!
* Internal routine is run whenever the update_boolean is false. This * Internal routine is run whenever the update_boolean is false. This
* routine will calculate internal values for the species viscosities. * routine will calculate internal values for the species viscosities.
*/ */
void updateViscosities_C(); void updateViscosities_C();
//! Update the binary diffusion coefficients wrt T. //! Update the binary diffusion coefficients wrt T.
/*! /*!
* These are evaluated from the polynomial fits at unit pressure (1 Pa). * These are evaluated from the polynomial fits at unit pressure (1 Pa).
*/ */
void updateDiff_T(); void updateDiff_T();
private: private:
//! Temperature dependence type //! Temperature dependence type
/*! /*!
* The following coefficients are allowed to have simple * The following coefficients are allowed to have simple temperature
* temperature dependencies: * dependencies:
* mixture viscosity * - mixture viscosity
* mixture thermal conductivity * - mixture thermal conductivity
* diffusitivy * - diffusitivy
* *
* Types of temperature dependencies: * Types of temperature dependencies:
* 0 - Independent of temperature (only one implemented so far) * 0 - Independent of temperature (only one implemented so far)
@ -501,12 +489,12 @@ private:
//! Composition dependence of the transport properties //! Composition dependence of the transport properties
/*! /*!
* The following coefficients are allowed to have simple composition dependencies * The following coefficients are allowed to have simple composition
* dependencies:
* - mixture viscosity
* - mixture thermal conductivity
* *
* mixture viscosity * Permissible types of composition dependencies
* mixture thermal conductivity
*
* Permissible types of composition dependencies
* 0 - Solvent values (i.e., species 0) contributes only * 0 - Solvent values (i.e., species 0) contributes only
* 1 - linear combination of mole fractions; * 1 - linear combination of mole fractions;
*/ */
@ -524,7 +512,7 @@ private:
//! Local Copy of the molecular weights of the species //! Local Copy of the molecular weights of the species
/*! /*!
* Length is Equal to the number of species in the mechanism. * Length is Equal to the number of species in the mechanism.
*/ */
vector_fp m_mw; vector_fp m_mw;
@ -542,16 +530,14 @@ private:
//! Internal value of the gradient of the mole fraction vector //! Internal value of the gradient of the mole fraction vector
/*! /*!
* Note, this is the only gradient value that can and perhaps * Note, this is the only gradient value that can and perhaps should reflect
* should reflect the true state of the mole fractions in the * the true state of the mole fractions in the application solution vector.
* application solution vector. In other words no cropping or * In other words no cropping or massaging of the values to make sure they
* massaging of the values to make sure they are above zero * are above zero should occur. - developing ....
* should occur. - developing ....
* *
* m_nsp is the number of species in the fluid * m_nsp is the number of species in the fluid
* k is the species index * k is the species index
* n is the dimensional index (x, y, or z). It has a length * n is the dimensional index (x, y, or z). It has a length equal to m_nDim
* equal to m_nDim
* *
* m_Grad_X[n*m_nsp + k] * m_Grad_X[n*m_nsp + k]
*/ */
@ -559,31 +545,31 @@ private:
//! Internal value of the gradient of the Temperature vector //! Internal value of the gradient of the Temperature vector
/*! /*!
* Generally, if a transport property needs this in its evaluation it * Generally, if a transport property needs this in its evaluation it
* will look to this place to get it. * will look to this place to get it.
* *
* No internal property is precalculated based on gradients. Gradients * No internal property is precalculated based on gradients. Gradients
* are assumed to be freshly updated before every property call. * are assumed to be freshly updated before every property call.
*/ */
vector_fp m_Grad_T; vector_fp m_Grad_T;
//! Internal value of the gradient of the Pressure vector //! Internal value of the gradient of the Pressure vector
/*! /*!
* Generally, if a transport property needs this in its evaluation it * Generally, if a transport property needs this in its evaluation it
* will look to this place to get it. * will look to this place to get it.
* *
* No internal property is precalculated based on gradients. Gradients * No internal property is precalculated based on gradients. Gradients
* are assumed to be freshly updated before every property call. * are assumed to be freshly updated before every property call.
*/ */
vector_fp m_Grad_P; vector_fp m_Grad_P;
//! Internal value of the gradient of the Electric Voltage //! Internal value of the gradient of the Electric Voltage
/*! /*!
* Generally, if a transport property needs this in its evaluation it * Generally, if a transport property needs this in its evaluation it
* will look to this place to get it. * will look to this place to get it.
* *
* No internal property is precalculated based on gradients. Gradients * No internal property is precalculated based on gradients. Gradients
* are assumed to be freshly updated before every property call. * are assumed to be freshly updated before every property call.
*/ */
vector_fp m_Grad_V; vector_fp m_Grad_V;
@ -591,20 +577,20 @@ private:
//! Vector of Species Diffusivities //! Vector of Species Diffusivities
/*! /*!
* Depends on the temperature. We have set the pressure dependence * Depends on the temperature. We have set the pressure dependence to zero
* to zero for this liquid phase constituitve model * for this liquid phase constituitve model
* *
* units m2/s * units m2/s
*/ */
vector_fp m_diffSpecies; vector_fp m_diffSpecies;
//! Species viscosities //! Species viscosities
/*! /*!
* Viscosity of the species * Viscosity of the species
* Length = number of species * Length = number of species
* *
* Depends on the temperature. We have set the pressure dependence * Depends on the temperature. We have set the pressure dependence to zero
* to zero for this model * for this model
* *
* controlling update boolean -> m_visc_temp_ok * controlling update boolean -> m_visc_temp_ok
*/ */
@ -626,10 +612,10 @@ private:
//! Local copy of the mole fractions of the species in the phase //! Local copy of the mole fractions of the species in the phase
/*! /*!
* The mole fractions here are assumed to be bounded by 0.0 and 1.0 * The mole fractions here are assumed to be bounded by 0.0 and 1.0 and they
* and they are assumed to add up to one exactly. This mole * are assumed to add up to one exactly. This mole fraction vector comes
* fraction vector comes from the ThermoPhase object. Derivative * from the ThermoPhase object. Derivative quantities from this are referred
* quantities from this are referred to as bounded. * to as bounded.
* *
* Update info? * Update info?
* length = m_nsp * length = m_nsp
@ -638,8 +624,8 @@ private:
//! Local copy of the concentrations of the species in the phase //! Local copy of the concentrations of the species in the phase
/*! /*!
* The concentrations are consistent with the m_molefracs * The concentrations are consistent with the m_molefracs vector which is
* vector which is bounded and sums to one. * bounded and sums to one.
* *
* Update info? * Update info?
* length = m_nsp * length = m_nsp
@ -648,8 +634,7 @@ private:
//! Local copy of the total concentration. //! Local copy of the total concentration.
/*! /*!
* This is consistent with the m_concentrations[] and * This is consistent with the m_concentrations[] and m_molefracs[] vector.
* m_molefracs[] vector.
*/ */
doublereal concTot_; doublereal concTot_;
@ -661,14 +646,14 @@ private:
//! Local copy of the charge of each species //! Local copy of the charge of each species
/*! /*!
* Contains the charge of each species (length m_nsp) * Contains the charge of each species (length m_nsp)
*/ */
vector_fp m_chargeSpecies; vector_fp m_chargeSpecies;
//! Current Temperature -> locally stored //! Current Temperature -> locally stored
/*! /*!
* This is used to test whether new temperature computations * This is used to test whether new temperature computations should be
* should be performed. * performed.
*/ */
doublereal m_temp; doublereal m_temp;

View file

@ -31,21 +31,21 @@ public:
//! Returns the ionic conductivity of the phase //! Returns the ionic conductivity of the phase
/*! /*!
* The thermo phase needs to be updated (temperature) prior to calling this. * The thermo phase needs to be updated (temperature) prior to calling this.
* The ionConductivity calculation is handled by subclasses of * The ionConductivity calculation is handled by subclasses of LTPspecies as
* LTPspecies as specified in the input file. * specified in the input file.
*/ */
virtual doublereal ionConductivity(); virtual doublereal ionConductivity();
//! Returns the thermal conductivity of the phase //! Returns the thermal conductivity of the phase
/*! /*!
* The thermo phase needs to be updated (temperature) prior to calling this. * The thermo phase needs to be updated (temperature) prior to calling this.
* The thermalConductivity calculation is handled by subclasses of * The thermalConductivity calculation is handled by subclasses of
* LTPspecies as specified in the input file. * LTPspecies as specified in the input file.
* *
* There is also a legacy method to evaluate * There is also a legacy method to evaluate
* \f[ * \f[
* \lambda = A T^n \exp(-E/RT) * \lambda = A T^n \exp(-E/RT)
* \f] * \f]
*/ */
virtual doublereal thermalConductivity(); virtual doublereal thermalConductivity();
@ -63,15 +63,15 @@ public:
/*! /*!
* The diffusivity of defects in the solid (m^2/s). The thermo phase needs * The diffusivity of defects in the solid (m^2/s). The thermo phase needs
* to be updated (temperature) prior to calling this. The * to be updated (temperature) prior to calling this. The defectDiffusivity
* defectDiffusivity calculation is handled by subclasses of LTPspecies * calculation is handled by subclasses of LTPspecies as specified in the
* as specified in the input file. * input file.
*/ */
virtual doublereal defectDiffusivity(); virtual doublereal defectDiffusivity();
/** /**
* The activity of defects in the solid. * The activity of defects in the solid. At some point this should be
* At some point this should be variable and the diffusion coefficient should depend on it. * variable and the diffusion coefficient should depend on it.
* *
* The thermo phase needs to be updated (temperature) prior to calling this. * The thermo phase needs to be updated (temperature) prior to calling this.
* The defectActivity calculation is handled by subclasses of * The defectActivity calculation is handled by subclasses of
@ -83,7 +83,7 @@ public:
* The diffusion coefficients are computed from * The diffusion coefficients are computed from
* *
* \f[ * \f[
* D_k = A_k T^{n_k} \exp(-E_k/RT). * D_k = A_k T^{n_k} \exp(-E_k/RT).
* \f] * \f]
* *
* The diffusion coefficients are only non-zero for species for which * The diffusion coefficients are only non-zero for species for which
@ -107,40 +107,25 @@ protected:
* required to do property evaluations is contained in the * required to do property evaluations is contained in the
* SolidTransportParams class that is filled in TransportFactory. * SolidTransportParams class that is filled in TransportFactory.
* *
* @param tr Transport parameters for all of the species * @param tr Transport parameters for all of the species in the phase.
* in the phase.
*/ */
virtual bool initSolid(SolidTransportData& tr); virtual bool initSolid(SolidTransportData& tr);
private: private:
//! Model type for the ionic conductivity //! Model type for the ionic conductivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* m_ionConductivity; LTPspecies* m_ionConductivity;
//! Model type for the thermal conductivity //! Model type for the thermal conductivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* m_thermalConductivity; LTPspecies* m_thermalConductivity;
//! Model type for the electrical conductivity //! Model type for the electrical conductivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* m_electConductivity; LTPspecies* m_electConductivity;
//! Model type for the defectDiffusivity -- or more like a defect diffusivity in the context of the solid phase. //! Model type for the defectDiffusivity -- or more like a defect
/*! //! diffusivity in the context of the solid phase.
* shallow pointer that should be zero during destructor
*/
LTPspecies* m_defectDiffusivity; LTPspecies* m_defectDiffusivity;
//! Model type for the defectActivity //! Model type for the defectActivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* m_defectActivity; LTPspecies* m_defectActivity;
//! number of mobile species //! number of mobile species

View file

@ -12,21 +12,20 @@
namespace Cantera namespace Cantera
{ {
//! Class SolidTransportData holds transport parameters for a //! Class SolidTransportData holds transport parameters for a specific solid-
//! specific solid-phase species. //! phase species.
/*! /*!
* A SolidTransportData object is created for a solid phase * A SolidTransportData object is created for a solid phase
* (not for each species as happens for the analogous LiquidTransportData). * (not for each species as happens for the analogous LiquidTransportData).
* *
* This class is mainly used to collect transport properties from the parse * This class is mainly used to collect transport properties from the parse
* phase in the TranportFactory and transfer them to the Transport class. * phase in the TranportFactory and transfer them to the Transport class.
* Transport properties are expressed by subclasses of LTPspecies. Note that * Transport properties are expressed by subclasses of LTPspecies. Note that we
* we use the liquid phase species model for the solid phases. That is, for * use the liquid phase species model for the solid phases. That is, for the
* the time being at least, we ignore mixing models for solid phases and just * time being at least, we ignore mixing models for solid phases and just
* specify a transport property at the level that we specify the transport * specify a transport property at the level that we specify the transport
* property for a species in the liquid phase. One may need to be careful * property for a species in the liquid phase. One may need to be careful about
* about deleting pointers to LTPspecies objects created in the * deleting pointers to LTPspecies objects created in the TransportFactory.
* TransportFactory.
* *
* All of the pointers in this class are shallow pointers. Therefore, this is * All of the pointers in this class are shallow pointers. Therefore, this is
* a passthrough class, which keeps track of pointer ownership by zeroing * a passthrough class, which keeps track of pointer ownership by zeroing
@ -45,33 +44,18 @@ public:
std::string speciesName; std::string speciesName;
//! Model type for the ionic conductivity //! Model type for the ionic conductivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* ionConductivity; LTPspecies* ionConductivity;
//! Model type for the thermal conductivity //! Model type for the thermal conductivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* thermalConductivity; LTPspecies* thermalConductivity;
//! Model type for the electrical conductivity //! Model type for the electrical conductivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* electConductivity; LTPspecies* electConductivity;
//! Model type for the defectDiffusivity -- or more like a defect diffusivity in the context of the solid phase. //! Model type for the defectDiffusivity -- or more like a defect diffusivity in the context of the solid phase.
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* defectDiffusivity; LTPspecies* defectDiffusivity;
//! Model type for the defectActivity //! Model type for the defectActivity
/*!
* shallow pointer that should be zero during destructor
*/
LTPspecies* defectActivity; LTPspecies* defectActivity;
}; };

View file

@ -20,10 +20,10 @@ namespace Cantera
//! in porous media using the Bruggeman exponent //! in porous media using the Bruggeman exponent
/*! /*!
* Class to compute the increase in diffusive path length associated with * Class to compute the increase in diffusive path length associated with
* tortuous path diffusion through, for example, porous media. * tortuous path diffusion through, for example, porous media. This base class
* This base class implementation relates tortuosity to volume fraction * implementation relates tortuosity to volume fraction through a power-law
* through a power-law relationship that goes back to Bruggeman. The * relationship that goes back to Bruggeman. The exponent is referred to as the
* exponent is referred to as the Bruggeman exponent. * Bruggeman exponent.
* *
* Note that the total diffusional flux is generally written as * Note that the total diffusional flux is generally written as
* *
@ -33,11 +33,8 @@ namespace Cantera
* *
* where \f$ \phi \f$ is the volume fraction of the transported phase, * where \f$ \phi \f$ is the volume fraction of the transported phase,
* \f$ \tau \f$ is referred to as the tortuosity. (Other variables are * \f$ \tau \f$ is referred to as the tortuosity. (Other variables are
* \f$ C_T \f$, the total concentration, \f$ D_i \f$, the diffusion * \f$ C_T \f$, the total concentration, \f$ D_i \f$, the diffusion coefficient,
* coefficient, and \f$ X_i \f$, the mole fraction with Fickian * and \f$ X_i \f$, the mole fraction with Fickian transport assumed.)
* transport assumed.)
*
* The tortuosity comes into play in conjunction the the
*/ */
class Tortuosity class Tortuosity
{ {
@ -59,26 +56,26 @@ public:
//! The McMillan number is the ratio of the flux-like //! The McMillan number is the ratio of the flux-like
//! variable to the value it would have without porous flow. //! variable to the value it would have without porous flow.
/** /**
* The McMillan number combines the effect of tortuosity * The McMillan number combines the effect of tortuosity and volume fraction
* and volume fraction of the transported phase. The net flux * of the transported phase. The net flux observed is then the product of
* observed is then the product of the McMillan number and the * the McMillan number and the non-porous transport rate. For a
* non-porous transport rate. For a conductivity in a non-porous * conductivity in a non-porous media, \f$ \kappa_0 \f$, the conductivity in
* media, \f$ \kappa_0 \f$, the conductivity in the porous media * the porous media would be \f$ \kappa = (\rm McMillan) \kappa_0 \f$.
* would be \f$ \kappa = (\rm McMillan) \kappa_0 \f$.
*/ */
virtual double McMillan(double porosity) { virtual double McMillan(double porosity) {
return pow(porosity, expBrug_); return pow(porosity, expBrug_);
} }
protected: protected:
//! Bruggeman exponent: power to which the tortuosity depends on the volume fraction //! Bruggeman exponent: power to which the tortuosity depends on the volume
//! fraction
double expBrug_; double expBrug_;
}; };
/** This class implements transport coefficient corrections /**
* appropriate for porous media where percolation theory applies. * This class implements transport coefficient corrections appropriate for
* It is derived from the Tortuosity class. * porous media where percolation theory applies.
*/ */
class TortuosityPercolation : public Tortuosity class TortuosityPercolation : public Tortuosity
{ {
@ -87,26 +84,10 @@ public:
TortuosityPercolation(double percolationThreshold = 0.4, double conductivityExponent = 2.0) : percolationThreshold_(percolationThreshold), conductivityExponent_(conductivityExponent) { TortuosityPercolation(double percolationThreshold = 0.4, double conductivityExponent = 2.0) : percolationThreshold_(percolationThreshold), conductivityExponent_(conductivityExponent) {
} }
//! The tortuosity factor models the effective increase in the
//! diffusive transport length.
/**
* This method returns \f$ 1/\tau^2 \f$ in the description of the
* flux \f$ \phi C_T D_i \nabla X_i / \tau^2 \f$.
*/
double tortuosityFactor(double porosity) { double tortuosityFactor(double porosity) {
return McMillan(porosity) / porosity; return McMillan(porosity) / porosity;
} }
//! The McMillan number is the ratio of the flux-like
//! variable to the value it would have without porous flow.
/**
* The McMillan number combines the effect of tortuosity
* and volume fraction of the transported phase. The net flux
* observed is then the product of the McMillan number and the
* non-porous transport rate. For a conductivity in a non-porous
* media, \f$ \kappa_0 \f$, the conductivity in the porous media
* would be \f$ \kappa = (\rm McMillan) \kappa_0 \f$.
*/
double McMillan(double porosity) { double McMillan(double porosity) {
return pow((porosity - percolationThreshold_) return pow((porosity - percolationThreshold_)
/ (1.0 - percolationThreshold_), / (1.0 - percolationThreshold_),
@ -120,28 +101,26 @@ protected:
/** /**
* The McMillan number (ratio of effective conductivity * The McMillan number (ratio of effective conductivity
* to non-porous conductivity) is * to non-porous conductivity) is
* \f[ \kappa/\kappa_0 = ( \phi - \phi_c )^\mu \f] * \f[
* where \f$ \mu \f$ is the conductivity exponent (typical * \kappa/\kappa_0 = ( \phi - \phi_c )^\mu
* values range from 1.6 to 2.0) and \f$ \phi_c \f$ * \f]
* is the percolation threshold. * where \f$ \mu \f$ is the conductivity exponent (typical values range from
* 1.6 to 2.0) and \f$ \phi_c \f$ is the percolation threshold.
*/ */
double conductivityExponent_; double conductivityExponent_;
}; };
/** This class implements transport coefficient corrections /**
* appropriate for porous media with a dispersed phase. * This class implements transport coefficient corrections appropriate for
* This model goes back to Maxwell. The formula for the * porous media with a dispersed phase. This model goes back to Maxwell. The
* conductivity is expressed in terms of the volume fraction * formula for the conductivity is expressed in terms of the volume fraction of
* of the continuous phase, \f$ \phi \f$, and the relative * the continuous phase, \f$ \phi \f$, and the relative conductivities of the
* conductivities of the dispersed and continuous phases, * dispersed and continuous phases, \f$ r = \kappa_d / \kappa_0 \f$. For dilute
* \f$ r = \kappa_d / \kappa_0 \f$. For dilute particle * particle suspensions the effective conductivity is
* suspensions the effective conductivity is
* \f[ * \f[
* \kappa / \kappa_0 = 1 + 3 ( 1 - \phi ) ( r - 1 ) / ( r + 2 ) * \kappa / \kappa_0 = 1 + 3 ( 1 - \phi ) ( r - 1 ) / ( r + 2 ) + O(\phi^2)
* + O(\phi^2)
* \f] * \f]
* The class is derived from the Tortuosity class.
*/ */
class TortuosityMaxwell : public Tortuosity class TortuosityMaxwell : public Tortuosity
{ {
@ -150,26 +129,10 @@ public:
TortuosityMaxwell(double relativeConductivites = 0.0) : relativeConductivites_(relativeConductivites) { TortuosityMaxwell(double relativeConductivites = 0.0) : relativeConductivites_(relativeConductivites) {
} }
//! The tortuosity factor models the effective increase in the
//! diffusive transport length.
/**
* This method returns \f$ 1/\tau^2 \f$ in the description of the
* flux \f$ \phi C_T D_i \nabla X_i / \tau^2 \f$.
*/
double tortuosityFactor(double porosity) { double tortuosityFactor(double porosity) {
return McMillan(porosity) / porosity; return McMillan(porosity) / porosity;
} }
//! The McMillan number is the ratio of the flux-like
//! variable to the value it would have without porous flow.
/**
* The McMillan number combines the effect of tortuosity
* and volume fraction of the transported phase. The net flux
* observed is then the product of the McMillan number and the
* non-porous transport rate. For a conductivity in a non-porous
* media, \f$ \kappa_0 \f$, the conductivity in the porous media
* would be \f$ \kappa = (\rm McMillan) \kappa_0 \f$.
*/
double McMillan(double porosity) { double McMillan(double porosity) {
return 1 + 3 * (1.0 - porosity) * (relativeConductivites_ - 1.0) / (relativeConductivites_ + 2); return 1 + 3 * (1.0 - porosity) * (relativeConductivites_ - 1.0) / (relativeConductivites_ + 2);
} }

View file

@ -1,11 +1,8 @@
/** /**
* @file TransportBase.h * @file TransportBase.h Headers for the Transport object, which is the virtual
* Headers for the Transport object, which is the virtual base class * base class for all transport property evaluators and also includes the
* for all transport property evaluators and also includes the * tranprops group definition (see \ref tranprops and \link
* tranprops group definition * Cantera::Transport Transport \endlink) .
* (see \ref tranprops and \link Cantera::Transport Transport \endlink) .
*
* Provides class Transport.
*/ */
// Copyright 2001-2003 California Institute of Technology // Copyright 2001-2003 California Institute of Technology
@ -55,21 +52,21 @@ const int cWaterTransport = 721;
//! The diffusion fluxes must be referenced to a particular reference //! The diffusion fluxes must be referenced to a particular reference
//! fluid velocity. //! fluid velocity.
/*! /*!
* Most typical is to reference the diffusion fluxes to the mass averaged velocity, but * Most typical is to reference the diffusion fluxes to the mass averaged
* referencing to the mole averaged velocity is suitable for some * velocity, but referencing to the mole averaged velocity is suitable for some
* liquid flows, and referencing to a single species is suitable for * liquid flows, and referencing to a single species is suitable for solid phase
* solid phase transport within a lattice. Currently, the identity of the reference * transport within a lattice. Currently, the identity of the reference
* velocity is coded into each transport object as a typedef named VelocityBasis, which * velocity is coded into each transport object as a typedef named
* is equated to an integer. Negative values of this variable refer to mass or mole-averaged * VelocityBasis, which is equated to an integer. Negative values of this
* velocities. Zero or positive quantities refers to the reference * variable refer to mass or mole-averaged velocities. Zero or positive
* velocity being referenced to a particular species. Below are the predefined constants * quantities refers to the reference velocity being referenced to a particular
* for its value. * species. Below are the predefined constants for its value.
* *
* - VB_MASSAVG Diffusion velocities are based on the mass averaged velocity * - VB_MASSAVG Diffusion velocities are based on the mass averaged velocity
* - VB_MOLEAVG Diffusion velocities are based on the mole averaged velocities * - VB_MOLEAVG Diffusion velocities are based on the mole averaged velocities
* - VB_SPECIES_0 Diffusion velocities are based on the relative motion wrt species 0 * - VB_SPECIES_0 Diffusion velocities are based on the relative motion wrt species 0
* - ... * - ...
* - VB_SPECIES_3 Diffusion velocities are based on the relative motion wrt species 3 * - VB_SPECIES_3 Diffusion velocities are based on the relative motion wrt species 3
* *
* @ingroup tranprops * @ingroup tranprops
*/ */
@ -95,76 +92,73 @@ const VelocityBasis VB_SPECIES_3 = 3;
//! Base class for transport property managers. //! Base class for transport property managers.
/*! /*!
* All classes that compute transport properties for a single phase derive * All classes that compute transport properties for a single phase derive from
* from this class. Class Transport is meant to be used as a base class * this class. Class Transport is meant to be used as a base class only. It is
* only. It is possible to instantiate it, but its methods throw exceptions * possible to instantiate it, but its methods throw exceptions if called.
* if called.
* *
* <HR> * <HR>
* <H2> Relationship of the Transport class to the ThermoPhase Class </H2> * <H2> Relationship of the Transport class to the ThermoPhase Class </H2>
* <HR> * <HR>
* *
* This section describes how calculations are carried out within * This section describes how calculations are carried out within the Transport
* the Transport class. The Transport class and derived classes of the * class. The Transport class and derived classes of the the Transport class
* the Transport class necessarily use the ThermoPhase class to obtain * necessarily use the ThermoPhase class to obtain the list of species and the
* the list of species and the thermodynamic state of the phase. * thermodynamic state of the phase.
* *
* No state information is stored within Transport classes. Queries to the * No state information is stored within Transport classes. Queries to the
* underlying ThermoPhase object must be made to obtain the state of the * underlying ThermoPhase object must be made to obtain the state of the system.
* system.
* *
* An exception to this however is the state information concerning the * An exception to this however is the state information concerning the the
* the gradients of variables. This information is not stored within * gradients of variables. This information is not stored within the ThermoPhase
* the ThermoPhase objects. It may be collected within the Transport objects. * objects. It may be collected within the Transport objects. In fact, the
* In fact, the meaning of const operations within the Transport class * meaning of const operations within the Transport class refers to calculations
* refers to calculations which do not change the state of the * which do not change the state of the system nor the state of the first order
* system nor the state of the first order gradients of the system. * gradients of the system.
* *
* When a const operation is evoked within the Transport class, it is * When a const operation is evoked within the Transport class, it is also
* also implicitly assumed that the underlying state within the ThermoPhase * implicitly assumed that the underlying state within the ThermoPhase object
* object has not changed its values. * has not changed its values.
* *
* <HR> * <HR>
* <H2> Diffusion Fluxes and their Relationship to Reference Velocities </H2> * <H2> Diffusion Fluxes and their Relationship to Reference Velocities </H2>
* <HR> * <HR>
* *
* The diffusion fluxes must be referenced to a particular reference fluid * The diffusion fluxes must be referenced to a particular reference fluid
* velocity. Most typical is to reference the diffusion fluxes to the mass * velocity. Most typical is to reference the diffusion fluxes to the mass
* averaged velocity, but referencing to the mole averaged velocity is suitable * averaged velocity, but referencing to the mole averaged velocity is suitable
* for some liquid flows, and referencing to a single species is suitable for * for some liquid flows, and referencing to a single species is suitable for
* solid phase transport within a lattice. Currently, the identity of the * solid phase transport within a lattice. Currently, the identity of the
* reference velocity is coded into each transport object as a typedef named * reference velocity is coded into each transport object as a typedef named
* VelocityBasis, which is equated to an integer. Negative values of this * VelocityBasis, which is equated to an integer. Negative values of this
* variable refer to mass or mole-averaged velocities. Zero or positive * variable refer to mass or mole-averaged velocities. Zero or positive
* quantities refers to the reference velocity being referenced to a particular * quantities refers to the reference velocity being referenced to a particular
* species. Below are the predefined constants for its value. * species. Below are the predefined constants for its value.
* *
* - VB_MASSAVG Diffusion velocities are based on the mass averaged velocity * - VB_MASSAVG Diffusion velocities are based on the mass averaged velocity
* - VB_MOLEAVG Diffusion velocities are based on the mole averaged velocities * - VB_MOLEAVG Diffusion velocities are based on the mole averaged velocities
* - VB_SPECIES_0 Diffusion velocities are based on the relative motion wrt species 0 * - VB_SPECIES_0 Diffusion velocities are based on the relative motion wrt species 0
* - ... * - ...
* - VB_SPECIES_3 Diffusion velocities are based on the relative motion wrt species 3 * - VB_SPECIES_3 Diffusion velocities are based on the relative motion wrt species 3
* *
* All transport managers specify a default reference velocity in their default constructors. * All transport managers specify a default reference velocity in their default
* All gas phase transport managers by default specify the mass-averaged velocity as their * constructors. All gas phase transport managers by default specify the mass-
* reference velocities. * averaged velocity as their reference velocities.
* *
* @todo Provide a general mechanism to store the gradients of state variables * @todo Provide a general mechanism to store the gradients of state variables
* within the system. * within the system.
* *
* @ingroup tranprops * @ingroup tranprops
*/ */
class Transport class Transport
{ {
public: public:
//! Constructor. //! Constructor.
/*! /*!
* New transport managers should be created using * New transport managers should be created using TransportFactory, not by
* TransportFactory, not by calling the constructor directly. * calling the constructor directly.
* *
* @param thermo Pointer to the ThermoPhase class representing * @param thermo Pointer to the ThermoPhase class representing this phase.
* this phase. * @param ndim Dimension of the flux vector used in the calculation.
* @param ndim Dimension of the flux vector used in the calculation.
* *
* @see TransportFactory * @see TransportFactory
*/ */
@ -176,11 +170,11 @@ public:
//! Duplication routine for objects which inherit from Transport //! Duplication routine for objects which inherit from Transport
/*! /*!
* This virtual routine can be used to duplicate objects derived from * This virtual routine can be used to duplicate objects derived from
* Transport even if the application only has a pointer to Transport to * Transport even if the application only has a pointer to Transport to work
* work with. * with.
* *
* These routines are basically wrappers around the derived copy * These routines are basically wrappers around the derived copy
* constructor. * constructor.
*/ */
// Note ->need working copy constructors and operator=() functions for all first // Note ->need working copy constructors and operator=() functions for all first
@ -222,13 +216,13 @@ public:
return m_nDim; return m_nDim;
} }
//! Check that the specified species index is in range //! Check that the specified species index is in range. Throws an exception
//! Throws an exception if k is greater than nSpecies() //! if k is greater than nSpecies()
void checkSpeciesIndex(size_t k) const; void checkSpeciesIndex(size_t k) const;
//! Check that an array size is at least nSpecies() //! Check that an array size is at least nSpecies(). Throws an exception if
//! Throws an exception if kk is less than nSpecies(). Used before calls //! kk is less than nSpecies(). Used before calls which take an array
//! which take an array pointer. //! pointer.
void checkSpeciesArraySize(size_t kk) const; void checkSpeciesArraySize(size_t kk) const;
/** /**
@ -245,7 +239,7 @@ public:
//! Returns the pure species viscosities //! Returns the pure species viscosities
/*! /*!
* The units are Pa-s and the length is the number of species * The units are Pa-s and the length is the number of species
* *
* @param visc Vector of viscosities * @param visc Vector of viscosities
*/ */
@ -253,19 +247,17 @@ public:
throw NotImplementedError("Transport::getSpeciesViscosities"); throw NotImplementedError("Transport::getSpeciesViscosities");
} }
/** //! The bulk viscosity in Pa-s.
* The bulk viscosity in Pa-s. The bulk viscosity is only /*!
* non-zero in rare cases. Most transport managers either * The bulk viscosity is only non-zero in rare cases. Most transport
* overload this method to return zero, or do not implement * managers either overload this method to return zero, or do not implement
* it, in which case an exception is thrown if called. * it, in which case an exception is thrown if called.
*/ */
virtual doublereal bulkViscosity() { virtual doublereal bulkViscosity() {
throw NotImplementedError("Transport::bulkViscosity"); throw NotImplementedError("Transport::bulkViscosity");
} }
/** //! The ionic conductivity in 1/ohm/m.
* The ionic conductivity in 1/ohm/m.
*/
virtual doublereal ionConductivity() { virtual doublereal ionConductivity() {
throw NotImplementedError("Transport::ionConductivity"); throw NotImplementedError("Transport::ionConductivity");
} }
@ -282,17 +274,18 @@ public:
//! Returns the pointer to the mobility ratios of the species in the phase //! Returns the pointer to the mobility ratios of the species in the phase
/*! /*!
* @param mobRat Returns a matrix of mobility ratios for the current problem. * @param mobRat Returns a matrix of mobility ratios for the current
* The mobility ratio mobRat(i,j) is defined as the ratio of the * problem. The mobility ratio mobRat(i,j) is defined as the
* mobility of species i to species j. * ratio of the mobility of species i to species j.
* *
* mobRat(i,j) = mu_i / mu_j * mobRat(i,j) = mu_i / mu_j
* *
* It is returned in fortran-ordering format. ie. it is returned as mobRat[k], where * It is returned in fortran-ordering format. ie. it is returned as
* mobRat[k], where
* *
* k = j * nsp + i * k = j * nsp + i
* *
* The size of mobRat must be at least equal to nsp*nsp * The size of mobRat must be at least equal to nsp*nsp
*/ */
virtual void mobilityRatio(double* mobRat) { virtual void mobilityRatio(double* mobRat) {
throw NotImplementedError("Transport::mobilityRatio"); throw NotImplementedError("Transport::mobilityRatio");
@ -300,7 +293,7 @@ public:
//! Returns the pure species limit of the mobility ratios //! Returns the pure species limit of the mobility ratios
/*! /*!
* The value is dimensionless and the length is the number of species * The value is dimensionless and the length is the number of species
* *
* @param mobRat Vector of mobility ratios * @param mobRat Vector of mobility ratios
*/ */
@ -310,28 +303,28 @@ public:
//! Returns the self diffusion coefficients of the species in the phase //! Returns the self diffusion coefficients of the species in the phase
/*! /*!
* The self diffusion coefficient is the diffusion coefficient of a tracer * The self diffusion coefficient is the diffusion coefficient of a tracer
* species at the current temperature and composition of the species. * species at the current temperature and composition of the species.
* Therefore, the dilute limit of transport is assumed for the tracer * Therefore, the dilute limit of transport is assumed for the tracer
* species. The effective formula may be calculated from the Stefan-Maxwell * species. The effective formula may be calculated from the Stefan-Maxwell
* formulation by adding another row for the tracer species, assigning all * formulation by adding another row for the tracer species, assigning all
* D's to be equal to the respective species D's, and then taking the limit * D's to be equal to the respective species D's, and then taking the limit
* as the tracer species mole fraction goes to zero. The corresponding flux * as the tracer species mole fraction goes to zero. The corresponding flux
* equation for the tracer species k in units of kmol m-2 s-1 is. * equation for the tracer species k in units of kmol m-2 s-1 is.
* *
* \f[ * \f[
* J_k = - D^{sd}_k \frac{C_k}{R T} \nabla \mu_k * J_k = - D^{sd}_k \frac{C_k}{R T} \nabla \mu_k
* \f] * \f]
* *
* The derivative is taken at constant T and P. * The derivative is taken at constant T and P.
* *
* The self diffusion calculation is handled by subclasses of * The self diffusion calculation is handled by subclasses of
* LiquidTranInteraction as specified in the input file. * LiquidTranInteraction as specified in the input file. These in turn
* These in turn employ subclasses of LTPspecies to * employ subclasses of LTPspecies to determine the individual species self
* determine the individual species self diffusion coeffs. * diffusion coeffs.
* *
* @param selfDiff Vector of self-diffusion coefficients. Length = number * @param selfDiff Vector of self-diffusion coefficients. Length = number
* of species in phase. units = m**2 s-1. * of species in phase. units = m**2 s-1.
*/ */
virtual void selfDiffusion(doublereal* const selfDiff) { virtual void selfDiffusion(doublereal* const selfDiff) {
throw NotImplementedError("Transport::selfDiffusion"); throw NotImplementedError("Transport::selfDiffusion");
@ -339,8 +332,8 @@ public:
//! Returns the pure species self diffusion in solution of each species //! Returns the pure species self diffusion in solution of each species
/*! /*!
* The pure species molar volumes are evaluated using the appropriate * The pure species molar volumes are evaluated using the appropriate
* subclasses of LTPspecies as specified in the input file. * subclasses of LTPspecies as specified in the input file.
* *
* @param selfDiff array of length "number of species" * @param selfDiff array of length "number of species"
* to hold returned self diffusion coeffs. * to hold returned self diffusion coeffs.
@ -349,9 +342,9 @@ public:
throw NotImplementedError("Transport::getSpeciesSelfDiffusion"); throw NotImplementedError("Transport::getSpeciesSelfDiffusion");
} }
//! Returns the mixture thermal conductivity in W/m/K. //! Returns the mixture thermal conductivity in W/m/K.
/*! /*!
* Units are in W / m K or equivalently kg m / s3 K * Units are in W / m K or equivalently kg m / s3 K
* *
* @return returns thermal conductivity in W/m/K. * @return returns thermal conductivity in W/m/K.
*/ */
@ -359,24 +352,22 @@ public:
throw NotImplementedError("Transport::thermalConductivity"); throw NotImplementedError("Transport::thermalConductivity");
} }
/*! //! The electrical conductivity (Siemens/m).
* The electrical conductivity (Siemens/m).
*/
virtual doublereal electricalConductivity() { virtual doublereal electricalConductivity() {
throw NotImplementedError("Transport::electricalConductivity"); throw NotImplementedError("Transport::electricalConductivity");
} }
//! Get the Electrical mobilities (m^2/V/s). //! Get the Electrical mobilities (m^2/V/s).
/*! /*!
* This function returns the mobilities. In some formulations * This function returns the mobilities. In some formulations this is equal
* this is equal to the normal mobility multiplied by Faraday's constant. * to the normal mobility multiplied by Faraday's constant.
* *
* Frequently, but not always, the mobility is calculated from the * Frequently, but not always, the mobility is calculated from the diffusion
* diffusion coefficient using the Einstein relation * coefficient using the Einstein relation
* *
* \f[ * \f[
* \mu^e_k = \frac{F D_k}{R T} * \mu^e_k = \frac{F D_k}{R T}
* \f] * \f]
* *
* @param mobil_e Returns the mobilities of the species in array \c * @param mobil_e Returns the mobilities of the species in array \c
* mobil_e. The array must be dimensioned at least as large as * mobil_e. The array must be dimensioned at least as large as
@ -388,16 +379,16 @@ public:
//! Get the fluid mobilities (s kmol/kg). //! Get the fluid mobilities (s kmol/kg).
/*! /*!
* This function returns the fluid mobilities. Usually, you have * This function returns the fluid mobilities. Usually, you have to multiply
* to multiply Faraday's constant into the resulting expression * Faraday's constant into the resulting expression to general a species
* to general a species flux expression. * flux expression.
* *
* Frequently, but not always, the mobility is calculated from the * Frequently, but not always, the mobility is calculated from the diffusion
* diffusion coefficient using the Einstein relation * coefficient using the Einstein relation
* *
* \f[ * \f[
* \mu^f_k = \frac{D_k}{R T} * \mu^f_k = \frac{D_k}{R T}
* \f] * \f]
* *
* @param mobil_f Returns the mobilities of the species in array \c mobil. * @param mobil_f Returns the mobilities of the species in array \c mobil.
* The array must be dimensioned at least as large as the * The array must be dimensioned at least as large as the
@ -412,19 +403,19 @@ public:
//! Compute the mixture electrical conductivity (S m-1) at the current //! Compute the mixture electrical conductivity (S m-1) at the current
//! conditions of the phase (Siemens m-1) //! conditions of the phase (Siemens m-1)
/*! /*!
* The electrical conductivity, \f$ \sigma \f$, relates the electric * The electrical conductivity, \f$ \sigma \f$, relates the electric current
* current density, J, to the electric field, E. * density, J, to the electric field, E.
* *
* \f[ * \f[
* \vec{J} = \sigma \vec{E} * \vec{J} = \sigma \vec{E}
* \f] * \f]
* *
* We assume here that the mixture electrical conductivity is an isotropic * We assume here that the mixture electrical conductivity is an isotropic
* quantity, at this stage. Tensors may be included at a later time. * quantity, at this stage. Tensors may be included at a later time.
* *
* The conductivity is the reciprocal of the resistivity. * The conductivity is the reciprocal of the resistivity.
* *
* The units are Siemens m-1, where 1 S = 1 A / volt = 1 s^3 A^2 /kg /m^2 * The units are Siemens m-1, where 1 S = 1 A / volt = 1 s^3 A^2 /kg /m^2
*/ */
virtual doublereal getElectricConduct() { virtual doublereal getElectricConduct() {
throw NotImplementedError("Transport::getElectricConduct"); throw NotImplementedError("Transport::getElectricConduct");
@ -432,8 +423,8 @@ public:
//! Compute the electric current density in A/m^2 //! Compute the electric current density in A/m^2
/*! /*!
* Calculates the electric current density as a vector, given * Calculates the electric current density as a vector, given the gradients
* the gradients of the field variables. * of the field variables.
* *
* @param ndim The number of spatial dimensions (1, 2, or 3). * @param ndim The number of spatial dimensions (1, 2, or 3).
* @param grad_T The temperature gradient (ignored in this model). * @param grad_T The temperature gradient (ignored in this model).
@ -456,24 +447,21 @@ public:
//! Get the species diffusive mass fluxes wrt to the specified solution //! Get the species diffusive mass fluxes wrt to the specified solution
//! averaged velocity, given the gradients in mole fraction and temperature //! averaged velocity, given the gradients in mole fraction and temperature
/*! /*!
* Units for the returned fluxes are kg m-2 s-1. * Units for the returned fluxes are kg m-2 s-1.
* *
* Usually the specified solution average velocity is the mass averaged * Usually the specified solution average velocity is the mass averaged
* velocity. This is changed in some subclasses, however. * velocity. This is changed in some subclasses, however.
* *
* @param ndim Number of dimensions in the flux expressions * @param ndim Number of dimensions in the flux expressions
* @param grad_T Gradient of the temperature * @param grad_T Gradient of the temperature (length = ndim)
* (length = ndim) * @param ldx Leading dimension of the grad_X array (usually equal to
* @param ldx Leading dimension of the grad_X array * m_nsp but not always)
* (usually equal to m_nsp but not always) * @param grad_X Gradients of the mole fraction Flat vector with the
* @param grad_X Gradients of the mole fraction * m_nsp in the inner loop. length = ldx * ndim
* Flat vector with the m_nsp in the inner loop. * @param ldf Leading dimension of the fluxes array (usually equal to
* length = ldx * ndim * m_nsp but not always)
* @param ldf Leading dimension of the fluxes array * @param fluxes Output of the diffusive mass fluxes. Flat vector with
* (usually equal to m_nsp but not always) * the m_nsp in the inner loop. length = ldx * ndim
* @param fluxes Output of the diffusive mass fluxes
* Flat vector with the m_nsp in the inner loop.
* length = ldx * ndim
*/ */
virtual void getSpeciesFluxes(size_t ndim, const doublereal* const grad_T, virtual void getSpeciesFluxes(size_t ndim, const doublereal* const grad_T,
size_t ldx, const doublereal* const grad_X, size_t ldx, const doublereal* const grad_X,
@ -483,7 +471,7 @@ public:
//! given the gradients in mole fraction, temperature and electrostatic //! given the gradients in mole fraction, temperature and electrostatic
//! potential. //! potential.
/*! /*!
* Units for the returned fluxes are kg m-2 s-1. * Units for the returned fluxes are kg m-2 s-1.
* *
* @param[in] ndim Number of dimensions in the flux expressions * @param[in] ndim Number of dimensions in the flux expressions
* @param[in] grad_T Gradient of the temperature. (length = ndim) * @param[in] grad_T Gradient of the temperature. (length = ndim)
@ -535,8 +523,8 @@ public:
//! given the gradients in mole fraction, temperature, and electrostatic //! given the gradients in mole fraction, temperature, and electrostatic
//! potential. //! potential.
/*! /*!
* @param[in] ndim Number of dimensions in the flux expressions * @param[in] ndim Number of dimensions in the flux expressions
* @param[in] grad_T Gradient of the temperature (length = ndim) * @param[in] grad_T Gradient of the temperature (length = ndim)
* @param[in] ldx Leading dimension of the grad_X array (usually equal to * @param[in] ldx Leading dimension of the grad_X array (usually equal to
* m_nsp but not always) * m_nsp but not always)
* @param[in] grad_X Gradients of the mole fraction. Flat vector with the * @param[in] grad_X Gradients of the mole fraction. Flat vector with the
@ -547,7 +535,7 @@ public:
* (length = ndim) * (length = ndim)
* @param[out] Vdiff Diffusive velocities wrt the mass-averaged velocity. * @param[out] Vdiff Diffusive velocities wrt the mass-averaged velocity.
* Flat vector with the m_nsp in the inner loop. length = ldx * Flat vector with the m_nsp in the inner loop. length = ldx
* * ndim units are m / s. * * ndim. units are m / s.
*/ */
virtual void getSpeciesVdiffES(size_t ndim, virtual void getSpeciesVdiffES(size_t ndim,
const doublereal* grad_T, const doublereal* grad_T,
@ -578,8 +566,8 @@ public:
throw NotImplementedError("Transport::getMolarFluxes"); throw NotImplementedError("Transport::getMolarFluxes");
} }
//! Get the mass fluxes [kg/m^2/s], given the thermodynamic state at two //! Get the mass fluxes [kg/m^2/s], given the thermodynamic state at two
//! nearby points. //! nearby points.
/*! /*!
* @param[in] state1 Array of temperature, density, and mass * @param[in] state1 Array of temperature, density, and mass
* fractions for state 1. * fractions for state 1.
@ -603,11 +591,11 @@ public:
* diffusive mass flux of species <I>k</I> induced by the local temperature * diffusive mass flux of species <I>k</I> induced by the local temperature
* gradient is given by the following formula: * gradient is given by the following formula:
* *
* \f[ * \f[
* M_k J_k = -D^T_k \nabla \ln T. * M_k J_k = -D^T_k \nabla \ln T.
* \f] * \f]
* *
* The thermal diffusion coefficient can be either positive or negative. * The thermal diffusion coefficient can be either positive or negative.
* *
* @param dt On return, dt will contain the species thermal diffusion * @param dt On return, dt will contain the species thermal diffusion
* coefficients. Dimension dt at least as large as the number of * coefficients. Dimension dt at least as large as the number of
@ -619,10 +607,10 @@ public:
//! Returns the matrix of binary diffusion coefficients [m^2/s]. //! Returns the matrix of binary diffusion coefficients [m^2/s].
/*! /*!
* @param[in] ld Inner stride for writing the two dimension diffusion * @param[in] ld Inner stride for writing the two dimension diffusion
* coefficients into a one dimensional vector * coefficients into a one dimensional vector
* @param[out] d Diffusion coefficient matrix (must be at least m_k * m_k * @param[out] d Diffusion coefficient matrix (must be at least m_k * m_k
* in length. * in length.
*/ */
virtual void getBinaryDiffCoeffs(const size_t ld, doublereal* const d) { virtual void getBinaryDiffCoeffs(const size_t ld, doublereal* const d) {
throw NotImplementedError("Transport::getBinaryDiffCoeffs"); throw NotImplementedError("Transport::getBinaryDiffCoeffs");
@ -634,8 +622,8 @@ public:
* model, then this method returns the array of multicomponent * model, then this method returns the array of multicomponent
* diffusion coefficients. Otherwise it throws an exception. * diffusion coefficients. Otherwise it throws an exception.
* *
* @param[in] ld The dimension of the inner loop of d (usually equal to m_nsp) * @param[in] ld The dimension of the inner loop of d (usually equal to m_nsp)
* @param[out] d flat vector of diffusion coefficients, fortran ordering. * @param[out] d flat vector of diffusion coefficients, fortran ordering.
* d[ld*j+i] is the D_ij diffusion coefficient (the diffusion * d[ld*j+i] is the D_ij diffusion coefficient (the diffusion
* coefficient for species i due to species j). * coefficient for species i due to species j).
*/ */
@ -669,41 +657,41 @@ public:
//! Set model parameters for derived classes //! Set model parameters for derived classes
/*! /*!
* This method may be derived in subclasses to set model-specific * This method may be derived in subclasses to set model-specific
* parameters. The primary use of this class is to set parameters while in * parameters. The primary use of this class is to set parameters while in
* the middle of a calculation without actually having to dynamically cast * the middle of a calculation without actually having to dynamically cast
* the base Transport pointer. * the base Transport pointer.
* *
* @param type Specifies the type of parameters to set * @param type Specifies the type of parameters to set
* 0 : Diffusion coefficient * 0 : Diffusion coefficient
* 1 : Thermal Conductivity * 1 : Thermal Conductivity
* The rest are currently unused. * The rest are currently unused.
* @param k Species index to set the parameters on * @param k Species index to set the parameters on
* @param p Vector of parameters. The length of the vector * @param p Vector of parameters. The length of the vector varies with
* varies with the parameterization * the parameterization
* @deprecated * @deprecated
*/ */
virtual void setParameters(const int type, const int k, const doublereal* const p); virtual void setParameters(const int type, const int k, const doublereal* const p);
//! Sets the velocity basis //! Sets the velocity basis
/*! /*!
* What the transport object does with this parameter is up to the * What the transport object does with this parameter is up to the
* individual operator. Currently, this is not functional for most * individual operator. Currently, this is not functional for most transport
* transport operators including all of the gas-phase operators. * operators including all of the gas-phase operators.
* *
* @param ivb Species the velocity basis * @param ivb Species the velocity basis
*/ */
void setVelocityBasis(VelocityBasis ivb) { void setVelocityBasis(VelocityBasis ivb) {
m_velocityBasis = ivb; m_velocityBasis = ivb;
} }
//! Gets the velocity basis //! Gets the velocity basis
/*! /*!
* What the transport object does with this parameter is up to the * What the transport object does with this parameter is up to the
* individual operator. Currently, this is not functional for most * individual operator. Currently, this is not functional for most transport
* transport operators including all of the gas-phase operators. * operators including all of the gas-phase operators.
* *
* @return Returns the velocity basis * @returns the velocity basis
*/ */
VelocityBasis getVelocityBasis() const { VelocityBasis getVelocityBasis() const {
return m_velocityBasis; return m_velocityBasis;
@ -717,13 +705,13 @@ public:
//! Initialize a transport manager //! Initialize a transport manager
/*! /*!
* This routine sets up a transport manager. It calculates the collision * This routine sets up a transport manager. It calculates the collision
* integrals and populates species-dependent data structures. * integrals and populates species-dependent data structures.
* *
* @param thermo Pointer to the ThermoPhase object * @param thermo Pointer to the ThermoPhase object
* @param mode Chemkin compatible mode or not. This alters the * @param mode Chemkin compatible mode or not. This alters the
* specification of the collision integrals. defaults to no. * specification of the collision integrals. defaults to no.
* @param log_level Defaults to zero, no logging * @param log_level Defaults to zero, no logging
*/ */
virtual void init(thermo_t* thermo, int mode=0, int log_level=0) { virtual void init(thermo_t* thermo, int mode=0, int log_level=0) {
throw NotImplementedError("Transport::init"); throw NotImplementedError("Transport::init");
@ -731,11 +719,11 @@ public:
//! Called by TransportFactory to set parameters. //! Called by TransportFactory to set parameters.
/*! /*!
* This is called by classes that use the liquid phase parameter * This is called by classes that use the liquid phase parameter list to
* list to initialize themselves. * initialize themselves.
* *
* @param tr Reference to the parameter list that will be used * @param tr Reference to the parameter list that will be used to initialize
* to initialize the class * the class
*/ */
virtual bool initLiquid(LiquidTransportParams& tr) { virtual bool initLiquid(LiquidTransportParams& tr) {
throw NotImplementedError("Transport::initLiquid"); throw NotImplementedError("Transport::initLiquid");
@ -743,11 +731,11 @@ public:
//! Called by TransportFactory to set parameters. //! Called by TransportFactory to set parameters.
/*! /*!
* This is called by classes that use the solid phase parameter * This is called by classes that use the solid phase parameter list to
* list to initialize themselves. * initialize themselves.
* *
* @param tr Reference to the parameter list that will be used * @param tr Reference to the parameter list that will be used to initialize
* to initialize the class * the class
*/ */
virtual bool initSolid(SolidTransportData& tr) { virtual bool initSolid(SolidTransportData& tr) {
throw NotImplementedError("Transport::initSolid"); throw NotImplementedError("Transport::initSolid");
@ -755,17 +743,16 @@ public:
//! Specifies the ThermoPhase object. //! Specifies the ThermoPhase object.
/*! /*!
* We have relaxed this operation so that it will succeed when * We have relaxed this operation so that it will succeed when the
* the underlying old and new ThermoPhase objects have the same * underlying old and new ThermoPhase objects have the same number of
* number of species and the same names of the species in the * species and the same names of the species in the same order. The idea
* same order. The idea here is to allow copy constructors and duplicators * here is to allow copy constructors and duplicators to work. In order for
* to work. In order for them to work, we need a method to switch the * them to work, we need a method to switch the internal pointer within the
* internal pointer within the Transport object after the duplication * Transport object after the duplication takes place. Also, different
* takes place. Also, different thermodynamic instantiations of the same * thermodynamic instantiations of the same species should also work.
* species should also work.
* *
* @param thermo Reference to the ThermoPhase object that * @param thermo Reference to the ThermoPhase object that the transport
* the transport object will use * object will use
*/ */
virtual void setThermo(thermo_t& thermo); virtual void setThermo(thermo_t& thermo);
@ -780,10 +767,10 @@ protected:
//@} //@}
//! pointer to the object representing the phase //! pointer to the object representing the phase
thermo_t* m_thermo; thermo_t* m_thermo;
//! true if finalize has been called //! true if finalize has been called
bool m_ready; bool m_ready;
//! Number of species //! Number of species
@ -792,8 +779,8 @@ protected:
//! Number of dimensions used in flux expressions //! Number of dimensions used in flux expressions
size_t m_nDim; size_t m_nDim;
//! Velocity basis from which diffusion velocities are computed. //! Velocity basis from which diffusion velocities are computed.
//! Defaults to the mass averaged basis = -2 //! Defaults to the mass averaged basis = -2
int m_velocityBasis; int m_velocityBasis;
}; };

View file

@ -60,14 +60,14 @@ public:
//! Make one of several transport models, and return a base class pointer to it. //! Make one of several transport models, and return a base class pointer to it.
/*! /*!
* This method operates at the level of a single transport property as a * This method operates at the level of a single transport property as a
* function of temperature and possibly composition. It's a factory for * function of temperature and possibly composition. It's a factory for
* LTPspecies classes. * LTPspecies classes.
* *
* @param trNode XML node * @param trNode XML node
* @param name reference to the name * @param name reference to the name
* @param tp_ind TransportPropertyType class * @param tp_ind TransportPropertyType class
* @param thermo Pointer to the ThermoPhase class * @param thermo Pointer to the ThermoPhase class
*/ */
virtual LTPspecies* newLTP(const XML_Node& trNode, const std::string& name, virtual LTPspecies* newLTP(const XML_Node& trNode, const std::string& name,
TransportPropertyType tp_ind, thermo_t* thermo); TransportPropertyType tp_ind, thermo_t* thermo);
@ -75,12 +75,13 @@ public:
//! Factory function for the construction of new LiquidTranInteraction //! Factory function for the construction of new LiquidTranInteraction
//! objects, which are transport models. //! objects, which are transport models.
/*! /*!
* This method operates at the level of a single mixture transport property. Individual species * This method operates at the level of a single mixture transport property.
* transport properties are addressed by the LTPspecies returned by newLTP. * Individual species transport properties are addressed by the LTPspecies
* returned by newLTP.
* *
* @param trNode XML_Node containing the information for the interaction * @param trNode XML_Node containing the information for the interaction
* @param tp_ind TransportPropertyType object * @param tp_ind TransportPropertyType object
* @param trParam reference to the LiquidTransportParams object * @param trParam reference to the LiquidTransportParams object
*/ */
virtual LiquidTranInteraction* newLTI(const XML_Node& trNode, virtual LiquidTranInteraction* newLTI(const XML_Node& trNode,
TransportPropertyType tp_ind, TransportPropertyType tp_ind,
@ -100,17 +101,17 @@ public:
//! Build a new transport manager using the default transport manager //! Build a new transport manager using the default transport manager
//! in the phase description and return a base class pointer to it //! in the phase description and return a base class pointer to it
/*! /*!
* @param thermo ThermoPhase object * @param thermo ThermoPhase object
* @param log_level log level * @param log_level log level
*/ */
virtual Transport* virtual Transport*
newTransport(thermo_t* thermo, int log_level=0); newTransport(thermo_t* thermo, int log_level=0);
//! Initialize an existing transport manager for liquid phase //! Initialize an existing transport manager for liquid phase
/*! /*!
* This routine sets up an existing liquid-phase transport manager. It is * This routine sets up an existing liquid-phase transport manager. It is
* similar to initTransport except that it uses the LiquidTransportParams * similar to initTransport except that it uses the LiquidTransportParams
* class and calls setupLiquidTransport(). * class and calls setupLiquidTransport().
* *
* @param tr Pointer to the Transport manager * @param tr Pointer to the Transport manager
* @param thermo Pointer to the ThermoPhase object * @param thermo Pointer to the ThermoPhase object
@ -121,9 +122,9 @@ public:
private: private:
//! Initialize an existing transport manager for solid phase //! Initialize an existing transport manager for solid phase
/*! /*!
* This routine sets up an existing solid-phase transport manager. * This routine sets up an existing solid-phase transport manager. It is
* It is similar to initTransport except that it uses the SolidTransportData * similar to initTransport except that it uses the SolidTransportData class
* class and calls setupSolidTransport(). * and calls setupSolidTransport().
* *
* @param tr Pointer to the Transport manager * @param tr Pointer to the Transport manager
* @param thermo Pointer to the ThermoPhase object * @param thermo Pointer to the ThermoPhase object
@ -135,34 +136,36 @@ private:
//! object allowed //! object allowed
static TransportFactory* s_factory; static TransportFactory* s_factory;
//! Static instance of the mutex used to ensure the proper reading of the transport database //! Static instance of the mutex used to ensure the proper reading of the
//! transport database
static std::mutex transport_mutex; static std::mutex transport_mutex;
//! The constructor is private; use static method factory() to //! The constructor is private; use static method factory() to
//! get a pointer to a factory instance //! get a pointer to a factory instance
/*! /*!
* The default constructor for this class sets up * The default constructor for this class sets up m_models[], a mapping
* m_models[], a mapping between the string name * between the string name for a transport model and the integer name.
* for a transport model and the integer name.
*/ */
TransportFactory(); TransportFactory();
//! Read transport property data from a file for a list of species that comprise //! Read transport property data from a file for a list of species that
//! the phase. //! comprise the phase.
/*! /*!
* Given a vector of pointers to species XML data bases * Given a vector of pointers to species XML data bases and a list of
* and a list of species names, this method constructs the LiquidTransport * species names, this method constructs the LiquidTransport Params object
* Params object containing the transport data for these species. * containing the transport data for these species.
* *
* It is an error to not find a "transport" XML element within each of the species * It is an error to not find a "transport" XML element within each of the
* XML elements listed in the names vector. * species XML elements listed in the names vector.
* *
* @param db Reference to a vector of XML_Node pointers containing the species XML * @param db Reference to a vector of XML_Node pointers containing the
* nodes. * species XML nodes.
* @param log Reference to an XML log file. (currently unused) * @param log Reference to an XML log file. (currently unused)
* @param names Vector of names of species. On output, tr will contain transport data * @param names Vector of names of species. On output, tr will contain
* for each of of these names in the order determined by this vector. * transport data for each of of these names in the order
* @param tr Reference to the LiquidTransportParams object that will contain the results. * determined by this vector.
* @param tr Reference to the LiquidTransportParams object that will
* contain the results.
*/ */
void getLiquidSpeciesTransportData(const std::vector<const XML_Node*> &db, void getLiquidSpeciesTransportData(const std::vector<const XML_Node*> &db,
XML_Node& log, const std::vector<std::string>& names, XML_Node& log, const std::vector<std::string>& names,
@ -170,18 +173,20 @@ private:
//! Read transport property data from a file for interactions between species. //! Read transport property data from a file for interactions between species.
/*! /*!
* Given the XML_Node database for transport interactions defined within the current phase * Given the XML_Node database for transport interactions defined within the
* and a list of species names within the phase, this method returns an * current phase and a list of species names within the phase, this method
* instance of TransportParams containing the transport data for * returns an instance of TransportParams containing the transport data for
* these species read from the file. * these species read from the file.
* *
* This routine reads interaction parameters between species within the phase. * This routine reads interaction parameters between species within the phase.
* *
* @param phaseTran_db Reference to the transport XML field for the phase * @param phaseTran_db Reference to the transport XML field for the phase
* @param log Reference to an XML log file. (currently unused) * @param log Reference to an XML log file. (currently unused)
* @param names Vector of names of species. On output, tr will contain transport data * @param names Vector of names of species. On output, tr will
* for each of of these names in the order determined by this vector. * contain transport data for each of of these names in
* @param tr Reference to the LiquidTransportParams object that will contain the results. * the order determined by this vector.
* @param tr Reference to the LiquidTransportParams object that
* will contain the results.
*/ */
void getLiquidInteractionsTransportData(const XML_Node& phaseTran_db, XML_Node& log, void getLiquidInteractionsTransportData(const XML_Node& phaseTran_db, XML_Node& log,
const std::vector<std::string>& names, LiquidTransportParams& tr); const std::vector<std::string>& names, LiquidTransportParams& tr);
@ -192,9 +197,10 @@ private:
* SolidTransportData object containing the transport data for the phase. * SolidTransportData object containing the transport data for the phase.
* *
* @param transportNode Reference to XML_Node containing the phase. * @param transportNode Reference to XML_Node containing the phase.
* @param log Reference to an XML log file. (currently unused) * @param log Reference to an XML log file. (currently unused)
* @param phaseName name of the corresponding phase * @param phaseName name of the corresponding phase
* @param tr Reference to the SolidTransportData object that will contain the results. * @param tr Reference to the SolidTransportData object that will
* contain the results.
*/ */
void getSolidTransportData(const XML_Node& transportNode, void getSolidTransportData(const XML_Node& transportNode,
XML_Node& log, XML_Node& log,
@ -204,17 +210,17 @@ private:
//! Prepare to build a new transport manager for liquids assuming that //! Prepare to build a new transport manager for liquids assuming that
//! viscosity transport data is provided in Arrhenius form. //! viscosity transport data is provided in Arrhenius form.
/*! /*!
* @param thermo Pointer to the ThermoPhase object * @param thermo Pointer to the ThermoPhase object
* @param log_level log level * @param log_level log level
* @param trParam LiquidTransportParams structure to be filled up with information * @param trParam LiquidTransportParams structure to be filled up with information
*/ */
void setupLiquidTransport(thermo_t* thermo, int log_level, LiquidTransportParams& trParam); void setupLiquidTransport(thermo_t* thermo, int log_level, LiquidTransportParams& trParam);
//! Prepare to build a new transport manager for solids //! Prepare to build a new transport manager for solids
/*! /*!
* @param thermo Pointer to the ThermoPhase object * @param thermo Pointer to the ThermoPhase object
* @param log_level log level * @param log_level log level
* @param trParam SolidTransportData structure to be filled up with information * @param trParam SolidTransportData structure to be filled up with information
*/ */
void setupSolidTransport(thermo_t* thermo, int log_level, SolidTransportData& trParam); void setupSolidTransport(thermo_t* thermo, int log_level, SolidTransportData& trParam);
@ -238,14 +244,15 @@ private:
std::map<std::string, LiquidTranMixingModel> m_LTImodelMap; std::map<std::string, LiquidTranMixingModel> m_LTImodelMap;
}; };
//! Create a new transport manager instance. //! Create a new transport manager instance.
/*! /*!
* @param transportModel String identifying the transport model to be * @param transportModel String identifying the transport model to be
* instantiated, defaults to the empty string * instantiated, defaults to the empty string
* @param thermo ThermoPhase object associated with the phase, defaults to null pointer * @param thermo ThermoPhase object associated with the phase, defaults
* @param loglevel int containing the Loglevel, defaults to zero * to null pointer
* @param f ptr to the TransportFactory object if it's been malloced. * @param loglevel int containing the Loglevel, defaults to zero
* @param ndim Number of dimensions for transport fluxes * @param f ptr to the TransportFactory object if it's been malloced.
* @param ndim Number of dimensions for transport fluxes
* *
* @ingroup tranprops * @ingroup tranprops
*/ */
@ -254,11 +261,10 @@ Transport* newTransportMgr(const std::string& transportModel = "", thermo_t* the
//! Create a new transport manager instance. //! Create a new transport manager instance.
/*! /*!
* @param thermo ThermoPhase object associated with the phase * @param thermo ThermoPhase object associated with the phase
* @param loglevel int containing the Loglevel, defaults to zero * @param loglevel int containing the Loglevel, defaults to zero
* @param f ptr to the TransportFactory object if it's been * @param f ptr to the TransportFactory object if it's been allocated
* allocated. * @returns a transport manager for the phase
* @return Returns a transport manager for the phase
* *
* @ingroup tranprops * @ingroup tranprops
*/ */

View file

@ -44,21 +44,19 @@ public:
return cWaterTransport; return cWaterTransport;
} }
//! Returns the viscosity of water at the current conditions //! Returns the viscosity of water at the current conditions (kg/m/s)
//! (kg/m/s)
/*! /*!
* This function calculates the value of the viscosity of pure * This function calculates the value of the viscosity of pure water at the
* water at the current T and P. * current T and P.
* *
* The formulas used are from the paper * The formulas used are from the paper: J. V. Sengers, J. T. R. Watson,
* "Improved International Formulations for the Viscosity and Thermal
* Conductivity of Water Substance", J. Phys. Chem. Ref. Data, 15, 1291
* (1986).
* *
* J. V. Sengers, J. T. R. Watson, "Improved International * The formulation is accurate for all temperatures and pressures, for steam
* Formulations for the Viscosity and Thermal Conductivity of * and for water, even near the critical point. Pressures above 500 MPa and
* Water Substance", J. Phys. Chem. Ref. Data, 15, 1291 (1986). * temperature above 900 C are suspect.
*
* The formulation is accurate for all temperatures and pressures,
* for steam and for water, even near the critical point.
* Pressures above 500 MPa and temperature above 900 C are suspect.
*/ */
virtual doublereal viscosity(); virtual doublereal viscosity();
@ -69,17 +67,17 @@ public:
//! Returns the thermal conductivity of water at the current conditions //! Returns the thermal conductivity of water at the current conditions
//! (W/m/K) //! (W/m/K)
/*! /*!
* This function calculates the value of the thermal conductivity of * This function calculates the value of the thermal conductivity of water
* water at the current T and P. * at the current T and P.
* *
* The formulas used are from the paper * The formulas used are from the paper: J. V. Sengers, J. T. R. Watson,
* J. V. Sengers, J. T. R. Watson, "Improved International * "Improved International Formulations for the Viscosity and Thermal
* Formulations for the Viscosity and Thermal Conductivity of * Conductivity of Water Substance", J. Phys. Chem. Ref. Data, 15, 1291
* Water Substance", J. Phys. Chem. Ref. Data, 15, 1291 (1986). * (1986).
* *
* The formulation is accurate for all temperatures and pressures, * The formulation is accurate for all temperatures and pressures, for steam
* for steam and for water, even near the critical point. * and for water, even near the critical point. Pressures above 500 MPa and
* Pressures above 500 MPa and temperature above 900 C are suspect. * temperature above 900 C are suspect.
*/ */
virtual doublereal thermalConductivity(); virtual doublereal thermalConductivity();
@ -97,8 +95,8 @@ private:
//! Pointer to the WaterProps object //! Pointer to the WaterProps object
/*! /*!
* This class is used to house several approximation * This class is used to house several approximation routines for properties
* routines for properties of water. * of water.
* *
* This object owns m_waterProps, and the WaterPropsIAPWS object used by * This object owns m_waterProps, and the WaterPropsIAPWS object used by
* WaterProps is m_sub, which is defined above. * WaterProps is m_sub, which is defined above.
@ -107,7 +105,7 @@ private:
//! Pressure dependent standard state object for water //! Pressure dependent standard state object for water
/*! /*!
* We assume that species 0 is water, with a PDSS_Water object. * We assume that species 0 is water, with a PDSS_Water object.
*/ */
PDSS_Water* m_waterPDSS; PDSS_Water* m_waterPDSS;
}; };

View file

@ -408,8 +408,8 @@ void GasTransport::setupMM()
// the effective well depth for (i,j) collisions // the effective well depth for (i,j) collisions
m_epsilon(i,j) = sqrt(m_eps[i]*m_eps[j]); m_epsilon(i,j) = sqrt(m_eps[i]*m_eps[j]);
// The polynomial fits of collision integrals vs. T* // The polynomial fits of collision integrals vs. T*
// will be done for the T* from tstar_min to tstar_max // will be done for the T* from tstar_min to tstar_max
tstar_min = std::min(tstar_min, Boltzmann * m_thermo->minTemp()/m_epsilon(i,j)); tstar_min = std::min(tstar_min, Boltzmann * m_thermo->minTemp()/m_epsilon(i,j));
tstar_max = std::max(tstar_max, Boltzmann * m_thermo->maxTemp()/m_epsilon(i,j)); tstar_max = std::max(tstar_max, Boltzmann * m_thermo->maxTemp()/m_epsilon(i,j));

View file

@ -23,8 +23,6 @@ using namespace std;
namespace Cantera namespace Cantera
{ {
//////////////////// class HighPressureGasTransport methods //////////////
HighPressureGasTransport::HighPressureGasTransport(thermo_t* thermo) HighPressureGasTransport::HighPressureGasTransport(thermo_t* thermo)
: MultiTransport(thermo) : MultiTransport(thermo)
{ {
@ -154,7 +152,7 @@ void HighPressureGasTransport::getBinaryDiffCoeffs(const size_t ld, doublereal*
for (size_t i = 0; i < nsp; i++) { for (size_t i = 0; i < nsp; i++) {
for (size_t j = 0; j < nsp; j++) { for (size_t j = 0; j < nsp; j++) {
// Add an offset to avoid a condition where x_i and x_j both equal // Add an offset to avoid a condition where x_i and x_j both equal
// zero (this would lead to Pr_ij = Inf): // zero (this would lead to Pr_ij = Inf):
doublereal x_i = std::max(Tiny, molefracs[i]); doublereal x_i = std::max(Tiny, molefracs[i]);
doublereal x_j = std::max(Tiny, molefracs[j]); doublereal x_j = std::max(Tiny, molefracs[j]);
@ -171,18 +169,18 @@ void HighPressureGasTransport::getBinaryDiffCoeffs(const size_t ld, doublereal*
P_corr_ij = 1; P_corr_ij = 1;
}else { }else {
// Otherwise, calculate the parameters for Takahashi correlation // Otherwise, calculate the parameters for Takahashi correlation
// by interpolating on Pr_ij: // by interpolating on Pr_ij:
P_corr_ij = setPcorr(Pr_ij, Tr_ij); P_corr_ij = setPcorr(Pr_ij, Tr_ij);
// If the reduced temperature is too low, the correction factor // If the reduced temperature is too low, the correction factor
// P_corr_ij will be < 0: // P_corr_ij will be < 0:
if (P_corr_ij<0) { if (P_corr_ij<0) {
P_corr_ij = Tiny; P_corr_ij = Tiny;
} }
} }
// Multiply the standard low-pressure binary diffusion coefficient // Multiply the standard low-pressure binary diffusion coefficient
// (m_bdiff) by the Takahashi correction factor P_corr_ij: // (m_bdiff) by the Takahashi correction factor P_corr_ij:
d[ld*j + i] = P_corr_ij*rp * m_bdiff(i,j); d[ld*j + i] = P_corr_ij*rp * m_bdiff(i,j);
} }
} }
@ -213,9 +211,8 @@ void HighPressureGasTransport::getMultiDiffCoeffs(const size_t ld, doublereal* c
update_T(); update_T();
// Evaluate the binary diffusion coefficients from the polynomial fits - // Evaluate the binary diffusion coefficients from the polynomial fits -
// this should perhaps be preceded by a check for changes in T, P, or C. // this should perhaps be preceded by a check for changes in T, P, or C.
//if (!m_bindiff_ok) {
updateDiff_T(); updateDiff_T();
//}
if (ld < m_nsp) { if (ld < m_nsp) {
throw CanteraError("HighPressureTransport::getMultiDiffCoeffs()", throw CanteraError("HighPressureTransport::getMultiDiffCoeffs()",
"ld is too small"); "ld is too small");

View file

@ -33,16 +33,15 @@ public:
* k = A T^(b) exp (-E_a / RT) * k = A T^(b) exp (-E_a / RT)
* \f] * \f]
* *
* @param node XML_Node to be read * @param node XML_Node to be read
* @param A Output pre-exponential factor. The units are variable. * @param A Output pre-exponential factor. The units are variable.
* @param b output temperature power * @param b output temperature power
* @param E Output activation energy in units of Kelvin * @param E Output activation energy in units of Kelvin
*/ */
static void getArrhenius(const XML_Node& node, static void getArrhenius(const XML_Node& node,
doublereal& A, doublereal& b, doublereal& E) doublereal& A, doublereal& b, doublereal& E)
{ {
/* parse the children for the A, b, and E components. // parse the children for the A, b, and E components.
*/
A = getFloat(node, "A", "toSI"); A = getFloat(node, "A", "toSI");
b = getFloat(node, "b"); b = getFloat(node, "b");
E = getFloat(node, "E", "actEnergy"); E = getFloat(node, "E", "actEnergy");

View file

@ -212,13 +212,13 @@ LiquidTransport::~LiquidTransport()
bool LiquidTransport::initLiquid(LiquidTransportParams& tr) bool LiquidTransport::initLiquid(LiquidTransportParams& tr)
{ {
// Transfer quantitities from the database to the Transport object // Transfer quantitities from the database to the Transport object
m_thermo = tr.thermo; m_thermo = tr.thermo;
m_velocityBasis = tr.velocityBasis_; m_velocityBasis = tr.velocityBasis_;
m_nsp = m_thermo->nSpecies(); m_nsp = m_thermo->nSpecies();
m_nsp2 = m_nsp*m_nsp; m_nsp2 = m_nsp*m_nsp;
// Resize the local storage according to the number of species // Resize the local storage according to the number of species
m_mw.resize(m_nsp, 0.0); m_mw.resize(m_nsp, 0.0);
m_viscSpecies.resize(m_nsp, 0.0); m_viscSpecies.resize(m_nsp, 0.0);
m_viscTempDep_Ns.resize(m_nsp, 0); m_viscTempDep_Ns.resize(m_nsp, 0);
@ -246,9 +246,9 @@ bool LiquidTransport::initLiquid(LiquidTransportParams& tr)
// Make a local copy of the molecular weights // Make a local copy of the molecular weights
copy(m_thermo->molecularWeights().begin(), m_thermo->molecularWeights().end(), m_mw.begin()); copy(m_thermo->molecularWeights().begin(), m_thermo->molecularWeights().end(), m_mw.begin());
// First populate mixing rules and indices // First populate mixing rules and indices (NOTE, we transfer pointers of
// (NOTE, we transfer pointers of malloced quantities. We zero out pointers so that // malloced quantities. We zero out pointers so that we only have one copy
// we only have one copy of the malloced quantity) // of the malloced quantity)
for (size_t k = 0; k < m_nsp; k++) { for (size_t k = 0; k < m_nsp; k++) {
m_selfDiffMixModel[k] = tr.selfDiffusion[k]; m_selfDiffMixModel[k] = tr.selfDiffusion[k];
tr.selfDiffusion[k] = 0; tr.selfDiffusion[k] = 0;
@ -279,13 +279,10 @@ bool LiquidTransport::initLiquid(LiquidTransportParams& tr)
ltd.hydroRadius = 0; ltd.hydroRadius = 0;
} }
/* // Get the input Species Diffusivities. Note that species diffusivities are
* Get the input Species Diffusivities // not what is needed. Rather the Stefan Boltzmann interaction parameters
* Note that species diffusivities are not what is needed. // are needed for the current model. This section may, therefore, be
* Rather the Stefan Boltzmann interaction parameters are // extraneous.
* needed for the current model. This section may, therefore,
* be extraneous.
*/
m_diffTempDep_Ns.resize(m_nsp, 0); m_diffTempDep_Ns.resize(m_nsp, 0);
//for each species, assign viscosity model and coefficients //for each species, assign viscosity model and coefficients
for (size_t k = 0; k < m_nsp; k++) { for (size_t k = 0; k < m_nsp; k++) {
@ -303,13 +300,11 @@ bool LiquidTransport::initLiquid(LiquidTransportParams& tr)
} }
} }
/* // Here we get interaction parameters from LiquidTransportParams that were
* Here we get interaction parameters from LiquidTransportParams // filled in TransportFactory::getLiquidInteractionsTransportData
* that were filled in TransportFactory::getLiquidInteractionsTransportData // Interaction models are provided here for viscosity, thermal conductivity,
* Interaction models are provided here for viscosity, thermal conductivity, // species diffusivity and hydrodynamics radius (perhaps not needed in the
* species diffusivity and hydrodynamics radius (perhaps not needed in the // present class).
* present class).
*/
m_viscMixModel = tr.viscosity; m_viscMixModel = tr.viscosity;
tr.viscosity = 0; tr.viscosity = 0;
@ -328,8 +323,7 @@ bool LiquidTransport::initLiquid(LiquidTransportParams& tr)
m_bdiff.resize(m_nsp,m_nsp, 0.0); m_bdiff.resize(m_nsp,m_nsp, 0.0);
//Don't really need to update this here. // Don't really need to update this here. It is updated in updateDiff_T()
//It is updated in updateDiff_T()
m_diffMixModel->getMatrixTransProp(m_bdiff); m_diffMixModel->getMatrixTransProp(m_bdiff);
m_mode = tr.mode_; m_mode = tr.mode_;
@ -736,7 +730,6 @@ bool LiquidTransport::update_T()
// temperature has changed, so polynomial temperature // temperature has changed, so polynomial temperature
// interpolations will need to be reevaluated. // interpolations will need to be reevaluated.
// This means that many concentration
m_visc_conc_ok = false; m_visc_conc_ok = false;
m_ionCond_conc_ok = false; m_ionCond_conc_ok = false;
m_mobRat_conc_ok = false; m_mobRat_conc_ok = false;
@ -754,8 +747,7 @@ bool LiquidTransport::update_T()
bool LiquidTransport::update_C() bool LiquidTransport::update_C()
{ {
// If the pressure has changed then the concentrations // If the pressure has changed then the concentrations have changed.
// have changed.
doublereal pres = m_thermo->pressure(); doublereal pres = m_thermo->pressure();
bool qReturn = true; bool qReturn = true;
if (pres != m_press) { if (pres != m_press) {
@ -785,9 +777,8 @@ bool LiquidTransport::update_C()
return false; return false;
} }
// signal that concentration-dependent quantities will need to // signal that concentration-dependent quantities will need to be recomputed
// be recomputed before use, and update the local mole // before use, and update the local mole fractions.
// fractions.
m_visc_conc_ok = false; m_visc_conc_ok = false;
m_ionCond_conc_ok = false; m_ionCond_conc_ok = false;
m_mobRat_conc_ok = false; m_mobRat_conc_ok = false;
@ -923,9 +914,8 @@ void LiquidTransport::stefan_maxwell_solve()
//! grad a local copy of the ion molar volume (inverse total ion concentration) //! grad a local copy of the ion molar volume (inverse total ion concentration)
const doublereal vol = m_thermo->molarVolume(); const doublereal vol = m_thermo->molarVolume();
/* //! Update the temperature, concentrations and diffusion coefficients in the
* Update the temperature, concentrations and diffusion coefficients in the mixture. //! mixture.
*/
update_T(); update_T();
update_C(); update_C();
if (!m_diff_temp_ok) { if (!m_diff_temp_ok) {
@ -981,16 +971,14 @@ void LiquidTransport::stefan_maxwell_solve()
} }
} }
/* // Just for Note, m_A(i,j) refers to the ith row and jth column.
* Just for Note, m_A(i,j) refers to the ith row and jth column. // They are still fortran ordered, so that i varies fastest.
* They are still fortran ordered, so that i varies fastest.
*/
double condSum1; double condSum1;
const doublereal invRT = 1.0 / (GasConstant * T); const doublereal invRT = 1.0 / (GasConstant * T);
switch (m_nDim) { switch (m_nDim) {
case 1: /* 1-D approximation */ case 1: // 1-D approximation
m_B(0,0) = 0.0; m_B(0,0) = 0.0;
//equation for the reference velocity // equation for the reference velocity
for (size_t j = 0; j < m_nsp; j++) { for (size_t j = 0; j < m_nsp; j++) {
if (m_velocityBasis == VB_MOLEAVG) { if (m_velocityBasis == VB_MOLEAVG) {
m_A(0,j) = m_molefracs_tran[j]; m_A(0,j) = m_molefracs_tran[j];
@ -1021,14 +1009,14 @@ void LiquidTransport::stefan_maxwell_solve()
} }
} }
//! invert and solve the system Ax = b. Answer is in m_B // invert and solve the system Ax = b. Answer is in m_B
solve(m_A, m_B); solve(m_A, m_B);
condSum1 = 0; condSum1 = 0;
for (size_t i = 0; i < m_nsp; i++) { for (size_t i = 0; i < m_nsp; i++) {
condSum1 -= Faraday*m_chargeSpecies[i]*m_B(i,0)*m_molefracs_tran[i]/vol; condSum1 -= Faraday*m_chargeSpecies[i]*m_B(i,0)*m_molefracs_tran[i]/vol;
} }
break; break;
case 2: /* 2-D approximation */ case 2: // 2-D approximation
m_B(0,0) = 0.0; m_B(0,0) = 0.0;
m_B(0,1) = 0.0; m_B(0,1) = 0.0;
//equation for the reference velocity //equation for the reference velocity
@ -1063,14 +1051,14 @@ void LiquidTransport::stefan_maxwell_solve()
} }
} }
//! invert and solve the system Ax = b. Answer is in m_B // invert and solve the system Ax = b. Answer is in m_B
solve(m_A, m_B); solve(m_A, m_B);
break; break;
case 3: /* 3-D approximation */ case 3: // 3-D approximation
m_B(0,0) = 0.0; m_B(0,0) = 0.0;
m_B(0,1) = 0.0; m_B(0,1) = 0.0;
m_B(0,2) = 0.0; m_B(0,2) = 0.0;
//equation for the reference velocity // equation for the reference velocity
for (size_t j = 0; j < m_nsp; j++) { for (size_t j = 0; j < m_nsp; j++) {
if (m_velocityBasis == VB_MOLEAVG) { if (m_velocityBasis == VB_MOLEAVG) {
m_A(0,j) = m_molefracs_tran[j]; m_A(0,j) = m_molefracs_tran[j];
@ -1103,7 +1091,7 @@ void LiquidTransport::stefan_maxwell_solve()
} }
} }
//! invert and solve the system Ax = b. Answer is in m_B // invert and solve the system Ax = b. Answer is in m_B
solve(m_A, m_B); solve(m_A, m_B);
break; break;
default: default:

View file

@ -14,9 +14,9 @@ namespace Cantera
//! Calculation of Collision integrals //! Calculation of Collision integrals
/*! /*!
* This class provides functions that * This class provides functions that interpolate the tabulated collision
* interpolate the tabulated collision integrals in Monchick and * integrals in Monchick and Mason, "Transport Properties of Polar Gases," J.
* Mason, "Transport Properties of Polar Gases," J. Chem. Phys. (1961) * Chem. Phys. (1961)
* *
* @ingroup tranprops * @ingroup tranprops
*/ */
@ -60,10 +60,7 @@ private:
//! Table of omega22 values from MM //! Table of omega22 values from MM
static doublereal omega22_table[37*8]; static doublereal omega22_table[37*8];
//! tstar //! table of tstar values
/*!
* table of tstar values
*/
static doublereal tstar[39]; static doublereal tstar[39];
//! astar table from MM //! astar table from MM

View file

@ -139,9 +139,8 @@ void MixTransport::update_T()
void MixTransport::update_C() void MixTransport::update_C()
{ {
// signal that concentration-dependent quantities will need to // signal that concentration-dependent quantities will need to be recomputed
// be recomputed before use, and update the local mole // before use, and update the local mole fractions.
// fractions.
m_visc_ok = false; m_visc_ok = false;
m_condmix_ok = false; m_condmix_ok = false;
m_thermo->getMoleFractions(m_molefracs.data()); m_thermo->getMoleFractions(m_molefracs.data());

View file

@ -19,10 +19,10 @@ namespace Cantera
///////////////////// helper functions ///////////////////////// ///////////////////// helper functions /////////////////////////
/** /**
* The Parker temperature correction to the rotational collision number. * The Parker temperature correction to the rotational collision number.
* *
* @param tr Reduced temperature \f$ \epsilon/kT \f$ * @param tr Reduced temperature \f$ \epsilon/kT \f$
* @param sqtr square root of tr. * @param sqtr square root of tr.
*/ */
inline doublereal Frot(doublereal tr, doublereal sqtr) inline doublereal Frot(doublereal tr, doublereal sqtr)
{ {
@ -116,28 +116,24 @@ void MultiTransport::solveLMatrixEquation()
return; return;
} }
// Copy the mole fractions twice into the last two blocks of // Copy the mole fractions twice into the last two blocks of the right-hand-
// the right-hand-side vector m_b. The first block of m_b was // side vector m_b. The first block of m_b was set to zero when it was
// set to zero when it was created, and is not modified so // created, and is not modified so doesn't need to be reset to zero.
// doesn't need to be reset to zero.
for (size_t k = 0; k < m_nsp; k++) { for (size_t k = 0; k < m_nsp; k++) {
m_b[k] = 0.0; m_b[k] = 0.0;
m_b[k + m_nsp] = m_molefracs[k]; m_b[k + m_nsp] = m_molefracs[k];
m_b[k + 2*m_nsp] = m_molefracs[k]; m_b[k + 2*m_nsp] = m_molefracs[k];
} }
// Set the right-hand side vector to zero in the 3rd block for // Set the right-hand side vector to zero in the 3rd block for all species
// all species with no internal energy modes. The // with no internal energy modes. The corresponding third-block rows and
// corresponding third-block rows and columns will be set to // columns will be set to zero, except on the diagonal of L01,01, where they
// zero, except on the diagonal of L01,01, where they are set // are set to 1.0. This has the effect of eliminating these equations from
// to 1.0. This has the effect of eliminating these equations // the system, since the equation becomes: m_a[2*m_nsp + k] = 0.0.
// from the system, since the equation becomes: m_a[2*m_nsp +
// k] = 0.0.
// Note that this differs from the Chemkin procedure, where // Note that this differs from the Chemkin procedure, where all *monatomic*
// all *monatomic* species are excluded. Since monatomic // species are excluded. Since monatomic radicals can have non-zero internal
// radicals can have non-zero internal heat capacities due to // heat capacities due to electronic excitation, they should be retained.
// electronic excitation, they should be retained.
for (size_t k = 0; k < m_nsp; k++) { for (size_t k = 0; k < m_nsp; k++) {
if (!hasInternalModes(k)) { if (!hasInternalModes(k)) {
m_b[2*m_nsp + k] = 0.0; m_b[2*m_nsp + k] = 0.0;
@ -158,9 +154,8 @@ void MultiTransport::solveLMatrixEquation()
eval_L0110(); eval_L0110();
eval_L0101(m_molefracs.data()); eval_L0101(m_molefracs.data());
// Solve it using GMRES or LU decomposition. The last solution // Solve it using GMRES or LU decomposition. The last solution in m_a should
// in m_a should provide a good starting guess, so convergence // provide a good starting guess, so convergence should be fast.
// should be fast.
copy(m_b.begin(), m_b.end(), m_a.begin()); copy(m_b.begin(), m_b.end(), m_a.begin());
try { try {
solve(m_Lmatrix, m_a.data()); solve(m_Lmatrix, m_a.data());
@ -252,9 +247,8 @@ void MultiTransport::getSpeciesFluxes(size_t ndim, const doublereal* const grad_
size_t offset; size_t offset;
doublereal pp = pressure_ig(); doublereal pp = pressure_ig();
// multiply diffusion velocities by rho * V to create // multiply diffusion velocities by rho * V to create mass fluxes, and
// mass fluxes, and restore the gradx elements that were // restore the gradx elements that were modified
// modified
for (size_t n = 0; n < ndim; n++) { for (size_t n = 0; n < ndim; n++) {
offset = n*ldf; offset = n*ldf;
for (size_t i = 0; i < m_nsp; i++) { for (size_t i = 0; i < m_nsp; i++) {
@ -323,9 +317,9 @@ void MultiTransport::getMassFluxes(const doublereal* state1, const doublereal* s
m_aa(i,i) -= sum; m_aa(i,i) -= sum;
} }
// enforce the condition \sum Y_k V_k = 0. This is done by // enforce the condition \sum Y_k V_k = 0. This is done by replacing the
// replacing the flux equation with the largest gradx // flux equation with the largest gradx component with the flux balance
// component with the flux balance condition. // condition.
size_t jmax = 0; size_t jmax = 0;
doublereal gradmax = -1.0; doublereal gradmax = -1.0;
for (size_t j = 0; j < m_nsp; j++) { for (size_t j = 0; j < m_nsp; j++) {
@ -530,8 +524,8 @@ void MultiTransport::eval_L0000(const doublereal* const x)
doublereal prefactor = 16.0*m_temp/25.0; doublereal prefactor = 16.0*m_temp/25.0;
doublereal sum; doublereal sum;
for (size_t i = 0; i < m_nsp; i++) { for (size_t i = 0; i < m_nsp; i++) {
// subtract-off the k=i term to account for the first delta // subtract-off the k=i term to account for the first delta
// function in Eq. (12.121) // function in Eq. (12.121)
sum = -x[i]/m_bdiff(i,i); sum = -x[i]/m_bdiff(i,i);
for (size_t k = 0; k < m_nsp; k++) { for (size_t k = 0; k < m_nsp; k++) {
sum += x[k]/m_bdiff(i,k); sum += x[k]/m_bdiff(i,k);
@ -560,8 +554,8 @@ void MultiTransport::eval_L0010(const doublereal* const x)
(1.2 * m_cstar(j,i) - 1.0) / (1.2 * m_cstar(j,i) - 1.0) /
((wj + m_mw[i]) * m_bdiff(j,i)); ((wj + m_mw[i]) * m_bdiff(j,i));
// the next term is independent of "j"; // the next term is independent of "j";
// need to do it for the "j,j" term // need to do it for the "j,j" term
sum -= m_Lmatrix(i,j+m_nsp); sum -= m_Lmatrix(i,j+m_nsp);
} }
m_Lmatrix(j,j+m_nsp) += sum; m_Lmatrix(j,j+m_nsp) += sum;
@ -622,12 +616,12 @@ void MultiTransport::eval_L1001(const doublereal* x)
size_t n2 = 2*m_nsp; size_t n2 = 2*m_nsp;
int npoly = 0; int npoly = 0;
for (size_t j = 0; j < m_nsp; j++) { for (size_t j = 0; j < m_nsp; j++) {
// collect terms that depend only on "j" // collect terms that depend only on "j"
if (hasInternalModes(j)) { if (hasInternalModes(j)) {
constant = prefactor*m_mw[j]*x[j]*m_crot[j]/(m_cinternal[j]*m_rotrelax[j]); constant = prefactor*m_mw[j]*x[j]*m_crot[j]/(m_cinternal[j]*m_rotrelax[j]);
sum = 0.0; sum = 0.0;
for (size_t i = 0; i < m_nsp; i++) { for (size_t i = 0; i < m_nsp; i++) {
// see Eq. (12.127) // see Eq. (12.127)
m_Lmatrix(i+m_nsp,j+n2) = constant * m_astar(j,i) * x[i] / m_Lmatrix(i+m_nsp,j+n2) = constant * m_astar(j,i) * x[i] /
((m_mw[j] + m_mw[i]) * m_bdiff(j,i)); ((m_mw[j] + m_mw[i]) * m_bdiff(j,i));
sum += m_Lmatrix(i+m_nsp,j+n2); sum += m_Lmatrix(i+m_nsp,j+n2);
@ -681,20 +675,20 @@ void MultiTransport::eval_L0101(const doublereal* x)
doublereal constant1, constant2, diff_int, sum; doublereal constant1, constant2, diff_int, sum;
for (size_t i = 0; i < m_nsp; i++) { for (size_t i = 0; i < m_nsp; i++) {
if (hasInternalModes(i)) { if (hasInternalModes(i)) {
// collect terms that depend only on "i" // collect terms that depend only on "i"
constant1 = prefactor*x[i]/m_cinternal[i]; constant1 = prefactor*x[i]/m_cinternal[i];
constant2 = 12.00*m_mw[i]*m_crot[i] / constant2 = 12.00*m_mw[i]*m_crot[i] /
(fivepi*m_cinternal[i]*m_rotrelax[i]); (fivepi*m_cinternal[i]*m_rotrelax[i]);
sum = 0.0; sum = 0.0;
for (size_t k = 0; k < m_nsp; k++) { for (size_t k = 0; k < m_nsp; k++) {
// see Eq. (12.131) // see Eq. (12.131)
diff_int = m_bdiff(i,k); diff_int = m_bdiff(i,k);
m_Lmatrix(k+n2,i+n2) = 0.0; m_Lmatrix(k+n2,i+n2) = 0.0;
sum += x[k]/diff_int; sum += x[k]/diff_int;
if (k != i) sum += x[k]*m_astar(i,k)*constant2 / if (k != i) sum += x[k]*m_astar(i,k)*constant2 /
(m_mw[k]*diff_int); (m_mw[k]*diff_int);
} }
// see Eq. (12.130) // see Eq. (12.130)
m_Lmatrix(i+n2,i+n2) = m_Lmatrix(i+n2,i+n2) =
- eightoverpi*m_mw[i]*x[i]*x[i]*m_crot[i] / - eightoverpi*m_mw[i]*x[i]*x[i]*m_crot[i] /
(m_cinternal[i]*m_cinternal[i]*GasConstant*m_visc[i]*m_rotrelax[i]) (m_cinternal[i]*m_cinternal[i]*GasConstant*m_visc[i]*m_rotrelax[i])

View file

@ -52,10 +52,8 @@ SimpleTransport::SimpleTransport(const SimpleTransport& right) :
m_cond_mix_ok(false), m_cond_mix_ok(false),
m_nDim(1) m_nDim(1)
{ {
/* // Use the assignment operator to do the brunt of the work for the copy
* Use the assignment operator to do the brunt // constructor.
* of the work for the copy constructor.
*/
*this = right; *this = right;
} }
@ -157,10 +155,8 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr)
m_thermo = tr.thermo; m_thermo = tr.thermo;
m_nsp = m_thermo->nSpecies(); m_nsp = m_thermo->nSpecies();
/* // Read the transport block in the phase XML Node
* Read the transport block in the phase XML Node // It's not an error if this block doesn't exist. Just use the defaults
* It's not an error if this block doesn't exist. Just use the defaults
*/
XML_Node& phaseNode = m_thermo->xml(); XML_Node& phaseNode = m_thermo->xml();
if (phaseNode.hasChild("transport")) { if (phaseNode.hasChild("transport")) {
XML_Node& transportNode = phaseNode.child("transport"); XML_Node& transportNode = phaseNode.child("transport");
@ -177,9 +173,7 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr)
m_mw.resize(m_nsp); m_mw.resize(m_nsp);
copy(m_thermo->molecularWeights().begin(), m_thermo->molecularWeights().end(), m_mw.begin()); copy(m_thermo->molecularWeights().begin(), m_thermo->molecularWeights().end(), m_mw.begin());
/* // Get the input Viscosities
* Get the input Viscosities
*/
m_viscSpecies.resize(m_nsp); m_viscSpecies.resize(m_nsp);
m_coeffVisc_Ns.clear(); m_coeffVisc_Ns.clear();
m_coeffVisc_Ns.resize(m_nsp); m_coeffVisc_Ns.resize(m_nsp);
@ -191,9 +185,7 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr)
ltd.viscosity = 0; ltd.viscosity = 0;
} }
/* // Get the input thermal conductivities
* Get the input thermal conductivities
*/
m_condSpecies.resize(m_nsp); m_condSpecies.resize(m_nsp);
m_coeffLambda_Ns.clear(); m_coeffLambda_Ns.clear();
m_coeffLambda_Ns.resize(m_nsp); m_coeffLambda_Ns.resize(m_nsp);
@ -204,9 +196,7 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr)
ltd.thermalCond = 0; ltd.thermalCond = 0;
} }
/* // Get the input species diffusivities
* Get the input species diffusivities
*/
useHydroRadius_ = false; useHydroRadius_ = false;
m_diffSpecies.resize(m_nsp); m_diffSpecies.resize(m_nsp);
m_coeffDiff_Ns.clear(); m_coeffDiff_Ns.clear();
@ -528,8 +518,7 @@ void SimpleTransport::getMixDiffCoeffs(doublereal* const d)
bool SimpleTransport::update_C() bool SimpleTransport::update_C()
{ {
// If the pressure has changed then the concentrations // If the pressure has changed then the concentrations have changed.
// have changed.
doublereal pres = m_thermo->pressure(); doublereal pres = m_thermo->pressure();
bool qReturn = true; bool qReturn = true;
if (pres != m_press) { if (pres != m_press) {
@ -622,9 +611,8 @@ bool SimpleTransport::update_T()
// Compute various functions of temperature // Compute various functions of temperature
m_temp = t; m_temp = t;
// temperature has changed, so polynomial temperature // temperature has changed, so polynomial temperature interpolations will
// interpolations will need to be reevaluated. // need to be reevaluated. Set all of these flags to false
// Set all of these flags to false
m_visc_mix_ok = false; m_visc_mix_ok = false;
m_visc_temp_ok = false; m_visc_temp_ok = false;
m_cond_temp_ok = false; m_cond_temp_ok = false;

View file

@ -28,10 +28,8 @@ SolidTransport::SolidTransport(const SolidTransport& right) :
m_Nlam(0), m_Nlam(0),
m_Elam(0) m_Elam(0)
{ {
/* // Use the assignment operator to do the brunt of the work for the copy
* Use the assignment operator to do the brunt // constructor.
* of the work for the copy constructor.
*/
*this = right; *this = right;
} }

View file

@ -1,8 +1,4 @@
/** //! @file TransportFactory.cpp Implementation file for class TransportFactory.
* @file TransportFactory.cpp
*
* Implementation file for class TransportFactory.
*/
// known transport models // known transport models
#include "cantera/transport/MultiTransport.h" #include "cantera/transport/MultiTransport.h"
@ -290,9 +286,8 @@ void TransportFactory::setupLiquidTransport(thermo_t* thermo, int log_level,
// Note that getLiquidSpeciesTransportData just populates the pure species transport data. // Note that getLiquidSpeciesTransportData just populates the pure species transport data.
getLiquidSpeciesTransportData(species_database, log, trParam.thermo->speciesNames(), trParam); getLiquidSpeciesTransportData(species_database, log, trParam.thermo->speciesNames(), trParam);
// getLiquidInteractionsTransportData() populates the // getLiquidInteractionsTransportData() populates the species-species
// species-species interaction models parameters // interaction models parameters like visc_Eij
// like visc_Eij
if (phase_database->hasChild("transport")) { if (phase_database->hasChild("transport")) {
XML_Node& transportNode = phase_database->child("transport"); XML_Node& transportNode = phase_database->child("transport");
getLiquidInteractionsTransportData(transportNode, log, trParam.thermo->speciesNames(), trParam); getLiquidInteractionsTransportData(transportNode, log, trParam.thermo->speciesNames(), trParam);
@ -319,9 +314,8 @@ void TransportFactory::setupSolidTransport(thermo_t* thermo, int log_level,
XML_Node root, log; XML_Node root, log;
// getSolidTransportData() populates the // getSolidTransportData() populates the phase transport models like
// phase transport models like electronic conductivity // electronic conductivity thermal conductivity, interstitial diffusion
// thermal conductivity, interstitial diffusion
if (phase_database->hasChild("transport")) { if (phase_database->hasChild("transport")) {
XML_Node& transportNode = phase_database->child("transport"); XML_Node& transportNode = phase_database->child("transport");
getSolidTransportData(transportNode, log, thermo->name(), trParam); getSolidTransportData(transportNode, log, thermo->name(), trParam);
@ -354,9 +348,8 @@ void TransportFactory::getLiquidSpeciesTransportData(const std::vector<const XML
LiquidTransportParams& trParam) LiquidTransportParams& trParam)
{ {
std::string name; std::string name;
/*
Create a map of species names versus liquid transport data parameters // Create a map of species names versus liquid transport data parameters
*/
std::map<std::string, LiquidTransportData> datatable; std::map<std::string, LiquidTransportData> datatable;
// Store the number of species in the phase // Store the number of species in the phase
@ -365,16 +358,16 @@ void TransportFactory::getLiquidSpeciesTransportData(const std::vector<const XML
// Store the number of off-diagonal symmetric interactions between species in the phase // Store the number of off-diagonal symmetric interactions between species in the phase
size_t nBinInt = nsp*(nsp-1)/2; size_t nBinInt = nsp*(nsp-1)/2;
// read all entries in database into 'datatable' and check for // read all entries in database into 'datatable' and check for errors. Note
// errors. Note that this procedure validates all entries, not // that this procedure validates all entries, not only those for the species
// only those for the species listed in 'names'. // listed in 'names'.
for (size_t i = 0; i < nsp; i++) { for (size_t i = 0; i < nsp; i++) {
const XML_Node& sp = *xspecies[i]; const XML_Node& sp = *xspecies[i];
name = sp["name"]; name = sp["name"];
vector_fp vCoeff; vector_fp vCoeff;
// Species with no 'transport' child are skipped. However, if that species is in the list, // Species with no 'transport' child are skipped. However, if that
// it will throw an exception below. // species is in the list, it will throw an exception below.
try { try {
if (sp.hasChild("transport")) { if (sp.hasChild("transport")) {
XML_Node& trNode = sp.child("transport"); XML_Node& trNode = sp.child("transport");
@ -457,32 +450,28 @@ void TransportFactory::getLiquidSpeciesTransportData(const std::vector<const XML
trParam.LTData.clear(); trParam.LTData.clear();
for (size_t i = 0; i < trParam.nsp_; i++) { for (size_t i = 0; i < trParam.nsp_; i++) {
/* // Check to see that we have a LiquidTransportData object for all of the
Check to see that we have a LiquidTransportData object for all of the // species in the phase. If not, throw an error.
species in the phase. If not, throw an error.
*/
auto it = datatable.find(names[i]); auto it = datatable.find(names[i]);
if (it == datatable.end()) { if (it == datatable.end()) {
throw TransportDBError(0,"No transport data found for species " + names[i]); throw TransportDBError(0,"No transport data found for species " + names[i]);
} }
LiquidTransportData& trdat = it->second; LiquidTransportData& trdat = it->second;
/* // Now, transfer these objects into LTData in the correct phase index
Now, transfer these objects into LTData in the correct phase index order by // order by calling the default copy constructor for
calling the default copy constructor for LiquidTransportData. // LiquidTransportData.
*/
trParam.LTData.push_back(trdat); trParam.LTData.push_back(trdat);
} }
} }
/* /*
Read transport property data from a file for interactions * Read transport property data from a file for interactions between species in
between species in a liquid. * a liquid. Given the name of a file containing transport property parameters
Given the name of a file containing transport property * and a list of species names, this method returns an instance of
parameters and a list of species names, this method returns an * TransportParams containing the transport data for these species read from the
instance of TransportParams containing the transport data for * file.
these species read from the file. */
*/
void TransportFactory::getLiquidInteractionsTransportData(const XML_Node& transportNode, void TransportFactory::getLiquidInteractionsTransportData(const XML_Node& transportNode,
XML_Node& log, XML_Node& log,
const std::vector<std::string> &names, const std::vector<std::string> &names,