pwAddV
m = pwAddV(m, ID, rightHandSide)
Adds a reaction rate the model m. Only allowed for ODE based models.
The ID of the reaction rate can be used within the right hand side in pwAddODE.
Arguments for pwAddV
ID The ID can be used in the right hand side of any ODE.
Example: 'V1'
rhs Right hand side of the rate.
Example: '- R_act*R*L'
Description
When dealing with e.g. chemical networks, the differential equations
exhibit a certain structure: the flux from one node to another corresponds
to a reaction rate v which is subtracted from the derivative of the first
node and added to the derivative of the second node.
When a complete network-based formulation is not feasible for a model,
it may still prove beneficial to condense the ODEs by introducing rate
variables instead of repeating their content explicitely in the derivative
of all involved species.
Examples
m = pwAddV(m, 'V1', 'R_act * R * L');
m = pwAddV(m, 'V2', 'R_deact * pR');
m = pwAddODE(m, 'R', '-V1 + V2');
m = pwAddODE(m, 'pR', '-V2 + V1');
instead of
m = pwAddODE(m, 'R', '-R_act * R * L + R_deact * pR');
m = pwAddODE(m, 'pR', '-R_deact * pR + R_act * R * L');
See also