From 0c8bf1fd081ecf72ef89c675862bbc95b3dd7b7e Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 10 Nov 2015 17:23:57 -0500 Subject: [PATCH] Clean up Doxygen docs and comments for Transport classes --- include/cantera/transport/DustyGasTransport.h | 225 ++-- include/cantera/transport/GasTransport.h | 121 ++- .../transport/HighPressureGasTransport.h | 8 +- include/cantera/transport/LTPspecies.h | 298 ++---- .../cantera/transport/LiquidTranInteraction.h | 45 +- include/cantera/transport/LiquidTransport.h | 984 ++++++++---------- .../cantera/transport/LiquidTransportData.h | 30 +- .../cantera/transport/LiquidTransportParams.h | 23 +- include/cantera/transport/MixTransport.h | 121 ++- include/cantera/transport/MultiTransport.h | 54 +- include/cantera/transport/SimpleTransport.h | 495 +++++---- include/cantera/transport/SolidTransport.h | 49 +- .../cantera/transport/SolidTransportData.h | 30 +- include/cantera/transport/Tortuosity.h | 95 +- include/cantera/transport/TransportBase.h | 421 ++++---- include/cantera/transport/TransportFactory.h | 138 +-- include/cantera/transport/WaterTransport.h | 46 +- src/transport/GasTransport.cpp | 4 +- src/transport/HighPressureGasTransport.cpp | 13 +- src/transport/LTPspecies.cpp | 11 +- src/transport/LiquidTransport.cpp | 72 +- src/transport/MMCollisionInt.h | 11 +- src/transport/MixTransport.cpp | 5 +- src/transport/MultiTransport.cpp | 66 +- src/transport/SimpleTransport.cpp | 32 +- src/transport/SolidTransport.cpp | 6 +- src/transport/TransportFactory.cpp | 57 +- 27 files changed, 1553 insertions(+), 1907 deletions(-) diff --git a/include/cantera/transport/DustyGasTransport.h b/include/cantera/transport/DustyGasTransport.h index 40ee1d8d2..64d4e66e0 100644 --- a/include/cantera/transport/DustyGasTransport.h +++ b/include/cantera/transport/DustyGasTransport.h @@ -1,8 +1,8 @@ /** - * @file DustyGasTransport.h - * Headers for the DustyGasTransport object, which models transport properties - * in porous media using the dusty gas approximation - * (see \ref tranprops and \link Cantera::DustyGasTransport DustyGasTransport \endlink) . + * @file DustyGasTransport.h Headers for the DustyGasTransport object, which + * models transport properties in porous media using the dusty gas + * approximation (see \ref tranprops and \link Cantera::DustyGasTransport + * DustyGasTransport \endlink) . */ // Copyright 2003 California Institute of Technology @@ -18,45 +18,44 @@ namespace Cantera { //! Class DustyGasTransport implements the Dusty Gas model for transport in porous media. /*! - * As implemented here, only species transport is handled. The viscosity, - * thermal conductivity, and thermal diffusion coefficients are not - * implemented. + * As implemented here, only species transport is handled. The viscosity, + * thermal conductivity, and thermal diffusion coefficients are not implemented. * - * The dusty gas model includes the effects of Darcy's law. There is a net - * flux of species due to a pressure gradient that is part of Darcy's law. + * The dusty gas model includes the effects of Darcy's law. There is a net flux + * 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 - * \f$, \f$ J_k \f$ by the following formula. + * The dusty gas model expresses the value of the molar flux of species + * \f$ k \f$, \f$ J_k \f$ by the following formula. * - * \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}} = - * - \nabla C_k - \frac{C_k}{\mathcal{D}^{e}_{k,knud}} \frac{\kappa}{\mu} \nabla p - * \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}} = + * - \nabla C_k - \frac{C_k}{\mathcal{D}^{e}_{k,knud}} \frac{\kappa}{\mu} \nabla p + * \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[ - * \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[ + * \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] * - * The effective knudsen diffusion coefficients take into account the effects of collisions of gas-phase - * molecules with the wall. + * The effective knudsen diffusion coefficients take into account the effects of + * 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 - * 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). - * - * (3) E. A. Mason, A. P. Malinauskas," Gas Transport in Porous Media: the Dusty-Gas Model", - * American Elsevier, New York (1983). - * - * (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 chemical reaction in porous media," - * Chemical Engineering Journal, 57, 115 - 125 (1995). + * 1. H. Zhu, R. J. Kee, "Modeling Electrochemical Impedance Spectra in SOFC + * 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). + * 3. E. A. Mason, A. P. Malinauskas," Gas Transport in Porous Media: the Dusty- + * Gas Model", American Elsevier, New York (1983). + * 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 + * chemical reaction in porous media," Chemical Engineering Journal, 57, 115 + * - 125 (1995). * @ingroup tranprops */ class DustyGasTransport : public Transport @@ -64,7 +63,8 @@ class DustyGasTransport : public Transport public: //! 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); @@ -72,9 +72,10 @@ public: //! Assignment operator /*! - * Warning -> Shallow pointer copies are made of m_thermo and m_gastran.. gastran may not point to the correct - * object after this copy. The routine initialize() must be called after this - * routine to complete the copy. + * Warning -> Shallow pointer copies are made of m_thermo and m_gastran. + * gastran may not point to the correct object after this copy. + * The routine initialize() must be called after this routine to + * complete the copy. * * @param right Reference to DustyGasTransport object to be copied * into the current one. @@ -83,8 +84,7 @@ public: virtual Transport* duplMyselfAsTransport() const; - //--------------------------------------------------------- - // overloaded base class methods + // overloaded base class methods virtual void setThermo(thermo_t& thermo); @@ -92,15 +92,6 @@ public: 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); //! 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, doublereal* const fluxes); - //----------------------------------------------------------- // new methods added in this class //! Set the porosity (dimensionless) /*! - * @param porosity Set the value of the porosity + * @param porosity Set the value of the porosity */ void setPorosity(doublereal porosity); //! 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); //! 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); //! 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); @@ -152,12 +142,12 @@ public: /*! * 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, - * t is the tortuosity, and d is the diameter of the sphere + * The value for close-packed spheres is given below, where p is the + * porosity, t is the tortuosity, and d is the diameter of the sphere * - * \f[ - * \kappa = \frac{p^3 d^2}{72 t (1 - p)^2} - * \f] + * \f[ + * \kappa = \frac{p^3 d^2}{72 t (1 - p)^2} + * \f] * * @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 //! 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(); - //! Make the TransportFactory object a friend, because this object has restricted its - //! instantiation to classes which are friends. + //! Make the TransportFactory object a friend, because this object has + //! restricted its instantiation to classes which are friends. friend class TransportFactory; 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 - * set the gas phase models. + * The DustyGas model is a subordinate model to the gas phase transport + * 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 gastr Pointer to the underlying Transport model for transport in 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. */ void initialize(ThermoPhase* phase, Transport* gastr); private: //! Update temperature-dependent quantities within the object /*! - * The object keeps a value m_temp, which is the temperature at which - * quantities were last evaluated at. If the temperature is changed, - * update Booleans are set false, triggering recomputation. + * The object keeps a value m_temp, which is the temperature at which + * quantities were last evaluated at. If the temperature is changed, update + * Booleans are set false, triggering recomputation. */ void updateTransport_T(); //! Update concentration-dependent quantities within the object /*! - * The object keeps a value m_temp, which is the temperature at which - * quantities were last evaluated at. If the temperature is changed, - * update Booleans are set false, triggering recomputation. + * The object keeps a value m_temp, which is the temperature at which + * quantities were last evaluated at. If the temperature is changed, update + * Booleans are set false, triggering recomputation. */ void updateTransport_C(); //! Private routine to update the dusty gas binary diffusion coefficients /*! - * The dusty gas binary diffusion coefficients \f$ D^{dg}_{i,j} \f$ are - * evaluated from the binary gas-phase diffusion coefficients \f$ - * D^{bin}_{i,j} \f$ using the following formula + * The dusty gas binary diffusion coefficients \f$ D^{dg}_{i,j} \f$ are + * evaluated from the binary gas-phase diffusion coefficients \f$ + * D^{bin}_{i,j} \f$ using the following formula * - * \f[ - * D^{dg}_{i,j} = \frac{\phi}{\tau} D^{bin}_{i,j} - * \f] + * \f[ + * D^{dg}_{i,j} = \frac{\phi}{\tau} D^{bin}_{i,j} + * \f] * - * where \f$ \phi \f$ is the porosity of the media and \f$ \tau \f$ is - * the tortuosity of the media. + * where \f$ \phi \f$ is the porosity of the media and \f$ \tau \f$ is the + * tortuosity of the media. */ void updateBinaryDiffCoeffs(); //! Update the Multicomponent diffusion coefficients that are used in the //! approximation /*! - * This routine updates the H matrix and then inverts it. + * This routine updates the H matrix and then inverts it. */ void updateMultiDiffCoeffs(); //! 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[ - * \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[ + * \mathcal{D}^{knud}_k = \frac{2}{3} \frac{r_{pore} \phi}{\tau} \left( \frac{8 R T}{\pi W_k} \right)^{1/2} + * \f] */ void updateKnudsenDiffCoeffs(); //! 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[ - * 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] + * \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] */ void eval_H_matrix(); @@ -262,36 +254,19 @@ private: //! mole fractions vector_fp m_x; - //! Knudsen diffusion coefficients - /*! - * 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] - */ + //! Knudsen diffusion coefficients. @see updateKnudsenDiffCoeffs() vector_fp m_dk; //! temperature doublereal m_temp; - //! Multicomponent diffusion coefficients - /*! - * 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] - */ + //! Multicomponent diffusion coefficients. @see eval_H_matrix() DenseMatrix m_multidiff; - //! work space of size m_nsp; + //! work space of size m_nsp; vector_fp m_spwork; - //! work space of size m_nsp; + //! work space of size m_nsp; vector_fp m_spwork2; //! Pressure Gradient @@ -314,24 +289,22 @@ private: //! Particle diameter /*! - * The medium is assumed to consist of particles of size m_diam - * units = m + * The medium is assumed to consist of particles of size m_diam. units = m */ doublereal m_diam; //! Permeability of the media /*! - * The permeability is the proportionality constant for Darcy's - * law which relates discharge rate and viscosity to the applied - * pressure gradient. + * The permeability is the proportionality constant for Darcy's law which + * relates discharge rate and viscosity to the applied 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[ - * v = \frac{\kappa}{\mu} \frac{\delta P}{\delta x} - * \f] + * \f[ + * v = \frac{\kappa}{\mu} \frac{\delta P}{\delta x} + * \f] * - * units are m2 + * units are m2 */ doublereal m_perm; diff --git a/include/cantera/transport/GasTransport.h b/include/cantera/transport/GasTransport.h index 3ae3dac74..bbc9ae9c2 100644 --- a/include/cantera/transport/GasTransport.h +++ b/include/cantera/transport/GasTransport.h @@ -26,19 +26,19 @@ public: /*! * The viscosity is computed using the Wilke mixture rule (kg /m /s) * - * \f[ - * \mu = \sum_k \frac{\mu_k X_k}{\sum_j \Phi_{k,j} X_j}. - * \f] + * \f[ + * \mu = \sum_k \frac{\mu_k X_k}{\sum_j \Phi_{k,j} X_j}. + * \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[ - * \Phi_{k,j} = \frac{\left[1 - * + \sqrt{\left(\frac{\mu_k}{\mu_j}\sqrt{\frac{M_j}{M_k}}\right)}\right]^2} - * {\sqrt{8}\sqrt{1 + M_k/M_j}} - * \f] + * \f[ + * \Phi_{k,j} = \frac{\left[1 + * + \sqrt{\left(\frac{\mu_k}{\mu_j}\sqrt{\frac{M_j}{M_k}}\right)}\right]^2} + * {\sqrt{8}\sqrt{1 + M_k/M_j}} + * \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(); */ @@ -53,7 +53,7 @@ public: //! 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 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 * result in the formula below. * - * This is Eqn. 12.180 from "Chemically Reacting Flow" + * This is Eqn. 12.180 from "Chemically Reacting Flow" * - * \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} - * \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} + * \f] * - * @param[out] d Vector of mixture diffusion coefficients, \f$ D_{km}' \f$ , - * for each species (m^2/s). length m_nsp + * @param[out] d Vector of mixture diffusion coefficients, \f$ D_{km}' \f$ , + * for each species (m^2/s). length m_nsp */ virtual void getMixDiffCoeffs(doublereal* const d); @@ -166,17 +166,17 @@ protected: * pairs. For more information about this correction, see Dixon-Lewis, Proc. * Royal Society (1968). * - * @param i Species one - 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_sigma Multiplicative correction factor to be applied to diam(i,j) + * @param i Species one - 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_sigma Multiplicative correction factor to be applied to diam(i,j) */ void makePolarCorrections(size_t i, size_t j, doublereal& f_eps, doublereal& f_sigma); //! Generate polynomial fits to collision integrals /*! - * @param integrals interpolator for the collision integrals + * @param integrals interpolator for the collision integrals */ void fitCollisionIntegrals(MMCollisionInt& integrals); @@ -184,23 +184,23 @@ protected: //! the binary diffusion coefficients /*! * If CK_mode, then the fits are of the form - * \f[ - * \log(\eta(i)) = \sum_{n = 0}^3 a_n(i) (\log T)^n - * \f] - * and - * \f[ - * \log(D(i,j)) = \sum_{n = 0}^3 a_n(i,j) (\log T)^n - * \f] - * Otherwise the fits are of the form - * \f[ - * \eta(i)/sqrt(k_BT) = \sum_{n = 0}^4 a_n(i) (\log T)^n - * \f] - * and - * \f[ - * D(i,j)/sqrt(k_BT)) = \sum_{n = 0}^4 a_n(i,j) (\log T)^n - * \f] + * \f[ + * \log(\eta(i)) = \sum_{n = 0}^3 a_n(i) (\log T)^n + * \f] + * and + * \f[ + * \log(D(i,j)) = \sum_{n = 0}^3 a_n(i,j) (\log T)^n + * \f] + * Otherwise the fits are of the form + * \f[ + * \eta(i)/sqrt(k_BT) = \sum_{n = 0}^4 a_n(i) (\log T)^n + * \f] + * and + * \f[ + * D(i,j)/sqrt(k_BT)) = \sum_{n = 0}^4 a_n(i,j) (\log T)^n + * \f] * - * @param integrals interpolator for the collision integrals + * @param integrals interpolator for the collision integrals */ void fitProperties(MMCollisionInt& integrals); @@ -321,9 +321,9 @@ protected: //! Polynomial fits to the binary diffusivity of each species /*! - * m_diffcoeff[ic] is vector of polynomial coefficients for species i - * species j that fits the binary diffusion coefficient. The relationship - * between i j and ic is determined from the following algorithm: + * m_diffcoeff[ic] is vector of polynomial coefficients for species i + * species j that fits the binary diffusion coefficient. The relationship + * between i j and ic is determined from the following algorithm: * * int ic = 0; * for (i = 0; i < m_nsp; i++) { @@ -354,33 +354,33 @@ protected: //! Fit for omega22 collision integral /*! - * 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 - * (i,j). + * 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 + * (i,j). */ std::vector m_omega22_poly; //! Fit for astar collision integral /*! - * 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 - * (i,j). + * 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 + * (i,j). */ std::vector m_astar_poly; //! Fit for bstar collision integral /*! - * 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 - * (i,j). + * 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 + * (i,j). */ std::vector m_bstar_poly; //! Fit for cstar collision integral /*! - * 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 - * (i,j). + * 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 + * (i,j). */ std::vector m_cstar_poly; @@ -392,21 +392,21 @@ protected: //! Dimensionless rotational heat capacity of each species /*! - * 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. - * Dimensionless (Cr / R) + * 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. + * Dimensionless (Cr / R) */ vector_fp m_crot; //! Vector of booleans indicating whether a species is a polar molecule /*! - * Length is nsp + * Length is nsp */ std::vector m_polar; //! Polarizability of each species in the phase /*! - * Length = nsp. Units = m^3 + * Length = nsp. Units = m^3 */ vector_fp m_alpha; @@ -419,8 +419,7 @@ protected: //! Lennard-Jones diameter of the species in the current phase /*! - * length is the number of species in the phase - * units are in meters. + * length is the number of species in the phase. units are in meters. */ vector_fp m_sigma; @@ -448,7 +447,7 @@ protected: * epsilon(i,j) = sqrt(eps[i]*eps[j]); * 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; diff --git a/include/cantera/transport/HighPressureGasTransport.h b/include/cantera/transport/HighPressureGasTransport.h index abf286f35..b76959ed1 100644 --- a/include/cantera/transport/HighPressureGasTransport.h +++ b/include/cantera/transport/HighPressureGasTransport.h @@ -17,10 +17,10 @@ namespace Cantera //! Class MultiTransport implements transport properties for //! high pressure gas mixtures. /*! - * The implementation employs a method of corresponding states, using - * the Takahashi approach for binary diffusion coefficients, (using - * multicomponent averaging rules for the mixture properties, and the - * Lucas method for the viscosity of a high-pressure gas mixture. + * The implementation employs a method of corresponding states, using the + * Takahashi approach for binary diffusion coefficients, (using multicomponent + * averaging rules for the mixture properties, and the Lucas method for the + * viscosity of a high-pressure gas mixture. * * @ingroup tranprops */ diff --git a/include/cantera/transport/LTPspecies.h b/include/cantera/transport/LTPspecies.h index e316d2680..c8d7efef2 100644 --- a/include/cantera/transport/LTPspecies.h +++ b/include/cantera/transport/LTPspecies.h @@ -58,13 +58,14 @@ enum LTPTemperatureDependenceType { 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 - * like constant, %Arrhenius or polynomial temperature fits. In its current state, - * it is primarily suitable for specifying temperature dependence, but - * the adjustCoeffsForComposition() method can be implemented to - * adjust for the composition dependence. + * Subclasses handle different means of specifying transport properties like + * constant, %Arrhenius or polynomial temperature fits. In its current state, + * it is primarily suitable for specifying temperature dependence, but the + * adjustCoeffsForComposition() method can be implemented to adjust for the + * composition dependence. * * Mixing rules for computing mixture transport properties are handled * separately in the LiquidTranInteraction subclasses. @@ -74,37 +75,25 @@ class LTPspecies public: //! Construct an LTPspecies object for a liquid transport property. /*! - * The species transport property is constructed from the XML node, - * `` that is a child of the `` node in the - * species block and specifies a type of transport property (like - * viscosity) + * The species transport property is constructed from the XML node, + * `` that is a child of the `` node in the species + * block and specifies a type of transport property (like viscosity) * - * @param propNode Pointer to the XML node that contains the property information. A default - * value of 0 is allowed for the base class, but not for classes which - * are assumed to be parameterized by reading XML_Node information. - * @param name String containing the species name - * @param tp_ind enum TransportPropertyType containing the property id 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. + * @param propNode Pointer to the XML node that contains the property + * information. A default value of 0 is allowed for the base class, but + * not for classes which are assumed to be parameterized by reading + * XML_Node information. + * @param name String containing the species name + * @param tp_ind enum TransportPropertyType containing the property id + * 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 = "-", TransportPropertyType tp_ind = TP_UNKNOWN, const thermo_t* thermo = 0); - //! Copy Constructor - /*! - * @param right Object to be copied - */ 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); - - //! Destructor virtual ~LTPspecies() {} //! Duplication routine @@ -117,13 +106,12 @@ public: //! Returns the vector of 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 by the - * subclass object. + * The standard state species transport property is returned. Any + * temperature and composition dependence will be adjusted internally + * according to the information provided by the subclass object. * - * @return Returns a single double containing the property evaluation - * at the current ThermoPhase temperature. + * @returns a single double containing the property evaluation at the + * current ThermoPhase temperature. */ virtual doublereal getSpeciesTransProp(); @@ -136,9 +124,9 @@ public: private: //! Internal model to adjust species-specific properties for the composition. /*! - * Currently just a place holder, but this method could take - * the composition from the thermo object and adjust coefficients - * according to some yet unspecified model. + * Currently just a place holder, but this method could take the composition + * from the thermo object and adjust coefficients according to some yet + * unspecified model. */ virtual void adjustCoeffsForComposition(); @@ -160,24 +148,24 @@ protected: //! Weighting used for mixing. /*! - * This weighting can be employed to allow salt transport - * properties to be represented by specific ions. - * For example, to have Li+ and Ca+ represent the mixing - * transport properties of LiCl and CaCl2, the weightings for - * Li+ would be 2.0, for K+ would be 3.0 and for Cl- would be 0.0. - * The transport properties for Li+ would be those for LiCl and - * the transport properties for Ca+ would be those for CaCl2. - * The transport properties for Cl- should be something innoccuous like - * 1.0--note that 0.0 is not innocuous if there are logarithms involved. + * This weighting can be employed to allow salt transport properties to be + * represented by specific ions. For example, to have Li+ and Ca+ represent + * the mixing transport properties of LiCl and CaCl2, the weightings for Li+ + * would be 2.0, for K+ would be 3.0 and for Cl- would be 0.0. The transport + * properties for Li+ would be those for LiCl and the transport properties + * for Ca+ would be those for CaCl2. The transport properties for Cl- should + * be something innoccuous like 1.0--note that 0.0 is not innocuous if there + * are logarithms involved. */ doublereal m_mixWeight; }; -//! Class LTPspecies_Const holds transport parameters for a -//! specific liquid-phase species (LTPspecies) when the transport property is just a constant value. +//! Class LTPspecies_Const holds transport parameters for a specific liquid- +//! phase species (LTPspecies) when the transport property is just a constant +//! value. /*! - * As an example of the input required for LTPspecies_Const - * consider the following XML fragment + * As an example of the input required for LTPspecies_Const consider the + * following XML fragment * * \verbatim * @@ -194,54 +182,34 @@ protected: class LTPspecies_Const : public LTPspecies { 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, - * ``, that is a child of the `` node and specifies - * a type of transport property (e.g., viscosity). + * The transport property is constructed from the XML node, ``, + * that is a child of the `` node and specifies a type of + * transport property (e.g., viscosity). * - * @param propNode Reference to the XML node that contains the property information. - * @param name String containing the species name - * @param tp_ind enum TransportPropertyType containing the property id 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. + * @param propNode Reference to the XML node that contains the property + * information. + * @param name String containing the species name + * @param tp_ind enum TransportPropertyType containing the property id + * 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, TransportPropertyType tp_ind, const thermo_t* const thermo); - //! Copy Constructor - /*! - * @param right Object to be copied - */ 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); - - //! 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; - //! 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(); }; -//! Class LTPspecies_Arrhenius holds transport parameters for a -//! specific liquid-phase species (LTPspecies) when the -//! transport property is expressed in Arrhenius form. +//! Class LTPspecies_Arrhenius holds transport parameters for a specific liquid- +//! phase species (LTPspecies) when the transport property is expressed in +//! Arrhenius form. /*! * Used for standard state species properties with equations of the form * \f[ @@ -249,8 +217,8 @@ public: * \f] * where A, b, and E are passed in the XML input file. * - * As an example of the input required for LTPspecies_Arrhenius - * consider the following XML fragment + * As an example of the input required for LTPspecies_Arrhenius consider the + * following XML fragment * * \verbatim * @@ -273,43 +241,28 @@ public: //! Construct an LTPspecies object for a liquid transport property //! expressed in extended Arrhenius form. /*! - * The transport property is constructed from the XML node, ``, - * that is a child of the `` node and specifies a type of - * transport property (like viscosity) + * The transport property is constructed from the XML node, ``, + * that is a child of the `` node and specifies a type of + * transport property (like viscosity) * - * @param propNode Reference to the XML node that contains the property information.This class - * is assumed to be parameterized by reading XML_Node information. - * @param name String containing the species name - * @param tp_ind enum TransportPropertyType containing the property id 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. + * @param propNode Reference to the XML node that contains the property + * information.This class is assumed to be parameterized by reading + * XML_Node information. + * @param name String containing the species name + * @param tp_ind enum TransportPropertyType containing the property id + * 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, TransportPropertyType tp_ind, const thermo_t* thermo); - //! Copy Constructor - /*! - * @param right Object to be copied - */ 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); - - //! 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; - //! Return the standard state species value for this transport property evaluated - //! from the Arrhenius expression + //! Return the standard state species value for this transport property + //! evaluated from the Arrhenius expression /*! * In general the Arrhenius expression is * @@ -325,8 +278,8 @@ public: * \mu = A T^n \exp( + E / R T ). * \f] * - * Any temperature and composition dependence will be - * adjusted internally according to the information provided. + * Any temperature and composition dependence will be adjusted internally + * according to the information provided. */ doublereal getSpeciesTransProp(); @@ -344,9 +297,9 @@ protected: doublereal m_logProp; }; -//! Class LTPspecies_Poly holds transport parameters for a -//! specific liquid-phase species (LTPspecies) when the transport -//! property is expressed as a polynomial in temperature. +//! Class LTPspecies_Poly holds transport parameters for a specific liquid-phase +//! species (LTPspecies) when the transport property is expressed as a +//! polynomial in temperature. /*! * Used for standard state species properties with equations of the form * \f[ @@ -354,8 +307,8 @@ protected: * \f] * where f[i] are elements of the float array passed in. * - * As an example of the input required for LTPspecies_Poly - * consider the following XML fragment + * As an example of the input required for LTPspecies_Poly consider the + * following XML fragment * * \verbatim * @@ -372,47 +325,28 @@ protected: class LTPspecies_Poly : public LTPspecies { 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, ``, - * that is a child of the `` node and specifies a type of - * transport property (like viscosity). + * The transport property is constructed from the XML node, ``, + * that is a child of the `` node and specifies a type of + * transport property (like viscosity). * - * @param propNode Reference to the XML node that contains the property information. This class - * must be parameterized by reading XML_Node information. - * @param name String containing the species name - * @param tp_ind enum TransportPropertyType containing the property id 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. + * @param propNode Reference to the XML node that contains the property + * information. This class must be parameterized by reading XML_Node + * information. + * @param name String containing the species name + * @param tp_ind enum TransportPropertyType containing the property id + * 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); - //! Copy Constructor - /*! - * @param right Object to be copied - */ 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); - - //! 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; - //! 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(); protected: @@ -429,14 +363,14 @@ protected: /*! * Used for standard state species properties with equations of the form * - * \f[ - * x = f[0] \exp( f[1] T + ... + f[N] T^{N} ) - * \f] + * \f[ + * x = f[0] \exp( f[1] T + ... + f[N] T^{N} ) + * \f] * * where f[i] are elements of the float array passed in. * - * As an example of the input required for LTPspecies_ExpT - * consider the following XML fragment + * As an example of the input required for LTPspecies_ExpT consider the + * following XML fragment * * \verbatim * @@ -456,46 +390,26 @@ public: //! Construct an LTPspecies object for a liquid transport property //! expressed as an exponential in temperature. /*! - * The transport property is constructed from the XML node, ``, - * that is a child of the `` node and specifies a type of - * transport property (like viscosity). + * The transport property is constructed from the XML node, ``, + * that is a child of the `` node and specifies a type of + * transport property (like viscosity). * - * @param propNode Reference to the XML node that contains the property information. This class - * must be parameterized by reading XML_Node information. - * @param name String containing the species name - * @param tp_ind enum TransportPropertyType containing the property id 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. + * @param propNode Reference to the XML node that contains the property + * information. This class must be parameterized by reading XML_Node + * information. + * @param name String containing the species name + * @param tp_ind enum TransportPropertyType containing the property id + * 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, TransportPropertyType tp_ind, const thermo_t* thermo); - //! Copy Constructor - /*! - * @param right Object to be copied - */ 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); - - //! 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; - //! 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(); protected: diff --git a/include/cantera/transport/LiquidTranInteraction.h b/include/cantera/transport/LiquidTranInteraction.h index b0e6b51ca..d8fc69793 100644 --- a/include/cantera/transport/LiquidTranInteraction.h +++ b/include/cantera/transport/LiquidTranInteraction.h @@ -83,22 +83,20 @@ enum LiquidTranMixingModel { //! Base class to handle transport property evaluation in a mixture. /*! - * In a mixture, the mixture transport properties will generally depend on - * the contributions of each of the standard state species transport properties. + * In a mixture, the mixture transport properties will generally depend on the + * contributions of each of the standard state species transport properties. * Many composition dependencies are possible. This class, - * LiquidTranInteraction, is designed to be a base class for the - * implementation of various models for the mixing of standard state species - * transport properties. + * LiquidTranInteraction, is designed to be a base class for the implementation + * of various models for the mixing of standard state species transport + * properties. * - * There are two very broad types of transport properties to consider. - * First, there are properties for which a mixture value can be - * obtained through some mixing rule. These are obtained using the - * method getMixTransProp(). Viscosity is typical of this. - * Second, there are properties for which a matrix of properties may - * exist. This matrix of properties is obtained from the method - * getMatrixTransProp(). Diffusion coefficients are of this type. - * Subclasses should implement the appropriate one or both of - * these methods. + * There are two very broad types of transport properties to consider. First, + * there are properties for which a mixture value can be obtained through some + * mixing rule. These are obtained using the method getMixTransProp(). + * Viscosity is typical of this. Second, there are properties for which a matrix + * of properties may exist. This matrix of properties is obtained from the + * method getMatrixTransProp(). Diffusion coefficients are of this type. + * Subclasses should implement the appropriate one or both of these methods. */ class LiquidTranInteraction { @@ -138,8 +136,7 @@ public: } protected: - //! Model for species interaction effects - //! Takes enum LiquidTranMixingModel + //! Model for species interaction effects. Takes enum LiquidTranMixingModel LiquidTranMixingModel m_model; //! enum indicating what property this is (i.e viscosity) @@ -148,23 +145,23 @@ protected: //! pointer to thermo object to get current temperature thermo_t* m_thermo; - //! Matrix of interaction coefficients for polynomial in molefraction*weight of - //! speciesA (no temperature dependence, dimensionless) + //! Matrix of interaction coefficients for polynomial in molefraction*weight + //! of speciesA (no temperature dependence, dimensionless) std::vector m_Aij; - //! Matrix of interaction coefficients for polynomial in molefraction*weight of - //! speciesA (linear temperature dependence, units 1/K) + //! Matrix of interaction coefficients for polynomial in molefraction*weight + //! of speciesA (linear temperature dependence, units 1/K) std::vector m_Bij; //! Matrix of interactions (in energy units, 1/RT temperature dependence) DenseMatrix m_Eij; - //! Matrix of interaction coefficients for polynomial in molefraction*weight of - //! speciesA (in energy units, 1/RT temperature dependence) + //! Matrix of interaction coefficients for polynomial in molefraction*weight + //! of speciesA (in energy units, 1/RT temperature dependence) std::vector m_Hij; - //! Matrix of interaction coefficients for polynomial in molefraction*weight of - //! speciesA (in entropy units, divided by R) + //! Matrix of interaction coefficients for polynomial in molefraction*weight + //! of speciesA (in entropy units, divided by R) std::vector m_Sij; //! Matrix of interactions diff --git a/include/cantera/transport/LiquidTransport.h b/include/cantera/transport/LiquidTransport.h index 564b9c1d9..46f5bdbbd 100644 --- a/include/cantera/transport/LiquidTransport.h +++ b/include/cantera/transport/LiquidTransport.h @@ -14,35 +14,31 @@ namespace Cantera //! Class LiquidTransport implements models for transport //! properties for liquid phases. /*! - * Liquid Transport is set up with some flexibility in this class. Transport - * properties like viscosity and thermal conductivity are allowed flexibility - * within the constraints of the LiquidTransportProperty and - * LiquidTransportInteractions classes. For species diffusion, the - * LiquidTransport class focuses on the Stefan-Maxwell equation to determine - * the diffusion velocities. Other options for liquid diffusion include - * solvent-dominated diffusion, and a class SolventTransport should be - * forthcoming. + * Liquid Transport is set up with some flexibility in this class. Transport + * properties like viscosity and thermal conductivity are allowed flexibility + * within the constraints of the LiquidTransportProperty and + * LiquidTransportInteractions classes. For species diffusion, the + * LiquidTransport class focuses on the Stefan-Maxwell equation to determine the + * diffusion velocities. Other options for liquid diffusion include solvent- + * dominated diffusion, and a class SolventTransport should be forthcoming. * - * The class LiquidTransport has several roles. - * -# It brings together the individual species transport - * properties, expressed as subclasses of LTPspecies - * (Liquid Transport Properties of Species) through - * LiquidTransportData, with models for - * the composition dependence of liquid transport properties - * expressed as subclasses of LiquidTranInteraction - * (mixing rules) through LiquidTransportParams. Calculating - * mixture properties generally consists of calling the - * getMixTansProp member of LiquidTranInteraction by passing - * a vector of LTPSpecies - * -# It calculates the bulk velocity \f$ \vec{v} \f$ and - * individual species diffusion velocities, \f$ \vec{V_i} \f$ - * using the Stefan-Maxwell equations. It is possible to set a - * flag to calculate relative to a mass-averaged bulk velocity, - * relative to a mole-averaged bulk velocity or relative to a - * single species velocity using the \, - * \, or \ - * keyword. Mass-averaged velocities are the default for which - * the diffusion velocities satisfy + * The class LiquidTransport has several roles. + * -# It brings together the individual species transport properties, expressed + * as subclasses of LTPspecies (Liquid Transport Properties of Species) + * through LiquidTransportData, with models for the composition dependence of + * liquid transport properties expressed as subclasses of + * LiquidTranInteraction (mixing rules) through LiquidTransportParams. + * Calculating mixture properties generally consists of calling the + * getMixTansProp member of LiquidTranInteraction by passing a vector of + * LTPSpecies + * -# It calculates the bulk velocity \f$ \vec{v} \f$ and individual species + * diffusion velocities, \f$ \vec{V_i} \f$ using the Stefan-Maxwell + * equations. It is possible to set a flag to calculate relative to a mass- + * averaged bulk velocity, relative to a mole-averaged bulk velocity or + * relative to a single species velocity using the \, \, or \ keyword. Mass-averaged velocities are the default for which + * the diffusion velocities satisfy * \f[ * \sum_{i} Y_i \vec{V_i} = 0 * \f] @@ -55,17 +51,15 @@ namespace Cantera * \vec{V_i} = 0 * \f] * for reference species \f$ i \f$. - * -# It provides access to a number of derived quantities - * related to transport properties as described in the - * various methods below. + * -# It provides access to a number of derived quantities related to transport + * properties as described in the various methods below. * - * Within LiquidTransport, the state is presumed to be - * defined in terms of the species mole fraction, - * temperature and pressure. Charged species are expected - * and quantities like the electric current are computed - * based on a combined electrochemical potential. + * Within LiquidTransport, the state is presumed to be defined in terms of the + * species mole fraction, temperature and pressure. Charged species are + * expected and quantities like the electric current are computed based on a + * combined electrochemical potential. * - * @ingroup tranprops + * @ingroup tranprops */ class LiquidTransport : public Transport { @@ -89,11 +83,10 @@ public: //! Initialize the transport object /*! - * Here we change all of the internal dimensions to be sufficient. - * We get the object ready to do property evaluations. - * A lot of the input required to do property evaluations is - * contained in the LiquidTransportParams class that is - * filled in TransportFactory. + * Here we change all of the internal dimensions to be sufficient. We get + * the object ready to do property evaluations. A lot of the input required + * to do property evaluations is contained in the LiquidTransportParams + * class that is filled in TransportFactory. * * @param tr Transport parameters for all of the species in the phase. */ @@ -107,17 +100,17 @@ public: //! Returns the viscosity of the solution /*! - * The viscosity calculation is handled by subclasses of - * LiquidTranInteraction as specified in the input file. - * These in turn employ subclasses of LTPspecies to - * determine the individual species viscosities. + * The viscosity calculation is handled by subclasses of + * LiquidTranInteraction as specified in the input file. These in turn + * employ subclasses of LTPspecies to determine the individual species + * viscosities. */ virtual doublereal viscosity(); //! Returns the pure species viscosities for all species /*! - * The pure species viscosities are evaluated using the appropriate - * subclasses of LTPspecies as specified in the input file. + * The pure species viscosities are evaluated using the appropriate + * subclasses of LTPspecies as specified in the input file. * * @param visc array of length "number of species" * to hold returned viscosities. @@ -126,18 +119,17 @@ public: //! Returns the ionic conductivity of the solution /*! - * The ionic conductivity calculation is handled by subclasses of - * LiquidTranInteraction as specified in the input file. - * These in turn employ subclasses of LTPspecies to - * determine the individual species ionic conductivities. + * The ionic conductivity calculation is handled by subclasses of + * LiquidTranInteraction as specified in the input file. These in turn + * employ subclasses of LTPspecies to determine the individual species ionic + * conductivities. */ virtual doublereal ionConductivity(); //! Returns the pure species ionic conductivities for all species /*! - * The pure species ionic conductivities are evaluated using the - * appropriate subclasses of LTPspecies as specified in the - * input file. + * The pure species ionic conductivities are evaluated using the appropriate + * subclasses of LTPspecies as specified in the input file. * * @param ionCond Array of length "number of species" to hold returned * ionic conductivities. @@ -148,198 +140,191 @@ public: //! combinations of the transported species for the solution //! Has size of the number of binary interactions = nsp*nsp /*! - * The mobility ratio calculation is handled by subclasses of - * LiquidTranInteraction as specified in the input file. - * These in turn employ subclasses of LTPspecies to - * determine the mobility ratios in the pure species. + * The mobility ratio calculation is handled by subclasses of + * LiquidTranInteraction as specified in the input file. These in turn + * employ subclasses of LTPspecies to determine the mobility ratios in the + * pure species. * - * @param mobRat Vector of mobility ratios + * @param mobRat Vector of mobility ratios */ virtual void mobilityRatio(doublereal* mobRat); - //! Returns a double pointer to the mobility ratios of the - //! transported species in each pure species phase. + //! Returns a double pointer to the mobility ratios of the transported + //! species in each pure species phase. /*! - * Has size of the number of binary interactions by the number of species - * (nsp*nsp X nsp). The pure species mobility ratios are evaluated using - * the appropriate subclasses of LTPspecies as specified in the input - * file. + * Has size of the number of binary interactions by the number of species + * (nsp*nsp X nsp). The pure species mobility ratios are evaluated using the + * appropriate subclasses of LTPspecies as specified in the input file. * - * @param mobRat array of length "number of species" - * to hold returned mobility ratios. + * @param mobRat array of length "number of species" to hold returned + * mobility ratios. */ virtual void getSpeciesMobilityRatio(doublereal** mobRat); //! Returns the self diffusion coefficients of the species in the phase. //! Has size of nsp(coeffs) /*! - * The self diffusion coefficient is the diffusion coefficient of a - * tracer species at the current temperature and composition of the - * species. Therefore, the dilute limit of transport is assumed for the - * tracer species. The effective formula may be calculated from the - * Stefan-Maxwell 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 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. + * The self diffusion coefficient is the diffusion coefficient of a tracer + * species at the current temperature and composition of the species. + * Therefore, the dilute limit of transport is assumed for the tracer + * species. The effective formula may be calculated from the Stefan-Maxwell + * 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 + * 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. * - * \f[ - * J_k = - D^{sd}_k \frac{C_k}{R T} \nabla \mu_k - * \f] + * \f[ + * J_k = - D^{sd}_k \frac{C_k}{R T} \nabla \mu_k + * \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 - * LiquidTranInteraction as specified in the input file. - * These in turn employ subclasses of LTPspecies to - * determine the individual species self diffusion coeffs. + * The self diffusion calculation is handled by subclasses of + * LiquidTranInteraction as specified in the input file. These in turn + * employ subclasses of LTPspecies to determine the individual species self + * diffusion coeffs. * - * @param selfDiff Vector of self-diffusion coefficients - * Length = number of species in phase - * units = m**2 s-1 + * @param selfDiff Vector of self-diffusion coefficients. Length = number of + * species in phase. units = m**2 s-1 */ virtual void selfDiffusion(doublereal* const selfDiff); //! Returns the self diffusion coefficients in the pure species phases. //! Has size of nsp(coeffs) x nsp(phases) /*! - * The pure species molar volumes are evaluated using the appropriate - * subclasses of LTPspecies as specified in the input file. + * The pure species molar volumes are evaluated using the appropriate + * subclasses of LTPspecies as specified in the input file. * - * @param selfDiff array of length "number of species" - * to hold returned self diffusion coeffs. + * @param selfDiff array of length "number of species" to hold returned + * self diffusion coeffs. */ virtual void getSpeciesSelfDiffusion(doublereal** selfDiff); //! Returns the hydrodynamic radius for all species /*! - * The species hydrodynamic radii are evaluated using the appropriate - * subclasses of LTPspecies as specified in the input file. + * The species hydrodynamic radii are evaluated using the appropriate + * subclasses of LTPspecies as specified in the input file. * - * @param radius array of length "number of species" - * to hold returned radii. + * @param radius array of length "number of species" to hold returned + * radii. */ virtual void getSpeciesHydrodynamicRadius(doublereal* const radius); //! Returns the binary diffusion coefficients /*! - * The binary diffusion coefficients are specified in the input file - * through the LiquidTransportInteractions class. These are the binary - * interaction coefficients employed in the Stefan-Maxwell equation. + * The binary diffusion coefficients are specified in the input file through + * the LiquidTransportInteractions class. These are the binary interaction + * coefficients employed in the Stefan-Maxwell equation. * - * @param ld number of species in system - * @param d vector of binary diffusion coefficients - * units = m2 s-1. length = ld*ld = (number of species)^2 + * @param ld number of species in system + * @param d vector of binary diffusion coefficients. units = m2 s-1. + * length = ld*ld = (number of species)^2 */ virtual void getBinaryDiffCoeffs(const size_t ld, doublereal* const d); //! Get the Mixture diffusion coefficients /*! - * The mixture diffusion coefficients are not well defined - * in the context of LiquidTransport because the Stefan Maxwell - * equation is solved. Here the mixture diffusion coefficients - * are defined according to Ficks law: - * \f[ + * The mixture diffusion coefficients are not well defined in the context of + * LiquidTransport because the Stefan Maxwell equation is solved. Here the + * mixture diffusion coefficients are defined according to Ficks law: + * \f[ * X_i \vec{V_i} = -D_i \nabla X_i. - * \f] - * Solving Ficks Law for \f$ D_i \f$ gives a mixture diffusion - * coefficient - * \f[ + * \f] + * Solving Ficks Law for \f$ D_i \f$ gives a mixture diffusion coefficient + * \f[ * D_i = - X_i \vec{V_i} / ( \nabla X_i ). - * \f] - * If \f$ \nabla X_i = 0 \f$ this is undefined and the - * nonsensical value -1 is returned. + * \f] + * If \f$ \nabla X_i = 0 \f$ this is undefined and the nonsensical value -1 + * is returned. * - * Note that this evaluation of \f$ \vec{V_i} \f$ requires - * a solve of the Stefan Maxwell equation making this - * determination of the mixture averaged diffusion coefficients - * a \e slow method for obtaining diffusion coefficients. + * Note that this evaluation of \f$ \vec{V_i} \f$ requires a solve of the + * Stefan Maxwell equation making this determination of the mixture averaged + * diffusion coefficients a \e slow method for obtaining diffusion + * coefficients. * - * Also note that the Stefan Maxwell solve will be based upon - * the thermodynamic state (including gradients) most recently - * set. Gradients can be set specifically using set_Grad_V, - * set_Grad_X and set_Grad_T or through calls to - * getSpeciesFluxes, getSpeciesFluxesES, getSpeciesVdiff, - * getSpeciesVdiffES, etc. + * Also note that the Stefan Maxwell solve will be based upon the + * thermodynamic state (including gradients) most recently set. Gradients + * can be set specifically using set_Grad_V, set_Grad_X and set_Grad_T or + * through calls to getSpeciesFluxes, getSpeciesFluxesES, getSpeciesVdiff, + * getSpeciesVdiffES, etc. * - * @param d vector of mixture diffusion coefficients - * units = m2 s-1. length = number of species + * @param d vector of mixture diffusion coefficients. units = m2 s-1. + * length = number of species */ virtual void getMixDiffCoeffs(doublereal* const d); //! Return the thermal diffusion coefficients /*! - * These are all zero for this simple implementation + * These are all zero for this simple implementation * - * @param dt thermal diffusion coefficients + * @param dt thermal diffusion coefficients */ virtual void getThermalDiffCoeffs(doublereal* const dt); //! Return the thermal conductivity of the solution /*! - * The thermal conductivity calculation is handled by subclasses of - * LiquidTranInteraction as specified in the input file. - * These in turn employ subclasses of LTPspecies to - * determine the individual species thermal conductivities. + * The thermal conductivity calculation is handled by subclasses of + * LiquidTranInteraction as specified in the input file. These in turn + * employ subclasses of LTPspecies to determine the individual species + * thermal conductivities. */ virtual doublereal thermalConductivity(); //! Get the Electrical mobilities (m^2/V/s). /*! - * The electrical mobilities are not well defined - * in the context of LiquidTransport because the Stefan Maxwell - * equation is solved. Here the electrical mobilities - * are calculated from the mixture-averaged - * diffusion coefficients through a call to getMixDiffCoeffs() - * using the Einstein relation + * The electrical mobilities are not well defined in the context of + * LiquidTransport because the Stefan Maxwell equation is solved. Here the + * electrical mobilities are calculated from the mixture-averaged diffusion + * coefficients through a call to getMixDiffCoeffs() using the Einstein + * relation * * \f[ * \mu^e_k = \frac{F D_k}{R T} * \f] * - * Note that this call to getMixDiffCoeffs() requires - * a solve of the Stefan Maxwell equation making this - * determination of the mixture averaged diffusion coefficients - * a \e slow method for obtaining diffusion coefficients. + * Note that this call to getMixDiffCoeffs() requires a solve of the Stefan + * Maxwell equation making this determination of the mixture averaged + * diffusion coefficients a \e slow method for obtaining diffusion + * coefficients. * - * Also note that the Stefan Maxwell solve will be based upon the - * thermodynamic state (including gradients) most recently set. - * Gradients can be set specifically using set_Grad_V, set_Grad_X and - * set_Grad_T or through calls to getSpeciesFluxes, getSpeciesFluxesES, - * getSpeciesVdiff, getSpeciesVdiffES, etc. + * Also note that the Stefan Maxwell solve will be based upon the + * thermodynamic state (including gradients) most recently set. Gradients + * can be set specifically using set_Grad_V, set_Grad_X and set_Grad_T or + * through calls to getSpeciesFluxes, getSpeciesFluxesES, getSpeciesVdiff, + * getSpeciesVdiffES, etc. * - * @param mobil_e Returns the electrical mobilities of - * the species in array \c mobil_e. The array must be - * dimensioned at least as large as the number of species. + * @param mobil_e Returns the electrical mobilities of the species in array + * \c mobil_e. The array must be dimensioned at least as + * large as the number of species. */ virtual void getMobilities(doublereal* const mobil_e); //! Get the fluid mobilities (s kmol/kg). /*! - * The fluid mobilities are not well defined in the context of - * LiquidTransport because the Stefan Maxwell equation is solved. Here - * the fluid mobilities are calculated from the mixture-averaged - * diffusion coefficients through a call to getMixDiffCoeffs() using the - * Einstein relation + * The fluid mobilities are not well defined in the context of + * LiquidTransport because the Stefan Maxwell equation is solved. Here the + * fluid mobilities are calculated from the mixture-averaged diffusion + * coefficients through a call to getMixDiffCoeffs() using the Einstein + * relation * - * \f[ - * \mu^f_k = \frac{D_k}{R T} - * \f] + * \f[ + * \mu^f_k = \frac{D_k}{R T} + * \f] * - * Note that this call to getMixDiffCoeffs() requires - * a solve of the Stefan Maxwell equation making this - * determination of the mixture averaged diffusion coefficients - * a \e slow method for obtaining diffusion coefficients. + * Note that this call to getMixDiffCoeffs() requires a solve of the Stefan + * Maxwell equation making this determination of the mixture averaged + * diffusion coefficients a \e slow method for obtaining diffusion + * coefficients. * - * Also note that the Stefan Maxwell solve will be based upon the - * thermodynamic state (including gradients) most recently set. - * Gradients can be set specifically using set_Grad_V, set_Grad_X and - * set_Grad_T or through calls to getSpeciesFluxes, getSpeciesFluxesES, - * getSpeciesVdiff, getSpeciesVdiffES, etc. + * Also note that the Stefan Maxwell solve will be based upon the + * thermodynamic state (including gradients) most recently set. Gradients + * can be set specifically using set_Grad_V, set_Grad_X and set_Grad_T or + * through calls to getSpeciesFluxes, getSpeciesFluxesES, getSpeciesVdiff, + * getSpeciesVdiffES, etc. * - * @param mobil_f Returns the fluid mobilities of - * the species in array \c mobil_f. The array must be - * dimensioned at least as large as the number of species. + * @param mobil_f Returns the fluid mobilities of the species in array \c + * mobil_f. The array must be dimensioned at least as large + * as the number of species. */ virtual void getFluidMobilities(doublereal* const mobil_f); @@ -364,43 +349,39 @@ public: //! Compute the mixture electrical conductivity from //! the Stefan-Maxwell equation. /*! - * To compute the mixture electrical conductance, the Stefan - * Maxwell equation is solved for zero species gradients and - * for unit potential gradient, \f$ \nabla V \f$. - * The species fluxes are converted to current by summing over - * the charge-weighted fluxes according to - * \f[ - * \vec{i} = \sum_{i} z_i F \rho \vec{V_i} / W_i - * \f] - * where \f$ z_i \f$ is the charge on species i, - * \f$ F \f$ is Faradays constant, \f$ \rho \f$ is the density, - * \f$ W_i \f$ is the molecular mass of species i. - * The conductance, \f$ \kappa \f$ is obtained from - * \f[ - * \kappa = \vec{i} / \nabla V. - * \f] + * To compute the mixture electrical conductance, the Stefan Maxwell + * equation is solved for zero species gradients and for unit potential + * gradient, \f$ \nabla V \f$. The species fluxes are converted to current + * by summing over the charge-weighted fluxes according to + * \f[ + * \vec{i} = \sum_{i} z_i F \rho \vec{V_i} / W_i + * \f] + * where \f$ z_i \f$ is the charge on species i, \f$ F \f$ is Faradays + * constant, \f$ \rho \f$ is the density, \f$ W_i \f$ is the molecular mass + * of species i. The conductance, \f$ \kappa \f$ is obtained from + * \f[ + * \kappa = \vec{i} / \nabla V. + * \f] */ virtual doublereal getElectricConduct(); //! Compute the electric current density in A/m^2 /*! - * The electric current is computed first by computing the - * species diffusive fluxes using the Stefan Maxwell solution - * and then the current, \f$ \vec{i} \f$ by summing over - * the charge-weighted fluxes according to - * \f[ - * \vec{i} = \sum_{i} z_i F \rho \vec{V_i} / W_i - * \f] - * where \f$ z_i \f$ is the charge on species i, - * \f$ F \f$ is Faradays constant, \f$ \rho \f$ is the density, - * \f$ W_i \f$ is the molecular mass of species \c i. + * The electric current is computed first by computing the species diffusive + * fluxes using the Stefan Maxwell solution and then the current, \f$ + * \vec{i} \f$ by summing over the charge-weighted fluxes according to + * \f[ + * \vec{i} = \sum_{i} z_i F \rho \vec{V_i} / W_i + * \f] + * where \f$ z_i \f$ is the charge on species i, \f$ F \f$ is Faradays + * constant, \f$ \rho \f$ is the density, \f$ W_i \f$ is the molecular mass + * of species \c i. * * @param ndim The number of spatial dimensions (1, 2, or 3). * @param grad_T The temperature gradient (ignored in this model). * @param ldx Leading dimension of the grad_X array. - * @param grad_X Gradients of the mole fraction - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param grad_X Gradients of the mole fraction. Flat vector with the + * m_nsp in the inner loop. length = ldx * ndim * @param ldf Leading dimension of the grad_V and current vectors. * @param grad_V The electrostatic potential gradient. * @param current The electric current in A/m^2. @@ -421,21 +402,18 @@ public: * be specified as relative to a specific species (i.e. a * 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 grad_T Gradient of the temperature - * (length = ndim) - * @param ldx Leading dimension of the grad_X array - * (usually equal to m_nsp but not always) - * @param grad_X Gradients of the mole fraction - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim - * @param ldf Leading dimension of the fluxes array - * (usually equal to m_nsp but not always) - * @param Vdiff Output of the diffusive velocities. - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param ndim Number of dimensions in the flux expressions + * @param grad_T Gradient of the temperature (length = ndim) + * @param ldx Leading dimension of the grad_X array (usually equal to m_nsp + * but not always) + * @param grad_X Gradients of the mole fraction. Flat vector with the m_nsp + * in the inner loop. length = ldx * ndim + * @param ldf Leading dimension of the fluxes array (usually equal to m_nsp + * but not always) + * @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, const doublereal* grad_T, @@ -444,39 +422,36 @@ public: int ldf, doublereal* Vdiff); - //! Get the species diffusive velocities wrt to the averaged velocity, - //! given the gradients in mole fraction, temperature and electrostatic potential. + //! Get the species diffusive velocities wrt to the averaged velocity, given + //! the gradients in mole fraction, temperature and electrostatic potential. /*! - * The average velocity can be computed on a mole-weighted - * or mass-weighted basis, or the diffusion velocities may - * be specified as relative to a specific species (i.e. a - * solvent) all according to the velocityBasis input parameter. + * The average velocity can be computed on a mole-weighted or mass-weighted + * basis, or the diffusion velocities may be specified as relative to a + * specific species (i.e. a 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 grad_T Gradient of the temperature - * (length = ndim) - * @param ldx Leading dimension of the grad_X array - * (usually equal to m_nsp but not always) - * @param grad_X Gradients of the mole fraction - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim - * @param ldf Leading dimension of the fluxes array - * (usually equal to m_nsp but not always) - * @param grad_Phi Gradients of the electrostatic potential - * (length = ndim) - * @param Vdiff Output of the species diffusion velocities - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param ndim Number of dimensions in the flux expressions + * @param grad_T Gradient of the temperature (length = ndim) + * @param ldx Leading dimension of the grad_X array (usually equal + * to m_nsp but not always) + * @param grad_X Gradients of the mole fraction. Flat vector with the + * m_nsp in the inner loop. length = ldx * ndim + * @param ldf Leading dimension of the fluxes array (usually equal + * to m_nsp but not always) + * @param grad_Phi Gradients of the electrostatic potential (length = + * 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, int ldx, const doublereal* grad_X, int ldf, const doublereal* grad_Phi, doublereal* Vdiff); - //! Return the species diffusive mass fluxes wrt to - //! the averaged velocity in [kmol/m^2/s]. + //! Return the species diffusive mass fluxes wrt to the averaged velocity in + //! [kmol/m^2/s]. /*! * The diffusive mass flux of species \e k [kmol/m^2/s] is computed * using the Stefan-Maxwell equation @@ -492,11 +467,11 @@ public: * \vec{N}_i = C_T X_i \vec{V}_i * \f] * - * to determine the diffusion flux. Here \f$ C_T \f$ is the - * total concentration of the mixture [kmol/m^3], \f$ D_{ij} \f$ - * are the Stefa-Maxwell interaction parameters in [m^2/s], - * \f$ \vec{V}_{i} \f$ is the diffusion velocity of species \e i, - * \f$ \mu_i \f$ is the electrochemical potential of species \e i. + * to determine the diffusion flux. Here \f$ C_T \f$ is the total + * concentration of the mixture [kmol/m^3], \f$ D_{ij} \f$ are the Stefa- + * Maxwell interaction parameters in [m^2/s], \f$ \vec{V}_{i} \f$ is the + * diffusion velocity of species \e i, \f$ \mu_i \f$ is the electrochemical + * potential of species \e i. * * Note that for this method, there is no argument for the gradient of the * electric potential (voltage). Electric potential gradients can be set @@ -512,24 +487,22 @@ public: * (length = ndim) * @param ldx Leading dimension of the grad_X array. * (usually equal to m_nsp but not always) - * @param grad_X Gradients of the mole fraction - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim - * @param ldf Leading dimension of the fluxes array - * (usually equal to m_nsp but not always) - * @param fluxes Output of the diffusive mass fluxes - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param grad_X Gradients of the mole fraction. Flat vector with the + * m_nsp in the inner loop. length = ldx * ndim + * @param ldf Leading dimension of the fluxes array (usually equal to + * m_nsp but not always) + * @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, size_t ldx, const doublereal* const grad_X, size_t ldf, doublereal* const fluxes); - //! Return the species diffusive mass fluxes wrt to - //! the averaged velocity in [kmol/m^2/s]. + //! Return the species diffusive mass fluxes wrt to the averaged velocity in + //! [kmol/m^2/s]. /*! - * The diffusive mass flux of species \e k is computed - * using the Stefan-Maxwell equation + * The diffusive mass flux of species \e k is computed using the Stefan- + * Maxwell equation * \f[ * X_i \nabla \mu_i * = RT \sum_i \frac{X_i X_j}{D_{ij}} @@ -539,11 +512,11 @@ public: * \f[ * \vec{N}_i = C_T X_i \vec{V}_i * \f] - * to determine the diffusion flux. Here \f$ C_T \f$ is the - * total concentration of the mixture [kmol/m^3], \f$ D_{ij} \f$ - * are the Stefa-Maxwell interaction parameters in [m^2/s], - * \f$ \vec{V}_{i} \f$ is the diffusion velocity of species \e i, - * \f$ \mu_i \f$ is the electrochemical potential of species \e i. + * to determine the diffusion flux. Here \f$ C_T \f$ is the total + * concentration of the mixture [kmol/m^3], \f$ D_{ij} \f$ are the Stefa- + * Maxwell interaction parameters in [m^2/s], \f$ \vec{V}_{i} \f$ is the + * diffusion velocity of species \e i, \f$ \mu_i \f$ is the electrochemical + * potential of species \e i. * * The diffusion velocity is relative to an average velocity that can be * computed on a mole-weighted or mass-weighted basis, or the diffusion @@ -555,16 +528,13 @@ public: * (length = ndim) * @param ldx Leading dimension of the grad_X array. * (usually equal to m_nsp but not always) - * @param grad_X Gradients of the mole fraction - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim - * @param ldf Leading dimension of the fluxes array - * (usually equal to m_nsp but not always) - * @param grad_Phi Gradients of the electrostatic potential - * length = ndim - * @param fluxes Output of the diffusive mass fluxes - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param grad_X Gradients of the mole fraction. Flat vector with the + * m_nsp in the inner loop. length = ldx * ndim + * @param ldf Leading dimension of the fluxes array (usually equal to + * m_nsp but not always) + * @param grad_Phi Gradients of the electrostatic potential. length = ndim + * @param fluxes Output of the diffusive mass fluxes. Flat vector with + * the m_nsp in the inner loop. length = ldx * ndim */ virtual void getSpeciesFluxesES(size_t ndim, const doublereal* grad_T, @@ -574,91 +544,86 @@ public: const doublereal* grad_Phi, doublereal* fluxes); - //! Return the species diffusive velocities relative to - //! the averaged velocity. + //! Return the species diffusive velocities relative to the averaged + //! velocity. /*! * This method acts similarly to getSpeciesVdiffES() but requires all * gradients to be preset using methods set_Grad_X(), set_Grad_V(), * set_Grad_T(). See the documentation of getSpeciesVdiffES() for details. * * @param ldf Leading dimension of the Vdiff array. - * @param Vdiff Output of the diffusive velocities. - * Flat vector with the 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 getSpeciesVdiffExt(size_t ldf, doublereal* Vdiff); - //! Return the species diffusive fluxes relative to - //! the averaged velocity. + //! Return the species diffusive fluxes relative to the averaged velocity. /*! - * This method acts similarly to getSpeciesFluxesES() but - * requires all gradients to be preset using methods - * set_Grad_X(), set_Grad_V(), set_Grad_T(). - * See the documentation of getSpeciesFluxesES() for details. + * This method acts similarly to getSpeciesFluxesES() but requires all + * gradients to be preset using methods set_Grad_X(), set_Grad_V(), + * set_Grad_T(). See the documentation of getSpeciesFluxesES() for details. * - * units = kg/m2/s + * units = kg/m2/s * - * @param ldf Leading dimension of the Vdiff array. - * @param fluxes Output of the diffusive fluxes. - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param ldf Leading dimension of the Vdiff array. + * @param fluxes Output of the diffusive fluxes. Flat vector with the m_nsp + * in the inner loop. length = ldx * ndim */ virtual void getSpeciesFluxesExt(size_t ldf, doublereal* fluxes); protected: - //! Returns true if temperature has changed, - //! in which case flags are set to recompute transport properties. + //! Returns true if temperature has changed, in which case flags are set to + //! recompute transport properties. /*! - * This is called whenever a transport property is requested. - * The first task is to check whether the temperature has changed - * since the last call to update_T(). - * If it hasn't then an immediate return is carried out. + * This is called whenever a transport property is requested. The first task + * is to check whether the temperature has changed since the last call to + * update_T(). If it hasn't then an immediate return is carried out. * - * Note this should be a lightweight function since it's - * part of all of the interfaces. + * Note this should be a lightweight function since it's part of all of the + * interfaces. * - * @return Returns true if the temperature has changed, and false otherwise + * @returns true if the temperature has changed, and false otherwise */ virtual bool update_T(); //! Returns true if mixture composition has changed, //! in which case flags are set to recompute transport properties. /*! - * This is called for every interface call to check whether - * the concentrations have changed. Concentrations change - * whenever the pressure or the mole fraction has changed. - * If it has changed, the recalculations should be done. + * This is called for every interface call to check whether the + * concentrations have changed. Concentrations change whenever the pressure + * or the mole fraction has changed. If it has changed, the recalculations + * should be done. * - * Note this should be a lightweight function since it's - * part of all of the interfaces. + * Note this should be a lightweight function since it's part of all of the + * interfaces. * - * @return Returns true if the mixture composition has changed, and false otherwise. + * @returns true if the mixture composition has changed, and false + * otherwise. */ virtual bool update_C(); - //! Updates the internal value of the gradient of the - //! logarithm of the activity, which is - //! used in the gradient of the chemical potential. + //! Updates the internal value of the gradient of the logarithm of the + //! activity, which is used in the gradient of the chemical potential. /*! - * Evaluate the gradients of the activity - * as they alter the diffusion coefficient. + * Evaluate the gradients of the activity as they alter the diffusion + * coefficient. * - * The gradient of the chemical potential can be written in terms of - * gradient of the logarithm of the mole fraction times a correction - * associated with the gradient of the activity coefficient relative to - * that of the mole fraction. Specifically, the gradients of the - * logarithms of each are involved according to the formula + * The gradient of the chemical potential can be written in terms of + * gradient of the logarithm of the mole fraction times a correction + * associated with the gradient of the activity coefficient relative to that + * of the mole fraction. Specifically, the gradients of the logarithms of + * each are involved according to the formula * - * \f[ - * \nabla \mu_k = RT \left[ \nabla ( \ln X_k ) + - * \nabla ( \ln \gamma_k ) \right] = RT \left[ - * \nabla ( \ln a_k ) \right] - * \f] + * \f[ + * \nabla \mu_k = RT \left[ \nabla ( \ln X_k ) + + * \nabla ( \ln \gamma_k ) \right] = RT \left[ + * \nabla ( \ln a_k ) \right] + * \f] * - * The gradient in the activity coefficient requires the use of ThermoPhase - * getdlnActCoeff that calculates its change based on a change in the state - * (i.e. temperature and composition of each species) which was first - * implemented in MargulesVPSSTP.cpp (LiquidTransport.h doxygen) + * The gradient in the activity coefficient requires the use of ThermoPhase + * getdlnActCoeff that calculates its change based on a change in the state + * (i.e. temperature and composition of each species) which was first + * implemented in MargulesVPSSTP.cpp (LiquidTransport.h doxygen) */ virtual void update_Grad_lnAC(); @@ -675,36 +640,35 @@ protected: * \f[ * \vec{N}_i = C_T X_i \vec{V}_i * \f] - * to determine the diffusion flux. Here \f$ C_T \f$ is the - * total concentration of the mixture [kmol/m^3], \f$ D_{ij} \f$ - * are the Stefa-Maxwell interaction parameters in [m^2/s], - * \f$ \vec{V}_{i} \f$ is the diffusion velocity of species \e i, - * \f$ \mu_i \f$ is the electrochemical potential of species \e i. + * to determine the diffusion flux. Here \f$ C_T \f$ is the total + * concentration of the mixture [kmol/m^3], \f$ D_{ij} \f$ are the Stefa- + * Maxwell interaction parameters in [m^2/s], \f$ \vec{V}_{i} \f$ is the + * diffusion velocity of species \e i, \f$ \mu_i \f$ is the electrochemical + * potential of species \e i. * * The diffusion velocity is relative to an average velocity that can be * computed on a mole-weighted or mass-weighted basis, or the diffusion * velocities may be specified as relative to a specific species (i.e. a * solvent) all according to the `velocityBasis` input parameter. * - * The gradient in the activity coefficient requires the use of ThermoPhase - * getdlnActCoeff that calculates its change based on a change in the state - * i.e. temperature and composition of each species. - * First implemented in MargulesVPSSTP.cpp. + * The gradient in the activity coefficient requires the use of ThermoPhase + * getdlnActCoeff that calculates its change based on a change in the state + * i.e. temperature and composition of each species. First implemented in + * MargulesVPSSTP.cpp. * * One of the Stefan Maxwell equations is replaced by the appropriate - * definition of the mass-averaged velocity, the mole-averaged velocity - * or the specification that velocities are relative to that - * of one species. + * definition of the mass-averaged velocity, the mole-averaged velocity or + * the specification that velocities are relative to that of one species. */ void stefan_maxwell_solve(); - //! Updates the array of pure species viscosities internally. + //! Updates the array of pure species viscosities internally. /*! * The flag m_visc_ok is set to true. * - * Note that for viscosity, a positive activation energy - * corresponds to the typical case of a positive argument - * to the exponential so that the Arrhenius expression is + * Note that for viscosity, a positive activation energy corresponds to the + * typical case of a positive argument to the exponential so that the + * Arrhenius expression is * * \f[ * \mu = A T^n \exp( + E / R T ) @@ -712,27 +676,27 @@ protected: */ void updateViscosity_T(); - //! Update the temperature-dependent ionic conductivity terms - //! for each species internally + //! Update the temperature-dependent ionic conductivity terms for each + //! species internally /*! * The flag m_ionCond_temp_ok is set to true. */ void updateIonConductivity_T(); - //! Updates the array of pure species mobility ratios internally. + //! Updates the array of pure species mobility ratios internally. /*! * The flag m_mobRat_ok is set to true. */ void updateMobilityRatio_T(); - //! Updates the array of pure species self diffusion coeffs internally. + //! Updates the array of pure species self diffusion coeffs internally. /*! * The flag m_selfDiff_ok is set to true. */ void updateSelfDiffusion_T(); - //! Update the temperature-dependent hydrodynamic radius terms - //! for each species internally + //! Update the temperature-dependent hydrodynamic radius terms for each + //! species internally /*! * The flag m_radi_temp_ok is set to true. */ @@ -744,41 +708,41 @@ protected: //! Update the concentration parts of the viscosities /*! - * Internal routine is run whenever the update_boolean - * m_visc_conc_ok is false. Currently there is no concentration - * dependence for the pure species viscosities. + * Internal routine is run whenever the update_boolean m_visc_conc_ok is + * false. Currently there is no concentration dependence for the pure + * species viscosities. */ void updateViscosities_C(); //! Update the concentration parts of the ionic conductivity /*! - * Internal routine is run whenever the update_boolean - * m_ionCond_conc_ok is false. Currently there is no concentration - * dependence for the pure species ionic conductivity. + * Internal routine is run whenever the update_boolean m_ionCond_conc_ok is + * false. Currently there is no concentration dependence for the pure + * species ionic conductivity. */ void updateIonConductivity_C(); //! Update the concentration parts of the mobility ratio /*! - * Internal routine is run whenever the update_boolean - * m_mobRat_conc_ok is false. Currently there is no concentration - * dependence for the pure species mobility ratio. + * Internal routine is run whenever the update_boolean m_mobRat_conc_ok is + * false. Currently there is no concentration dependence for the pure + * species mobility ratio. */ void updateMobilityRatio_C(); //! Update the concentration parts of the self diffusion /*! - * Internal routine is run whenever the update_boolean - * m_selfDiff_conc_ok is false. Currently there is no concentration - * dependence for the pure species self diffusion. + * Internal routine is run whenever the update_boolean m_selfDiff_conc_ok is + * false. Currently there is no concentration dependence for the pure + * species self diffusion. */ void updateSelfDiffusion_C(); //! Update the concentration dependence of the hydrodynamic radius /*! - * Internal routine is run whenever the update_boolean - * m_radi_conc_ok is false. Currently there is no concentration - * dependence for the hydrodynamic radius. + * Internal routine is run whenever the update_boolean m_radi_conc_ok is + * false. Currently there is no concentration dependence for the + * hydrodynamic radius. */ void updateHydrodynamicRadius_C(); @@ -799,36 +763,36 @@ private: //! Viscosity for each species expressed as an appropriate subclass //! of LTPspecies /*! - * These subclasses of LTPspecies evaluate the species-specific - * transport properties according to the parameters parsed in - * TransportFactory::getLiquidSpeciesTransportData(). + * These subclasses of LTPspecies evaluate the species-specific transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidSpeciesTransportData(). */ std::vector m_viscTempDep_Ns; //! Viscosity of the mixture expressed as a subclass of //! LiquidTranInteraction /*! - * These subclasses of LiquidTranInteraction evaluate the - * mixture transport properties according to the parameters parsed in - * TransportFactory::getLiquidInteractionsTransportData(). + * These subclasses of LiquidTranInteraction evaluate the mixture transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidInteractionsTransportData(). */ LiquidTranInteraction* m_viscMixModel; //! Ionic conductivity for each species expressed as an appropriate subclass //! of LTPspecies /*! - * These subclasses of LTPspecies evaluate the species-specific - * transport properties according to the parameters parsed in - * TransportFactory::getLiquidSpeciesTransportData(). + * These subclasses of LTPspecies evaluate the species-specific transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidSpeciesTransportData(). */ std::vector m_ionCondTempDep_Ns; //! Ionic Conductivity of the mixture expressed as a subclass of //! LiquidTranInteraction /*! - * These subclasses of LiquidTranInteraction evaluate the - * mixture transport properties according to the parameters parsed in - * TransportFactory::getLiquidInteractionsTransportData(). + * These subclasses of LiquidTranInteraction evaluate the mixture transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidInteractionsTransportData(). */ LiquidTranInteraction* m_ionCondMixModel; @@ -838,54 +802,54 @@ private: //! Mobility ratio for the binary combinations of each species in each //! pure phase expressed as an appropriate subclass of LTPspecies /*! - * These subclasses of LTPspecies evaluate the species-specific - * transport properties according to the parameters parsed in - * TransportFactory::getLiquidSpeciesTransportData(). + * These subclasses of LTPspecies evaluate the species-specific transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidSpeciesTransportData(). */ std::vector m_mobRatTempDep_Ns; //! Mobility ratio for each binary combination of mobile species in the mixture //! expressed as a subclass of LiquidTranInteraction /*! - * These subclasses of LiquidTranInteraction evaluate the - * mixture transport properties according to the parameters parsed in - * TransportFactory::getLiquidInteractionsTransportData(). + * These subclasses of LiquidTranInteraction evaluate the mixture transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidInteractionsTransportData(). */ std::vector m_mobRatMixModel; //! Self Diffusion for each species in each pure species phase //! expressed as an appropriate subclass of LTPspecies /*! - * These subclasses of LTPspecies evaluate the species-specific - * transport properties according to the parameters parsed in - * TransportFactory::getLiquidSpeciesTransportData(). + * These subclasses of LTPspecies evaluate the species-specific transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidSpeciesTransportData(). */ std::vector m_selfDiffTempDep_Ns; //! Self Diffusion for each species in the mixture expressed as a subclass of //! LiquidTranInteraction /*! - * These subclasses of LiquidTranInteraction evaluate the - * mixture transport properties according to the parameters parsed in - * TransportFactory::getLiquidInteractionsTransportData(). + * These subclasses of LiquidTranInteraction evaluate the mixture transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidInteractionsTransportData(). */ std::vector m_selfDiffMixModel; //! Thermal conductivity for each species expressed as an //! appropriate subclass of LTPspecies /*! - * These subclasses of LTPspecies evaluate the species-specific - * transport properties according to the parameters parsed in - * TransportFactory::getLiquidSpeciesTransportData(). + * These subclasses of LTPspecies evaluate the species-specific transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidSpeciesTransportData(). */ std::vector m_lambdaTempDep_Ns; //! Thermal conductivity of the mixture expressed as a subclass of //! LiquidTranInteraction /*! - * These subclasses of LiquidTranInteraction evaluate the - * mixture transport properties according to the parameters parsed in - * TransportFactory::getLiquidInteractionsTransportData(). + * These subclasses of LiquidTranInteraction evaluate the mixture transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidInteractionsTransportData(). */ LiquidTranInteraction* m_lambdaMixModel; @@ -893,13 +857,13 @@ private: //! Diffusion coefficient model for each species expressed as an //! appropriate subclass of LTPspecies /*! - * These subclasses of LTPspecies evaluate the species-specific - * transport properties according to the parameters parsed in - * TransportFactory::getLiquidSpeciesTransportData(). + * These subclasses of LTPspecies evaluate the species-specific transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidSpeciesTransportData(). * - * Since the LiquidTransport class uses the Stefan-Maxwell equation - * to describe species diffusivity, the species-specific - * diffusivity is irrelevant. + * Since the LiquidTransport class uses the Stefan-Maxwell equation to + * describe species diffusivity, the species-specific diffusivity is + * irrelevant. */ std::vector m_diffTempDep_Ns; @@ -907,31 +871,30 @@ private: //! LiquidTranInteraction. This will return an array of Stefan-Maxwell //! interaction parameters for use in the Stefan-Maxwell solution. /*! - * These subclasses of LiquidTranInteraction evaluate the - * mixture transport properties according to the parameters parsed in - * TransportFactory::getLiquidInteractionsTransportData(). + * These subclasses of LiquidTranInteraction evaluate the mixture transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidInteractionsTransportData(). */ LiquidTranInteraction* m_diffMixModel; //! Stefan-Maxwell diffusion coefficients DenseMatrix m_diff_Dij; - //! Hydrodynamic radius for each species expressed as an appropriate subclass of LTPspecies + //! Hydrodynamic radius for each species expressed as an appropriate + //! subclass of LTPspecies /*! - * These subclasses of LTPspecies evaluate the species-specific - * transport properties according to the parameters parsed in - * TransportFactory::getLiquidSpeciesTransportData(). - * length = nsp + * These subclasses of LTPspecies evaluate the species-specific transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidSpeciesTransportData(). length = nsp */ std::vector m_radiusTempDep_Ns; - //! (Not used in LiquidTransport) - //! Hydrodynamic radius of the mixture expressed as a subclass of - //! LiquidTranInteraction + //! (Not used in LiquidTransport) Hydrodynamic radius of the mixture + //! expressed as a subclass of LiquidTranInteraction /*! - * These subclasses of LiquidTranInteraction evaluate the - * mixture transport properties according to the parameters parsed in - * TransportFactory::getLiquidInteractionsTransportData(). + * These subclasses of LiquidTranInteraction evaluate the mixture transport + * properties according to the parameters parsed in + * TransportFactory::getLiquidInteractionsTransportData(). */ LiquidTranInteraction* m_radiusMixModel; @@ -940,11 +903,10 @@ private: //! Internal value of the gradient of the mole fraction vector /*! - * Note, this is the only gradient value that can and perhaps - * should reflect the true state of the mole fractions in the - * application solution vector. In other words no cropping or - * massaging of the values to make sure they are above zero - * should occur. - developing .... + * Note, this is the only gradient value that can and perhaps should reflect + * the true state of the mole fractions in the application solution vector. + * In other words no cropping or massaging of the values to make sure they + * are above zero should occur. - developing .... * * m_nsp is the number of species in the fluid * k is the species index @@ -957,14 +919,14 @@ private: //! Gradient of the logarithm of the activity /*! - * This quantity appears in the gradient of the chemical potential. - * It replaces the gradient of the mole fraction, and in this way - * serves to "modify" the diffusion coefficient. + * This quantity appears in the gradient of the chemical potential. It + * replaces the gradient of the mole fraction, and in this way serves to + * "modify" the diffusion coefficient. * - * \f[ - * m\_Grad\_lnAC[k] = \nabla ( \ln X_k ) + - * \nabla ( \ln \gamma_k ) - * \f] + * \f[ + * m\_Grad\_lnAC[k] = \nabla ( \ln X_k ) + + * \nabla ( \ln \gamma_k ) + * \f] * * k is the species index * n is the dimensional index (x, y, or z). It has a length @@ -976,42 +938,42 @@ private: //! Internal value of the gradient of the Temperature vector /*! - * Generally, if a transport property needs this in its evaluation it - * will look to this place to get it. + * Generally, if a transport property needs this in its evaluation it will + * look to this place to get it. * - * No internal property is precalculated based on gradients. Gradients - * are assumed to be freshly updated before every property call. + * No internal property is precalculated based on gradients. Gradients are + * assumed to be freshly updated before every property call. */ vector_fp m_Grad_T; //! Internal value of the gradient of the Pressure vector /*! - * Generally, if a transport property needs this in its evaluation it - * will look to this place to get it. + * Generally, if a transport property needs this in its evaluation it will + * look to this place to get it. * - * No internal property is precalculated based on gradients. Gradients - * are assumed to be freshly updated before every property call. + * No internal property is precalculated based on gradients. Gradients are + * assumed to be freshly updated before every property call. */ vector_fp m_Grad_P; //! Internal value of the gradient of the Electric Voltage /*! - * Generally, if a transport property needs this in its evaluation it - * will look to this place to get it. + * Generally, if a transport property needs this in its evaluation it will + * look to this place to get it. * - * No internal property is precalculated based on gradients. Gradients - * are assumed to be freshly updated before every property call. + * No internal property is precalculated based on gradients. Gradients are + * assumed to be freshly updated before every property call. */ vector_fp m_Grad_V; //! Gradient of the electrochemical potential /*! - * m_nsp is the number of species in the fluid. k is the species index. n - * is the dimensional index (x, y, or z) + * m_nsp is the number of species in the fluid. k is the species index. n is + * the dimensional index (x, y, or z) * - * \f[ - * m\_Grad\_mu[n*m_nsp + k] - * \f] + * \f[ + * m\_Grad\_mu[n*m_nsp + k] + * \f] */ vector_fp m_Grad_mu; @@ -1019,12 +981,12 @@ private: //! Array of Binary Diffusivities /*! - * These are evaluated according to the subclass of - * LiquidTranInteraction stored in m_diffMixModel. + * These are evaluated according to the subclass of LiquidTranInteraction + * stored in m_diffMixModel. * - * This has a size equal to nsp x nsp. It is a symmetric matrix. D_ii is - * the self diffusion coefficient. D_ii is not needed except for when - * there is one species in the mixture. + * This has a size equal to nsp x nsp. It is a symmetric matrix. D_ii is the + * self diffusion coefficient. D_ii is not needed except for when there is + * one species in the mixture. * * units m2/sec */ @@ -1032,10 +994,10 @@ private: //! Internal value of the species viscosities /*! - * Viscosity of the species evaluated using subclass of LTPspecies - * held in m_viscTempDep_Ns. + * Viscosity of the species evaluated using subclass of LTPspecies + * held in m_viscTempDep_Ns. * - * Length = number of species + * Length = number of species * * controlling update boolean -> m_visc_temp_ok */ @@ -1043,10 +1005,10 @@ private: //! Internal value of the species ionic conductivities /*! - * Ionic conductivity of the species evaluated using subclass of LTPspecies - * held in m_ionCondTempDep_Ns. + * Ionic conductivity of the species evaluated using subclass of LTPspecies + * held in m_ionCondTempDep_Ns. * - * Length = number of species + * Length = number of species * * controlling update boolean -> m_ionCond_temp_ok */ @@ -1054,10 +1016,10 @@ private: //! Internal value of the species mobility ratios /*! - * Mobility ratio of the species evaluated using subclass of LTPspecies - * held in m_mobRatTempDep_Ns. + * Mobility ratio of the species evaluated using subclass of LTPspecies + * held in m_mobRatTempDep_Ns. * - * Length = number of species + * Length = number of species * * controlling update boolean -> m_mobRat_temp_ok */ @@ -1065,10 +1027,10 @@ private: //! Internal value of the species self diffusion coefficients /*! - * Self diffusion of the species evaluated using subclass of LTPspecies - * held in m_selfDiffTempDep_Ns. + * Self diffusion of the species evaluated using subclass of LTPspecies + * held in m_selfDiffTempDep_Ns. * - * Length = number of species + * Length = number of species * * controlling update boolean -> m_selfDiff_temp_ok */ @@ -1076,10 +1038,10 @@ private: //! Internal value of the species individual thermal conductivities /*! - * Thermal conductivities of the species evaluated using subclass - * of LTPspecies held in m_lambdaTempDep_Ns. + * Thermal conductivities of the species evaluated using subclass + * of LTPspecies held in m_lambdaTempDep_Ns. * - * Length = number of species + * Length = number of species */ vector_fp m_lambdaSpecies; @@ -1088,7 +1050,7 @@ private: //! Local copy of the mass fractions of the species in the phase /*! - * The mass fraction vector comes from the ThermoPhase object. + * The mass fraction vector comes from the ThermoPhase object. * * length = m_nsp */ @@ -1103,10 +1065,10 @@ private: //! 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 - * and they are assumed to add up to one exactly. This mole - * fraction vector comes from the ThermoPhase object. Derivative - * quantities from this are referred to as bounded. + * The mole fractions here are assumed to be bounded by 0.0 and 1.0 and they + * are assumed to add up to one exactly. This mole fraction vector comes + * from the ThermoPhase object. Derivative quantities from this are referred + * to as bounded. * * Update info? * length = m_nsp @@ -1115,10 +1077,10 @@ private: //! Non-zero mole fraction vector used in transport property calculations /*! - * The mole fractions here are assumed to be bounded by *Tiny* and 1.0 - * and they may not be assumed to add up to one. This - * mole fraction vector is created from the ThermoPhase object. - * Derivative quantities of this use the _tran suffix. + * The mole fractions here are assumed to be bounded by *Tiny* and 1.0 and + * they may not be assumed to add up to one. This mole fraction vector is + * created from the ThermoPhase object. Derivative quantities of this use + * the _tran suffix. * * Update info? * length = m_nsp @@ -1127,26 +1089,20 @@ private: //! Local copy of the concentrations of the species in the phase /*! - * The concentrations are consistent with the m_molefracs - * vector which is bounded and sums to one. + * The concentrations are consistent with the m_molefracs vector which is + * bounded and sums to one. * * Update info? * length = m_nsp */ vector_fp m_concentrations; - //! Local copy of the total concentration. - /*! - * This is consistent with the m_concentrations[] and - * m_molefracs[] vector. - */ + //! Local copy of the total concentration. This is consistent with the + //! m_concentrations[] and m_molefracs[] vector. doublereal concTot_; - //! Local copy of the total concentration. - /*! - * This is consistent with the x_molefracs_tran vector and - * with the concTot_ number; - */ + //! Local copy of the total concentration. This is consistent with the + //! x_molefracs_tran vector and with the concTot_ number doublereal concTot_tran_; //! Mean molecular mass @@ -1155,10 +1111,8 @@ private: //! Density doublereal dens_; - //! Local copy of the charge of each species - /*! - * Contains the charge of each species (length m_nsp) - */ + //! Local copy of the charge of each species. Contains the charge of each + //! species (length m_nsp) vector_fp m_chargeSpecies; //! Specific volume for each species. Local copy from thermo object. @@ -1173,27 +1127,19 @@ private: //! Matrix for the Stefan-Maxwell equation. DenseMatrix m_A; - //! Current Temperature -> locally stored - /*! - * This is used to test whether new temperature computations - * should be performed. - */ + //! Current Temperature -> locally stored. This is used to test whether new + //! temperature computations should be performed. doublereal m_temp; //! Current value of the pressure doublereal m_press; - //! Solution of the Stefan Maxwell equation in terms of flux - /*! - * This is the mass flux of species k in units of kg m-3 s-1. - */ + //! Solution of the Stefan Maxwell equation in terms of flux. This is the + //! mass flux of species k in units of kg m-3 s-1. Array2D m_flux; - //! Solution of the Stefan Maxwell equation - /*! - * This is the diffusion velocity of species k - * in units of m/s and relative to the mole-averaged velocity. - */ + //! Solution of the Stefan Maxwell equation. This is the diffusion velocity + //! of species k in units of m/s and relative to the mole-averaged velocity. Array2D m_Vdiff; //! Saved value of the mixture thermal conductivity @@ -1211,30 +1157,23 @@ private: //! Saved values of the mixture self diffusion coefficients vector_fp m_selfDiffMix; - //! work space - /*! - * Length is equal to m_nsp - */ + //! work space. Length is equal to m_nsp vector_fp m_spwork; private: - //! Boolean indicating that the top-level mixture viscosity is current - /*! - * This is turned false for every change in T, P, or C. - */ + //! Boolean indicating that the top-level mixture viscosity is current. This + //! is turned false for every change in T, P, or C. bool m_visc_mix_ok; //! Boolean indicating that weight factors wrt viscosity is current bool m_visc_temp_ok; - //! Flag to indicate that the pure species viscosities - //! are current wrt the concentration + //! Flag to indicate that the pure species viscosities are current wrt the + //! concentration bool m_visc_conc_ok; - //! Boolean indicating that the top-level mixture ionic conductivity is current - /*! - * This is turned false for every change in T, P, or C. - */ + //! Boolean indicating that the top-level mixture ionic conductivity is + //! current. This is turned false for every change in T, P, or C. bool m_ionCond_mix_ok; //! Boolean indicating that weight factors wrt ionic conductivity is current @@ -1247,10 +1186,8 @@ private: //! Flag to indicate that the mixture conductivity is current bool m_cond_mix_ok; - //! Boolean indicating that the top-level mixture mobility ratio is current - /*! - * This is turned false for every change in T, P, or C. - */ + //! Boolean indicating that the top-level mixture mobility ratio is current. + //! This is turned false for every change in T, P, or C. bool m_mobRat_mix_ok; //! Boolean indicating that weight factors wrt mobility ratio is current @@ -1260,17 +1197,15 @@ private: //! are current wrt the concentration bool m_mobRat_conc_ok; - //! Boolean indicating that the top-level mixture self diffusion is current - /*! - * This is turned false for every change in T, P, or C. - */ + //! Boolean indicating that the top-level mixture self diffusion is current. + //! This is turned false for every change in T, P, or C. bool m_selfDiff_mix_ok; //! Boolean indicating that weight factors wrt self diffusion is current bool m_selfDiff_temp_ok; - //! Flag to indicate that the pure species self diffusion - //! are current wrt the concentration + //! Flag to indicate that the pure species self diffusion are current wrt + //! the concentration bool m_selfDiff_conc_ok; //! Boolean indicating that mixture diffusion coeffs are current @@ -1280,8 +1215,8 @@ private: //! hydrodynamic radius is current bool m_radi_temp_ok; - //! Flag to indicate that the hydrodynamic radius is current - //! is current wrt the concentration + //! Flag to indicate that the hydrodynamic radius is current is current wrt + //! the concentration bool m_radi_conc_ok; //! Boolean indicating that mixture diffusion coeffs are current @@ -1290,8 +1225,8 @@ private: //! Boolean indicating that binary diffusion coeffs are current bool m_diff_temp_ok; - //! Flag to indicate that the pure species conductivities - //! are current wrt the temperature + //! Flag to indicate that the pure species conductivities are current wrt + //! the temperature bool m_lambda_temp_ok; //! Boolean indicating that mixture conductivity is current @@ -1300,10 +1235,7 @@ private: //! Mode indicator for transport models -- currently unused. int m_mode; - //! Debugging flags - /*! - * Turn on to get debugging information - */ + //! Debugging flags. Turn on to get debugging information. bool m_debug; }; } diff --git a/include/cantera/transport/LiquidTransportData.h b/include/cantera/transport/LiquidTransportData.h index 40052028e..6470f6ef2 100644 --- a/include/cantera/transport/LiquidTransportData.h +++ b/include/cantera/transport/LiquidTransportData.h @@ -22,9 +22,9 @@ namespace Cantera * need to be careful about deleting pointers to LTPspecies objects created in * the TransportFactory. * - * All of the pointers in this class are shallow pointers. Therefore, this - * is a passthrough class, which keeps track of pointer ownership by zeroing - * pointers as we go. Yes, Yes, yes, this is not good. + * All of the pointers in this class are shallow pointers. Therefore, this + * is a passthrough class, which keeps track of pointer ownership by zeroing + * pointers as we go. Yes, Yes, yes, this is not good. */ class LiquidTransportData { @@ -39,51 +39,27 @@ public: std::string speciesName; //! Model type for the hydroradius - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* hydroRadius; //! Model type for the viscosity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* viscosity; //! Model type for the ionic conductivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* ionConductivity; //! Model type for the mobility ratio - /*! - * shallow pointers that should be zero during destructor - */ std::vector mobilityRatio; //! Model type for the self diffusion coefficients - /*! - * shallow pointers that should be zero during destructor - */ std::vector selfDiffusion; //! Model type for the thermal conductivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* thermalCond; //! Model type for the electrical conductivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* electCond; //! Model type for the speciesDiffusivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* speciesDiffusivity; }; diff --git a/include/cantera/transport/LiquidTransportParams.h b/include/cantera/transport/LiquidTransportParams.h index 9f96ddec4..61309823a 100644 --- a/include/cantera/transport/LiquidTransportParams.h +++ b/include/cantera/transport/LiquidTransportParams.h @@ -12,8 +12,8 @@ namespace Cantera { -//! Class LiquidTransportParams holds transport model parameters -//! relevant to transport in mixtures. +//! Class LiquidTransportParams holds transport model parameters relevant to +//! transport in mixtures. /*! * This class is used by TransportFactory to initialize transport objects. */ @@ -34,23 +34,25 @@ public: //! Object that specifes the ionic Conductivity of the mixture LiquidTranInteraction* ionConductivity; - //! Vector of pointer to the LiquidTranInteraction object which handles the calculation of - //! the mobility ratios for the phase + //! Vector of pointer to the LiquidTranInteraction object which handles the + //! 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 * - * 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 * - * Length = nsp * nsp + * Length = nsp * nsp */ std::vector mobilityRatio; - //! Vector of pointer to the LiquidTranInteraction object which handles - //! the calculation of each species' self diffusion coefficient for the phase + //! Vector of pointer to the LiquidTranInteraction object which handles the + //! calculation of each species' self diffusion coefficient for the phase std::vector selfDiffusion; //! 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 * overall formula for the mixture viscosity is * - * \f[ \eta_{mix} = \sum_i X_i \eta_i - * + \sum_i \sum_j X_i X_j A_{i,j} \f]. + * \f[ \eta_{mix} = \sum_i X_i \eta_i + \sum_i \sum_j X_i X_j A_{i,j} \f]. */ DenseMatrix thermalCond_Aij; diff --git a/include/cantera/transport/MixTransport.h b/include/cantera/transport/MixTransport.h index 42553732c..8db2e6ab2 100644 --- a/include/cantera/transport/MixTransport.h +++ b/include/cantera/transport/MixTransport.h @@ -15,7 +15,8 @@ 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. * 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) * - * \f[ - * \mu = \sum_k \frac{\mu_k X_k}{\sum_j \Phi_{k,j} X_j}. - * \f] + * \f[ + * \mu = \sum_k \frac{\mu_k X_k}{\sum_j \Phi_{k,j} X_j}. + * \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[ - * \Phi_{k,j} = \frac{\left[1 - * + \sqrt{\left(\frac{\mu_k}{\mu_j}\sqrt{\frac{M_j}{M_k}}\right)}\right]^2} - * {\sqrt{8}\sqrt{1 + M_k/M_j}} - * \f] + * \f[ + * \Phi_{k,j} = \frac{\left[1 + * + \sqrt{\left(\frac{\mu_k}{\mu_j}\sqrt{\frac{M_j}{M_k}}\right)}\right]^2} + * {\sqrt{8}\sqrt{1 + M_k/M_j}} + * \f] * * The thermal conductivity is computed from the following mixture rule: - * \f[ - * \lambda = 0.5 \left( \sum_k X_k \lambda_k + \frac{1}{\sum_k X_k/\lambda_k} \right) - * \f] + * \f[ + * \lambda = 0.5 \left( \sum_k X_k \lambda_k + \frac{1}{\sum_k X_k/\lambda_k} \right) + * \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[ - * j_T = - \lambda \nabla T - * \f] + * \f[ + * j_T = - \lambda \nabla T + * \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. - * @ingroup tranprops + * The units of lambda are W / m K which is equivalent to kg m / s^3 K. + * @ingroup tranprops */ class MixTransport : public GasTransport { @@ -73,8 +74,6 @@ public: /*! * 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 */ virtual void getThermalDiffCoeffs(doublereal* const dt); @@ -82,19 +81,19 @@ public: //! Returns the mixture thermal conductivity (W/m /K) /*! * The thermal conductivity is computed from the following mixture rule: - * \f[ - * \lambda = 0.5 \left( \sum_k X_k \lambda_k + \frac{1}{\sum_k X_k/\lambda_k} \right) - * \f] + * \f[ + * \lambda = 0.5 \left( \sum_k X_k \lambda_k + \frac{1}{\sum_k X_k/\lambda_k} \right) + * \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[ - * j_T = - \lambda \nabla T - * \f] + * \f[ + * j_T = - \lambda \nabla T + * \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 */ @@ -102,57 +101,56 @@ public: //! Get the Electrical mobilities (m^2/V/s). /*! - * This function returns the mobilities. In some formulations - * this is equal to the normal mobility multiplied by Faraday's constant. + * This function returns the mobilities. In some formulations this is equal + * 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[ - * \mu^e_k = \frac{F D_k}{R T} - * \f] + * \f[ + * \mu^e_k = \frac{F D_k}{R T} + * \f] * - * @param mobil Returns the mobilities of the species in array \c mobil. The array must be - * dimensioned at least as large as the number of species. + * @param mobil Returns the mobilities of the species in array \c mobil. + * The array must be dimensioned at least as large as the + * number of species. */ virtual void getMobilities(doublereal* const mobil); //! Update the internal parameters whenever the temperature has changed /*! - * This is called whenever a transport property is requested if - * the temperature has changed since the last call to update_T(). + * This is called whenever a transport property is requested if the + * temperature has changed since the last call to update_T(). */ virtual void update_T(); //! Update the internal parameters whenever the concentrations have changed /*! - * This is called whenever a transport property is requested if the - * concentrations have changed since the last call to update_C(). + * This is called whenever a transport property is requested if the + * concentrations have changed since the last call to update_C(). */ virtual void update_C(); //! Get the species diffusive mass fluxes wrt to the mass 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. * * The diffusive mass flux of species \e k is computed from * \f[ - * \vec{j}_k = -n M_k D_k \nabla X_k. + * \vec{j}_k = -n M_k D_k \nabla X_k. * \f] * - * @param ndim Number of dimensions in the flux expressions - * @param grad_T Gradient of the temperature - * (length = ndim) - * @param ldx Leading dimension of the grad_X array - * (usually equal to m_nsp but not always) - * @param grad_X Gradients of the mole fraction - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim - * @param ldf Leading dimension of the fluxes array - * (usually equal to m_nsp but not always) - * @param fluxes Output of the diffusive mass fluxes - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param ndim Number of dimensions in the flux expressions + * @param grad_T Gradient of the temperature (length = ndim) + * @param ldx Leading dimension of the grad_X array + * (usually equal to m_nsp but not always) + * @param grad_X Gradients of the mole fraction. Flat vector with the + * m_nsp in the inner loop. length = ldx * ndim + * @param ldf Leading dimension of the fluxes array + * (usually equal to m_nsp but not always) + * @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, size_t ldx, const doublereal* const grad_X, @@ -167,7 +165,8 @@ private: 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 * assumed to be independent of pressure @@ -176,8 +175,8 @@ private: //! vector of species thermal conductivities (W/m /K) /*! - * 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. + * 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. */ vector_fp m_cond; diff --git a/include/cantera/transport/MultiTransport.h b/include/cantera/transport/MultiTransport.h index 141bc500a..186d3d2e2 100644 --- a/include/cantera/transport/MultiTransport.h +++ b/include/cantera/transport/MultiTransport.h @@ -28,7 +28,7 @@ class MultiTransport : public GasTransport public: //! 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); @@ -42,10 +42,11 @@ public: //! Return the thermal diffusion coefficients (kg/m/s) /*! - * Eqn. (12.126) displays how they are calculated. The reference work is from - * Dixon-Lewis. + * Eqn. (12.126) displays how they are calculated. The reference work is + * 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 */ @@ -58,39 +59,35 @@ public: //! Get the species diffusive mass fluxes wrt to the mass 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. * - * @param ndim Number of dimensions in the flux expressions - * @param grad_T Gradient of the temperature - * (length = ndim) - * @param ldx Leading dimension of the grad_X array - * (usually equal to m_nsp but not always) - * @param grad_X Gradients of the mole fraction - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim - * @param ldf Leading dimension of the fluxes array - * (usually equal to m_nsp but not always) - * @param fluxes Output of the diffusive mass fluxes - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param ndim Number of dimensions in the flux expressions + * @param grad_T Gradient of the temperature (length = ndim) + * @param ldx Leading dimension of the grad_X array. (usually equal to + * m_nsp but not always) + * @param grad_X Gradients of the mole fraction. Flat vector with the + * m_nsp in the inner loop. length = ldx * ndim + * @param ldf Leading dimension of the fluxes array. (usually equal to + * m_nsp but not always) + * @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, size_t ldx, const doublereal* const grad_X, size_t ldf, doublereal* const fluxes); - //! Get the molar diffusional fluxes [kmol/m^2/s] of the species, given the thermodynamic - //! state at two nearby points. + //! Get the molar diffusional fluxes [kmol/m^2/s] of the species, given the + //! thermodynamic state at two nearby points. /*! - * The molar diffusional fluxes are calculated with reference to the mass averaged - * velocity. This is a one-dimensional vector + * The molar diffusional fluxes are calculated with reference to the mass + * averaged velocity. This is a one-dimensional vector * * @param state1 Array of temperature, density, and mass * fractions for state 1. * @param state2 Array of temperature, density, and mass * fractions for state 2. * @param delta Distance from state 1 to state 2 (m). - * @param fluxes Output molar fluxes of the species. - * (length = m_nsp) + * @param fluxes Output molar fluxes of the species. (length = m_nsp) */ virtual void getMolarFluxes(const doublereal* const state1, const doublereal* const state2, @@ -108,8 +105,7 @@ public: * @param state2 Array of temperature, density, and mass * fractions for state 2. * @param delta Distance from state 1 to state 2 (m). - * @param fluxes Output mass fluxes of the species. - * (length = m_nsp) + * @param fluxes Output mass fluxes of the species. (length = m_nsp) */ virtual void getMassFluxes(const doublereal* state1, const doublereal* state2, doublereal delta, @@ -118,10 +114,12 @@ public: virtual void init(ThermoPhase* thermo, int mode=0, int log_level=0); protected: - //! Update basic temperature-dependent quantities if the temperature has changed. + //! Update basic temperature-dependent quantities if the temperature has + //! changed. 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(); //! Update the temperature-dependent terms needed to compute the thermal diff --git a/include/cantera/transport/SimpleTransport.h b/include/cantera/transport/SimpleTransport.h index 5800903fb..e68d221e9 100644 --- a/include/cantera/transport/SimpleTransport.h +++ b/include/cantera/transport/SimpleTransport.h @@ -11,169 +11,169 @@ namespace Cantera { -//! Class SimpleTransport implements mixture-averaged transport -//! properties for liquid phases. +//! Class SimpleTransport implements mixture-averaged transport properties for +//! 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 - * following equation p. 297 (12.1) + * The velocity of species i may be described by the following equation p. 297 + * (12.1) * - * \f[ + * \f[ * c_i \nabla \mu_i = R T \sum_j \frac{c_i c_j}{c_T D_{ij}} * (\mathbf{v}_j - \mathbf{v}_i) - * \f] + * \f] * * This as written is degenerate by 1 dof. * - * To fix this we must add in the definition of the mass averaged - * velocity of the solution. We will call the simple bold-faced - * \f$\mathbf{v} \f$ - * symbol the mass-averaged velocity. Then, the relation - * between \f$\mathbf{v}\f$ and the individual species velocities is - * \f$\mathbf{v}_i\f$ + * To fix this we must add in the definition of the mass averaged velocity of + * the solution. We will call the simple bold-faced \f$\mathbf{v} \f$ symbol the + * mass-averaged velocity. Then, the relation between \f$\mathbf{v}\f$ and the + * individual species velocities is \f$\mathbf{v}_i\f$ * - * \f[ - * \rho_i \mathbf{v}_i = \rho_i \mathbf{v} + \mathbf{j}_i - * \f] - * where \f$\mathbf{j}_i\f$ are the diffusional fluxes of species i - * with respect to the mass averaged velocity and + * \f[ + * \rho_i \mathbf{v}_i = \rho_i \mathbf{v} + \mathbf{j}_i + * \f] + * where \f$\mathbf{j}_i\f$ are the diffusional fluxes of species i with respect + * to the mass averaged velocity and * - * \f[ - * \sum_i \mathbf{j}_i = 0 - * \f] + * \f[ + * \sum_i \mathbf{j}_i = 0 + * \f] * - * and + * and * - * \f[ + * \f[ * \sum_i \rho_i \mathbf{v}_i = \rho \mathbf{v} - * \f] + * \f] * * Using these definitions, we can write * - * \f[ - * \mathbf{v}_i = \mathbf{v} + \frac{\mathbf{j}_i}{\rho_i} - * \f] + * \f[ + * \mathbf{v}_i = \mathbf{v} + \frac{\mathbf{j}_i}{\rho_i} + * \f] * - * \f[ - * 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}) - * = R T \sum_j \frac{1}{D_{ij}} - * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i}) - * \f] + * \f[ + * 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}) + * = R T \sum_j \frac{1}{D_{ij}} + * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i}) + * \f] * * The equations that we actually solve are * - * \f[ + * \f[ * c_i \nabla \mu_i = * = R T \sum_j \frac{1}{D_{ij}} * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i}) - * \f] - * and we replace the 0th equation with the following: + * \f] + * and we replace the 0th equation with the following: * - * \f[ - * \sum_i \mathbf{j}_i = 0 - * \f] + * \f[ + * \sum_i \mathbf{j}_i = 0 + * \f] * - * When there are charged species, we replace the RHS with the - * gradient of the electrochemical potential to obtain the - * modified equation + * When there are charged species, we replace the RHS with the gradient of the + * electrochemical potential to obtain the modified equation * - * \f[ - * c_i \nabla \mu_i + c_i F z_i \nabla \Phi - * = R T \sum_j \frac{1}{D_{ij}} - * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i}) - * \f] + * \f[ + * c_i \nabla \mu_i + c_i F z_i \nabla \Phi + * = R T \sum_j \frac{1}{D_{ij}} + * (\frac{x_i \mathbf{j}_j}{M_j} - \frac{x_j \mathbf{j}_i}{M_i}) + * \f] * - * With this formulation we may solve for the diffusion velocities, - * without having to worry about what the mass averaged velocity - * is. + * With this formulation we may solve for the diffusion velocities, without + * having to worry about what the mass averaged velocity is. * - *

