diff --git a/test_problems/VCSnonideal/NaCl_equil/nacl_equil.cpp b/test_problems/VCSnonideal/NaCl_equil/nacl_equil.cpp index 204d1eadf..cfb3488c3 100644 --- a/test_problems/VCSnonideal/NaCl_equil/nacl_equil.cpp +++ b/test_problems/VCSnonideal/NaCl_equil/nacl_equil.cpp @@ -35,8 +35,6 @@ int main(int argc, char** argv) int numFail = 0; int printLvl = 1; string inputFile = "HMW_NaCl.xml"; - bool printInputFormat = false; // print cmdfile.txt format - bool printedUsage = false; VCSnonideal::vcs_timing_print_lvl = 0; /* @@ -50,10 +48,8 @@ int main(int argc, char** argv) int nopt = static_cast(tok.size()); for (int n = 1; n < nopt; n++) { if (!strcmp(tok.c_str() + 1, "help_cmdfile")) { - printInputFormat = true; } else if (tok[n] == 'h') { printUsage(); - printedUsage = true; exit(1); } else if (tok[n] == 'd') { printLvl = 2; @@ -71,7 +67,6 @@ int main(int argc, char** argv) } } else { printUsage(); - printedUsage = true; exit(1); } } @@ -79,7 +74,6 @@ int main(int argc, char** argv) inputFile = tok; } else { printUsage(); - printedUsage = true; exit(1); } } diff --git a/test_problems/cathermo/HMW_dupl_test/HMW_dupl_test.cpp b/test_problems/cathermo/HMW_dupl_test/HMW_dupl_test.cpp index 659586e9a..506e19178 100644 --- a/test_problems/cathermo/HMW_dupl_test/HMW_dupl_test.cpp +++ b/test_problems/cathermo/HMW_dupl_test/HMW_dupl_test.cpp @@ -43,15 +43,10 @@ int main(int argc, char** argv) int nsp = HMW->nSpecies(); - double acMol[100]; - double act[100]; double mf[100]; double moll[100]; for (i = 0; i < 100; i++) { - acMol[i] = 1.0; - act[i] = 1.0; mf[i] = 0.0; - act[i] = 0.0; } HMW->getMoleFractions(mf); @@ -70,7 +65,6 @@ int main(int argc, char** argv) } HMW->setMolalities(moll); - double ISQRT; double Is = 0.0; /* @@ -82,7 +76,6 @@ int main(int argc, char** argv) * Fix the molality */ Is = 6.146; - ISQRT = sqrt(Is); moll[i1] = Is; moll[i2] = Is; HMW->setState_TPM(298.15, pres, moll); diff --git a/test_problems/cathermo/HMW_graph_CpvT/HMW_graph_CpvT.cpp b/test_problems/cathermo/HMW_graph_CpvT/HMW_graph_CpvT.cpp index ca700159b..7b24a7f31 100644 --- a/test_problems/cathermo/HMW_graph_CpvT/HMW_graph_CpvT.cpp +++ b/test_problems/cathermo/HMW_graph_CpvT/HMW_graph_CpvT.cpp @@ -44,15 +44,10 @@ int main(int argc, char** argv) int nsp = HMW->nSpecies(); - double acMol[100]; - double act[100]; double mf[100]; double moll[100]; for (i = 0; i < 100; i++) { - acMol[i] = 1.0; - act[i] = 1.0; mf[i] = 0.0; - act[i] = 0.0; } HMW->getMoleFractions(mf); @@ -71,7 +66,6 @@ int main(int argc, char** argv) } HMW->setMolalities(moll); - double ISQRT; double Is = 0.0; /* @@ -83,7 +77,6 @@ int main(int argc, char** argv) * Fix the molality */ Is = 6.146; - ISQRT = sqrt(Is); moll[i1] = Is; moll[i2] = Is; HMW->setState_TPM(298.15, pres, moll); diff --git a/test_problems/cathermo/HMW_graph_GvT/HMW_graph_GvT.cpp b/test_problems/cathermo/HMW_graph_GvT/HMW_graph_GvT.cpp index 321403fdf..00d2fc26d 100644 --- a/test_problems/cathermo/HMW_graph_GvT/HMW_graph_GvT.cpp +++ b/test_problems/cathermo/HMW_graph_GvT/HMW_graph_GvT.cpp @@ -73,7 +73,6 @@ int main(int argc, char** argv) } HMW->setMolalities(moll); - double ISQRT; double Is = 0.0; /* @@ -85,7 +84,6 @@ int main(int argc, char** argv) * Fix the molality using the setState_TPM() function. */ Is = 6.146; - ISQRT = sqrt(Is); moll[i1] = Is; moll[i2] = Is; HMW->setState_TPM(298.15, pres, moll); diff --git a/test_problems/cathermo/HMW_graph_HvT/HMW_graph_HvT.cpp b/test_problems/cathermo/HMW_graph_HvT/HMW_graph_HvT.cpp index f11959387..18eb2dbc4 100644 --- a/test_problems/cathermo/HMW_graph_HvT/HMW_graph_HvT.cpp +++ b/test_problems/cathermo/HMW_graph_HvT/HMW_graph_HvT.cpp @@ -44,14 +44,10 @@ int main(int argc, char** argv) int nsp = HMW->nSpecies(); - double acMol[100]; - double act[100]; double mf[100]; double moll[100]; for (i = 0; i < 100; i++) { - acMol[i] = 1.0; mf[i] = 0.0; - act[i] = 1.0; moll[i] = 0.0; } HMW->getMoleFractions(mf); @@ -70,7 +66,6 @@ int main(int argc, char** argv) } HMW->setMolalities(moll); - double ISQRT; double Is = 0.0; /* @@ -82,7 +77,6 @@ int main(int argc, char** argv) * Fix the molality */ Is = 6.146; - ISQRT = sqrt(Is); moll[i1] = Is; moll[i2] = Is; HMW->setState_TPM(298.15, pres, moll); diff --git a/test_problems/cathermo/HMW_graph_VvT/HMW_graph_VvT.cpp b/test_problems/cathermo/HMW_graph_VvT/HMW_graph_VvT.cpp index e2314433a..616152a4b 100644 --- a/test_problems/cathermo/HMW_graph_VvT/HMW_graph_VvT.cpp +++ b/test_problems/cathermo/HMW_graph_VvT/HMW_graph_VvT.cpp @@ -63,10 +63,6 @@ int main(int argc, char** argv) } HMW->setMolalities(moll); - - double ISQRT; - double Is = 0.0; - /* * Set the Pressure */ @@ -75,8 +71,7 @@ int main(int argc, char** argv) /* * Fix the molality */ - Is = 6.146; - ISQRT = sqrt(Is); + double Is = 6.146; moll[i1] = Is; moll[i2] = Is; HMW->setState_TPM(298.15, pres, moll); diff --git a/test_problems/cathermo/stoichSubSSTP/stoichSubSSTP.cpp b/test_problems/cathermo/stoichSubSSTP/stoichSubSSTP.cpp index b14df9f6a..adff3a6ae 100644 --- a/test_problems/cathermo/stoichSubSSTP/stoichSubSSTP.cpp +++ b/test_problems/cathermo/stoichSubSSTP/stoichSubSSTP.cpp @@ -52,16 +52,6 @@ int main(int argc, char** argv) if (nsp != 1) { throw CanteraError("","Should just be one species"); } - double acMol[100]; - double act[100]; - double mf[100]; - double moll[100]; - for (i = 0; i < 100; i++) { - acMol[i] = 1.0; - act[i] = 1.0; - mf[i] = 0.0; - moll[i] = 0.0; - } string sName; TemperatureTable TTable(8, true, 300, 100., 0, 0); @@ -80,7 +70,7 @@ int main(int argc, char** argv) double enth_RT[20]; double entrop_RT[20], intE_RT[20]; double mu_NaCl, enth_NaCl, entrop_NaCl; - double mu0_NaCl, molarGibbs, intE_NaCl, cp_NaCl; + double cp_NaCl; /* * Create a Table of NaCl Properties as a Function * of the Temperature @@ -116,7 +106,6 @@ int main(int argc, char** argv) * Get the Standard State DeltaH */ solid->getGibbs_RT(mu0_RT); - mu0_NaCl = mu0_RT[0] * RT * 1.0E-6; solid->getEnthalpy_RT(enth_RT); enth_NaCl = enth_RT[0] * RT * 1.0E-6; @@ -128,10 +117,7 @@ int main(int argc, char** argv) solid->getEntropy_R(entrop_RT); entrop_NaCl = entrop_RT[0] * GasConstant * 1.0E-3; - molarGibbs = solid->gibbs_mole() * 1.0E-6; - solid->getIntEnergy_RT(intE_RT); - intE_NaCl = intE_RT[0] * RT * 1.0E-6; solid->getCp_R(cp_r); cp_NaCl = cp_r[0] * GasConstant * 1.0E-3; diff --git a/test_problems/surfkin/surfdemo.cpp b/test_problems/surfkin/surfdemo.cpp index 1de7bc8a8..bfa995af7 100644 --- a/test_problems/surfkin/surfdemo.cpp +++ b/test_problems/surfkin/surfdemo.cpp @@ -27,12 +27,11 @@ int main() surf.setCoverages(DATA_PTR(cov)); vector_fp wdot(gas.nSpecies() + surf.nSpecies()); surf.getNetProductionRates(DATA_PTR(wdot)); - int k; - for (k = 0; k < gas.nSpecies(); k++) { + for (size_t k = 0; k < gas.nSpecies(); k++) { cout << gas.speciesName(k) << " " << wdot[k] << endl; } - for (k = 0; k < surf.nSpecies(); k++) + for (size_t k = 0; k < surf.nSpecies(); k++) cout << surf.speciesName(k) << " " << wdot[k+gas.nSpecies()] << endl;