KingsburyLab / pyEQL

A Python library for solution chemistry
Other
64 stars 17 forks source link

BUG: repeated calls to equilibrate cause pH changes #141

Closed rkingsbury closed 2 months ago

rkingsbury commented 2 months ago

repeatedly calling equilibrate with the native engine (and presumably the PHREEQC one also) causes the pH to change, even when there have been no changes to the composition or conditions. This should not occur.

>>> s1 = Solution({'Na+': '2 mol/L','Cl-': '2 mol/L'},temperature='20 degC',volume='500 mL')
>>> for i in range(10):
...     print(s1.pH)
...     s1.equilibrate()
...
7.0
6.954575819099865
6.885161416260718
6.818765085545055
6.7555886088307755
6.695795267325627
6.639519561022746
6.586873954955933
6.5379537003727615
6.492840366549978