Sunday, January 15, 2023

SWMM 5.2.2 Function for LID getSurfaceOverflowRate

 This code is for calculating the surface overflow rate from a low impact development (LID) unit. It takes in the surface depth of water stored in the surface layer as an input, and returns the overflow rate in cubic feet per second. It calculates the overflow rate by first determining the difference between the surface depth and the LID unit's surface layer thickness. If this difference is less than or equal to zero, the function returns zero, indicating no overflow. Otherwise, it sets the surface depth to the surface layer thickness, and calculates the overflow rate as the difference times the void fraction of the surface layer divided by the time step (Tstep).


double getSurfaceOverflowRate(double* surfaceDepth) // // Purpose: finds surface overflow rate from a LID unit. // Input: surfaceDepth = depth of water stored in surface layer (ft) // Output: returns the overflow rate (ft/s) // { double delta = *surfaceDepth - theLidProc->surface.thickness; if ( delta <= 0.0 ) return 0.0; *surfaceDepth = theLidProc->surface.thickness; return delta * theLidProc->surface.voidFrac / Tstep; }

No comments:

Today is day 356 or 97.5 percent of the year 2024

English: Today is day 356 or 97.5 percent of the year 2024 Mandarin Chinese: 今天是2024年的第356天,即97.5% Hindi: आज 2024 का 356वां दिन या 97.5 प्रत...