This code defines a function called "getStorageExfilRate" which calculates the exfiltration rate (infiltration rate) of water from a storage zone into the native soil beneath a "LID" (low impact development). The function takes in the depth of the water storage zone (in feet) and returns the infiltration rate (in feet per second) as output. The function starts by initializing two variables, "infil" and "clogFactor", to 0.0. Then, it checks if the storage zone's "kSat" value is 0.0, and if it is, it immediately returns 0.0. If not, it checks if "MaxNativeInfil" is 0.0, and if it is, it also immediately returns 0.0. Next, the function calculates a reduction factor for clogging, and limits the infiltration rate by any groundwater-imposed limits. Finally, the function returns the minimum value of the infiltration rate or the MaxNativeInfil.
double getStorageExfilRate() // // Purpose: computes exfiltration rate from storage zone into // native soil beneath a LID. // Input: depth = depth of water storage zone (ft) // Output: returns infiltration rate (ft/s) // { double infil = 0.0; double clogFactor = 0.0; if ( theLidProc->storage.kSat == 0.0 ) return 0.0; if ( MaxNativeInfil == 0.0 ) return 0.0; //... reduction due to clogging clogFactor = theLidProc->storage.clogFactor; if ( clogFactor > 0.0 ) { clogFactor = theLidUnit->waterBalance.inflow / clogFactor; clogFactor = MIN(clogFactor, 1.0); } //... infiltration rate = storage Ksat reduced by any clogging infil = theLidProc->storage.kSat * (1.0 - clogFactor); //... limit infiltration rate by any groundwater-imposed limit return MIN(infil, MaxNativeInfil);