Skip to content

Commit

Permalink
Fix bad initial value for Yamamoto method
Browse files Browse the repository at this point in the history
Change initial value from the automatic middle of the boundary space (500 & 500) to (1, 1), as an initial value of 500 can lead to numerical errors.
  • Loading branch information
r.jaepel committed Dec 2, 2023
1 parent bdb1fe0 commit d428e9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CADETProcess/tools/yamamoto.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def yamamoto_wrapper(c_s, nu, k_eq):
return yamamoto_equation(c_s, lambda_, nu, k_eq)

results, pcov = curve_fit(
yamamoto_wrapper, log_c_salt_at_max_M, log_gradient_slope, bounds=bounds
yamamoto_wrapper, log_c_salt_at_max_M, log_gradient_slope, bounds=bounds, p0=(1, 1)
)

return results

0 comments on commit d428e9e

Please sign in to comment.