Doxygen update on SingleSpeciesTP
double to doublereal conversions made sure const parameters match on setTemperature()
This commit is contained in:
parent
8ea0c8197e
commit
3587de40b7
7 changed files with 156 additions and 104 deletions
|
|
@ -615,9 +615,9 @@ namespace Cantera {
|
|||
|
||||
|
||||
// This is temporary. We will get rid of this
|
||||
void IonsFromNeutralVPSSTP::setTemperature(doublereal t) {
|
||||
void IonsFromNeutralVPSSTP::setTemperature(const doublereal temp) {
|
||||
double p = pressure();
|
||||
IonsFromNeutralVPSSTP::setState_TP(t, p);
|
||||
IonsFromNeutralVPSSTP::setState_TP(temp, p);
|
||||
}
|
||||
|
||||
// This is temporary. We will get rid of this
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ namespace Cantera {
|
|||
* @{
|
||||
*/
|
||||
|
||||
virtual void setTemperature(doublereal t);
|
||||
virtual void setTemperature(const doublereal t);
|
||||
virtual void setPressure(doublereal p);
|
||||
|
||||
//! Set the temperature (K) and pressure (Pa)
|
||||
|
|
|
|||
|
|
@ -232,20 +232,29 @@ namespace Cantera {
|
|||
* of the zeroeth species.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the array of chemical potentials at unit activity
|
||||
* These are the standard state chemical potentials.
|
||||
* \f$ \mu^0_k \f$.
|
||||
|
||||
// Get the array of chemical potentials at unit activity
|
||||
/*
|
||||
* These are the standard state chemical potentials. \f$ \mu^0_k \f$.
|
||||
*
|
||||
* @param mu On return, Contains the chemical potential of the single species
|
||||
* and the phase. Units are J / kmol . Length = 1
|
||||
*/
|
||||
void SingleSpeciesTP::getChemPotentials(doublereal* mu) const {
|
||||
getStandardChemPotentials(mu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array of non-dimensional species chemical potentials
|
||||
* These are partial molar Gibbs free energies.
|
||||
* \f$ \mu_k / \hat R T \f$.
|
||||
|
||||
// Get the array of non-dimensional species chemical potentials
|
||||
// These are partial molar Gibbs free energies.
|
||||
/*
|
||||
* These are the standard state dimensionless chemical potentials.
|
||||
* \f$ \mu_k / \hat R T \f$.
|
||||
*
|
||||
* Units: unitless
|
||||
*
|
||||
* @param murt On return, Contains the chemical potential / RT of the single species
|
||||
* and the phase. Units are unitless. Length = 1
|
||||
*/
|
||||
void SingleSpeciesTP::getChemPotentials_RT(doublereal* murt) const {
|
||||
getStandardChemPotentials(murt);
|
||||
|
|
@ -253,21 +262,27 @@ namespace Cantera {
|
|||
murt[0] /= rt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the species electrochemical potentials. Units: J/kmol.
|
||||
// Get the species electrochemical potentials. Units: J/kmol.
|
||||
/*
|
||||
* This method adds a term \f$ Fz_k \phi_k \f$ to
|
||||
* each chemical potential.
|
||||
*
|
||||
* This is resolved here. A single single species phase
|
||||
* is not allowed to have anything other than a zero
|
||||
* charge.
|
||||
* This is resolved here. A single species phase
|
||||
* is not allowed to have anything other than a zero charge.
|
||||
*
|
||||
* @param murt On return, Contains the chemical potential / RT of the single species
|
||||
* and the phase. Units are unitless. Length = 1
|
||||
*/
|
||||
void SingleSpeciesTP::getElectrochemPotentials(doublereal* mu) const {
|
||||
getChemPotentials(mu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the species partial molar enthalpies. Units: J/kmol.
|
||||
// Get the species partial molar enthalpies. Units: J/kmol.
|
||||
/*
|
||||
* These are the phase enthalpies. \f$ h_k \f$.
|
||||
*
|
||||
* @param hbar On return, Contains the enthalpy of the single species
|
||||
* and the phase. Units are J / kmol . Length = 1
|
||||
*/
|
||||
void SingleSpeciesTP::
|
||||
getPartialMolarEnthalpies(doublereal* hbar) const {
|
||||
|
|
@ -276,8 +291,15 @@ namespace Cantera {
|
|||
hbar[0] *= _rt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the species partial molar internal energies. Units: J/kmol.
|
||||
// Get the species partial molar internal energies. Units: J/kmol.
|
||||
/*
|
||||
* These are the phase internal energies. \f$ u_k \f$.
|
||||
*
|
||||
* This member function is resolved here. A single species phase obtains its
|
||||
* thermo from the standard state function.
|
||||
*
|
||||
* @param ubar On return, Contains the internal energy of the single species
|
||||
* and the phase. Units are J / kmol . Length = 1
|
||||
*/
|
||||
void SingleSpeciesTP::
|
||||
getPartialMolarIntEnergies(doublereal* ubar) const {
|
||||
|
|
@ -286,8 +308,15 @@ namespace Cantera {
|
|||
ubar[0] *= _rt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the species partial molar entropy. Units: J/kmol K.
|
||||
// Get the species partial molar entropy. Units: J/kmol K.
|
||||
/*
|
||||
* This is the phase entropy. \f$ s(T,P) = s_o(T,P) \f$.
|
||||
*
|
||||
* This member function is resolved here. A single species phase obtains its
|
||||
* thermo from the standard state function.
|
||||
*
|
||||
* @param sbar On return, Contains the entropy of the single species
|
||||
* and the phase. Units are J / kmol / K . Length = 1
|
||||
*/
|
||||
void SingleSpeciesTP::
|
||||
getPartialMolarEntropies(doublereal* sbar) const {
|
||||
|
|
@ -295,16 +324,30 @@ namespace Cantera {
|
|||
sbar[0] *= GasConstant;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the species partial molar Heat Capacities. Units: J/kmol K.
|
||||
// Get the species partial molar Heat Capacities. Units: J/ kmol K.
|
||||
/*
|
||||
* This is the phase heat capacity. \f$ Cp(T,P) = Cp_o(T,P) \f$.
|
||||
*
|
||||
* This member function is resolved here. A single species phase obtains its
|
||||
* thermo from the standard state function.
|
||||
*
|
||||
* @param cpbar On return, Contains the heat capacity of the single species
|
||||
* and the phase. Units are J / kmol / K . Length = 1
|
||||
*/
|
||||
void SingleSpeciesTP::getPartialMolarCp(doublereal* cpbar) const {
|
||||
getCp_R(cpbar);
|
||||
cpbar[0] *= GasConstant;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the species partial molar volumes. Units: m^3/kmol.
|
||||
|
||||
// Get the species partial molar volumes. Units: m^3/kmol.
|
||||
/*
|
||||
* This is the phase molar volume. \f$ V(T,P) = V_o(T,P) \f$.
|
||||
*
|
||||
* This member function is resolved here. A single species phase obtains its
|
||||
* thermo from the standard state function.
|
||||
*
|
||||
* @param cpbar On return, Contains the molar volume of the single species
|
||||
* and the phase. Units are m^3 / kmol. Length = 1
|
||||
*/
|
||||
void SingleSpeciesTP::getPartialMolarVolumes(doublereal* vbar) const {
|
||||
double mw = molecularWeight(0);
|
||||
|
|
@ -317,7 +360,7 @@ namespace Cantera {
|
|||
* -----
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the dimensional Gibbs functions for the standard
|
||||
* state of the species at the current T and P.
|
||||
*/
|
||||
|
|
@ -326,14 +369,17 @@ namespace Cantera {
|
|||
gpure[0] *= GasConstant * temperature();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the molar volumes of each species in their standard
|
||||
* states at the current
|
||||
* <I>T</I> and <I>P</I> of the solution.
|
||||
* units = m^3 / kmol
|
||||
|
||||
// Get the molar volumes of each species in their standard
|
||||
// states at the current <I>T</I> and <I>P</I> of the solution.
|
||||
/*
|
||||
* units = m^3 / kmol
|
||||
*
|
||||
* We resolve this function at this level, by assigning
|
||||
* the molec weight divided by the phase density
|
||||
* the molecular weight divided by the phase density
|
||||
*
|
||||
* @param vbar On output this contains the standard volume of the species
|
||||
* and phase (m^3/kmol). Vector of length 1
|
||||
*/
|
||||
void SingleSpeciesTP::getStandardVolumes(doublereal* vbar) const {
|
||||
double mw = molecularWeight(0);
|
||||
|
|
|
|||
|
|
@ -256,49 +256,47 @@ namespace Cantera {
|
|||
* standard state functions for species 0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the array of non-dimensional species chemical potentials
|
||||
* These are partial molar Gibbs free energies.
|
||||
* \f$ \mu_k / \hat R T \f$.
|
||||
//! Get the array of non-dimensional species chemical potentials
|
||||
//! These are partial molar Gibbs free energies.
|
||||
/*!
|
||||
* These are the phase, partial molar, and the standard state
|
||||
* dimensionless chemical potentials.
|
||||
* \f$ \mu_k / \hat R T \f$.
|
||||
*
|
||||
* Units: unitless
|
||||
*
|
||||
* This function is resolved here by calling the standard state
|
||||
* thermo function.
|
||||
*
|
||||
* @param mu Output vector of dimensionless chemical potentials.
|
||||
* Length: m_kk.
|
||||
* @param murt On return, Contains the chemical potential / RT of the single species
|
||||
* and the phase. Units are unitless. Length = 1
|
||||
*/
|
||||
void getChemPotentials_RT(doublereal* mu) const;
|
||||
void getChemPotentials_RT(doublereal* murt) const;
|
||||
|
||||
/**
|
||||
* Get the species chemical potentials in the solution
|
||||
* These are partial molar Gibbs free energies.
|
||||
* Units: J/kmol.
|
||||
//! Get the array of chemical potentials
|
||||
/*!
|
||||
* These are the phase, partial molar, and the standard state chemical potentials.
|
||||
* \f$ \mu(T,P) = \mu^0_k(T,P) \f$.
|
||||
*
|
||||
* This function is resolved here by calling the standard state
|
||||
* thermo function.
|
||||
*
|
||||
* @param mu Output vector of species chemical
|
||||
* potentials. Length: m_kk. Units: J/kmol
|
||||
* @param mu On return, Contains the chemical potential of the single species
|
||||
* and the phase. Units are J / kmol . Length = 1
|
||||
*/
|
||||
void getChemPotentials(doublereal* mu) const;
|
||||
|
||||
/**
|
||||
* Get the species electrochemical potentials. Units: J/kmol.
|
||||
//! Get the species electrochemical potentials. Units: J/kmol.
|
||||
/*!
|
||||
* This method adds a term \f$ Fz_k \phi_k \f$ to
|
||||
* each chemical potential.
|
||||
*
|
||||
* This is resolved here. A single single species phase
|
||||
* is not allowed to have anything other than a zero
|
||||
* charge.
|
||||
* This is resolved here. A single species phase
|
||||
* is not allowed to have anything other than a zero charge.
|
||||
*
|
||||
* @param mu Output vector of species electrochemical
|
||||
* potentials. Length: m_kk. Units: J/kmol
|
||||
* @param mu On return, Contains the electrochemical potential of the single species
|
||||
* and the phase. Units J/kmol . Length = 1
|
||||
*/
|
||||
void getElectrochemPotentials(doublereal* mu) const;
|
||||
|
||||
//! Get the species partial molar enthalpies. Units: J/kmol.
|
||||
/*!
|
||||
* These are the phase enthalpies. \f$ h_k \f$.
|
||||
*
|
||||
* This function is resolved here by calling the standard state
|
||||
* thermo function.
|
||||
*
|
||||
|
|
@ -307,43 +305,52 @@ namespace Cantera {
|
|||
*/
|
||||
void getPartialMolarEnthalpies(doublereal* hbar) const;
|
||||
|
||||
//! Get the species partial molar enthalpies. Units: J/kmol.
|
||||
|
||||
//! Get the species partial molar internal energies. Units: J/kmol.
|
||||
/*!
|
||||
* This function is resolved here by calling the standard state
|
||||
* thermo function.
|
||||
* These are the phase internal energies. \f$ u_k \f$.
|
||||
*
|
||||
* @param ubar Output vector of speciar partial molar internal energies.
|
||||
* Length = m_kk. units are J/kmol.
|
||||
* This member function is resolved here. A single species phase obtains its
|
||||
* thermo from the standard state function.
|
||||
*
|
||||
* @param ubar On return, Contains the internal energy of the single species
|
||||
* and the phase. Units are J / kmol . Length = 1
|
||||
*/
|
||||
virtual void getPartialMolarIntEnergies(doublereal* ubar) const;
|
||||
|
||||
//! Get the species partial molar entropies. Units: J/kmol/K.
|
||||
//! Get the species partial molar entropy. Units: J/kmol K.
|
||||
/*!
|
||||
* This function is resolved here by calling the standard state
|
||||
* thermo function.
|
||||
* This is the phase entropy. \f$ s(T,P) = s_o(T,P) \f$.
|
||||
*
|
||||
* @param sbar Output vector of species partial molar entropies.
|
||||
* Length = 1. units are J/kmol/K.
|
||||
* This member function is resolved here. A single species phase obtains its
|
||||
* thermo from the standard state function.
|
||||
*
|
||||
* @param sbar On return, Contains the entropy of the single species
|
||||
* and the phase. Units are J / kmol / K . Length = 1
|
||||
*/
|
||||
void getPartialMolarEntropies(doublereal* sbar) const;
|
||||
|
||||
//! Get the species partial molar heat capacties. Units: J/kmol/K.
|
||||
//! Get the species partial molar Heat Capacities. Units: J/ kmol /K.
|
||||
/*!
|
||||
* This function is resolved here by calling the standard state
|
||||
* thermo function.
|
||||
* This is the phase heat capacity. \f$ Cp(T,P) = Cp_o(T,P) \f$.
|
||||
*
|
||||
* @param cpbar Output vector of species partial molar heat capacities
|
||||
* Length = 1. units are J/kmol/K.
|
||||
* This member function is resolved here. A single species phase obtains its
|
||||
* thermo from the standard state function.
|
||||
*
|
||||
* @param cpbar On return, Contains the heat capacity of the single species
|
||||
* and the phase. Units are J / kmol / K . Length = 1
|
||||
*/
|
||||
void getPartialMolarCp(doublereal* cpbar) const;
|
||||
|
||||
|
||||
//! Get the species partial molar volumes. Units: m^3/kmol.
|
||||
/*!
|
||||
* This function is resolved here by calling the density function.
|
||||
* This is the phase molar volume. \f$ V(T,P) = V_o(T,P) \f$.
|
||||
*
|
||||
* @param vbar Output vector of speciar partial molar volumes.
|
||||
* Length = 1. units are m^3/kmol.
|
||||
* This member function is resolved here. A single species phase obtains its
|
||||
* thermo from the standard state function.
|
||||
*
|
||||
* @param vbar On return, Contains the molar volume of the single species
|
||||
* and the phase. Units are m^3 / kmol. Length = 1
|
||||
*/
|
||||
void getPartialMolarVolumes(doublereal* vbar) const;
|
||||
|
||||
|
|
@ -367,19 +374,18 @@ namespace Cantera {
|
|||
*/
|
||||
void getPureGibbs(doublereal* gpure) const;
|
||||
|
||||
/**
|
||||
* Get the molar volumes of each species in their standard
|
||||
* states at the current
|
||||
* <I>T</I> and <I>P</I> of the solution.
|
||||
* units = m^3 / kmol
|
||||
//! Get the molar volumes of each species in their standard
|
||||
//! states at the current <I>T</I> and <I>P</I> of the solution.
|
||||
/*!
|
||||
* units = m^3 / kmol
|
||||
*
|
||||
* We resolve this function at this level, by assigning
|
||||
* the molec weight divided by the phase density
|
||||
* the molecular weight divided by the phase density
|
||||
*
|
||||
* @param vol vector of length one, containing the standard volume
|
||||
* of the phase.
|
||||
* @param vbar On output this contains the standard volume of the species
|
||||
* and phase (m^3/kmol). Vector of length 1
|
||||
*/
|
||||
void getStandardVolumes(doublereal *vol) const;
|
||||
void getStandardVolumes(doublereal *vbar) const;
|
||||
|
||||
|
||||
//@}
|
||||
|
|
|
|||
|
|
@ -357,8 +357,8 @@ namespace Cantera {
|
|||
}
|
||||
|
||||
|
||||
void VPStandardStateTP::setTemperature(doublereal t) {
|
||||
setState_TP(t, m_Pcurrent);
|
||||
void VPStandardStateTP::setTemperature(const doublereal temp) {
|
||||
setState_TP(temp, m_Pcurrent);
|
||||
updateStandardStateThermo();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -282,9 +282,9 @@ namespace Cantera {
|
|||
* make sense to calculate the standard state without first
|
||||
* setting T and P.
|
||||
*
|
||||
* @param T Temperature (kelvin)
|
||||
* @param temp Temperature (kelvin)
|
||||
*/
|
||||
virtual void setTemperature(const doublereal T);
|
||||
virtual void setTemperature(const doublereal temp);
|
||||
|
||||
|
||||
//! Set the internally storred pressure (Pa) at constant
|
||||
|
|
@ -296,7 +296,7 @@ namespace Cantera {
|
|||
*
|
||||
* @param p input Pressure (Pa)
|
||||
*/
|
||||
virtual void setPressure(const doublereal p);
|
||||
virtual void setPressure(doublereal p);
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ namespace Cantera {
|
|||
*
|
||||
* units = returns density in kg m-3.
|
||||
*/
|
||||
static double density_T(double T, double P, int ifunc);
|
||||
static doublereal density_T(doublereal T, doublereal P, int ifunc);
|
||||
|
||||
|
||||
//! Bradley-Pitzer equation for the dielectric constant
|
||||
|
|
@ -200,7 +200,7 @@ namespace Cantera {
|
|||
* value at 25C and 1 atm, relEps = 78.38
|
||||
*
|
||||
*/
|
||||
double relEpsilon(double T, double P_pascal, int ifunc = 0);
|
||||
doublereal relEpsilon(doublereal T, doublereal P_pascal, int ifunc = 0);
|
||||
|
||||
|
||||
//! ADebye calculates the value of A_Debye as a function
|
||||
|
|
@ -243,7 +243,7 @@ namespace Cantera {
|
|||
* - ifunc = 3 return pressure first derivative
|
||||
* .
|
||||
*
|
||||
* @return Returns a single double whose meaning depends on ifunc:
|
||||
* @return Returns a single doublereal whose meaning depends on ifunc:
|
||||
* - ifunc = 0 return value
|
||||
* - ifunc = 1 return temperature derivative
|
||||
* - ifunc = 2 return temperature second derivative
|
||||
|
|
@ -258,7 +258,7 @@ namespace Cantera {
|
|||
* the Pitzer table p. 99 to 4 significant digits at 25C.
|
||||
* and 20C. (Aphi = ADebye/3)
|
||||
*/
|
||||
double ADebye(double T, double P, int ifunc);
|
||||
doublereal ADebye(doublereal T, doublereal P, int ifunc);
|
||||
|
||||
|
||||
//! Returns the saturation pressure given the temperature
|
||||
|
|
@ -266,7 +266,7 @@ namespace Cantera {
|
|||
* @param T temperature (kelvin)
|
||||
* @return returns the saturation pressure (pascal)
|
||||
*/
|
||||
double satPressure(double T);
|
||||
doublereal satPressure(doublereal T);
|
||||
|
||||
|
||||
//! Returns the density of water
|
||||
|
|
@ -277,14 +277,14 @@ namespace Cantera {
|
|||
* @param T Temperature (kelvin)
|
||||
* @param P pressure (pascal)
|
||||
*/
|
||||
double density_IAPWS(double T, double P);
|
||||
doublereal density_IAPWS(doublereal T, doublereal P);
|
||||
|
||||
//! Returns the density of water
|
||||
/*!
|
||||
* This function uses the internal state of the
|
||||
* underlying water object
|
||||
*/
|
||||
double density_IAPWS() const;
|
||||
doublereal density_IAPWS() const;
|
||||
|
||||
|
||||
//! returns the coefficient of thermal expansion
|
||||
|
|
@ -292,14 +292,14 @@ namespace Cantera {
|
|||
* @param T Temperature (kelvin)
|
||||
* @param P pressure (pascal)
|
||||
*/
|
||||
double coeffThermalExp_IAPWS(double T, double P);
|
||||
doublereal coeffThermalExp_IAPWS(doublereal T, doublereal P);
|
||||
|
||||
//! Returns the isothermal compressibility of water
|
||||
/*!
|
||||
* @param T temperature in kelvin
|
||||
* @param P pressure in pascal
|
||||
*/
|
||||
double isothermalCompressibility_IAPWS(double T, double P);
|
||||
doublereal isothermalCompressibility_IAPWS(doublereal T, doublereal P);
|
||||
|
||||
//! Returns the viscosity of water at the current conditions
|
||||
//! (kg/m/s)
|
||||
|
|
@ -316,7 +316,7 @@ namespace Cantera {
|
|||
* for steam and for water, even near the critical point.
|
||||
* Pressures above 500 MPa and temperature above 900 C are suspect.
|
||||
*/
|
||||
double viscosityWater() const;
|
||||
doublereal viscosityWater() const;
|
||||
|
||||
//! Returns the thermal conductivity of water at the current conditions
|
||||
//! (W/m/K)
|
||||
|
|
@ -333,7 +333,7 @@ namespace Cantera {
|
|||
* for steam and for water, even near the critical point.
|
||||
* Pressures above 500 MPa and temperature above 900 C are suspect.
|
||||
*/
|
||||
double thermalConductivityWater() const;
|
||||
doublereal thermalConductivityWater() const;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue