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

Water balance processes within low-impact development controls. More...

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "lid.h"
#include "headers.h"
Include dependency graph for lidproc.c:

Macros

#define _CRT_SECURE_NO_DEPRECATE
 
#define STOPTOL   0.00328
 
#define MINFLOW   2.3e-8
 

Enumerations

enum  LidLayerTypes {
  SURF ,
  SOIL ,
  STOR ,
  PAVE ,
  DRAIN
}
 
enum  LidRptVars {
  SURF_INFLOW ,
  TOTAL_EVAP ,
  SURF_INFIL ,
  PAVE_PERC ,
  SOIL_PERC ,
  STOR_EXFIL ,
  SURF_OUTFLOW ,
  STOR_DRAIN ,
  SURF_DEPTH ,
  PAVE_DEPTH ,
  SOIL_MOIST ,
  STOR_DEPTH ,
  MAX_RPT_VARS
}
 

Functions

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.
 

Variables

char HasWetLids
 

Detailed Description

Water balance processes within low-impact development controls.

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.

Macro Definition Documentation

◆ _CRT_SECURE_NO_DEPRECATE

#define _CRT_SECURE_NO_DEPRECATE

◆ MINFLOW

#define MINFLOW   2.3e-8

◆ STOPTOL

#define STOPTOL   0.00328

Enumeration Type Documentation

◆ LidLayerTypes

Enumerator
SURF 
SOIL 
STOR 
PAVE 
DRAIN 

◆ LidRptVars

enum LidRptVars
Enumerator
SURF_INFLOW 
TOTAL_EVAP 
SURF_INFIL 
PAVE_PERC 
SOIL_PERC 
STOR_EXFIL 
SURF_OUTFLOW 
STOR_DRAIN 
SURF_DEPTH 
PAVE_DEPTH 
SOIL_MOIST 
STOR_DEPTH 
MAX_RPT_VARS 

Function Documentation

◆ lidproc_getOutflow()

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.

Parameters
lidUnitPtr. to specific LID unit being analyzed.
lidProcPtr. to generic LID process of the LID unit.
[in]inflowRunoff rate captured by LID unit (ft/s).
[in]evapPotential evaporation rate (ft/s).
[in]infilInfiltration rate to native soil (ft/s).
[in]maxInfilMax. infiltration rate to native soil (ft/s).
[in]tStepTime step (sec).
[out]lidEvapEvaporation rate for LID unit (ft/s).
[out]lidInfilInfiltration rate for LID unit (ft/s).
[out]lidDrainDrain flow for LID unit (ft/s).
Returns
Surface runoff rate from the 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); }

Here is the call graph for this function:

◆ lidproc_initWaterBalance()

void lidproc_initWaterBalance ( TLidUnit * lidUnit,
double initVol )

Initializes the water balance components of a LID unit.

Parameters
lidUnitA particular LID unit.
[in]initVolInitial water volume stored in the unit (ft).
Here is the caller graph for this function:

◆ lidproc_saveResults()

void lidproc_saveResults ( TLidUnit * lidUnit,
double ucfRainfall,
double ucfRainDepth )

Update LID water balance and optionally emit detailed report results.

Parameters
[in,out]lidUnitNon-null borrowed current LID unit; its report-file state and saved result string may be updated.
[in]ucfRainfallRate conversion from ft/s to authored in/hr or mm/hr.
[in]ucfRainDepthDepth conversion from feet to authored inches or millimeters.
Precondition
theLidUnit identifies the same active unit as lidUnit, and shared current fluxes/volumes were set by the immediately preceding evaluation.
Postcondition
Updates its water balance, HasWetLids and dry-period report tracking. Does not close report streams or check fprintf failures.
Here is the call graph for this function:

Variable Documentation

◆ HasWetLids

char HasWetLids
extern