OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::rdii::RDIISolver Class Reference

#include <RDII.hpp>

Collaboration diagram for openswmm::rdii::RDIISolver:

Public Member Functions

void init (SimulationContext &ctx)
 
int addUnitHydParams (const std::string &name, const UnitHydParams &params)
 Register a unit hydrograph parameter set by name.
 
int findUnitHyd (const std::string &name) const
 Look up unit hydrograph index by name.
 
const std::unordered_map< std::string, int > & uhNameIndex () const
 Read-only access to the UH name → index map (for validation).
 
void computeAll (SimulationContext &ctx, int month, double dt)
 Compute RDII inflows for all groups (buffered, not added to lat_flow).
 
void applyRdiiInflows (SimulationContext &ctx) const
 Apply buffered RDII inflows to node lateral flows.
 

Static Public Member Functions

static int getRainInterval (const UnitHydParams &uh, double wet_step)
 Compute rain processing interval for a UH (minimum limb duration, capped by wet_step).
 
static int getMaxPeriods (const UnitHydParams &uh, int response, int rainInterval)
 Compute max past periods for a UH response given a rain interval.
 

Public Attributes

std::vector< UnitHydParamsuh_params
 
std::vector< std::array< ExpDecayParams, 3 > > decay_params
 

Member Function Documentation

◆ addUnitHydParams()

int openswmm::rdii::RDIISolver::addUnitHydParams ( const std::string &  name,
const UnitHydParams params 
)

Register a unit hydrograph parameter set by name.

Parameters
nameUnit hydrograph name (e.g. from [HYDROGRAPHS] section).
paramsComplete UH parameters for all 12 months x 3 responses.
Returns
Index of the registered UH parameter set.
Here is the caller graph for this function:

◆ applyRdiiInflows()

void openswmm::rdii::RDIISolver::applyRdiiInflows ( SimulationContext ctx) const

Apply buffered RDII inflows to node lateral flows.

Called during routing to add pre-computed RDII to lat_flow, matching legacy addRdiiInflows() which reads from the RDII file.

◆ computeAll()

void openswmm::rdii::RDIISolver::computeAll ( SimulationContext ctx,
int  month,
double  dt 
)

Compute RDII inflows for all groups (buffered, not added to lat_flow).

Reads per-group gage rainfall from ctx.gages.rainfall[gage_idx]. Convolution: RDII = sum(pastRain[i] * r[m][k] * u(t)) Results are stored in node_rdii_flow_ for later application. Should be called at the wet weather step (matching legacy RdiiStep = WetStep).

Here is the call graph for this function:

◆ findUnitHyd()

int openswmm::rdii::RDIISolver::findUnitHyd ( const std::string &  name) const

Look up unit hydrograph index by name.

Returns
Index, or -1 if not found.
Here is the caller graph for this function:

◆ getMaxPeriods()

int openswmm::rdii::RDIISolver::getMaxPeriods ( const UnitHydParams uh,
int  response,
int  rainInterval 
)
static

Compute max past periods for a UH response given a rain interval.

Here is the caller graph for this function:

◆ getRainInterval()

int openswmm::rdii::RDIISolver::getRainInterval ( const UnitHydParams uh,
double  wet_step 
)
static

Compute rain processing interval for a UH (minimum limb duration, capped by wet_step).

Here is the caller graph for this function:

◆ init()

void openswmm::rdii::RDIISolver::init ( SimulationContext ctx)
Here is the call graph for this function:

◆ uhNameIndex()

const std::unordered_map< std::string, int > & openswmm::rdii::RDIISolver::uhNameIndex ( ) const
inline

Read-only access to the UH name → index map (for validation).

Member Data Documentation

◆ decay_params

std::vector<std::array<ExpDecayParams, 3> > openswmm::rdii::RDIISolver::decay_params

Exponential decay params per UH group × response. Same indexing as uh_params; each entry holds [SHORT, MEDIUM, LONG]. active == false means the response uses the legacy linear IA model.

◆ uh_params

std::vector<UnitHydParams> openswmm::rdii::RDIISolver::uh_params

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