Replies: 1 comment 5 replies
-
Is |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
so I am trying to model a basic redox and to do that I need to be able to model current at each step including capacitance and resistance. I am able to model the faradic current fine and include the equation effectively in the algebraic section however I run into some issues when attempting to model the capacitive current.
Capacitive current is Cdl*dVdt so the change is voltage with time, however, because Eeff is already a variable I am unable to use the Eeff.diff(pybamm.t) command to access its time derivative. I get the following error:
ModelError: time derivative of the variable found (Eeff [non-dim]') in algebraic equation Current [non-dim]
If I want to be able to model the capacitive current I need to be able to obtain an approximation of the time derivative of Eeff. If this was an array set up then I would simply use:
dEdt = (Eeff[v]-E[v-1])/deltaT eq 1
However from what I have seen this is infeasible with pybamm. I was wondering if anyone knows an alternative approach that will allow for the calculation of an approximate derivative?
I've tested the approach in eq 1 as a post-process approximation and it holds up fairly well against some other simulation software I have on hand, however, if I want to model current effectively I need to be able to calculate the current at each individual step so that I can apply it to my calculation of Eeff.
Eeff = Eapp - Ru*i eq 2
Current variable definitions and implementation have been included below. I am attempting to use a linear voltage sweep. I have also included my post-processing setup for current which is able to approximate the faradaic current fine and also introduce the effect of capacitance as well, however, I am unable to use it to introduce the impact of resistance into the system.
Beta Was this translation helpful? Give feedback.
All reactions