Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbolic pre-solve for circuit equations? #137

Open
valentinsulzer opened this issue Feb 10, 2022 · 3 comments
Open

Symbolic pre-solve for circuit equations? #137

valentinsulzer opened this issue Feb 10, 2022 · 3 comments

Comments

@valentinsulzer
Copy link
Member

Since the structure of the Modified Nodal Analysis equations never changes for a given circuit, we make the circuit set-up and solve time almost negligible by pre-solving the linear system with symbolic values for the resistances and OCVs. I think sympy can do this. Then at each iteration, we just substitute in the resistance and OCV and evaluate the pre-solved equations.

Thinking further along this line of thought, we could (in theory) completely remove the separate pybamm solve <-> model solve by integrating the pre-solved circuit equations into the pybamm model and just solving one big model. However, it's less clear how to parallelize this.

@TomTranter
Copy link
Collaborator

Great ideas, I had thought about making one big system but you do need the stepping for the thermal equations if you include external sources and cell to cell connections that don't exist in the electrical network. I'm very open to exploring these ideas though as if you could just a big system at sundials and get parallelisation done for you that might be better. Definitely we should implement a pre-solve

@TomTranter
Copy link
Collaborator

@tinosulzer would you have time to work on this?

@valentinsulzer
Copy link
Member Author

Not for a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants