Description
Abstract
The proposed enhancement is additional functionality for ReactorNet
objects to automatically construct and update SolutionArray
s for each Reactor
object in the network and to provide a convenient interface for accessing the state of the network at snapshots in time and the state of each reactor for the duration of the simulation.
Motivation
Currently, users wishing to track the state of Reactor
objects must construct a SolutionArray
object and manually append the reactor's thermodynamic state as desired. This is not too burdensome with a small number of reactor objects and when calling step
manually; however, this makes it difficult to track network state at each time step when using other routines such as advance_to_steady_state
that control the timestepping.
Possible Solutions
Now that SolutionArray
is implemented in C++, it is possible to have a ReactorNet
object that automatically constructs SolutionArray
objects for each Reactor
object. Here are some considerations about how this could be implemented and what behavior might be desired:
- This functionality could be directly added to the
ReactorNet
class - an optional flag could be used to enable this functionality with it disabled by default. Are there any reasons why this would need to be separate? - Time data can be saved automatically as the extra variable
t
in eachSolutionArray
objects - are there any use cases that would necessitate support for additional extra variables? - The underlying
SolutionArray
objects could be made accessible through theReactorNet
by index number - would it be worth the additional complexity to support user-assigned names for reactors to make access more intuitive?
References
Relevant Users' Group topic