34 m_deltaG_formation_tr_pr(0.0),
35 m_deltaH_formation_tr_pr(0.0),
48 m_domega_jdT_prtr(0.0),
57 const std::string& inputFile,
const std::string&
id) :
64 m_deltaG_formation_tr_pr(0.0),
65 m_deltaH_formation_tr_pr(0.0),
78 m_domega_jdT_prtr(0.0),
88 const XML_Node& phaseRoot,
bool spInstalled) :
95 m_deltaG_formation_tr_pr(0.0),
96 m_deltaH_formation_tr_pr(0.0),
109 m_domega_jdT_prtr(0.0),
124 m_born_coeff_j(-1.0),
126 m_deltaG_formation_tr_pr(0.0),
127 m_deltaH_formation_tr_pr(0.0),
140 m_domega_jdT_prtr(0.0),
209 doublereal h = GG +
m_temp * SS;
211 #ifdef DEBUG_MODE_NOT
213 if (fabs(h - h2) > 1.0E-1) {
214 printf(
"we are here, h = %g, h2 = %g, k = %d, T = %g, P = %g p0 = %g\n",
232 doublereal delH =
deltaH();
234 return delH + enthTRPR;
247 doublereal delS =
deltaS();
253 doublereal delG =
deltaG();
259 doublereal pbar =
m_pres * 1.0E-5;
260 doublereal c1term =
m_c1;
270 doublereal domega_jdT;
271 doublereal d2omega_jdT2;
277 doublereal nu = 166027;
285 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
286 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
287 doublereal d2r_e_jdT2 = fabs(
m_charge_j) * d2gvaldT2;
289 doublereal r_e_j2 = r_e_j * r_e_j;
293 doublereal r_e_H = 3.082 + gval;
294 doublereal r_e_H2 = r_e_H * r_e_H;
296 omega_j = nu * (charge2 / r_e_j - m_charge_j / r_e_H);
298 domega_jdT = nu * (-(charge2 / r_e_j2 * dr_e_jdT)
299 +(m_charge_j / r_e_H2 * dgvaldT));
301 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
302 -2.0*m_charge_j*dgvaldT*dgvaldT/(r_e_H2*r_e_H) + m_charge_j*d2gvaldT2 /r_e_H2);
308 doublereal Y = drelepsilondT / (relepsilon * relepsilon);
312 #ifdef DEBUG_MODE_NOT
315 doublereal d3 = (d2 - d1) / 0.0001;
316 if (fabs(d2relepsilondT2 - d3) > 1.0E-6) {
317 printf(
"we are here\n");
321 doublereal X = d2relepsilondT2 / (relepsilon* relepsilon) - 2.0 * relepsilon * Y * Y;
323 doublereal Z = -1.0 / relepsilon;
325 doublereal yterm = 2.0 *
m_temp * Y * domega_jdT;
327 doublereal xterm = omega_j *
m_temp * X;
329 doublereal otterm =
m_temp * d2omega_jdT2 * (Z + 1.0);
333 doublereal Cp_calgmol = c1term + c2term + a3term + a4term + yterm + xterm + otterm + rterm;
336 doublereal Cp = Cp_calgmol * 1.0E3 * 4.184;
338 #ifdef DEBUG_MODE_NOT
343 double cpd = (e1 - e2) / 0.001;
344 if (fabs(Cp - cpd) > 10.0) {
345 printf(
"Cp difference : raw: %g, delta: %g, k = %d, T = %g, m_pres = %g\n",
355 throw CanteraError(
"PDSS_HKFT::cv_mole()",
"unimplemented");
363 doublereal a1term =
m_a1 * 1.0E-5;
365 doublereal a2term =
m_a2 / (2600.E5 +
m_pres);
367 doublereal a3term =
m_a3 * 1.0E-5/ (
m_temp - 228.);
372 doublereal domega_jdP;
377 doublereal nu = 166027.;
379 doublereal r_e_j_pr_tr = charge2 / (
m_omega_pr_tr/nu + m_charge_j/3.082);
384 doublereal r_e_j = r_e_j_pr_tr + fabs(m_charge_j) * gval;
385 doublereal r_e_H = 3.082 + gval;
387 omega_j = nu * (charge2 / r_e_j - m_charge_j / r_e_H);
389 doublereal dr_e_jdP = fabs(m_charge_j) * dgvaldP;
391 domega_jdP = - nu * (charge2 / (r_e_j * r_e_j) * dr_e_jdP)
392 + nu * m_charge_j / (r_e_H * r_e_H) * dgvaldP;
399 doublereal Q = drelepsilondP / (relepsilon * relepsilon);
401 doublereal Z = -1.0 / relepsilon;
403 doublereal wterm = - domega_jdP * (Z + 1.0);
405 doublereal qterm = - omega_j * Q;
407 doublereal molVol_calgmolPascal = a1term + a2term + a3term + a4term + wterm + qterm;
410 return molVol_calgmolPascal * 4.184 * 1.0E3;
423 doublereal m_psave =
m_pres;
433 doublereal m_psave =
m_pres;
443 doublereal m_psave =
m_pres;
453 doublereal m_psave =
m_pres;
455 doublereal ee =
cp_R();
463 doublereal m_psave =
m_pres;
487 doublereal PDSS_HKFT::temperature()
const
501 throw CanteraError(
"PDSS_HKFT::critTemperature()",
"unimplemented");
507 throw CanteraError(
"PDSS_HKFT::critPressure()",
"unimplemented");
513 throw CanteraError(
"PDSS_HKFT::critDensity()",
"unimplemented");
535 m_Y_pr_tr = drelepsilondT / (relepsilon * relepsilon);
552 if (fabs(Hcalc -DHjmol) > 100.* 1.0E3 * 4.184) {
554 "DHjmol is not consistent with G and S: " +
555 fp2str(Hcalc/(4.184E3)) +
" vs "
558 doublereal nu = 166027;
560 doublereal r_e_j_pr_tr;
574 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
575 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
578 + nu *
m_charge_j / (3.082 + gval) / (3.082 + gval) * dgvaldT;
598 const XML_Node& phaseNode,
bool spInstalled)
605 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
"spInstalled false not handled");
611 "no thermo Node for species " + speciesNode.
name());
613 std::string model =
lowercase((*tn)[
"model"]);
614 if (model !=
"hkft") {
616 "thermo model for species isn't hkft: "
617 + speciesNode.
name());
622 "no Thermo::HKFT Node for species " + speciesNode.
name());
627 std::string p0string = (*hh)[
"Pref"];
628 if (p0string !=
"") {
632 std::string minTstring = (*hh)[
"Tmin"];
633 if (minTstring !=
"") {
637 std::string maxTstring = (*hh)[
"Tmax"];
638 if (maxTstring !=
"") {
643 doublereal val =
getFloat(*hh,
"DG0_f_Pr_Tr");
651 doublereal val =
getFloat(*hh,
"DH0_f_Pr_Tr");
659 doublereal val =
getFloat(*hh,
"S0_Pr_Tr");
669 "no standardState Node for species " + speciesNode.
name());
672 if (model !=
"hkft") {
674 "standardState model for species isn't hkft: "
675 + speciesNode.
name());
678 doublereal val =
getFloat(*ss,
"a1");
681 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a1 field");
684 doublereal val =
getFloat(*ss,
"a2");
687 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a2 field");
690 doublereal val =
getFloat(*ss,
"a3");
693 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a3 field");
696 doublereal val =
getFloat(*ss,
"a4");
699 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing a4 field");
703 doublereal val =
getFloat(*ss,
"c1");
706 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing c1 field");
709 doublereal val =
getFloat(*ss,
"c2");
712 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing c2 field");
715 doublereal val =
getFloat(*ss,
"omega_Pr_Tr");
718 throw CanteraError(
"PDSS_HKFT::constructPDSSXML",
" missing omega_Pr_Tr field");
722 int isum = hasDGO + hasDHO + hasSO;
725 "Missing 2 or more of DG0_f_Pr_Tr, DH0_f_Pr_Tr, or S0_f_Pr_Tr fields. "
726 "Need to supply at least two of these fields");
757 const std::string& inputFile,
758 const std::string&
id)
760 if (inputFile.size() == 0) {
762 "input file is null");
765 ifstream fin(path.c_str());
767 throw CanteraError(
"PDSS_HKFT::initThermo",
"could not open "
768 +path+
" for reading.");
780 "ERROR: Can not find phase named " +
781 id +
" in file named " + inputFile);
786 &(fxml_phase->
root()));
797 doublereal pbar =
m_pres * 1.0E-5;
805 doublereal c2term = -
m_c2 * (1.0/(
m_temp - 228.) - 1.0/(298.15 - 228.));
811 doublereal a4term =
m_a4 * a3tmp * log((2600. + pbar)/(2600. +
m_presR_bar));
814 doublereal domega_jdT;
819 doublereal nu = 166027;
822 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
825 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
830 + nu *
m_charge_j / (3.082 + gval) / (3.082 + gval) * dgvaldT;
836 doublereal Y = drelepsilondT / (relepsilon * relepsilon);
838 doublereal Z = -1.0 / relepsilon;
840 doublereal yterm =
m_temp * omega_j * Y;
843 doublereal wterm = - omega_j * (Z + 1.0);
846 doublereal otterm =
m_temp * domega_jdT * (Z + 1.0);
849 doublereal deltaH_calgmol = c1term + a1term + a2term + c2term + a3term + a4term
850 + yterm + yrterm + wterm + wrterm + otterm + otrterm;
853 return deltaH_calgmol * 1.0E3 * 4.184;
859 doublereal pbar =
m_pres * 1.0E-5;
869 doublereal c2term = -
m_c2 * ((1.0/(
m_temp - 228.) - 1.0/(298.15 - 228.)) * (228. -
m_temp)/228.
880 doublereal nu = 166027;
883 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
889 doublereal Z = -1.0 / relepsilon;
891 doublereal wterm = - omega_j * (Z + 1.0);
897 doublereal deltaG_calgmol = sterm + c1term + a1term + a2term + c2term + a3term + a4term + wterm + wrterm + yterm;
900 return deltaG_calgmol * 1.0E3 * 4.184;
905 doublereal pbar =
m_pres * 1.0E-5;
907 doublereal c1term =
m_c1 * log(
m_temp/298.15);
909 doublereal c2term = -
m_c2 / 228. * ((1.0/(
m_temp - 228.) - 1.0/(298.15 - 228.))
910 + 1.0 / 228. * log((298.15*(
m_temp-228.)) / (
m_temp*(298.15-228.))));
917 doublereal domega_jdT;
923 doublereal nu = 166027;
930 doublereal r_e_j = r_e_j_pr_tr + fabs(
m_charge_j) * gval;
931 doublereal dr_e_jdT = fabs(
m_charge_j) * dgvaldT;
936 + nu *
m_charge_j / (3.082 + gval) / (3.082 + gval) * dgvaldT;
942 doublereal Y = drelepsilondT / (relepsilon * relepsilon);
944 doublereal Z = -1.0 / relepsilon;
946 doublereal wterm = omega_j * Y;
950 doublereal otterm = domega_jdT * (Z + 1.0);
954 doublereal deltaS_calgmol = c1term + c2term + a3term + a4term + wterm + wrterm + otterm + otrterm;
957 return deltaS_calgmol * 1.0E3 * 4.184;
962 static doublereal ag_coeff[3] = { -2.037662, 5.747000E-3, -6.557892E-6};
964 doublereal t2 = temp * temp;
965 return ag_coeff[0] + ag_coeff[1] * temp + ag_coeff[2] * t2;
966 }
else if (ifunc == 1) {
967 return ag_coeff[1] + ag_coeff[2] * 2.0 * temp;
972 return ag_coeff[2] * 2.0;
977 static doublereal bg_coeff[3] = { 6.107361, -1.074377E-2, 1.268348E-5};
979 doublereal t2 = temp * temp;
980 return bg_coeff[0] + bg_coeff[1] * temp + bg_coeff[2] * t2;
981 }
else if (ifunc == 1) {
982 return bg_coeff[1] + bg_coeff[2] * 2.0 * temp;
987 return bg_coeff[2] * 2.0;
990 doublereal
PDSS_HKFT::f(
const doublereal temp,
const doublereal pres,
const int ifunc)
const
992 static doublereal af_coeff[3] = { 3.666666E1, -0.1504956E-9, 0.5107997E-13};
993 doublereal TC = temp - 273.15;
994 doublereal presBar = pres / 1.0E5;
1002 if (presBar > 1000.) {
1007 doublereal T1 = (TC-155.0)/300.;
1010 doublereal p2 = (1000. - presBar) * (1000. - presBar);
1011 doublereal p3 = (1000. - presBar) * p2;
1012 doublereal p4 = p2 * p2;
1013 doublereal fac2 = af_coeff[1] * p3 + af_coeff[2] * p4;
1015 fac1 = pow(T1,4.8) + af_coeff[0] * pow(T1, 16.0);
1017 }
else if (ifunc == 1) {
1018 fac1 = (4.8 * pow(T1,3.8) + 16.0 * af_coeff[0] * pow(T1, 15.0)) / 300.;
1020 }
else if (ifunc == 2) {
1021 fac1 = (4.8 * 3.8 * pow(T1,2.8) + 16.0 * 15.0 * af_coeff[0] * pow(T1, 14.0)) / (300. * 300.);
1023 }
else if (ifunc == 3) {
1024 fac1 = pow(T1,4.8) + af_coeff[0] * pow(T1, 16.0);
1025 fac2 = - (3.0 * af_coeff[1] * p2 + 4.0 * af_coeff[2] * p3)/ 1.0E5;
1033 doublereal
PDSS_HKFT::g(
const doublereal temp,
const doublereal pres,
const int ifunc)
const
1035 doublereal afunc =
ag(temp, 0);
1036 doublereal bfunc =
bg(temp, 0);
1041 doublereal gval = afunc * pow((1.0-dens), bfunc);
1048 }
else if (ifunc == 1 || ifunc == 2) {
1049 doublereal afuncdT =
ag(temp, 1);
1050 doublereal bfuncdT =
bg(temp, 1);
1053 doublereal fac1 = afuncdT * gval / afunc;
1054 doublereal fac2 = bfuncdT * gval * log(1.0 - dens);
1055 doublereal fac3 = gval * alpha * bfunc * dens / (1.0 - dens);
1057 doublereal dgdt = fac1 + fac2 + fac3;
1062 doublereal afuncdT2 =
ag(temp, 2);
1063 doublereal bfuncdT2 =
bg(temp, 2);
1065 doublereal dfac1dT = dgdt * afuncdT / afunc + afuncdT2 * gval / afunc
1066 - afuncdT * afuncdT * gval / (afunc * afunc);
1068 doublereal ddensdT = - alpha * dens;
1069 doublereal dfac2dT = bfuncdT2 * gval * log(1.0 - dens)
1070 + bfuncdT * dgdt * log(1.0 - dens)
1071 - bfuncdT * gval /(1.0 - dens) * ddensdT;
1075 doublereal dfac3dT = dgdt * alpha * bfunc * dens / (1.0 - dens)
1076 + gval * dalphadT * bfunc * dens / (1.0 - dens)
1077 + gval * alpha * bfuncdT * dens / (1.0 - dens)
1078 + gval * alpha * bfunc * ddensdT / (1.0 - dens)
1079 + gval * alpha * bfunc * dens / ((1.0 - dens) * (1.0 - dens)) * ddensdT;
1081 return dfac1dT + dfac2dT + dfac3dT;
1083 }
else if (ifunc == 3) {
1086 return - bfunc * gval * dens * beta / (1.0 - dens);
1093 doublereal
PDSS_HKFT::gstar(
const doublereal temp,
const doublereal pres,
const int ifunc)
const
1095 doublereal gval =
g(temp, pres, ifunc);
1096 doublereal fval =
f(temp, pres, ifunc);
1097 double res = gval - fval;
1098 #ifdef DEBUG_MODE_NOT
1100 double gval1 =
g(temp, pres, 1);
1101 double fval1 =
f(temp, pres, 1);
1102 double gval2 =
g(temp + 0.001, pres, 1);
1103 double fval2 =
f(temp + 0.001, pres, 1);
1104 double gvalT = (gval2 - gval1) / 0.001;
1105 double fvalT = (fval2 - fval1) / 0.001;
1106 if (fabs(gvalT - gval) > 1.0E-9) {
1107 printf(
"we are here\n");
1109 if (fabs(fvalT - fval) > 1.0E-9) {
1110 printf(
"we are here\n");
1122 throw CanteraError(
"PDSS_HKFT::LookupGe",
"element " + elemName +
" not found");
1127 "element " + elemName +
" does not have a supplied entropy298");
1129 geValue *= (-298.15);
1143 doublereal totalSum = 0.0;
1144 for (
size_t m = 0; m < ne; m++) {
1149 totalSum += na * ge;
1165 doublereal*
const c,
1166 doublereal& minTemp_,
1167 doublereal& maxTemp_,
1168 doublereal& refPressure_)
const
virtual doublereal gibbs_RT() const
Return the molar Gibbs free energy divided by RT.
virtual doublereal enthalpy_RT() const
Return the standard state molar enthalpy divided by RT.
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 void setTemperature(doublereal temp)
Set the internal temperature.
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.
virtual doublereal critTemperature() const
critical temperature
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].
Virtual base class for the classes that manage the calculation of standard state properties for all t...
virtual void initThermoXML(const XML_Node &phaseNode, const std::string &id)
Initialization routine for the PDSS object based on the phaseNode.
const size_t npos
index returned by functions to indicate "no position"
virtual doublereal cv_mole() const
Return the molar const volume heat capacity in units of J kmol-1 K-1.
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)
virtual doublereal pressure() const
Returns the pressure (Pa)
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...
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
doublereal getFloat(const Cantera::XML_Node &parent, const std::string &name, const std::string &type)
Get a floating-point value from a child element.
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.
Header for a class used to house several approximation routines for properties of water...
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...
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 doublereal entropy_R() const
Return the standard state entropy divided by RT.
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 setPressure(doublereal pres)
Sets the pressure in the object.
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.
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 ...
virtual doublereal critPressure() const
critical pressure
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
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()
const std::vector< std::string > & speciesNames() const
Return a const reference to the vector of species names.
virtual void initThermoXML(const XML_Node &phaseNode, const std::string &id)
Initialization routine for the PDSS object based on the phaseNode.
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...
virtual doublereal cp_R() const
Return the molar const pressure heat capacity divided by RT.
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.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
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.
std::string elementName(size_t m) const
Name of the element with index m.
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.
virtual doublereal critDensity() const
critical density
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.
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)
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...