Processing of 3D variables #3459
Unanswered
bieyang321
asked this question in
Q&A
Replies: 1 comment
-
See #2394 |
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.
-
Hello developer!
When I use the SPMe model with dimensionality 1 or 2 and set_initial_conditions_from method in base_model.py, I will encounter the following error:
pybamm.expression_ Tree. exceptions. DomainError: Cannot process 2D object with domains' {'primary ': ['negative particle'], 'secondary': ['current collector '],' primary ': [],' quaternary ': []}'
Upon debugging, it appears that when obtaining the parameter "X-average negative particle concentration" from the preceding time layer, the dimension (r, x, z, t) includes three spatial dimensions. Consequently, it's not possible to update the parameter "X-average negative particle concentration."
In addition, when using SPMe or DFN models with dimensionality of 2, some parameters like Negative particle concentration with dimension (r,x,y,z,t) cannot output specific values for observation due to its four spatial dimensions.
It was found that in processed_variable.py, relevant code to process 3D or 4D variable are missing with NotImplementedError:
# Raise error for 3D variable
raise NotImplementedError(
"Shape not recognized for {} ".format(base_variables[0])
+ "(note processing of 3D variables is not yet implemented)"
)
Do you have any plans to implement the above functions recently? Alternatively, could you provide some insights on how to write code to handle 3D variables? I would greatly appreciate your assistance.
Beta Was this translation helpful? Give feedback.
All reactions