|
2.0.0b10
catchment modelling framework
|
A state variable for the storage of water. More...
Inheritance diagram for WaterStorage:
Collaboration diagram for WaterStorage:A state variable for the storage of water.
A class for the storage of water. The state is the volume of water stored in \(m^3\) The derivative function is given by:
\begin{eqnarray*} \frac{dV}{dt}&=&\sum_{f=1}^{F} q_f \\ F&=& \mbox{Number of fluxes in water storage} \\ q_f&=& \mbox{Water flux in } \frac{m^3}{day} \\ \end{eqnarray*}
Public Member Functions | |
| WaterStorage (cmf::project &project, const std::string &Name="", double InitialState=0, double scale=1) | |
| creates a water storage (abstract class) | |
| real | conc (cmf::math::Time t, const cmf::water::solute &_Solute) const override |
| Returns the current WaterQuality (concentration of all solutes) | |
| real | conc (const cmf::water::solute &_Solute) const |
| Returns the concentration of the given solute. | |
| void | conc (const cmf::water::solute &_Solute, real NewConcetration) |
| Sets a new concentration. | |
| cmf::water::flux_connection * | connection_to (const cmf::water::flux_node &target) |
| Returns the connection between this and target. | |
| virtual real | dxdt (const cmf::math::Time &time) |
Returns the derivate of the state variable at time time. | |
| real | flux_to (const cmf::water::flux_node &target, cmf::math::Time t) |
| Returns the actual flux between this and target (positive sign means "from this into target") | |
| cmf::geometry::point | get_3d_flux (cmf::math::Time t) |
| Returns the sum of all flux vectors. | |
| real | get_potential (cmf::math::Time t=cmf::math::never) const override |
| Returns the water potential of the node in m waterhead. | |
| cmf::project & | get_project () const |
| Returns the project, this node is part of. | |
| real | get_state () const |
| Returns the current state of the variable. | |
| char | get_state_variable_content () const |
| A character indicating the integrated variable (either 'V' for Volume or 'h' for head) | |
| virtual real | get_volume () const |
| Returns the volume of water in this storage in m3 | |
| virtual bool | is_connected (const cmf::math::StateVariable &other) const |
| Returns True if this waterstorage is effected by another state. | |
| bool | is_storage () const override |
| Returns true, since this is a storage. | |
| real | operator() (cmf::math::Time t) const |
| returns the waterblance | |
| bool | remove_connection (cmf::water::flux_node::ptr To) |
| Remove the connection. | |
| void | set_potential (real newpotential) override |
| Sets the potential of this flux node. | |
| void | set_state (real newState) |
| Gives access to the state variable. | |
| void | set_state_variable_content (char content) |
| A character indicating the integrated variable (either 'V' for Volume or 'h' for head) | |
| virtual void | set_volume (real newwatercontent) |
| Sets the volume of water in this storage in m3 | |
| SoluteStorage & | Solute (const cmf::water::solute _Solute) |
| Returns the water quality of the water storage. | |
| real | waterbalance (cmf::math::Time t, const flux_connection *Without=0) const |
| Returns the sum of all fluxes (positive and negative) at time t. | |
Public Attributes | |
| std::string | Name |
| The Name of this node. | |
| const int | node_id |
| The Id of the node. | |
| cmf::geometry::point | position |
| The spatial position of the node. | |
Protected Member Functions | |
| void | MarkStateChangeHandled () |
| Sets the updated flag (m_StateIsNew) to false. | |
| bool | StateIsChanged () |
| Returns if the state was currently updated. | |
Overrides of flux_node | |
| virtual bool | RecalcFluxes (cmf::math::Time t) |
| Pure flux_nodes do not influence fluxes, therefore no recalculation of fluxes is required by flux_node. | |
| virtual double | is_empty () const |
| Returns true if the node has no water. | |
| WaterStorage | ( | cmf::project & | project, |
| const std::string & | Name = "", | ||
| double | InitialState = 0, | ||
| double | scale = 1 ) |
creates a water storage (abstract class)
| project | The project the waterstorage belongs to |
| Name | Name of the water storage |
| InitialState | Initial water content in m3 |
| scale | A kind of "standard size" in m3 of the water storage to scale tolerances, default 1m3 |
|
overridevirtual |
Returns the water potential of the node in m waterhead.
The base class water storage always returns the height of the location
Reimplemented from flux_node.
|
virtual |
Pure flux_nodes do not influence fluxes, therefore no recalculation of fluxes is required by flux_node.
WaterStorage overrides this, since state changes require an update of the fluxes
Reimplemented from flux_node.
|
inherited |
Returns the sum of all fluxes (positive and negative) at time t.
Single fluxes can be excluded from the calculation
| t | Time of the query |
| Without | A flux_connection that is excluded from the waterbalance (e.g. to prevent closed circuits) |