Skip to content
Discussion options

You must be logged in to vote

I think this does what you want, but the individual OCPs might not actually line up this way to give the OCV (e.g. fully-charged might not be sto=1, 0 in neg., pos.).

import pybamm
import matplotlib.pyplot as plt

parameter_values = pybamm.ParameterValues("Chen2020")

x = pybamm.linspace(0, 1, 1000)  # sto
U_n = parameter_values["Negative electrode OCP [V]"]
U_p = parameter_values["Positive electrode OCP [V]"]

fig, ax = plt.subplots(1, 3, figsize=(12, 4))
ax[0].plot(x.entries, U_n(x).entries)
ax[0].set(xlabel="sto [-]", ylabel="$U_n$ [V]")
ax[1].plot(x.entries, U_p(x).entries)
ax[1].set(xlabel="sto [-]", ylabel="$U_p$ [V]")
ax[2].plot(x.entries, U_p(x).entries - U_n(1-x).entries)
ax[2].set(

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@MatHunt
Comment options

Comment options

You must be logged in to vote
2 replies
@MatHunt
Comment options

@rtimms
Comment options

rtimms Nov 7, 2022
Collaborator

Answer selected by rtimms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants