OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
infil.h File Reference

Legacy subcatchment infiltration models and state. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  THorton
 
struct  TGrnAmpt
 
struct  TCurveNum
 

Enumerations

enum  InfilType {
  HORTON ,
  MOD_HORTON ,
  GREEN_AMPT ,
  MOD_GREEN_AMPT ,
  CURVE_NUMBER
}
 

Functions

void infil_create (int n)
 Creates an array of infiltration objects.
 
void infil_delete (void)
 Deletes infiltration objects associated with subcatchments.
 
int infil_readParams (int m, char *tok[], int ntoks)
 Sets infiltration parameters from a line of input data. Format of data line is: subcatch p1 p2 ... (infilMethod).
 
void infil_initState (int j)
 Initializes state of infiltration for a subcatchment.
 
void infil_getState (int j, double x[])
 Retrieves the current infiltration state for a subcatchment.
 
void infil_setState (int j, double x[])
 Restore a subcatchment's selected infiltration model state.
 
void infil_setInfilFactor (int j)
 Assigns a value to the infiltration adjustment factor.
 
double infil_getInfil (int area, double tstep, double rainfall, double runon, double depth)
 Computes infiltration rate depending on infiltration method.
 
void grnampt_getParams (int j, double p[])
 Retrieves Green-Ampt infiltration parameters for a subcatchment.
 
int grnampt_setParams (TGrnAmpt *infil, double p[])
 Assigns Green-Ampt infiltration parameters to a subcatchment.
 
void grnampt_initState (TGrnAmpt *infil)
 Initializes state of Green-Ampt infiltration for a subcatchment.
 
double grnampt_getInfil (TGrnAmpt *infil, double tstep, double irate, double depth, int modelType)
 Computes Green-Ampt infiltration for a subcatchment or a storage node.
 

Variables

THorton * HortInfil
 
TGrnAmpt * GAInfil
 
TCurveNum * CNInfil
 

Detailed Description

Legacy subcatchment infiltration models and state.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com (OpenSWMM maintenance and extensions)
License
Apache-2.0 for OpenSWMM contributions; original EPA SWMM provenance is retained.

Enumeration Type Documentation

◆ InfilType

enum InfilType
Enumerator
HORTON 
MOD_HORTON 
GREEN_AMPT 
MOD_GREEN_AMPT 
CURVE_NUMBER 

Function Documentation

◆ grnampt_getInfil()

double grnampt_getInfil ( TGrnAmpt * infil,
double tstep,
double irate,
double depth,
int modelType )

Computes Green-Ampt infiltration for a subcatchment or a storage node.

Parameters
infilPtr. to Green-Ampt infiltration object.
[in]tstepTime step (sec),.
[in]irateNet "rainfall" rate to upper zone (ft/sec); = rainfall + snowmelt + runon, does not include ponded water (added on below).
[in]depthDepth of ponded water (ft).
[in]modelTypeEither GREEN_AMPT or MOD_GREEN_AMPT.
Returns
Infiltration rate (ft/sec).
Here is the caller graph for this function:

◆ grnampt_getParams()

void grnampt_getParams ( int j,
double p[] )

Retrieves Green-Ampt infiltration parameters for a subcatchment.

Parameters
[in]jSubcatchment index.
pArray of parameter values.
Here is the call graph for this function:

◆ grnampt_initState()

void grnampt_initState ( TGrnAmpt * infil)

Initializes state of Green-Ampt infiltration for a subcatchment.

Parameters
infilPtr. to Green-Ampt infiltration object.
Here is the caller graph for this function:

◆ grnampt_setParams()

int grnampt_setParams ( TGrnAmpt * infil,
double p[] )

Assigns Green-Ampt infiltration parameters to a subcatchment.

Parameters
infilPtr. to Green-Ampt infiltration object.
pArray of parameter values.
Returns
TRUE if parameters are valid, FALSE otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ infil_create()

void infil_create ( int n)

Creates an array of infiltration objects.

Parameters
[in]nNumber of subcatchments.

◆ infil_delete()

void infil_delete ( void )

Deletes infiltration objects associated with subcatchments.

◆ infil_getInfil()

double infil_getInfil ( int j,
double tstep,
double rainfall,
double runon,
double depth )

Computes infiltration rate depending on infiltration method.

Parameters
[in]jSubcatchment index.
[in]tstepRunoff time step (sec).
[in]rainfallRainfall rate (ft/sec).
[in]runonRunon rate from other sub-areas or subcatchments (ft/sec).
[in]depthDepth of surface water on subcatchment (ft).
Returns
Infiltration rate (ft/sec).
Here is the call graph for this function:

◆ infil_getState()

void infil_getState ( int j,
double x[] )

Retrieves the current infiltration state for a subcatchment.

Parameters
[in]jSubcatchment index.
[out]xSubcatchment's infiltration state.

◆ infil_initState()

void infil_initState ( int j)

Initializes state of infiltration for a subcatchment.

Parameters
[in]jSubcatchment index.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ infil_readParams()

int infil_readParams ( int m,
char * tok[],
int ntoks )

Sets infiltration parameters from a line of input data. Format of data line is: subcatch p1 p2 ... (infilMethod).

Parameters
[in]mDefault infiltration model.
tokArray of string tokens.
[in]ntoksNumber of tokens.
Returns
An error code.
Here is the call graph for this function:

◆ infil_setInfilFactor()

void infil_setInfilFactor ( int j)

Assigns a value to the infiltration adjustment factor.

Parameters
[in]jSubcatchment index.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ infil_setState()

void infil_setState ( int j,
double x[] )

Restore a subcatchment's selected infiltration model state.

Parameters
[in]jValid subcatchment/Infil index; Subcatch[j].infilModel selects the decoder.
[in]xNon-null borrowed state array previously produced by infil_getState() for that model. Provide at least six doubles, as in the hotstart record.
Postcondition
Updates the selected Horton, Green-Ampt or curve-number state; unsupported model codes perform no action. Input storage is not retained.

Variable Documentation

◆ CNInfil

TCurveNum* CNInfil
extern

◆ GAInfil

TGrnAmpt* GAInfil
extern

◆ HortInfil

THorton* HortInfil
extern