Added a check to make sure the delta H formation reaction value is

consistent with G and S. It's actually redundant.
This commit is contained in:
Harry Moffat 2008-08-25 03:19:59 +00:00
parent 6397cc7770
commit 5479bcf10b

View file

@ -429,13 +429,26 @@ namespace Cantera {
m_Y_pr_tr = drelepsilondT / (relepsilon * relepsilon);
//printf("m_Y_pr_tr = %20.10g\n", m_Y_pr_tr );
m_waterProps = new WaterProps(m_waterSS);
m_presR_bar = OneAtm / 1.0E5;
m_charge_j = m_tp->charge(m_spindex);
convertDGFormation();
m_waterProps = new WaterProps(m_waterSS);
//! Ok, we have mu. Let's check it against the input value
// of DH_F to see that we have some internal consistency
double Hcalc = m_Mu0_tr_pr + 298.15 * (m_Entrop_tr_pr * 1.0E3 * 4.184);
double DHjmol = m_deltaH_formation_tr_pr * 1.0E3 * 4.184;
// If the discrepency is greater than 100 cal gmol-1, print
// an error and exit.
if (fabs(Hcalc -DHjmol) > 100.* 1.0E3 * 4.184) {
throw CanteraError(" PDSS_HKFT::initThermo()",
"DHjmol is not consistent with G and S" + fp2str(Hcalc) + " vs " + fp2str(DHjmol));
}
}
@ -591,11 +604,6 @@ namespace Cantera {
double PDSS_HKFT::deltaG() const {
double pbar = m_pres * 1.0E-5;