[Thermo] Remove unimplemented overrides of ThermoPhase methods

ThermoPhase already provides an implementation of these methods that raises
an exception to indicate that the method is unimplemented. Therefore,
derived classes which do not implement a method do not need to do this.
This commit is contained in:
Ray Speth 2014-03-27 01:29:27 +00:00
parent f1066aa072
commit 2468b47ae7
8 changed files with 0 additions and 245 deletions

View file

@ -792,31 +792,6 @@ public:
*/
virtual void setState_TP(doublereal t, doublereal p);
/**
* The isothermal compressibility. Units: 1/Pa.
* The isothermal compressibility is defined as
* \f[
* \kappa_T = -\frac{1}{v}\left(\frac{\partial v}{\partial P}\right)_T
* \f]
*
* It's equal to zero for this model, since the molar volume
* doesn't change with pressure or temperature.
*/
virtual doublereal isothermalCompressibility() const;
/**
* The thermal expansion coefficient. Units: 1/K.
* The thermal expansion coefficient is defined as
*
* \f[
* \beta = \frac{1}{v}\left(\frac{\partial v}{\partial T}\right)_P
* \f]
*
* It's equal to zero for this model, since the molar volume
* doesn't change with pressure or temperature.
*/
virtual doublereal thermalExpansionCoeff() const;
/**
* @}
* @name Activities, Standard States, and Activity Concentrations
@ -1095,48 +1070,6 @@ public:
*/
virtual void setParametersFromXML(const XML_Node& eosdata);
/// @name Saturation properties.
/// These methods are only implemented by subclasses that
/// implement full liquid-vapor equations of state.
///
virtual doublereal satTemperature(doublereal p) const {
err("satTemperature");
return -1.0;
}
//! Get the saturation pressure for a given temperature.
/*!
* Note the limitations of this function. Stability considerations
* concerning multiphase equilibrium are ignored in this
* calculation. Therefore, the call is made directly to the SS of
* water underneath. The object is put back into its original
* state at the end of the call.
*
* @todo This is probably not implemented correctly. The stability
* of the salt should be added into this calculation. The
* underlying water model may be called to get the stability
* of the pure water solution, if needed.
*
* @param T Temperature (kelvin)
*/
virtual doublereal satPressure(doublereal T) {
err("satPressure");
return -1.0;
}
virtual doublereal vaporFraction() const {
err("vaprFraction");
return -1.0;
}
virtual void setState_Tsat(doublereal t, doublereal x) {
err("setState_sat");
}
virtual void setState_Psat(doublereal p, doublereal x) {
err("setState_sat");
}
//@}
/*

View file

@ -1544,29 +1544,6 @@ public:
*/
virtual void setState_TP(doublereal t, doublereal p);
/**
* The isothermal compressibility. Units: 1/Pa.
* The isothermal compressibility is defined as
* \f[
* \kappa_T = -\frac{1}{v}\left(\frac{\partial v}{\partial P}\right)_T
* \f]
* It's equal to zero for this model, since the molar volume
* doesn't change with pressure or temperature.
*/
virtual doublereal isothermalCompressibility() const;
/**
* The thermal expansion coefficient. Units: 1/K.
* The thermal expansion coefficient is defined as
*
* \f[
* \beta = \frac{1}{v}\left(\frac{\partial v}{\partial T}\right)_P
* \f]
* It's equal to zero for this model, since the molar volume
* doesn't change with pressure or temperature.
*/
virtual doublereal thermalExpansionCoeff() const;
/**
* @}
* @name Potential Energy
@ -1918,40 +1895,6 @@ public:
*/
virtual void setParametersFromXML(const XML_Node& eosdata);
//---------------------------------------------------------
/// @name Critical state properties.
/// These methods are only implemented by some subclasses.
//@{
/// Critical temperature (K).
virtual doublereal critTemperature() const {
err("critTemperature");
return -1.0;
}
/// Critical pressure (Pa).
virtual doublereal critPressure() const {
err("critPressure");
return -1.0;
}
/// Critical density (kg/m3).
virtual doublereal critDensity() const {
err("critDensity");
return -1.0;
}
//@}
/// @name Saturation properties.
/// These methods are only implemented by subclasses that
/// implement full liquid-vapor equations of state.
///
virtual doublereal satTemperature(doublereal p) const {
err("satTemperature");
return -1.0;
}
//! Get the saturation pressure for a given temperature.
/*!
* Note the limitations of this function. Stability considerations
@ -1969,21 +1912,6 @@ public:
*/
virtual doublereal satPressure(doublereal T);
virtual doublereal vaporFraction() const {
err("vaprFraction");
return -1.0;
}
virtual void setState_Tsat(doublereal t, doublereal x) {
err("setState_sat");
}
virtual void setState_Psat(doublereal p, doublereal x) {
err("setState_sat");
}
//@}
/*
* -------------- Utilities -------------------------------
*/

View file

@ -629,41 +629,6 @@ public:
*/
virtual void setParametersFromXML(const XML_Node& eosdata);
/// @name Critical state properties.
/// These methods are only implemented by some subclasses.
//@{
/**
* Critical temperature (K).
* Not implemented for this phase type.
*/
virtual doublereal critTemperature() const {
err("critTemperature");
return -1.0;
}
/**
* Critical pressure (Pa).
*
* Not implemented for this phase type.
*/
virtual doublereal critPressure() const {
err("critPressure");
return -1.0;
}
/**
* Critical density (kg/m3).
* Not implemented for this phase type.
*/
virtual doublereal critDensity() const {
err("critDensity");
return -1.0;
}
//@}
/*
* -------------- Utilities -------------------------------
*/

View file

@ -135,14 +135,6 @@ public:
*/
virtual doublereal pressure() const;
//! Returns the isothermal compressibility. Units: 1/Pa.
/*!
* The isothermal compressibility is defined as
* \f[
* \kappa_T = -\frac{1}{v}\left(\frac{\partial v}{\partial P}\right)_T
* \f]
*/
virtual doublereal isothermalCompressibility() const;
// @}
protected:

View file

@ -571,34 +571,6 @@ public:
*/
virtual void setParametersFromXML(const XML_Node& eosdata) {}
//@}
/// @name Saturation properties.
/// These methods are only implemented by subclasses that
/// implement full liquid-vapor equations of state.
///
virtual doublereal satTemperature(doublereal p) const {
err("satTemperature");
return -1.0;
}
virtual doublereal satPressure(doublereal t) {
err("satPressure");
return -1.0;
}
virtual doublereal vaporFraction() const {
err("vaprFraction");
return -1.0;
}
virtual void setState_Tsat(doublereal t, doublereal x) {
err("setState_sat");
}
virtual void setState_Psat(doublereal p, doublereal x) {
err("setState_sat");
}
//@}
/**

View file

@ -284,20 +284,6 @@ void DebyeHuckel::calcDensity()
Phase::setDensity(dd);
}
doublereal DebyeHuckel::isothermalCompressibility() const
{
throw CanteraError("DebyeHuckel::isothermalCompressibility",
"unimplemented");
return 0.0;
}
doublereal DebyeHuckel::thermalExpansionCoeff() const
{
throw CanteraError("DebyeHuckel::thermalExpansionCoeff",
"unimplemented");
return 0.0;
}
void DebyeHuckel::setDensity(doublereal rho)
{
double dens = density();

View file

@ -690,20 +690,6 @@ void HMWSoln::calcDensity()
Phase::setDensity(dd);
}
doublereal HMWSoln::isothermalCompressibility() const
{
throw CanteraError("HMWSoln::isothermalCompressibility",
"unimplemented");
return 0.0;
}
doublereal HMWSoln::thermalExpansionCoeff() const
{
throw CanteraError("HMWSoln::thermalExpansionCoeff",
"unimplemented");
return 0.0;
}
double HMWSoln::density() const
{
// calcDensity();

View file

@ -344,13 +344,6 @@ void RedlichKwongMFTP::setConcentrations(const doublereal* const c)
updateAB();
}
doublereal RedlichKwongMFTP::isothermalCompressibility() const
{
throw CanteraError("RedlichKwongMFTP::isothermalCompressibility() ",
"not implemented");
return 0.0;
}
void RedlichKwongMFTP::getActivityConcentrations(doublereal* c) const
{
getPartialMolarVolumes(DATA_PTR(m_partialMolarVolumes));