Skip to content

Commit

Permalink
[Thermo] Deprecate PDSS_IdealGas
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jun 15, 2023
1 parent 931089b commit 8c44e88
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
4 changes: 3 additions & 1 deletion doc/sphinx/yaml/species.rst
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,10 @@ Ideal gas

A species using the ideal gas equation of state, as
`described here <https://cantera.org/documentation/dev/doxygen/html/df/d31/classCantera_1_1PDSS__IdealGas.html#details>`__.
This model is the default if no ``equation-of-state`` section is included.

.. deprecated:: 3.0

This species thermo model is deprecated and will be removed after Cantera 3.0.

.. _sec-yaml-eos-ions-from-neutral:

Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/PDSS.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace Cantera
* handle the calculation of the reference state. This object adds the
* pressure dependencies to the thermo functions.
*
* - PDSS_ConstVol
* - PDSS_ConstVol (deprecated in Cantera 3.0)
* - standardState model = "ConstVol" or "constant_incompressible"
* - This model assumes that the species in the phase obeys the constant
* partial molar volume pressure dependence. The manager uses a
Expand Down
3 changes: 2 additions & 1 deletion include/cantera/thermo/PDSS_IdealGas.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ namespace Cantera
* This class is for a single Ideal Gas species.
*
* @ingroup pdssthermo
* @deprecated To be removed after Cantera 3.0.
*/
class PDSS_IdealGas : public PDSS_Nondimensional
{
public:
//! Default Constructor
PDSS_IdealGas() = default;
PDSS_IdealGas();

//! @name Molar Thermodynamic Properties of the Species Standard State
//! @{
Expand Down
5 changes: 5 additions & 0 deletions src/thermo/PDSS_IdealGas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
namespace Cantera
{

PDSS_IdealGas::PDSS_IdealGas()
{
warn_deprecated("class PDSS_IdealGas", "To be removed after Cantera 3.0");
}

void PDSS_IdealGas::initThermo()
{
PDSS::initThermo();
Expand Down
2 changes: 0 additions & 2 deletions test/data/thermo-models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,6 @@ gas-species:
-917.935173, 0.683010238]
- [3.3372792, -4.94024731e-05, 4.99456778e-07, -1.79566394e-10, 2.00255376e-14,
-950.158922, -3.20502331]
equation-of-state:
model: ideal-gas
- name: H2O
composition: {H: 2, O: 1}
thermo:
Expand Down
6 changes: 3 additions & 3 deletions test/thermo/RedlichKisterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "cantera/thermo/Species.h"
#include "cantera/thermo/ConstCpPoly.h"
#include "cantera/base/stringUtils.h"
#include "cantera/thermo/PDSS_IdealGas.h"
#include "cantera/thermo/PDSS_ConstVol.h"

namespace Cantera
{
Expand Down Expand Up @@ -112,10 +112,10 @@ TEST_F(RedlichKister_Test, fromScratch)
rk.addSpecies(sLiC6);
rk.addSpecies(sVC6);

auto ssLiC6 = make_unique<PDSS_IdealGas>();
auto ssLiC6 = make_unique<PDSS_ConstVol>();
rk.installPDSS(0, std::move(ssLiC6));

auto ssVC6 = make_unique<PDSS_IdealGas>();
auto ssVC6 = make_unique<PDSS_ConstVol>();
rk.installPDSS(1, std::move(ssVC6));

double hcoeffs[] = {-3.268E6, 3.955E6, -4.573E6, 6.147E6, -3.339E6, 1.117E7,
Expand Down

0 comments on commit 8c44e88

Please sign in to comment.