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

A generic node-to-node gradient based connection. More...

+ Inheritance diagram for LinearGradientFlux:
+ Collaboration diagram for LinearGradientFlux:

Detailed Description

A generic node-to-node gradient based connection.

This connection is similar to the Darcy-connection, but there are no restrictions concerning the type of nodes. However, the left side needs to be a water storage

\[ q = Q_1 \nabla \Psi \]

where:

  • \(q\): the resulting flux in \(m^3/day\)
  • \(Q_1\): Flux over the connection for a unity gradient ( \(\nabla \Psi = 1\)) in \(\frac{m^3}{day}\)
  • \(\nabla \Psi = \frac{\Psi_{l}-\Psi_{r}}{d}\): The hydraulic gradient of the (l)eft, resp. (r)ight node of the connection
  • \(d\): The topographic length of the connection in m

Public Member Functions

 LinearGradientFlux (cmf::water::flux_node::ptr left, cmf::water::flux_node::ptr right, real Q1, real d=-1.0)
 Creates a generic gradient based flux, if enough water is present in the source.
 
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

real d
 distance of the gradient (use negative value for calculation from the node positions)
 
real Q1
 Flux over the connection for a unity gradient ( \(\nabla \Psi = 1 \)) in \(\frac{m^3}{day}\).
 
const std::string type
 A string describing the type of the connection.
 

Constructor & Destructor Documentation

◆ LinearGradientFlux()

Creates a generic gradient based flux, if enough water is present in the source.

Parameters
leftThe left node of the connection
rightThe right node of the connection
Q1Flux over the connection for a unity gradient ( \(\nabla \Psi = 1\)) in \(\frac{m^3}{day}\)
dthe topographic lenght of the connection in m

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