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

A class for the storage of any tracer. More...

+ Inheritance diagram for SoluteStorage:
+ Collaboration diagram for SoluteStorage:

Detailed Description

A class for the storage of any tracer.

The state is the amount (mol, kg etc. see cmf::water) of the tracer in the storage.

The derivative function is given by:

\[\frac{dX}{dt} = \sum_{f=1}^{F}{q_f \cdot [X]_f} + \sum_{r=1}^{R}{q_r([X], t)} \left[\frac{mol}{day}\right] \]

  • \(F\) = Number of fluxes in water storage
  • \(q_f\) = Water flux in \(\frac{m^3}{day}\)
  • \(\left[X\right]_f \) = Concentration of solute X in flux \(q_f\) in \(\frac{mol}{m^3} \)
  • \(q_r([X], t)\) = Production or loss rate from R cmf::water::SoluteReaction objects \(\frac{mol}{day}\)

Public Member Functions

virtual real dxdt (const cmf::math::Time &time)
 Returns the derivate of the state variable at time time.
 
real get_conc () const
 Returns the concentration of the solute.
 
real get_state () const
 Returns the current state of the variable.
 
const WaterStorageget_water () const
 get the waterstorge of the solute storage
 
virtual bool is_connected (const cmf::math::StateVariable &other) const
 Returns True if this solute storage is effected by another state.
 
void set_abs_errtol (real scale)
 Sets a scaling factor for the absolute error tolerance of this storage in terms of the absolute error tolerance of the owning waterstorage.
 
void set_conc (real NewConcentration)
 set a new concentration of dissolved tracers.
 
void set_state (real newState)
 Gives access to the state variable.
 

Public Attributes

cmf::List< cmf::water::SoluteReaction::ptr > reactions
 Attached reactions.
 
const cmf::water::soluteSolute
 The solute, which is stored in this storage.
 

Protected Member Functions

void MarkStateChangeHandled ()
 Sets the updated flag (m_StateIsNew) to false.
 
bool StateIsChanged ()
 Returns if the state was currently updated.
 

Member Function Documentation

◆ set_abs_errtol()

void set_abs_errtol ( real scale)

Sets a scaling factor for the absolute error tolerance of this storage in terms of the absolute error tolerance of the owning waterstorage.

The absolute error tolerance

◆ set_conc()

void set_conc ( real NewConcentration)

set a new concentration of dissolved tracers.

In case of adsorption functions, the isotherm is used