Showing posts with label SWMM 5.2.2 Code for LID Function getPavementPermRate. Show all posts
Showing posts with label SWMM 5.2.2 Code for LID Function getPavementPermRate. Show all posts

Saturday, January 21, 2023

SWMM 5.2.2 Code for LID Function getPavementPermRate

This code defines a function called "getPavementPermRate" which calculates the reduced permeability of a pavement layer due to clogging. The function does not take in any inputs and returns the reduced permeability of the pavement layer (in feet per second) as output. The function starts by initializing three variables "permReduction", "clogFactor" and "regenDays".

VariableDescription
permReductionThe permeability reduction due to clogging
clogFactorThe clogging factor of the pavement layer
regenDaysThe number of days it takes to regenerate the permeability of the pavement layer

The function then checks if clogFactor is greater than 0.0, if it is, it proceeds to check if regenDays is greater than 0.0. If regenDays is greater than 0.0, the function checks if OldRunoffTime is greater than or equal to the next regeneration day, if it is, the function reduces the total volume treated by the degree of regeneration and updates the next day that regeneration occurs.

Lastly, the function calculates the permeability reduction factor and limits it to 1.0. It then returns the effective pavement permeability by multiplying the pavement's kSat value by (1-permReduction).



double getPavementPermRate()
//
//  Purpose: computes reduced permeability of a pavement layer due to
//           clogging.
//  Input:   none
//  Output:  returns the reduced permeability of the pavement layer (ft/s).
//
{
    double permReduction = 0.0;
    double clogFactor= theLidProc->pavement.clogFactor;
    double regenDays = theLidProc->pavement.regenDays;

    // ... find permeability reduction due to clogging     
    if ( clogFactor > 0.0 )
    {
        // ... see if permeability regeneration has occurred
        //     (regeneration is assumed to reduce the total
        //      volumetric loading that the pavement has received)
        if ( regenDays > 0.0 )
        {
            if ( OldRunoffTime / 1000.0 / SECperDAY >= theLidUnit->nextRegenDay )
            {
                // ... reduce total volume treated by degree of regeneration
                theLidUnit->volTreated *= 
                    (1.0 - theLidProc->pavement.regenDegree);

                // ... update next day that regenration occurs
                theLidUnit->nextRegenDay += regenDays;
            }
        }

        // ... find permeabiity reduction factor
        permReduction = theLidUnit->volTreated / clogFactor;
        permReduction = MIN(permReduction, 1.0);
    }

    // ... return the effective pavement permeability
    return theLidProc->pavement.kSat * (1.0 - permReduction);
}

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...