×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Simulation output dependent on simulation time

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?



RE: Simulation output dependent on simulation time

(OP)
Well, I didn't attach the pics, sorry. But I don't think it is that important to view them.

RE: Simulation output dependent on simulation time

(OP)
Sorry. The model includes several differential equations defining processes such as algal and bacterial growth, respiration and decay, and chemical equilibria governing the pH. The main program may be downloaded from <https://www.dropbox.com/s/7jdu9b5mlbgas43/rwqm1.m&...;.

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

Something is missing in your equations, unless you can explain the meaning of a negative concentration of a chemical species.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources