Skip to content

Tool for rapid prototyping of a hydraulic model that can be read and edited with SWMM.

License

Notifications You must be signed in to change notification settings

BuczynskiRafal/rapid-catchment-generator

Repository files navigation

Documentation Status License: MIT PyPI version fury.io GitHub Actions Build Status codecov

Rapid catchment generator

Tool for rapid prototyping of a hydraulic model that can be read and edited with SWMM. The generator was created using feature analysis and surface runoff research from the literature. Fuzzy logic controller rules were developed using parameterized categories of soil, slope, and permeability. The catchment configuration procedure was simplified by mapping typical storage and Manning's coefficients. The use of fuzzy logic rules allows the system to be modified to adjust the categories to certain situations. The use of membership functions allows us to increase computation accuracy and customize the tool to diverse applications. Following alteration of the catchment in the SWMM GUI allows for accurate portrayal of the real condition of the catchment.

Using the Graphical User Interface (GUI)

One of the most user-friendly ways to utilize the capabilities of RCG is through its intuitive graphical user interface (GUI) application. The GUI provides an easy-to-navigate environment where users can input parameters, manipulate data, and visualize results, all without the need for complex coding or scripting.

Getting Started

To get started with the RCG GUI, simply follow these steps:

  1. Click the file "RCG.exe", gitchub will take you to "https://github.com/BuczynskiRafal/rapid-catchment-generator/blob/main/RCG.exe". On the right side of the window is the "download" button, download the file.
  2. Double-click on the file downloaded to the desired location. After installation, the RCG window will appear.
  3. Fill in the data and generate the catchment with the "Run" button.

Requirements

  • Python 3

Usage from terminal

Create a virtual environment:

python3 -m venv venv

Download and install the required dependencies:

python3 pip install -r requirements

To run the script, use the following command:

python3 rcg.runner file path

where file path is the path to the SWMM model file.

Enter data into the terminal according to the instructions it displays. The file is automatically saved in the same directory.

How it is built

The diagram below shows the construction of the Rapid Catchment Generator. The modular form of the system allows easy adaptation to specific user needs and tuning to achieve greater accuracy.

About

For the construction of the catchment generator, the type of land use was divided according to Table 1, the land cover according to Table 2. The categories were determined on the basis of the data presented by (Dołęga, Rogala, 1973), given below in Table 3.

Table 1. Land use categories

Number Land Use
1 marshes and lowlands
2 flats and plateaus
3 flats and plateaus in combination with hills
4 hills with gentle slopes
5 steeper hills and foothills
6 hills and outcrops of mountain ranges
7 higher hills
8 mountains
9 highest mountains

Table 2. Land cover categories

Number Land cover
1 medium conditions
2 permeable areas
3 permeable terrain on plains
4 hilly
5 mountains
6 bare rocky slopes
7 urban
8 suburban
9 rural
10 forests
11 meadows
12 arable
13 marshes

Table 3. Runoff coefficients o according to Iszkowski

Number Topographic terrain definition Drainage coefficient ϕ
1 marshes and lowlands 0.20
2 flats and plateaus 0.25
3 flats and plateaus in combination with hills 0.30
4 hills with gentle slopes 0.35
5 steeper hills and foothills 0.40
6 hills and outcrops of mountain ranges 0.45
7 higher hills 0.50
8 mountains 0.55
9 highest mountains 0.60-0.70

Table 4 shows what and how feature values are generated.

Table 4. SWMM catchment data.

Parameter name Explanation
Name Catchment names (ID) are generated by adding a number.
Raingage When "raingage exists in the uploaded file, it will be assigned to the catchment area being built. If it does not exist, it will be added to the file along with the "timeseries" and assigned to the catchment area being generated.
Outlet If there are receivers in the transferred file, the program will automatically assign it to the catchment area, if there are none, the name of the generated catchment area will be assigned.
Area A parameter passed by the user.
Percent Imperv Parameter calculated as described above and assigned to the catchment area.
Width The generated catchment areas are square in shape therefore the length of the side of the catchment area is assigned.
Percent Slope Parameter calculated as described above and assigned to the catchment area.
N-Imperv The value taken based on the linguistic variables passed to the fuzzy logic controller which were previously mapped with Manning coefficients.
N-Perv The value taken based on the linguistic variables passed to the fuzzy logic controller which were previously mapped with Manning coefficients.
Dstore-Imperv The value taken based on the linguistic variables passed to the fuzzy logic controller which were previously mapped with typical storage values.
Dstore-Perv The value taken based on the linguistic variables passed to the fuzzy logic controller which were previously mapped with typical storage values.
Percent Zero Imperv The value taken based on the linguistic variables passed to the fuzzy logic controller which were previously mapped with typical storage values.
RouteTo Odpływ z obszarów imperv i perv spływa bezpośrednio do wylotu
Coordinate Square-shaped catchments are generated, located so that one side is the edge of the contact.

Bugs

If you encounter any bugs or issues while using our software, please feel free to report them on the project's issue tracker. When reporting a bug, please provide as much information as possible to help us reproduce and resolve the issue, including:

  • A clear and concise description of the issue
  • Steps to reproduce the problem
  • Expected behavior and actual behavior
  • Any error messages or logs that may be relevant

Your feedback is invaluable and will help us improve the software for all users.

Contributing

We welcome and appreciate contributions from the community! If you're interested in contributing to this project, please follow these steps:

  1. Fork the repository on GitHub.
  2. Create a new branch for your changes.
  3. Make your changes, including updates to documentation if needed.
  4. Write tests to ensure your changes are working as expected.
  5. Ensure all tests pass and there are no linting or code style issues.
  6. Commit your changes and create a pull request, providing a detailed description of your changes.

We will review your pull request as soon as possible and provide feedback. Once your contribution is approved, it will be merged into the main branch.

For more information about contributing to the project, please see our contributing guide.

License

License This project is licensed under the MIT License. By using, distributing, or contributing to this project, you agree to the terms and conditions of the license. Please refer to the LICENSE.md file for the full text of the license.

About

Tool for rapid prototyping of a hydraulic model that can be read and edited with SWMM.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages