Function parameters, inputs, sensitivities #2694
DavidMStraub
started this conversation in
General
Replies: 1 comment
-
You're on the right track but it's easier than that, you can use pybamm expressions inside the functions in the parameter set so just do def kappa(c_e, T):
return pybamm.InputParameter("a") * c_e
parameter_values.update({"Electrolyte conductivity [S.m-1]": kappa}) |
Beta Was this translation helpful? Give feedback.
0 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,
I think it's great how input parameters and sensitivities can be used for parameter optimization, like in this notebook.
However, I would sometimes like to get the sensitivities with respect to a quantity that is used inside a function parameter, for instance,
Am I right in assuming that this would require rewriting the model/submodel such that the quantity I want to get the sensitivity for is a proper, scalar
pybamm.Parameter
? For instance, if I wanted to use a function for"Electrolyte conductivity [S.m-1]"
, sayand want the sensitivity w.r.t.
a
(silly example ...), would the best approach be to monkey-patchLithiumIonParameters.kappa_e_dimensional
to return `rather than
? Am I on the right track?
Beta Was this translation helpful? Give feedback.
All reactions