Skip to content

Commit

Permalink
Merge pull request #618 from slayoo/freezing
Browse files Browse the repository at this point in the history
Use proper rtol in pH calculation. Closes #553
  • Loading branch information
slayoo authored Sep 15, 2021
2 parents 4722d86 + 2a2e874 commit 0122cb0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions PySDM/backends/numba/impl/_chemistry_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
MASS_ACCOMMODATION_COEFFICIENTS, DIFFUSION_CONST, GASEOUS_COMPOUNDS, DISSOCIATION_FACTORS, \
KineticConsts, EquilibriumConsts, k4

_tolerance = 1e-6
_max_iter_quite_close = 8
_max_iter_default = 32
_realy_close_threshold = 1e-6
Expand Down Expand Up @@ -228,7 +227,7 @@ def equilibrate_H_body(within_tolerance,
max_iter = _max_iter_default
else:
max_iter = _max_iter_quite_close
H, _iters_taken = toms748_solve(pH_minfun, args, a, b, fa, fb, rtol=_tolerance, max_iter=max_iter,
H, _iters_taken = toms748_solve(pH_minfun, args, a, b, fa, fb, rtol=rtol, max_iter=max_iter,
within_tolerance=within_tolerance)
assert _iters_taken != max_iter
pH[i] = H2pH(H)
Expand Down

0 comments on commit 0122cb0

Please sign in to comment.