Doxygen update

Worked on including GeneralSpeciesThermo
This commit is contained in:
Harry Moffat 2007-02-16 21:09:42 +00:00
parent db17641781
commit 731e6bc378
6 changed files with 190 additions and 99 deletions

View file

@ -76,7 +76,7 @@ namespace Cantera {
* @param c coefficients. The meaning of these depends on
* the parameterization.
*/
void GeneralSpeciesThermo::install(string name,
void GeneralSpeciesThermo::install(std::string name,
int index,
int type,
const doublereal* c,

View file

@ -19,109 +19,205 @@
namespace Cantera {
/**
* A species thermodynamic property manager for a phase.
* This is a general manager that can handle a wide variety
* of species thermodynamic polynomials for individual species.
* It is slow, however, because it recomputes the functions of
* temperature needed for each species.
*
*/
class GeneralSpeciesThermo : public SpeciesThermo {
//! A species thermodynamic property manager for a phase.
/*!
* This is a general manager that can handle a wide variety
* of species thermodynamic polynomials for individual species.
* It is slow, however, because it recomputes the functions of
* temperature needed for each species. What it does is to create
* a vector of SpeciesThermoInterpType objects.
*
* @ingroup spthermo
*/
class GeneralSpeciesThermo : public SpeciesThermo {
public:
public:
GeneralSpeciesThermo();
GeneralSpeciesThermo(const GeneralSpeciesThermo &);
const GeneralSpeciesThermo & operator=(const GeneralSpeciesThermo &);
virtual ~GeneralSpeciesThermo();
virtual SpeciesThermo *duplMyselfAsSpeciesThermo() const ;
//! Constructor
GeneralSpeciesThermo();
/**
* Install parameterization for a species.
* @param index Species index
* @param type ignored, since only NASA type is supported
* @param c coefficients. These are
* - c[0] midpoint temperature
* - c[1] - c[7] coefficients for low T range
* - c[8] - c[14] coefficients for high T range
*/
virtual void install(std::string name, int index, int type,
const doublereal* c,
doublereal minTemp, doublereal maxTemp,
doublereal refPressure);
/**
* update the properties for only one species.
*/
virtual void update_one(int k, doublereal t, doublereal* cp_R,
doublereal* h_RT,
doublereal* s_R) const;
virtual void update(doublereal t, doublereal* cp_R,
doublereal* h_RT, doublereal* s_R) const;
//! Copy constructor
GeneralSpeciesThermo(const GeneralSpeciesThermo &);
//! Assignment operator
const GeneralSpeciesThermo & operator=(const GeneralSpeciesThermo &);
//! destructor
virtual ~GeneralSpeciesThermo();
//! Duplicator
virtual SpeciesThermo *duplMyselfAsSpeciesThermo() const ;
//! Install a new species thermodynamic property
//! parameterization for one species.
/*!
* Install a SpeciesThermoInterpType object for the species, index.
* This routine contains an internal list of SpeciesThermoInterpType
* objects that it knows about. A factory-type lookup is done
* to create the object.
*
* @param name Name of the species
* @param index The 'update' method will update the property
* values for this species
* at position i index in the property arrays.
* @param type int flag specifying the type of parameterization to be
* installed.
* @param c vector of coefficients for the parameterization.
* This vector is simply passed through to the
* parameterization constructor. It's length depends upon
* the parameterization.
* @param minTemp minimum temperature for which this parameterization
* is valid.
* @param maxTemp maximum temperature for which this parameterization
* is valid.
* @param refPressure standard-state pressure for this
* parameterization.
* @see speciesThermoTypes.h
*
* @todo Create a factory method for SpeciesThermoInterpType.
* That's basically what we are doing here.
*/
virtual void install(std::string name, int index, int type,
const doublereal* c,
doublereal minTemp, doublereal maxTemp,
doublereal refPressure);
//! Like update(), but only updates the single species k.
/*!
* @param k species index
* @param T Temperature (Kelvin)
* @param cp_R Vector of Dimensionless heat capacities.
* (length m_kk).
* @param h_RT Vector of Dimensionless enthalpies.
* (length m_kk).
* @param s_R Vector of Dimensionless entropies.
* (length m_kk).
*/
virtual void update_one(int k, doublereal T, doublereal* cp_R,
doublereal* h_RT,
doublereal* s_R) const;
//! Compute the reference-state properties for all species.
/*!
* Given temperature T in K, this method updates the values of
* the non-dimensional heat capacity at constant pressure,
* enthalpy, and entropy, at the reference pressure, Pref
* of each of the standard states.
*
* @param T Temperature (Kelvin)
* @param cp_R Vector of Dimensionless heat capacities.
* (length m_kk).
* @param h_RT Vector of Dimensionless enthalpies.
* (length m_kk).
* @param s_R Vector of Dimensionless entropies.
* (length m_kk).
*/
virtual void update(doublereal T, doublereal* cp_R,
doublereal* h_RT, doublereal* s_R) const;
/**
* Return the lowest temperature at which the thermodynamic
* parameterization is valid. If no argument is supplied, the
* value is the one for which all species parameterizations
* are valid. Otherwise, if an integer argument is given, the
* value applies only to the species with that index.
*/
virtual doublereal minTemp(int k=-1) const;
//! Minimum temperature.
/*!
* If no argument is supplied, this
* method returns the minimum temperature for which \e all
* parameterizations are valid. If an integer index k is
* supplied, then the value returned is the minimum
* temperature for species k in the phase.
*
* @param k Species index
*/
virtual doublereal minTemp(int k=-1) const;
virtual doublereal maxTemp(int k=-1) const;
//! Maximum temperature.
/*!
* If no argument is supplied, this
* method returns the maximum temperature for which \e all
* parameterizations are valid. If an integer index k is
* supplied, then the value returned is the maximum
* temperature for parameterization k.
*
* @param k Species Index
*/
virtual doublereal maxTemp(int k=-1) const;
virtual doublereal refPressure(int k = -1) const;
//! The reference-state pressure for species k.
/*!
*
* returns the reference state pressure in Pascals for
* species k. If k is left out of the argument list,
* it returns the reference state pressure for the first
* species.
* Note that some SpeciesThermo implementations, such
* as those for ideal gases, require that all species
* in the same phase have the same reference state pressures.
*
* @param k Species Index
*/
virtual doublereal refPressure(int k = -1) const;
/**
* This utility function reports the type of parameterization
* used for the species, index.
*/
virtual int reportType(int index) const;
//! This utility function reports the type of parameterization
//! used for the species with index number index.
/*!
*
* @param index Species index
*/
virtual int reportType(int index) const;
/**
* This utility function reports back the type of
* parameterization and all of the parameters for the
* species, index.
* For the NASA object, there are 15 coefficients.
*/
virtual void reportParams(int index, int &type,
doublereal * const c,
doublereal &minTemp,
doublereal &maxTemp,
doublereal &refPressure) const;
//! This utility function reports back the type of
//! parameterization and all of the parameters for the species, index.
/*!
* @param index Species index
* @param type Integer type of the standard type
* @param c Vector of coefficients used to set the
* parameters for the standard state.
* @param minTemp output - Minimum temperature
* @param maxTemp output - Maximum temperature
* @param refPressure output - reference pressure (Pa).
*/
virtual void reportParams(int index, int &type,
doublereal * const c,
doublereal &minTemp,
doublereal &maxTemp,
doublereal &refPressure) const;
//! Modify parameters for the standard state
/*!
* @param index Species index
* @param c Vector of coefficients used to set the
* parameters for the standard state.
*/
virtual void modifyParams(int index, doublereal *c);
protected:
//! Modify parameters for the standard state
/*!
* @param index Species index
* @param c Vector of coefficients used to set the
* parameters for the standard state.
*/
virtual void modifyParams(int index, doublereal *c);
/**
* This is the main unknown in the object. It is
* a list of pointers to type SpeciesThermoInterpType.
* Note, this object owns the objects, so they are deleted
* in the destructor of this object.
*/
std::vector<SpeciesThermoInterpType *> m_sp;
doublereal m_tlow_max;
doublereal m_thigh_min;
doublereal m_p0;
protected:
/**
* Internal variable indicating the length of the
* number of species in the phase.
*/
int m_kk;
/**
* This is the main unknown in the object. It is
* a list of pointers to type SpeciesThermoInterpType.
* Note, this object owns the objects, so they are deleted
* in the destructor of this object.
*/
std::vector<SpeciesThermoInterpType *> m_sp;
private:
//! Maximum value of the lowest temperature
doublereal m_tlow_max;
//! Minimum value of the highest temperature
doublereal m_thigh_min;
//! reference pressure (Pa)
doublereal m_p0;
/**
* Internal variable indicating the length of the
* number of species in the phase.
*/
int m_kk;
private:
};
};
}

View file

@ -221,8 +221,6 @@ namespace Cantera {
* @param pref output - reference pressure (Pa).
* @param coeffs Vector of coefficients used to set the
* parameters for the standard state.
*
* @todo should be a const function.
*/
virtual void reportParameters(int &n, int &type,
doublereal &tlow, doublereal &thigh,

View file

@ -241,8 +241,6 @@ namespace Cantera {
* @param pref output - reference pressure (Pa).
* @param coeffs Vector of coefficients used to set the
* parameters for the standard state.
*
* @todo should be a const function.
*/
void reportParameters(int &n, int &type,
doublereal &tlow, doublereal &thigh,

View file

@ -86,7 +86,7 @@ namespace Cantera {
* .
* - GeneralSpeciesThermo in file GeneralSpeciesThermo.h
* - This is a general model. Each species is handled separately
* via a vector over SpeciesThermoInerpType classes.
* via a vector over SpeciesThermoInterpType classes.
* .
* - SpeciesThermo1 in file SpeciesThermoMgr.h
* - SpeciesThermoDuo in file SpeciesThermoMgr.h
@ -265,11 +265,10 @@ namespace Cantera {
*/
virtual int reportType(int index = -1) const = 0;
//! This utility function reports back the type of
//! parameterization and all of the parameters for the species, index.
/*!
* This utility function reports back the type of
* parameterization and all of the parameters for the
* species, index.
*
* @param index Species index
* @param type Integer type of the standard type
* @param c Vector of coefficients used to set the
@ -277,7 +276,6 @@ namespace Cantera {
* @param minTemp output - Minimum temperature
* @param maxTemp output - Maximum temperature
* @param refPressure output - reference pressure (Pa).
*
*/
virtual void reportParams(int index, int &type,
doublereal * const c,

View file

@ -105,6 +105,7 @@ FILE_PATTERNS = Kinetics.h Kinetics.cpp \
speciesThermoTypes.h SpeciesThermoMgr.h SpeciesThermo.h SpeciesThermoInterpTypes.h \
NasaThermo.h NasaPoly1.h NasaPoly2.h \
ShomateThermo.h ShomatePoly.h SimpleThermo.h \
GeneralSpeciesThermo.h GeneralSpeciesThermo.cpp \
utilities.h \
VPStandardStateTP.h VPStandardStateTP.cpp \
SingleSpeciesTP.h SingleSpeciesTP.cpp \