Legacy subcatchment infiltration models and state.
More...
Go to the source code of this file.
|
| 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.
|
| |
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)
- Copyright
- Copyright (c) 2026 Caleb Buahin. OpenSWMM contributions only; original EPA SWMM credits are retained.
- License
- Apache-2.0 for OpenSWMM contributions; original EPA SWMM provenance is retained.
◆ InfilType
| Enumerator |
|---|
| HORTON | |
| MOD_HORTON | |
| GREEN_AMPT | |
| MOD_GREEN_AMPT | |
| CURVE_NUMBER | |
◆ 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
-
| infil | Ptr. to Green-Ampt infiltration object. |
| [in] | tstep | Time step (sec),. |
| [in] | irate | Net "rainfall" rate to upper zone (ft/sec); = rainfall + snowmelt + runon, does not include ponded water (added on below). |
| [in] | depth | Depth of ponded water (ft). |
| [in] | modelType | Either GREEN_AMPT or MOD_GREEN_AMPT. |
- Returns
- Infiltration rate (ft/sec).
◆ grnampt_getParams()
| void grnampt_getParams |
( |
int | j, |
|
|
double | p[] ) |
Retrieves Green-Ampt infiltration parameters for a subcatchment.
- Parameters
-
| [in] | j | Subcatchment index. |
| p | Array of parameter values. |
◆ grnampt_initState()
| void grnampt_initState |
( |
TGrnAmpt * | infil | ) |
|
Initializes state of Green-Ampt infiltration for a subcatchment.
- Parameters
-
| infil | Ptr. to Green-Ampt infiltration object. |
◆ grnampt_setParams()
| int grnampt_setParams |
( |
TGrnAmpt * | infil, |
|
|
double | p[] ) |
Assigns Green-Ampt infiltration parameters to a subcatchment.
- Parameters
-
| infil | Ptr. to Green-Ampt infiltration object. |
| p | Array of parameter values. |
- Returns
- TRUE if parameters are valid, FALSE otherwise.
◆ infil_create()
| void infil_create |
( |
int | n | ) |
|
Creates an array of infiltration objects.
- Parameters
-
| [in] | n | Number 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] | j | Subcatchment index. |
| [in] | tstep | Runoff time step (sec). |
| [in] | rainfall | Rainfall rate (ft/sec). |
| [in] | runon | Runon rate from other sub-areas or subcatchments (ft/sec). |
| [in] | depth | Depth of surface water on subcatchment (ft). |
- Returns
- Infiltration rate (ft/sec).
◆ infil_getState()
| void infil_getState |
( |
int | j, |
|
|
double | x[] ) |
Retrieves the current infiltration state for a subcatchment.
- Parameters
-
| [in] | j | Subcatchment index. |
| [out] | x | Subcatchment's infiltration state. |
◆ infil_initState()
| void infil_initState |
( |
int | j | ) |
|
Initializes state of infiltration for a subcatchment.
- Parameters
-
◆ 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] | m | Default infiltration model. |
| tok | Array of string tokens. |
| [in] | ntoks | Number of tokens. |
- Returns
- An error code.
◆ infil_setInfilFactor()
| void infil_setInfilFactor |
( |
int | j | ) |
|
Assigns a value to the infiltration adjustment factor.
- Parameters
-
◆ infil_setState()
| void infil_setState |
( |
int | j, |
|
|
double | x[] ) |
Restore a subcatchment's selected infiltration model state.
- Parameters
-
| [in] | j | Valid subcatchment/Infil index; Subcatch[j].infilModel selects the decoder. |
| [in] | x | Non-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.
◆ CNInfil
◆ GAInfil
◆ HortInfil