-
I am trying to set the exchange current density to a tanh function of stoichiometry, and the constants (Fitting param1~3) needed to be set with param.update() . (Because I am doing auto fitting with bayes-opt. )
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The model expects the function for the exchange current density to depend on p1 = pybamm.InputParameter("p1")
p2 = pybamm.InputParameter("p2")
p3 = pybamm.InputParameter("p3")
def j0(c_e, c_s_surf, c_s_max, T):
return p1 * tanh(p2*(p3-(c_surf/c_max))) + p1
param.update({"Negative electrode exchange-current density [A.m-2]" j0}) Then when you solve give values for "p1" etc. in |
Beta Was this translation helpful? Give feedback.
The model expects the function for the exchange current density to depend on
c_e
,c_s_surf
,c_s_max
andT
. You can define your function and update the parameter like thisThen when you solve give values for "p1" etc. in
inputs
.