Clear Filters
Clear Filters

Modeling Anaerobic Digesters in SimBiology

5 views (last 30 days)
I am trying to model the process of anaerobic digestion in SimBiology. Shown in the pictures are the model and its simulation. The software is a little bit confusing, especially when it comes to defining various rates. If anyone could help with the rate rule, and why I have an error, that would be greatly appreciated. I checked the matlab documentation and tutorials, but those were not much help.

Answers (1)

Sietse Braakman
Sietse Braakman on 13 Jan 2021
Dear Anna,
With the information you provided, I am a little confused as to what you are trying to do with the rate rule. You can use rate rules instead of using reactions to define your model. In your current model, you already use reactions (e.g. the reaction that you named kf*C*H2O) so defining a rate rule for C in addition to the reaction would lead to an over determined system. In other words, C can only defined by a set of reactions OR by a single rate rule.
  • If you defined the reaction rate for your reaction named 'kf*C*H2O' to be the same (kf*C*H2O), the differential equation for C would be dC/dt = -kf*C*H2O.
  • If you wanted to define C with a rate rule instead, you would need to remove the reaction. Then for the rate rule, you need to define the rule as 'C = kf*C*H2O' instead of 'dC/dt = kf*[C]*[H2O]'.
  • Note 1: the sign of this ODE is opposite of the sign that I deduce from the reaction you defined (kf vs -kf).
  • Note 2: you only need to use square brackets in the reaction rates/rules when the name contains spaces or special characters that mean these names cannot be used as MATLAB variable names. E.g. you need to use brackets when one of your species is called 'drug concentration' because that is not a suitable MATLAB variable name, whereas you don't need to use brackest when you call your species 'drug_concentration'.
  • Note 3: regardless of whether you use reactions or a rate rule, you will have to define initial conditions for both C and H2O, or use doses, for the model to show any non-zero responses. Given your simulation results, it seems like you have already used initial conditions or doses.
Let me know if this solves your problem. Best,
Sietse

Communities

More Answers in the  SimBiology Community

Categories

Find more on Biotech and Pharmaceutical in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!