Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bound sto for better eSOH results #2095

Merged
merged 4 commits into from
Jun 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pybamm/parameters/lithium_ion_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,11 @@ def j0_dimensional(self, c_e, c_s_surf, T):

def U_dimensional(self, sto, T):
"""Dimensional open-circuit potential [V]"""
# bound stoichiometry between tol and 1-tol. Adding 1/sto + 1/(sto-1) later
# will ensure that ocp goes to +- infinity if sto goes into that region
# anyway
tol = 1e-10
sto = pybamm.maximum(pybamm.minimum(sto, 1 - tol), tol)
inputs = {f"{self.domain} particle stoichiometry": sto}
u_ref = pybamm.FunctionParameter(f"{self.domain} electrode OCP [V]", inputs)
# add a term to ensure that the OCP goes to infinity at 0 and -infinity at 1
Expand Down