2.0.0b10
catchment modelling framework
Loading...
Searching...
No Matches
SoluteRateReaction Class Reference

A general solute reaction system to describe multi-species kinetics with a power law. More...

+ Inheritance diagram for SoluteRateReaction:
+ Collaboration diagram for SoluteRateReaction:

Detailed Description

A general solute reaction system to describe multi-species kinetics with a power law.

Warning
Experimental feature!

cf. to https://en.wikipedia.org/wiki/Rate_equation

\[ A + 2B \rightarrow 3C \Rightarrow 0 = -1A - 2B + 3C \]

Where \( -1, -2, 3 \) are the stoichiometric coefficients \(v_i\) corresponding to the substance \(X_i\).

The reaction rate \(r^+\) is given by a power law:

\[ r = k \prod [X_i]^{m_i} \forall v_i < 0 \]

With \(m_i\) as the partial order, which is sometimes equal to the stoichiometric coefficient.

Which gives the following differential equation system

\[\frac{dX_i}{dt} = v_i r^+([X]) V \]

If the opposite reaction is taking place at the same time (equilibrium reaction), with the reaction rate \(r^-\) for the backwards reaction we get:

\[\frac{dX_i}{dt} = V \left(v_i r^+([X]) - v_i r^-([X])\right)\]

Public Member Functions

void add_reactance (const solute &solute, real stoichiometric_coefficient, real partial_order=-999)
 Use positive stoichiometric_coefficient for products and negative for educts.
 
real get_flux (const SoluteStorage &solute_storage, const cmf::math::Time &t) const override
 Calculates the reactive flux from / to the given solute storage at time t.
 
bool is_compatible (const SoluteStorage &solute_storage) override
 Tests if the reaction is compatible to a solute storage. Returns true if not overwritten by a child class.
 
real operator() (const SoluteStorage &solute_storage, const cmf::math::Time &t) const
 Calculates the reactive flux from / to the given solute storage at time t.
 

Public Attributes

real k_back
 Rate constant for backward reaction.
 
real k_forward
 Rate constant for forward reaction.