29 int PDSS_HKFT::s_InputInconsistencyErrorExit = 1;
38 m_deltaG_formation_tr_pr(0.0),
39 m_deltaH_formation_tr_pr(0.0),
52 m_domega_jdT_prtr(0.0),
62 const std::string& inputFile,
const std::string&
id) :
69 m_deltaG_formation_tr_pr(0.0),
70 m_deltaH_formation_tr_pr(0.0),
83 m_domega_jdT_prtr(0.0),
94 const XML_Node& phaseRoot,
bool spInstalled) :
101 m_deltaG_formation_tr_pr(0.0),
102 m_deltaH_formation_tr_pr(0.0),
115 m_domega_jdT_prtr(0.0),
131 m_born_coeff_j(-1.0),
133 m_deltaG_formation_tr_pr(0.0),
134 m_deltaH_formation_tr_pr(0.0),
147 m_domega_jdT_prtr(0.0),
216 #ifdef DEBUG_MODE_NOT
218 if (fabs(h - h2) > 1.0E-1) {
219 printf(
"we are here, h = %g, h2 = %g, k = %d, T = %g, P = %g p0 = %g\n",
231 return deltaH() + enthTRPR;
252 doublereal pbar =
m_pres * 1.0E-5;
253 doublereal c1term =
m_c1;
263 doublereal domega_jdT;
264 doublereal d2omega_jdT2;
270 doublereal nu = 166027;
278 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
279 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
280 doublereal d2r_e_jdT2 = fabs(
m_charge_j) * d2gvaldT2;
282 doublereal r_e_j2 = r_e_j * r_e_j;
286 doublereal r_e_H = 3.082 + gval;
287 doublereal r_e_H2 = r_e_H * r_e_H;
289 omega_j = nu * (charge2 / r_e_j - m_charge_j / r_e_H);
291 domega_jdT = nu * (-(charge2 / r_e_j2 * dr_e_jdT)
292 +(m_charge_j / r_e_H2 * dgvaldT));
294 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
295 -2.0*m_charge_j*dgvaldT*dgvaldT/(r_e_H2*r_e_H) + m_charge_j*d2gvaldT2 /r_e_H2);
301 doublereal Y = drelepsilondT / (relepsilon * relepsilon);
305 #ifdef DEBUG_MODE_NOT
308 doublereal d3 = (d2 - d1) / 0.0001;
309 if (fabs(d2relepsilondT2 - d3) > 1.0E-6) {
310 printf(
"we are here\n");
314 doublereal X = d2relepsilondT2 / (relepsilon* relepsilon) - 2.0 * relepsilon * Y * Y;
316 doublereal Z = -1.0 / relepsilon;
318 doublereal yterm = 2.0 *
m_temp * Y * domega_jdT;
320 doublereal xterm = omega_j *
m_temp * X;
322 doublereal otterm =
m_temp * d2omega_jdT2 * (Z + 1.0);
326 doublereal Cp_calgmol = c1term + c2term + a3term + a4term + yterm + xterm + otterm + rterm;
329 doublereal Cp = Cp_calgmol * 1.0E3 * 4.184;
331 #ifdef DEBUG_MODE_NOT
336 double cpd = (e1 - e2) / 0.001;
337 if (fabs(Cp - cpd) > 10.0) {
338 printf(
"Cp difference : raw: %g, delta: %g, k = %d, T = %g, m_pres = %g\n",
349 doublereal a1term =
m_a1 * 1.0E-5;
351 doublereal a2term =
m_a2 / (2600.E5 +
m_pres);
353 doublereal a3term =
m_a3 * 1.0E-5/ (
m_temp - 228.);
358 doublereal domega_jdP;
363 doublereal nu = 166027.;
365 doublereal r_e_j_pr_tr = charge2 / (
m_omega_pr_tr/nu + m_charge_j/3.082);
370 doublereal r_e_j = r_e_j_pr_tr + fabs(m_charge_j) * gval;
371 doublereal r_e_H = 3.082 + gval;
373 omega_j = nu * (charge2 / r_e_j - m_charge_j / r_e_H);
375 doublereal dr_e_jdP = fabs(m_charge_j) * dgvaldP;
377 domega_jdP = - nu * (charge2 / (r_e_j * r_e_j) * dr_e_jdP)
378 + nu * m_charge_j / (r_e_H * r_e_H) * dgvaldP;
385 doublereal Q = drelepsilondP / (relepsilon * relepsilon);
387 doublereal Z = -1.0 / relepsilon;
389 doublereal wterm = - domega_jdP * (Z + 1.0);
391 doublereal qterm = - omega_j * Q;
393 doublereal molVol_calgmolPascal = a1term + a2term + a3term + a4term + wterm + qterm;
396 return molVol_calgmolPascal * 4.184 * 1.0E3;
408 doublereal m_psave =
m_pres;
418 doublereal m_psave =
m_pres;
428 doublereal m_psave =
m_pres;
438 doublereal m_psave =
m_pres;
440 doublereal ee =
cp_R();
448 doublereal m_psave =
m_pres;
479 m_Y_pr_tr = drelepsilondT / (relepsilon * relepsilon);
497 if (fabs(Hcalc -DHjmol) > 100.* 1.0E3 * 4.184) {
501 throw CanteraError(
" PDSS_HKFT::initThermo() for " + sname,
502 "DHjmol is not consistent with G and S: " +
503 fp2str(Hcalc/(4.184E3)) +
" vs "
506 writelog(
" PDSS_HKFT::initThermo() WARNING: "
507 "DHjmol for " + sname +
" is not consistent with G and S: calculated " +
508 fp2str(Hcalc/(4.184E3)) +
" vs input "
510 writelog(
" : continuing with consistent DHjmol = " +
fp2str(Hcalc/(4.184E3)));
514 doublereal nu = 166027;
516 doublereal r_e_j_pr_tr;
530 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
531 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
534 + nu *
m_charge_j / (3.082 + gval) / (3.082 + gval) * dgvaldT;
549 const XML_Node& phaseNode,
bool spInstalled)
556 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
"spInstalled false not handled");
562 "no thermo Node for species " + speciesNode.
name());
566 "thermo model for species isn't hkft: "
567 + speciesNode.
name());
572 "no Thermo::HKFT Node for species " + speciesNode.
name());
577 std::string p0string = hh->
attrib(
"Pref");
578 if (p0string !=
"") {
582 std::string minTstring = hh->
attrib(
"Tmin");
583 if (minTstring !=
"") {
587 std::string maxTstring = hh->
attrib(
"Tmax");
588 if (maxTstring !=
"") {
593 doublereal val =
getFloat(*hh,
"DG0_f_Pr_Tr");
599 doublereal val =
getFloat(*hh,
"DH0_f_Pr_Tr");
605 doublereal val =
getFloat(*hh,
"S0_Pr_Tr");
613 "no standardState Node for species " + speciesNode.
name());
617 "standardState model for species isn't hkft: "
618 + speciesNode.
name());
623 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a1 field");
628 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a2 field");
633 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a3 field");
638 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a4 field");
644 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing c1 field");
649 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing c2 field");
654 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing omega_Pr_Tr field");
658 int isum = hasDGO + hasDHO + hasSO;
661 "Missing 2 or more of DG0_f_Pr_Tr, DH0_f_Pr_Tr, or S0_f_Pr_Tr fields. "
662 "Need to supply at least two of these fields");
693 const std::string& inputFile,
694 const std::string&
id)
696 if (inputFile.size() == 0) {
698 "input file is null");
701 ifstream fin(path.c_str());
703 throw CanteraError(
"PDSS_HKFT::initThermo",
"could not open "
704 +path+
" for reading.");
716 "ERROR: Can not find phase named " +
717 id +
" in file named " + inputFile);
722 &(fxml_phase->
root()));
731 doublereal pbar =
m_pres * 1.0E-5;
739 doublereal c2term = -
m_c2 * (1.0/(
m_temp - 228.) - 1.0/(298.15 - 228.));
745 doublereal a4term =
m_a4 * a3tmp * log((2600. + pbar)/(2600. +
m_presR_bar));
748 doublereal domega_jdT;
753 doublereal nu = 166027;
756 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
759 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
764 + nu *
m_charge_j / (3.082 + gval) / (3.082 + gval) * dgvaldT;
770 doublereal Y = drelepsilondT / (relepsilon * relepsilon);
772 doublereal Z = -1.0 / relepsilon;
774 doublereal yterm =
m_temp * omega_j * Y;
777 doublereal wterm = - omega_j * (Z + 1.0);
780 doublereal otterm =
m_temp * domega_jdT * (Z + 1.0);
783 doublereal deltaH_calgmol = c1term + a1term + a2term + c2term + a3term + a4term
784 + yterm + yrterm + wterm + wrterm + otterm + otrterm;
787 return deltaH_calgmol * 1.0E3 * 4.184;
793 doublereal pbar =
m_pres * 1.0E-5;
801 doublereal c2term = -
m_c2 * ((1.0/(
m_temp - 228.) - 1.0/(298.15 - 228.)) * (228. -
m_temp)/228.
812 doublereal nu = 166027;
815 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
821 doublereal Z = -1.0 / relepsilon;
823 doublereal wterm = - omega_j * (Z + 1.0);
829 doublereal deltaG_calgmol = sterm + c1term + a1term + a2term + c2term + a3term + a4term + wterm + wrterm + yterm;
832 return deltaG_calgmol * 1.0E3 * 4.184;
837 doublereal pbar =
m_pres * 1.0E-5;
839 doublereal c1term =
m_c1 * log(
m_temp/298.15);
841 doublereal c2term = -
m_c2 / 228. * ((1.0/(
m_temp - 228.) - 1.0/(298.15 - 228.))
842 + 1.0 / 228. * log((298.15*(
m_temp-228.)) / (
m_temp*(298.15-228.))));
849 doublereal domega_jdT;
855 doublereal nu = 166027;
862 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
863 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
868 + nu *
m_charge_j / (3.082 + gval) / (3.082 + gval) * dgvaldT;
874 doublereal Y = drelepsilondT / (relepsilon * relepsilon);
876 doublereal Z = -1.0 / relepsilon;
878 doublereal wterm = omega_j * Y;
882 doublereal otterm = domega_jdT * (Z + 1.0);
886 doublereal deltaS_calgmol = c1term + c2term + a3term + a4term + wterm + wrterm + otterm + otrterm;
889 return deltaS_calgmol * 1.0E3 * 4.184;
894 static doublereal ag_coeff[3] = { -2.037662, 5.747000E-3, -6.557892E-6};
896 return ag_coeff[0] + ag_coeff[1] * temp + ag_coeff[2] * temp * temp;
897 }
else if (ifunc == 1) {
898 return ag_coeff[1] + ag_coeff[2] * 2.0 * temp;
903 return ag_coeff[2] * 2.0;
908 static doublereal bg_coeff[3] = { 6.107361, -1.074377E-2, 1.268348E-5};
910 return bg_coeff[0] + bg_coeff[1] * temp + bg_coeff[2] * temp * temp;
911 }
else if (ifunc == 1) {
912 return bg_coeff[1] + bg_coeff[2] * 2.0 * temp;
917 return bg_coeff[2] * 2.0;
920 doublereal
PDSS_HKFT::f(
const doublereal temp,
const doublereal pres,
const int ifunc)
const
922 static doublereal af_coeff[3] = { 3.666666E1, -0.1504956E-9, 0.5107997E-13};
923 doublereal TC = temp - 273.15;
924 doublereal presBar = pres / 1.0E5;
929 TC = std::min(TC, 355.0);
930 if (presBar > 1000.) {
935 doublereal T1 = (TC-155.0)/300.;
936 doublereal p2 = (1000. - presBar) * (1000. - presBar);
937 doublereal p3 = (1000. - presBar) * p2;
938 doublereal p4 = p2 * p2;
939 doublereal fac2 = af_coeff[1] * p3 + af_coeff[2] * p4;
941 return pow(T1,4.8) + af_coeff[0] * pow(T1, 16.0) * fac2;
942 }
else if (ifunc == 1) {
943 return (4.8 * pow(T1,3.8) + 16.0 * af_coeff[0] * pow(T1, 15.0)) / 300. * fac2;
944 }
else if (ifunc == 2) {
945 return (4.8 * 3.8 * pow(T1,2.8) + 16.0 * 15.0 * af_coeff[0] * pow(T1, 14.0)) / (300. * 300.) * fac2;
946 }
else if (ifunc == 3) {
947 double fac1 = pow(T1,4.8) + af_coeff[0] * pow(T1, 16.0);
948 fac2 = - (3.0 * af_coeff[1] * p2 + 4.0 * af_coeff[2] * p3)/ 1.0E5;
955 doublereal
PDSS_HKFT::g(
const doublereal temp,
const doublereal pres,
const int ifunc)
const
957 doublereal afunc =
ag(temp, 0);
958 doublereal bfunc =
bg(temp, 0);
963 doublereal gval = afunc * pow((1.0-dens), bfunc);
970 }
else if (ifunc == 1 || ifunc == 2) {
971 doublereal afuncdT =
ag(temp, 1);
972 doublereal bfuncdT =
bg(temp, 1);
975 doublereal fac1 = afuncdT * gval / afunc;
976 doublereal fac2 = bfuncdT * gval * log(1.0 - dens);
977 doublereal fac3 = gval * alpha * bfunc * dens / (1.0 - dens);
979 doublereal dgdt = fac1 + fac2 + fac3;
984 doublereal afuncdT2 =
ag(temp, 2);
985 doublereal bfuncdT2 =
bg(temp, 2);
987 doublereal dfac1dT = dgdt * afuncdT / afunc + afuncdT2 * gval / afunc
988 - afuncdT * afuncdT * gval / (afunc * afunc);
990 doublereal ddensdT = - alpha * dens;
991 doublereal dfac2dT = bfuncdT2 * gval * log(1.0 - dens)
992 + bfuncdT * dgdt * log(1.0 - dens)
993 - bfuncdT * gval /(1.0 - dens) * ddensdT;
997 doublereal dfac3dT = dgdt * alpha * bfunc * dens / (1.0 - dens)
998 + gval * dalphadT * bfunc * dens / (1.0 - dens)
999 + gval * alpha * bfuncdT * dens / (1.0 - dens)
1000 + gval * alpha * bfunc * ddensdT / (1.0 - dens)
1001 + gval * alpha * bfunc * dens / ((1.0 - dens) * (1.0 - dens)) * ddensdT;
1003 return dfac1dT + dfac2dT + dfac3dT;
1005 }
else if (ifunc == 3) {
1008 return - bfunc * gval * dens * beta / (1.0 - dens);
1015 doublereal
PDSS_HKFT::gstar(
const doublereal temp,
const doublereal pres,
const int ifunc)
const
1017 doublereal gval =
g(temp, pres, ifunc);
1018 doublereal fval =
f(temp, pres, ifunc);
1019 double res = gval - fval;
1020 #ifdef DEBUG_MODE_NOT
1022 double gval1 =
g(temp, pres, 1);
1023 double fval1 =
f(temp, pres, 1);
1024 double gval2 =
g(temp + 0.001, pres, 1);
1025 double fval2 =
f(temp + 0.001, pres, 1);
1026 double gvalT = (gval2 - gval1) / 0.001;
1027 double fvalT = (fval2 - fval1) / 0.001;
1028 if (fabs(gvalT - gval) > 1.0E-9) {
1029 printf(
"we are here\n");
1031 if (fabs(fvalT - fval) > 1.0E-9) {
1032 printf(
"we are here\n");
1043 throw CanteraError(
"PDSS_HKFT::LookupGe",
"element " + elemName +
" not found");
1048 "element " + elemName +
" does not have a supplied entropy298");
1050 return geValue * -298.15;
1058 doublereal totalSum = 0.0;
1076 doublereal*
const c,
1077 doublereal& minTemp_,
1078 doublereal& maxTemp_,
1079 doublereal& refPressure_)
const
doublereal nAtoms(size_t k, size_t m) const
Number of atoms of element m in species k.
virtual doublereal enthalpy_mole() const
Return the molar enthalpy in units of J kmol-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 m_a4
Input a4 coefficient (cal K gmol-1)
virtual doublereal thermalExpansionCoeff() const
Return the volumetric thermal expansion coefficient. Units: 1/K.
doublereal m_densWaterSS
density of standard-state water
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data...
virtual doublereal density() const
Return the standard state density at standard state.
doublereal f(const doublereal temp, const doublereal pres, const int ifunc=0) const
Difference function f appearing in the formulation.
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.
size_t nElements() const
Number of elements.
doublereal bg(const doublereal temp, const int ifunc=0) const
Internal formula for the calculation of b_g()
doublereal m_deltaG_formation_tr_pr
Input value of deltaG of Formation at Tr and Pr (cal gmol-1)
doublereal gstar(const doublereal temp, const doublereal pres, const int ifunc=0) const
Evaluate the Gstar value appearing in the HKFT formulation.
const doublereal OneAtm
One atmosphere [Pa].
std::string attrib(const std::string &attr) const
Function returns the value of an attribute.
Virtual base class for the classes that manage the calculation of standard state properties for all t...
virtual void setPressure(doublereal pres)
Sets the pressure in the object.
const size_t npos
index returned by functions to indicate "no position"
doublereal m_Mu0_tr_pr
Value of the Absolute Gibbs Free Energy NIST scale at T_r and P_r.
doublereal enthalpy_mole2() const
Return the molar enthalpy in units of J kmol-1.
doublereal deltaG() const
Main routine that actually calculates the Gibbs free energy difference between the reference state at...
doublereal m_pres
State of the system - pressure.
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.
Implementation of a pressure dependent standard state virtual function for a Pure Water Phase (see Sp...
virtual doublereal cp_mole() const
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
virtual doublereal dthermalExpansionCoeffdT() const
Return the derivative of the volumetric thermal expansion coefficient. Units: 1/K2.
virtual void initAllPtrs(VPStandardStateTP *vptp_ptr, VPSSMgr *vpssmgr_ptr, SpeciesThermo *spthermo_ptr)
Initialize or Reinitialize all shallow pointers in the object.
virtual ~PDSS_HKFT()
Destructor for the phase.
doublereal m_a3
Input a3 coefficient (cal K gmol-1 bar-1)
size_t m_spindex
Species index in the ThermoPhase corresponding to this species.
std::string lowercase(const std::string &s)
Cast a copy of a string to lower case.
virtual doublereal density() const
Return the standard state density at standard state.
PDSS_enumType m_pdssType
Enumerated type describing the type of the PDSS object.
doublereal deltaS() const
Main routine that actually calculates the entropy difference between the reference state at Tr...
PDSS_HKFT & operator=(const PDSS_HKFT &b)
Assignment operator.
doublereal m_omega_pr_tr
Input omega_pr_tr coefficient(cal gmol-1)
Pure Virtual base class for the species thermo manager classes.
doublereal m_Y_pr_tr
y = dZdT = 1/(esp*esp) desp/dT at 298.15 and 1 bar
XML_Node & child(const size_t n) const
Return a changeable reference to the n'th child of the current node.
virtual void initAllPtrs(VPStandardStateTP *vptp_ptr, VPSSMgr *vpssmgr_ptr, SpeciesThermo *spthermo_ptr)
Initialize or Reinitialize all shallow pointers in the object.
doublereal entropyElement298(size_t m) const
Entropy of the element in its standard state at 298 K and 1 bar.
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...
static int s_InputInconsistencyErrorExit
Static variable determining error exiting.
doublereal pref_safe(doublereal temp) const
Returns a reference pressure value that can be safely calculated by the underlying real equation of s...
doublereal g(const doublereal temp, const doublereal pres, const int ifunc=0) const
function g appearing in the formulation
virtual void initThermo()
Initialization routine for all of the shallow pointers.
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.
virtual doublereal entropy_mole() const
Return the molar entropy in units of J kmol-1 K-1.
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.
The WaterProps class is used to house several approximation routines for properties of water...
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
PDSS_HKFT(VPStandardStateTP *tp, size_t spindex)
Constructor that initializes the object by examining the XML entries from the ThermoPhase object...
std::string fp2str(const double x, const std::string &fmt)
Convert a double into a c++ string.
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)
std::string name() const
Returns the name of the XML node.
virtual doublereal entropy_R_ref() const
Return the molar entropy divided by R at reference pressure.
doublereal deltaH() const
Routine that actually calculates the enthalpy difference between the reference state at Tr...
doublereal m_Entrop_tr_pr
Input value of S_j at Tr and Pr (cal gmol-1 K-1)
virtual doublereal molarVolume_ref() const
Return the molar volume at reference pressure.
Base class for exceptions thrown by Cantera classes.
virtual doublereal cp_R() const
Return the molar const pressure heat capacity divided by RT.
WaterProps * m_waterProps
Pointer to the water property calculator.
void convertDGFormation()
Translate a Gibbs free energy of formation value to a NIST-based Chemical potential.
virtual doublereal molarVolume() const
Return the molar volume at standard state.
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 ...
bool hasChild(const std::string &ch) const
Tests whether the current node has a child node with a particular name.
virtual doublereal enthalpy_RT_ref() const
Return the molar enthalpy divided by RT at reference pressure.
doublereal m_maxTemp
Maximum temperature.
doublereal m_domega_jdT_prtr
small value that is not quite zero
virtual doublereal enthalpy_RT() const
Return the standard state molar enthalpy divided by RT.
doublereal m_minTemp
Minimum temperature.
virtual doublereal gibbs_RT_ref() const
Return the molar Gibbs free energy divided by RT at reference pressure.
#define ENTROPY298_UNKNOWN
Number indicating we don't know the entropy of the element in its most stable state at 298...
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...
PDSS_Water * m_waterSS
Water standard state calculator.
doublereal ag(const doublereal temp, const int ifunc=0) const
Internal formula for the calculation of a_g()
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.
Virtual base class for a species with a pressure dependent standard state.
size_t elementIndex(const std::string &name) const
Return the index of element named 'name'.
VPStandardStateTP * m_tp
ThermoPhase which this species belongs to.
doublereal m_temp
Current temperature used by the PDSS object.
virtual doublereal isothermalCompressibility() const
Returns the isothermal compressibility. Units: 1/Pa.
PDSS & operator=(const PDSS &b)
Assignment operator.
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.
std::string elementName(size_t m) const
Name of the element with index m.
void writelog(const std::string &msg)
Write a message to the screen.
Class for pressure dependent standard states corresponding to ionic solutes in electrolyte water...
doublereal m_c1
Input c1 coefficient (cal gmol-1 K-1)
virtual PDSS * duplMyselfAsPDSS() const
Duplication routine for objects which inherit from PDSS.
virtual doublereal gibbs_mole() const
Return the molar Gibbs free energy in units of J kmol-1.
doublereal relEpsilon(doublereal T, doublereal P_pascal, int ifunc=0)
Bradley-Pitzer equation for the dielectric constant of water as a function of temperature and pressur...
doublereal m_r_e_j
Electrostatic radii.
XML_Node & root() const
Return the root of the current XML_Node tree.
doublereal m_born_coeff_j
Born coefficient for the current ion or species.
doublereal strSItoDbl(const std::string &strSI)
Interpret one or two token string as a single double.
doublereal fpValueCheck(const std::string &val)
Translate a string into one doublereal value, with error checking.
void build(std::istream &f)
Main routine to create an tree-like representation of an XML file.
std::string speciesName(size_t k) const
Name of the species with index k.
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 doublereal cp_R_ref() const
Return the molar heat capacity divided by R at reference pressure.
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)
virtual doublereal gibbs_RT() const
Return the molar Gibbs free energy divided by RT.
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.
virtual doublereal intEnergy_mole() const
Return the molar internal Energy in units of J kmol-1.
doublereal charge(size_t k) const
Dimensionless electrical charge of a single molecule of species k The charge is normalized by the the...
virtual doublereal entropy_R() const
Return the standard state entropy divided by RT.