how to use pybamm.diff() #3420
-
when I create my submodel, one of the term on the right hand side depends on the time derivative, I then use pybamm.diff(), ` return self.left.diff(variable) + self.right.diff(variable) File /pybamm/lib/python3.11/site-packages/pybamm/expression_tree/unary_operators.py:345 in diff NotImplementedError` Does anyone know how to solve the issue? |
Beta Was this translation helpful? Give feedback.
Answered by
valentinsulzer
Oct 10, 2023
Replies: 1 comment 6 replies
-
I suspect this is to do with how |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's best to refactor your equations so that the d/dt term is on the left-hand side and then add the rhs to
model.rhs
. If the d/dt term appears in multiple places then you can reuse the rhs expression. e.g.becomes
If you have a system that can't be rearranged in this way let us know