Viscosity Calculation

+ *

Viscosity Calculation

* - * The viscosity calculation may be broken down into two parts. - * In the first part, the viscosity of the pure species are calculated - * In the second part, a mixing rule is applied. There are two mixing rules. - * Solvent-only and mixture-averaged. + * The viscosity calculation may be broken down into two parts. In the first + * part, the viscosity of the pure species are calculated In the second part, a + * mixing rule is applied. There are two mixing rules. Solvent-only and mixture- + * averaged. * - * For the solvent-only mixing rule, we use the pure species viscosity calculated for - * the solvent as the viscosity of the entire mixture. For the mixture averaged rule - * we do a mole fraction based average of the pure species viscosities: + * For the solvent-only mixing rule, we use the pure species viscosity + * calculated for the solvent as the viscosity of the entire mixture. For the + * mixture averaged rule we do a mole fraction based average of the pure species + * viscosities: * - * Solvent-only: - * \f[ - * \mu = \mu_0 - * \f] - * Mixture-average: - * \f[ - * \mu = \sum_k {\mu_k X_k} - * \f] + * Solvent-only: + * \f[ + * \mu = \mu_0 + * \f] + * Mixture-average: + * \f[ + * \mu = \sum_k {\mu_k X_k} + * \f] * - *

Calculate of the Binary Diffusion Coefficients

+ *

Calculate of the Binary Diffusion Coefficients

* - * The binary diffusion coefficients are obtained from the pure species diffusion coefficients - * using an additive process + * The binary diffusion coefficients are obtained from the pure species + * diffusion coefficients using an additive process * - * \f[ - * D_{i,j} = \frac{1}{2} \left( D^0_i(T) + D^0_j(T) \right) - * \f] + * \f[ + * D_{i,j} = \frac{1}{2} \left( D^0_i(T) + D^0_j(T) \right) + * \f] * - *

Electrical Mobilities

+ *

Electrical Mobilities

* - * 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[ - * \mu^e_k = \frac{F D_k}{R T} - * \f] + * \f[ + * \mu^e_k = \frac{F D_k}{R T} + * \f] * - * The diffusion coefficients, \f$ D_k \f$ , is calculated from a call to the mixture diffusion - * coefficient routine. + * The diffusion coefficients, \f$ D_k \f$ , is calculated from a call to the + * mixture diffusion coefficient routine. * - *

Species Diffusive Fluxes

+ *

Species Diffusive Fluxes

* - * The diffusive mass flux of species \e k is computed from the following - * formula + * The diffusive mass flux of species \e k is computed from the following + * formula * - * Usually the specified solution average velocity is the mass averaged velocity. - * This is changed in some subclasses, however. + * Usually the specified solution average velocity is the mass averaged + * velocity. This is changed in some subclasses, however. * - * \f[ - * j_k = - c^T M_k D_k \nabla X_k - \rho Y_k V_c - * \f] + * \f[ + * j_k = - c^T M_k D_k \nabla X_k - \rho Y_k V_c + * \f] * - * where V_c is the correction velocity + * where V_c is the correction velocity * - * \f[ - * \rho V_c = - \sum_j {c^T M_j D_j \nabla X_j} - * \f] + * \f[ + * \rho V_c = - \sum_j {c^T M_j D_j \nabla X_j} + * \f] * - * In the above equation, \f$ D_k \f$ is the mixture diffusivity for species k 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. + * In the above equation, \f$ D_k \f$ is the mixture diffusivity for species k + * 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[ - * 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[ + * 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] * - * where V_c is the correction velocity + * where V_c is the correction velocity * - * \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 - * \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 + * \f] * - *

Species Diffusional Velocities

+ *

Species Diffusional Velocities

* - * Species diffusional velocities are calculated from the species diffusional fluxes, within this object, - * using the following formula for the diffusional velocity of the kth species, \f$ V_k^d \f$ + * Species diffusional velocities are calculated from the species diffusional + * fluxes, within this object, using the following formula for the diffusional + * velocity of the kth species, \f$ V_k^d \f$ * - * \f[ - * j_k = \rho Y_k V_k^d - * \f] + * \f[ + * j_k = \rho Y_k V_k^d + * \f] * - * TODO - * This object has to be made compatible with different types of reference velocities. Right now, elements - * of the formulas are only compatible with the mass-averaged velocity. + * TODO: This object has to be made compatible with different types of reference + * velocities. Right now, elements of the formulas are only compatible with the + * mass-averaged velocity. * * @ingroup tranprops */ @@ -182,10 +182,10 @@ class SimpleTransport : public Transport public: //! Default constructor. /*! - * This requires call to initLiquid(LiquidTransportParams& tr) - * after filling LiquidTransportParams to complete instantiation. - * The filling of LiquidTransportParams is currently carried out - * in the TransportFactory class, but might be moved at some point. + * This requires call to initLiquid(LiquidTransportParams& tr) after filling + * LiquidTransportParams to complete instantiation. The filling of + * LiquidTransportParams is currently carried out in the TransportFactory + * class, but might be moved at some point. * * @param thermo ThermoPhase object holding species information. * @param ndim Number of spatial dimensions. @@ -234,20 +234,16 @@ public: //! Returns the pure species viscosities /*! - * The pure species viscosities are to be given in an Arrhenius - * form in accordance with activated-jump-process dominated transport. + * The pure species viscosities are to be given in an Arrhenius form in + * accordance with activated-jump-process dominated transport. * * 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); //! Returns the binary diffusion coefficients - /*! - * @param ld - * @param d - */ virtual void getBinaryDiffCoeffs(const size_t ld, doublereal* const d); //! Get the Mixture diffusion coefficients @@ -270,19 +266,18 @@ public: * The thermal is computed using the general mixture rules * 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: - * \f[ - * \lambda = \lambda_0 - * - * \f] + * \f[ + * \lambda = \lambda_0 + * \f] * Mixture-average: - * \f[ - * \lambda = \sum_k {\lambda_k X_k} - * \f] + * \f[ + * \lambda = \sum_k {\lambda_k X_k} + * \f] * * 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 * 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 grad_T Gradient of the temperature - * (length = ndim) - * @param ldx Leading dimension of the grad_X array - * (usually equal to m_nsp but not always) - * @param grad_X Gradients of the mole fraction - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim - * @param ldf Leading dimension of the fluxes array - * (usually equal to m_nsp but not always) - * @param Vdiff Output of the diffusive velocities. - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param ndim Number of dimensions in the flux expressions + * @param grad_T Gradient of the temperature (length = ndim) + * @param ldx Leading dimension of the grad_X array (usually equal to + * m_nsp but not always) + * @param grad_X Gradients of the mole fraction. Flat vector with the m_nsp + * in the inner loop. length = ldx * ndim + * @param ldf Leading dimension of the fluxes array (usually equal to + * m_nsp but not always) + * @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, const doublereal* grad_T, @@ -343,57 +335,54 @@ public: int ldf, doublereal* Vdiff); - //! Get the species diffusive velocities wrt to the averaged velocity, - //! given the gradients in mole fraction, temperature and electrostatic potential. + //! Get the species diffusive velocities wrt to the averaged velocity, given + //! the gradients in mole fraction, temperature and electrostatic potential. /*! * The average velocity can be computed on a mole-weighted * or mass-weighted basis, or the diffusion velocities may * be specified as relative to a specific species (i.e. a * 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 grad_T Gradient of the temperature - * (length = ndim) - * @param ldx Leading dimension of the grad_X array - * (usually equal to m_nsp but not always) - * @param grad_X Gradients of the mole fraction - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim - * @param ldf Leading dimension of the fluxes array - * (usually equal to m_nsp but not always) - * @param grad_Phi Gradients of the electrostatic potential - * (length = ndim) - * @param Vdiff Output of the species diffusion velocities - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param ndim Number of dimensions in the flux expressions + * @param grad_T Gradient of the temperature (length = ndim) + * @param ldx Leading dimension of the grad_X array (usually equal + * to m_nsp but not always) + * @param grad_X Gradients of the mole fraction. Flat vector with the + * m_nsp in the inner loop. length = ldx * ndim + * @param ldf Leading dimension of the fluxes array (usually equal to + * m_nsp but not always) + * @param grad_Phi Gradients of the electrostatic potential (length = + * 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, int ldx, const doublereal* grad_X, int ldf, const doublereal* grad_Phi, doublereal* Vdiff); - //! Get the species diffusive mass fluxes wrt to the specified solution averaged velocity, - //! given the gradients in mole fraction and temperature + //! Get the species diffusive mass fluxes wrt to the specified solution + //! 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 - * formula + * The diffusive mass flux of species \e k is computed from the following + * formula * - * Usually the specified solution average velocity is the mass averaged velocity. - * This is changed in some subclasses, however. + * Usually the specified solution average velocity is the mass averaged + * velocity. This is changed in some subclasses, however. * - * \f[ - * j_k = - \rho M_k D_k \nabla X_k - Y_k V_c - * \f] + * \f[ + * j_k = - \rho M_k D_k \nabla X_k - Y_k V_c + * \f] * - * where V_c is the correction velocity + * where V_c is the correction velocity * - * \f[ - * V_c = - \sum_j {\rho M_j D_j \nabla X_j} - * \f] + * \f[ + * V_c = - \sum_j {\rho M_j D_j \nabla X_j} + * \f] * * @param ndim The number of spatial dimensions (1, 2, or 3). * @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 ldf, doublereal* const fluxes); - //! Return the species diffusive mass fluxes wrt to - //! the mass averaged velocity, + //! Return the species diffusive mass fluxes wrt to the mass averaged + //! velocity, /*! - * units = kg/m2/s + * units = kg/m2/s * * Internally, gradients in the in mole fraction, temperature * 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 * formula * - * \f[ - * j_k = - \rho M_k D_k \nabla X_k - Y_k V_c - * \f] + * \f[ + * j_k = - \rho M_k D_k \nabla X_k - Y_k V_c + * \f] * - * where V_c is the correction velocity + * where V_c is the correction velocity * - * \f[ - * V_c = - \sum_j {\rho M_j D_j \nabla X_j} - * \f] + * \f[ + * V_c = - \sum_j {\rho M_j D_j \nabla X_j} + * \f] * - * @param ldf stride of the fluxes array. Must be equal to - * or greater than the number of species. - * @param fluxes Vector of calculated fluxes + * @param ldf stride of the fluxes array. Must be equal to or greater + * than the number of species. + * @param fluxes Vector of calculated fluxes */ virtual void getSpeciesFluxesExt(size_t ldf, doublereal* fluxes); protected: - //! Handles the effects of changes in the Temperature, internally - //! within the object. + //! Handles the effects of changes in the Temperature, internally within the + //! object. /*! - * This is called whenever a transport property is requested. - * The first task is to check whether the temperature has changed - * since the last call to update_T(). - * If it hasn't then an immediate return is carried out. + * This is called whenever a transport property is requested. The first task + * is to check whether the temperature has changed since the last call to + * update_T(). If it hasn't then an immediate return is carried out. * * @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 /*! - * This is called for every interface call to check whether - * the concentrations have changed. Concentrations change - * whenever the pressure or the mole fraction has changed. - * If it has changed, the recalculations should be done. + * This is called for every interface call to check whether the + * concentrations have changed. Concentrations change whenever the pressure + * or the mole fraction has changed. If it has changed, the recalculations + * should be done. * - * Note this should be a lightweight function since it's - * part of all of the interfaces. + * Note this should be a lightweight function since it's part of all of the + * interfaces. */ virtual bool update_C(); - //! Update the temperature-dependent viscosity terms. - //! Updates the array of pure species viscosities, and the - //! weighting functions in the viscosity mixture rule. + //! Update the temperature-dependent viscosity terms. Updates the array of + //! pure species viscosities, and the weighting functions in the viscosity + //! mixture rule. /*! * The flag m_visc_temp_ok is set to true. */ @@ -472,25 +460,25 @@ protected: //! Update the concentration parts of the viscosities /*! - * Internal routine is run whenever the update_boolean is false. This - * routine will calculate internal values for the species viscosities. + * Internal routine is run whenever the update_boolean is false. This + * routine will calculate internal values for the species viscosities. */ void updateViscosities_C(); //! 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(); private: //! Temperature dependence type /*! - * The following coefficients are allowed to have simple - * temperature dependencies: - * mixture viscosity - * mixture thermal conductivity - * diffusitivy + * The following coefficients are allowed to have simple temperature + * dependencies: + * - mixture viscosity + * - mixture thermal conductivity + * - diffusitivy * * Types of temperature dependencies: * 0 - Independent of temperature (only one implemented so far) @@ -501,12 +489,12 @@ private: //! 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 - * mixture thermal conductivity - * - * Permissible types of composition dependencies + * Permissible types of composition dependencies * 0 - Solvent values (i.e., species 0) contributes only * 1 - linear combination of mole fractions; */ @@ -524,7 +512,7 @@ private: //! 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; @@ -542,16 +530,14 @@ private: //! Internal value of the gradient of the mole fraction vector /*! - * Note, this is the only gradient value that can and perhaps - * should reflect the true state of the mole fractions in the - * application solution vector. In other words no cropping or - * massaging of the values to make sure they are above zero - * should occur. - developing .... + * Note, this is the only gradient value that can and perhaps should reflect + * the true state of the mole fractions in the application solution vector. + * In other words no cropping or massaging of the values to make sure they + * are above zero should occur. - developing .... * * m_nsp is the number of species in the fluid * k is the species index - * n is the dimensional index (x, y, or z). It has a length - * equal to m_nDim + * n is the dimensional index (x, y, or z). It has a length equal to m_nDim * * m_Grad_X[n*m_nsp + k] */ @@ -559,31 +545,31 @@ private: //! Internal value of the gradient of the Temperature vector /*! - * Generally, if a transport property needs this in its evaluation it - * will look to this place to get it. + * Generally, if a transport property needs this in its evaluation it + * will look to this place to get it. * - * No internal property is precalculated based on gradients. Gradients - * are assumed to be freshly updated before every property call. + * No internal property is precalculated based on gradients. Gradients + * are assumed to be freshly updated before every property call. */ vector_fp m_Grad_T; //! Internal value of the gradient of the Pressure vector /*! - * Generally, if a transport property needs this in its evaluation it - * will look to this place to get it. + * Generally, if a transport property needs this in its evaluation it + * will look to this place to get it. * - * No internal property is precalculated based on gradients. Gradients - * are assumed to be freshly updated before every property call. + * No internal property is precalculated based on gradients. Gradients + * are assumed to be freshly updated before every property call. */ vector_fp m_Grad_P; //! Internal value of the gradient of the Electric Voltage /*! - * Generally, if a transport property needs this in its evaluation it - * will look to this place to get it. + * Generally, if a transport property needs this in its evaluation it + * will look to this place to get it. * - * No internal property is precalculated based on gradients. Gradients - * are assumed to be freshly updated before every property call. + * No internal property is precalculated based on gradients. Gradients + * are assumed to be freshly updated before every property call. */ vector_fp m_Grad_V; @@ -591,20 +577,20 @@ private: //! Vector of Species Diffusivities /*! - * Depends on the temperature. We have set the pressure dependence - * to zero for this liquid phase constituitve model + * Depends on the temperature. We have set the pressure dependence to zero + * for this liquid phase constituitve model * - * units m2/s + * units m2/s */ vector_fp m_diffSpecies; //! Species viscosities /*! - * Viscosity of the species - * Length = number of species + * Viscosity of the species + * Length = number of species * - * Depends on the temperature. We have set the pressure dependence - * to zero for this model + * Depends on the temperature. We have set the pressure dependence to zero + * for this model * * controlling update boolean -> m_visc_temp_ok */ @@ -626,10 +612,10 @@ private: //! 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 - * and they are assumed to add up to one exactly. This mole - * fraction vector comes from the ThermoPhase object. Derivative - * quantities from this are referred to as bounded. + * The mole fractions here are assumed to be bounded by 0.0 and 1.0 and they + * are assumed to add up to one exactly. This mole fraction vector comes + * from the ThermoPhase object. Derivative quantities from this are referred + * to as bounded. * * Update info? * length = m_nsp @@ -638,8 +624,8 @@ private: //! Local copy of the concentrations of the species in the phase /*! - * The concentrations are consistent with the m_molefracs - * vector which is bounded and sums to one. + * The concentrations are consistent with the m_molefracs vector which is + * bounded and sums to one. * * Update info? * length = m_nsp @@ -648,8 +634,7 @@ private: //! Local copy of the total concentration. /*! - * This is consistent with the m_concentrations[] and - * m_molefracs[] vector. + * This is consistent with the m_concentrations[] and m_molefracs[] vector. */ doublereal concTot_; @@ -661,14 +646,14 @@ private: //! 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; //! Current Temperature -> locally stored /*! - * This is used to test whether new temperature computations - * should be performed. + * This is used to test whether new temperature computations should be + * performed. */ doublereal m_temp; diff --git a/include/cantera/transport/SolidTransport.h b/include/cantera/transport/SolidTransport.h index 6323ee571..d7f231d1c 100644 --- a/include/cantera/transport/SolidTransport.h +++ b/include/cantera/transport/SolidTransport.h @@ -31,21 +31,21 @@ public: //! Returns the ionic conductivity of the phase /*! - * The thermo phase needs to be updated (temperature) prior to calling this. - * The ionConductivity calculation is handled by subclasses of - * LTPspecies as specified in the input file. + * The thermo phase needs to be updated (temperature) prior to calling this. + * The ionConductivity calculation is handled by subclasses of LTPspecies as + * specified in the input file. */ virtual doublereal ionConductivity(); //! Returns the thermal conductivity of the phase /*! - * The thermo phase needs to be updated (temperature) prior to calling this. - * The thermalConductivity calculation is handled by subclasses of - * LTPspecies as specified in the input file. + * The thermo phase needs to be updated (temperature) prior to calling this. + * The thermalConductivity calculation is handled by subclasses of + * LTPspecies as specified in the input file. * - * There is also a legacy method to evaluate + * There is also a legacy method to evaluate * \f[ - * \lambda = A T^n \exp(-E/RT) + * \lambda = A T^n \exp(-E/RT) * \f] */ virtual doublereal thermalConductivity(); @@ -63,15 +63,15 @@ public: /*! * The diffusivity of defects in the solid (m^2/s). The thermo phase needs - * to be updated (temperature) prior to calling this. The - * defectDiffusivity calculation is handled by subclasses of LTPspecies - * as specified in the input file. + * to be updated (temperature) prior to calling this. The defectDiffusivity + * calculation is handled by subclasses of LTPspecies as specified in the + * input file. */ virtual doublereal defectDiffusivity(); /** - * The activity of defects in the solid. - * At some point this should be variable and the diffusion coefficient should depend on it. + * The activity of defects in the solid. At some point this should be + * variable and the diffusion coefficient should depend on it. * * The thermo phase needs to be updated (temperature) prior to calling this. * The defectActivity calculation is handled by subclasses of @@ -83,7 +83,7 @@ public: * The diffusion coefficients are computed from * * \f[ - * D_k = A_k T^{n_k} \exp(-E_k/RT). + * D_k = A_k T^{n_k} \exp(-E_k/RT). * \f] * * 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 * SolidTransportParams class that is filled in TransportFactory. * - * @param tr Transport parameters for all of the species - * in the phase. + * @param tr Transport parameters for all of the species in the phase. */ virtual bool initSolid(SolidTransportData& tr); private: //! Model type for the ionic conductivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* m_ionConductivity; //! Model type for the thermal conductivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* m_thermalConductivity; //! Model type for the electrical conductivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* m_electConductivity; - //! 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 - */ + //! Model type for the defectDiffusivity -- or more like a defect + //! diffusivity in the context of the solid phase. LTPspecies* m_defectDiffusivity; //! Model type for the defectActivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* m_defectActivity; //! number of mobile species diff --git a/include/cantera/transport/SolidTransportData.h b/include/cantera/transport/SolidTransportData.h index 97bb2ddd6..912edb412 100644 --- a/include/cantera/transport/SolidTransportData.h +++ b/include/cantera/transport/SolidTransportData.h @@ -12,21 +12,20 @@ namespace Cantera { -//! Class SolidTransportData holds transport parameters for a -//! specific solid-phase species. +//! Class SolidTransportData holds transport parameters for a specific solid- +//! phase species. /*! * A SolidTransportData object is created for a solid phase * (not for each species as happens for the analogous LiquidTransportData). * * This class is mainly used to collect transport properties from the parse * phase in the TranportFactory and transfer them to the Transport class. - * Transport properties are expressed by subclasses of LTPspecies. Note that - * we use the liquid phase species model for the solid phases. That is, for - * the time being at least, we ignore mixing models for solid phases and just + * Transport properties are expressed by subclasses of LTPspecies. Note that we + * use the liquid phase species model for the solid phases. That is, for the + * 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 - * property for a species in the liquid phase. One may need to be careful - * about deleting pointers to LTPspecies objects created in the - * TransportFactory. + * property for a species in the liquid phase. One may need to be careful about + * deleting pointers to LTPspecies objects created in the TransportFactory. * * All of the pointers in this class are shallow pointers. Therefore, this is * a passthrough class, which keeps track of pointer ownership by zeroing @@ -45,33 +44,18 @@ public: std::string speciesName; //! Model type for the ionic conductivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* ionConductivity; //! Model type for the thermal conductivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* thermalConductivity; //! Model type for the electrical conductivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* electConductivity; //! 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; //! Model type for the defectActivity - /*! - * shallow pointer that should be zero during destructor - */ LTPspecies* defectActivity; }; diff --git a/include/cantera/transport/Tortuosity.h b/include/cantera/transport/Tortuosity.h index db40716b3..df65a991b 100644 --- a/include/cantera/transport/Tortuosity.h +++ b/include/cantera/transport/Tortuosity.h @@ -20,10 +20,10 @@ namespace Cantera //! in porous media using the Bruggeman exponent /*! * Class to compute the increase in diffusive path length associated with - * tortuous path diffusion through, for example, porous media. - * This base class implementation relates tortuosity to volume fraction - * through a power-law relationship that goes back to Bruggeman. The - * exponent is referred to as the Bruggeman exponent. + * tortuous path diffusion through, for example, porous media. This base class + * implementation relates tortuosity to volume fraction through a power-law + * relationship that goes back to Bruggeman. The exponent is referred to as the + * Bruggeman exponent. * * 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, * \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 - * coefficient, and \f$ X_i \f$, the mole fraction with Fickian - * transport assumed.) - * - * The tortuosity comes into play in conjunction the the + * \f$ C_T \f$, the total concentration, \f$ D_i \f$, the diffusion coefficient, + * and \f$ X_i \f$, the mole fraction with Fickian transport assumed.) */ class Tortuosity { @@ -59,26 +56,26 @@ public: //! 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$. + * 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$. */ virtual double McMillan(double porosity) { return pow(porosity, expBrug_); } 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_; }; -/** This class implements transport coefficient corrections - * appropriate for porous media where percolation theory applies. - * It is derived from the Tortuosity class. +/** + * This class implements transport coefficient corrections appropriate for + * porous media where percolation theory applies. */ class TortuosityPercolation : public Tortuosity { @@ -87,26 +84,10 @@ public: 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) { 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) { return pow((porosity - percolationThreshold_) / (1.0 - percolationThreshold_), @@ -120,28 +101,26 @@ protected: /** * The McMillan number (ratio of effective conductivity * to non-porous conductivity) is - * \f[ \kappa/\kappa_0 = ( \phi - \phi_c )^\mu \f] - * 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. + * \f[ + * \kappa/\kappa_0 = ( \phi - \phi_c )^\mu + * \f] + * 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_; }; -/** This class implements transport coefficient corrections - * appropriate for porous media with a dispersed phase. - * This model goes back to Maxwell. The formula for the - * conductivity is expressed in terms of the volume fraction - * of the continuous phase, \f$ \phi \f$, and the relative - * conductivities of the dispersed and continuous phases, - * \f$ r = \kappa_d / \kappa_0 \f$. For dilute particle - * suspensions the effective conductivity is +/** + * This class implements transport coefficient corrections appropriate for + * porous media with a dispersed phase. This model goes back to Maxwell. The + * formula for the conductivity is expressed in terms of the volume fraction of + * the continuous phase, \f$ \phi \f$, and the relative conductivities of the + * dispersed and continuous phases, \f$ r = \kappa_d / \kappa_0 \f$. For dilute + * particle suspensions the effective conductivity is * \f[ - * \kappa / \kappa_0 = 1 + 3 ( 1 - \phi ) ( r - 1 ) / ( r + 2 ) - * + O(\phi^2) + * \kappa / \kappa_0 = 1 + 3 ( 1 - \phi ) ( r - 1 ) / ( r + 2 ) + O(\phi^2) * \f] - * The class is derived from the Tortuosity class. */ class TortuosityMaxwell : public Tortuosity { @@ -150,26 +129,10 @@ public: 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) { 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) { return 1 + 3 * (1.0 - porosity) * (relativeConductivites_ - 1.0) / (relativeConductivites_ + 2); } diff --git a/include/cantera/transport/TransportBase.h b/include/cantera/transport/TransportBase.h index 77e7ec47a..aaf704ff8 100644 --- a/include/cantera/transport/TransportBase.h +++ b/include/cantera/transport/TransportBase.h @@ -1,11 +1,8 @@ /** - * @file TransportBase.h - * Headers for the Transport object, which is the virtual base class - * for all transport property evaluators and also includes the - * tranprops group definition - * (see \ref tranprops and \link Cantera::Transport Transport \endlink) . - * - * Provides class Transport. + * @file TransportBase.h Headers for the Transport object, which is the virtual + * base class for all transport property evaluators and also includes the + * tranprops group definition (see \ref tranprops and \link + * Cantera::Transport Transport \endlink) . */ // 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 //! fluid velocity. /*! - * Most typical is to reference the diffusion fluxes to the mass averaged velocity, but - * referencing to the mole averaged velocity is suitable for some - * liquid flows, and referencing to a single species is suitable for - * solid phase transport within a lattice. Currently, the identity of the reference - * velocity is coded into each transport object as a typedef named VelocityBasis, which - * is equated to an integer. Negative values of this variable refer to mass or mole-averaged - * velocities. Zero or positive quantities refers to the reference - * velocity being referenced to a particular species. Below are the predefined constants - * for its value. + * Most typical is to reference the diffusion fluxes to the mass averaged + * velocity, but referencing to the mole averaged velocity is suitable for some + * liquid flows, and referencing to a single species is suitable for solid phase + * transport within a lattice. Currently, the identity of the reference + * velocity is coded into each transport object as a typedef named + * VelocityBasis, which is equated to an integer. Negative values of this + * variable refer to mass or mole-averaged velocities. Zero or positive + * quantities refers to the reference velocity being referenced to a particular + * species. Below are the predefined constants for its value. * - * - VB_MASSAVG Diffusion velocities are based on the mass averaged velocity - * - 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_3 Diffusion velocities are based on the relative motion wrt species 3 + * - VB_MASSAVG Diffusion velocities are based on the mass averaged velocity + * - 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_3 Diffusion velocities are based on the relative motion wrt species 3 * * @ingroup tranprops */ @@ -95,76 +92,73 @@ const VelocityBasis VB_SPECIES_3 = 3; //! Base class for transport property managers. /*! - * All classes that compute transport properties for a single phase derive - * from this class. Class Transport is meant to be used as a base class - * only. It is possible to instantiate it, but its methods throw exceptions - * if called. + * All classes that compute transport properties for a single phase derive from + * this class. Class Transport is meant to be used as a base class only. It is + * possible to instantiate it, but its methods throw exceptions if called. * *
*

