hydrobricks
Loading...
Searching...
No Matches
ProcessCapillaryHBV Class Reference

#include <ProcessCapillaryHBV.h>

Inheritance diagram for ProcessCapillaryHBV:
ProcessOutflow Process

Public Member Functions

 ProcessCapillaryHBV (WaterContainer *container)
 
bool IsValid () const override
 
void SetParameters (const ProcessSettings &processSettings) override
 
bool NeedsTargetBrickLinking () const override
 
bool LinksMultipleTargets () const override
 
void AddTargetBrickWithWeights (Brick *targetBrick, const std::vector< Brick * > &weightSources) override
 
- Public Member Functions inherited from ProcessOutflow
 ProcessOutflow (WaterContainer *container)
 
bool IsValid () const override
 
int GetConnectionCount () const override
 
double * GetValuePointer (std::string_view name) override
 
- Public Member Functions inherited from Process
 Process (WaterContainer *container)
 
virtual void Reset ()
 
virtual void Validate () const
 
virtual void SetHydroUnitProperties (HydroUnit *unit, Brick *brick)
 
virtual void AttachForcing (Forcing *)
 
void AttachFluxOut (std::unique_ptr< Flux > flux)
 
int GetOutputFluxCount () const
 
FluxGetOutputFlux (size_t index) const
 
virtual bool ToAtmosphere () const
 
virtual vecDouble GetChangeRates ()
 
virtual void StoreInOutgoingFlux (double *rate, int index)
 
void ApplyChange (int connectionIndex, double rate, double timeStepInDays)
 
virtual void Finalize ()
 
virtual vecDoublePt GetStateVariables ()
 
const string & GetName () const
 
void SetName (const string &name)
 
void SetTimeMachine (TimeMachine *timeMachine)
 
WaterContainerGetWaterContainer () const
 
virtual void SetTargetBrick (Brick *)
 
virtual bool IsLateralProcess () const noexcept
 
bool HasOutputFluxes () const noexcept
 
bool HasWaterContainer () const noexcept
 

Static Public Member Functions

static void RegisterProcessSettings (SettingsModel *modelSettings)
 
- Static Public Member Functions inherited from ProcessOutflow
static void RegisterProcessSettings (SettingsModel *modelSettings)
 
- Static Public Member Functions inherited from Process
static std::unique_ptr< ProcessFactory (const ProcessSettings &processSettings, Brick *brick)
 
static bool RegisterSettings (SettingsModel *modelSettings, const string &processType)
 
static bool HasParameter (const ProcessSettings &processSettings, std::string_view name)
 
static const float * GetParameterValuePointer (const ProcessSettings &processSettings, std::string_view name)
 

Protected Member Functions

vecDouble GetRates () override
 
- Protected Member Functions inherited from Process
double GetSumChangeRatesOtherProcesses () const
 

Protected Attributes

std::vector< Brick * > _targetBricks
 
std::vector< std::vector< const double * > > _weights
 
const float * _maxCapillaryFlux
 
- Protected Attributes inherited from Process
string _name
 
WaterContainer_container
 
TimeMachine_timeMachine {nullptr}
 
std::vector< std::unique_ptr< Flux > > _outputs
 

Detailed Description

HBV-96 capillary transport (Lindström et al., 1997).

Lives on the (shared) upper zone and returns water to the soil moisture brick(s) (capacity FC) proportionally to the soil moisture deficit: CF = cflux × (1 − SM/FC)

With several per-class soils the flux fans out to each soil, area-weighted by the land cover(s) that feed it: the rate toward soil i is CF_i = cflux × w_i × (1 − SM_i/FC_i), w_i = Σ land-cover area fractions feeding soil i (so the total leaving the upper zone is the area-weighted sum). The upper zone is a full-unit-area brick, so the weighting is carried in the rate (the fluxes are unweighted) to keep the water balance exact. With a single soil-bearing cover (w = 1) this reduces to the original single-target flux.

With cflux = 0 (the default) the process is inactive. Requires linked target brick(s) (soil moisture) to read their filling ratio.

Member Function Documentation

◆ AddTargetBrickWithWeights()

void ProcessCapillaryHBV::AddTargetBrickWithWeights ( Brick * targetBrick,
const std::vector< Brick * > & weightSources )
overridevirtual

Add a target brick together with the bricks whose area fractions weight the flux toward it (used by processes that fan out to several targets).

Parameters
targetthe target brick.
weightSourcesthe bricks (land covers) whose area fractions weight the flux.

Reimplemented from Process.

◆ GetRates()

vecDouble ProcessCapillaryHBV::GetRates ( )
overrideprotectedvirtual

Get the rates of the process.

Returns
vector of rates.

Implements Process.

◆ IsValid()

bool ProcessCapillaryHBV::IsValid ( ) const
nodiscardoverridevirtual

Check that everything is correctly defined.

Returns
true if everything is correctly defined.

Implements Process.

◆ LinksMultipleTargets()

bool ProcessCapillaryHBV::LinksMultipleTargets ( ) const
inlinenodiscardoverridevirtual

Check if the process links several target bricks (instead of a single one).

Returns
true if the process links several target bricks.

Reimplemented from Process.

◆ NeedsTargetBrickLinking()

bool ProcessCapillaryHBV::NeedsTargetBrickLinking ( ) const
inlinenodiscardoverridevirtual

Check if the process needs to link the target brick.

Returns
true if the process needs to link the target brick.

Reimplemented from Process.

◆ RegisterProcessSettings()

void ProcessCapillaryHBV::RegisterProcessSettings ( SettingsModel * modelSettings)
static

Register the process parameters and forcing in the settings model.

Parameters
modelSettingsThe settings model to register the parameters in.

◆ SetParameters()

void ProcessCapillaryHBV::SetParameters ( const ProcessSettings & processSettings)
overridevirtual

Assign the parameters to the process.

Parameters
processSettingssettings of the process containing the parameters.

Reimplemented from Process.


The documentation for this class was generated from the following files: