primary domain of a function parameter #3820
Closed
veera-visw
started this conversation in
General
Replies: 1 comment
-
@agriyakhetarpal sorry to tag, any chance you can help me on this? |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
The code I am writing is based on the basic_dfn model. I am, however, keeping all functions and variables in a single environment to keep it simple for me to modify things since the model is in the testing phase.
The problem I have is that a function parameter (Open circuit voltage) is assigned to negative electrode domain and I am not able to understand where this assignment took place. Consider the variable ("U")
definition:
U = pybamm.FunctionParameter("Positive electrode OCP [V]", inputs)
c_s_p = pybamm.Variable(
"Positive particle concentration [mol.m-3]",
domain="positive particle",
auxiliary_domains={
"secondary": "positive electrode",
},
)
c_surf_p = pybamm.surf(c_s_p)
def open_circuit_potential(c_surf_p):
< expression>
return U
param = pybamm.ParameterValues(
"Positive electrode OCP [V]": open_circuit_potential,
)
No where in this code do I explicitly specify the domain for U since I assumed it will be inherited from its dependent variable (c_surf_p). But the variable seems to be registered in the negative domain.
output:
"Out[17]: FunctionParameter(-0x185365db7a99d101, Positive electrode OCP [V], children=['boundary value(negative particle concentration [mol.m-3])'], domains={'primary': ['negative electrode']})"
Since I am using this variable for positve electrode potential, I am getting a mismatch with other variables when I do a subtraction.
Any ideas on why the variable is registered this way and how I can fix it?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions