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

Routes a fraction of the flux calculated from a master flux_connection between source to target1 directly further to target2 without any timelag. More...

+ Inheritance diagram for PartitionFluxRoute:
+ Collaboration diagram for PartitionFluxRoute:

Detailed Description

Routes a fraction of the flux calculated from a master flux_connection between source to target1 directly further to target2 without any timelag.

The connection connects target 1 and target 2.

\[ q_{t1,t2} = f \cdot q_{s, t1}(t) \]

Where \( q_{t1,t2}\) is the flux from t1 to t2, f is the fraction and \( q_{s,t1}(t)\) is the original flux

Public Member Functions

 PartitionFluxRoute (flux_node::ptr source, flux_node::ptr target1, flux_node::ptr target2, real fraction, bool no_back_flow=true)
 
real conc (cmf::math::Time t, const cmf::water::solute &_Solute)
 Returns the concentration of the flux.
 
flux_node::ptr get_target (const flux_node &inquirer)
 Returns the other end of a connection than the asking end.
 
flux_node::ptr get_target (int index) const
 With index 0, the left node is returned, with index 1 the right node of the connection.
 
real get_tracer_filter ()
 A value ranging from 0 to 1 to filter tracers out of the water flux.
 
real get_tracer_filter (solute S)
 A value ranging from 0 to 1 to filter tracers out of the water flux.
 
bool kill_me ()
 Deregisters this connection from its nodes. Returns true if only one reference is left.
 
flux_node::ptr left_node () const
 Returns the left node of this connection.
 
real q (const flux_node &inquirer, cmf::math::Time t)
 Returns the current flux through a connection. Negative signs mean out of the inquirer, positive are inflows to the inquirer.
 
void refresh (cmf::math::Time t)
 Performes a new calculation of the flux.
 
flux_node::ptr right_node () const
 returns the right node of this connection
 
void set_tracer_filter (real value)
 A value ranging from 0 to 1 to filter tracers out of the water flux.
 

Public Attributes

const std::string type
 A string describing the type of the connection.
 

Constructor & Destructor Documentation

◆ PartitionFluxRoute()

PartitionFluxRoute ( flux_node::ptr source,
flux_node::ptr target1,
flux_node::ptr target2,
real fraction,
bool no_back_flow = true )
Parameters
sourceWater storage from which the water flows out. The flux is defined by some other flux connection between
target1Target node (boundary condition or storage). The target of the master flux connection
target2Target node (boundary condition or storage). Does not influence the strength of the flow
fractionFraction of the source->target1 flow to be routed further to target2
no_back_flowIf true (default), no flow between target 1 and target 2 occurs, if water is flowing from target 1 to source. If set to false, in the case of water flowing from target 1 to source, the fraction is also flowing from target 2 to target 1. No test if target 2 has water is made.

Member Function Documentation

◆ conc()

real conc ( cmf::math::Time t,
const cmf::water::solute & _Solute )
inherited

Returns the concentration of the flux.


If not overridden, it returns the concentration of the source of the flux (direction depending)

◆ get_tracer_filter()

real get_tracer_filter ( )
inherited

A value ranging from 0 to 1 to filter tracers out of the water flux.

1.0 is no filter and 0.0 means no solute is crossing this connection

◆ set_tracer_filter()

void set_tracer_filter ( real value)
inherited

A value ranging from 0 to 1 to filter tracers out of the water flux.

1.0 is no filter and 0.0 means no solute is crossing this connection