Saturday, January 21, 2023

MSDOS Batch Commands

 You can use the "dir" command in MS-DOS to find all the files in a folder ending in ".inp" and its subfolders. The syntax for this command is as follows:

dir /s /b /o:n <folder_path>\*.inp
  • The "/s" option tells the command to search for files in all subfolders of the specified folder.
  • The "/b" option tells the command to display the list of files in a bare format (without any additional information such as file size or date modified).
  • The "/o:n" option tells the command to sort the list of files by name in ascending order.
  • Replace <folder_path> with the path of the folder that you want to search.

For example, to search for all files with the extension ".inp" in the folder "C:\Examples" and its subfolders, you would use the following command:

dir /s /b /o:n C:\Examples\*.inp

This will display a list of all files in the specified folder and its subfolders that end with the ".inp" extension and the output will be sorted by name.

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);
}

SWMM 5.2.2 Code for LID Function getStorageExfilRate

 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);

SWMM 5.2.2 Code for LID Function getSoilPercRate

 This code defines a function called "getSoilPercRate" that takes in a single input, "theta", which represents the moisture content (fraction). The function then calculates the percolation rate of water through a LID's soil layer and returns this value as output (in units of ft/s). The function first checks if the soil moisture is less than or equal to the field capacity, and if so, the function returns 0.0 (no percolation). If the soil moisture exceeds the field capacity, the function calculates the percolation rate as the unsaturated hydraulic conductivity and returns this value.


double getSoilPercRate(double theta) // // Purpose: computes percolation rate of water through a LID's soil layer. // Input: theta = moisture content (fraction) // Output: returns percolation rate within soil layer (ft/s) // { double delta; // moisture deficit // ... no percolation if soil moisture <= field capacity if ( theta <= theLidProc->soil.fieldCap ) return 0.0; // ... perc rate = unsaturated hydraulic conductivity delta = theLidProc->soil.porosity - theta; return theLidProc->soil.kSat * exp(-delta * theLidProc->soil.kSlope);

ICM SWMM sw_2d_boundary_line Variable Names for SQL and Ruby Scripts

      The file "opwrowobjectlayoutswmm.xml" is a data file used by the Integrated Urban Water Management Model (ICM) software. The ICM software is used toVV simulate and analyze the performance of stormwater management systems, including the design and operation of stormwater collection and conveyance systems.

The file "opwrowobjectlayoutswmm.xml" contains variable names specific to the SWMM (Storm Water Management Model) conduit feature in the ICM software. These variable names are used in SQL and Ruby scripts, which are programming languages used to manipulate and analyze the data generated by the ICM software.

These variable names are used to represent the different attributes of a sw_2d_boundary_line within the ICM software and the SQL and Ruby scripts allow users to access and manipulate that data in a variety of ways.


<table name="sw_2d_boundary_line">
<group name="Boundary definition">
line_id
line_type
<field menu="sw_head_unit_discharge">head_unit_discharge_id
length
bed_load_boundary
suspended_load_boundary
</group>
<group import_group="gen_prop"/>
<group import_group="user_prop"/>
</table>
<table name="sw_head_unit_discharge">
<group name="Head unit flow definition">
head_unit_discharge_id
head_unit_discharge_description
HUDP_table
</group>
<group import_group="gen_prop"/>
<group import_group="user_prop"/>

Table 1: sw_2d_boundary_line

  • Group 1: Boundary definition
    • line_id
    • line_type
    • head_unit_discharge_id (from menu "sw_head_unit_discharge")
    • length
    • bed_load_boundary
    • suspended_load_boundary
  • Group 2: Imports group "gen_prop"
  • Group 3: Imports group "user_prop"

Table 2: sw_head_unit_discharge

  • Group 1: Head unit flow definition
    • head_unit_discharge_id
    • head_unit_discharge_description
    • HUDP_table
  • Group 2: Imports group "gen_prop"
  • Group 3: Imports group "user_prop"

ICM SWMM sw_mesh_level_zone Variable Names for SQL and Ruby Scripts

     The file "opwrowobjectlayoutswmm.xml" is a data file used by the Integrated Urban Water Management Model (ICM) software. The ICM software is used to simulate and analyze the performance of stormwater management systems, including the design and operation of stormwater collection and conveyance systems.

The file "opwrowobjectlayoutswmm.xml" contains variable names specific to the SWMM (Storm Water Management Model) conduit feature in the ICM software. These variable names are used in SQL and Ruby scripts, which are programming languages used to manipulate and analyze the data generated by the ICM software.

These variable names are used to represent the different attributes of a sw_mesh_level_zone within the ICM software and the SQL and Ruby scripts allow users to access and manipulate that data in a variety of ways.

<table name="sw_mesh_level_zone">
<group name="Mesh level zone definition">
polygon_id
area
level_type
use_upper_limit
upper_limit_level
use_lower_limit
lower_limit_level
level_sections
level
raise_by
</group>
<group import_group="gen_prop"/>
<group import_group="user_prop"/>

Table: sw_mesh_level_zone


GroupColumn Name
Mesh level zone definitionpolygon_id
Mesh level zone definitionarea
Mesh level zone definitionlevel_type
Mesh level zone definitionuse_upper_limit
Mesh level zone definitionupper_limit_level
Mesh level zone definitionuse_lower_limit
Mesh level zone definitionlower_limit_level
Mesh level zone definitionlevel_sections
Mesh level zone definitionlevel
Mesh level zone definitionraise_by
Imports group "gen_prop"
Imports group "user_prop"

Wednesday, January 18, 2023

A Disturbance in a Water Distribution System

 A disturbance in a water distribution system can be defined as any event that causes a change in the normal flow or pressure conditions within the system. These disturbances can be caused by a variety of situations, such as changes in pump operations, valve movements, boundary pressures, demand conditions, and transmission conditions.

Pump startup or shutdown is one of the most common disturbances in water distribution systems. When a pump is started, it can cause an increase in flow and pressure within the system, which can lead to variations in flow and pressure downstream. On the other hand, when a pump is shut down, it can lead to a decrease in flow and pressure, which can also cause variations in flow and pressure downstream. These variations in flow and pressure can have a significant impact on the overall performance and reliability of the system.

Valve opening or closing can also cause disturbances in water distribution systems. When a valve is opened, it increases the flow area within the system, which can lead to an increase in flow and pressure. On the other hand, when a valve is closed, it decreases the flow area within the system, which can lead to a decrease in flow and pressure. These variations in flow and pressure can also have a significant impact on the overall performance and reliability of the system.

Changes in boundary pressures, such as changes in the level or pressure of reservoirs, tanks, etc. can also cause disturbances in water distribution systems. These changes in boundary pressures can lead to variations in pressure and water quality within the system, which can impact the overall performance and reliability of the system.

Rapid changes in demand conditions, such as hydrant flushing, can also cause disturbances in water distribution systems. Sudden changes in water usage can lead to variations in flow and pressure within the system, which can impact the overall performance and reliability of the system.

Changes in transmission conditions, such as pipe breaks or leaks, can also cause disturbances in water distribution systems. These changes in transmission conditions can lead to variations in flow and pressure, as well as water quality issues within the system.

It is important to note that water distribution systems are complex systems and disturbances in one area can have knock-on effects in other parts of the system. Therefore, it is important to monitor and control the system to ensure stability and reliability.

For the EPS option, doing multi-fireflow is important as it will look for the lowest pressure and report that, instead of just reporting the pressure at a specific hydrant. This allows for a more comprehensive understanding of the system and can help identify potential issues before they become critical.

InfoSWMM: A 2030 AI-Assisted Study Guide

  InfoSWMM: A 2030 AI-Assisted Study Guide delete   InfoSWMM: A 2030 AI-Assisted Study Guide A comprehensive study guide for someone in 2030...