rulle
Civil/Environmental
- Jan 8, 2014
- 4
I am simulating the rather complex process of algae and bacteria dynamics in a waste water treatment plant using Simulink (MATLAB varsion 2012a). A snapshot illustrating the model set-up is attached. All dynamics are defined in a MATLAB S-function and simulations are done using the ode15s solver.
A simulation of 13 days yields reasonable output data. As an example I attach a graph of the ammonium, ammonia, nitrite and nitrate concentrations.
A simulation of 14 days yields incorrect output data in terms of negative concentrations. As an example I attach the corresponding graph of the ammonium, ammonia, nitrite and nitrate concentrations. The very strange thing is that the negative concentrations appear after nine or ten days allready (not possible to see from the graph). For example the nitrate concentration is about -1e7 g(NO3-N)*m⁻³ after ten days.
How can this be possible? Should not the 13 first days of the 14 days simulation be identical to the corresponding days of the 13 days simulation? Have anyone encountered any similar model behaviour?
A simulation of 13 days yields reasonable output data. As an example I attach a graph of the ammonium, ammonia, nitrite and nitrate concentrations.
A simulation of 14 days yields incorrect output data in terms of negative concentrations. As an example I attach the corresponding graph of the ammonium, ammonia, nitrite and nitrate concentrations. The very strange thing is that the negative concentrations appear after nine or ten days allready (not possible to see from the graph). For example the nitrate concentration is about -1e7 g(NO3-N)*m⁻³ after ten days.
How can this be possible? Should not the 13 first days of the 14 days simulation be identical to the corresponding days of the 13 days simulation? Have anyone encountered any similar model behaviour?