Skip to content

Update current at each time step for a 2P configuration #1688

Answered by valentinsulzer
wigging asked this question in Q&A
Discussion options

You must be logged in to vote

Changing it to

# calculate branch resistances, R = (OCV - V) / I
# in pybamm this is the "Local ECM resistance [Ohm]" variable
r1 = sim1.solution["Local ECM resistance [Ohm]"].entries[0]
r2 = sim2.solution["Local ECM resistance [Ohm]"].entries[0]

makes it work but I can't get my head around why. @TomTranter has done some pack modeling and might be able to help.

Also your optimization setup seems weird. Having all the voltages be equal is both a constraint in con2 and the objective? And why not just define the last current in terms of all the others in order to satisfy con1 without needing an explicit constraint?

Replies: 1 comment 2 replies

Comment options

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

@wigging
Comment options

Answer selected by wigging
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