![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Low-impact development controls, usage, and state. More...
Go to the source code of this file.
Classes | |
| struct | TSurfaceLayer |
| struct | TPavementLayer |
| struct | TSoilLayer |
| struct | TStorageLayer |
| struct | TDrainLayer |
| struct | TDrainMatLayer |
| struct | TLidProc |
| struct | TWaterBalance |
| struct | TLidRptFile |
| struct | TLidUnit |
Macros | |
| #define | MAX_LAYERS 4 |
Enumerations | |
| enum | LidTypes { BIO_CELL , RAIN_GARDEN , GREEN_ROOF , INFIL_TRENCH , POROUS_PAVEMENT , RAIN_BARREL , VEG_SWALE , ROOF_DISCON } |
| enum | TimePeriod { PREVIOUS , CURRENT } |
Functions | |
| void | lid_create (int lidCount, int subcatchCount) |
| Allocate LID process definitions and per-subcatchment LID group storage. | |
| void | lid_delete (void) |
| Deletes all LID objects. | |
| int | lid_readProcParams (char *tok[], int ntoks) |
| Reads LID process information from line of input data file. | |
| int | lid_readGroupParams (char *tok[], int ntoks) |
| Reads input data for a LID unit placed in a subcatchment. | |
| int | lid_setDrainParams (int lidIndex, double coeff, double expon, double offset) |
| Updates the underdrain flow parameters of a LID process at runtime (API support). The drain parameters are read live each step (lidproc.c), so an edit takes effect on the next step. | |
| void | lid_validate (void) |
| Validates LID process and group parameters. | |
| void | lid_initState (void) |
| Initializes the internal state of each LID in a subcatchment. | |
| void | lid_setOldGroupState (int subcatch) |
| Saves the current drain flow rate for the LIDs in a subcatchment. | |
| double | lid_getPervArea (int subcatch) |
| Retrieves amount of pervious LID area in a subcatchment. | |
| double | lid_getFlowToPerv (int subcatch) |
| Retrieves flow returned from LID treatment to pervious area of a subcatchment. | |
| double | lid_getDrainFlow (int subcatch, int timePeriod) |
| Select the previous or current total LID drain flow of a subcatchment. | |
| double | lid_getStoredVolume (int subcatch) |
| Computes stored volume of water for all LIDs grouped within a subcatchment. | |
| void | lid_addDrainLoads (int subcatch, double c[], double tStep) |
| Add LID drain pollutant export and BMP removal to mass-balance totals. | |
| void | lid_addDrainRunon (int subcatch) |
| Route previous-period LID drain flow and pollutant loads to receiving subcatchments. | |
| void | lid_addDrainInflow (int subcatch, double f) |
| Add temporally interpolated LID drain inflows to conveyance nodes. | |
| void | lid_getRunoff (int subcatch, double tStep) |
| Advance LID units and compute runoff, drain and return flows. | |
| void | lid_writeSummary (void) |
| Writes summary of LID processes used to report file. | |
| void | lid_writeWaterBalance (void) |
| Writes a LID performance summary table to the project's report file. | |
| void | lidproc_initWaterBalance (TLidUnit *lidUnit, double initVol) |
| Initializes the water balance components of a LID unit. | |
| double | lidproc_getOutflow (TLidUnit *lidUnit, TLidProc *lidProc, double inflow, double evap, double infil, double maxInfil, double tStep, double *lidEvap, double *lidInfil, double *lidDrain) |
| Computes runoff outflow from a single LID unit. | |
| void | lidproc_saveResults (TLidUnit *lidUnit, double ucfRainfall, double ucfRainDepth) |
| Update LID water balance and optionally emit detailed report results. | |
Low-impact development controls, usage, and state.
| #define MAX_LAYERS 4 |
| enum LidTypes |
| enum TimePeriod |
| void lid_addDrainInflow | ( | int | j, |
| double | f ) |
Add temporally interpolated LID drain inflows to conveyance nodes.
| [in] | j | Valid contributing subcatchment index. |
| [in] | f | Current-period interpolation weight, normally in [0, 1]; old values use weight 1 - f and the function does not clamp extrapolation. |
| void lid_addDrainLoads | ( | int | j, |
| double | c[], | ||
| double | tStep ) |
Add LID drain pollutant export and BMP removal to mass-balance totals.
| [in] | j | Valid contributing subcatchment index. |
| [in] | c | Borrowed Nobjects[POLLUT] concentration array, in pollutant mass per liter. |
| [in] | tStep | Runoff interval in seconds. |
| void lid_addDrainRunon | ( | int | j | ) |
Route previous-period LID drain flow and pollutant loads to receiving subcatchments.
| [in] | j | Valid contributing subcatchment index. |
| void lid_create | ( | int | lidCount, |
| int | subcatchCount ) |
Allocate LID process definitions and per-subcatchment LID group storage.
| [in] | lidCount | Nonnegative number of LID process definitions. |
| [in] | subcatchCount | Nonnegative number of subcatchment group slots. |
| void lid_delete | ( | void | ) |
Deletes all LID objects.
| double lid_getDrainFlow | ( | int | j, |
| int | timePeriod ) |
Select the previous or current total LID drain flow of a subcatchment.
| [in] | j | Valid subcatchment/LidGroups index. |
| [in] | timePeriod | PREVIOUS selects oldDrainFlow; any other value selects newDrainFlow. |
| double lid_getFlowToPerv | ( | int | j | ) |
Retrieves flow returned from LID treatment to pervious area of a subcatchment.
| [in] | j | Subcatchment index. |
| double lid_getPervArea | ( | int | j | ) |
Retrieves amount of pervious LID area in a subcatchment.
| [in] | j | Subcatchment index. |
| void lid_getRunoff | ( | int | j, |
| double | tStep ) |
Advance LID units and compute runoff, drain and return flows.
| [in] | j | Valid subcatchment index with initialized runoff state. |
| [in] | tStep | Positive runoff interval in seconds. |
| double lid_getStoredVolume | ( | int | j | ) |
Computes stored volume of water for all LIDs grouped within a subcatchment.
| [in] | j | Subcatchment index. |
| void lid_initState | ( | void | ) |
Initializes the internal state of each LID in a subcatchment.
| int lid_readGroupParams | ( | char * | toks[], |
| int | ntoks ) |
Reads input data for a LID unit placed in a subcatchment.
| toks | Array of string tokens. | |
| [in] | ntoks | Number of tokens. |
| int lid_readProcParams | ( | char * | toks[], |
| int | ntoks ) |
Reads LID process information from line of input data file.
| toks | Array of string tokens. | |
| [in] | ntoks | Number of tokens. |
parameters LID_ID PAVEMENT parameters LID_ID SOIL parameters LID_ID STORAGE parameters LID_ID DRAIN parameters LID_ID DRAINMAT parameters LID_ID REMOVALS parameters. | int lid_setDrainParams | ( | int | lidIndex, |
| double | coeff, | ||
| double | expon, | ||
| double | offset ) |
Updates the underdrain flow parameters of a LID process at runtime (API support). The drain parameters are read live each step (lidproc.c), so an edit takes effect on the next step.
| [in] | lidIndex | LID process index. |
| [in] | coeff | Underdrain flow coeff. (in/hr or mm/hr). |
| [in] | expon | Underdrain head exponent. |
| [in] | offset | Offset height of underdrain (in or mm). |
| void lid_setOldGroupState | ( | int | j | ) |
Saves the current drain flow rate for the LIDs in a subcatchment.
| [in] | j | Subcatchment index. |
| void lid_validate | ( | void | ) |
Validates LID process and group parameters.
| void lid_writeSummary | ( | void | ) |
Writes summary of LID processes used to report file.
| void lid_writeWaterBalance | ( | void | ) |
Writes a LID performance summary table to the project's report file.
| double lidproc_getOutflow | ( | TLidUnit * | lidUnit, |
| TLidProc * | lidProc, | ||
| double | inflow, | ||
| double | evap, | ||
| double | infil, | ||
| double | maxInfil, | ||
| double | tStep, | ||
| double * | lidEvap, | ||
| double * | lidInfil, | ||
| double * | lidDrain ) |
Computes runoff outflow from a single LID unit.
| lidUnit | Ptr. to specific LID unit being analyzed. | |
| lidProc | Ptr. to generic LID process of the LID unit. | |
| [in] | inflow | Runoff rate captured by LID unit (ft/s). |
| [in] | evap | Potential evaporation rate (ft/s). |
| [in] | infil | Infiltration rate to native soil (ft/s). |
| [in] | maxInfil | Max. infiltration rate to native soil (ft/s). |
| [in] | tStep | Time step (sec). |
| [out] | lidEvap | Evaporation rate for LID unit (ft/s). |
| [out] | lidInfil | Infiltration rate for LID unit (ft/s). |
| [out] | lidDrain | Drain flow for LID unit (ft/s). |
For debugging only ******************************************** if (i == 0) { fprintf(Frpt.file, "\n WARNING 09: integration failed to converge at %s %s", theDate, theTime); fprintf(Frpt.file, "\n for LID %s placed in subcatchment %s.", theLidProc->ID, theSubcatch->ID); }
| void lidproc_initWaterBalance | ( | TLidUnit * | lidUnit, |
| double | initVol ) |
Initializes the water balance components of a LID unit.
| lidUnit | A particular LID unit. | |
| [in] | initVol | Initial water volume stored in the unit (ft). |
| void lidproc_saveResults | ( | TLidUnit * | lidUnit, |
| double | ucfRainfall, | ||
| double | ucfRainDepth ) |
Update LID water balance and optionally emit detailed report results.
| [in,out] | lidUnit | Non-null borrowed current LID unit; its report-file state and saved result string may be updated. |
| [in] | ucfRainfall | Rate conversion from ft/s to authored in/hr or mm/hr. |
| [in] | ucfRainDepth | Depth conversion from feet to authored inches or millimeters. |