pyEQL 1.4.0rc9__cp311-cp311-macosx_10_9_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (491) hide show
  1. pyEQL/__init__.py +50 -0
  2. pyEQL/_phreeqc.cpython-311-darwin.so +0 -0
  3. pyEQL/activity_correction.py +879 -0
  4. pyEQL/database/geothermal.dat +5693 -0
  5. pyEQL/database/llnl.dat +19305 -0
  6. pyEQL/database/phreeqc_license.txt +54 -0
  7. pyEQL/database/pyeql_db.json +35607 -0
  8. pyEQL/engines.py +1153 -0
  9. pyEQL/equilibrium.py +227 -0
  10. pyEQL/functions.py +281 -0
  11. pyEQL/phreeqc/__init__.py +5 -0
  12. pyEQL/phreeqc/bindings.cpp +84 -0
  13. pyEQL/phreeqc/core.py +239 -0
  14. pyEQL/phreeqc/database/Amm.dat +1968 -0
  15. pyEQL/phreeqc/database/CMakeLists.txt +32 -0
  16. pyEQL/phreeqc/database/ColdChem.dat +267 -0
  17. pyEQL/phreeqc/database/Concrete_PHR.dat +158 -0
  18. pyEQL/phreeqc/database/Concrete_PZ.dat +195 -0
  19. pyEQL/phreeqc/database/Kinec.v2.dat +12039 -0
  20. pyEQL/phreeqc/database/Kinec_v3.dat +12159 -0
  21. pyEQL/phreeqc/database/Makefile.am +28 -0
  22. pyEQL/phreeqc/database/Makefile.in +530 -0
  23. pyEQL/phreeqc/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  24. pyEQL/phreeqc/database/Tipping_Hurley.dat +4137 -0
  25. pyEQL/phreeqc/database/__init__.py +0 -0
  26. pyEQL/phreeqc/database/core10.dat +6824 -0
  27. pyEQL/phreeqc/database/frezchem.dat +634 -0
  28. pyEQL/phreeqc/database/iso.dat +7235 -0
  29. pyEQL/phreeqc/database/llnl.dat +19310 -0
  30. pyEQL/phreeqc/database/minteq.dat +5654 -0
  31. pyEQL/phreeqc/database/minteq.v4.dat +13212 -0
  32. pyEQL/phreeqc/database/phreeqc.dat +1972 -0
  33. pyEQL/phreeqc/database/phreeqc_rates.dat +3158 -0
  34. pyEQL/phreeqc/database/pitzer.dat +1044 -0
  35. pyEQL/phreeqc/database/sit.dat +14348 -0
  36. pyEQL/phreeqc/database/wateq4f.dat +4036 -0
  37. pyEQL/phreeqc/ext/README.md +10 -0
  38. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/CMakeLists.txt +476 -0
  39. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/INSTALL +302 -0
  40. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqc.rc +61 -0
  41. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqcConfig.cmake.in +4 -0
  42. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.am +8 -0
  43. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.in +816 -0
  44. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/aclocal.m4 +1217 -0
  45. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/CTestScript.cmake +167 -0
  46. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/CSelectedOutput.cpp.o +0 -0
  47. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc.cpp.o +0 -0
  48. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqcLib.cpp.o +0 -0
  49. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc_interface_F.cpp.o +0 -0
  50. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/Var.c.o +0 -0
  51. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Dictionary.cpp.o +0 -0
  52. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ExchComp.cxx.o +0 -0
  53. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Exchange.cxx.o +0 -0
  54. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasComp.cxx.o +0 -0
  55. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasPhase.cxx.o +0 -0
  56. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolution.cxx.o +0 -0
  57. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolutionComp.cxx.o +0 -0
  58. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/KineticsComp.cxx.o +0 -0
  59. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NameDouble.cxx.o +0 -0
  60. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NumKeyword.cxx.o +0 -0
  61. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PBasic.cpp.o +0 -0
  62. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PHRQ_io_output.cpp.o +0 -0
  63. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblage.cxx.o +0 -0
  64. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblageComp.cxx.o +0 -0
  65. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Phreeqc.cpp.o +0 -0
  66. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp.o +0 -0
  67. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Pressure.cxx.o +0 -0
  68. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Reaction.cxx.o +0 -0
  69. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ReadClass.cxx.o +0 -0
  70. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SS.cxx.o +0 -0
  71. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SSassemblage.cxx.o +0 -0
  72. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SScomp.cxx.o +0 -0
  73. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SelectedOutput.cpp.o +0 -0
  74. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Serializer.cxx.o +0 -0
  75. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Solution.cxx.o +0 -0
  76. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SolutionIsotope.cxx.o +0 -0
  77. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBin.cxx.o +0 -0
  78. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBinList.cpp.o +0 -0
  79. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Surface.cxx.o +0 -0
  80. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceCharge.cxx.o +0 -0
  81. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceComp.cxx.o +0 -0
  82. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/System.cxx.o +0 -0
  83. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Temperature.cxx.o +0 -0
  84. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Use.cpp.o +0 -0
  85. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/UserPunch.cpp.o +0 -0
  86. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/advection.cpp.o +0 -0
  87. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/basicsubs.cpp.o +0 -0
  88. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cl1.cpp.o +0 -0
  89. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_base.cxx.o +0 -0
  90. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_io.cpp.o +0 -0
  91. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Parser.cxx.o +0 -0
  92. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Utils.cxx.o +0 -0
  93. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvdense.cpp.o +0 -0
  94. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvode.cpp.o +0 -0
  95. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxKinetics.cxx.o +0 -0
  96. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxMix.cxx.o +0 -0
  97. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dense.cpp.o +0 -0
  98. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dumper.cpp.o +0 -0
  99. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/gases.cpp.o +0 -0
  100. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/input.cpp.o +0 -0
  101. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/integrate.cpp.o +0 -0
  102. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/inverse.cpp.o +0 -0
  103. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/isotopes.cpp.o +0 -0
  104. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/kinetics.cpp.o +0 -0
  105. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/mainsubs.cpp.o +0 -0
  106. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/model.cpp.o +0 -0
  107. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector.cpp.o +0 -0
  108. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector_serial.cpp.o +0 -0
  109. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/parse.cpp.o +0 -0
  110. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/phqalloc.cpp.o +0 -0
  111. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer.cpp.o +0 -0
  112. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer_structures.cpp.o +0 -0
  113. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/prep.cpp.o +0 -0
  114. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/print.cpp.o +0 -0
  115. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/read.cpp.o +0 -0
  116. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/readtr.cpp.o +0 -0
  117. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/runner.cpp.o +0 -0
  118. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sit.cpp.o +0 -0
  119. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/smalldense.cpp.o +0 -0
  120. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/spread.cpp.o +0 -0
  121. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/step.cpp.o +0 -0
  122. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/structures.cpp.o +0 -0
  123. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sundialsmath.cpp.o +0 -0
  124. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tally.cpp.o +0 -0
  125. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tidy.cpp.o +0 -0
  126. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/transport.cpp.o +0 -0
  127. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/utilities.cpp.o +0 -0
  128. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CTestTestfile.cmake +6 -0
  129. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/DartConfiguration.tcl +109 -0
  130. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/cmake_install.cmake +45 -0
  131. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/libIPhreeqc.a +0 -0
  132. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ar-lib +270 -0
  133. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/compile +347 -0
  134. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.guess +1441 -0
  135. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.sub +1813 -0
  136. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/depcomp +791 -0
  137. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/install-sh +508 -0
  138. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ltmain.sh +11156 -0
  139. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/missing +215 -0
  140. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/test-driver +148 -0
  141. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure +23867 -0
  142. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure.ac +136 -0
  143. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Amm.dat +1968 -0
  144. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/CMakeLists.txt +32 -0
  145. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/ColdChem.dat +267 -0
  146. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PHR.dat +158 -0
  147. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PZ.dat +195 -0
  148. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec.v2.dat +12039 -0
  149. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec_v3.dat +12159 -0
  150. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.am +28 -0
  151. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.in +530 -0
  152. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  153. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Tipping_Hurley.dat +4137 -0
  154. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/core10.dat +6824 -0
  155. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/frezchem.dat +634 -0
  156. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/iso.dat +7235 -0
  157. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/llnl.dat +19310 -0
  158. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.dat +5654 -0
  159. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.v4.dat +13212 -0
  160. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc.dat +1972 -0
  161. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc_rates.dat +3158 -0
  162. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/pitzer.dat +1044 -0
  163. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/sit.dat +14348 -0
  164. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/wateq4f.dat +4036 -0
  165. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/CMakeLists.txt +35 -0
  166. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/IPhreeqc.pdf +0 -0
  167. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.am +24 -0
  168. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.in +545 -0
  169. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/NOTICE +51 -0
  170. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_2_1999_manual.pdf +0 -0
  171. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_3_2013_manual.pdf +0 -0
  172. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/README +428 -0
  173. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/RELEASE +7294 -0
  174. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h.html +5096 -0
  175. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h_source.html +389 -0
  176. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp.html +83 -0
  177. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp_source.html +478 -0
  178. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h.html +318 -0
  179. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h_source.html +200 -0
  180. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bc_s.png +0 -0
  181. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bdwn.png +0 -0
  182. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.html +2274 -0
  183. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.png +0 -0
  184. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.html +69 -0
  185. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.png +0 -0
  186. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/closed.png +0 -0
  187. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +68 -0
  188. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.css +1440 -0
  189. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.png +0 -0
  190. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dynsections.js +97 -0
  191. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2blank.png +0 -0
  192. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2doc.png +0 -0
  193. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderclosed.png +0 -0
  194. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderopen.png +0 -0
  195. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2lastnode.png +0 -0
  196. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2link.png +0 -0
  197. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mlastnode.png +0 -0
  198. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mnode.png +0 -0
  199. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2node.png +0 -0
  200. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2plastnode.png +0 -0
  201. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2pnode.png +0 -0
  202. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2splitbar.png +0 -0
  203. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2vertline.png +0 -0
  204. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/index.html +58 -0
  205. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/jquery.js +31 -0
  206. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_f.png +0 -0
  207. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_g.png +0 -0
  208. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_h.png +0 -0
  209. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/open.png +0 -0
  210. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/structVAR.html +143 -0
  211. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_off.png +0 -0
  212. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_on.png +0 -0
  213. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_a.png +0 -0
  214. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_b.png +0 -0
  215. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_h.png +0 -0
  216. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_s.png +0 -0
  217. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tabs.css +60 -0
  218. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/phreeqc3.chm +0 -0
  219. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/CMakeLists.txt +11 -0
  220. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.am +88 -0
  221. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.in +696 -0
  222. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/CMakeLists.txt +1 -0
  223. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt +35 -0
  224. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt.in +21 -0
  225. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/README.txt +44 -0
  226. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/advect.c +101 -0
  227. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/ic +17 -0
  228. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/phreeqc.dat +1579 -0
  229. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/CMakeLists.txt +10 -0
  230. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/README.txt +3 -0
  231. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/CMakeLists.txt +9 -0
  232. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/phreeqc.dat +1582 -0
  233. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/runphreeqc.xls +0 -0
  234. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/withcallback.xls +0 -0
  235. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/CMakeLists.txt +11 -0
  236. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/Gypsum.py +52 -0
  237. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/parallel_advect.py +465 -0
  238. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/phreeqc.dat +1582 -0
  239. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/pitzer.dat +790 -0
  240. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/wateq4f.dat +3846 -0
  241. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/CMakeLists.txt +1 -0
  242. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt +35 -0
  243. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt.in +20 -0
  244. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/README.txt +45 -0
  245. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/advect.cpp +110 -0
  246. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/ic +17 -0
  247. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/phreeqc.dat +1579 -0
  248. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/CMakeLists.txt +1 -0
  249. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt +44 -0
  250. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt.in +24 -0
  251. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/README.txt +45 -0
  252. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/advect.F90 +102 -0
  253. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/ic +17 -0
  254. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/phreeqc.dat +1579 -0
  255. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt +26 -0
  256. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt.in +20 -0
  257. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/README.txt +37 -0
  258. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/ex2 +26 -0
  259. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/main.cpp +20 -0
  260. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/phreeqc.dat +1837 -0
  261. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/post-install.cmake.in +7 -0
  262. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/CMakeLists.txt +185 -0
  263. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.cpp +171 -0
  264. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.h +34 -0
  265. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.am +18 -0
  266. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.in +466 -0
  267. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestCVar.cpp +9 -0
  268. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqc.cpp +4901 -0
  269. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqcLib.cpp +4644 -0
  270. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestSelectedOutput.cpp +669 -0
  271. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestVar.cpp +10 -0
  272. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/conv_fail.in +11 -0
  273. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/dump +42 -0
  274. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/iso.dat +7231 -0
  275. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/kinn20140218 +349 -0
  276. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/missing_e.dat +1556 -0
  277. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch +105 -0
  278. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch_no_set +102 -0
  279. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.90a6449 +1935 -0
  280. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.old +1556 -0
  281. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/libtool.m4 +8388 -0
  282. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltoptions.m4 +437 -0
  283. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltsugar.m4 +124 -0
  284. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltversion.m4 +23 -0
  285. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/lt~obsolete.m4 +99 -0
  286. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/resource.h +14 -0
  287. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.cpp +401 -0
  288. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.hxx +77 -0
  289. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CVar.hxx +162 -0
  290. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Debug.h +12 -0
  291. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/ErrorReporter.hxx +70 -0
  292. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.cpp +1889 -0
  293. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f.inc +91 -0
  294. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f90.inc +603 -0
  295. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.h +2182 -0
  296. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.hpp +1027 -0
  297. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcCallbacks.h +19 -0
  298. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcF.f +653 -0
  299. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcLib.cpp +1098 -0
  300. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface.F90 +1283 -0
  301. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.cpp +535 -0
  302. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.h +162 -0
  303. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.am +210 -0
  304. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.in +1294 -0
  305. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/README.Fortran +17 -0
  306. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.c +84 -0
  307. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.h +152 -0
  308. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Version.h +36 -0
  309. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fimpl.h +282 -0
  310. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.cpp +646 -0
  311. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.h +163 -0
  312. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap1.cpp +24 -0
  313. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap2.cpp +24 -0
  314. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap3.cpp +24 -0
  315. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap4.cpp +24 -0
  316. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap5.cpp +24 -0
  317. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap6.cpp +25 -0
  318. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap7.cpp +25 -0
  319. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap8.cpp +24 -0
  320. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.cpp +225 -0
  321. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.h +59 -0
  322. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.cpp +1382 -0
  323. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.h +444 -0
  324. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.cpp +42 -0
  325. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.h +79 -0
  326. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.cpp +41 -0
  327. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.h +28 -0
  328. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.cxx +398 -0
  329. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.h +117 -0
  330. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.cxx +466 -0
  331. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.h +74 -0
  332. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.h +1184 -0
  333. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.resX +36 -0
  334. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.cxx +265 -0
  335. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.h +59 -0
  336. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.cxx +659 -0
  337. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.h +103 -0
  338. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.cxx +40 -0
  339. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.h +53 -0
  340. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.cxx +202 -0
  341. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.h +138 -0
  342. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.cxx +318 -0
  343. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.h +81 -0
  344. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NA.h +1 -0
  345. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.cxx +537 -0
  346. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.h +66 -0
  347. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.cxx +190 -0
  348. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.h +67 -0
  349. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.cpp +8350 -0
  350. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.h +572 -0
  351. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PHRQ_io_output.cpp +411 -0
  352. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.cxx +375 -0
  353. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.h +70 -0
  354. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.cxx +441 -0
  355. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.h +83 -0
  356. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.cpp +2087 -0
  357. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.h +2164 -0
  358. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp +242 -0
  359. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.h +104 -0
  360. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.cxx +417 -0
  361. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.h +43 -0
  362. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.cxx +284 -0
  363. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.h +57 -0
  364. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ReadClass.cxx +1150 -0
  365. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.cxx +609 -0
  366. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.h +128 -0
  367. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.cxx +317 -0
  368. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.h +59 -0
  369. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.cxx +297 -0
  370. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.h +66 -0
  371. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.cpp +115 -0
  372. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.h +209 -0
  373. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.cxx +213 -0
  374. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.h +42 -0
  375. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.cxx +1795 -0
  376. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.h +154 -0
  377. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.cxx +333 -0
  378. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.h +85 -0
  379. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.cxx +1507 -0
  380. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.h +141 -0
  381. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.cpp +358 -0
  382. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.h +81 -0
  383. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.cxx +837 -0
  384. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.h +108 -0
  385. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.cxx +617 -0
  386. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.h +137 -0
  387. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.cxx +509 -0
  388. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.h +70 -0
  389. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.cxx +103 -0
  390. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.h +89 -0
  391. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.cxx +423 -0
  392. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.h +42 -0
  393. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.cpp +78 -0
  394. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.h +159 -0
  395. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.cpp +32 -0
  396. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.h +39 -0
  397. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ZedGraph.dll +0 -0
  398. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/advection.cpp +140 -0
  399. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/basicsubs.cpp +4333 -0
  400. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cl1.cpp +881 -0
  401. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.cxx +117 -0
  402. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.h +48 -0
  403. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_exports.h +20 -0
  404. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.cpp +914 -0
  405. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.h +207 -0
  406. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.cxx +1331 -0
  407. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.h +310 -0
  408. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.cxx +263 -0
  409. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.h +29 -0
  410. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/phrqtype.h +18 -0
  411. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.cpp +566 -0
  412. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.h +267 -0
  413. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.cpp +3939 -0
  414. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.h +940 -0
  415. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.cxx +617 -0
  416. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.h +78 -0
  417. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.cxx +154 -0
  418. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.h +58 -0
  419. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.cpp +175 -0
  420. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.h +341 -0
  421. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.cpp +277 -0
  422. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.h +60 -0
  423. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/gases.cpp +748 -0
  424. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/global_structures.h +1672 -0
  425. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/input.cpp +133 -0
  426. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/integrate.cpp +1219 -0
  427. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/inverse.cpp +5135 -0
  428. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/isotopes.cpp +1813 -0
  429. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/kinetics.cpp +3180 -0
  430. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/mainsubs.cpp +2320 -0
  431. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/model.cpp +5843 -0
  432. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.cpp +272 -0
  433. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.h +485 -0
  434. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.cpp +1032 -0
  435. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.h +369 -0
  436. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/parse.cpp +1044 -0
  437. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.cpp +316 -0
  438. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.h +47 -0
  439. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer.cpp +2709 -0
  440. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer_structures.cpp +225 -0
  441. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/prep.cpp +6267 -0
  442. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/print.cpp +3673 -0
  443. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/read.cpp +10245 -0
  444. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/readtr.cpp +1495 -0
  445. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.cpp +158 -0
  446. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.h +33 -0
  447. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sit.cpp +1684 -0
  448. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.cpp +324 -0
  449. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.h +261 -0
  450. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/spread.cpp +1309 -0
  451. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/step.cpp +1566 -0
  452. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/structures.cpp +3381 -0
  453. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.cpp +133 -0
  454. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.h +162 -0
  455. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialstypes.h +183 -0
  456. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tally.cpp +1288 -0
  457. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tidy.cpp +5600 -0
  458. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/transport.cpp +6403 -0
  459. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/utilities.cpp +1339 -0
  460. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/thread.h +64 -0
  461. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/CMakeLists.txt +133 -0
  462. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.am +45 -0
  463. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.in +1128 -0
  464. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/ex2.in +26 -0
  465. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main.f90 +31 -0
  466. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main77.f +6 -0
  467. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main_fortran.cxx +8 -0
  468. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/phreeqc.dat.in +1556 -0
  469. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_c.c +148 -0
  470. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_cxx.cxx +152 -0
  471. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_f90.F90 +328 -0
  472. pyEQL/phreeqc/iphreeqc_wrapper.cpp +75 -0
  473. pyEQL/phreeqc/solution.py +74 -0
  474. pyEQL/phreeqc/var.py +50 -0
  475. pyEQL/presets/Ringers lactate.yaml +20 -0
  476. pyEQL/presets/__init__.py +17 -0
  477. pyEQL/presets/normal saline.yaml +17 -0
  478. pyEQL/presets/rainwater.yaml +17 -0
  479. pyEQL/presets/seawater.yaml +29 -0
  480. pyEQL/presets/urine.yaml +26 -0
  481. pyEQL/presets/wastewater.yaml +21 -0
  482. pyEQL/py.typed +0 -0
  483. pyEQL/salt_ion_match.py +112 -0
  484. pyEQL/solute.py +163 -0
  485. pyEQL/solution.py +2714 -0
  486. pyEQL/utils.py +237 -0
  487. pyeql-1.4.0rc9.dist-info/METADATA +130 -0
  488. pyeql-1.4.0rc9.dist-info/RECORD +491 -0
  489. pyeql-1.4.0rc9.dist-info/WHEEL +6 -0
  490. pyeql-1.4.0rc9.dist-info/licenses/AUTHORS.md +21 -0
  491. pyeql-1.4.0rc9.dist-info/licenses/LICENSE.txt +20 -0
@@ -0,0 +1,748 @@
1
+ #include "Phreeqc.h"
2
+ #include "GasPhase.h"
3
+
4
+ #if defined(PHREEQCI_GUI)
5
+ #ifdef _DEBUG
6
+ #define new DEBUG_NEW
7
+ #undef THIS_FILE
8
+ static char THIS_FILE[] = __FILE__;
9
+ #endif
10
+ #endif
11
+
12
+ /* ---------------------------------------------------------------------- */
13
+ int Phreeqc::
14
+ setup_fixed_volume_gas(void)
15
+ /* ---------------------------------------------------------------------- */
16
+ {
17
+ /*
18
+ * Fill in data for gas phase unknown (sum of partial pressures)
19
+ * in unknown structure
20
+ */
21
+ if (use.Get_gas_phase_ptr() == NULL)
22
+ return (OK);
23
+ cxxGasPhase *gas_phase_ptr = use.Get_gas_phase_ptr();
24
+ /*
25
+ * One for each gas component
26
+ */
27
+ gas_unknowns.clear();
28
+ gas_unknown = NULL;
29
+ gas_phase_ptr->Set_total_moles(0);
30
+ for (size_t i = 0; i < gas_phase_ptr->Get_gas_comps().size(); i++)
31
+ {
32
+ const cxxGasComp *comp_ptr = &(gas_phase_ptr->Get_gas_comps()[i]);
33
+ int j;
34
+ class phase *phase_ptr = phase_bsearch(comp_ptr->Get_phase_name().c_str(), &j, FALSE);
35
+ x[count_unknowns]->type = GAS_MOLES;
36
+ x[count_unknowns]->description = phase_ptr->name;
37
+ x[count_unknowns]->phase = phase_ptr;
38
+ x[count_unknowns]->moles = comp_ptr->Get_moles();
39
+ if (x[count_unknowns]->moles <= 0)
40
+ {
41
+ x[count_unknowns]->moles = MIN_TOTAL;
42
+ }
43
+ x[count_unknowns]->ln_moles = log(x[count_unknowns]->moles);
44
+ gas_unknowns.push_back(x[count_unknowns]);
45
+ gas_phase_ptr->Set_total_moles(gas_phase_ptr->Get_total_moles() + x[count_unknowns]->moles);
46
+ x[count_unknowns]->phase->moles_x = x[count_unknowns]->moles;
47
+ count_unknowns++;
48
+ }
49
+ if (gas_unknowns.size() > 0)
50
+ {
51
+ gas_unknown = gas_unknowns[0];
52
+ }
53
+
54
+ return (OK);
55
+ }
56
+
57
+ /* ---------------------------------------------------------------------- */
58
+ int Phreeqc::
59
+ build_fixed_volume_gas(void)
60
+ /* ---------------------------------------------------------------------- */
61
+ {
62
+ /*
63
+ * Put coefficients into lists to sum iaps to test for equilibrium
64
+ * Put coefficients into lists to build jacobian for
65
+ * sum of partial pressures equation and
66
+ * mass balance equations for elements contained in gases
67
+ */
68
+ size_t row, col;
69
+ class master *master_ptr;
70
+ class rxn_token *rxn_ptr;
71
+ class unknown *unknown_ptr;
72
+ LDBLE coef, coef_elt;
73
+
74
+ if (gas_unknown == NULL)
75
+ return (OK);
76
+ cxxGasPhase *gas_phase_ptr = use.Get_gas_phase_ptr();
77
+ for (size_t i = 0; i < gas_phase_ptr->Get_gas_comps().size(); i++)
78
+ {
79
+ const cxxGasComp *comp_ptr = &(gas_phase_ptr->Get_gas_comps()[i]);
80
+ int j;
81
+ class phase *phase_ptr = phase_bsearch(comp_ptr->Get_phase_name().c_str(), &j, FALSE);
82
+ /*
83
+ * Determine elements in gas component
84
+ */
85
+ count_elts = 0;
86
+ paren_count = 0;
87
+ if (phase_ptr->rxn_x.token.size() == 0)
88
+ continue;
89
+ add_elt_list(phase_ptr->next_elt, 1.0);
90
+ #define COMBINE
91
+ #ifdef COMBINE
92
+ change_hydrogen_in_elt_list(0);
93
+ #endif
94
+ /*
95
+ * Build mass balance sums for each element in gas
96
+ */
97
+ if (debug_prep == TRUE)
98
+ {
99
+ output_msg(sformatf( "\n\tMass balance summations %s.\n",
100
+ phase_ptr->name));
101
+ }
102
+
103
+ /* All elements in gas */
104
+ for (j = 0; j < (int) count_elts; j++)
105
+ {
106
+ unknown_ptr = NULL;
107
+ if (strcmp(elt_list[j].elt->name, "H") == 0)
108
+ {
109
+ unknown_ptr = mass_hydrogen_unknown;
110
+ }
111
+ else if (strcmp(elt_list[j].elt->name, "O") == 0)
112
+ {
113
+ unknown_ptr = mass_oxygen_unknown;
114
+ }
115
+ else
116
+ {
117
+ if (elt_list[j].elt->primary->in == TRUE)
118
+ {
119
+ unknown_ptr = elt_list[j].elt->primary->unknown;
120
+ }
121
+ else if (elt_list[j].elt->primary->s->secondary != NULL)
122
+ {
123
+ unknown_ptr =
124
+ elt_list[j].elt->primary->s->secondary->unknown;
125
+ }
126
+ }
127
+ if (unknown_ptr != NULL)
128
+ {
129
+ coef = elt_list[j].coef;
130
+ store_mb(&(gas_unknowns[i]->moles), &(unknown_ptr->f), coef);
131
+ if (debug_prep == TRUE)
132
+ {
133
+ output_msg(sformatf( "\t\t%-24s%10.3f\n",
134
+ unknown_ptr->description, (double) coef));
135
+ }
136
+ }
137
+ }
138
+ if (gas_phase_ptr->Get_type() == cxxGasPhase::GP_PRESSURE)
139
+ {
140
+ /* Total pressure of gases */
141
+ store_mb(&(phase_ptr->p_soln_x), &(gas_unknown->f),
142
+ 1.0);
143
+ }
144
+ /*
145
+ * Build jacobian sums for mass balance equations
146
+ */
147
+ if (debug_prep == TRUE)
148
+ {
149
+ output_msg(sformatf( "\n\tJacobian summations %s.\n\n",
150
+ phase_ptr->name));
151
+ }
152
+ for (j = 0; j < (int) count_elts; j++)
153
+ {
154
+ unknown_ptr = NULL;
155
+ if (strcmp(elt_list[j].elt->name, "H") == 0)
156
+ {
157
+ unknown_ptr = mass_hydrogen_unknown;
158
+ }
159
+ else if (strcmp(elt_list[j].elt->name, "O") == 0)
160
+ {
161
+ unknown_ptr = mass_oxygen_unknown;
162
+ }
163
+ else
164
+ {
165
+ if (elt_list[j].elt->primary->in == TRUE)
166
+ {
167
+ unknown_ptr = elt_list[j].elt->primary->unknown;
168
+ }
169
+ else if (elt_list[j].elt->primary->s->secondary != NULL)
170
+ {
171
+ unknown_ptr =
172
+ elt_list[j].elt->primary->s->secondary->unknown;
173
+ }
174
+ }
175
+ if (unknown_ptr == NULL)
176
+ {
177
+ continue;
178
+ }
179
+ if (debug_prep == TRUE)
180
+ {
181
+ output_msg(sformatf( "\n\t%s.\n",
182
+ unknown_ptr->description));
183
+ }
184
+ row = unknown_ptr->number * (count_unknowns + 1);
185
+ coef_elt = elt_list[j].coef;
186
+ for (rxn_ptr = &phase_ptr->rxn_x.token[0] + 1;
187
+ rxn_ptr->s != NULL; rxn_ptr++)
188
+ {
189
+
190
+ if (rxn_ptr->s->secondary != NULL
191
+ && rxn_ptr->s->secondary->in == TRUE)
192
+ {
193
+ master_ptr = rxn_ptr->s->secondary;
194
+ }
195
+ else if (rxn_ptr->s->primary != NULL && rxn_ptr->s->primary->in == TRUE)
196
+ {
197
+ master_ptr = rxn_ptr->s->primary;
198
+ }
199
+ else
200
+ {
201
+ master_ptr = master_bsearch_primary(rxn_ptr->s->name);
202
+ master_ptr->s->la = -999.0;
203
+ }
204
+ if (debug_prep == TRUE)
205
+ {
206
+ output_msg(sformatf( "\t\t%s\n",
207
+ master_ptr->s->name));
208
+ }
209
+ if (master_ptr->unknown == NULL)
210
+ {
211
+ continue;
212
+ }
213
+ if (master_ptr->in == FALSE)
214
+ {
215
+ error_string = sformatf(
216
+ "Element, %s, in phase, %s, is not in model.",
217
+ master_ptr->elt->name, phase_ptr->name);
218
+ error_msg(error_string, CONTINUE);
219
+ input_error++;
220
+ }
221
+ col = master_ptr->unknown->number;
222
+ coef = coef_elt * rxn_ptr->coef;
223
+ if (debug_prep == TRUE)
224
+ {
225
+ output_msg(sformatf( "\t\t%-24s%10.3f\t%d\t%d",
226
+ master_ptr->s->name, (double) coef,
227
+ row / (count_unknowns + 1), col));
228
+ }
229
+ store_jacob(&(gas_unknowns[i]->moles),
230
+ &(my_array[(size_t)row + (size_t)col]), coef);
231
+ }
232
+ if (gas_phase_ptr->Get_type() == cxxGasPhase::GP_PRESSURE)
233
+ {
234
+ /* derivative wrt total moles of gas */
235
+ if (debug_prep == TRUE)
236
+ {
237
+ output_msg(sformatf( "\t\t%-24s%10.3f\t%d\t%d",
238
+ "gas moles", (double) elt_list[j].coef,
239
+ row / (count_unknowns + 1),
240
+ gas_unknown->number));
241
+ }
242
+ store_jacob(&(phase_ptr->fraction_x),
243
+ &(my_array[(size_t)row + (size_t)gas_unknown->number]), coef_elt);
244
+ }
245
+ }
246
+ /*
247
+ * Build jacobian sums for sum of partial pressures equation
248
+ */
249
+ if (gas_phase_ptr->Get_type() != cxxGasPhase::GP_PRESSURE)
250
+ continue;
251
+ if (debug_prep == TRUE)
252
+ {
253
+ output_msg(sformatf( "\n\tPartial pressure eqn %s.\n\n",
254
+ phase_ptr->name));
255
+ }
256
+ unknown_ptr = gas_unknown;
257
+ row = unknown_ptr->number * (count_unknowns + 1);
258
+ for (rxn_ptr = &phase_ptr->rxn_x.token[0] + 1; rxn_ptr->s != NULL; rxn_ptr++)
259
+ {
260
+ if (rxn_ptr->s != s_eminus && rxn_ptr->s->in == FALSE)
261
+ {
262
+ error_string = sformatf(
263
+ "Element in species, %s, in phase, %s, is not in model.",
264
+ rxn_ptr->s->name, phase_ptr->name);
265
+ warning_msg(error_string);
266
+ }
267
+ else
268
+ {
269
+ if (rxn_ptr->s->secondary != NULL
270
+ && rxn_ptr->s->secondary->in == TRUE)
271
+ {
272
+ master_ptr = rxn_ptr->s->secondary;
273
+ }
274
+ else if (rxn_ptr->s->primary != NULL && rxn_ptr->s->primary->in == TRUE)
275
+ {
276
+ master_ptr = rxn_ptr->s->primary;
277
+ }
278
+ else
279
+ {
280
+ master_ptr = master_bsearch_primary(rxn_ptr->s->name);
281
+ if (master_ptr && master_ptr->s)
282
+ {
283
+ master_ptr->s->la = -999.0;
284
+ }
285
+ }
286
+
287
+ if (master_ptr == NULL)
288
+ {
289
+ error_string = sformatf(
290
+ "Master species for %s, in phase, %s, is not in model.",
291
+ rxn_ptr->s->name, phase_ptr->name);
292
+ error_msg(error_string, CONTINUE);
293
+ input_error++;
294
+ }
295
+ else
296
+ {
297
+ if (debug_prep == TRUE)
298
+ {
299
+ output_msg(sformatf( "\t\t%s\n", master_ptr->s->name));
300
+ }
301
+ if (master_ptr->unknown == NULL)
302
+ {
303
+ assert(false);
304
+ continue;
305
+ }
306
+ if (master_ptr->in == FALSE)
307
+ {
308
+ error_string = sformatf(
309
+ "Element, %s, in phase, %s, is not in model.",
310
+ master_ptr->elt->name, phase_ptr->name);
311
+ warning_msg(error_string);
312
+ }
313
+ col = master_ptr->unknown->number;
314
+ coef = rxn_ptr->coef;
315
+ if (debug_prep == TRUE)
316
+ {
317
+ output_msg(sformatf( "\t\t%-24s%10.3f\t%d\t%d",
318
+ master_ptr->s->name, (double) coef,
319
+ row / (count_unknowns + 1), col));
320
+ }
321
+ store_jacob(&(phase_ptr->p_soln_x), &(my_array[(size_t)row + (size_t)col]), coef);
322
+ }
323
+ }
324
+ }
325
+ }
326
+ return (OK);
327
+ }
328
+ /* ---------------------------------------------------------------------- */
329
+ LDBLE Phreeqc::
330
+ calc_PR(void)
331
+ /* ---------------------------------------------------------------------- */
332
+ /* Calculate fugacity and fugacity coefficient for gas pressures if critical T and P
333
+ are defined.
334
+ 1) Solve molar volume V_m or total pressure P from Peng-Robinson's EOS:
335
+ P = R * T / (V_m - b) - a * aa / (V_m^2 + 2 * b * V_m - b^2)
336
+ a = 0.457235 * (R * T_c)^2 / P_c
337
+ b = 0.077796 * R * T_c / P_c
338
+ aa = (1 + kk * (1 - T_r^0.5))^2
339
+ kk = 0.37464 + 1.54226 * omega - 0.26992 * omega^2
340
+ T_r = T / T_c
341
+ multicomponent gas phase:
342
+ use: b_sum = Sum(x_i * b), x_i is mole-fraction
343
+ a_aa_sum = Sum_i( Sum_j(x_i * x_j * (a_i * aa_i * a_j * aa_j)^0.5) )
344
+ 2) Find the fugacity coefficient phi for gas i:
345
+ log(phi_i) = B_ratio * (z - 1) - log(z - B) + A / (2.8284 * B) * (B_ratio - 2 / a_aa_sum * a_aa_sum2) *\
346
+ log((z + 2.4142 * B) / (z - 0.4142 * B))
347
+ B_ratio = b_i / b_sum
348
+ A = a_aa_sum * P / R_TK^2
349
+ B = b_sum * P / R_TK
350
+ a_aa_sum2 = Sum_j(x_j * (a_aa_i * a_aa_j)^0.5
351
+ 3) correct the solubility of gas i with:
352
+ pr_si_f = log10(phi_i) - Delta_V_i * (P - 1) / (2.303 * R * TK);
353
+ */
354
+ {
355
+ LDBLE T_c, P_c;
356
+ LDBLE A, B, B_r, /*b2,*/ kk, oo, a_aa, T_r;
357
+ LDBLE m_sum, /*b_sum, a_aa_sum,*/ a_aa_sum2;
358
+ LDBLE phi;
359
+ LDBLE /*R_TK,*/ R = R_LITER_ATM; /* L atm / (K mol) */
360
+ LDBLE r3[4], r3_12, rp, rp3, rq, rz, ri, ri1, one_3 = 0.33333333333333333;
361
+ LDBLE disct, vinit, v1, ddp, dp_dv, dp_dv2;
362
+ int it;
363
+ class phase *phase_ptr;
364
+ LDBLE V_m = 0, P = 0;
365
+
366
+ LDBLE TK = tk_x;
367
+ bool halved;
368
+ R_TK = R * TK;
369
+ m_sum = b_sum = a_aa_sum = 0.0;
370
+ size_t i;
371
+
372
+ if (gas_unknowns.size() == 0)
373
+ {
374
+ error_msg("No gas unknowns.", STOP);
375
+ }
376
+ cxxGasPhase * gas_phase_ptr = use.Get_gas_phase_ptr();
377
+
378
+ for (i = 0; i < gas_unknowns.size(); i++)
379
+ {
380
+ m_sum += gas_unknowns[i]->moles;
381
+ phase_ptr = gas_unknowns[i]->phase;
382
+ if (phase_ptr->t_c == 0.0 || phase_ptr->p_c == 0.0)
383
+ error_msg("Cannot calculate a mixture of ideal and Peng_Robinson gases,\n please define Tc and Pc for the active gases in PHASES.", STOP);
384
+ //continue;
385
+ if (!phase_ptr->pr_a)
386
+ {
387
+ T_c = phase_ptr->t_c;
388
+ P_c = phase_ptr->p_c;
389
+ phase_ptr->pr_a = 0.457235 * R * R * T_c * T_c / P_c;
390
+ phase_ptr->pr_b = 0.077796 * R * T_c / P_c;
391
+ T_r = TK / T_c;
392
+ oo = phase_ptr->omega;
393
+ kk = 0.37464 + oo * (1.54226 - 0.26992 * oo);
394
+ phase_ptr->pr_alpha = pow(1 + kk * (1 - sqrt(T_r)), 2);
395
+ phase_ptr->pr_tk = TK;
396
+ phase_ptr->pr_in = true;
397
+ }
398
+ if (phase_ptr->pr_tk != TK)
399
+ {
400
+ T_r = TK / phase_ptr->t_c;
401
+ oo = phase_ptr->omega;
402
+ kk = 0.37464 + oo * (1.54226 - 0.26992 * oo);
403
+ phase_ptr->pr_alpha = pow(1 + kk * (1 - sqrt(T_r)), 2);
404
+ phase_ptr->pr_tk = TK;
405
+ phase_ptr->pr_in = true;
406
+ }
407
+ }
408
+ if (m_sum == 0)
409
+ return (OK);
410
+ gas_phase_ptr->Set_v_m(gas_phase_ptr->Get_volume() / m_sum);
411
+ for (i = 0; i < gas_unknowns.size(); i++)
412
+ {
413
+ phase_ptr = gas_unknowns[i]->phase;
414
+ phase_ptr->fraction_x = gas_unknowns[i]->moles / m_sum; // phase_ptr->fraction_x updated
415
+ }
416
+
417
+ for (i = 0; i < gas_unknowns.size(); i++)
418
+ {
419
+ a_aa_sum2 = 0.0;
420
+ phase_ptr = gas_unknowns[i]->phase;
421
+ //if (phase_ptr->t_c == 0.0 || phase_ptr->p_c == 0.0)
422
+ // continue;
423
+ b_sum += phase_ptr->fraction_x * phase_ptr->pr_b;
424
+ size_t i1;
425
+ class phase *phase_ptr1;
426
+ for (i1 = 0; i1 < gas_unknowns.size(); i1++)
427
+ {
428
+ phase_ptr1 = gas_unknowns[i1]->phase;
429
+ //if (phase_ptr1->t_c == 0.0 || phase_ptr1->p_c == 0.0)
430
+ // continue;
431
+ if (phase_ptr1->fraction_x == 0)
432
+ continue;
433
+ a_aa = sqrt(phase_ptr->pr_a * phase_ptr->pr_alpha *
434
+ phase_ptr1->pr_a * phase_ptr1->pr_alpha);
435
+ a_aa *= calc_gas_binary_parameter(phase_ptr->name, phase_ptr1->name);
436
+ //if (!strcmp(phase_ptr->name, "H2O(g)"))
437
+ //{
438
+ // if (!strcmp(phase_ptr1->name, "CO2(g)"))
439
+ // a_aa *= 0.81; // Soreide and Whitson, 1992, FPE 77, 217
440
+ // else if (!strcmp(phase_ptr1->name, "H2S(g)") || !strcmp(phase_ptr1->name, "H2Sg(g)"))
441
+ // a_aa *= 0.81;
442
+ // else if (!strcmp(phase_ptr1->name, "CH4(g)") || !strcmp(phase_ptr1->name, "Mtg(g)") || !strcmp(phase_ptr1->name, "Methane(g)"))
443
+ // a_aa *= 0.51;
444
+ // else if (!strcmp(phase_ptr1->name, "N2(g)") || !strcmp(phase_ptr1->name, "Ntg(g)"))
445
+ // a_aa *= 0.51;
446
+ // else if (!strcmp(phase_ptr1->name, "Ethane(g)"))
447
+ // a_aa *= 0.51;
448
+ // else if (!strcmp(phase_ptr1->name, "Propane(g)"))
449
+ // a_aa *= 0.45;
450
+ //}
451
+ //if (!strcmp(phase_ptr1->name, "H2O(g)"))
452
+ //{
453
+ // if (!strcmp(phase_ptr->name, "CO2(g)"))
454
+ // a_aa *= 0.81;
455
+ // else if (!strcmp(phase_ptr->name, "H2S(g)") || !strcmp(phase_ptr->name, "H2Sg(g)"))
456
+ // a_aa *= 0.81;
457
+ // else if (!strcmp(phase_ptr->name, "CH4(g)") || !strcmp(phase_ptr->name, "Mtg(g)") || !strcmp(phase_ptr->name, "Methane(g)"))
458
+ // a_aa *= 0.51;
459
+ // else if (!strcmp(phase_ptr->name, "N2(g)") || !strcmp(phase_ptr->name, "Ntg(g)"))
460
+ // a_aa *= 0.51;
461
+ // else if (!strcmp(phase_ptr->name, "Ethane(g)"))
462
+ // a_aa *= 0.51;
463
+ // else if (!strcmp(phase_ptr->name, "Propane(g)"))
464
+ // a_aa *= 0.45;
465
+ //}
466
+ a_aa_sum += phase_ptr->fraction_x * phase_ptr1->fraction_x * a_aa;
467
+ a_aa_sum2 += phase_ptr1->fraction_x * a_aa;
468
+ }
469
+ phase_ptr->pr_aa_sum2 = a_aa_sum2;
470
+ }
471
+ b2 = b_sum * b_sum;
472
+
473
+ if (gas_phase_ptr->Get_type() == cxxGasPhase::GP_VOLUME)
474
+ {
475
+ V_m = gas_phase_ptr->Get_volume() / m_sum;
476
+ P = 0.0;
477
+ while (P <= 0)
478
+ {
479
+ P = R_TK / (V_m - b_sum) - a_aa_sum / (V_m * (V_m + 2 * b_sum) - b2);
480
+ if (P <= 0.0)
481
+ {
482
+ V_m *= 2.0;
483
+ //a_aa_sum /= 2.0;
484
+ }
485
+ }
486
+ if (iterations > 0 && P < 150 && V_m < 1.01)
487
+ {
488
+ // check for 3-roots...
489
+ r3[1] = b_sum - R_TK / P;
490
+ r3[2] = -3.0 * b2 + (a_aa_sum - R_TK * 2.0 * b_sum) / P;
491
+ r3[3] = b2 * b_sum + (R_TK * b2 - b_sum * a_aa_sum) / P;
492
+ // the discriminant of the cubic eqn...
493
+ disct = 18. * r3[1] * r3[2] * r3[3] -
494
+ 4. * pow(r3[1], 3) * r3[3] +
495
+ r3[1] * r3[1] * r3[2] * r3[2] -
496
+ 4. * pow(r3[2], 3) -
497
+ 27. * r3[3] * r3[3];
498
+ if (disct > 0)
499
+ {
500
+ // 3-roots, find the largest P...
501
+ it = 0;
502
+ halved = false;
503
+ ddp = 1e-9;
504
+ v1 = vinit = 0.729;
505
+ dp_dv = f_Vm(v1, this);
506
+ while (fabs(dp_dv) > 1e-11 && it < 40)
507
+ {
508
+ it +=1;
509
+ dp_dv2 = f_Vm(v1 - ddp, this);
510
+ v1 -= (dp_dv * ddp / (dp_dv - dp_dv2));
511
+ if (!halved && (v1 > vinit || v1 < 0.03))
512
+ {
513
+ if (vinit > 0.329)
514
+ vinit -= 0.1;
515
+ else
516
+ vinit -=0.05;
517
+ if (vinit < 0.03)
518
+ {
519
+ vinit = halve(f_Vm, 0.03, 1.0, 1e-3);
520
+ if (f_Vm(vinit - 2e-3, this) < 0)
521
+ vinit = halve(f_Vm, vinit + 2e-3, 1.0, 1e-3);
522
+ halved = true;
523
+ }
524
+ v1 = vinit;
525
+ }
526
+ dp_dv = f_Vm(v1, this);
527
+ if (fabs(dp_dv) < 1e-11)
528
+ {
529
+ if (f_Vm(v1 - 1e-4, this) < 0)
530
+ {
531
+ v1 = halve(f_Vm, v1 + 1e-4, 1.0, 1e-3);
532
+ dp_dv = f_Vm(v1, this);
533
+ }
534
+ }
535
+ }
536
+ if (it == 40)
537
+ {
538
+ // accept a (possible) whobble in the curve...
539
+ // error_msg("No convergence when calculating P in Peng-Robinson.", STOP);
540
+ }
541
+ if (V_m < v1 && it < 40)
542
+ P = R_TK / (v1 - b_sum) - a_aa_sum / (v1 * (v1 + 2 * b_sum) - b2);
543
+ }
544
+ }
545
+ if (P <= 0) // iterations = -1
546
+ P = 1.;
547
+ gas_phase_ptr->Set_total_p(P); // phase_ptr->total_p updated
548
+ gas_phase_ptr->Set_v_m(V_m);
549
+ }
550
+ else
551
+ {
552
+ assert(false);
553
+ P = gas_phase_ptr->Get_total_p();
554
+ r3[1] = b_sum - R_TK / P;
555
+ r3_12 = r3[1] * r3[1];
556
+ r3[2] = -3.0 * b2 + (a_aa_sum - R_TK * 2.0 * b_sum) / P;
557
+ r3[3] = b2 * b_sum + (R_TK * b2 - b_sum * a_aa_sum) / P;
558
+ // solve t^3 + rp*t + rq = 0.
559
+ // molar volume V_m = t - r3[1] / 3...
560
+ rp = r3[2] - r3_12 / 3;
561
+ rp3 = rp * rp * rp;
562
+ rq = (2.0 * r3_12 * r3[1] - 9.0 * r3[1] * r3[2]) / 27 + r3[3];
563
+ rz = rq * rq / 4 + rp3 / 27;
564
+ if (rz >= 0) // Cardono's method...
565
+ {
566
+ ri = sqrt(rz);
567
+ if (ri + rq / 2 <= 0)
568
+ {
569
+ V_m = pow(ri - rq / 2, one_3) + pow(- ri - rq / 2, one_3) - r3[1] / 3;
570
+ }
571
+ else
572
+ {
573
+ ri = - pow(ri + rq / 2, one_3);
574
+ V_m = ri - rp / (3.0 * ri) - r3[1] / 3;
575
+ }
576
+ }
577
+ else // use complex plane...
578
+ {
579
+ ri = sqrt(- rp3 / 27); // rp < 0
580
+ ri1 = acos(- rq / 2 / ri);
581
+ V_m = 2.0 * pow(ri, one_3) * cos(ri1 / 3) - r3[1] / 3;
582
+ }
583
+ gas_phase_ptr->Set_v_m(V_m); // phase_ptr->fraction_x updated
584
+ }
585
+ // calculate the fugacity coefficients...
586
+ for (i = 0; i < gas_unknowns.size(); i++)
587
+ {
588
+ phase_ptr = gas_unknowns[i]->phase;
589
+ if (phase_ptr->fraction_x == 0.0)
590
+ {
591
+ phase_ptr->pr_p = 0;
592
+ phase_ptr->pr_phi = 1;
593
+ phase_ptr->pr_si_f = 0.0;
594
+ //phase_ptr->logk[vm0] = 0.0; // ***
595
+ continue;
596
+ }
597
+ phase_ptr->pr_p = phase_ptr->fraction_x * P;
598
+
599
+ //if (phase_ptr->t_c == 0.0 || phase_ptr->p_c == 0.0)
600
+ //{
601
+ // phase_ptr->pr_phi = 1;
602
+ // continue;
603
+ //}
604
+ rz = P * V_m / R_TK;
605
+ A = a_aa_sum * P / (R_TK * R_TK);
606
+ B = b_sum * P / R_TK;
607
+ B_r = phase_ptr->pr_b / b_sum;
608
+ if (rz > B)
609
+ {
610
+ phi = B_r * (rz - 1) - log(rz - B) + A / (2.828427 * B) * (B_r - 2.0 * phase_ptr->pr_aa_sum2 / a_aa_sum) *
611
+ log((rz + 2.41421356 * B) / (rz - 0.41421356 * B));
612
+ phi = (phi > 4.44 ? 4.44 : (phi < -4.6 ? -4.6 : phi));
613
+ }
614
+ else
615
+ phi = -4.6; // fugacity coefficient = 0.01
616
+ phase_ptr->pr_phi = exp(phi);
617
+ phase_ptr->pr_si_f = phi / LOG_10; // pr_si_f updated
618
+ // ****
619
+ //phase_ptr->logk[vm0] = V_m * 1e3 * phase_ptr->fraction_x;
620
+ phase_ptr->pr_in = true;
621
+ }
622
+ return (V_m);
623
+ }
624
+
625
+ /* ---------------------------------------------------------------------- */
626
+ int Phreeqc::
627
+ calc_fixed_volume_gas_pressures(void)
628
+ /* ---------------------------------------------------------------------- */
629
+ {
630
+ //int n_g = 0;
631
+ LDBLE lp;
632
+ class rxn_token *rxn_ptr;
633
+ class phase *phase_ptr;
634
+ bool PR = false, pr_done = false;
635
+ size_t i;
636
+ /*
637
+ * moles and partial pressures for gases
638
+ */
639
+ if (use.Get_gas_phase_ptr() == NULL)
640
+ return (OK);
641
+ cxxGasPhase *gas_phase_ptr = use.Get_gas_phase_ptr();
642
+ gas_phase_ptr->Set_total_moles(0);
643
+
644
+ for (i = 0; i < gas_unknowns.size(); i++)
645
+ {
646
+ phase_ptr = gas_unknowns[i]->phase;
647
+ if (phase_ptr->in == TRUE)
648
+ {
649
+ if (!PR && phase_ptr->t_c > 0 && phase_ptr->p_c > 0)
650
+ PR = true;
651
+ //n_g++;
652
+ }
653
+ gas_phase_ptr->Set_total_moles(gas_phase_ptr->Get_total_moles() + gas_unknowns[i]->moles);
654
+ }
655
+ if (PR && gas_phase_ptr->Get_total_moles() > 0)
656
+ {
657
+ calc_PR();
658
+ pr_done = true;
659
+ gas_phase_ptr->Set_total_moles(0);
660
+ } else
661
+ {
662
+ gas_phase_ptr->Set_total_p(0);
663
+ gas_phase_ptr->Set_total_moles(0);
664
+ }
665
+ for (i = 0; i < gas_unknowns.size(); i++)
666
+ {
667
+ phase_ptr = gas_unknowns[i]->phase;
668
+ if (phase_ptr->in == TRUE)
669
+ {
670
+ lp = -phase_ptr->lk;
671
+ //lp = -k_calc(phase_ptr->rxn_x.logk, tk_x, use.Get_gas_phase_ptr()->total_p * PASCAL_PER_ATM);
672
+ for (rxn_ptr = &phase_ptr->rxn_x.token[0] + 1; rxn_ptr->s != NULL;
673
+ rxn_ptr++)
674
+ {
675
+ lp += rxn_ptr->s->la * rxn_ptr->coef;
676
+ }
677
+ phase_ptr->p_soln_x = exp(LOG_10 * (lp - phase_ptr->pr_si_f));
678
+
679
+ if (pr_done)
680
+ {
681
+ lp = phase_ptr->p_soln_x / gas_phase_ptr->Get_total_p() *
682
+ gas_phase_ptr->Get_volume() / gas_phase_ptr->Get_v_m();
683
+ phase_ptr->moles_x = lp;
684
+ }
685
+ else
686
+ {
687
+ phase_ptr->moles_x = phase_ptr->p_soln_x * gas_phase_ptr->Get_volume() / (R_LITER_ATM * tk_x);
688
+ gas_phase_ptr->Set_total_p(gas_phase_ptr->Get_total_p() + phase_ptr->p_soln_x);
689
+ }
690
+ gas_phase_ptr->Set_total_moles(gas_phase_ptr->Get_total_moles() + phase_ptr->moles_x);
691
+ }
692
+ else
693
+ {
694
+ phase_ptr->moles_x = 0;
695
+ phase_ptr->fraction_x = 0;
696
+ }
697
+ }
698
+
699
+ return (OK);
700
+ }
701
+ /* ---------------------------------------------------------------------- */
702
+ double Phreeqc::
703
+ calc_gas_binary_parameter(std::string name1, std::string name2) const
704
+ /* ---------------------------------------------------------------------- */
705
+ {
706
+ double f = 1.0;
707
+ std::pair<std::string, std::string> p(name1, name2);
708
+ std::map<std::pair<std::string, std::string>, double>::const_iterator gas_pair_it;
709
+ gas_pair_it = gas_binary_parameters.find(p);
710
+ if (gas_pair_it != gas_binary_parameters.end())
711
+ {
712
+ f = (1.0 - gas_pair_it->second);
713
+ }
714
+ else
715
+ {
716
+ if (!strcmp(name1.c_str(), "H2O(g)"))
717
+ {
718
+ if (!strcmp(name2.c_str(), "CO2(g)"))
719
+ f = 0.81; // Soreide and Whitson, 1992, FPE 77, 217
720
+ else if (!strcmp(name2.c_str(), "H2S(g)") || !strcmp(name2.c_str(), "H2Sg(g)"))
721
+ f = 0.81;
722
+ else if (!strcmp(name2.c_str(), "CH4(g)") || !strcmp(name2.c_str(), "Mtg(g)") || !strcmp(name2.c_str(), "Methane(g)"))
723
+ f = 0.51;
724
+ else if (!strcmp(name2.c_str(), "N2(g)") || !strcmp(name2.c_str(), "Ntg(g)"))
725
+ f = 0.51;
726
+ else if (!strcmp(name2.c_str(), "Ethane(g)"))
727
+ f = 0.51;
728
+ else if (!strcmp(name2.c_str(), "Propane(g)"))
729
+ f = 0.45;
730
+ }
731
+ if (!strcmp(name2.c_str(), "H2O(g)"))
732
+ {
733
+ if (!strcmp(name1.c_str(), "CO2(g)"))
734
+ f = 0.81;
735
+ else if (!strcmp(name1.c_str(), "H2S(g)") || !strcmp(name1.c_str(), "H2Sg(g)"))
736
+ f = 0.81;
737
+ else if (!strcmp(name1.c_str(), "CH4(g)") || !strcmp(name1.c_str(), "Mtg(g)") || !strcmp(name1.c_str(), "Methane(g)"))
738
+ f = 0.51;
739
+ else if (!strcmp(name1.c_str(), "N2(g)") || !strcmp(name1.c_str(), "Ntg(g)"))
740
+ f = 0.51;
741
+ else if (!strcmp(name1.c_str(), "Ethane(g)"))
742
+ f = 0.51;
743
+ else if (!strcmp(name1.c_str(), "Propane(g)"))
744
+ f = 0.45;
745
+ }
746
+ }
747
+ return f;
748
+ }