Add RHS and Jacobian (setup/solve) getters to reactors and flamelets for two-way-coupled simulations
Spitfire Feature Request
Summary and Motivation
Spitfire needs to provide simple getter methods for the RHS and Jacobian methods of reactors and flamelets to facilitate two-way coupled simulations. Right now there's no clear option. This would be a stepping stone towards process simulation capabilities where coupling between units is expressed at a higher level.
Another feature to add is the notion of a 'current state' and 'current time' to a reactor and flamelet so we could call integrate_to_final_time(t) sequentially. This would greatly facilitate one-way coupling to a reactor/flamelet as one could simply call the integration method in the RHS of the coupled system. In theory this might also enable some sort of hacky operator splitting, but we should really go IMEX-ARK for that when coupling is important.
Desired Behavior and Interface
-
Run a two-way-coupled simulation with a flamelet/reactor coupled at a boundary (heat/mass flux into the reactor and flamelet BC stream). -
Run a one-way coupled simulation using the integrate() method with 'current time' to step a reactor/flamelet forwards in time as needed in the RHS of another system.
Development Estimate
This should be straightforward as we have exactly this capability in the integrate() methods already. Writing the demo shouldn't be too bad.