I have the following system with 3 sequential batch reactors. Each batch reactor consists of a system of ODEs which are solved. Several 'subtraction' blocks are illustrated, however they would be slightly more complicated units, I just haven't figured out what they should be yet. The process flow is as follows:
- The initial input (Start) to reactor 1 is known.
- Reactor 1 runs for X hours with the initial input along with an estimated output from reactor 3.
- The output from reactor 1 is used for reactor 2 along with the estimated output from reactor 3 which runs for Y hours.
- The output from reactor 2 is used as input for reactor 3, which runs for Z hours.
- Everything is updated and all reactors are recalculated with the new initial values, untill a steady state is obtained.
I do have a single reactor running atm. The problems are, that I don't know how to set reactor 1 to start at t=0, then reactor 2 at t = X and reactor 3 at t = X+Y, which all increases for the next loop. I do not have the package 'stateflow'.
How do I get the simulation to stop, when the simulation is close enough to steady state? Do I have to specify a simulation time prior to simulation?