SWMM 5.1.010 bug: Rain garden has no infiltration |
I think I found a mistake in SWMM. I described the problem and provided a solution as below. Correct me if I am wrong.
Problem: Rain garden has no infiltration in SWMM 5.1.010
Why:
//... determine which flux rate function to use switch (theLidProc->lidType) { case BIO_CELL: case RAIN_GARDEN: fluxRates = &biocellFluxRates; break;
//... initialize LID objects for (j = 0; j < LidCount; j++) { LidProcs[j].lidType = -1; LidProcs[j].surface.thickness = 0.0; LidProcs[j].surface.voidFrac = 1.0; LidProcs[j].surface.roughness = 0.0; LidProcs[j].surface.surfSlope = 0.0; LidProcs[j].pavement.thickness = 0.0; LidProcs[j].soil.thickness = 0.0; LidProcs[j].storage.thickness = 0.0; LidProcs[j].storage.kSat = 0.0;
double getStorageInfilRate() // // Purpose: computes infiltration rate between storage zone and // 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;
//... special case of no storage layer present if ( theLidProc->storage.thickness == 0.0 ) { StorageEvap = 0.0; maxRate = MIN(StorageInfil, SoilPerc); SoilPerc = maxRate; StorageInfil = maxRate; }
My solution is to either add a switch control in biocellFluxRates function where SoilPerc is not reset to 0 when dealing with rain garden, or, initialize LID units with super large seepage rate (the storage.kSat variable).
By the way, I copied these code from openSWMM SWMM code viewer.
I believe you are correct, based both on your code analysis and running a simple example. The fix would be to add a Seepage Rate parameter (same as used by the Storage Layer) to the Rain Garden that reflects the Ksat of the native soil underneath the garden which may be different than the plant growth media used in the garden. This native Ksat would then be used to initialize storage.Ksat.
For now the work around is to use a bio-retention cell, instead of a rain garden, with a very small storage layer thickness (like 1 mm), which is what was done in version 5.0 before the separate Rain Garden LID was introduced.