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

A Neumann boundary condition (constant flux boundary condition) More...

+ Inheritance diagram for NeumannBoundary:
+ Collaboration diagram for NeumannBoundary:

Detailed Description

A Neumann boundary condition (constant flux boundary condition)

The flux is a timeseries, but can be used as a scalar. To scale the timeseries to the specific conditions of this boundary condition the linear_scale flux_scale can be used.

Public Member Functions

 NeumannBoundary (cmf::project &_project, cmf::math::timeseries _flux, cmf::water::SoluteTimeseries _concentration=cmf::water::SoluteTimeseries(), cmf::geometry::point loc=cmf::geometry::point())
 Ctor of the Neumann boundary.
 
real conc (cmf::math::Time t, const cmf::water::solute &_Solute) const
 Returns the solute concentrations of the flux at a given time.
 
cmf::water::flux_connectionconnection_to (const cmf::water::flux_node &target)
 Returns the connection between this and target.
 
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.
 
cmf::math::timeseries get_flux ()
 The timeseries of the boundary flux.
 
virtual real get_potential (cmf::math::Time=cmf::math::never) const
 Returns the water potential of the node in m waterhead.
 
cmf::projectget_project () const
 Returns the project, this node is part of.
 
double is_empty () const
 Returns true if the node has no water.
 
virtual bool is_storage () const
 true, if this is a waterstorage
 
real operator() (cmf::math::Time t) const
 Returns the flux at a given time.
 
bool RecalcFluxes (cmf::math::Time t)
 Pure flux_nodes do not influence fluxes, therefore no recalculation of fluxes is required by flux_node.
 
bool remove_connection (cmf::water::flux_node::ptr To)
 Remove the connection.
 
void set_flux (cmf::math::timeseries new_flux)
 Set a timeseries as the boundary flux.
 
void set_flux (double new_flux)
 Set a constant as the boundary flux.
 
virtual void set_potential (real new_potential)
 Sets the potential of this flux node.
 
real waterbalance (cmf::math::Time t, const flux_connection *Without=0) const
 Returns the sum of all fluxes (positive and negative) at time t.
 

Static Public Member Functions

static NeumannBoundary::ptr create (cmf::water::flux_node::ptr target)
 Creates a Neumann Boundary condition connected with target.
 

Public Attributes

cmf::water::SoluteTimeseries concentration
 The concentration timeseries of the flux.
 
linear_scale flux_scale
 The scaling of the flux timeseries.
 
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.
 

Constructor & Destructor Documentation

◆ NeumannBoundary()

Ctor of the Neumann boundary.

Parameters
_projectThe project this boundary condition belongs to
_fluxThe flux timeseries (a scalar is converted to a timeseries automatically)
_concentrationThe concentration timeseries
locThe location of the boundary condition

Member Function Documentation

◆ get_potential()

virtual real get_potential ( cmf::math::Time = cmf::math::never) const
virtualinherited

Returns the water potential of the node in m waterhead.

The base class water storage always returns the height of the location

Reimplemented in MacroPore, SoilLayer, DirichletBoundary, and WaterStorage.

◆ RecalcFluxes()

bool RecalcFluxes ( cmf::math::Time t)
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.

◆ waterbalance()

real waterbalance ( cmf::math::Time t,
const flux_connection * Without = 0 ) const
inherited

Returns the sum of all fluxes (positive and negative) at time t.


Single fluxes can be excluded from the calculation

Parameters
tTime of the query
WithoutA flux_connection that is excluded from the waterbalance (e.g. to prevent closed circuits)