zwicker-group / py-pde

Python package for solving partial differential equations using finite differences.
https://py-pde.readthedocs.io
MIT License
393 stars 50 forks source link

Allow scalars that are evolved alongside fields #533

Open david-zwicker opened 5 months ago

david-zwicker commented 5 months ago

It would be great if we could also evolve scalar equations alongside fields (so coupled ODEs and PDEs). Scenarios where this would be helpful include any global constraints (implemented by Lagrange multiplies).

We would probably need a Data class that can hold a field or FieldCollection as well as a number of scalars (in a dict?). The evolution rate should be calculated quite generally. This all might depend on using py-modelrunner for storage (see #511).