From 86be28621a1fe3658d6f76064b2e608bd0097e8a Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 29 Jun 2010 18:28:08 +0000 Subject: [PATCH] Added doxygen input. --- .../src/transport/LiquidTranInteraction.cpp | 2 +- Cantera/src/transport/LiquidTransport.cpp | 23 ++++++++++--------- Cantera/src/transport/TransportBase.h | 21 +++++++++++++---- Cantera/src/transport/WaterTransport.h | 7 ++++++ 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/Cantera/src/transport/LiquidTranInteraction.cpp b/Cantera/src/transport/LiquidTranInteraction.cpp index 36531da93..e4585f832 100644 --- a/Cantera/src/transport/LiquidTranInteraction.cpp +++ b/Cantera/src/transport/LiquidTranInteraction.cpp @@ -709,7 +709,7 @@ namespace Cantera { for (i = 0; i < nsp; i++) { if (m_mobRatMixModel[k]) { m_mobRatMix(i,j) = m_mobRatMixModel[k]->getMixTransProp(m_mobRatSpecies[k] ); - if (m_mobRatMix(i,j) > 0) { + if (m_mobRatMix(i,j) > 0.0) { m_mobRatMix(j,i) = 1.0/m_mobRatMix(i,j); } } diff --git a/Cantera/src/transport/LiquidTransport.cpp b/Cantera/src/transport/LiquidTransport.cpp index 929a23a39..eed8b7c53 100644 --- a/Cantera/src/transport/LiquidTransport.cpp +++ b/Cantera/src/transport/LiquidTransport.cpp @@ -231,14 +231,13 @@ namespace Cantera { } } for ( int l=0;l < m_nsp2; l++ ){ - if ( m_mobRatTempDep_Ns[l][k] ) delete m_mobRatTempDep_Ns[l][k]; + if (m_mobRatTempDep_Ns[l][k]) delete m_mobRatTempDep_Ns[l][k]; } if ( m_lambdaTempDep_Ns[k] ) delete m_lambdaTempDep_Ns[k]; if ( m_radiusTempDep_Ns[k] ) delete m_radiusTempDep_Ns[k]; if ( m_diffTempDep_Ns[k] ) delete m_diffTempDep_Ns[k]; - //These are constructed in TransportFactory::newLTI - - if ( m_selfDiffMixModel[k] ) delete m_selfDiffMixModel[k]; + //These are constructed in TransportFactory::newLTI + if (m_selfDiffMixModel[k]) delete m_selfDiffMixModel[k]; } for ( int k = 0; k < m_nsp2; k++) { @@ -548,12 +547,14 @@ namespace Cantera { update_T(); update_C(); - ////// LiquidTranInteraction method - if (!m_mobRat_mix_ok){ + // LiquidTranInteraction method + if (!m_mobRat_mix_ok) { for (int k = 0; k < m_nsp2; k++){ if(m_mobRatMixModel[k]){ - m_mobRatMix[k] = m_mobRatMixModel[k]->getMixTransProp( m_mobRatTempDep_Ns[k] ); - if ( m_mobRatMix[k] > 0 ) m_mobRatMix[k/m_nsp+m_nsp*(k%m_nsp)] = 1.0/m_mobRatMix[k]; // Also must be off diagonal: k%(1+n)!=0, but then m_mobRatMixModel[k] shouldn't be initialized anyway + m_mobRatMix[k] = m_mobRatMixModel[k]->getMixTransProp(m_mobRatTempDep_Ns[k]); + if (m_mobRatMix[k] > 0) { + m_mobRatMix[k/m_nsp+m_nsp*(k%m_nsp)] = 1.0/m_mobRatMix[k]; // Also must be off diagonal: k%(1+n)!=0, but then m_mobRatMixModel[k] shouldn't be initialized anyway + } } } } @@ -576,7 +577,7 @@ namespace Cantera { if (!m_mobRat_temp_ok) { updateMobilityRatio_T(); } - for (int k=0; kgetSpeciesTransProp() ; + m_mobRatSpecies(k,j) = m_mobRatTempDep_Ns[k][j]->getSpeciesTransProp(); } } m_mobRat_temp_ok = true; @@ -1630,7 +1631,7 @@ namespace Cantera { * They are still fortran ordered, so that i varies fastest. */ - double condSum1, condSum2; + double condSum1; switch (m_nDim) { case 1: /* 1-D approximation */ diff --git a/Cantera/src/transport/TransportBase.h b/Cantera/src/transport/TransportBase.h index 87d911c95..667190ccc 100644 --- a/Cantera/src/transport/TransportBase.h +++ b/Cantera/src/transport/TransportBase.h @@ -329,10 +329,23 @@ namespace Cantera { virtual void getSpeciesIonConductivity(doublereal* const ionCond) { err("getSpeciesIonConductivity"); } - - - /** - * The mobility ratio. + + //! 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. + * + * mobRat(i,j) = mu_i / mu_j + * + * 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 + * + * @deprecated This doesn't seem to be the essential input; it should just be the mobility. */ virtual void mobilityRatio(double* mobRat) { err("mobilityRatio"); } diff --git a/Cantera/src/transport/WaterTransport.h b/Cantera/src/transport/WaterTransport.h index 6dc61555d..e95fadcda 100644 --- a/Cantera/src/transport/WaterTransport.h +++ b/Cantera/src/transport/WaterTransport.h @@ -47,6 +47,13 @@ namespace Cantera { public: //! default constructor + /*! + * @param thermo ThermoPhase object that represents the phase. + * Defaults to zero + * + * @param ndim Number of dimensions of the flux expressions. + * Defaults to a value of one. + */ WaterTransport(thermo_t* thermo = 0, int ndim = 1); //!Copy Constructor for the %LiquidThermo object.