Relationship of the Transport class to the ThermoPhase Class

*
* - * This section describes how calculations are carried out within - * the Transport class. The Transport class and derived classes of the - * the Transport class necessarily use the ThermoPhase class to obtain - * the list of species and the thermodynamic state of the phase. + * This section describes how calculations are carried out within the Transport + * class. The Transport class and derived classes of the the Transport class + * necessarily use the ThermoPhase class to obtain the list of species and the + * thermodynamic state of the phase. * - * No state information is stored within Transport classes. Queries to the - * underlying ThermoPhase object must be made to obtain the state of the - * system. + * No state information is stored within Transport classes. Queries to the + * underlying ThermoPhase object must be made to obtain the state of the system. * - * An exception to this however is the state information concerning the - * the gradients of variables. This information is not stored within - * the ThermoPhase objects. It may be collected within the Transport objects. - * In fact, the meaning of const operations within the Transport class - * refers to calculations which do not change the state of the - * system nor the state of the first order gradients of the system. + * An exception to this however is the state information concerning the the + * gradients of variables. This information is not stored within the ThermoPhase + * objects. It may be collected within the Transport objects. In fact, the + * meaning of const operations within the Transport class refers to calculations + * which do not change the state of the system nor the state of the first order + * gradients of the system. * - * When a const operation is evoked within the Transport class, it is - * also implicitly assumed that the underlying state within the ThermoPhase - * object has not changed its values. + * When a const operation is evoked within the Transport class, it is also + * implicitly assumed that the underlying state within the ThermoPhase object + * has not changed its values. * *
*

