Brusselator and Catalyst

If A and B are constant, those reactions are really zero and first order respectively. So you can just move A and B into the rates like

brusselator = @reaction_network begin
    k1*A, 0 → X
    k2, 2X + Y → 3X
    k3*B, X → Y + D
    k4, X → E
end k1 k2 k3 k4 A B

Alternatively, you need to modify your reactions to ensure they don’t change A and B, then the ODEs for A and B will have zero derivatives so you can just set their values in the initial condition vector:

brusselator = @reaction_network begin
    k1, A → A + X
    k2, 2X + Y → 3X
    k3, B + X → B + Y + D
    k4, X → E
end k1 k2 k3 k4

edit: Notice, in the first example A and B are now parameters.

2 Likes