From 0f04aaf0be99f0736702845404cbf83789f92d1e Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 14 Jun 2012 21:06:30 +0000 Subject: [PATCH] Updated documentation to resolve some Doxygen warnings --- include/cantera/Interface.h | 2 +- include/cantera/base/xml.h | 3 +- include/cantera/equil/equil.h | 3 - include/cantera/equil/vcs_IntStarStar.h | 10 +- include/cantera/equil/vcs_VolPhase.h | 63 ++----- include/cantera/equil/vcs_solve.h | 18 +- include/cantera/kinetics/FalloffMgr.h | 7 +- include/cantera/kinetics/InterfaceKinetics.h | 2 +- include/cantera/kinetics/RateCoeffMgr.h | 2 - include/cantera/kinetics/importKinetics.h | 2 +- include/cantera/numerics/ctlapack.h | 6 +- include/cantera/spectra/LineBroadener.h | 1 - include/cantera/thermo/Crystal.h | 4 +- include/cantera/thermo/GibbsExcessVPSSTP.h | 5 +- include/cantera/thermo/MargulesVPSSTP.h | 2 +- include/cantera/thermo/MixtureFugacityTP.h | 10 +- include/cantera/thermo/MolarityIonicVPSSTP.h | 2 +- include/cantera/thermo/RedlichKisterVPSSTP.h | 2 +- include/cantera/thermo/RedlichKwongMFTP.h | 6 +- src/converters/CKParser.cpp | 3 - src/converters/CKReader.cpp | 4 +- src/converters/NASA9Parser.cpp | 21 --- src/equil/vcs_VolPhase.cpp | 81 --------- src/equil/vcs_solve_TP.cpp | 174 +------------------ src/kinetics/importKinetics.cpp | 6 +- src/thermo/GibbsExcessVPSSTP.cpp | 6 - src/thermo/MixtureFugacityTP.cpp | 12 -- src/thermo/MolarityIonicVPSSTP.cpp | 6 +- src/thermo/RedlichKisterVPSSTP.cpp | 6 +- src/thermo/RedlichKwongMFTP.cpp | 10 +- src/thermo/SpeciesThermoFactory.cpp | 2 +- 31 files changed, 66 insertions(+), 415 deletions(-) diff --git a/include/cantera/Interface.h b/include/cantera/Interface.h index 14ad07408..120c6423b 100644 --- a/include/cantera/Interface.h +++ b/include/cantera/Interface.h @@ -29,7 +29,7 @@ public: /*! * Construct an Interface instance from a specification in an input file. * - * @param infile. Cantera input file in CTI or CTML format. + * @param infile Cantera input file in CTI or CTML format. * @param id Identification string to distinguish between * multiple definitions within one input file. * @param otherPhases Neighboring phases that may participate in the diff --git a/include/cantera/base/xml.h b/include/cantera/base/xml.h index e20bfa373..5ea427d7c 100644 --- a/include/cantera/base/xml.h +++ b/include/cantera/base/xml.h @@ -746,10 +746,9 @@ private: * on. This is fixed up in the public method. A method to only write out a limited * amount of the xml tree has been added. * - * * @param s ostream to write to * @param level Indentation level to work from - * @param numRecurvivesAllowed Number of recursive calls allowed + * @param numRecursivesAllowed Number of recursive calls allowed */ void write_int(std::ostream& s, int level = 0, int numRecursivesAllowed = 60000) const; diff --git a/include/cantera/equil/equil.h b/include/cantera/equil/equil.h index 42bb93191..fc546ff09 100644 --- a/include/cantera/equil/equil.h +++ b/include/cantera/equil/equil.h @@ -63,9 +63,7 @@ namespace Cantera * Return variable is equal to the number of subroutine attempts * it took to equilibrate the system. * - * * @ingroup equilfunctions - * @ingroup equil */ int equilibrate(thermo_t& s, const char* XY, int solver = -1, doublereal rtol = 1.0e-9, int maxsteps = VCS_MAXSTEPS, @@ -94,7 +92,6 @@ int equilibrate(thermo_t& s, const char* XY, * it took to equilibrate the system. * * @ingroup equilfunctions - * @ingroup equil */ doublereal equilibrate(MultiPhase& s, const char* XY, doublereal rtol = 1.0e-9, int maxsteps = 5000, int maxiter = 100, diff --git a/include/cantera/equil/vcs_IntStarStar.h b/include/cantera/equil/vcs_IntStarStar.h index 5e9474f11..acb663940 100644 --- a/include/cantera/equil/vcs_IntStarStar.h +++ b/include/cantera/equil/vcs_IntStarStar.h @@ -1,5 +1,5 @@ /** - * @file IntStarStar.h + * @file vcs_IntStarStar.h * * Header file for class IntStarStar */ @@ -44,13 +44,13 @@ public: //! Copy constructor /*! * @param y Object to be copied - */ + */ IntStarStar(const IntStarStar& y); //! Assignment operator /*! * @param y Object to be copied - */ + */ IntStarStar& operator=(const IntStarStar& y); //! Resize the array, and fill the new entries with 'v' @@ -91,13 +91,13 @@ private: //! Storage area for the matrix, layed out in Fortran style, row-inner, column outer format /*! * Length = m_nrows * m_ncols - */ + */ std::vector m_data; //! Vector of column addresses /*! * Length = number of columns = m_ncols - */ + */ std::vector m_colAddr; //! number of rows diff --git a/include/cantera/equil/vcs_VolPhase.h b/include/cantera/equil/vcs_VolPhase.h index 05ca65820..5b0b190f4 100644 --- a/include/cantera/equil/vcs_VolPhase.h +++ b/include/cantera/equil/vcs_VolPhase.h @@ -190,22 +190,20 @@ public: * This function takes as input the mole numbers in vcs format, and * then updates this object with their values. This is essentially * a gather routine. + * * Additionally it checks to see that the total moles value in * TPhMoles[iplace] is equal to the internally computed value. * If this isn't the case, an error exit is carried out. * - * + * @param vcsStateStatus State calc value either VCS_STATECALC_OLD + * or VCS_STATECALC_NEW. With any other value nothing is done. * @param molesSpeciesVCS array of mole numbers. Note, the indices - * for species in - * this array may not be contiguous. IndSpecies[] is needed - * to gather the species into the local contiguous vector - * format. - * @param TPhMoles VCS's array containing the number of moles - * in each phase. - * @param iphase index of the current phase. - * + * for species in this array may not be contiguous. IndSpecies[] is + * needed to gather the species into the local contiguous vector + * format. + * @param TPhMoles VCS's array containing the number of moles in each phase. */ - void setMolesFromVCSCheck(const int stateCalc, + void setMolesFromVCSCheck(const int vcsStateStatus, const double* molesSpeciesVCS, const double* const TPhMoles); @@ -252,12 +250,8 @@ public: * Calculate the Gibbs free energies for the standard state * of the kth species. * The results are held internally within the object. - * The kth species standard state G is returned * * @param kspec Species number (within the phase) - * @param TKelvin Current temperature - * @param pres Current pressure - * * @return Gstar[kspec] returns the gibbs free energy for the * standard state of the kth species. */ @@ -267,26 +261,19 @@ public: //! of a species, return a value for one species /*! * @param kspec species index - * @param TKelvin temperature - * * @return return value of the gibbs free energy */ double G0_calc_one(size_t kspec) const; //! Molar volume calculation for standard state of one species /*! - * Calculate the molar volume for the standard states - * The results are held internally within the object. - * Return the molar volume for one species + * Calculate the molar volume for the standard states. The results are held + * internally within the object. Return the molar volume for one species. * * @param kspec Species number (within the phase) - * @param TKelvin Current temperature - * @param pres Current pressure - * - * @return molar volume of the kspec species's standard - * state (m**3/kmol) + * @return molar volume of the kspec species's standard state (m**3/kmol) */ - double VolStar_calc_one(size_t kglob) const; + double VolStar_calc_one(size_t kspec) const; //! Fill in the partial molar volume vector for VCS /*! @@ -309,6 +296,8 @@ public: * @param VolPM vector of partial molar volumes for all of the species * in all of the phases in a VCS problem. Only the * entries for the current phase are filled in. + * + * @todo This function's documentation is incorrect. */ void sendToVCS_GStar(double* const gstar) const; @@ -601,28 +590,17 @@ private: /*! * Calculate the Gibbs free energies for the standard states * The results are held internally within the object. - * - * @param TKelvin Current temperature - * @param pres Current pressure */ void _updateGStar() const; //! Gibbs free energy calculation at a temperature for the reference state //! of each species - /*! - * - */ void _updateG0() const; //! Molar volume calculation for standard states /*! - * Calculate the molar volume for the standard states - * The results are held internally within the object. - * - * @param TKelvin Current temperature - * @param pres Current pressure - * - * Units are in m**3/kmol + * Calculate the molar volume for the standard states. The results are held + * internally within the object. Units are in m**3/kmol. */ void _updateVolStar() const; @@ -641,12 +619,9 @@ private: * with respect to mole number of jth species. * (temp, pressure, and other mole numbers held constant) * - * We employ a finite difference derivative approach here. - * Because we have to change the mole numbers, this is not - * a const function, even though the paradigm would say that - * it should be. - * - * @param moleNumbers Mole numbers are input. + * We employ a finite difference derivative approach here. Because we have + * to change the mole numbers, this is not a const function, even though + * the paradigm would say that it should be. */ void _updateLnActCoeffJac(); diff --git a/include/cantera/equil/vcs_solve.h b/include/cantera/equil/vcs_solve.h index b0e1921b2..c1e399f57 100644 --- a/include/cantera/equil/vcs_solve.h +++ b/include/cantera/equil/vcs_solve.h @@ -171,7 +171,7 @@ public: * * Input * --------- - * @param doJustCompoents If true, the m_stoichCoeffRxnMatrix[][] and + * @param doJustComponents If true, the m_stoichCoeffRxnMatrix[][] and * m_deltaMolNumPhase[] are not calculated. * * @param aw Vector of mole fractions which will be used to construct an @@ -219,8 +219,8 @@ public: * This is 1 if the phase, iphase, participates in the * formation reaction, irxn, and zero otherwise. * - * @return Returns VCS_SUCCESS if everything went ok. Returns something else if - * there is a problem. + * @return Returns VCS_SUCCESS if everything went ok. Returns + * VCS_FAILED_CONVERGENCE if there is a problem. */ int vcs_basopt(const bool doJustComponents, double aw[], double sa[], double sm[], double ss[], double test, bool* const usedZeroedSpecies); @@ -497,7 +497,7 @@ public: //! Print out a table of chemical potentials /*! - * @param vcsState Determines where to get the mole numbers from. + * @param stateCalc Determines where to get the mole numbers from. * - VCS_STATECALC_OLD -> from m_molNumSpecies_old * - VCS_STATECALC_NEW -> from m_molNumSpecies_new */ @@ -506,7 +506,7 @@ public: //! This routine uploads the state of the system into all of the //! vcs_VolumePhase objects in the current problem. /*! - * @param vcsState Determines where to get the mole numbers from. + * @param stateCalc Determines where to get the mole numbers from. * - VCS_STATECALC_OLD -> from m_molNumSpecies_old * - VCS_STATECALC_NEW -> from m_molNumSpecies_new */ @@ -574,7 +574,7 @@ public: * Special branching occurs sometimes. This causes the component basis * to be reevaluated * - * @param forceComponentRecalc integer flagging whether a component recalculation needs + * @param forceComponentCalc integer flagging whether a component recalculation needs * to be carried out. * @param kSpecial species number of phase being zeroed. * @@ -1256,7 +1256,7 @@ private: * 2) Vphase->IndSpecies is up to date * 3) m_deltaGRxn_old[irxn] is up to date */ - bool recheck_deleted_phase(const int iph); + bool recheck_deleted_phase(const int iphase); //! Minor species alternative calculation /*! @@ -1298,8 +1298,6 @@ private: * @param do_delete: BOOLEAN which if true on return, then we branch * to the section that deletes a species from the * current set of active species. - * - * @param dx The change in mole number */ double vcs_minor_alt_calc(size_t kspec, size_t irxn, bool* do_delete #ifdef DEBUG_MODE @@ -1349,7 +1347,7 @@ private: /*! * Positive DG for species which don't exist are ignored. * - * @param dgLocal Vector of local delta G's. + * @param dg Vector of local delta G's. */ double l2normdg(double dg[]) const; diff --git a/include/cantera/kinetics/FalloffMgr.h b/include/cantera/kinetics/FalloffMgr.h index 4dba3a54f..a01454330 100644 --- a/include/cantera/kinetics/FalloffMgr.h +++ b/include/cantera/kinetics/FalloffMgr.h @@ -21,12 +21,7 @@ class FalloffMgr { public: - /** - * Constructor. - * @param f If supplied, this factory will be used to construct - * falloff function calculators. If omitted, the standard factory - * will be used. - */ + //! Constructor. FalloffMgr(/*FalloffFactory* f = 0*/) : m_n(0), m_n0(0), m_worksize(0) { //if (f == 0) diff --git a/include/cantera/kinetics/InterfaceKinetics.h b/include/cantera/kinetics/InterfaceKinetics.h index 3ed245314..a078027f8 100644 --- a/include/cantera/kinetics/InterfaceKinetics.h +++ b/include/cantera/kinetics/InterfaceKinetics.h @@ -616,7 +616,7 @@ public: * which are observed. * * @param iphase Index of the phase. This is the order within the internal thermo vector object - * @param exists Boolean indicating whether the phase exists or not + * @param isStable Flag indicating whether the phase is stable or not */ void setPhaseStability(const int iphase, const int isStable); diff --git a/include/cantera/kinetics/RateCoeffMgr.h b/include/cantera/kinetics/RateCoeffMgr.h index 095797828..9e46225e2 100644 --- a/include/cantera/kinetics/RateCoeffMgr.h +++ b/include/cantera/kinetics/RateCoeffMgr.h @@ -34,8 +34,6 @@ public: * Install a rate coefficient calculator. * @param rxnNumber the reaction number * @param rdata rate coefficient specification for the reaction - * @param useAux flag to indicate that auxiliary rate information from - * rdata should be used. */ size_t install(size_t rxnNumber, const ReactionData& rdata) { /* diff --git a/include/cantera/kinetics/importKinetics.h b/include/cantera/kinetics/importKinetics.h index 0a61f5651..f9c9ae333 100644 --- a/include/cantera/kinetics/importKinetics.h +++ b/include/cantera/kinetics/importKinetics.h @@ -113,7 +113,7 @@ bool getReagents(const XML_Node& rxn, Kinetics& kin, int rp, * @param kf XML_Node containing information about the rate coefficients. * @param kin kinetics manager * @param rdata ReactionData reference - * @param negA Boolean indicating whether negative A's are ok. + * @param rules Rules for parsing and installing reactions * * Trigger an exception for negative A unless specifically authorized. * diff --git a/include/cantera/numerics/ctlapack.h b/include/cantera/numerics/ctlapack.h index 574f5c19e..0e3e6cc1e 100644 --- a/include/cantera/numerics/ctlapack.h +++ b/include/cantera/numerics/ctlapack.h @@ -441,11 +441,7 @@ inline doublereal ct_dtrcon(const char* norm, ctlapack::upperlower_t uplot, con return rcond; } //==================================================================================================================== -//! -/*! - * @param work Must be dimensioned equal to greater than 3N - * @param iwork Must be dimensioned equal to or greater than N - */ + inline void ct_dpotrf(ctlapack::upperlower_t uplot, size_t n, doublereal* a, size_t lda, int& info) { char uplo = upper_lower[uplot]; diff --git a/include/cantera/spectra/LineBroadener.h b/include/cantera/spectra/LineBroadener.h index 678cd3b35..3b4e890b8 100644 --- a/include/cantera/spectra/LineBroadener.h +++ b/include/cantera/spectra/LineBroadener.h @@ -94,7 +94,6 @@ public: /** * Constructor. - * @param FWHM Full width at half-maximum. */ GaussianProfile(doublereal sigma); virtual doublereal profile(doublereal deltaFreq); diff --git a/include/cantera/thermo/Crystal.h b/include/cantera/thermo/Crystal.h index 502415d11..d8a1a52f5 100644 --- a/include/cantera/thermo/Crystal.h +++ b/include/cantera/thermo/Crystal.h @@ -29,8 +29,8 @@ public: const vector_fp& latticeSiteDensity); /// Add a phase to the mixture. - /// @param p pointer to the phase object - /// @param moles total number of moles of all species in this phase + /// @param lattice pointer to the phase object + /// @param siteDensity total density of sites in this phase void addLattice(LatticePhase* lattice, doublereal siteDensity) { MultiPhase::addPhase(lattice, siteDensity); } diff --git a/include/cantera/thermo/GibbsExcessVPSSTP.h b/include/cantera/thermo/GibbsExcessVPSSTP.h index dfcc83236..e60a05ef2 100644 --- a/include/cantera/thermo/GibbsExcessVPSSTP.h +++ b/include/cantera/thermo/GibbsExcessVPSSTP.h @@ -327,14 +327,13 @@ public: */ virtual void getActivities(doublereal* ac) const; - //! Get the array of non-dimensional molar-based ln activity coefficients at + //! Get the array of non-dimensional molar-based activity coefficients at //! the current solution temperature, pressure, and solution concentration. /*! - * @param lnac Output vector of ln activity coefficients. Length: m_kk. + * @param ac Output vector of activity coefficients. Length: m_kk. */ virtual void getActivityCoefficients(doublereal* ac) const; - //! Get the array of temperature derivatives of the log activity coefficients /*! * This function is a virtual class, but it first appears in GibbsExcessVPSSTP diff --git a/include/cantera/thermo/MargulesVPSSTP.h b/include/cantera/thermo/MargulesVPSSTP.h index 61ec23691..c70d07e85 100644 --- a/include/cantera/thermo/MargulesVPSSTP.h +++ b/include/cantera/thermo/MargulesVPSSTP.h @@ -495,7 +495,7 @@ public: //! Get the array of non-dimensional molar-based ln activity coefficients at //! the current solution temperature, pressure, and solution concentration. /*! - * @param ac Output vector of ln activity coefficients. Length: m_kk. + * @param lnac Output vector of ln activity coefficients. Length: m_kk. */ virtual void getLnActivityCoefficients(doublereal* lnac) const; diff --git a/include/cantera/thermo/MixtureFugacityTP.h b/include/cantera/thermo/MixtureFugacityTP.h index 0ff388c79..17b078c1f 100644 --- a/include/cantera/thermo/MixtureFugacityTP.h +++ b/include/cantera/thermo/MixtureFugacityTP.h @@ -277,7 +277,7 @@ public: //! Get the pure Gibbs free energies of each species. //! Species are assumed to be in their standard states. This is the same //! as getStandardChemPotentials(). - //! @param gpure[out] Array of standard state Gibbs free energies. + //! @param[out] gpure Array of standard state Gibbs free energies. //! length = m_kk. units are J/kmol. void getPureGibbs(doublereal* gpure) const; @@ -389,7 +389,7 @@ public: //! Set the internally stored temperature (K) and density (kg/m^3) /*! - * @param t Temperature in kelvin + * @param T Temperature in kelvin * @param rho Density (kg/m^3) */ virtual void setState_TR(doublereal T, doublereal rho); @@ -793,10 +793,10 @@ protected: * @param pres pressure (Pascal) * @param densLiq Output density of liquid * @param densGas output density of gas - * @param delGRT output delGRT + * @param gasGRT output delGRT */ - int corr0(doublereal TKelvin, doublereal pre, doublereal& densLiq, - doublereal& densGas, doublereal& liqGRT, doublereal& gasGRT); + int corr0(doublereal TKelvin, doublereal pres, doublereal& densLiq, + doublereal& densGas, doublereal& liqGRT, doublereal& gasGRT); public: //! Returns the Phase State flag for the current state of the object /*! diff --git a/include/cantera/thermo/MolarityIonicVPSSTP.h b/include/cantera/thermo/MolarityIonicVPSSTP.h index 67625f650..f6f8c94b6 100644 --- a/include/cantera/thermo/MolarityIonicVPSSTP.h +++ b/include/cantera/thermo/MolarityIonicVPSSTP.h @@ -232,7 +232,7 @@ public: /*! * @param lnac Output vector of ln activity coefficients. Length: m_kk. */ - virtual void getLnActivityCoefficients(doublereal* ac) const; + virtual void getLnActivityCoefficients(doublereal* lnac) const; //@} /// @name Partial Molar Properties of the Solution diff --git a/include/cantera/thermo/RedlichKisterVPSSTP.h b/include/cantera/thermo/RedlichKisterVPSSTP.h index 44f149f1e..4dc29c93c 100644 --- a/include/cantera/thermo/RedlichKisterVPSSTP.h +++ b/include/cantera/thermo/RedlichKisterVPSSTP.h @@ -493,7 +493,7 @@ public: /*! * @param lnac Output vector of ln activity coefficients. Length: m_kk. */ - virtual void getLnActivityCoefficients(doublereal* ac) const; + virtual void getLnActivityCoefficients(doublereal* lnac) const; //@} /// @name Partial Molar Properties of the Solution diff --git a/include/cantera/thermo/RedlichKwongMFTP.h b/include/cantera/thermo/RedlichKwongMFTP.h index edad833da..445fb4c51 100644 --- a/include/cantera/thermo/RedlichKwongMFTP.h +++ b/include/cantera/thermo/RedlichKwongMFTP.h @@ -59,7 +59,7 @@ public: * the routine initThermo(), with a reference to the * XML database to get the info for the phase. * - * @param inputFile Name of the input file containing the phase XML data + * @param infile Name of the input file containing the phase XML data * to set up the object * @param id ID of the phase in the input file. Defaults to the empty string. */ @@ -558,7 +558,7 @@ private: /*! * @param pureFluidParam XML_Node for the pure fluid parameters */ - void readXMLPureFluid(XML_Node& PureFluidParam); + void readXMLPureFluid(XML_Node& pureFluidParam); //! Apply mixing rules for a coefficients @@ -569,7 +569,7 @@ private: /*! * @param pureFluidParam XML_Node for the cross fluid parameters */ - void readXMLCrossFluid(XML_Node& PureFluidParam); + void readXMLCrossFluid(XML_Node& pureFluidParam); diff --git a/src/converters/CKParser.cpp b/src/converters/CKParser.cpp index afa97e6e5..e7e2f7b06 100644 --- a/src/converters/CKParser.cpp +++ b/src/converters/CKParser.cpp @@ -583,9 +583,6 @@ next: * @param names List of species names (input). * @param species Table of species objects holding data from records * in THERMO section (output). - * @param allowExtThermoData True if 'THERMO' specified, false if - * 'THERMO ALL' specified. - * */ bool CKParser::readThermoSection(std::vector& names, diff --git a/src/converters/CKReader.cpp b/src/converters/CKReader.cpp index 74da035b5..0982a4d3d 100644 --- a/src/converters/CKReader.cpp +++ b/src/converters/CKReader.cpp @@ -28,15 +28,13 @@ using namespace std; namespace ckr { - /** * read and optionally validate an input file in Chemkin format. * @param inputFile path to the input file * @param thermoDatabase path to the species database file - * @param log path to the file where log messages should be written + * @param logfile path to the file where log messages should be written * @return true if no errors were encountered, false otherwise */ - bool CKReader::read(const std::string& inputFile, const std::string& thermoDatabase, const std::string& logfile) { diff --git a/src/converters/NASA9Parser.cpp b/src/converters/NASA9Parser.cpp index 8ab2607f7..c03c8a89e 100644 --- a/src/converters/NASA9Parser.cpp +++ b/src/converters/NASA9Parser.cpp @@ -103,24 +103,6 @@ static double de_atof(std::string s) return rval; } -/** - * Check validity of the three temperatures defining the two - * temperature ranges for the NASA polynomial species thermodynamic - * property fits. - * @param log log file output stream - * @param tmin minimum temperature - * @param tmid intermediate temperature - * @param tmax maximum temperature - */ -// static void checkTemps(std::ostream& log, double tmin, -// double tmid, double tmax) -// { -// if (tmin == 0.0 || tmid == 0.0 || tmax == 0.0) { -// throw CK_SyntaxError(log, -// "error reading Tmin, Tmid, or Tmax"); -// } -//} - static double getNumberFromString(std::string s) { bool inexp = false; @@ -165,8 +147,6 @@ static int de_atoi(std::ostream& log, std::string s, int line = -1) * @param temp Devault vector of temperature region boundaries * There are one more temperatures than there are * temperature regions. - * @param allowExtThermoData True if 'THERMO' specified, false if - * 'THERMO ALL' specified. * * @return True, if the THERMO section exists and the species * have all been successfully processed. False, if @@ -249,7 +229,6 @@ bool CKParser::readNASA9ThermoSection(std::vector& names, << " of " << m_ckfilename; writeSpeciesData(log, spec); } - //checkTemps(log, spec.tlow, spec.tmid, spec.thigh); if (getAllSpecies) { names.push_back(spec.name); nsp = static_cast(names.size()); diff --git a/src/equil/vcs_VolPhase.cpp b/src/equil/vcs_VolPhase.cpp index 98b6de15e..47267089a 100644 --- a/src/equil/vcs_VolPhase.cpp +++ b/src/equil/vcs_VolPhase.cpp @@ -405,14 +405,6 @@ void vcs_VolPhase::_updateG0() const } /***************************************************************************/ -// Gibbs free energy calculation at a temperature for the reference state -// of a species, return a value for one species -/* - * @param kspec species index - * @param TKelvin temperature - * - * @return return value of the gibbs free energy - */ double vcs_VolPhase::G0_calc_one(size_t kspec) const { if (!m_UpToDate_G0) { @@ -422,14 +414,6 @@ double vcs_VolPhase::G0_calc_one(size_t kspec) const } /***************************************************************************/ -// Gibbs free energy calculation for standard states -/* - * Calculate the Gibbs free energies for the standard states - * The results are held internally within the object. - * - * @param TKelvin Current temperature - * @param pres Current pressure (pascal) - */ void vcs_VolPhase::_updateGStar() const { if (m_useCanteraCalls) { @@ -448,18 +432,6 @@ void vcs_VolPhase::_updateGStar() const } /***************************************************************************/ -// Gibbs free energy calculation for standard state of one species -/* - * Calculate the Gibbs free energies for the standard state - * of the kth species. - * The results are held internally within the object. - * The kth species standard state G is returned - * - * @param kspec Species number (within the phase) - * - * @return Gstar[kspec] returns the gibbs free energy for the - * standard state of the kspec species. - */ double vcs_VolPhase::GStar_calc_one(size_t kspec) const { if (!m_UpToDate_GStar) { @@ -704,22 +676,6 @@ void vcs_VolPhase::setMolesFromVCS(const int stateCalc, } /***************************************************************************/ -// Set the moles within the phase -/* - * This function takes as input the mole numbers in vcs format, and - * then updates this object with their values. This is essentially - * a gather routine. - * - * @param vcsStateStatus State calc value either VCS_STATECALC_OLD - * or VCS_STATECALC_NEW. With any other value - * nothing is done. - * - * @param molesSpeciesVCS array of mole numbers. Note, - * the indices for species in - * this array may not be contiguous. IndSpecies[] is needed - * to gather the species into the local contiguous vector - * format. - */ void vcs_VolPhase::setMolesFromVCSCheck(const int vcsStateStatus, const double* molesSpeciesVCS, const double* const TPhMoles) @@ -813,16 +769,6 @@ double vcs_VolPhase::sendToVCS_VolPM(double* const VolPM) const } /***************************************************************************/ -// Fill in the partial molar volume vector for VCS -/* - * This routine will calculate the partial molar volumes for the - * current phase (if needed), and fill in the corresponding entries in the - * VCS partial molar volumes vector. - * - * @param VolPM vector of partial molar volumes for all of the species - * in all of the phases in a VCS problem. Only the - * entries for the current phase are filled in. - */ void vcs_VolPhase::sendToVCS_GStar(double* const gstar) const { if (!m_UpToDate_GStar) { @@ -902,16 +848,6 @@ void vcs_VolPhase::setState_T(const double temp) } /***************************************************************************/ -// Molar volume calculation for standard states -/* - * Calculate the molar volume for the standard states - * The results are held internally within the object. - * - * @param TKelvin Current temperature - * @param pres Current pressure (pascal) - * - * Calculations are in m**3 / kmol - */ void vcs_VolPhase::_updateVolStar() const { if (m_useCanteraCalls) { @@ -928,19 +864,6 @@ void vcs_VolPhase::_updateVolStar() const } /***************************************************************************/ -// Molar volume calculation for standard state of one species -/* - * Calculate the molar volume for the standard states - * The results are held internally within the object. - * Return the molar volume for one species - * - * @param kspec Species number (within the phase) - * @param TKelvin Current temperature - * @param pres Current pressure (pascal) - * - * @return molar volume of the kspec species's standard - * state - */ double vcs_VolPhase::VolStar_calc_one(size_t kspec) const { if (!m_UpToDate_VolStar) { @@ -993,10 +916,6 @@ double vcs_VolPhase::_updateVolPM() const } /***************************************************************************/ -/* - * _updateLnActCoeffJac(): - * - */ void vcs_VolPhase::_updateLnActCoeffJac() { /* diff --git a/src/equil/vcs_solve_TP.cpp b/src/equil/vcs_solve_TP.cpp index 3f7ee4b50..83af481d9 100644 --- a/src/equil/vcs_solve_TP.cpp +++ b/src/equil/vcs_solve_TP.cpp @@ -2032,49 +2032,6 @@ L_RETURN_BLOCK_B: } /*********************************************************************************/ -// Minor species alternative calculation -/* - * This is based upon the following approximation: - * The mole fraction changes due to these reactions don't affect - * the mole numbers of the component species. Therefore the following - * approximation is valid for a small component of an ideal phase: - * - * 0 = m_deltaGRxn_old(I) + log(molNum_new(I)/molNum_old(I)) - * - * m_deltaGRxn_old contains the contribution from - * - * m_feSpecies_old(I) = - * m_SSfeSpecies(I) + - * log(ActCoeff[i] * molNum_old(I) / m_tPhaseMoles_old(iph)) - * Thus, - * - * molNum_new(I)= molNum_old(I) * EXP(-m_deltaGRxn_old(I)) - * - * Most of this section is mainly restricting the update to reasonable - * values. - * We restrict the update a factor of 1.0E10 up and 1.0E-10 down - * because we run into trouble with the addition operator due to roundoff - * if we go larger than ~1.0E15. Roundoff will then sometimes produce - * zero mole fractions. - * - * Note: This routine was generalized to incorporate - * nonideal phases and phases on the molality basis - * - * Input: - * ------ - * @param kspec The current species and corresponding formation - * reaction number. - * @param irxn The current species and corresponding formation - * reaction number. - * - * Output: - * --------- - * @param do_delete: BOOLEAN which if true on return, then we branch - * to the section that deletes a species from the - * current set of active species. - * - * @param dx The change in mole number - */ double VCS_SOLVE::vcs_minor_alt_calc(size_t kspec, size_t irxn, bool* do_delete #ifdef DEBUG_MODE , char* ANOTE @@ -2777,46 +2734,6 @@ int VCS_SOLVE::vcs_recheck_deleted() } /***********************************************************************************/ -// Recheck deletion condition for multispecies phases. -/* - * We assume here that DG_i_0 has been calculated for deleted species correctly - * - * - * m_feSpecies(I) = m_SSfeSpecies(I) - * + ln(ActCoeff[I]) - * - ln(Mnaught * m_units) - * + m_chargeSpecies[I] * Faraday_dim * m_phasePhi[iphase]; - * - * sum_u = sum_j_comp [ sigma_i_j * u_j ] - * = u_i_O + log((AC_i * W_i)/m_tPhaseMoles_old) - * - * DG_i_0 = m_feSpecies(I) - sum_m{ a_i_m DG_m } - * - * - * by first evaluating: - * - * DG_i_O = u_i_O - sum_u. - * - * Then, the phase pops into existence iff - * - * phaseDG = 1.0 - sum_i{exp(-DG_i_O)} < 0.0 - * - * This formula works for both single species phases and for multispecies - * phases. It's an overkill for single species phases. - * - * @param iphase Phase index number - * - * @return Returns true if the phase is currently deleted - * but should be reinstated. Returns false otherwise. - * - * NOTE: this routine is currently not used in the code, and - * contains some basic changes that are incompatible. - * - * assumptions: - * 1) Vphase Existence is up to date - * 2) Vphase->IndSpecies is up to date - * 3) m_deltaGRxn_old[irxn] is up to date - */ bool VCS_SOLVE::recheck_deleted_phase(const int iphase) { @@ -3141,77 +3058,6 @@ bool VCS_SOLVE::vcs_globStepDamp() } /****************************************************************************************/ - -// Choose the optimum species basis for the calculations -/* - * Choose the optimum component species basis for the calculations. - * This is done by choosing the species with the largest mole fraction - * not currently a linear combination of the previous components. - * Then, calculate the stoichiometric coefficient matrix for that - * basis. - * - * Rearranges the solution data to put the component data at the - * front of the species list. - * - * Then, calculates M_STOICHCOEFFRXNMATRIX(J,I) the formation reactions - * for all noncomponent species in the mechanism. - * Also calculates DNG(I) and DNL(I), the net mole change for each - * formation reaction. - * Also, initializes IR(I) to the default state. - * - * Input - * --------- - * @param doJustCompoents If true, the m_stoichCoeffRxnMatrix[][] and - * m_deltaMolNumPhase[] are not calculated. - * - * @param aw Vector of mole fractions which will be used to construct an - * optimal basis from. - * - * @param sa Gramm-Schmidt orthog work space (nc in length) sa[j] - * @param ss Gramm-Schmidt orthog work space (nc in length) ss[j] - * @param sm QR matrix work space (nc*ne in length) sm[i+j*ne] - * @param test This is a small negative number dependent upon whether - * an estimate is supplied or not. - * - * Output - * --------- - * @param usedZeroedSpecies = If true, then a species with a zero concentration - * was used as a component. The problem may be - * converged. Or, the problem may have a range space - * error and may not have a proper solution. - * - * Internal Variables calculated by this routine: - * ----------------------------------------------- - * - * m_numComponents - * Number of component species - * - * component species - * This routine calculates the m_numComponent species. It switches - * their positions in the species vector so that they occupy - * the first m_numComponent spots in the species vector. - * - * m_stoichCoeffRxnMatrix[irxn][jcomp] - * Stoichiometric coefficient matrix for the reaction mechanism - * expressed in Reduced Canonical Form. - * j refers to the component number, and irxn - * refers to the irxn_th non-component species. - * - * m_deltaMolNumPhase[irxn] - * Change in the number of total number of moles of species in all phases - * due to the noncomponent formation reaction, irxn. - * - * m_deltaMolNumPhase[irxn][iphase] - * Change in the number of moles in phase, iphase, due to the - * noncomponent formation reaction, irxn. - * - * m_phaseParticipation[irxn] - * This is 1 if the phase, iphase, participates in the - * formation reaction, irxn, and zero otherwise. - * - * @return Returns VCS_SUCCESS if everything went ok. Returns - * VCS_FAILED_CONVERGENCE if there is a problem. - */ int VCS_SOLVE::vcs_basopt(const bool doJustComponents, double aw[], double sa[], double sm[], double ss[], double test, bool* const usedZeroedSpecies) { @@ -4604,12 +4450,7 @@ void VCS_SOLVE::vcs_dfe(const int stateCalc, } //==================================================================================================================== -// Print out a table of chemical potentials -/* - * @param vcsState Determines where to get the mole numbers from. - * - VCS_STATECALC_OLD -> from m_molNumSpecies_old - * - VCS_STATECALC_NEW -> from m_molNumSpecies_new - */ + void VCS_SOLVE::vcs_printSpeciesChemPot(const int stateCalc) const { double mfValue = 1.0; @@ -4730,12 +4571,6 @@ void VCS_SOLVE::prneav() const #endif /*****************************************************************************/ -// Calculate the norm of a deltaGibbs free energy vector -/* - * Positive DG for species which don't exist are ignored. - * - * @param dgLocal Vector of local delta G's. - */ double VCS_SOLVE::l2normdg(double dgLocal[]) const { double tmp; @@ -4816,13 +4651,6 @@ void VCS_SOLVE::check_tmoles() const #endif /*****************************************************************************/ -// This routine uploads the state of the system into all of the -// vcs_VolPhase objects in the current problem. -/* - * @param vcsState Determines where to get the mole numbers from. - * - VCS_STATECALC_OLD -> from m_molNumSpecies_old - * - VCS_STATECALC_NEW -> from m_molNumSpecies_new - */ void VCS_SOLVE::vcs_updateVP(const int vcsState) { vcs_VolPhase* Vphase; diff --git a/src/kinetics/importKinetics.cpp b/src/kinetics/importKinetics.cpp index a7f8662d2..ed877ab3d 100644 --- a/src/kinetics/importKinetics.cpp +++ b/src/kinetics/importKinetics.cpp @@ -663,11 +663,11 @@ next: * points directly to a ctml element named "reaction". i refers * to the number id of the reaction in the kinetics object. * - * @param i Reaction number. + * @param iRxn Reaction number. * @param r XML_Node containing reaction data. - * @param k Kinetics manager to which reaction will be added. + * @param kin Kinetics manager to which reaction will be added. * @param default_phase Default phase for locating a species - * @param rule Rule for handling reactions with missing species + * @param rules Rule for handling reactions with missing species * (skip or flag as error) * @param validate_rxn If true, check that this reaction is not a * duplicate of one already entered, and check that the reaction diff --git a/src/thermo/GibbsExcessVPSSTP.cpp b/src/thermo/GibbsExcessVPSSTP.cpp index f0577da23..fb2eced4f 100644 --- a/src/thermo/GibbsExcessVPSSTP.cpp +++ b/src/thermo/GibbsExcessVPSSTP.cpp @@ -248,12 +248,6 @@ void GibbsExcessVPSSTP::getActivities(doublereal* ac) const } } -//==================================================================================================================== -// Get the array of non-dimensional molar-based activity coefficients at -// the current solution temperature, pressure, and solution concentration. -/* - * @param ac Output vector of activity coefficients. Length: m_kk. - */ void GibbsExcessVPSSTP::getActivityCoefficients(doublereal* const ac) const { diff --git a/src/thermo/MixtureFugacityTP.cpp b/src/thermo/MixtureFugacityTP.cpp index dff3d3248..e6b728d97 100644 --- a/src/thermo/MixtureFugacityTP.cpp +++ b/src/thermo/MixtureFugacityTP.cpp @@ -981,19 +981,7 @@ int MixtureFugacityTP::spinodalFunc::evalSS(const doublereal t, const doublereal return status; } //==================================================================================================================== -// Utility routine in the calculation of the saturation pressure -/* - * Private routine - * - * @param TKelvin temperature (kelvin) - * @param pres pressure (Pascal) - * @param densLiq Output density of liquid - * @param densGas output density of gas - * @param delGRT output delGRT - * - * @return Returns zero if both the gas and the liquid states are found for a given pressure. - */ int MixtureFugacityTP::corr0(doublereal TKelvin, doublereal pres, doublereal& densLiqGuess, doublereal& densGasGuess, doublereal& liqGRT, doublereal& gasGRT) { diff --git a/src/thermo/MolarityIonicVPSSTP.cpp b/src/thermo/MolarityIonicVPSSTP.cpp index 5e023ef80..517a9a2fd 100644 --- a/src/thermo/MolarityIonicVPSSTP.cpp +++ b/src/thermo/MolarityIonicVPSSTP.cpp @@ -290,11 +290,7 @@ void MolarityIonicVPSSTP::constructPhaseXML(XML_Node& phaseNode, std::string id) * - Activities, Standard States, Activity Concentrations ----------- */ //==================================================================================================================== -// Get the array of non-dimensional molar-based activity coefficients at -// the current solution temperature, pressure, and solution concentration. -/* - * @param ac Output vector of activity coefficients. Length: m_kk. - */ + void MolarityIonicVPSSTP::getLnActivityCoefficients(doublereal* lnac) const { /* diff --git a/src/thermo/RedlichKisterVPSSTP.cpp b/src/thermo/RedlichKisterVPSSTP.cpp index 1073517b3..d07482c2b 100644 --- a/src/thermo/RedlichKisterVPSSTP.cpp +++ b/src/thermo/RedlichKisterVPSSTP.cpp @@ -347,11 +347,7 @@ void RedlichKisterVPSSTP::constructPhaseXML(XML_Node& phaseNode, std::string id) * - Activities, Standard States, Activity Concentrations ----------- */ //==================================================================================================================== -// Get the array of non-dimensional molar-based activity coefficients at -// the current solution temperature, pressure, and solution concentration. -/* - * @param ac Output vector of activity coefficients. Length: m_kk. - */ + void RedlichKisterVPSSTP::getLnActivityCoefficients(doublereal* lnac) const { /* diff --git a/src/thermo/RedlichKwongMFTP.cpp b/src/thermo/RedlichKwongMFTP.cpp index a9ce4c631..7434fe0bd 100644 --- a/src/thermo/RedlichKwongMFTP.cpp +++ b/src/thermo/RedlichKwongMFTP.cpp @@ -1021,10 +1021,10 @@ void RedlichKwongMFTP::initThermoXML(XML_Node& phaseNode, std::string id) } //==================================================================================================================== -void RedlichKwongMFTP::readXMLPureFluid(XML_Node& PureFluidParam) +void RedlichKwongMFTP::readXMLPureFluid(XML_Node& pureFluidParam) { vector_fp vParams; - string xname = PureFluidParam.name(); + string xname = pureFluidParam.name(); if (xname != "pureFluidParameters") { throw CanteraError("RedlichKwongMFTP::readXMLPureFluid", "Incorrect name for processing this routine: " + xname); @@ -1034,7 +1034,7 @@ void RedlichKwongMFTP::readXMLPureFluid(XML_Node& PureFluidParam) * Read the species * Find the index of the species in the current phase. It's not an error to not find the species */ - string iName = PureFluidParam.attrib("species"); + string iName = pureFluidParam.attrib("species"); if (iName == "") { throw CanteraError("RedlichKwongMFTP::readXMLPureFluid", "no species attribute"); } @@ -1044,9 +1044,9 @@ void RedlichKwongMFTP::readXMLPureFluid(XML_Node& PureFluidParam) } size_t counter = iSpecies + m_kk * iSpecies; size_t nParamsExpected, nParamsFound; - size_t num = PureFluidParam.nChildren(); + size_t num = pureFluidParam.nChildren(); for (size_t iChild = 0; iChild < num; iChild++) { - XML_Node& xmlChild = PureFluidParam.child(iChild); + XML_Node& xmlChild = pureFluidParam.child(iChild); string stemp = xmlChild.name(); string nodeName = lowercase(stemp); diff --git a/src/thermo/SpeciesThermoFactory.cpp b/src/thermo/SpeciesThermoFactory.cpp index 04e7ddebb..4b698e3cf 100644 --- a/src/thermo/SpeciesThermoFactory.cpp +++ b/src/thermo/SpeciesThermoFactory.cpp @@ -674,7 +674,7 @@ static void installNasa9ThermoFromXML(std::string speciesName, * @param speciesName String name of the species * @param sp SpeciesThermo object that will receive the nasa polynomial object * @param k Species index within the phase - * @param tp Vector of XML Nodes that make up the parameterization + * @param f XML Node that contains the parameterization */ static void installAdsorbateThermoFromXML(std::string speciesName, SpeciesThermo& sp, size_t k,