Diffusion Fluxes and their Relationship to Reference Velocities

*
* - * The diffusion fluxes must be referenced to a particular reference fluid - * velocity. Most typical is to reference the diffusion fluxes to the mass - * averaged velocity, but referencing to the mole averaged velocity is suitable - * for some liquid flows, and referencing to a single species is suitable for - * solid phase transport within a lattice. Currently, the identity of the - * reference velocity is coded into each transport object as a typedef named - * VelocityBasis, which is equated to an integer. Negative values of this - * variable refer to mass or mole-averaged velocities. Zero or positive - * quantities refers to the reference velocity being referenced to a particular - * species. Below are the predefined constants for its value. + * The diffusion fluxes must be referenced to a particular reference fluid + * velocity. Most typical is to reference the diffusion fluxes to the mass + * averaged velocity, but referencing to the mole averaged velocity is suitable + * for some liquid flows, and referencing to a single species is suitable for + * solid phase transport within a lattice. Currently, the identity of the + * reference velocity is coded into each transport object as a typedef named + * VelocityBasis, which is equated to an integer. Negative values of this + * variable refer to mass or mole-averaged velocities. Zero or positive + * quantities refers to the reference velocity being referenced to a particular + * species. Below are the predefined constants for its value. * - * - VB_MASSAVG Diffusion velocities are based on the mass averaged velocity - * - 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_3 Diffusion velocities are based on the relative motion wrt species 3 + * - VB_MASSAVG Diffusion velocities are based on the mass averaged velocity + * - 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_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 gas phase transport managers by default specify the mass-averaged velocity as their - * reference velocities. + * All transport managers specify a default reference velocity in their default + * constructors. All gas phase transport managers by default specify the mass- + * 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. * - * @ingroup tranprops + * @ingroup tranprops */ class Transport { public: //! Constructor. /*! - * New transport managers should be created using - * TransportFactory, not by calling the constructor directly. + * New transport managers should be created using TransportFactory, not by + * calling the constructor directly. * - * @param thermo Pointer to the ThermoPhase class representing - * this phase. - * @param ndim Dimension of the flux vector used in the calculation. + * @param thermo Pointer to the ThermoPhase class representing this phase. + * @param ndim Dimension of the flux vector used in the calculation. * * @see TransportFactory */ @@ -176,11 +170,11 @@ public: //! Duplication routine for objects which inherit from Transport /*! - * This virtual routine can be used to duplicate objects derived from - * Transport even if the application only has a pointer to Transport to - * work with. + * This virtual routine can be used to duplicate objects derived from + * Transport even if the application only has a pointer to Transport to work + * with. * - * These routines are basically wrappers around the derived copy + * These routines are basically wrappers around the derived copy * constructor. */ // Note ->need working copy constructors and operator=() functions for all first @@ -222,13 +216,13 @@ public: return m_nDim; } - //! Check that the specified species index is in range - //! Throws an exception if k is greater than nSpecies() + //! Check that the specified species index is in range. Throws an exception + //! if k is greater than nSpecies() void checkSpeciesIndex(size_t k) const; - //! Check that an array size is at least nSpecies() - //! Throws an exception if kk is less than nSpecies(). Used before calls - //! which take an array pointer. + //! Check that an array size is at least nSpecies(). Throws an exception if + //! kk is less than nSpecies(). Used before calls which take an array + //! pointer. void checkSpeciesArraySize(size_t kk) const; /** @@ -245,7 +239,7 @@ public: //! 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 */ @@ -253,19 +247,17 @@ public: throw NotImplementedError("Transport::getSpeciesViscosities"); } - /** - * The bulk viscosity in Pa-s. The bulk viscosity is only - * non-zero in rare cases. Most transport managers either - * overload this method to return zero, or do not implement + //! The bulk viscosity in Pa-s. + /*! + * The bulk viscosity is only non-zero in rare cases. Most transport + * managers either overload this method to return zero, or do not implement * it, in which case an exception is thrown if called. */ virtual doublereal bulkViscosity() { throw NotImplementedError("Transport::bulkViscosity"); } - /** - * The ionic conductivity in 1/ohm/m. - */ + //! The ionic conductivity in 1/ohm/m. virtual doublereal ionConductivity() { throw NotImplementedError("Transport::ionConductivity"); } @@ -282,17 +274,18 @@ public: //! 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. - * The mobility ratio mobRat(i,j) is defined as the ratio of the - * mobility of species i to species j. + * @param mobRat Returns a matrix of mobility ratios for the current + * problem. The mobility ratio mobRat(i,j) is defined as the + * ratio of the mobility of species i to species 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 * - * 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) { throw NotImplementedError("Transport::mobilityRatio"); @@ -300,7 +293,7 @@ public: //! 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 */ @@ -310,28 +303,28 @@ public: //! Returns the self diffusion coefficients of the species in the phase /*! - * The self diffusion coefficient is the diffusion coefficient of a tracer - * species at the current temperature and composition of the species. - * Therefore, the dilute limit of transport is assumed for the tracer - * species. The effective formula may be calculated from the Stefan-Maxwell - * 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 - * 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. + * The self diffusion coefficient is the diffusion coefficient of a tracer + * species at the current temperature and composition of the species. + * Therefore, the dilute limit of transport is assumed for the tracer + * species. The effective formula may be calculated from the Stefan-Maxwell + * 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 + * 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. * - * \f[ - * J_k = - D^{sd}_k \frac{C_k}{R T} \nabla \mu_k - * \f] + * \f[ + * J_k = - D^{sd}_k \frac{C_k}{R T} \nabla \mu_k + * \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 - * LiquidTranInteraction as specified in the input file. - * These in turn employ subclasses of LTPspecies to - * determine the individual species self diffusion coeffs. + * The self diffusion calculation is handled by subclasses of + * LiquidTranInteraction as specified in the input file. These in turn + * employ subclasses of LTPspecies to determine the individual species self + * diffusion coeffs. * - * @param selfDiff Vector of self-diffusion coefficients. Length = number - * of species in phase. units = m**2 s-1. + * @param selfDiff Vector of self-diffusion coefficients. Length = number + * of species in phase. units = m**2 s-1. */ virtual void selfDiffusion(doublereal* const selfDiff) { throw NotImplementedError("Transport::selfDiffusion"); @@ -339,8 +332,8 @@ public: //! Returns the pure species self diffusion in solution of each species /*! - * The pure species molar volumes are evaluated using the appropriate - * subclasses of LTPspecies as specified in the input file. + * The pure species molar volumes are evaluated using the appropriate + * subclasses of LTPspecies as specified in the input file. * * @param selfDiff array of length "number of species" * to hold returned self diffusion coeffs. @@ -349,9 +342,9 @@ public: 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. */ @@ -359,24 +352,22 @@ public: throw NotImplementedError("Transport::thermalConductivity"); } - /*! - * The electrical conductivity (Siemens/m). - */ + //! The electrical conductivity (Siemens/m). virtual doublereal electricalConductivity() { throw NotImplementedError("Transport::electricalConductivity"); } //! Get the Electrical mobilities (m^2/V/s). /*! - * This function returns the mobilities. In some formulations - * this is equal to the normal mobility multiplied by Faraday's constant. + * This function returns the mobilities. In some formulations this is equal + * to the normal mobility multiplied by Faraday's constant. * - * Frequently, but not always, the mobility is calculated from the - * diffusion coefficient using the Einstein relation + * Frequently, but not always, the mobility is calculated from the diffusion + * coefficient using the Einstein relation * - * \f[ - * \mu^e_k = \frac{F D_k}{R T} - * \f] + * \f[ + * \mu^e_k = \frac{F D_k}{R T} + * \f] * * @param mobil_e Returns the mobilities of the species in array \c * mobil_e. The array must be dimensioned at least as large as @@ -388,16 +379,16 @@ public: //! Get the fluid mobilities (s kmol/kg). /*! - * This function returns the fluid mobilities. Usually, you have - * to multiply Faraday's constant into the resulting expression - * to general a species flux expression. + * This function returns the fluid mobilities. Usually, you have to multiply + * Faraday's constant into the resulting expression to general a species + * flux expression. * - * Frequently, but not always, the mobility is calculated from the - * diffusion coefficient using the Einstein relation + * Frequently, but not always, the mobility is calculated from the diffusion + * coefficient using the Einstein relation * - * \f[ - * \mu^f_k = \frac{D_k}{R T} - * \f] + * \f[ + * \mu^f_k = \frac{D_k}{R T} + * \f] * * @param mobil_f Returns the mobilities of the species in array \c mobil. * 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 //! conditions of the phase (Siemens m-1) /*! - * The electrical conductivity, \f$ \sigma \f$, relates the electric - * current density, J, to the electric field, E. + * The electrical conductivity, \f$ \sigma \f$, relates the electric current + * density, J, to the electric field, E. * - * \f[ - * \vec{J} = \sigma \vec{E} - * \f] + * \f[ + * \vec{J} = \sigma \vec{E} + * \f] * - * We assume here that the mixture electrical conductivity is an isotropic - * quantity, at this stage. Tensors may be included at a later time. + * We assume here that the mixture electrical conductivity is an isotropic + * 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() { throw NotImplementedError("Transport::getElectricConduct"); @@ -432,8 +423,8 @@ public: //! Compute the electric current density in A/m^2 /*! - * Calculates the electric current density as a vector, given - * the gradients of the field variables. + * Calculates the electric current density as a vector, given the gradients + * of the field variables. * * @param ndim The number of spatial dimensions (1, 2, or 3). * @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 //! 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 - * velocity. This is changed in some subclasses, however. + * Usually the specified solution average velocity is the mass averaged + * velocity. This is changed in some subclasses, however. * - * @param ndim Number of dimensions in the flux expressions - * @param grad_T Gradient of the temperature - * (length = ndim) - * @param ldx Leading dimension of the grad_X array - * (usually equal to m_nsp but not always) - * @param grad_X Gradients of the mole fraction - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim - * @param ldf Leading dimension of the fluxes array - * (usually equal to m_nsp but not always) - * @param fluxes Output of the diffusive mass fluxes - * Flat vector with the m_nsp in the inner loop. - * length = ldx * ndim + * @param ndim Number of dimensions in the flux expressions + * @param grad_T Gradient of the temperature (length = ndim) + * @param ldx Leading dimension of the grad_X array (usually equal to + * m_nsp but not always) + * @param grad_X Gradients of the mole fraction Flat vector with the + * m_nsp in the inner loop. length = ldx * ndim + * @param ldf Leading dimension of the fluxes array (usually equal to + * m_nsp but not always) + * @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, size_t ldx, const doublereal* const grad_X, @@ -483,7 +471,7 @@ public: //! given the gradients in mole fraction, temperature and electrostatic //! 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] grad_T Gradient of the temperature. (length = ndim) @@ -535,8 +523,8 @@ public: //! given the gradients in mole fraction, temperature, and electrostatic //! potential. /*! - * @param[in] ndim Number of dimensions in the flux expressions - * @param[in] grad_T Gradient of the temperature (length = ndim) + * @param[in] ndim Number of dimensions in the flux expressions + * @param[in] grad_T Gradient of the temperature (length = ndim) * @param[in] ldx Leading dimension of the grad_X array (usually equal to * m_nsp but not always) * @param[in] grad_X Gradients of the mole fraction. Flat vector with the @@ -547,7 +535,7 @@ public: * (length = ndim) * @param[out] Vdiff Diffusive velocities wrt the mass-averaged velocity. * 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, const doublereal* grad_T, @@ -578,8 +566,8 @@ public: throw NotImplementedError("Transport::getMolarFluxes"); } - //! Get the mass fluxes [kg/m^2/s], given the thermodynamic state at two - //! nearby points. + //! Get the mass fluxes [kg/m^2/s], given the thermodynamic state at two + //! nearby points. /*! * @param[in] state1 Array of temperature, density, and mass * fractions for state 1. @@ -603,11 +591,11 @@ public: * diffusive mass flux of species k induced by the local temperature * gradient is given by the following formula: * - * \f[ - * M_k J_k = -D^T_k \nabla \ln T. - * \f] + * \f[ + * M_k J_k = -D^T_k \nabla \ln T. + * \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 * 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]. /*! - * @param[in] ld Inner stride for writing the two dimension diffusion - * coefficients into a one dimensional vector - * @param[out] d Diffusion coefficient matrix (must be at least m_k * m_k - * in length. + * @param[in] ld Inner stride for writing the two dimension diffusion + * coefficients into a one dimensional vector + * @param[out] d Diffusion coefficient matrix (must be at least m_k * m_k + * in length. */ virtual void getBinaryDiffCoeffs(const size_t ld, doublereal* const d) { throw NotImplementedError("Transport::getBinaryDiffCoeffs"); @@ -634,8 +622,8 @@ public: * model, then this method returns the array of multicomponent * diffusion coefficients. Otherwise it throws an exception. * - * @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[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. * d[ld*j+i] is the D_ij diffusion coefficient (the diffusion * coefficient for species i due to species j). */ @@ -669,41 +657,41 @@ public: //! Set model parameters for derived classes /*! - * This method may be derived in subclasses to set model-specific - * 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 base Transport pointer. + * This method may be derived in subclasses to set model-specific + * 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 base Transport pointer. * - * @param type Specifies the type of parameters to set + * @param type Specifies the type of parameters to set * 0 : Diffusion coefficient * 1 : Thermal Conductivity * The rest are currently unused. - * @param k Species index to set the parameters on - * @param p Vector of parameters. The length of the vector - * varies with the parameterization - * @deprecated + * @param k Species index to set the parameters on + * @param p Vector of parameters. The length of the vector varies with + * the parameterization + * @deprecated */ virtual void setParameters(const int type, const int k, const doublereal* const p); //! Sets the velocity basis /*! - * What the transport object does with this parameter is up to the - * individual operator. Currently, this is not functional for most - * transport operators including all of the gas-phase operators. + * What the transport object does with this parameter is up to the + * individual operator. Currently, this is not functional for most transport + * operators including all of the gas-phase operators. * - * @param ivb Species the velocity basis + * @param ivb Species the velocity basis */ void setVelocityBasis(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 - * individual operator. Currently, this is not functional for most - * transport operators including all of the gas-phase operators. + * What the transport object does with this parameter is up to the + * individual operator. Currently, this is not functional for most transport + * operators including all of the gas-phase operators. * - * @return Returns the velocity basis + * @returns the velocity basis */ VelocityBasis getVelocityBasis() const { return m_velocityBasis; @@ -717,13 +705,13 @@ public: //! Initialize a transport manager /*! - * This routine sets up a transport manager. It calculates the collision - * integrals and populates species-dependent data structures. + * This routine sets up a transport manager. It calculates the collision + * integrals and populates species-dependent data structures. * - * @param thermo Pointer to the ThermoPhase object - * @param mode Chemkin compatible mode or not. This alters the + * @param thermo Pointer to the ThermoPhase object + * @param mode Chemkin compatible mode or not. This alters the * 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) { throw NotImplementedError("Transport::init"); @@ -731,11 +719,11 @@ public: //! Called by TransportFactory to set parameters. /*! - * This is called by classes that use the liquid phase parameter - * list to initialize themselves. + * This is called by classes that use the liquid phase parameter list to + * initialize themselves. * - * @param tr Reference to the parameter list that will be used - * to initialize the class + * @param tr Reference to the parameter list that will be used to initialize + * the class */ virtual bool initLiquid(LiquidTransportParams& tr) { throw NotImplementedError("Transport::initLiquid"); @@ -743,11 +731,11 @@ public: //! Called by TransportFactory to set parameters. /*! - * This is called by classes that use the solid phase parameter - * list to initialize themselves. + * This is called by classes that use the solid phase parameter list to + * initialize themselves. * - * @param tr Reference to the parameter list that will be used - * to initialize the class + * @param tr Reference to the parameter list that will be used to initialize + * the class */ virtual bool initSolid(SolidTransportData& tr) { throw NotImplementedError("Transport::initSolid"); @@ -755,17 +743,16 @@ public: //! Specifies the ThermoPhase object. /*! - * We have relaxed this operation so that it will succeed when - * the underlying old and new ThermoPhase objects have the same - * number of species and the same names of the species in the - * same order. The idea here is to allow copy constructors and duplicators - * to work. In order for them to work, we need a method to switch the - * internal pointer within the Transport object after the duplication - * takes place. Also, different thermodynamic instantiations of the same - * species should also work. + * We have relaxed this operation so that it will succeed when the + * underlying old and new ThermoPhase objects have the same number of + * species and the same names of the species in the same order. The idea + * here is to allow copy constructors and duplicators to work. In order for + * them to work, we need a method to switch the internal pointer within the + * Transport object after the duplication takes place. Also, different + * thermodynamic instantiations of the same species should also work. * - * @param thermo Reference to the ThermoPhase object that - * the transport object will use + * @param thermo Reference to the ThermoPhase object that the transport + * object will use */ 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; - //! true if finalize has been called + //! true if finalize has been called bool m_ready; //! Number of species @@ -792,8 +779,8 @@ protected: //! Number of dimensions used in flux expressions size_t m_nDim; - //! Velocity basis from which diffusion velocities are computed. - //! Defaults to the mass averaged basis = -2 + //! Velocity basis from which diffusion velocities are computed. + //! Defaults to the mass averaged basis = -2 int m_velocityBasis; }; diff --git a/include/cantera/transport/TransportFactory.h b/include/cantera/transport/TransportFactory.h index 092b22935..708763a2f 100644 --- a/include/cantera/transport/TransportFactory.h +++ b/include/cantera/transport/TransportFactory.h @@ -60,14 +60,14 @@ public: //! 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 - * function of temperature and possibly composition. It's a factory for - * LTPspecies classes. + * This method operates at the level of a single transport property as a + * function of temperature and possibly composition. It's a factory for + * LTPspecies classes. * - * @param trNode XML node - * @param name reference to the name - * @param tp_ind TransportPropertyType class - * @param thermo Pointer to the ThermoPhase class + * @param trNode XML node + * @param name reference to the name + * @param tp_ind TransportPropertyType class + * @param thermo Pointer to the ThermoPhase class */ virtual LTPspecies* newLTP(const XML_Node& trNode, const std::string& name, TransportPropertyType tp_ind, thermo_t* thermo); @@ -75,12 +75,13 @@ public: //! Factory function for the construction of new LiquidTranInteraction //! objects, which are transport models. /*! - * This method operates at the level of a single mixture transport property. Individual species - * transport properties are addressed by the LTPspecies returned by newLTP. + * This method operates at the level of a single mixture transport property. + * Individual species transport properties are addressed by the LTPspecies + * returned by newLTP. * - * @param trNode XML_Node containing the information for the interaction - * @param tp_ind TransportPropertyType object - * @param trParam reference to the LiquidTransportParams object + * @param trNode XML_Node containing the information for the interaction + * @param tp_ind TransportPropertyType object + * @param trParam reference to the LiquidTransportParams object */ virtual LiquidTranInteraction* newLTI(const XML_Node& trNode, TransportPropertyType tp_ind, @@ -100,17 +101,17 @@ public: //! Build a new transport manager using the default transport manager //! in the phase description and return a base class pointer to it /*! - * @param thermo ThermoPhase object - * @param log_level log level + * @param thermo ThermoPhase object + * @param log_level log level */ virtual Transport* newTransport(thermo_t* thermo, int log_level=0); //! Initialize an existing transport manager for liquid phase /*! - * This routine sets up an existing liquid-phase transport manager. It is - * similar to initTransport except that it uses the LiquidTransportParams - * class and calls setupLiquidTransport(). + * This routine sets up an existing liquid-phase transport manager. It is + * similar to initTransport except that it uses the LiquidTransportParams + * class and calls setupLiquidTransport(). * * @param tr Pointer to the Transport manager * @param thermo Pointer to the ThermoPhase object @@ -121,9 +122,9 @@ public: private: //! Initialize an existing transport manager for solid phase /*! - * This routine sets up an existing solid-phase transport manager. - * It is similar to initTransport except that it uses the SolidTransportData - * class and calls setupSolidTransport(). + * This routine sets up an existing solid-phase transport manager. It is + * similar to initTransport except that it uses the SolidTransportData class + * and calls setupSolidTransport(). * * @param tr Pointer to the Transport manager * @param thermo Pointer to the ThermoPhase object @@ -135,34 +136,36 @@ private: //! object allowed 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; //! The constructor is private; use static method factory() to //! get a pointer to a factory instance /*! - * The default constructor for this class sets up - * m_models[], a mapping between the string name - * for a transport model and the integer name. + * The default constructor for this class sets up m_models[], a mapping + * between the string name for a transport model and the integer name. */ TransportFactory(); - //! Read transport property data from a file for a list of species that comprise - //! the phase. + //! Read transport property data from a file for a list of species that + //! comprise the phase. /*! - * Given a vector of pointers to species XML data bases - * and a list of species names, this method constructs the LiquidTransport - * Params object containing the transport data for these species. + * Given a vector of pointers to species XML data bases and a list of + * species names, this method constructs the LiquidTransport Params object + * containing the transport data for these species. * - * It is an error to not find a "transport" XML element within each of the species - * XML elements listed in the names vector. + * It is an error to not find a "transport" XML element within each of the + * species XML elements listed in the names vector. * - * @param db Reference to a vector of XML_Node pointers containing the species XML - * nodes. - * @param log Reference to an XML log file. (currently unused) - * @param names Vector of names of species. On output, tr will contain transport data - * for each of of these names in the order determined by this vector. - * @param tr Reference to the LiquidTransportParams object that will contain the results. + * @param db Reference to a vector of XML_Node pointers containing the + * species XML nodes. + * @param log Reference to an XML log file. (currently unused) + * @param names Vector of names of species. On output, tr will contain + * transport data for each of of these names in the order + * determined by this vector. + * @param tr Reference to the LiquidTransportParams object that will + * contain the results. */ void getLiquidSpeciesTransportData(const std::vector &db, XML_Node& log, const std::vector& names, @@ -170,18 +173,20 @@ private: //! Read transport property data from a file for interactions between species. /*! - * Given the XML_Node database for transport interactions defined within the current phase - * and a list of species names within the phase, this method returns an - * instance of TransportParams containing the transport data for + * Given the XML_Node database for transport interactions defined within the + * current phase and a list of species names within the phase, this method + * returns an instance of TransportParams containing the transport data for * these species read from the file. * * This routine reads interaction parameters between species within 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 names Vector of names of species. On output, tr will contain transport data - * for each of of these names in the order determined by this vector. - * @param tr Reference to the LiquidTransportParams object that will contain the results. + * @param phaseTran_db Reference to the transport XML field for the phase + * @param log Reference to an XML log file. (currently unused) + * @param names Vector of names of species. On output, tr will + * contain transport data for each of of these names in + * 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, const std::vector& names, LiquidTransportParams& tr); @@ -192,9 +197,10 @@ private: * SolidTransportData object containing the transport data for the phase. * * @param transportNode Reference to XML_Node containing the phase. - * @param log Reference to an XML log file. (currently unused) - * @param phaseName name of the corresponding phase - * @param tr Reference to the SolidTransportData object that will contain the results. + * @param log Reference to an XML log file. (currently unused) + * @param phaseName name of the corresponding phase + * @param tr Reference to the SolidTransportData object that will + * contain the results. */ void getSolidTransportData(const XML_Node& transportNode, XML_Node& log, @@ -204,17 +210,17 @@ private: //! Prepare to build a new transport manager for liquids assuming that //! viscosity transport data is provided in Arrhenius form. /*! - * @param thermo Pointer to the ThermoPhase object - * @param log_level log level - * @param trParam LiquidTransportParams structure to be filled up with information + * @param thermo Pointer to the ThermoPhase object + * @param log_level log level + * @param trParam LiquidTransportParams structure to be filled up with information */ void setupLiquidTransport(thermo_t* thermo, int log_level, LiquidTransportParams& trParam); //! Prepare to build a new transport manager for solids /*! - * @param thermo Pointer to the ThermoPhase object - * @param log_level log level - * @param trParam SolidTransportData structure to be filled up with information + * @param thermo Pointer to the ThermoPhase object + * @param log_level log level + * @param trParam SolidTransportData structure to be filled up with information */ void setupSolidTransport(thermo_t* thermo, int log_level, SolidTransportData& trParam); @@ -238,14 +244,15 @@ private: std::map m_LTImodelMap; }; -//! Create a new transport manager instance. +//! Create a new transport manager instance. /*! - * @param transportModel String identifying the transport model to be - * instantiated, defaults to the empty string - * @param thermo ThermoPhase object associated with the phase, defaults to null pointer - * @param loglevel int containing the Loglevel, defaults to zero - * @param f ptr to the TransportFactory object if it's been malloced. - * @param ndim Number of dimensions for transport fluxes + * @param transportModel String identifying the transport model to be + * instantiated, defaults to the empty string + * @param thermo ThermoPhase object associated with the phase, defaults + * to null pointer + * @param loglevel int containing the Loglevel, defaults to zero + * @param f ptr to the TransportFactory object if it's been malloced. + * @param ndim Number of dimensions for transport fluxes * * @ingroup tranprops */ @@ -254,11 +261,10 @@ Transport* newTransportMgr(const std::string& transportModel = "", thermo_t* the //! Create a new transport manager instance. /*! - * @param thermo ThermoPhase object associated with the phase - * @param loglevel int containing the Loglevel, defaults to zero - * @param f ptr to the TransportFactory object if it's been - * allocated. - * @return Returns a transport manager for the phase + * @param thermo ThermoPhase object associated with the phase + * @param loglevel int containing the Loglevel, defaults to zero + * @param f ptr to the TransportFactory object if it's been allocated + * @returns a transport manager for the phase * * @ingroup tranprops */ diff --git a/include/cantera/transport/WaterTransport.h b/include/cantera/transport/WaterTransport.h index 6eae10a12..6c83b0f66 100644 --- a/include/cantera/transport/WaterTransport.h +++ b/include/cantera/transport/WaterTransport.h @@ -44,21 +44,19 @@ public: return cWaterTransport; } - //! Returns the viscosity of water at the current conditions - //! (kg/m/s) + //! Returns the viscosity of water at the current conditions (kg/m/s) /*! - * This function calculates the value of the viscosity of pure - * water at the current T and P. + * This function calculates the value of the viscosity of pure water 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, + * "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 - * Formulations for the Viscosity and Thermal Conductivity of - * Water Substance", J. Phys. Chem. Ref. Data, 15, 1291 (1986). - * - * 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. + * 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(); @@ -69,17 +67,17 @@ public: //! Returns the thermal conductivity of water at the current conditions //! (W/m/K) /*! - * This function calculates the value of the thermal conductivity of - * water at the current T and P. + * This function calculates the value of the thermal conductivity of water + * at the current T and P. * - * 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). + * 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). * - * 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. + * 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 thermalConductivity(); @@ -97,8 +95,8 @@ private: //! Pointer to the WaterProps object /*! - * This class is used to house several approximation - * routines for properties of water. + * This class is used to house several approximation routines for properties + * of water. * * This object owns m_waterProps, and the WaterPropsIAPWS object used by * WaterProps is m_sub, which is defined above. @@ -107,7 +105,7 @@ private: //! 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; }; diff --git a/src/transport/GasTransport.cpp b/src/transport/GasTransport.cpp index f8e4408fe..499d1ffe6 100644 --- a/src/transport/GasTransport.cpp +++ b/src/transport/GasTransport.cpp @@ -408,8 +408,8 @@ void GasTransport::setupMM() // the effective well depth for (i,j) collisions m_epsilon(i,j) = sqrt(m_eps[i]*m_eps[j]); - // The polynomial fits of collision integrals vs. T* - // will be done for the T* from tstar_min to tstar_max + // The polynomial fits of collision integrals vs. T* + // 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_max = std::max(tstar_max, Boltzmann * m_thermo->maxTemp()/m_epsilon(i,j)); diff --git a/src/transport/HighPressureGasTransport.cpp b/src/transport/HighPressureGasTransport.cpp index 5dd521161..5e78e6589 100644 --- a/src/transport/HighPressureGasTransport.cpp +++ b/src/transport/HighPressureGasTransport.cpp @@ -23,8 +23,6 @@ using namespace std; namespace Cantera { -//////////////////// class HighPressureGasTransport methods ////////////// - HighPressureGasTransport::HighPressureGasTransport(thermo_t* 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 j = 0; j < nsp; j++) { // 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_j = std::max(Tiny, molefracs[j]); @@ -171,18 +169,18 @@ void HighPressureGasTransport::getBinaryDiffCoeffs(const size_t ld, doublereal* P_corr_ij = 1; }else { // 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); // 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) { P_corr_ij = Tiny; } } // 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); } } @@ -213,9 +211,8 @@ void HighPressureGasTransport::getMultiDiffCoeffs(const size_t ld, doublereal* c update_T(); // Evaluate the binary diffusion coefficients from the polynomial fits - // this should perhaps be preceded by a check for changes in T, P, or C. - //if (!m_bindiff_ok) { updateDiff_T(); - //} + if (ld < m_nsp) { throw CanteraError("HighPressureTransport::getMultiDiffCoeffs()", "ld is too small"); diff --git a/src/transport/LTPspecies.cpp b/src/transport/LTPspecies.cpp index c821f0784..bad007607 100644 --- a/src/transport/LTPspecies.cpp +++ b/src/transport/LTPspecies.cpp @@ -33,16 +33,15 @@ public: * k = A T^(b) exp (-E_a / RT) * \f] * - * @param node XML_Node to be read - * @param A Output pre-exponential factor. The units are variable. - * @param b output temperature power - * @param E Output activation energy in units of Kelvin + * @param node XML_Node to be read + * @param A Output pre-exponential factor. The units are variable. + * @param b output temperature power + * @param E Output activation energy in units of Kelvin */ static void getArrhenius(const XML_Node& node, 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"); b = getFloat(node, "b"); E = getFloat(node, "E", "actEnergy"); diff --git a/src/transport/LiquidTransport.cpp b/src/transport/LiquidTransport.cpp index 1aa1d9e4c..3cc323f3d 100644 --- a/src/transport/LiquidTransport.cpp +++ b/src/transport/LiquidTransport.cpp @@ -212,13 +212,13 @@ LiquidTransport::~LiquidTransport() 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_velocityBasis = tr.velocityBasis_; m_nsp = m_thermo->nSpecies(); 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_viscSpecies.resize(m_nsp, 0.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 copy(m_thermo->molecularWeights().begin(), m_thermo->molecularWeights().end(), m_mw.begin()); - // First populate mixing rules and indices - // (NOTE, we transfer pointers of malloced quantities. We zero out pointers so that - // we only have one copy of the malloced quantity) + // First populate mixing rules and indices (NOTE, we transfer pointers of + // malloced quantities. We zero out pointers so that we only have one copy + // of the malloced quantity) for (size_t k = 0; k < m_nsp; k++) { m_selfDiffMixModel[k] = tr.selfDiffusion[k]; tr.selfDiffusion[k] = 0; @@ -279,13 +279,10 @@ bool LiquidTransport::initLiquid(LiquidTransportParams& tr) ltd.hydroRadius = 0; } - /* - * Get the input Species Diffusivities - * Note that species diffusivities are not what is needed. - * Rather the Stefan Boltzmann interaction parameters are - * needed for the current model. This section may, therefore, - * be extraneous. - */ + // Get the input Species Diffusivities. Note that species diffusivities are + // not what is needed. Rather the Stefan Boltzmann interaction parameters + // are needed for the current model. This section may, therefore, be + // extraneous. m_diffTempDep_Ns.resize(m_nsp, 0); //for each species, assign viscosity model and coefficients 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 filled in TransportFactory::getLiquidInteractionsTransportData - * Interaction models are provided here for viscosity, thermal conductivity, - * species diffusivity and hydrodynamics radius (perhaps not needed in the - * present class). - */ + // Here we get interaction parameters from LiquidTransportParams that were + // filled in TransportFactory::getLiquidInteractionsTransportData + // Interaction models are provided here for viscosity, thermal conductivity, + // species diffusivity and hydrodynamics radius (perhaps not needed in the + // present class). m_viscMixModel = tr.viscosity; tr.viscosity = 0; @@ -328,8 +323,7 @@ bool LiquidTransport::initLiquid(LiquidTransportParams& tr) m_bdiff.resize(m_nsp,m_nsp, 0.0); - //Don't really need to update this here. - //It is updated in updateDiff_T() + // Don't really need to update this here. It is updated in updateDiff_T() m_diffMixModel->getMatrixTransProp(m_bdiff); m_mode = tr.mode_; @@ -736,7 +730,6 @@ bool LiquidTransport::update_T() // temperature has changed, so polynomial temperature // interpolations will need to be reevaluated. - // This means that many concentration m_visc_conc_ok = false; m_ionCond_conc_ok = false; m_mobRat_conc_ok = false; @@ -754,8 +747,7 @@ bool LiquidTransport::update_T() bool LiquidTransport::update_C() { - // If the pressure has changed then the concentrations - // have changed. + // If the pressure has changed then the concentrations have changed. doublereal pres = m_thermo->pressure(); bool qReturn = true; if (pres != m_press) { @@ -785,9 +777,8 @@ bool LiquidTransport::update_C() return false; } - // signal that concentration-dependent quantities will need to - // be recomputed before use, and update the local mole - // fractions. + // signal that concentration-dependent quantities will need to be recomputed + // before use, and update the local mole fractions. m_visc_conc_ok = false; m_ionCond_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) const doublereal vol = m_thermo->molarVolume(); - /* - * Update the temperature, concentrations and diffusion coefficients in the mixture. - */ + //! Update the temperature, concentrations and diffusion coefficients in the + //! mixture. update_T(); update_C(); 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. - * They are still fortran ordered, so that i varies fastest. - */ + // 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. double condSum1; const doublereal invRT = 1.0 / (GasConstant * T); switch (m_nDim) { - case 1: /* 1-D approximation */ + case 1: // 1-D approximation 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++) { if (m_velocityBasis == VB_MOLEAVG) { 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); condSum1 = 0; for (size_t i = 0; i < m_nsp; i++) { condSum1 -= Faraday*m_chargeSpecies[i]*m_B(i,0)*m_molefracs_tran[i]/vol; } break; - case 2: /* 2-D approximation */ + case 2: // 2-D approximation m_B(0,0) = 0.0; m_B(0,1) = 0.0; //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); break; - case 3: /* 3-D approximation */ + case 3: // 3-D approximation m_B(0,0) = 0.0; m_B(0,1) = 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++) { if (m_velocityBasis == VB_MOLEAVG) { 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); break; default: diff --git a/src/transport/MMCollisionInt.h b/src/transport/MMCollisionInt.h index b99abd900..d7a9b374b 100644 --- a/src/transport/MMCollisionInt.h +++ b/src/transport/MMCollisionInt.h @@ -14,9 +14,9 @@ namespace Cantera //! Calculation of Collision integrals /*! - * This class provides functions that - * interpolate the tabulated collision integrals in Monchick and - * Mason, "Transport Properties of Polar Gases," J. Chem. Phys. (1961) + * This class provides functions that interpolate the tabulated collision + * integrals in Monchick and Mason, "Transport Properties of Polar Gases," J. + * Chem. Phys. (1961) * * @ingroup tranprops */ @@ -60,10 +60,7 @@ private: //! Table of omega22 values from MM static doublereal omega22_table[37*8]; - //! tstar - /*! - * table of tstar values - */ + //! table of tstar values static doublereal tstar[39]; //! astar table from MM diff --git a/src/transport/MixTransport.cpp b/src/transport/MixTransport.cpp index ea537098d..c57b76433 100644 --- a/src/transport/MixTransport.cpp +++ b/src/transport/MixTransport.cpp @@ -139,9 +139,8 @@ void MixTransport::update_T() void MixTransport::update_C() { - // signal that concentration-dependent quantities will need to - // be recomputed before use, and update the local mole - // fractions. + // signal that concentration-dependent quantities will need to be recomputed + // before use, and update the local mole fractions. m_visc_ok = false; m_condmix_ok = false; m_thermo->getMoleFractions(m_molefracs.data()); diff --git a/src/transport/MultiTransport.cpp b/src/transport/MultiTransport.cpp index ad566de8c..eafb3ac27 100644 --- a/src/transport/MultiTransport.cpp +++ b/src/transport/MultiTransport.cpp @@ -19,10 +19,10 @@ namespace Cantera ///////////////////// 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 sqtr square root of tr. + * @param tr Reduced temperature \f$ \epsilon/kT \f$ + * @param sqtr square root of tr. */ inline doublereal Frot(doublereal tr, doublereal sqtr) { @@ -116,28 +116,24 @@ void MultiTransport::solveLMatrixEquation() return; } - // Copy the mole fractions twice into the last two blocks of - // the right-hand-side vector m_b. The first block of m_b was - // set to zero when it was created, and is not modified so - // doesn't need to be reset to zero. + // Copy the mole fractions twice into the last two blocks of the right-hand- + // side vector m_b. The first block of m_b was set to zero when it was + // created, and is not modified so doesn't need to be reset to zero. for (size_t k = 0; k < m_nsp; k++) { m_b[k] = 0.0; m_b[k + 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 - // all species with no internal energy modes. The - // corresponding third-block rows and columns will be set to - // zero, except on the diagonal of L01,01, where they are set - // to 1.0. This has the effect of eliminating these equations - // from the system, since the equation becomes: m_a[2*m_nsp + - // k] = 0.0. + // Set the right-hand side vector to zero in the 3rd block for all species + // with no internal energy modes. The corresponding third-block rows and + // columns will be set to zero, except on the diagonal of L01,01, where they + // are set to 1.0. This has the effect of eliminating these equations from + // the system, since the equation becomes: m_a[2*m_nsp + k] = 0.0. - // Note that this differs from the Chemkin procedure, where - // all *monatomic* species are excluded. Since monatomic - // radicals can have non-zero internal heat capacities due to - // electronic excitation, they should be retained. + // Note that this differs from the Chemkin procedure, where all *monatomic* + // species are excluded. Since monatomic radicals can have non-zero internal + // heat capacities due to electronic excitation, they should be retained. for (size_t k = 0; k < m_nsp; k++) { if (!hasInternalModes(k)) { m_b[2*m_nsp + k] = 0.0; @@ -158,9 +154,8 @@ void MultiTransport::solveLMatrixEquation() eval_L0110(); eval_L0101(m_molefracs.data()); - // Solve it using GMRES or LU decomposition. The last solution - // in m_a should provide a good starting guess, so convergence - // should be fast. + // Solve it using GMRES or LU decomposition. The last solution in m_a should + // provide a good starting guess, so convergence should be fast. copy(m_b.begin(), m_b.end(), m_a.begin()); try { solve(m_Lmatrix, m_a.data()); @@ -252,9 +247,8 @@ void MultiTransport::getSpeciesFluxes(size_t ndim, const doublereal* const grad_ size_t offset; doublereal pp = pressure_ig(); - // multiply diffusion velocities by rho * V to create - // mass fluxes, and restore the gradx elements that were - // modified + // multiply diffusion velocities by rho * V to create mass fluxes, and + // restore the gradx elements that were modified for (size_t n = 0; n < ndim; n++) { offset = n*ldf; 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; } - // enforce the condition \sum Y_k V_k = 0. This is done by - // replacing the flux equation with the largest gradx - // component with the flux balance condition. + // enforce the condition \sum Y_k V_k = 0. This is done by replacing the + // flux equation with the largest gradx component with the flux balance + // condition. size_t jmax = 0; doublereal gradmax = -1.0; 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 sum; for (size_t i = 0; i < m_nsp; i++) { - // subtract-off the k=i term to account for the first delta - // function in Eq. (12.121) + // subtract-off the k=i term to account for the first delta + // function in Eq. (12.121) sum = -x[i]/m_bdiff(i,i); for (size_t k = 0; k < m_nsp; 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) / ((wj + m_mw[i]) * m_bdiff(j,i)); - // the next term is independent of "j"; - // need to do it for the "j,j" term + // the next term is independent of "j"; + // need to do it for the "j,j" term sum -= m_Lmatrix(i,j+m_nsp); } m_Lmatrix(j,j+m_nsp) += sum; @@ -622,12 +616,12 @@ void MultiTransport::eval_L1001(const doublereal* x) size_t n2 = 2*m_nsp; int npoly = 0; 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)) { constant = prefactor*m_mw[j]*x[j]*m_crot[j]/(m_cinternal[j]*m_rotrelax[j]); sum = 0.0; 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_mw[j] + m_mw[i]) * m_bdiff(j,i)); 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; for (size_t i = 0; i < m_nsp; 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]; constant2 = 12.00*m_mw[i]*m_crot[i] / (fivepi*m_cinternal[i]*m_rotrelax[i]); sum = 0.0; for (size_t k = 0; k < m_nsp; k++) { - // see Eq. (12.131) + // see Eq. (12.131) diff_int = m_bdiff(i,k); m_Lmatrix(k+n2,i+n2) = 0.0; sum += x[k]/diff_int; if (k != i) sum += x[k]*m_astar(i,k)*constant2 / (m_mw[k]*diff_int); } - // see Eq. (12.130) + // see Eq. (12.130) m_Lmatrix(i+n2,i+n2) = - eightoverpi*m_mw[i]*x[i]*x[i]*m_crot[i] / (m_cinternal[i]*m_cinternal[i]*GasConstant*m_visc[i]*m_rotrelax[i]) diff --git a/src/transport/SimpleTransport.cpp b/src/transport/SimpleTransport.cpp index cbf02289e..c73ea4792 100644 --- a/src/transport/SimpleTransport.cpp +++ b/src/transport/SimpleTransport.cpp @@ -52,10 +52,8 @@ SimpleTransport::SimpleTransport(const SimpleTransport& right) : m_cond_mix_ok(false), m_nDim(1) { - /* - * Use the assignment operator to do the brunt - * of the work for the copy constructor. - */ + // Use the assignment operator to do the brunt of the work for the copy + // constructor. *this = right; } @@ -157,10 +155,8 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr) m_thermo = tr.thermo; m_nsp = m_thermo->nSpecies(); - /* - * Read the transport block in the phase XML Node - * It's not an error if this block doesn't exist. Just use the defaults - */ + // Read the transport block in the phase XML Node + // It's not an error if this block doesn't exist. Just use the defaults XML_Node& phaseNode = m_thermo->xml(); if (phaseNode.hasChild("transport")) { XML_Node& transportNode = phaseNode.child("transport"); @@ -177,9 +173,7 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr) m_mw.resize(m_nsp); 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_coeffVisc_Ns.clear(); m_coeffVisc_Ns.resize(m_nsp); @@ -191,9 +185,7 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr) ltd.viscosity = 0; } - /* - * Get the input thermal conductivities - */ + // Get the input thermal conductivities m_condSpecies.resize(m_nsp); m_coeffLambda_Ns.clear(); m_coeffLambda_Ns.resize(m_nsp); @@ -204,9 +196,7 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr) ltd.thermalCond = 0; } - /* - * Get the input species diffusivities - */ + // Get the input species diffusivities useHydroRadius_ = false; m_diffSpecies.resize(m_nsp); m_coeffDiff_Ns.clear(); @@ -528,8 +518,7 @@ void SimpleTransport::getMixDiffCoeffs(doublereal* const d) bool SimpleTransport::update_C() { - // If the pressure has changed then the concentrations - // have changed. + // If the pressure has changed then the concentrations have changed. doublereal pres = m_thermo->pressure(); bool qReturn = true; if (pres != m_press) { @@ -622,9 +611,8 @@ bool SimpleTransport::update_T() // Compute various functions of temperature m_temp = t; - // temperature has changed, so polynomial temperature - // interpolations will need to be reevaluated. - // Set all of these flags to false + // temperature has changed, so polynomial temperature interpolations will + // need to be reevaluated. Set all of these flags to false m_visc_mix_ok = false; m_visc_temp_ok = false; m_cond_temp_ok = false; diff --git a/src/transport/SolidTransport.cpp b/src/transport/SolidTransport.cpp index 19beef4be..26d670838 100644 --- a/src/transport/SolidTransport.cpp +++ b/src/transport/SolidTransport.cpp @@ -28,10 +28,8 @@ SolidTransport::SolidTransport(const SolidTransport& right) : m_Nlam(0), m_Elam(0) { - /* - * Use the assignment operator to do the brunt - * of the work for the copy constructor. - */ + // Use the assignment operator to do the brunt of the work for the copy + // constructor. *this = right; } diff --git a/src/transport/TransportFactory.cpp b/src/transport/TransportFactory.cpp index 9db15500f..51238dc42 100644 --- a/src/transport/TransportFactory.cpp +++ b/src/transport/TransportFactory.cpp @@ -1,8 +1,4 @@ -/** - * @file TransportFactory.cpp - * - * Implementation file for class TransportFactory. - */ +//! @file TransportFactory.cpp Implementation file for class TransportFactory. // known transport models #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. getLiquidSpeciesTransportData(species_database, log, trParam.thermo->speciesNames(), trParam); - // getLiquidInteractionsTransportData() populates the - // species-species interaction models parameters - // like visc_Eij + // getLiquidInteractionsTransportData() populates the species-species + // interaction models parameters like visc_Eij if (phase_database->hasChild("transport")) { XML_Node& transportNode = phase_database->child("transport"); getLiquidInteractionsTransportData(transportNode, log, trParam.thermo->speciesNames(), trParam); @@ -319,9 +314,8 @@ void TransportFactory::setupSolidTransport(thermo_t* thermo, int log_level, XML_Node root, log; - // getSolidTransportData() populates the - // phase transport models like electronic conductivity - // thermal conductivity, interstitial diffusion + // getSolidTransportData() populates the phase transport models like + // electronic conductivity thermal conductivity, interstitial diffusion if (phase_database->hasChild("transport")) { XML_Node& transportNode = phase_database->child("transport"); getSolidTransportData(transportNode, log, thermo->name(), trParam); @@ -354,9 +348,8 @@ void TransportFactory::getLiquidSpeciesTransportData(const std::vector datatable; // Store the number of species in the phase @@ -365,16 +358,16 @@ void TransportFactory::getLiquidSpeciesTransportData(const std::vectorsecond; - /* - Now, transfer these objects into LTData in the correct phase index order by - calling the default copy constructor for LiquidTransportData. - */ + // Now, transfer these objects into LTData in the correct phase index + // order by calling the default copy constructor for + // LiquidTransportData. trParam.LTData.push_back(trdat); } } /* - Read transport property data from a file for interactions - between species in a liquid. - Given the name of a file containing transport property - parameters and a list of species names, this method returns an - instance of TransportParams containing the transport data for - these species read from the file. -*/ + * Read transport property data from a file for interactions between species in + * a liquid. Given the name of a file containing transport property parameters + * and a list of species names, this method returns an instance of + * TransportParams containing the transport data for these species read from the + * file. + */ void TransportFactory::getLiquidInteractionsTransportData(const XML_Node& transportNode, XML_Node& log, const std::vector &names,