Lithium Plating Submodel if statement #2625
-
Hello, I am working on a submodel for lithium plating from the O'Kane 2022 submodel and I wanted to use a Butler-Volmer equation that turns on and off depending on the overpotential like this: But when I try to use an if..then statement in the submodel with eta_stripping I get the error: File ~\env\lib\site-packages\pybamm\expression_tree\symbol.py:660, in Symbol.bool(self) NotImplementedError: Boolean operator not defined for Symbols. What can I do to get around this/what am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Instead of the if statement, try multiplying each of the statement with |
Beta Was this translation helpful? Give feedback.
Instead of the if statement, try multiplying each of the statement with
(eta_stripping >= 0)
and(eta_stripping < 0)
which should define a heaviside function that does what you want.