Remove some leftover debugging ifdefs
This commit is contained in:
parent
c49c969184
commit
bf2ceed60e
18 changed files with 0 additions and 340 deletions
|
|
@ -14,9 +14,6 @@
|
|||
namespace Cantera
|
||||
{
|
||||
|
||||
#define DAE_DEVEL
|
||||
#ifdef DAE_DEVEL
|
||||
|
||||
class Jacobian
|
||||
{
|
||||
public:
|
||||
|
|
@ -269,8 +266,6 @@ private:
|
|||
*/
|
||||
DAE_Solver* newDAE_Solver(const std::string& itype, ResidJacEval& f);
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -810,36 +810,6 @@ void MultiPhase::equilibrate(const std::string& XY, const std::string& solver,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MULTIPHASE_DEVEL
|
||||
void importFromXML(string infile, string id)
|
||||
{
|
||||
XML_Node* root = get_XML_File(infile);
|
||||
if (id == "-") {
|
||||
id = "";
|
||||
}
|
||||
XML_Node* x = get_XML_Node(string("#")+id, root);
|
||||
if (x.name() != "multiphase")
|
||||
throw CanteraError("MultiPhase::importFromXML",
|
||||
"Current XML_Node is not a multiphase element.");
|
||||
vector<XML_Node*> phases = x.getChildren("phase");
|
||||
int np = phases.size();
|
||||
int n;
|
||||
ThermoPhase* p;
|
||||
for (n = 0; n < np; n++) {
|
||||
XML_Node& ph = *phases[n];
|
||||
srcfile = infile;
|
||||
if (ph.hasAttrib("src")) {
|
||||
srcfile = ph["src"];
|
||||
}
|
||||
idstr = ph["id"];
|
||||
p = newPhase(srcfile, idstr);
|
||||
if (p) {
|
||||
addPhase(p, ph.value());
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void MultiPhase::setTemperature(const doublereal T)
|
||||
{
|
||||
if (!m_init) {
|
||||
|
|
|
|||
|
|
@ -944,25 +944,6 @@ void VCS_SOLVE::solve_tp_inner(size_t& iti, size_t& it1,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VCS_LINE_SEARCH
|
||||
/*********************************************************************/
|
||||
/*** LINE SEARCH ALGORITHM FOR MAJOR SPECIES IN NON-IDEAL PHASES *****/
|
||||
/*********************************************************************/
|
||||
/*
|
||||
* Skip the line search if we are birthing a species
|
||||
*/
|
||||
if ((dx != 0.0) &&
|
||||
(m_molNumSpecies_old[kspec] > 0.0) &&
|
||||
(doPhaseDeleteIph == -1) &&
|
||||
(m_speciesUnknownType[kspec] != VCS_SPECIES_TYPE_INTERFACIALVOLTAGE)) {
|
||||
double dx_old = dx;
|
||||
|
||||
dx = vcs_line_search(irxn, dx_old, ANOTE);
|
||||
vcs_setFlagsVolPhases(false, VCS_STATECALC_NEW);
|
||||
}
|
||||
m_deltaMolNumSpecies[kspec] = dx;
|
||||
#endif
|
||||
} /* End of Loop on ic[irxn] -> the type of species */
|
||||
/***********************************************************************/
|
||||
/****** CALCULATE KMOLE NUMBER CHANGE FOR THE COMPONENT BASIS **********/
|
||||
|
|
@ -1394,19 +1375,6 @@ void VCS_SOLVE::solve_tp_inner(size_t& iti, size_t& it1,
|
|||
forceComponentCalc = 1;
|
||||
return;
|
||||
}
|
||||
#ifdef DEBUG_NOT
|
||||
if (m_speciesStatus[l] == VCS_SPECIES_ZEROEDMS && m_molNumSpecies_old[j] == 0.0 && m_stoichCoeffRxnMatrix(j,i) != 0.0 && dg[i] < 0.0) {
|
||||
if (DEBUG_MODE_ENABLED && m_debug_print_lvl >= 2) {
|
||||
plogf(" --- Get a new basis because %s", m_speciesName[l].c_str());
|
||||
plogf(" has dg < 0.0 and comp %s has zero mole num",
|
||||
m_speciesName[j].c_str());
|
||||
plogf(" and share nonzero stoic: %-9.1f",
|
||||
m_stoichCoeffRxnMatrix(j,i));
|
||||
plogendl();
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (DEBUG_MODE_ENABLED && m_debug_print_lvl >= 2) {
|
||||
|
|
@ -4063,13 +4031,6 @@ void VCS_SOLVE::vcs_deltag(const int l, const bool doDeleted,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG_NOT
|
||||
for (irxn = 0; irxn < m_numRxnRdc; ++irxn) {
|
||||
checkFinite(deltaGRxn[irxn]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void VCS_SOLVE::vcs_printDeltaG(const int stateCalc)
|
||||
|
|
|
|||
|
|
@ -367,9 +367,6 @@ void InterfaceKinetics::applyVoltageKfwdCorrection(doublereal* const kf)
|
|||
* The treatment below is numerically more stable, however.
|
||||
*/
|
||||
doublereal eamod;
|
||||
#ifdef DEBUG_KIN_MODE
|
||||
doublereal ea;
|
||||
#endif
|
||||
for (size_t i = 0; i < m_beta.size(); i++) {
|
||||
size_t irxn = m_ctrxn[i];
|
||||
|
||||
|
|
@ -378,19 +375,6 @@ void InterfaceKinetics::applyVoltageKfwdCorrection(doublereal* const kf)
|
|||
if (m_ctrxn_BVform[i] == 0) {
|
||||
eamod = m_beta[i] * deltaElectricEnergy_[irxn];
|
||||
if (eamod != 0.0) {
|
||||
#ifdef DEBUG_KIN_MODE
|
||||
ea = GasConstant * m_E[irxn];
|
||||
if (eamod + ea < 0.0) {
|
||||
writelog("Warning: act energy mod too large!\n");
|
||||
writelog(" Delta phi = "+fp2str(deltaElectricEnergy_[irxn]/Faraday)+"\n");
|
||||
writelog(" Delta Ea = "+fp2str(eamod)+"\n");
|
||||
writelog(" Ea = "+fp2str(ea)+"\n");
|
||||
for (n = 0; n < np; n++) {
|
||||
writelog("Phase "+int2str(n)+": phi = "
|
||||
+fp2str(m_phi[n])+"\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
doublereal rt = GasConstant*thermo(0).temperature();
|
||||
doublereal rrt = 1.0/rt;
|
||||
kf[irxn] *= exp(-eamod*rrt);
|
||||
|
|
|
|||
|
|
@ -186,18 +186,9 @@ void MultiNewton::step(doublereal* x, doublereal* step,
|
|||
size_t iok;
|
||||
size_t sz = r.size();
|
||||
r.eval(npos, x, step);
|
||||
#undef DEBUG_STEP
|
||||
#ifdef DEBUG_STEP
|
||||
vector_fp ssave(sz, 0.0);
|
||||
for (size_t n = 0; n < sz; n++) {
|
||||
step[n] = -step[n];
|
||||
ssave[n] = step[n];
|
||||
}
|
||||
#else
|
||||
for (size_t n = 0; n < sz; n++) {
|
||||
step[n] = -step[n];
|
||||
}
|
||||
#endif
|
||||
|
||||
iok = jac.solve(step, step);
|
||||
|
||||
|
|
@ -223,21 +214,6 @@ void MultiNewton::step(doublereal* x, doublereal* step,
|
|||
} else if (int(iok) < 0)
|
||||
throw CanteraError("MultiNewton::step",
|
||||
"iok = "+int2str(iok));
|
||||
|
||||
#ifdef DEBUG_STEP
|
||||
bool ok = false;
|
||||
Domain1D* d;
|
||||
if (!ok) {
|
||||
for (size_t n = 0; n < sz; n++) {
|
||||
d = r.pointDomain(n);
|
||||
int nvd = d->nComponents();
|
||||
int pt = (n - d->loc())/nvd;
|
||||
cout << "step: " << pt << " " <<
|
||||
r.pointDomain(n)->componentName(n - d->loc() - nvd*pt)
|
||||
<< " " << x[n] << " " << ssave[n] << " " << step[n] << endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
doublereal MultiNewton::boundStep(const doublereal* x0,
|
||||
|
|
|
|||
|
|
@ -722,16 +722,8 @@ void DebyeHuckel::initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
|||
double dens = m_waterSS->density();
|
||||
double mw = m_waterSS->molecularWeight();
|
||||
m_speciesSize[0] = mw / dens;
|
||||
#ifdef DEBUG_MODE_NOT
|
||||
cout << "Solvent species " << sss[k] << " has volume " <<
|
||||
m_speciesSize[k] << endl;
|
||||
#endif
|
||||
} else if (modelString == "constant_incompressible") {
|
||||
m_speciesSize[k] = getFloat(*ss, "molarVolume", "toSi");
|
||||
#ifdef DEBUG_MODE_NOT
|
||||
cout << "species " << sss[k] << " has volume " <<
|
||||
m_speciesSize[k] << endl;
|
||||
#endif
|
||||
} else {
|
||||
throw CanteraError("DebyeHuckel::initThermoXML",
|
||||
"Solvent SS Model \"" + modelStringa +
|
||||
|
|
@ -744,10 +736,6 @@ void DebyeHuckel::initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
|||
"\" is not known");
|
||||
}
|
||||
m_speciesSize[k] = getFloat(*ss, "molarVolume", "toSI");
|
||||
#ifdef DEBUG_MODE_NOT
|
||||
cout << "species " << sss[k] << " has volume " <<
|
||||
m_speciesSize[k] << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -777,9 +765,6 @@ void DebyeHuckel::initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
|||
}
|
||||
} else {
|
||||
m_A_Debye = getFloat(acNode, "A_Debye");
|
||||
#ifdef DEBUG_HKM_NOT
|
||||
cout << "A_Debye = " << m_A_Debye << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -797,9 +782,6 @@ void DebyeHuckel::initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
|||
*/
|
||||
if (acNode.hasChild("B_Debye")) {
|
||||
m_B_Debye = getFloat(acNode, "B_Debye");
|
||||
#ifdef DEBUG_HKM_NOT
|
||||
cout << "B_Debye = " << m_B_Debye << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -813,9 +795,6 @@ void DebyeHuckel::initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
|||
"B_dot entry in the wrong DH form");
|
||||
}
|
||||
double bdot_common = getFloat(acNode, "B_dot");
|
||||
#ifdef DEBUG_HKM_NOT
|
||||
cout << "B_dot = " << bdot_common << endl;
|
||||
#endif
|
||||
/*
|
||||
* Set B_dot parameters for charged species
|
||||
*/
|
||||
|
|
@ -834,10 +813,6 @@ void DebyeHuckel::initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
|||
*/
|
||||
if (acNode.hasChild("maxIonicStrength")) {
|
||||
m_maxIionicStrength = getFloat(acNode, "maxIonicStrength");
|
||||
#ifdef DEBUG_HKM_NOT
|
||||
cout << "m_maxIionicStrength = "
|
||||
<<m_maxIionicStrength << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1405,12 +1380,6 @@ void DebyeHuckel::s_update_lnMolalityActCoeff() const
|
|||
- z_k * z_k * numTmp / (1.0 + denomTmp);
|
||||
for (size_t j = 0; j < m_kk; j++) {
|
||||
double beta = m_Beta_ij.value(k, j);
|
||||
#ifdef DEBUG_HKM_NOT
|
||||
if (beta != 0.0) {
|
||||
printf("b: k = %d, j = %d, betakj = %g\n",
|
||||
k, j, beta);
|
||||
}
|
||||
#endif
|
||||
m_lnActCoeffMolal[k] += 2.0 * m_molalities[j] * beta;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1312,10 +1312,6 @@ void HMWSoln::initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
|||
double dens = m_waterSS->density();
|
||||
double mw = m_waterSS->molecularWeight();
|
||||
m_speciesSize[0] = mw / dens;
|
||||
#ifdef DEBUG_HKM_NOT
|
||||
cout << "Solvent species " << sss[k] << " has volume " <<
|
||||
m_speciesSize[k] << endl;
|
||||
#endif
|
||||
} else {
|
||||
m_waterSS = providePDSS(0);
|
||||
m_waterSS->setState_TP(300., OneAtm);
|
||||
|
|
@ -1331,10 +1327,6 @@ void HMWSoln::initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
|||
}
|
||||
if (modelString == "constant_incompressible") {
|
||||
m_speciesSize[k] = getFloat(*ss, "molarVolume", "toSI");
|
||||
#ifdef DEBUG_HKM_NOT
|
||||
cout << "species " << sss[k] << " has volume " <<
|
||||
m_speciesSize[k] << endl;
|
||||
#endif
|
||||
}
|
||||
// HKM Note, have to fill up m_speciesSize[] for HKFT species
|
||||
}
|
||||
|
|
@ -1382,9 +1374,6 @@ void HMWSoln::initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
|||
if (m_form_A_Debye == A_DEBYE_CONST) {
|
||||
m_A_Debye = getFloat(acNode, "A_Debye");
|
||||
}
|
||||
#ifdef DEBUG_HKM_NOT
|
||||
cout << "A_Debye = " << m_A_Debye << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1392,10 +1381,6 @@ void HMWSoln::initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
|||
*/
|
||||
if (acNode.hasChild("maxIonicStrength")) {
|
||||
m_maxIionicStrength = getFloat(acNode, "maxIonicStrength");
|
||||
#ifdef DEBUG_HKM_NOT
|
||||
cout << "m_maxIionicStrength = "
|
||||
<<m_maxIionicStrength << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -675,33 +675,6 @@ void IonsFromNeutralVPSSTP::getNeutralMoleculeMoleGrads(const doublereal* const
|
|||
dy[jNeut] += dx[icat] * temp;
|
||||
y_[jNeut] += moleFractions_[icat] * temp;
|
||||
}
|
||||
#ifdef DEBUG_MODE_NOT
|
||||
//check dy sum to zero
|
||||
for (size_t k = 0; k < m_kk; k++) {
|
||||
moleFractionsTmp_[k] = dx[k];
|
||||
}
|
||||
for (jNeut = 0; jNeut < numNeutralMoleculeSpecies_; jNeut++) {
|
||||
for (size_t k = 0; k < m_kk; k++) {
|
||||
fmij = fm_neutralMolec_ions_[k + jNeut * m_kk];
|
||||
moleFractionsTmp_[k] -= fmij * dy[jNeut];
|
||||
}
|
||||
}
|
||||
for (size_t k = 0; k < m_kk; k++) {
|
||||
if (fabs(moleFractionsTmp_[k]) > 1.0E-13) {
|
||||
//! Check to see if we have in fact found the inverse.
|
||||
if (anionList_[0] != k) {
|
||||
throw CanteraError("IonsFromNeutralVPSSTP::getNeutralMoleculeMoleGrads",
|
||||
"neutral molecule calc error");
|
||||
} else {
|
||||
//! For the single anion case, we will allow some slippage
|
||||
if (fabs(moleFractionsTmp_[k]) > 1.0E-5) {
|
||||
throw CanteraError("IonsFromNeutralVPSSTP::getNeutralMoleculeMoleGrads",
|
||||
"neutral molecule calc error - anion");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Normalize the Neutral Molecule mole fractions
|
||||
sumy = 0.0;
|
||||
sumdy = 0.0;
|
||||
|
|
|
|||
|
|
@ -235,18 +235,6 @@ void Mu0Poly::processCoeffs(const doublereal* coeffs)
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_HKM_NOT
|
||||
printf(" Temp mu0(J/kmol) cp0(J/kmol/K) "
|
||||
" h0(J/kmol) s0(J/kmol/K) \n");
|
||||
for (i = 0; i < nPoints; i++) {
|
||||
printf("%12.3g %12.5g %12.5g %12.5g %12.5g\n",
|
||||
m_t0_int[i], m_mu0_R_int[i] * GasConstant,
|
||||
m_cp0_R_int[i]* GasConstant,
|
||||
m_h0_R_int[i]* GasConstant,
|
||||
m_s0_R_int[i]* GasConstant);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,15 +212,6 @@ doublereal PDSS_HKFT::enthalpy_mole() const
|
|||
{
|
||||
// Ok we may change this evaluation method in the future.
|
||||
doublereal h = gibbs_mole() + m_temp * entropy_mole();
|
||||
|
||||
#ifdef DEBUG_MODE_NOT
|
||||
doublereal h2 = enthalpy_mole2();
|
||||
if (fabs(h - h2) > 1.0E-1) {
|
||||
printf("we are here, h = %g, h2 = %g, k = %d, T = %g, P = %g p0 = %g\n",
|
||||
h, h2, m_spindex, m_temp, m_pres,
|
||||
m_p0);
|
||||
}
|
||||
#endif
|
||||
return h;
|
||||
}
|
||||
|
||||
|
|
@ -302,15 +293,6 @@ doublereal PDSS_HKFT::cp_mole() const
|
|||
|
||||
doublereal d2relepsilondT2 = m_waterProps->relEpsilon(m_temp, m_pres, 2);
|
||||
|
||||
#ifdef DEBUG_MODE_NOT
|
||||
doublereal d1 = m_waterProps->relEpsilon(m_temp, m_pres, 1);
|
||||
doublereal d2 = m_waterProps->relEpsilon(m_temp + 0.0001, m_pres, 1);
|
||||
doublereal d3 = (d2 - d1) / 0.0001;
|
||||
if (fabs(d2relepsilondT2 - d3) > 1.0E-6) {
|
||||
printf("we are here\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
doublereal X = d2relepsilondT2 / (relepsilon* relepsilon) - 2.0 * relepsilon * Y * Y;
|
||||
|
||||
doublereal Z = -1.0 / relepsilon;
|
||||
|
|
@ -328,17 +310,6 @@ doublereal PDSS_HKFT::cp_mole() const
|
|||
// Convert to Joules / kmol
|
||||
doublereal Cp = Cp_calgmol * 1.0E3 * 4.184;
|
||||
|
||||
#ifdef DEBUG_MODE_NOT
|
||||
double e1 = enthalpy_mole();
|
||||
m_temp = m_temp - 0.001;
|
||||
double e2 = enthalpy_mole();
|
||||
m_temp = m_temp + 0.001;
|
||||
double cpd = (e1 - e2) / 0.001;
|
||||
if (fabs(Cp - cpd) > 10.0) {
|
||||
printf("Cp difference : raw: %g, delta: %g, k = %d, T = %g, m_pres = %g\n",
|
||||
Cp, cpd, m_spindex, m_temp, m_pres);
|
||||
}
|
||||
#endif
|
||||
return Cp;
|
||||
}
|
||||
|
||||
|
|
@ -1017,22 +988,6 @@ doublereal PDSS_HKFT::gstar(const doublereal temp, const doublereal pres, const
|
|||
doublereal gval = g(temp, pres, ifunc);
|
||||
doublereal fval = f(temp, pres, ifunc);
|
||||
double res = gval - fval;
|
||||
#ifdef DEBUG_MODE_NOT
|
||||
if (ifunc == 2) {
|
||||
double gval1 = g(temp, pres, 1);
|
||||
double fval1 = f(temp, pres, 1);
|
||||
double gval2 = g(temp + 0.001, pres, 1);
|
||||
double fval2 = f(temp + 0.001, pres, 1);
|
||||
double gvalT = (gval2 - gval1) / 0.001;
|
||||
double fvalT = (fval2 - fval1) / 0.001;
|
||||
if (fabs(gvalT - gval) > 1.0E-9) {
|
||||
printf("we are here\n");
|
||||
}
|
||||
if (fabs(fvalT - fval) > 1.0E-9) {
|
||||
printf("we are here\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -367,20 +367,6 @@ void RedlichKisterVPSSTP::s_update_lnActCoeff() const
|
|||
}
|
||||
}
|
||||
// Debug against formula in literature
|
||||
#ifdef DEBUG_MODE_NOT
|
||||
double lnA = 0.0;
|
||||
double lnB = 0.0;
|
||||
double polyk = 1.0;
|
||||
double fac = 2.0 * XA - 1.0;
|
||||
for (int m = 0; m < N; m++) {
|
||||
doublereal A_ge = (he_vec[m] - T * se_vec[m]) / (GasConstant * T);
|
||||
lnA += A_ge * oneMXA * oneMXA * polyk * (1.0 + 2.0 * XA * m / fac);
|
||||
lnB += A_ge * XA * XA * polyk * (1.0 - 2.0 * oneMXA * m / fac);
|
||||
polyk *= fac;
|
||||
}
|
||||
// This gives the same result as above
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,12 +163,6 @@ void VPSSMgr_Water_HKFT::_updateRefStateThermo() const
|
|||
m_s0_R[k] = ps->entropy_mole() / GasConstant;
|
||||
m_g0_RT[k] = ps->gibbs_RT();
|
||||
m_h0_RT[k] = m_g0_RT[k] + m_s0_R[k];
|
||||
#ifdef DEBUG_MODE_NOT
|
||||
double h = ps->enthalpy_RT();
|
||||
if (fabs(m_h0_RT[k] - h) > 1.0E-4) {
|
||||
printf(" VPSSMgr_Water_HKFT::_updateRefStateThermo:: we have a discrepancy\n");
|
||||
}
|
||||
#endif
|
||||
m_V0[k] = ps->molarVolume();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ int main(int argc, char** argv)
|
|||
{
|
||||
#ifdef _MSC_VER
|
||||
_set_output_format(_TWO_DIGIT_EXPONENT);
|
||||
#endif
|
||||
#ifdef DEBUG_CHEMEQUIL
|
||||
ChemEquil_print_lvl = 0;
|
||||
#endif
|
||||
try {
|
||||
suppress_deprecation_warnings();
|
||||
|
|
|
|||
|
|
@ -92,15 +92,6 @@ int main(int argc, char** argv)
|
|||
double Cp0_NaCl = 0.0, Cp0_Naplus = 0.0, Cp0_Clminus = 0.0, Delta_Cp0s = 0.0, Cp0_H2O = 0.0;
|
||||
double Cp_NaCl = 0.0, Cp_Naplus = 0.0, Cp_Clminus = 0.0, Cp_H2O = 0.0;
|
||||
double molarCp0;
|
||||
#ifdef DEBUG_HKM
|
||||
FILE* ttt;
|
||||
if (itherms ==0) {
|
||||
ttt = fopen("table1.csv","w");
|
||||
} else {
|
||||
ttt = fopen("table2.csv","w");
|
||||
}
|
||||
|
||||
#endif
|
||||
printf("A_J/R: Comparison to Pitzer's book, p. 99, can be made.\n");
|
||||
printf(" Agreement is within 12 pc \n");
|
||||
printf("\n");
|
||||
|
|
@ -133,11 +124,6 @@ int main(int argc, char** argv)
|
|||
" kJ/gmolSalt,"
|
||||
" kJ/gmolSalt, kJ/gmolSoln, kJ/gmolSalt,"
|
||||
" kJ/gmol, kJ/gmol\n");
|
||||
#ifdef DEBUG_HKM
|
||||
fprintf(ttt,"T, Pres, A_J/R, Delta_Cp0, Delta_Cps, J, phiJ\n");
|
||||
fprintf(ttt,"Kelvin, bar, sqrt(kg/gmol), kJ/gmolSalt, kJ/gmolSalt, kJ/gmolSoln,"
|
||||
"kJ/gmolSalt\n");
|
||||
#endif
|
||||
for (i = 0; i < TTable.NPoints + 1; i++) {
|
||||
if (i == TTable.NPoints) {
|
||||
T = 323.15;
|
||||
|
|
@ -237,10 +223,6 @@ int main(int argc, char** argv)
|
|||
"%13.5f, %13.5f, %13.5f, %13.5f\n",
|
||||
T, pres*1.0E-5, Aphi, AJ/GasConstant, Delta_Cp0s, Delta_Cps,
|
||||
J, phiJ, molarCp , molarCp0);
|
||||
#ifdef DEBUG_HKM
|
||||
fprintf(ttt,"%g, %g, %g, %g, %g, %g, %g\n",
|
||||
T, pres*1.0E-5, AJ/GasConstant, Delta_Cp0s, Delta_Cps, J, phiJ);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -262,10 +244,6 @@ int main(int argc, char** argv)
|
|||
printf("%13.5f %13.5f %13.5f %13.5f\n", 1.0,
|
||||
Cp0_NaCl , Cp_NaCl, Cp_NaCl - Cp0_NaCl);
|
||||
|
||||
#ifdef DEBUG_HKM
|
||||
fclose(ttt);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
delete HMW1;
|
||||
|
|
|
|||
|
|
@ -79,9 +79,6 @@ int main(int argc, char** argv)
|
|||
double Cp0_NaCl = 0.0, Cp0_Naplus = 0.0, Cp0_Clminus = 0.0, Delta_Cp0s = 0.0, Cp0_H2O = 0.0;
|
||||
double Cp_NaCl = 0.0, Cp_Naplus = 0.0, Cp_Clminus = 0.0, Cp_H2O = 0.0;
|
||||
double molarCp0;
|
||||
#ifdef DEBUG_HKM
|
||||
FILE* ttt = fopen("table.csv","w");
|
||||
#endif
|
||||
printf("A_J/R: Comparison to Pitzer's book, p. 99, can be made.\n");
|
||||
printf(" Agreement is within 12 pc \n");
|
||||
printf("\n");
|
||||
|
|
@ -114,11 +111,6 @@ int main(int argc, char** argv)
|
|||
" kJ/gmolSalt,"
|
||||
" kJ/gmolSalt, kJ/gmolSoln, kJ/gmolSalt,"
|
||||
" kJ/gmol, kJ/gmol\n");
|
||||
#ifdef DEBUG_HKM
|
||||
fprintf(ttt,"T, Pres, A_J/R, Delta_Cp0, Delta_Cps, J, phiJ\n");
|
||||
fprintf(ttt,"Kelvin, bar, sqrt(kg/gmol), kJ/gmolSalt, kJ/gmolSalt, kJ/gmolSoln,"
|
||||
"kJ/gmolSalt\n");
|
||||
#endif
|
||||
for (i = 0; i < TTable.NPoints + 1; i++) {
|
||||
if (i == TTable.NPoints) {
|
||||
T = 323.15;
|
||||
|
|
@ -218,10 +210,6 @@ int main(int argc, char** argv)
|
|||
"%13.5g, %13.5g, %13.5g, %13.5g\n",
|
||||
T, pres*1.0E-5, Aphi, AJ/GasConstant, Delta_Cp0s, Delta_Cps,
|
||||
J, phiJ, molarCp , molarCp0);
|
||||
#ifdef DEBUG_HKM
|
||||
fprintf(ttt,"%g, %g, %g, %g, %g, %g, %g\n",
|
||||
T, pres*1.0E-5, AJ/GasConstant, Delta_Cp0s, Delta_Cps, J, phiJ);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -249,10 +237,6 @@ int main(int argc, char** argv)
|
|||
delete solid;
|
||||
solid = 0;
|
||||
Cantera::appdelete();
|
||||
|
||||
#ifdef DEBUG_HKM
|
||||
fclose(ttt);
|
||||
#endif
|
||||
return retn;
|
||||
|
||||
} catch (CanteraError& err) {
|
||||
|
|
|
|||
|
|
@ -98,9 +98,6 @@ int main(int argc, char** argv)
|
|||
printf(" against analytical formula in L_standalone program.\n");
|
||||
printf(" (comparison against Eq. 12, Silvester and Pitzer)\n");
|
||||
|
||||
#ifdef DEBUG_HKM
|
||||
FILE* ttt = fopen("table.csv","w");
|
||||
#endif
|
||||
/*
|
||||
* Create a Table of NaCl Enthalpy Properties as a Function
|
||||
* of the Temperature
|
||||
|
|
@ -115,10 +112,6 @@ int main(int argc, char** argv)
|
|||
" kJ/gmolSalt,"
|
||||
" kJ/gmolSalt, kJ/gmolSoln, kJ/gmolSalt,"
|
||||
" kJ/gmolSalt, kJ/gmol, kJ/gmol\n");
|
||||
#ifdef DEBUG_HKM
|
||||
fprintf(ttt,"T, Pres, A_L/RT, Delta_H0, Delta_Hs, phiL\n");
|
||||
fprintf(ttt,"Kelvin, bar, sqrt(kg/gmol), kJ/gmolSalt, kJ/gmolSalt, kJ/gmolSalt\n");
|
||||
#endif
|
||||
for (i = 0; i < TTable.NPoints + 1; i++) {
|
||||
if (i == TTable.NPoints) {
|
||||
T = 323.15;
|
||||
|
|
@ -208,10 +201,6 @@ int main(int argc, char** argv)
|
|||
LrelMol,
|
||||
molarEnth , molarEnth0);
|
||||
|
||||
#ifdef DEBUG_HKM
|
||||
fprintf(ttt,"%g, %g, %g, %g, %g, %g\n",
|
||||
T, pres*1.0E-5, AL/RT, Delta_H0s, Delta_Hs, phiL);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -236,11 +225,6 @@ int main(int argc, char** argv)
|
|||
delete solid;
|
||||
solid = 0;
|
||||
Cantera::appdelete();
|
||||
|
||||
#ifdef DEBUG_HKM
|
||||
fclose(ttt);
|
||||
#endif
|
||||
|
||||
return retn;
|
||||
|
||||
} catch (CanteraError& err) {
|
||||
|
|
|
|||
|
|
@ -75,9 +75,6 @@ int main(int argc, char** argv)
|
|||
double V0_NaCl = 0.0, V0_Naplus = 0.0, V0_Clminus = 0.0, Delta_V0s = 0.0, V0_H2O = 0.0;
|
||||
double V_NaCl = 0.0, V_Naplus = 0.0, V_Clminus = 0.0, V_H2O = 0.0;
|
||||
double molarV0;
|
||||
#ifdef DEBUG_HKM
|
||||
FILE* ttt = fopen("table.csv","w");
|
||||
#endif
|
||||
printf("A_V : Comparison to Pitzer's book, p. 99, can be made.\n");
|
||||
printf(" Agreement to 3 sig digits \n");
|
||||
printf("\n");
|
||||
|
|
@ -110,11 +107,6 @@ int main(int argc, char** argv)
|
|||
"cm**3/gmolSalt,"
|
||||
"cm**3/gmolSalt,cm**3/gmolSoln,cm**3/gmolSalt,"
|
||||
"cm**3/gmol, cm**3/gmol\n");
|
||||
#ifdef DEBUG_HKM
|
||||
fprintf(ttt,"T, Pres, A_V, Vex, phiV, MolarV, MolarV0\n");
|
||||
fprintf(ttt,"Kelvin, bar, sqrt(kg/gmol)cm3/gmol, cm3/gmolSoln, cm3/gmolSalt, kJ/gmolSoln,"
|
||||
"kJ/gmolSoln\n");
|
||||
#endif
|
||||
for (i = 0; i < TTable.NPoints + 1; i++) {
|
||||
if (i == TTable.NPoints) {
|
||||
T = 323.15;
|
||||
|
|
@ -217,10 +209,6 @@ int main(int argc, char** argv)
|
|||
"%13.5g, %13.4g, %13.4g, %13.4g\n",
|
||||
T, pres*1.0E-5, Aphi, Av, Delta_V0s*1.0E3, Delta_Vs*1.0E3,
|
||||
Vex*1.0E3, phiV*1.0E3, molarV*1.0E3 , molarV0*1.0E3);
|
||||
#ifdef DEBUG_HKM
|
||||
fprintf(ttt,"%g, %g, %g, %g, %g, %g, %g\n",
|
||||
T, pres*1.0E-5, Av, Vex*1.0E3, phiV*1.0E3, molarV*1.0E3 , molarV0*1.0E3);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -253,9 +241,6 @@ int main(int argc, char** argv)
|
|||
delete solid;
|
||||
solid = 0;
|
||||
Cantera::appdelete();
|
||||
#ifdef DEBUG_HKM
|
||||
fclose(ttt);
|
||||
#endif
|
||||
return retn;
|
||||
|
||||
} catch (CanteraError& err) {
|
||||
|
|
|
|||
|
|
@ -16,10 +16,6 @@
|
|||
|
||||
#define MSSIZE 200
|
||||
|
||||
#ifdef DEBUG_HKM
|
||||
int iDebug_HKM = 0;
|
||||
#endif
|
||||
|
||||
/*****************************************************************/
|
||||
/*****************************************************************/
|
||||
/*****************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue