Sunday, January 15, 2023

SWMM 5.2.2 Function for LID updateWaterBalance

 This code is for updating the water balance for a low impact development (LID) unit. It takes in several input parameters such as inflow, evaporation, infiltration, surface flow, drain flow, and storage. It then calculates the volume of water treated, and updates the water balance object for the LID unit with the inflow, evaporation, infiltration, surface flow, drain flow, and final volume of water stored in the unit. The time step (Tstep) is used to convert the rates to total volumes for the current time step. The output of this function is updating the member variables of the passed in LID unit and doesn't return any value.

void updateWaterBalance(TLidUnit *lidUnit, double inflow, double evap, double infil, double surfFlow, double drainFlow, double storage) // // Purpose: updates components of the water mass balance for a LID unit // over the current time step. // Input: lidUnit = a particular LID unit // inflow = runon + rainfall to the LID unit (ft/s) // evap = evaporation rate from the unit (ft/s) // infil = infiltration out the bottom of the unit (ft/s) // surfFlow = surface runoff from the unit (ft/s) // drainFlow = underdrain flow from the unit // storage = volume of water stored in the unit (ft) // Output: none // { lidUnit->volTreated += inflow * Tstep; lidUnit->waterBalance.inflow += inflow * Tstep; lidUnit->waterBalance.evap += evap * Tstep; lidUnit->waterBalance.infil += infil * Tstep; lidUnit->waterBalance.surfFlow += surfFlow * Tstep; lidUnit->waterBalance.drainFlow += drainFlow * Tstep; lidUnit->waterBalance.finalVol = storage; }

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 प्रत...