Enabled class Adsorbate
This commit is contained in:
parent
55ef0f3c73
commit
cc042e088f
5 changed files with 3 additions and 23 deletions
|
|
@ -324,10 +324,6 @@ opts.AddVariables(
|
|||
'sphinx_docs',
|
||||
"""Build HTML documentation for the Python module using Sphinx""",
|
||||
False),
|
||||
BoolVariable(
|
||||
'with_adsorbate',
|
||||
"""Include thermodynamic model for adsorbates in the Cantera kernel""",
|
||||
True),
|
||||
BoolVariable(
|
||||
'with_h298modify_capability',
|
||||
"""Enable changing the 298K heats of formation directly via
|
||||
|
|
|
|||
|
|
@ -137,10 +137,6 @@ of this file is:
|
|||
kernel.
|
||||
- default: 'yes'
|
||||
|
||||
* with_adsorbate: [ yes | no ]
|
||||
Include thermodynamic model for adsorbates in the Cantera kernel
|
||||
- default: 'yes'
|
||||
|
||||
* with_h298modify_capability: [ yes | no ]
|
||||
Enable changing the 298K heats of formation directly via the C++
|
||||
layer.
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ public:
|
|||
}
|
||||
|
||||
//! Returns an integer representing the species index
|
||||
virtual int speciesIndex() const {
|
||||
virtual size_t speciesIndex() const {
|
||||
return m_index;
|
||||
}
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ public:
|
|||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
*/
|
||||
void reportParameters(int& n, int& type,
|
||||
void reportParameters(size_t& n, int& type,
|
||||
doublereal& tlow, doublereal& thigh,
|
||||
doublereal& pref,
|
||||
doublereal* const coeffs) const {
|
||||
|
|
@ -176,7 +176,7 @@ public:
|
|||
pref = m_Pref;
|
||||
coeffs[0] = m_nFreqs;
|
||||
coeffs[1] = m_be;
|
||||
for (int i = 2; i < m_nFreqs+2; i++) {
|
||||
for (size_t i = 2; i < m_nFreqs+2; i++) {
|
||||
coeffs[i] = m_freq[i-2];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,10 +12,7 @@
|
|||
#include "ShomatePoly.h"
|
||||
#include "ConstCpPoly.h"
|
||||
#include "cantera/thermo/Mu0Poly.h"
|
||||
#ifdef WITH_ADSORBATE
|
||||
#include "cantera/thermo/AdsorbateThermo.h"
|
||||
#endif
|
||||
|
||||
#include "cantera/thermo/SpeciesThermoFactory.h"
|
||||
#include <iostream>
|
||||
|
||||
|
|
@ -157,12 +154,10 @@ void GeneralSpeciesThermo::install(std::string name,
|
|||
m_sp[index] = new NasaPoly2(index, minTemp, maxTemp,
|
||||
refPressure, c);
|
||||
break;
|
||||
#ifdef WITH_ADSORBATE
|
||||
case ADSORBATE:
|
||||
m_sp[index] = new Adsorbate(index, minTemp, maxTemp,
|
||||
refPressure, c);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
throw UnknownSpeciesThermoModel(
|
||||
"GeneralSpeciesThermo::install",
|
||||
|
|
|
|||
|
|
@ -18,10 +18,7 @@ using namespace std;
|
|||
#include "Nasa9PolyMultiTempRegion.h"
|
||||
#include "cantera/thermo/Nasa9Poly1.h"
|
||||
|
||||
#ifdef WITH_ADSORBATE
|
||||
#include "cantera/thermo/AdsorbateThermo.h"
|
||||
#endif
|
||||
|
||||
#include "cantera/thermo/SpeciesThermoMgr.h"
|
||||
#include "cantera/thermo/speciesThermoTypes.h"
|
||||
#include "cantera/thermo/VPSSMgr.h"
|
||||
|
|
@ -677,7 +674,6 @@ static void installNasa9ThermoFromXML(std::string speciesName,
|
|||
}
|
||||
|
||||
|
||||
#ifdef WITH_ADSORBATE
|
||||
//! Install a Adsorbate polynomial thermodynamic property parameterization for species k into a SpeciesThermo instance.
|
||||
/*!
|
||||
* This is called by method installThermoForSpecies if a Adsorbate block is found in the XML input.
|
||||
|
|
@ -719,7 +715,6 @@ static void installAdsorbateThermoFromXML(std::string speciesName,
|
|||
copy(freqs.begin(), freqs.end(), coeffs.begin() + 2);
|
||||
(&sp)->install(speciesName, k, ADSORBATE, &coeffs[0], tmin, tmax, pref);
|
||||
}
|
||||
#endif
|
||||
|
||||
//================================================================================================
|
||||
// Install a species thermodynamic property parameterization
|
||||
|
|
@ -782,11 +777,9 @@ void SpeciesThermoFactory::installThermoForSpecies
|
|||
} else if (f->name() == "NASA9") {
|
||||
installNasa9ThermoFromXML(speciesNode["name"], spthermo, k, tp);
|
||||
}
|
||||
#ifdef WITH_ADSORBATE
|
||||
else if (f->name() == "adsorbate") {
|
||||
installAdsorbateThermoFromXML(speciesNode["name"], spthermo, k, *f);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
throw UnknownSpeciesThermoModel("installThermoForSpecies",
|
||||
speciesNode["name"], f->name());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue