EPANET 2.2

repository·master·Indexed 42 days ago

https://github.com/usepa/epanet2.2

An open-source hydraulic and water quality simulation engine for modeling drinking water distribution systems. It allows engineers to simulate flow, pressure, and chemical concentrations. The project includes a Windows GUI (EPANET2W) built with Delphi, a computational engine, and a modular architecture supporting Python scripting and third-party plugins.

Tokens
51.8K
Snippets
58
Records
221
Agent score
53%

What's inside EPANET

  1. Overview of EPANET 2.2 capabilities

    master

    EPANET 2.2 is a water distribution system simulation model. Key features and improvements in version 2.2 include:

    • Pressure-Dependent Demands: Support for hydraulic analyses using pressure-dependent demands.
    • Tank Overflow: Option to allow full tanks to overflow.
    • Improved Accuracy: Enhanced options for more accurate hydraulic analysis and robust handling of low or zero flow conditions.
    • Performance: Faster solution times for single-period hydraulic analyses.
    • Water Quality: Improved mass balance results for water quality analyses.
    • Enhanced API: An expanded API function library for customizing EPANET simulations (further details available at http://wateranalytics.org/EPANET/).
  2. Overview of the EPANET Workspace

    master

    The EPANET workspace is the primary user interface for interacting with hydraulic models. It is composed of several key elements that allow for model navigation, data inspection, and parameter adjustment:

    • Menu Bar: Provides access to high-level program commands and functions.
    • Toolbars: Contains two toolbars for quick access to frequently used tools.
    • Status Bar: Displays information about the current state of the application or selected elements.
    • Network Map: The primary window used for visualizing the hydraulic network.
    • Browser: A window used to navigate the different components of the model (e.g., junctions, pipes, tanks).
    • Property Editor: A window used to view and modify the specific attributes and parameters of selected network elements.
  3. What is EPANET

    master

    EPANET is a computer program designed for extended period simulation of hydraulic and water quality behavior within pressurized pipe networks. It tracks water flow in pipes, pressure at nodes, water height in tanks, and the concentration of chemical species throughout a network over multiple time steps.

    Key capabilities include:

    • Hydraulic Modeling: Simulates pipes, nodes, pumps, valves, and reservoirs using friction formulas like Hazen-Williams, Darcy-Weisbach, or Chezy-Manning.
    • Water Quality Modeling: Simulates non-reactive tracers, reactive materials (growth or decay), water age, and source tracing.
    • Integrated Environment: On Windows, it provides tools for editing network data, running simulations, and viewing results via color-coded maps, data tables, time series graphs, and contour plots.
  4. Overview of EPANET Development Goals

    master

    EPANET is a software application used for modeling the hydraulic and water quality behavior of drinking water distribution systems (WDNs). The current development project focuses on modernizing the codebase and expanding its capabilities through community cooperation.

    Key development objectives include:

    • UI Application Enhancements: Delivering a new User Interface with Graphical Information System (GIS) functionality, Python scripting capabilities, and support for third-party plugins.
    • Computational Engine Modernization: Transitioning to a modular and extensible software library that utilizes multi-threading and Graphics Processing Unit (GPU) computing to accelerate analysis.
    • Technology Transfer: Using EPANET as a channel to deliver EPA-based tools to a wider audience.
  5. Overview of EPANET 2.2 Source Code

    master

    The EPANET 2.2 source code contains the hydraulic and water quality solver engines. The code is written in ANSI-compatible C and is designed to be compiled into two primary formats:

    1. Windows Dynamic Link Library (DLL): The epanet2.dll file. This is used by the EPANET 2 user interface (epanet2w.exe) and serves as the core function library for the EPANET Programmer's Toolkit, enabling developers to build custom pipe network analysis applications.
    2. Command-line Executable: A standalone tool for running simulations via the terminal.

    Developers can use the DLL to integrate EPANET's solving capabilities into their own software via the Programmer's Toolkit.

  6. EPANET 2.2.0 Reliability and Testing Overview

    master

    EPANET 2.2.0 has undergone three levels of testing to ensure production readiness:

    1. Component Testing: Verifies that individual API function calls operate correctly in isolation and under realistic scenarios. (Result: 7/7 Tests PASS)
    2. Regression Testing: Uses a suite of approximately 70 network model examples (.inp files) to ensure that changes to the source code do not break existing functionality. Results are compared against known benchmarks. (Result: 70/70 Tests PASS)
    3. Release Testing: Uses a large suite of approximately 270 user-contributed examples to simulate real-world production performance. (Result: 269/272 Tests PASS)

    Based on release testing, the EPANET v2.2.0 solver is estimated to successfully run 99% of user networks.

  7. Overview of EPANET2W GUI forms and architecture

    master

    The EPANET2W application is a large-scale Delphi project consisting of 38 forms, 11 Pascal units, and 5 custom components. The architecture uses a Multiple Document Interface (MDI) pattern.

    Principal Forms

    • MainForm (Fmain.pas): The parent MDI form containing the Main Menu and Toolbars.
    • MapForm (Fmap.pas): An MDI child form displaying an editable schematic of the pipe network.
    • BrowserForm (Fbrowser.pas): An MDI child form for navigating the network database and controlling color-coded map information.
    • PropEditForm (Fproped.pas): A stay-on-top form for editing properties of selected network components.
    • OVMapForm (Fovmap.pas): A stay-on-top form showing the current map view extent on an outline map.
    • SummaryForm (Fsummary.pas): A modal dialog for editing network titles/notes and viewing component counts.
    • SimulationForm (Fsimul.pas): A modal dialog displaying simulation progress.
    • StatusForm (Fstatus.pas): An MDI child form showing the status report of the last simulation.
    • TableForm (Ftable.pas): An MDI child form for tabular viewing of design and computed values.
    • GraphForm (Fgraph.pas): An MDI child form for X-Y plots of network parameters.
    • ContourForm (Fcontour.pas): An MDI child form for contour plots of parameters.
    • EnergyForm (Fenergy.pas): An MDI child form for pumping energy utilization tables.
    • CalibForm (Fcalib.pas): An MDI child form for comparing simulated results against measured values.