38 VPSSMgr(right.m_vptp_ptr, right.m_spthermo)
68 throw CanteraError(
"VPSSMgr_Water_ConstVol::initAllPtrs",
107 for (
size_t k = 0; k <
m_kk; k++) {
154 copy(
m_V0.begin(),
m_V0.end(), vol);
161 for (
size_t k = 0; k <
m_kk; k++) {
178 for (
size_t k = 1; k <
m_kk; k++) {
211 throw CanteraError(
"VPSSMgr_Water_ConstVol::initThermoXML",
218 for (
size_t k = 1; k <
m_kk; k++) {
221 throw CanteraError(
"VPSSMgr_Water_ConstVol::initThermoXML",
226 throw CanteraError(
"VPSSMgr_Water_ConstVol::initThermoXML",
227 "no standardState Node for species " + s->
attrib(
"name"));
229 if (ss->
attrib(
"model") !=
"constant_incompressible") {
230 throw CanteraError(
"VPSSMgr_Water_ConstVol::initThermoXML",
231 "standardState model for species isn't "
232 "constant_incompressible: " + s->
attrib(
"name"));
240 const XML_Node*
const phaseNode_ptr)
247 string xn = speciesNode[
"name"];
248 if (xn !=
"H2O(L)") {
249 throw CanteraError(
"VPSSMgr_Water_ConstVol::installSpecies",
250 "h2o wrong name: " + xn);
253 std::string model = ss->
attrib(
"model");
254 if (model !=
"waterIAPWS" && model !=
"waterPDSS") {
255 throw CanteraError(
"VPSSMgr_Water_ConstVol::installSpecies",
256 "wrong SS mode: " + model);
262 throw CanteraError(
"VPSSMgr_Water_ConstVol::installSpecies",
263 "failed dynamic cast");
273 throw CanteraError(
"VPSSMgr_Water_ConstVol::installSpecies",
274 "no standardState Node for species " + speciesNode.
name());
276 if (ss->
attrib(
"model") !=
"constant_incompressible") {
277 throw CanteraError(
"VPSSMgr_Water_ConstVol::initThermoXML",
278 "standardState model for species isn't "
279 "constant_incompressible: " + speciesNode.
name());
281 if (
m_Vss.size() < k+1) {
282 m_Vss.resize(k+1, 0.0);
vector_fp m_V0
Vector containing the species reference molar volumes.
virtual doublereal cp_mole() const
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
XML_Node * findByAttr(const std::string &attr, const std::string &val, int depth=100000) const
This routine carries out a recursive search for an XML node based on an attribute of each XML node...
doublereal molecularWeight(size_t k) const
Molecular weight of species k.
PDSS_Water * m_waterSS
Pointer to the Water PDSS object.
bool m_useTmpRefStateStorage
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data...
virtual PDSS * createInstallPDSS(size_t k, const XML_Node &speciesNode, const XML_Node *const phaseNode_ptr)
Install specific content for species k in the standard-state thermodynamic calculator and also create...
const doublereal OneAtm
One atmosphere [Pa].
std::string attrib(const std::string &attr) const
Function returns the value of an attribute.
vector_fp m_sss_R
Vector containing the species Standard State entropies at T = m_tlast and P = m_plast.
Virtual base class for the classes that manage the calculation of standard state properties for all t...
VPSSMgr_Water_ConstVol & operator=(const VPSSMgr_Water_ConstVol &right)
Assignment operator.
virtual void initThermo()
VPSSMgr & operator=(const VPSSMgr &right)
Assignment operator.
bool m_useTmpStandardStateStorage
virtual void initAllPtrs(VPStandardStateTP *vp_ptr, SpeciesThermo *sp_ptr)
Initialize the internal shallow pointers in this object.
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Finalize the thermo after all species have been entered.
size_t m_kk
Number of species in the phase.
Class XML_Node is a tree-based representation of the contents of an XML file.
Implementation of a pressure dependent standard state virtual function for a Pure Water Phase (see Sp...
Handles the calculation of standard state thermo properties for real water and a set of species which...
virtual PDSS_enumType reportPDSSType(int index=-1) const
This utility function reports the type of parameterization used for the species with index number ind...
virtual VPSSMgr_enumType reportVPSSMgrType() const
This utility function reports the type of manager for the calculation of ss properties.
virtual void getCp_R_ref(doublereal *cpr) const
Variable pressure SS calculate for phases consisting of real water as the first species and species h...
virtual void initThermo()
virtual doublereal density() const
Return the standard state density at standard state.
virtual void getGibbs_ref(doublereal *g) const
Pure Virtual base class for the species thermo manager classes.
VPSSMgr_enumType
enum for VPSSMgr types that are responsible for calculating the species standard state and reference-...
XML_Node & child(const size_t n) const
Return a changeable reference to the n'th child of the current node.
const XML_Node * findByName(const std::string &nm, int depth=100000) const
This routine carries out a recursive search for an XML node based on the name of the node...
virtual doublereal enthalpy_mole() const
Return the molar enthalpy in units of J kmol-1.
doublereal pref_safe(doublereal temp) const
Returns a reference pressure value that can be safely calculated by the underlying real equation of s...
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
vector_fp m_cp0_R
Vector containing the species reference constant pressure heat capacities at T = m_tlast and P = p_re...
A species thermodynamic property manager for a phase.
virtual void setTemperature(doublereal temp)
Set the internal temperature.
VPStandardStateTP * m_vptp_ptr
Variable pressure ThermoPhase object.
Declaration file for a derived class that handles the calculation of standard state thermo properties...
Class for pressure dependent standard states that use a constant volume model.
virtual void getStandardVolumes_ref(doublereal *vol) const
Get the molar volumes of the species reference states at the current T and P_ref of the solution...
virtual void initAllPtrs(VPStandardStateTP *vp_ptr, SpeciesThermo *sp_ptr)
Initialize the internal shallow pointers in this object.
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
Class for the liquid water pressure dependent standard state.
doublereal m_plast
The last pressure at which the Standard State thermodynamic properties were calculated at...
PDSS_enumType
Types of PDSS's.
std::string name() const
Returns the name of the XML node.
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Finalize the thermo after all species have been entered.
virtual doublereal gibbs_mole() const
Return the molar Gibbs free energy in units of J kmol-1.
Base class for exceptions thrown by Cantera classes.
VPSSMgr_Water_ConstVol(VPStandardStateTP *vp_ptr, SpeciesThermo *sp_ptr)
Base Constructor.
This is a filter class for ThermoPhase that implements some prepatory steps for efficiently handling ...
virtual void getEntropy_R_ref(doublereal *er) const
virtual void getGibbs_RT_ref(doublereal *grt) const
virtual VPSSMgr * duplMyselfAsVPSSMgr() const
Duplication routine for objects which derive from VPSSMgr.
vector_fp m_Vss
Vector containing the species standard state volumes at T = m_tlast and P = m_plast.
vector_fp m_hss_RT
Vector containing the species Standard State enthalpies at T = m_tlast and P = m_plast.
vector_fp m_cpss_R
Vector containing the species Standard State constant pressure heat capacities at T = m_tlast and P =...
Headers for a completely general species thermodynamic property manager for a phase (see Managers for...
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
Virtual base class for a species with a pressure dependent standard state.
vector_fp m_g0_RT
Vector containing the species reference Gibbs functions at T = m_tlast and P = p_ref.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
doublereal getFloat(const XML_Node &parent, const std::string &name, const std::string &type)
Get a floating-point value from a child element.
Declarations for the class PDSS_ConstVol (pressure dependent standard state) which handles calculatio...
SpeciesThermo * m_spthermo
Pointer to reference state thermo calculator.
virtual void update(doublereal T, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const =0
Compute the reference-state properties for all species.
void installSTSpecies(size_t k, const XML_Node &speciesNode, const XML_Node *phaseNode_ptr)
Install specific content for species k in the reference-state thermodynamic SpeciesManager object...
doublereal m_tlast
The last temperature at which the standard state thermodynamic properties were calculated at...
XML_Node & root() const
Return the root of the current XML_Node tree.
vector_fp m_gss_RT
Vector containing the species Standard State Gibbs functions at T = m_tlast and P = m_plast...
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
std::string speciesName(size_t k) const
Name of the species with index k.
virtual doublereal entropy_mole() const
Return the molar entropy in units of J kmol-1 K-1.
XML_Node * get_XML_NameID(const std::string &nameTarget, const std::string &file_ID, XML_Node *root)
This routine will locate an XML node in either the input XML tree or in another input file specified ...
virtual void _updateRefStateThermo() const
Updates the reference state thermodynamic functions at the current T of the solution and the referenc...
vector_fp m_s0_R
Vector containing the species reference entropies at T = m_tlast and P = p_ref.
virtual void _updateStandardStateThermo()
Updates the standard state thermodynamic functions at the current T and P of the solution.
void installPDSShandler(size_t k, PDSS *PDSS_ptr, VPSSMgr *vpssmgr_ptr)
Install a PDSS object to handle the reference state thermodynamics calculation.