[Thermo] Make signatures of overridden Hf298 functions consistent
This commit is contained in:
parent
b5c5835ca9
commit
2ead29097c
27 changed files with 44 additions and 44 deletions
|
|
@ -123,9 +123,9 @@ public:
|
|||
doublereal& maxTemp,
|
||||
doublereal& refPressure) const;
|
||||
|
||||
virtual doublereal reportOneHf298(int k) const;
|
||||
virtual doublereal reportOneHf298(const size_t k) const;
|
||||
|
||||
virtual void modifyOneHf298(const int k, const doublereal Hf298New);
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New);
|
||||
|
||||
private:
|
||||
//! Provide the SpeciesthermoInterpType object
|
||||
|
|
|
|||
|
|
@ -768,7 +768,7 @@ public:
|
|||
*/
|
||||
virtual void getEnthalpy_RT_ref(doublereal* hrt) const;
|
||||
|
||||
virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) {
|
||||
m_spthermo->modifyOneHf298(k, Hf298New);
|
||||
m_tlast += 0.0001234;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ public:
|
|||
* @param k Species k
|
||||
* @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar
|
||||
*/
|
||||
virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) {
|
||||
m_spthermo->modifyOneHf298(k, Hf298New);
|
||||
m_tlast += 0.0001234;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@ public:
|
|||
* @param k Species k
|
||||
* @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar
|
||||
*/
|
||||
virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New);
|
||||
virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New);
|
||||
|
||||
private:
|
||||
//! error routine
|
||||
|
|
|
|||
|
|
@ -486,7 +486,7 @@ public:
|
|||
* @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar.
|
||||
* units = J/kmol.
|
||||
*/
|
||||
void modifyOneHf298SS(const int k, const doublereal Hf298New);
|
||||
void modifyOneHf298SS(const size_t k, const doublereal Hf298New);
|
||||
|
||||
//! Returns the vector of nondimensional
|
||||
//! Gibbs free energies of the reference state at the current temperature
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ public:
|
|||
return h;
|
||||
}
|
||||
|
||||
virtual void modifyOneHf298(const size_t& k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) {
|
||||
if (k != m_index) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -263,11 +263,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual doublereal reportOneHf298(int k) const {
|
||||
virtual doublereal reportOneHf298(const size_t k) const {
|
||||
throw CanteraError("reportHF298", "unimplemented");
|
||||
}
|
||||
|
||||
virtual void modifyOneHf298(const int k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) {
|
||||
throw CanteraError("reportHF298", "unimplemented");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ public:
|
|||
* @param k Species k
|
||||
* @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar
|
||||
*/
|
||||
virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) {
|
||||
m_spthermo->modifyOneHf298(k, Hf298New);
|
||||
m_tlast += 0.0001234;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ public:
|
|||
* @param k species index
|
||||
* @return Returns the current value of the Heat of Formation at 298K and 1 bar
|
||||
*/
|
||||
virtual doublereal reportOneHf298(int k) const = 0;
|
||||
virtual doublereal reportOneHf298(const size_t k) const = 0;
|
||||
|
||||
//! Modify the value of the 298 K Heat of Formation of the standard state of
|
||||
//! one species in the phase (J kmol-1)
|
||||
|
|
@ -329,7 +329,7 @@ public:
|
|||
* @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar.
|
||||
* units = J/kmol.
|
||||
*/
|
||||
virtual void modifyOneHf298(const int k, const doublereal Hf298New) = 0;
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) = 0;
|
||||
|
||||
};
|
||||
//@}
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ public:
|
|||
* @param k Species k
|
||||
* @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar
|
||||
*/
|
||||
virtual void modifyOneHf298(const int k, const doublereal Hf298New);
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New);
|
||||
|
||||
protected:
|
||||
//! lowest valid temperature
|
||||
|
|
|
|||
|
|
@ -107,11 +107,11 @@ public:
|
|||
doublereal& maxTemp,
|
||||
doublereal& refPressure) const;
|
||||
|
||||
virtual doublereal reportOneHf298(int k) const {
|
||||
virtual doublereal reportOneHf298(const size_t k) const {
|
||||
throw CanteraError("reportHF298", "unimplemented");
|
||||
}
|
||||
|
||||
virtual void modifyOneHf298(const int k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) {
|
||||
throw CanteraError("reportHF298", "unimplemented");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ public:
|
|||
*/
|
||||
virtual void getEnthalpy_RT_ref(doublereal* hrt) const;
|
||||
|
||||
virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) {
|
||||
m_spthermo->modifyOneHf298(k, Hf298New);
|
||||
m_tlast += 0.0001234;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ public:
|
|||
* @param k Species k
|
||||
* @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar
|
||||
*/
|
||||
virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) {
|
||||
m_spthermo->modifyOneHf298(k, Hf298New);
|
||||
m_tlast += 0.0001234;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ public:
|
|||
* @param k Species k
|
||||
* @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar
|
||||
*/
|
||||
virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New) {
|
||||
m_spthermo->modifyOneHf298(k, Hf298New);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ public:
|
|||
* @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar.
|
||||
* units = J/kmol.
|
||||
*/
|
||||
void modifyOneHf298SS(const size_t& k, const doublereal Hf298New);
|
||||
void modifyOneHf298SS(const size_t k, const doublereal Hf298New);
|
||||
|
||||
//! Returns the vector of nondimensional
|
||||
//! Gibbs free energies of the reference state at the current temperature
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ doublereal ConstCpPoly::reportHf298(doublereal* const h298) const
|
|||
return h;
|
||||
}
|
||||
|
||||
void ConstCpPoly::modifyOneHf298(const size_t& k, const doublereal Hf298New)
|
||||
void ConstCpPoly::modifyOneHf298(const size_t k, const doublereal Hf298New)
|
||||
{
|
||||
if (k != m_index) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public:
|
|||
virtual void modifyParameters(doublereal* coeffs);
|
||||
|
||||
virtual doublereal reportHf298(doublereal* const h298 = 0) const;
|
||||
virtual void modifyOneHf298(const size_t& k, const doublereal Hf298New);
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New);
|
||||
|
||||
protected:
|
||||
//! Base temperature
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ SpeciesThermoInterpType* GeneralSpeciesThermo::provideSTIT(size_t k)
|
|||
return m_sp[k];
|
||||
}
|
||||
|
||||
doublereal GeneralSpeciesThermo::reportOneHf298(int k) const
|
||||
doublereal GeneralSpeciesThermo::reportOneHf298(const size_t k) const
|
||||
{
|
||||
SpeciesThermoInterpType* sp_ptr = m_sp[k];
|
||||
doublereal h = -1.0;
|
||||
|
|
@ -314,7 +314,7 @@ doublereal GeneralSpeciesThermo::reportOneHf298(int k) const
|
|||
return h;
|
||||
}
|
||||
|
||||
void GeneralSpeciesThermo::modifyOneHf298(const int k, const doublereal Hf298New)
|
||||
void GeneralSpeciesThermo::modifyOneHf298(const size_t k, const doublereal Hf298New)
|
||||
{
|
||||
SpeciesThermoInterpType* sp_ptr = m_sp[k];
|
||||
if (sp_ptr) {
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ void LatticeSolidPhase::setParametersFromXML(const XML_Node& eosdata)
|
|||
|
||||
}
|
||||
|
||||
void LatticeSolidPhase::modifyOneHf298SS(const size_t& k, const doublereal Hf298New)
|
||||
void LatticeSolidPhase::modifyOneHf298SS(const size_t k, const doublereal Hf298New)
|
||||
{
|
||||
for (size_t n = 0; n < m_nlattice; n++) {
|
||||
if (lkstart_[n+1] < k) {
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ void MixtureFugacityTP::getEnthalpy_RT(doublereal* hrt) const
|
|||
getEnthalpy_RT_ref(hrt);
|
||||
}
|
||||
|
||||
void MixtureFugacityTP::modifyOneHf298SS(const int k, const doublereal Hf298New)
|
||||
void MixtureFugacityTP::modifyOneHf298SS(const size_t k, const doublereal Hf298New)
|
||||
{
|
||||
m_spthermo->modifyOneHf298(k, Hf298New);
|
||||
m_Tlast_ref += 0.0001234;
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ public:
|
|||
return h;
|
||||
}
|
||||
|
||||
void modifyOneHf298(const size_t& k, const doublereal Hf298New) {
|
||||
void modifyOneHf298(const size_t k, const doublereal Hf298New) {
|
||||
if (k != m_index) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,10 +209,10 @@ void NasaThermo::reportParams(size_t index, int& type,
|
|||
}
|
||||
}
|
||||
|
||||
doublereal NasaThermo::reportOneHf298(const int k) const
|
||||
doublereal NasaThermo::reportOneHf298(const size_t k) const
|
||||
{
|
||||
int grp = m_group_map[k];
|
||||
int pos = m_posInGroup_map[k];
|
||||
size_t grp = m_group_map[k];
|
||||
size_t pos = m_posInGroup_map[k];
|
||||
const std::vector<NasaPoly1> &mlg = m_low[grp-1];
|
||||
const NasaPoly1* nlow = &(mlg[pos]);
|
||||
doublereal tmid = nlow->maxTemp();
|
||||
|
|
@ -227,10 +227,10 @@ doublereal NasaThermo::reportOneHf298(const int k) const
|
|||
return h;
|
||||
}
|
||||
|
||||
void NasaThermo::modifyOneHf298(const int k, const doublereal Hf298New)
|
||||
void NasaThermo::modifyOneHf298(const size_t k, const doublereal Hf298New)
|
||||
{
|
||||
int grp = m_group_map[k];
|
||||
int pos = m_posInGroup_map[k];
|
||||
size_t grp = m_group_map[k];
|
||||
size_t pos = m_posInGroup_map[k];
|
||||
std::vector<NasaPoly1> &mlg = m_low[grp-1];
|
||||
NasaPoly1* nlow = &(mlg[pos]);
|
||||
std::vector<NasaPoly1> &mhg = m_high[grp-1];
|
||||
|
|
|
|||
|
|
@ -145,8 +145,8 @@ public:
|
|||
doublereal& maxTemp,
|
||||
doublereal& refPressure) const;
|
||||
|
||||
virtual doublereal reportOneHf298(const int k) const;
|
||||
virtual void modifyOneHf298(const int k, const doublereal Hf298New);
|
||||
virtual doublereal reportOneHf298(const size_t k) const;
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New);
|
||||
|
||||
//! Initialized to the type of parameterization
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ public:
|
|||
return hh;
|
||||
}
|
||||
|
||||
virtual void modifyOneHf298(const int k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) {
|
||||
doublereal hnow = reportHf298();
|
||||
doublereal delH = Hf298New - hnow;
|
||||
m_coeff[5] += delH / 1.0E6;
|
||||
|
|
@ -476,7 +476,7 @@ public:
|
|||
return h;
|
||||
}
|
||||
|
||||
virtual void modifyOneHf298(const size_t& k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) {
|
||||
if (k != m_index) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -328,12 +328,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual doublereal reportOneHf298(int k) const {
|
||||
virtual doublereal reportOneHf298(const size_t k) const {
|
||||
doublereal h;
|
||||
doublereal t = 298.15;
|
||||
|
||||
int grp = m_group_map[k];
|
||||
int pos = m_posInGroup_map[k];
|
||||
size_t grp = m_group_map[k];
|
||||
size_t pos = m_posInGroup_map[k];
|
||||
const std::vector<ShomatePoly> &mlg = m_low[grp-1];
|
||||
const ShomatePoly* nlow = &(mlg[pos]);
|
||||
|
||||
|
|
@ -348,10 +348,10 @@ public:
|
|||
return h;
|
||||
}
|
||||
|
||||
virtual void modifyOneHf298(const int k, const doublereal Hf298New) {
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) {
|
||||
|
||||
int grp = m_group_map[k];
|
||||
int pos = m_posInGroup_map[k];
|
||||
size_t grp = m_group_map[k];
|
||||
size_t pos = m_posInGroup_map[k];
|
||||
std::vector<ShomatePoly> &mlg = m_low[grp-1];
|
||||
ShomatePoly* nlow = &(mlg[pos]);
|
||||
std::vector<ShomatePoly> &mhg = m_high[grp-1];
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ doublereal SpeciesThermoInterpType::reportHf298(doublereal* const h298) const
|
|||
}
|
||||
//====================================================================================================
|
||||
|
||||
void SpeciesThermoInterpType::modifyOneHf298(const int k, const doublereal Hf298New)
|
||||
void SpeciesThermoInterpType::modifyOneHf298(const size_t k, const doublereal Hf298New)
|
||||
{
|
||||
throw CanteraError("SpeciesThermoInterpType::modifyOneHf298",
|
||||
"Not implemented");
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ void VPStandardStateTP::getEnthalpy_RT(doublereal* hrt) const
|
|||
}
|
||||
|
||||
//================================================================================================
|
||||
void VPStandardStateTP::modifyOneHf298SS(const size_t& k, const doublereal Hf298New)
|
||||
void VPStandardStateTP::modifyOneHf298SS(const size_t k, const doublereal Hf298New)
|
||||
{
|
||||
m_spthermo->modifyOneHf298(k, Hf298New);
|
||||
m_Tlast_ss += 0.0001234;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue