pyEQL 1.1.3__py3-none-any.whl → 1.1.4__py3-none-any.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.
pyEQL/solution.py CHANGED
@@ -2306,11 +2306,8 @@ class Solution(MSONable):
2306
2306
  start_imbalance = C_hplus - K_W / C_hplus
2307
2307
  new_imbalance = start_imbalance - cb
2308
2308
  # calculate the new concentration of H+ that will balance the charge
2309
- # solve H^2 - new_imbalance H - K_W = 0, so a=1, b=-new_imbalance, c=-K_W
2310
- # check b^2 - 4ac; are there any real roots?
2311
- if new_imbalance**2 - 4 * 1 * K_W < 0:
2312
- self.logger.error("Cannot balance charge by adjusting pH. The imbalance is too large.")
2313
- return
2309
+ # solve H^2 - new_imbalance H - K_W = 0, so a=1, b=-new_imbalance, c=-K_W. Note that this is guaranteed to have real roots as
2310
+ # b^2-4ac > 0
2314
2311
  new_hplus = max(
2315
2312
  [
2316
2313
  (new_imbalance + np.sqrt(new_imbalance**2 + 4 * 1 * K_W)) / 2,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyEQL
3
- Version: 1.1.3
3
+ Version: 1.1.4
4
4
  Summary: A python interface for solution chemistry
5
5
  Author-email: Ryan Kingsbury <kingsbury@princeton.edu>
6
6
  Project-URL: Docs, https://pyeql.readthedocs.io/
@@ -5,7 +5,7 @@ pyEQL/equilibrium.py,sha256=YCtoAJSgn1WC9NJnc3H4FTJdKQvogsvCuj7HqlKMtww,8307
5
5
  pyEQL/functions.py,sha256=nc-Hc61MmW-ELBR1PByJvQnELxM7PZexMHbU_O5-Bnw,10584
6
6
  pyEQL/salt_ion_match.py,sha256=0nCZXmeo67VqcyYWQpPx-81hjSvnsg8HFB3fIyfjW_k,4070
7
7
  pyEQL/solute.py,sha256=no00Rc3tRfHmyht4wm2UXA1KZhKC45tWMO5QEkZY6yg,5140
8
- pyEQL/solution.py,sha256=LwlfY6Q19QEcY8MJpP_mcJgEw0ohNaGfAqAiqhdPmU8,116022
8
+ pyEQL/solution.py,sha256=dktH1abijuORNw5YkTjC5CMqzD2Y9DF_cZPuwOA1-dY,115853
9
9
  pyEQL/utils.py,sha256=DWLtNm71qw5j4-jqBp5v3LssEjWgJnVvI6a_H60c5ic,6670
10
10
  pyEQL/database/geothermal.dat,sha256=kksnfcBtWdOTpNn4CLXU1Mz16cwas2WuVKpuMU8CaVI,234230
11
11
  pyEQL/database/llnl.dat,sha256=jN-a0kfUFbQlYMn2shTVRg1JX_ZhLa-tJ0lLw2YSpLU,751462
@@ -17,10 +17,10 @@ pyEQL/presets/rainwater.yaml,sha256=S0WHZNDfCJyjSSFxNFdkypjn2s3P0jJGCiYIxvi1ibA,
17
17
  pyEQL/presets/seawater.yaml,sha256=oryc1CkhRz20RpWE6uiGiT93HoZnqlB0s-0PmBWr3-U,843
18
18
  pyEQL/presets/urine.yaml,sha256=0Njtc-H1fFRo7UhquHdiSTT4z-8VZJ1utDCk02qk28M,679
19
19
  pyEQL/presets/wastewater.yaml,sha256=jTTFBpmKxczaEtkCZb0xUULIPZt7wfC8eAJ6rthGnmw,502
20
- pyEQL-1.1.3.dist-info/AUTHORS.md,sha256=K9ZLhKFwZ2zLlFXwN62VuUYCpr5T6n4mOUCUHlytTUs,415
21
- pyEQL-1.1.3.dist-info/COPYING,sha256=Ww2oUywfFTn242v9ksCgQdIVSpcMXJiKKePn0GFm25E,7649
22
- pyEQL-1.1.3.dist-info/LICENSE.txt,sha256=2Zf1F7RzbpeposgIxUydpurqNCMoMgDi2gAB65_GjwQ,969
23
- pyEQL-1.1.3.dist-info/METADATA,sha256=aDLyZrhXd2laVUiJ6drgt4RFSvlptOPxLEo9xrkaR40,6096
24
- pyEQL-1.1.3.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
25
- pyEQL-1.1.3.dist-info/top_level.txt,sha256=QMOaZjCAm_lS4Njsjh4L0B5aWnJFGQMYKhuH88CG1co,6
26
- pyEQL-1.1.3.dist-info/RECORD,,
20
+ pyEQL-1.1.4.dist-info/AUTHORS.md,sha256=K9ZLhKFwZ2zLlFXwN62VuUYCpr5T6n4mOUCUHlytTUs,415
21
+ pyEQL-1.1.4.dist-info/COPYING,sha256=Ww2oUywfFTn242v9ksCgQdIVSpcMXJiKKePn0GFm25E,7649
22
+ pyEQL-1.1.4.dist-info/LICENSE.txt,sha256=2Zf1F7RzbpeposgIxUydpurqNCMoMgDi2gAB65_GjwQ,969
23
+ pyEQL-1.1.4.dist-info/METADATA,sha256=VT4Z5yWuLsahV2Ed9pnCGTqZ4vc10vE5LLwHZHOyAwE,6096
24
+ pyEQL-1.1.4.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
25
+ pyEQL-1.1.4.dist-info/top_level.txt,sha256=QMOaZjCAm_lS4Njsjh4L0B5aWnJFGQMYKhuH88CG1co,6
26
+ pyEQL-1.1.4.dist-info/RECORD,,
File without changes
File without changes