Skip to content

Commit 2a2e874

Browse files
committed
Use proper rtol in pH calculation. Closes #553
1 parent a2194d3 commit 2a2e874

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

PySDM/backends/numba/impl/_chemistry_methods.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
MASS_ACCOMMODATION_COEFFICIENTS, DIFFUSION_CONST, GASEOUS_COMPOUNDS, DISSOCIATION_FACTORS, \
99
KineticConsts, EquilibriumConsts, k4
1010

11-
_tolerance = 1e-6
1211
_max_iter_quite_close = 8
1312
_max_iter_default = 32
1413
_realy_close_threshold = 1e-6
@@ -228,7 +227,7 @@ def equilibrate_H_body(within_tolerance,
228227
max_iter = _max_iter_default
229228
else:
230229
max_iter = _max_iter_quite_close
231-
H, _iters_taken = toms748_solve(pH_minfun, args, a, b, fa, fb, rtol=_tolerance, max_iter=max_iter,
230+
H, _iters_taken = toms748_solve(pH_minfun, args, a, b, fa, fb, rtol=rtol, max_iter=max_iter,
232231
within_tolerance=within_tolerance)
233232
assert _iters_taken != max_iter
234233
pH[i] = H2pH(H)

0 commit comments

Comments
 (0)