Saturday, January 21, 2023

SWMM 5.2.2 Code for LID Function getSurfaceOutflowRate

This code defines a function called "getSurfaceOutflowRate" which calculates the outflow rate from a LID's surface layer. The function takes in a depth of ponded water on the surface layer (in feet) and returns the outflow from the surface layer (in feet per second) as output. The function starts by initializing two variables, "delta" and "outflow", to 0.0. Then, it checks if the depth of ponded water is below the storage depth and if it is, it immediately returns 0.0.

Otherwise, the function calculates the outflow from overland flow Manning equation, which is the product of surface layer's alpha, the fifth root of delta, full width of the LID, and the area of the LID. The function also checks if the outflow is greater than the change in time step and if it is, it limits the outflow to the change in time step.

VariableDescription
deltaThe difference between the depth of ponded water and the thickness of the surface layer
outflowThe outflow rate from the surface layer
theLidProc->surface.thicknessThe thickness of the surface layer
theLidProc->surface.alphaThe alpha value used in the overland flow Manning equation
theLidUnit->fullWidthThe full width of the LID
theLidUnit->areaThe area of the LID
TstepThe change in time step

Note that this function should not be applied to swales or rain barrels.



double getSurfaceOutflowRate(double depth)
//
//  Purpose: computes outflow rate from a LID's surface layer.
//  Input:   depth = depth of ponded water on surface layer (ft)
//  Output:  returns outflow from surface layer (ft/s)
//
//  Note: this function should not be applied to swales or rain barrels.
//
{
    double delta;
    double outflow;

    //... no outflow if ponded depth below storage depth
    delta = depth - theLidProc->surface.thickness;
    if ( delta < 0.0 ) return 0.0;

    //... compute outflow from overland flow Manning equation
    outflow = theLidProc->surface.alpha * pow(delta, 5.0/3.0) *
              theLidUnit->fullWidth / theLidUnit->area;
    outflow = MIN(outflow, delta / Tstep);
    return outflow;
}

No comments:

AI Rivers of Wisdom about ICM SWMM

Here's the text "Rivers of Wisdom" formatted with one sentence per line: [Verse 1] 🌊 Beneath the ancient oak, where shadows p...