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

Adds a constant flux to the solute storage. More...

+ Inheritance diagram for SoluteConstantFluxReaction:
+ Collaboration diagram for SoluteConstantFluxReaction:

Detailed Description

Adds a constant flux to the solute storage.

Normally used for operator split model coupling. Use this to replace the old source parameter of a solute storage

Usage:

p = cmf.project('X')
X = p.solutes[0]
S = p.NewStorage('S')
S[X].reactions = [cmf.SoluteConstantReaction(1.0)]
assert S[X].dxdt(cmf.Time()) == 1.0
The study area, holding all cells, outlets and streams.
Definition project.h:53
const cmf::water::solute_vector solutes
The solutes transported by the model.
Definition project.h:71
The main namespace of the model framework. Contains the other namespaces and the project class.
Definition __init__.py:1

Public Member Functions

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.
 
virtual bool is_compatible (const SoluteStorage &solute_storage)
 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.