23 int PDSS_HKFT::s_InputInconsistencyErrorExit = 1;
31 m_deltaG_formation_tr_pr(0.0),
32 m_deltaH_formation_tr_pr(0.0),
45 m_domega_jdT_prtr(0.0),
55 const std::string& inputFile,
const std::string&
id) :
61 m_deltaG_formation_tr_pr(0.0),
62 m_deltaH_formation_tr_pr(0.0),
75 m_domega_jdT_prtr(0.0),
79 "To be removed after Cantera 2.3.");
88 const XML_Node& phaseRoot,
bool spInstalled) :
94 m_deltaG_formation_tr_pr(0.0),
95 m_deltaH_formation_tr_pr(0.0),
108 m_domega_jdT_prtr(0.0),
123 m_born_coeff_j(-1.0),
125 m_deltaG_formation_tr_pr(0.0),
126 m_deltaH_formation_tr_pr(0.0),
139 m_domega_jdT_prtr(0.0),
150 PDSS_HKFT& PDSS_HKFT::operator=(
const PDSS_HKFT& b)
188 PDSS_HKFT::~PDSS_HKFT()
207 return deltaH() + enthTRPR;
227 doublereal pbar =
m_pres * 1.0E-5;
228 doublereal c1term =
m_c1;
235 doublereal domega_jdT;
236 doublereal d2omega_jdT2;
242 doublereal nu = 166027;
248 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
249 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
250 doublereal d2r_e_jdT2 = fabs(
m_charge_j) * d2gvaldT2;
251 doublereal r_e_j2 = r_e_j * r_e_j;
254 doublereal r_e_H = 3.082 + gval;
255 doublereal r_e_H2 = r_e_H * r_e_H;
256 omega_j = nu * (charge2 / r_e_j -
m_charge_j / r_e_H);
257 domega_jdT = nu * (-(charge2 / r_e_j2 * dr_e_jdT)
259 d2omega_jdT2 = nu * (2.0*charge2*dr_e_jdT*dr_e_jdT/(r_e_j2*r_e_j) - charge2*d2r_e_jdT2/r_e_j2
265 doublereal Y = drelepsilondT / (relepsilon * relepsilon);
268 doublereal X = d2relepsilondT2 / (relepsilon* relepsilon) - 2.0 * relepsilon * Y * Y;
269 doublereal Z = -1.0 / relepsilon;
271 doublereal yterm = 2.0 *
m_temp * Y * domega_jdT;
272 doublereal xterm = omega_j *
m_temp * X;
273 doublereal otterm =
m_temp * d2omega_jdT2 * (Z + 1.0);
276 doublereal Cp_calgmol = c1term + c2term + a3term + a4term + yterm + xterm + otterm + rterm;
279 doublereal Cp = Cp_calgmol *
toSI(
"cal/gmol");
288 doublereal a1term =
m_a1 * 1.0E-5;
289 doublereal a2term =
m_a2 / (2600.E5 +
m_pres);
290 doublereal a3term =
m_a3 * 1.0E-5/ (
m_temp - 228.);
294 doublereal domega_jdP;
299 doublereal nu = 166027.;
306 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
307 doublereal r_e_H = 3.082 + gval;
309 omega_j = nu * (charge2 / r_e_j -
m_charge_j / r_e_H);
310 doublereal dr_e_jdP = fabs(
m_charge_j) * dgvaldP;
311 domega_jdP = - nu * (charge2 / (r_e_j * r_e_j) * dr_e_jdP)
312 + nu *
m_charge_j / (r_e_H * r_e_H) * dgvaldP;
317 doublereal Q = drelepsilondP / (relepsilon * relepsilon);
318 doublereal Z = -1.0 / relepsilon;
319 doublereal wterm = - domega_jdP * (Z + 1.0);
320 doublereal qterm = - omega_j * Q;
321 doublereal molVol_calgmolPascal = a1term + a2term + a3term + a4term + wterm + qterm;
324 return molVol_calgmolPascal *
toSI(
"cal/gmol");
334 doublereal m_psave =
m_pres;
343 doublereal m_psave =
m_pres;
352 doublereal m_psave =
m_pres;
361 doublereal m_psave =
m_pres;
363 doublereal ee =
cp_R();
370 doublereal m_psave =
m_pres;
397 m_Y_pr_tr = drelepsilondT / (relepsilon * relepsilon);
411 if (fabs(Hcalc -DHjmol) > 100.*
toSI(
"cal/gmol")) {
414 throw CanteraError(
"PDSS_HKFT::initThermo()",
"For {}, DHjmol is" 415 " not consistent with G and S: {} vs {} cal gmol-1",
418 writelog(
"PDSS_HKFT::initThermo() WARNING: DHjmol for {} is not" 419 " consistent with G and S: calculated {} vs input {} cal gmol-1",
421 writelog(
" : continuing with consistent DHjmol = {}", Hcalc/
toSI(
"cal/gmol"));
425 doublereal nu = 166027;
426 doublereal r_e_j_pr_tr;
438 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
439 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
441 + nu *
m_charge_j / (3.082 + gval) / (3.082 + gval) * dgvaldT;
455 const XML_Node& phaseNode,
bool spInstalled)
462 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
"spInstalled false not handled");
468 "no thermo Node for species " + speciesNode.
name());
470 if (!ba::iequals(tn->
attrib(
"model"),
"hkft")) {
472 "thermo model for species isn't hkft: " 473 + speciesNode.
name());
478 "no Thermo::HKFT Node for species " + speciesNode.
name());
483 std::string p0string = hh->
attrib(
"Pref");
484 if (p0string !=
"") {
488 std::string minTstring = hh->
attrib(
"Tmin");
489 if (minTstring !=
"") {
493 std::string maxTstring = hh->
attrib(
"Tmax");
494 if (maxTstring !=
"") {
499 doublereal val =
getFloat(*hh,
"DG0_f_Pr_Tr");
505 doublereal val =
getFloat(*hh,
"DH0_f_Pr_Tr");
511 doublereal val =
getFloat(*hh,
"S0_Pr_Tr");
519 "no standardState Node for species " + speciesNode.
name());
521 if (!ba::iequals(ss->
attrib(
"model"),
"hkft")) {
523 "standardState model for species isn't hkft: " 524 + speciesNode.
name());
529 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a1 field");
534 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a2 field");
539 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a3 field");
544 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a4 field");
550 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing c1 field");
555 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing c2 field");
560 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing omega_Pr_Tr field");
563 int isum = hasDGO + hasDHO + hasSO;
566 "Missing 2 or more of DG0_f_Pr_Tr, DH0_f_Pr_Tr, or S0_f_Pr_Tr fields. " 567 "Need to supply at least two of these fields");
597 const std::string& inputFile,
598 const std::string&
id)
601 "To be removed after Cantera 2.3.");
602 if (inputFile.size() == 0) {
604 "input file is null");
614 "ERROR: Can not find phase named " +
615 id +
" in file named " + inputFile);
620 &fxml_phase->
root());
627 doublereal pbar =
m_pres * 1.0E-5;
631 doublereal c2term = -
m_c2 * (1.0/(
m_temp - 228.) - 1.0/(298.15 - 228.));
634 doublereal a4term =
m_a4 * a3tmp * log((2600. + pbar)/(2600. +
m_presR_bar));
636 doublereal domega_jdT;
641 doublereal nu = 166027;
644 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
646 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
649 + nu *
m_charge_j / (3.082 + gval) / (3.082 + gval) * dgvaldT;
655 doublereal Y = drelepsilondT / (relepsilon * relepsilon);
656 doublereal Z = -1.0 / relepsilon;
658 doublereal yterm =
m_temp * omega_j * Y;
661 doublereal wterm = - omega_j * (Z + 1.0);
664 doublereal otterm =
m_temp * domega_jdT * (Z + 1.0);
667 doublereal deltaH_calgmol = c1term + a1term + a2term + c2term + a3term + a4term
668 + yterm + yrterm + wterm + wrterm + otterm + otrterm;
671 return deltaH_calgmol *
toSI(
"cal/gmol");
676 doublereal pbar =
m_pres * 1.0E-5;
681 doublereal c2term = -
m_c2 * ((1.0/(
m_temp - 228.) - 1.0/(298.15 - 228.)) * (228. -
m_temp)/228.
690 doublereal nu = 166027;
693 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
698 doublereal Z = -1.0 / relepsilon;
699 doublereal wterm = - omega_j * (Z + 1.0);
702 doublereal deltaG_calgmol = sterm + c1term + a1term + a2term + c2term + a3term + a4term + wterm + wrterm + yterm;
705 return deltaG_calgmol *
toSI(
"cal/gmol");
710 doublereal pbar =
m_pres * 1.0E-5;
712 doublereal c1term =
m_c1 * log(
m_temp/298.15);
713 doublereal c2term = -
m_c2 / 228. * ((1.0/(
m_temp - 228.) - 1.0/(298.15 - 228.))
714 + 1.0 / 228. * log((298.15*(
m_temp-228.)) / (
m_temp*(298.15-228.))));
719 doublereal domega_jdT;
724 doublereal nu = 166027;
728 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
729 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
732 + nu *
m_charge_j / (3.082 + gval) / (3.082 + gval) * dgvaldT;
737 doublereal Y = drelepsilondT / (relepsilon * relepsilon);
738 doublereal Z = -1.0 / relepsilon;
739 doublereal wterm = omega_j * Y;
741 doublereal otterm = domega_jdT * (Z + 1.0);
743 doublereal deltaS_calgmol = c1term + c2term + a3term + a4term + wterm + wrterm + otterm + otrterm;
746 return deltaS_calgmol *
toSI(
"cal/gmol");
751 static doublereal ag_coeff[3] = { -2.037662, 5.747000E-3, -6.557892E-6};
753 return ag_coeff[0] + ag_coeff[1] * temp + ag_coeff[2] * temp * temp;
754 }
else if (ifunc == 1) {
755 return ag_coeff[1] + ag_coeff[2] * 2.0 * temp;
760 return ag_coeff[2] * 2.0;
765 static doublereal bg_coeff[3] = { 6.107361, -1.074377E-2, 1.268348E-5};
767 return bg_coeff[0] + bg_coeff[1] * temp + bg_coeff[2] * temp * temp;
768 }
else if (ifunc == 1) {
769 return bg_coeff[1] + bg_coeff[2] * 2.0 * temp;
774 return bg_coeff[2] * 2.0;
777 doublereal
PDSS_HKFT::f(
const doublereal temp,
const doublereal pres,
const int ifunc)
const 779 static doublereal af_coeff[3] = { 3.666666E1, -0.1504956E-9, 0.5107997E-13};
780 doublereal TC = temp - 273.15;
781 doublereal presBar = pres / 1.0E5;
786 TC = std::min(TC, 355.0);
787 if (presBar > 1000.) {
791 doublereal T1 = (TC-155.0)/300.;
792 doublereal p2 = (1000. - presBar) * (1000. - presBar);
793 doublereal p3 = (1000. - presBar) * p2;
794 doublereal p4 = p2 * p2;
795 doublereal fac2 = af_coeff[1] * p3 + af_coeff[2] * p4;
797 return pow(T1,4.8) + af_coeff[0] * pow(T1, 16.0) * fac2;
798 }
else if (ifunc == 1) {
799 return (4.8 * pow(T1,3.8) + 16.0 * af_coeff[0] * pow(T1, 15.0)) / 300. * fac2;
800 }
else if (ifunc == 2) {
801 return (4.8 * 3.8 * pow(T1,2.8) + 16.0 * 15.0 * af_coeff[0] * pow(T1, 14.0)) / (300. * 300.) * fac2;
802 }
else if (ifunc == 3) {
803 double fac1 = pow(T1,4.8) + af_coeff[0] * pow(T1, 16.0);
804 fac2 = - (3.0 * af_coeff[1] * p2 + 4.0 * af_coeff[2] * p3)/ 1.0E5;
811 doublereal
PDSS_HKFT::g(
const doublereal temp,
const doublereal pres,
const int ifunc)
const 813 doublereal afunc =
ag(temp, 0);
814 doublereal bfunc =
bg(temp, 0);
819 doublereal gval = afunc * pow((1.0-dens), bfunc);
825 }
else if (ifunc == 1 || ifunc == 2) {
826 doublereal afuncdT =
ag(temp, 1);
827 doublereal bfuncdT =
bg(temp, 1);
830 doublereal fac1 = afuncdT * gval / afunc;
831 doublereal fac2 = bfuncdT * gval * log(1.0 - dens);
832 doublereal fac3 = gval * alpha * bfunc * dens / (1.0 - dens);
834 doublereal dgdt = fac1 + fac2 + fac3;
839 doublereal afuncdT2 =
ag(temp, 2);
840 doublereal bfuncdT2 =
bg(temp, 2);
841 doublereal dfac1dT = dgdt * afuncdT / afunc + afuncdT2 * gval / afunc
842 - afuncdT * afuncdT * gval / (afunc * afunc);
843 doublereal ddensdT = - alpha * dens;
844 doublereal dfac2dT = bfuncdT2 * gval * log(1.0 - dens)
845 + bfuncdT * dgdt * log(1.0 - dens)
846 - bfuncdT * gval /(1.0 - dens) * ddensdT;
848 doublereal dfac3dT = dgdt * alpha * bfunc * dens / (1.0 - dens)
849 + gval * dalphadT * bfunc * dens / (1.0 - dens)
850 + gval * alpha * bfuncdT * dens / (1.0 - dens)
851 + gval * alpha * bfunc * ddensdT / (1.0 - dens)
852 + gval * alpha * bfunc * dens / ((1.0 - dens) * (1.0 - dens)) * ddensdT;
854 return dfac1dT + dfac2dT + dfac3dT;
855 }
else if (ifunc == 3) {
857 return - bfunc * gval * dens * beta / (1.0 - dens);
864 doublereal
PDSS_HKFT::gstar(
const doublereal temp,
const doublereal pres,
const int ifunc)
const 866 doublereal gval =
g(temp, pres, ifunc);
867 doublereal fval =
f(temp, pres, ifunc);
868 double res = gval - fval;
876 throw CanteraError(
"PDSS_HKFT::LookupGe",
"element " + elemName +
" not found");
881 "element " + elemName +
" does not have a supplied entropy298");
883 return geValue * -298.15;
889 doublereal totalSum = 0.0;
908 doublereal& minTemp_,
909 doublereal& maxTemp_,
910 doublereal& refPressure_)
const doublereal m_a4
Input a4 coefficient (cal K gmol-1)
size_t nElements() const
Number of elements.
doublereal m_densWaterSS
density of standard-state water. internal temporary variable
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data...
doublereal deltaH() const
Routine that actually calculates the enthalpy difference between the reference state at Tr...
virtual doublereal gibbs_RT() const
Return the molar Gibbs free energy divided by RT.
std::string name() const
Returns the name of the XML node.
virtual doublereal enthalpy_mole() const
Return the molar enthalpy in units of J kmol-1.
XML_Node * findXMLPhase(XML_Node *root, const std::string &idtarget)
Search an XML_Node tree for a named phase XML_Node.
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
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...
doublereal m_deltaG_formation_tr_pr
Input value of deltaG of Formation at Tr and Pr (cal gmol-1)
const doublereal OneAtm
One atmosphere [Pa].
virtual doublereal gibbs_RT_ref() const
Return the molar Gibbs free energy divided by RT at reference pressure.
doublereal bg(const doublereal temp, const int ifunc=0) const
Internal formula for the calculation of b_g()
doublereal deltaS() const
Main routine that actually calculates the entropy difference between the reference state at Tr...
virtual doublereal entropy_mole() const
Return the molar entropy in units of J kmol-1 K-1.
Virtual base class for the classes that manage the calculation of standard state properties for all t...
doublereal toSI(const std::string &unit)
Return the conversion factor to convert unit std::string 'unit' to SI units.
virtual doublereal intEnergy_mole() const
Return the molar internal Energy in units of J kmol-1.
virtual void setPressure(doublereal pres)
Sets the pressure in the object.
const size_t npos
index returned by functions to indicate "no position"
size_t elementIndex(const std::string &name) const
Return the index of element named 'name'.
doublereal g(const doublereal temp, const doublereal pres, const int ifunc=0) const
function g appearing in the formulation
doublereal m_Mu0_tr_pr
Value of the Absolute Gibbs Free Energy NIST scale at T_r and P_r.
virtual void reportParams(size_t &kindex, int &type, doublereal *const c, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure) const
This utility function reports back the type of parameterization and all of the parameters for the spe...
doublereal m_pres
State of the system - pressure.
void writelog(const std::string &fmt, const Args &... args)
Write a formatted message to the screen.
doublereal m_c2
Input c2 coefficient (cal K gmol-1)
Class XML_Node is a tree-based representation of the contents of an XML file.
doublereal gstar(const doublereal temp, const doublereal pres, const int ifunc=0) const
Evaluate the Gstar value appearing in the HKFT formulation.
Implementation of a pressure dependent standard state virtual function for a Pure Water Phase (see Sp...
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
virtual doublereal cp_R_ref() const
Return the molar heat capacity divided by R at reference pressure.
doublereal m_a3
Input a3 coefficient (cal K gmol-1 bar-1)
virtual doublereal cp_R() const
Return the molar const pressure heat capacity divided by RT.
size_t m_spindex
Species index in the ThermoPhase corresponding to this species.
virtual doublereal molarVolume() const
Return the molar volume at standard state.
PDSS_enumType m_pdssType
Enumerated type describing the type of the PDSS object.
doublereal m_omega_pr_tr
Input omega_pr_tr coefficient(cal gmol-1)
doublereal m_Y_pr_tr
y = dZdT = 1/(esp*esp) desp/dT at 298.15 and 1 bar
virtual doublereal entropy_R() const
Return the standard state entropy divided by RT.
virtual doublereal isothermalCompressibility() const
Returns the isothermal compressibility. Units: 1/Pa.
virtual void initAllPtrs(VPStandardStateTP *vptp_ptr, VPSSMgr *vpssmgr_ptr, MultiSpeciesThermo *spthermo_ptr)
Initialize or Reinitialize all shallow pointers in the object.
static int s_InputInconsistencyErrorExit
Static variable determining error exiting.
virtual void initThermo()
Initialization routine for all of the shallow pointers.
doublereal enthalpy_mole2() const
Return the molar enthalpy in units of J kmol-1.
doublereal m_a2
Input a2 coefficient (cal gmol-1)
doublereal m_charge_j
Charge of the ion.
virtual void initThermo()
Initialization routine for all of the shallow pointers.
std::unique_ptr< WaterProps > m_waterProps
Pointer to the water property calculator.
void constructPDSSXML(VPStandardStateTP *vptp_ptr, size_t spindex, const XML_Node &speciesNode, const XML_Node &phaseNode, bool spInstalled)
Initialization of a PDSS object using an XML tree.
virtual void setTemperature(doublereal temp)
Set the internal temperature.
virtual doublereal thermalExpansionCoeff() const
Return the volumetric thermal expansion coefficient. Units: 1/K.
The WaterProps class is used to house several approximation routines for properties of water...
virtual void initAllPtrs(VPStandardStateTP *vptp_ptr, VPSSMgr *vpssmgr_ptr, MultiSpeciesThermo *spthermo_ptr)
Initialize or Reinitialize all shallow pointers in the object.
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
doublereal deltaG() const
Main routine that actually calculates the Gibbs free energy difference between the reference state at...
std::string speciesName(size_t k) const
Name of the species with index k.
PDSS_HKFT(VPStandardStateTP *tp, size_t spindex)
Constructor that initializes the object by examining the XML entries from the ThermoPhase object...
Class for the liquid water pressure dependent standard state.
doublereal m_deltaH_formation_tr_pr
Input value of deltaH of Formation at Tr and Pr (cal gmol-1)
doublereal entropyElement298(size_t m) const
Entropy of the element in its standard state at 298 K and 1 bar.
doublereal m_Entrop_tr_pr
Input value of S_j at Tr and Pr (cal gmol-1 K-1)
virtual doublereal density() const
Return the standard state density at standard state.
virtual doublereal entropy_R_ref() const
Return the molar entropy divided by R at reference pressure.
Base class for exceptions thrown by Cantera classes.
doublereal f(const doublereal temp, const doublereal pres, const int ifunc=0) const
Difference function f appearing in the formulation.
void convertDGFormation()
Translate a Gibbs free energy of formation value to a NIST-based Chemical potential.
void build(const std::string &filename)
Populate the XML tree from an input file.
doublereal pref_safe(doublereal temp) const
Returns a reference pressure value that can be safely calculated by the underlying real equation of s...
doublereal m_presR_bar
Reference pressure is 1 atm in units of bar= 1.0132.
This is a filter class for ThermoPhase that implements some prepatory steps for efficiently handling ...
virtual doublereal molarVolume_ref() const
Return the molar volume at reference pressure.
virtual doublereal dthermalExpansionCoeffdT() const
Return the derivative of the volumetric thermal expansion coefficient.
doublereal m_maxTemp
Maximum temperature.
virtual PDSS * duplMyselfAsPDSS() const
Duplication routine for objects which inherit from PDSS.
doublereal m_domega_jdT_prtr
small value that is not quite zero
doublereal m_minTemp
Minimum temperature.
#define ENTROPY298_UNKNOWN
Number indicating we don't know the entropy of the element in its most stable state at 298...
bool hasChild(const std::string &ch) const
Tests whether the current node has a child node with a particular name.
XML_Node & child(const size_t n) const
Return a changeable reference to the n'th child of the current node.
PDSS_Water * m_waterSS
Water standard state calculator.
XML_Node & root() const
Return the root of the current XML_Node tree.
doublereal LookupGe(const std::string &elemName)
Function to look up Element Free Energies.
virtual void reportParams(size_t &kindex, int &type, doublereal *const c, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure) const
This utility function reports back the type of parameterization and all of the parameters for the spe...
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
doublereal m_Z_pr_tr
Z = -1 / relEpsilon at 298.15 and 1 bar.
std::string attrib(const std::string &attr) const
Function returns the value of an attribute.
Virtual base class for a species with a pressure dependent standard state.
VPStandardStateTP * m_tp
ThermoPhase which this species belongs to.
doublereal m_temp
Current temperature used by the PDSS object.
PDSS & operator=(const PDSS &b)
Contains declarations for string manipulation functions within Cantera.
doublereal getFloat(const XML_Node &parent, const std::string &name, const std::string &type)
Get a floating-point value from a child element.
virtual doublereal gibbs_mole() const
Return the molar Gibbs free energy in units of J kmol-1.
Class for pressure dependent standard states corresponding to ionic solutes in electrolyte water...
virtual doublereal density() const
Return the standard state density at standard state.
doublereal ag(const doublereal temp, const int ifunc=0) const
Internal formula for the calculation of a_g()
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...
A species thermodynamic property manager for a phase.
doublereal m_c1
Input c1 coefficient (cal gmol-1 K-1)
doublereal m_r_e_j
Electrostatic radii.
Namespace for the Cantera kernel.
doublereal m_born_coeff_j
Born coefficient for the current ion or species.
doublereal nAtoms(size_t k, size_t m) const
Number of atoms of element m in species k.
doublereal strSItoDbl(const std::string &strSI)
Interpret one or two token string as a single double.
virtual doublereal enthalpy_RT_ref() const
Return the molar enthalpy divided by RT at reference pressure.
virtual doublereal enthalpy_RT() const
Return the standard state molar enthalpy divided by RT.
doublereal fpValueCheck(const std::string &val)
Translate a string into one doublereal value, with error checking.
virtual doublereal cp_mole() const
Return the molar const pressure heat capacity 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 ...
doublereal charge(size_t k) const
Dimensionless electrical charge of a single molecule of species k The charge is normalized by the the...
std::string elementName(size_t m) const
Name of the element with index m.
Declarations for the class PDSS_HKFT (pressure dependent standard state) which handles calculations f...
doublereal m_p0
Reference state pressure of the species.
doublereal m_a1
Input a1 coefficient (cal gmol-1 bar-1)
doublereal m_mw
Molecular Weight of the species.
void constructPDSSFile(VPStandardStateTP *vptp_ptr, size_t spindex, const std::string &inputFile, const std::string &id)
Initialization of a PDSS object using an input XML file.