Mark ConstDensityThermo for deprecation.

The thermophase ConstDensityThermo instantiates a class with
constant density_mass  Such a model is of dubious physical
validity/applicability and has minimal foreseeable use cases.
This commit marks it for deprecation, and adds a message in
ctml_writer.py (where the model has the misleading alias
'incompressible_solid') refering the interested user to consider
appropriate alternate thermophase classes 'lattice' or
'IdealSolidSoln.'
This commit is contained in:
Steven DeCaluwe 2019-06-12 12:02:33 -04:00 committed by Ray Speth
parent fb3dee36c5
commit ba8ac1d519
2 changed files with 17 additions and 2 deletions

View file

@ -24,13 +24,19 @@ namespace Cantera
* The density is assumed to be constant, no matter what the concentration of
* the solution.
*
* @deprecated To be removed after Cantera 2.5.0. Replaceable with LatticePhase
* or IdealSolidSolnPhase
*
* @ingroup thermoprops
*/
class ConstDensityThermo : public ThermoPhase
{
public:
//! Constructor.
ConstDensityThermo() {}
ConstDensityThermo() {
warn_deprecated("class ConstDensityThermo", "To be removed after Cantera "
"2.5.0. Consider replacing with LatticePhase or IdealSolidSolnPhase\n");
}
virtual std::string type() const {
return "ConstDensity";

View file

@ -2137,7 +2137,16 @@ class semiconductor(phase):
class incompressible_solid(phase):
"""An incompressible solid."""
"""An incompressible solid.
.. deprecated:: 2.5
To be deprecated with version 2.5, and removed thereafter.
This phase pointed to an ill-considered constant_density ThermoPhase
model, which assumed a constant mass density. This underlying phase is
simultaneously being deprecated. Please consider switching to
either `IdealSolidSolution` or `lattice` phase, instead.
"""
def __init__(self,
name = '',
elements = '',