Closed Malipour14 closed 3 years ago
Hopefully. What is the model? Do you have a reference?
It is a kind of 0-order model that variables are only time-dependent which is so called "Lumped-electrochemical model"
That looks interesting, thanks. We already have those particle, potential, and temperature submodels implemented. It would be great if you could add the electrolyte model in Section 3.2 as a new submodel, then you can reuse the other parts of the code. Let me know if you are interested in doing that and I can help you get started
Thank you for your response. Yes, I'm totally interested to do it. I'll be grateful if you help me with the procedure. How the sub-models are coupled then?
Unfortunately we don't yet have good documentation explaining how the submodels are coupled. Basically, you need to add a new file to this folder, using for example the "full diffusion" file to get you started. Once you set it all up properly, you can add an option to call your new submodel from one of the model classes, e.g. SPMe. Then, all of the other submodels will use the electrolyte concentration that is defined by your new submodel, and you don't need to change anything else. If you're not familiar with defining equations in the pybamm format, I recommend these tutorials
Thanks for the information. Is it possible to collect all the supermodels in one full model and use it as a new model?
The reason why I want to develop the full model form the beginning is that the existing sub-models for SPMe or SPM models are not developed based on the lumped-parameters. For example, in the lumped-model, Fick's law for diffusion is not valid since the concentration in the solid phase is a function of time only and not location (x or r)! therefore, the whole model should be written from the beginning.
In the case of the particles you can use the various polynomial approximation models from Subramaniam 2005 that we have already implemented, for example here. If you really want to make a full model yourself, check out the BasicSPM for a template, but we don't want to add too many of these as there are exponentially many different combinations of submodels possible, and it becomes hard to maintain.
@Malipour14 any update on this?
Summary Adding a new model to PyBaMM.
Motivation Hello, I want to develope a new lumped-electrochemical model (an electrochemical model with lumped parameters) reusing the pybamm. Before starting, I wanted to now if it is doable. Thanks a lot.