Simulation output dependent on simulation time
Simulation output dependent on simulation time
(OP)
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?







RE: Simulation output dependent on simulation time
RE: Simulation output dependent on simulation time
https://www.dropbox.com/s/y6yxzhryjdnf33h/Screensh...
https://www.dropbox.com/s/8du48g6xsccsy5g/Screensh...
https://www.dropbox.com/s/cuyn98zdgr0r2xe/Screensh...
RE: Simulation output dependent on simulation time
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: Simulation output dependent on simulation time
The purpose of attaching the graphs was to show that the NO3 concentration is decreasing exponentially in the 14 days simulation.
I thought that the problem might be general and undependent on the exact code, and that someone might have experienced something similar.
RE: Simulation output dependent on simulation time