MATLAB Answers

What is the difference between BoundaryCondition and ConstantAmount?

1 view (last 30 days)
what will change if only Boundary Condition is set true whereas ConstantValue is set false during a simulation? Are they inclusively mutual?

  0 Comments

Sign in to comment.

Accepted Answer

Arthur Goldsipe
Arthur Goldsipe on 21 May 2020
Constant=true means that the value of a species cannot change during the course of a simulation. It can only be modified at time=0 by a variant or an initial assignment rule. In such cases, the value of BoundaryCondition has no effect on the results.
Constant=false means that the value of a species can change during the course of a simulation. The value of BoundaryCondition determines whether reactions can modify the species. When BoundaryCondition=false, reactions can modify this species. When BoundaryCondition=true, reactions cannot modify this species, and you typically modify the species value using a rate rule or a repeated assignment rule.
Here's an example to make it more concrete:
Let's say you want to simulate a reaction x + y -> z. Normally, you want all 3 species to be modified by this reaction, so you set BoundaryCondition=false for all 3 species. But let's say that you did some sort of experiment where you externally controlled the concentration of x over time. You want to use that information to set the value of x during the simulation, but you still want to simulate how y and z change based on the reaction kinetics. You could set BoundaryCondition=true for x, and then add a repeated assignment rule that sets the value of x based on your experimental data. If you did not change the value of BoundaryCondition, you would get an error when trying to simulate the model, because the reaction and the rule modify the species x.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!