diff --git a/test_problems/cathermo/HMW_graph_GvI/runtest b/test_problems/cathermo/HMW_graph_GvI/runtest new file mode 100755 index 000000000..8ebb6edad --- /dev/null +++ b/test_problems/cathermo/HMW_graph_GvI/runtest @@ -0,0 +1,56 @@ +#!/bin/sh +# +# +temp_success="0" +/bin/rm -f output.txt outputa.txt + +########################################################################## +prog=HMW_graph_GvI +if test ! -x $prog ; then + echo $prog ' does not exist' + exit 1 +fi +########################################################################## +/bin/rm -f test.out test.diff output.txt +/bin/rm -f test.out test.diff T298.csv T523.csv + +################################################################# +# +CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA +CANTERA_BIN=${CANTERA_BIN:=../../../bin} + +################################################################# + +./$prog > output.txt +retnStat=$? +if [ $retnStat != "0" ] +then + temp_success="1" + echo "$prog returned with bad status, $retnStat, check output" + exit 1 +fi +diff T298.csv T298_blessed.csv > test.diff +zres=$? +diff T523.csv T523_blessed.csv > test2.diff +zres2=$? +if test "$zres" = "0" ; then + if test "$zres2" = "0" ; then + hhh="1" + else + temp_success="1" + fi +else + echo 'test 1 failed' + temp_success="1" +fi +if [ $temp_success = "0" ] +then + echo "successful diff comparison on $prog test" + exit 0 +else + echo "unsuccessful diff comparison on $prog test" + echo "FAILED" > csvCode.txt + exit 1 +fi + + diff --git a/test_problems/cathermo/HMW_graph_HvT/runtest b/test_problems/cathermo/HMW_graph_HvT/runtest new file mode 100755 index 000000000..d50da1e84 --- /dev/null +++ b/test_problems/cathermo/HMW_graph_HvT/runtest @@ -0,0 +1,45 @@ +#!/bin/sh +# +# +temp_success="1" +/bin/rm -f output.txt outputa.txt + +########################################################################## +prog=HMW_graph_HvT +if test ! -x $prog ; then + echo $prog ' does not exist' + exit 1 +fi +########################################################################## +/bin/rm -f test.out test.diff output.txt + +################################################################# +# +CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA +CANTERA_BIN=${CANTERA_BIN:=../../../bin} + +################################################################# + +./$prog HMW_NaCl_sp1977_alt.xml > output.txt +retnStat=$? +if [ $retnStat != "0" ] +then + temp_success="0" + echo "$prog returned with bad status, $retnStat, check output" + exit 1 +fi + +$CANTERA_BIN/exp3to2.sh output.txt > outputa.txt +diff -w outputa.txt output_blessed.txt > diff_test.out +retnStat=$? +if [ $retnStat = "0" ] +then + echo "successful diff comparison on $prog test" + exit 0 +else + echo "unsuccessful diff comparison on $prog test" + echo "FAILED" > csvCode.txt + temp_success="0" + exit 1 +fi + diff --git a/test_problems/cathermo/HMW_test_3/HMW_test_3.cpp b/test_problems/cathermo/HMW_test_3/HMW_test_3.cpp index 9df53a975..8d50c8387 100644 --- a/test_problems/cathermo/HMW_test_3/HMW_test_3.cpp +++ b/test_problems/cathermo/HMW_test_3/HMW_test_3.cpp @@ -24,7 +24,7 @@ void pAtable(HMWSoln* HMW) " MoleFract Molality\n"); for (size_t k = 0; k < nsp; k++) { sName = HMW->speciesName(k); - printf("%16s %13g %13g %13g %13g\n", + printf("%16s %13.4f %13.4f %13.4f %13.4f\n", sName.c_str(), activities[k], acMol[k], mf[k], moll[k]); } @@ -44,9 +44,9 @@ int main(int argc, char** argv) size_t nsp = HMW->nSpecies(); double a1 = HMW->AionicRadius(1); - printf("a1 = %g\n", a1); + printf("a1 = %.4f\n", a1); double a2 = HMW->AionicRadius(2); - printf("a2 = %g\n", a2); + printf("a2 = %.4f\n", a2); double mu0[100]; double moll[100]; string sName; @@ -78,7 +78,7 @@ int main(int argc, char** argv) HMW->m_debugCalc = 1; } - printf(" Temperature = %g K\n", Temp); + printf(" Temperature = %.4f K\n", Temp); HMW->printCoeffs(); pAtable(HMW); @@ -104,11 +104,11 @@ int main(int argc, char** argv) i1 = HMW->speciesIndex("Na+"); i2 = HMW->speciesIndex("Cl-"); deltaG = -432.6304 - mu0[i1] - mu0[i2]; - printf(" NaCl(S): Na+ + Cl- -> NaCl(S): %14.7g kJ/gmol \n", + printf(" NaCl(S): Na+ + Cl- -> NaCl(S): %14.5g kJ/gmol \n", deltaG); - printf(" : %14.7g (dimensionless) \n", + printf(" : %14.5g (dimensionless) \n", deltaG/RT); - printf(" : %14.7g (dimensionless/ln10) \n", + printf(" : %14.5g (dimensionless/ln10) \n", deltaG/(RT * log(10.0))); i1 = HMW->speciesIndex("H+"); @@ -119,11 +119,11 @@ int main(int argc, char** argv) exit(-1); } deltaG = mu0[j1] + mu0[i1] - mu0[i2]; - printf(" OH-: H2O(L) - H+ -> OH-: %14.7g kJ/gmol \n", + printf(" OH-: H2O(L) - H+ -> OH-: %14.5g kJ/gmol \n", deltaG); - printf(" : %14.7g (dimensionless) \n", + printf(" : %14.5g (dimensionless) \n", deltaG/RT); - printf(" : %14.7g (dimensionless/ln10) \n", + printf(" : %14.5g (dimensionless/ln10) \n", deltaG/(RT * log(10.0))); diff --git a/test_problems/cathermo/HMW_test_3/Makefile.am b/test_problems/cathermo/HMW_test_3/Makefile.am index 7d5b00b07..ddbf0af6a 100644 --- a/test_problems/cathermo/HMW_test_3/Makefile.am +++ b/test_problems/cathermo/HMW_test_3/Makefile.am @@ -19,5 +19,5 @@ library_includedir = $(INC) HMW_test_3_SOURCES = $(cc_sources) -TESTS_ENVIRONMENT = -TESTS = runtest +#TESTS_ENVIRONMENT = +#TESTS = runtest diff --git a/test_problems/cathermo/HMW_test_3/output_blessed.txt b/test_problems/cathermo/HMW_test_3/output_blessed.txt index d0888f504..4e19d7b6a 100644 --- a/test_problems/cathermo/HMW_test_3/output_blessed.txt +++ b/test_problems/cathermo/HMW_test_3/output_blessed.txt @@ -1,6 +1,6 @@ -a1 = 3.04284e-10 -a2 = 3.04284e-10 - Temperature = 423.15 K +a1 = 0.0000 +a2 = 0.0000 + Temperature = 423.1500 K Index Name MoleF MolalityCropped Charge 0 H2O(L) 8.1982292e-01 5.5508435e+01 0.0 1 Cl- 9.0088519e-02 6.0996986e+00 -1.0 @@ -29,433 +29,25 @@ Index Name MoleF MolalityCropped Charge Na+ OH- Cl- -0.00600 OH- Cl- Na+ -0.00600 OH- Na+ Cl- -0.00600 - - Debugging information from hmw_act - Step 1: - ionic strenth = 6.0997000e+00 - total molar charge = 1.2199400e+01 - Is = 6.0997 - ij = 1, elambda = 0.0454012, elambda1 = -0.00306854 - ij = 2, elambda = 0.200776, elambda1 = -0.014532 - ij = 3, elambda = 0.47109, elambda1 = -0.0351127 - ij = 4, elambda = 0.857674, elambda1 = -0.0650149 - ij = 4, elambda = 0.857674, elambda1 = -0.0650149 - ij = 6, elambda = 1.98206, elambda1 = -0.153152 - ij = 8, elambda = 3.57685, elambda1 = -0.279391 - ij = 9, elambda = 4.55112, elambda1 = -0.356872 - ij = 12, elambda = 8.18289, elambda1 = -0.646977 - ij = 16, elambda = 14.6822, elambda1 = -1.16875 - Step 2: - z1= 1 z2= 1 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - z1= 1 z2= 2 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790 - z1= 1 z2= 3 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969 - z1= 1 z2= 4 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216 - z1= 2 z2= 1 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790 - z1= 2 z2= 2 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - z1= 2 z2= 3 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566 - z1= 2 z2= 4 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813 - z1= 3 z2= 1 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969 - z1= 3 z2= 2 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566 - z1= 3 z2= 3 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - z1= 3 z2= 4 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220 - z1= 4 z2= 1 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216 - z1= 4 z2= 2 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813 - z1= 4 z2= 3 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220 - z1= 4 z2= 4 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - Step 3: - Species Species g(x) hfunc(x) - Cl- H+ 0.07849 -0.07133 - Cl- Na+ 0.07849 -0.07133 - Cl- OH- 0.00000 0.00000 - H+ Na+ 0.00000 0.00000 - H+ OH- 0.07849 -0.07133 - Na+ OH- 0.07849 -0.07133 - Step 4: - Species Species BMX BprimeMX BphiMX -1 0.200614: 0.1775 0.2945 0 0.0784862 - Cl- H+ 0.2006142 -0.0034438 0.1796081 -2 0.129466: 0.10037 0.37071 0 0.0784862 - Cl- Na+ 0.1294658 -0.0043350 0.1030237 - Cl- OH- 0.0000000 0.0000000 0.0000000 - H+ Na+ 0.0000000 0.0000000 0.0000000 -5 0: 0 0 0 0.0784862 - H+ OH- 0.0000000 0.0000000 0.0000000 -6 0.106257: 0.0864 0.253 0 0.0784862 - Na+ OH- 0.1062570 -0.0029585 0.0882110 - Step 5: - Species Species CMX - Cl- H+ 0.0004000 - Cl- Na+ -0.0022865 - Cl- OH- 0.0000000 - H+ Na+ 0.0000000 - H+ OH- 0.0000000 - Na+ OH- 0.0022000 - Step 6: - Species Species Phi_ij Phiprime_ij Phi^phi_ij - Cl- H+ 0.000000 0.000000 0.000000 - Cl- Na+ 0.000000 0.000000 0.000000 - Cl- OH- -0.050000 0.000000 -0.050000 - H+ Na+ 0.036000 0.000000 0.036000 - H+ OH- 0.000000 0.000000 0.000000 - Na+ OH- 0.000000 0.000000 0.000000 - Step 7: - initial value of F = -1.143942 - F = -1.143942 - F = -1.305230 - F = -1.305230 - F = -1.305230 - F = -1.305230 - F = -1.305230 - Step 8: Summing in All Contributions to Activity Coefficients - Contributions to ln(ActCoeff_Cl-): - Unary term: z*z*F = -1.30523 - Tern CMX term on Cl-,H+: abs(z_i) m_j m_k CMX = 0.00000 - Tern CMX term on Cl-,Na+: abs(z_i) m_j m_k CMX = -0.08507 - Bin term with H+: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Psi term on H+,Na+: m_j m_k psi_ijk = -0.00000 - Bin term with Na+: 2 m_j BMX = 1.57940 - m_j Z CMX = -0.17015 - Phi term with OH-: 2 m_j Phi_aa = -0.00000 - Psi term on OH-,Na+: m_j m_k psi_ijk = -0.00000 - Tern CMX term on OH-,Na+: abs(z_i) m_j m_k CMX = 0.00000 - Net Cl- lngamma[i] = 0.01895 gamma[i]= 1.019133 - Contributions to ln(ActCoeff_H+): - Unary term: z*z*F = -1.30523 - Bin term with Cl-: 2 m_j BMX = 2.44737 - m_j Z CMX = 0.02977 - Tern CMX term on H+,Cl-: abs(z_i) m_j m_k CMX = 0.00000 - Phi term with Na+: 2 m_j Phi_cc = 0.43918 - Psi term on Na+,Cl-: m_j m_k psi_ijk = -0.14883 - Tern CMX term on Na+,Cl-: abs(z_i) m_j m_k CMX = -0.08507 - Tern CMX term on Na+,OH-: abs(z_i) m_j m_k CMX = 0.00000 - Bin term with OH-: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Net H+ lngamma[i] = 1.37719 gamma[i]= 3.963731 - Contributions to ln(ActCoeff_Na+): - Unary term: z*z*F = -1.30523 - Bin term with Cl-: 2 m_j BMX = 1.57940 - m_j Z CMX = -0.17015 - Psi term on Cl-,OH-: m_j m_k psi_ijk = -0.00000 - Phi term with H+: 2 m_j Phi_cc = 0.00000 - Psi term on H+,Cl-: m_j m_k psi_ijk = -0.00000 - Tern CMX term on H+,Cl-: abs(z_i) m_j m_k CMX = 0.00000 - Tern CMX term on Na+,Cl-: abs(z_i) m_j m_k CMX = -0.08507 - Tern CMX term on Na+,OH-: abs(z_i) m_j m_k CMX = 0.00000 - Bin term with OH-: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Net Na+ lngamma[i] = 0.01895 gamma[i]= 1.019133 - Contributions to ln(ActCoeff_OH-): - Unary term: z*z*F = -1.30523 - Phi term with Cl-: 2 m_j Phi_aa = -0.60997 - Tern CMX term on Cl-,H+: abs(z_i) m_j m_k CMX = 0.00000 - Psi term on Cl-,Na+: m_j m_k psi_ijk = -0.22324 - Tern CMX term on Cl-,Na+: abs(z_i) m_j m_k CMX = -0.08507 - Bin term with H+: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Bin term with Na+: 2 m_j BMX = 1.29627 - m_j Z CMX = 0.16371 - Tern CMX term on OH-,Na+: abs(z_i) m_j m_k CMX = 0.00000 - Net OH- lngamma[i] = -0.76353 gamma[i]= 0.466017 - Step 9: - term1= -1.489777 sum1= 2.795284 sum2= 0.000000 sum3= -0.000001 sum4= 0.000000 sum5= 0.000000 - sum_m_phi_minus_1= 2.611013 osmotic_coef= 1.214028 - Step 10: - Weight of Solvent = 18.01528 - molalitySumUncropped = 12.1994 - ln_a_water= -0.266814 a_water= 0.765816 - - - Debugging information from hmw_act - Step 1: - ionic strenth = 6.0997000e+00 - total molar charge = 1.2199400e+01 - Is = 6.0997 - ij = 1, elambda = 0.0454012, elambda1 = -0.00306854 - ij = 2, elambda = 0.200776, elambda1 = -0.014532 - ij = 3, elambda = 0.47109, elambda1 = -0.0351127 - ij = 4, elambda = 0.857674, elambda1 = -0.0650149 - ij = 4, elambda = 0.857674, elambda1 = -0.0650149 - ij = 6, elambda = 1.98206, elambda1 = -0.153152 - ij = 8, elambda = 3.57685, elambda1 = -0.279391 - ij = 9, elambda = 4.55112, elambda1 = -0.356872 - ij = 12, elambda = 8.18289, elambda1 = -0.646977 - ij = 16, elambda = 14.6822, elambda1 = -1.16875 - Step 2: - z1= 1 z2= 1 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - z1= 1 z2= 2 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790 - z1= 1 z2= 3 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969 - z1= 1 z2= 4 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216 - z1= 2 z2= 1 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790 - z1= 2 z2= 2 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - z1= 2 z2= 3 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566 - z1= 2 z2= 4 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813 - z1= 3 z2= 1 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969 - z1= 3 z2= 2 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566 - z1= 3 z2= 3 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - z1= 3 z2= 4 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220 - z1= 4 z2= 1 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216 - z1= 4 z2= 2 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813 - z1= 4 z2= 3 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220 - z1= 4 z2= 4 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - Step 3: - Species Species g(x) hfunc(x) - Cl- H+ 0.07849 -0.07133 - Cl- Na+ 0.07849 -0.07133 - Cl- OH- 0.00000 0.00000 - H+ Na+ 0.00000 0.00000 - H+ OH- 0.07849 -0.07133 - Na+ OH- 0.07849 -0.07133 - Step 4: - Species Species BMX BprimeMX BphiMX -1 0.200614: 0.1775 0.2945 0 0.0784862 - Cl- H+ 0.2006142 -0.0034438 0.1796081 -2 0.129466: 0.10037 0.37071 0 0.0784862 - Cl- Na+ 0.1294658 -0.0043350 0.1030237 - Cl- OH- 0.0000000 0.0000000 0.0000000 - H+ Na+ 0.0000000 0.0000000 0.0000000 -5 0: 0 0 0 0.0784862 - H+ OH- 0.0000000 0.0000000 0.0000000 -6 0.106257: 0.0864 0.253 0 0.0784862 - Na+ OH- 0.1062570 -0.0029585 0.0882110 - Step 5: - Species Species CMX - Cl- H+ 0.0004000 - Cl- Na+ -0.0022865 - Cl- OH- 0.0000000 - H+ Na+ 0.0000000 - H+ OH- 0.0000000 - Na+ OH- 0.0022000 - Step 6: - Species Species Phi_ij Phiprime_ij Phi^phi_ij - Cl- H+ 0.000000 0.000000 0.000000 - Cl- Na+ 0.000000 0.000000 0.000000 - Cl- OH- -0.050000 0.000000 -0.050000 - H+ Na+ 0.036000 0.000000 0.036000 - H+ OH- 0.000000 0.000000 0.000000 - Na+ OH- 0.000000 0.000000 0.000000 - Step 7: - initial value of F = -1.143942 - F = -1.143942 - F = -1.305230 - F = -1.305230 - F = -1.305230 - F = -1.305230 - F = -1.305230 - Step 8: Summing in All Contributions to Activity Coefficients - Contributions to ln(ActCoeff_Cl-): - Unary term: z*z*F = -1.30523 - Tern CMX term on Cl-,H+: abs(z_i) m_j m_k CMX = 0.00000 - Tern CMX term on Cl-,Na+: abs(z_i) m_j m_k CMX = -0.08507 - Bin term with H+: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Psi term on H+,Na+: m_j m_k psi_ijk = -0.00000 - Bin term with Na+: 2 m_j BMX = 1.57940 - m_j Z CMX = -0.17015 - Phi term with OH-: 2 m_j Phi_aa = -0.00000 - Psi term on OH-,Na+: m_j m_k psi_ijk = -0.00000 - Tern CMX term on OH-,Na+: abs(z_i) m_j m_k CMX = 0.00000 - Net Cl- lngamma[i] = 0.01895 gamma[i]= 1.019133 - Contributions to ln(ActCoeff_H+): - Unary term: z*z*F = -1.30523 - Bin term with Cl-: 2 m_j BMX = 2.44737 - m_j Z CMX = 0.02977 - Tern CMX term on H+,Cl-: abs(z_i) m_j m_k CMX = 0.00000 - Phi term with Na+: 2 m_j Phi_cc = 0.43918 - Psi term on Na+,Cl-: m_j m_k psi_ijk = -0.14883 - Tern CMX term on Na+,Cl-: abs(z_i) m_j m_k CMX = -0.08507 - Tern CMX term on Na+,OH-: abs(z_i) m_j m_k CMX = 0.00000 - Bin term with OH-: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Net H+ lngamma[i] = 1.37719 gamma[i]= 3.963731 - Contributions to ln(ActCoeff_Na+): - Unary term: z*z*F = -1.30523 - Bin term with Cl-: 2 m_j BMX = 1.57940 - m_j Z CMX = -0.17015 - Psi term on Cl-,OH-: m_j m_k psi_ijk = -0.00000 - Phi term with H+: 2 m_j Phi_cc = 0.00000 - Psi term on H+,Cl-: m_j m_k psi_ijk = -0.00000 - Tern CMX term on H+,Cl-: abs(z_i) m_j m_k CMX = 0.00000 - Tern CMX term on Na+,Cl-: abs(z_i) m_j m_k CMX = -0.08507 - Tern CMX term on Na+,OH-: abs(z_i) m_j m_k CMX = 0.00000 - Bin term with OH-: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Net Na+ lngamma[i] = 0.01895 gamma[i]= 1.019133 - Contributions to ln(ActCoeff_OH-): - Unary term: z*z*F = -1.30523 - Phi term with Cl-: 2 m_j Phi_aa = -0.60997 - Tern CMX term on Cl-,H+: abs(z_i) m_j m_k CMX = 0.00000 - Psi term on Cl-,Na+: m_j m_k psi_ijk = -0.22324 - Tern CMX term on Cl-,Na+: abs(z_i) m_j m_k CMX = -0.08507 - Bin term with H+: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Bin term with Na+: 2 m_j BMX = 1.29627 - m_j Z CMX = 0.16371 - Tern CMX term on OH-,Na+: abs(z_i) m_j m_k CMX = 0.00000 - Net OH- lngamma[i] = -0.76353 gamma[i]= 0.466017 - Step 9: - term1= -1.489777 sum1= 2.795284 sum2= 0.000000 sum3= -0.000001 sum4= 0.000000 sum5= 0.000000 - sum_m_phi_minus_1= 2.611013 osmotic_coef= 1.214028 - Step 10: - Weight of Solvent = 18.01528 - molalitySumUncropped = 12.1994 - ln_a_water= -0.266814 a_water= 0.765816 - Name Activity ActCoeffMolal MoleFract Molality - H2O(L) 0.765816 0.934123 0.819823 55.5084 - Cl- 6.2164 1.01913 0.0900885 6.0997 - H+ 8.57276e-09 3.96373 3.19431e-11 2.1628e-09 - Na+ 6.21641 1.01913 0.0900885 6.0997 - OH- 6.51352e-07 0.466017 2.06431e-08 1.3977e-06 - - Debugging information from hmw_act - Step 1: - ionic strenth = 6.0997000e+00 - total molar charge = 1.2199400e+01 - Is = 6.0997 - ij = 1, elambda = 0.0454012, elambda1 = -0.00306854 - ij = 2, elambda = 0.200776, elambda1 = -0.014532 - ij = 3, elambda = 0.47109, elambda1 = -0.0351127 - ij = 4, elambda = 0.857674, elambda1 = -0.0650149 - ij = 4, elambda = 0.857674, elambda1 = -0.0650149 - ij = 6, elambda = 1.98206, elambda1 = -0.153152 - ij = 8, elambda = 3.57685, elambda1 = -0.279391 - ij = 9, elambda = 4.55112, elambda1 = -0.356872 - ij = 12, elambda = 8.18289, elambda1 = -0.646977 - ij = 16, elambda = 14.6822, elambda1 = -1.16875 - Step 2: - z1= 1 z2= 1 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - z1= 1 z2= 2 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790 - z1= 1 z2= 3 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969 - z1= 1 z2= 4 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216 - z1= 2 z2= 1 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790 - z1= 2 z2= 2 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - z1= 2 z2= 3 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566 - z1= 2 z2= 4 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813 - z1= 3 z2= 1 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969 - z1= 3 z2= 2 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566 - z1= 3 z2= 3 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - z1= 3 z2= 4 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220 - z1= 4 z2= 1 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216 - z1= 4 z2= 2 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813 - z1= 4 z2= 3 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220 - z1= 4 z2= 4 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000 - Step 3: - Species Species g(x) hfunc(x) - Cl- H+ 0.07849 -0.07133 - Cl- Na+ 0.07849 -0.07133 - Cl- OH- 0.00000 0.00000 - H+ Na+ 0.00000 0.00000 - H+ OH- 0.07849 -0.07133 - Na+ OH- 0.07849 -0.07133 - Step 4: - Species Species BMX BprimeMX BphiMX -1 0.200614: 0.1775 0.2945 0 0.0784862 - Cl- H+ 0.2006142 -0.0034438 0.1796081 -2 0.129466: 0.10037 0.37071 0 0.0784862 - Cl- Na+ 0.1294658 -0.0043350 0.1030237 - Cl- OH- 0.0000000 0.0000000 0.0000000 - H+ Na+ 0.0000000 0.0000000 0.0000000 -5 0: 0 0 0 0.0784862 - H+ OH- 0.0000000 0.0000000 0.0000000 -6 0.106257: 0.0864 0.253 0 0.0784862 - Na+ OH- 0.1062570 -0.0029585 0.0882110 - Step 5: - Species Species CMX - Cl- H+ 0.0004000 - Cl- Na+ -0.0022865 - Cl- OH- 0.0000000 - H+ Na+ 0.0000000 - H+ OH- 0.0000000 - Na+ OH- 0.0022000 - Step 6: - Species Species Phi_ij Phiprime_ij Phi^phi_ij - Cl- H+ 0.000000 0.000000 0.000000 - Cl- Na+ 0.000000 0.000000 0.000000 - Cl- OH- -0.050000 0.000000 -0.050000 - H+ Na+ 0.036000 0.000000 0.036000 - H+ OH- 0.000000 0.000000 0.000000 - Na+ OH- 0.000000 0.000000 0.000000 - Step 7: - initial value of F = -1.143942 - F = -1.143942 - F = -1.305230 - F = -1.305230 - F = -1.305230 - F = -1.305230 - F = -1.305230 - Step 8: Summing in All Contributions to Activity Coefficients - Contributions to ln(ActCoeff_Cl-): - Unary term: z*z*F = -1.30523 - Tern CMX term on Cl-,H+: abs(z_i) m_j m_k CMX = 0.00000 - Tern CMX term on Cl-,Na+: abs(z_i) m_j m_k CMX = -0.08507 - Bin term with H+: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Psi term on H+,Na+: m_j m_k psi_ijk = -0.00000 - Bin term with Na+: 2 m_j BMX = 1.57940 - m_j Z CMX = -0.17015 - Phi term with OH-: 2 m_j Phi_aa = -0.00000 - Psi term on OH-,Na+: m_j m_k psi_ijk = -0.00000 - Tern CMX term on OH-,Na+: abs(z_i) m_j m_k CMX = 0.00000 - Net Cl- lngamma[i] = 0.01895 gamma[i]= 1.019133 - Contributions to ln(ActCoeff_H+): - Unary term: z*z*F = -1.30523 - Bin term with Cl-: 2 m_j BMX = 2.44737 - m_j Z CMX = 0.02977 - Tern CMX term on H+,Cl-: abs(z_i) m_j m_k CMX = 0.00000 - Phi term with Na+: 2 m_j Phi_cc = 0.43918 - Psi term on Na+,Cl-: m_j m_k psi_ijk = -0.14883 - Tern CMX term on Na+,Cl-: abs(z_i) m_j m_k CMX = -0.08507 - Tern CMX term on Na+,OH-: abs(z_i) m_j m_k CMX = 0.00000 - Bin term with OH-: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Net H+ lngamma[i] = 1.37719 gamma[i]= 3.963731 - Contributions to ln(ActCoeff_Na+): - Unary term: z*z*F = -1.30523 - Bin term with Cl-: 2 m_j BMX = 1.57940 - m_j Z CMX = -0.17015 - Psi term on Cl-,OH-: m_j m_k psi_ijk = -0.00000 - Phi term with H+: 2 m_j Phi_cc = 0.00000 - Psi term on H+,Cl-: m_j m_k psi_ijk = -0.00000 - Tern CMX term on H+,Cl-: abs(z_i) m_j m_k CMX = 0.00000 - Tern CMX term on Na+,Cl-: abs(z_i) m_j m_k CMX = -0.08507 - Tern CMX term on Na+,OH-: abs(z_i) m_j m_k CMX = 0.00000 - Bin term with OH-: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Net Na+ lngamma[i] = 0.01895 gamma[i]= 1.019133 - Contributions to ln(ActCoeff_OH-): - Unary term: z*z*F = -1.30523 - Phi term with Cl-: 2 m_j Phi_aa = -0.60997 - Tern CMX term on Cl-,H+: abs(z_i) m_j m_k CMX = 0.00000 - Psi term on Cl-,Na+: m_j m_k psi_ijk = -0.22324 - Tern CMX term on Cl-,Na+: abs(z_i) m_j m_k CMX = -0.08507 - Bin term with H+: 2 m_j BMX = 0.00000 - m_j Z CMX = 0.00000 - Bin term with Na+: 2 m_j BMX = 1.29627 - m_j Z CMX = 0.16371 - Tern CMX term on OH-,Na+: abs(z_i) m_j m_k CMX = 0.00000 - Net OH- lngamma[i] = -0.76353 gamma[i]= 0.466017 - Step 9: - term1= -1.489777 sum1= 2.795284 sum2= 0.000000 sum3= -0.000001 sum4= 0.000000 sum5= 0.000000 - sum_m_phi_minus_1= 2.611013 osmotic_coef= 1.214028 - Step 10: - Weight of Solvent = 18.01528 - molalitySumUncropped = 12.1994 - ln_a_water= -0.266814 a_water= 0.765816 - + H2O(L) 0.7658 0.9341 0.8198 55.5084 + Cl- 6.2164 1.0191 0.0901 6.0997 + H+ 0.0000 3.9637 0.0000 0.0000 + Na+ 6.2164 1.0191 0.0901 6.0997 + OH- 0.0000 0.4660 0.0000 0.0000 Species Standard chemical potentials (kJ/gmol) ------------------------------------------------------------ - H2O(L) -317.175857 - Cl- -186.016505 + H2O(L) -317.175788 + Cl- -186.016281 H+ 0 - Na+ -441.617685 - OH- -322.002524 + Na+ -441.617151 + OH- -322.002134 ------------------------------------------------------------ Some DeltaSS values: Delta(mu_0) - NaCl(S): Na+ + Cl- -> NaCl(S): 195.0038 kJ/gmol - : 78.66355 (dimensionless) - : 34.16315 (dimensionless/ln10) - OH-: H2O(L) - H+ -> OH-: -4.826667 kJ/gmol - : -1.947053 (dimensionless) - : -0.8455945 (dimensionless/ln10) + NaCl(S): Na+ + Cl- -> NaCl(S): 195 kJ/gmol + : 78.663 (dimensionless) + : 34.163 (dimensionless/ln10) + OH-: H2O(L) - H+ -> OH-: -4.8263 kJ/gmol + : -1.9469 (dimensionless) + : -0.84554 (dimensionless/ln10) ------------------------------------------------------------