Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

CDM SWMM4 - Batch Engine Runner

A modern HTML5 recreation of the original CDM_SWMM VB.NET application for running EPA SWMM Version 4 models in batch mode.

Launch the App

CDM SWMM4 Screenshot License GitHub Pages


What Is This?

CDM SWMM4 is a browser-based batch runner for EPA's Storm Water Management Model Version 4 (SWMM4). It recreates the functionality of the original CDM_SWMM desktop application built by Camp, Dresser & McKee's Hydrology & Hydraulics Discipline (2000/2004) in Visual Basic.

The tool manages up to 25 concurrent model configurations, generates batch files for sequential engine execution, and includes embedded SWMM4 block documentation extracted from the original .DOC template files.

Features

Feature Description
25 Model Slots Configure up to 25 SWMM4 models with individual engine, input, output, report, and CDM notes files
Batch File Generation Generates a myengine.bat file that runs all active models sequentially
5 Built-in Engines Pre-configured paths for swmm44hh.exe, SWMM4_99.exe, WCH_2004.exe, SWMM4to5_Converter.exe, XPtoEPA4_2005.exe
Auto-Derive Filenames Setting an input file (.dat) automatically generates .out, .rpt, and .cdm paths
Embedded Documentation Full SWMM4 block documentation viewable in-app (Runoff, Transport, Extran, Rain, Temp, Combine, Statistics, Storage/Treatment, Shape tables)
INI Export Export project configuration as a cdm_swmm.ini file compatible with the original application
Persistent Storage Projects auto-save to browser localStorage between sessions
Keyboard Shortcuts Ctrl+S save, PageUp/PageDown navigate models, Escape close dialogs

SWMM4 Engines Included

The original CDM_SWMM distribution shipped with these SWMM4 engine executables:

Engine Size Description
swmm44hh.exe 2.1 MB SWMM 4.4 HH Version
SWMM4_99.exe 3.5 MB SWMM 4.99 (July 2004, CDM version)
WCH_2004.exe 2.8 MB Water Resources Consultants of Hawaii, 2004
SWMM4to5_Converter.exe 455 KB Converts SWMM4 input files to SWMM5 format
XPtoEPA4_2005.exe 500 KB Converts XP-SWMM files to EPA SWMM4 format

SWMM4 Block Documentation

The app includes embedded documentation templates for all SWMM4 computational blocks, extracted from the original .DOC files:

  • RUNOFF45.DOC - Watershed quantity and quality modeling (subcatchments, infiltration, pollutants)
  • TRANS45.DOC - Drainage system transport routing (conduits, junctions, dry weather flow)
  • extran45.doc - Extended transport / dynamic wave hydraulics (surcharge, flooding, tidal boundaries)
  • RAIN45.DOC - Precipitation time series creation (NWS data, multiple rain gages)
  • TEMP45.DOC - Temperature, wind, and evaporation time series
  • COMB.DOC - Combine/collate interface files (binary to ASCII conversion)
  • STATS45.DOC - Statistical analysis of rainfall, flow, and water quality events
  • STRT45.DOC - Storage/Treatment facility modeling
  • SHAPE.DOC - Standard elliptical and arch pipe size code tables (NKLASS 9, 10, 11)

Sample Models (January 2003 Extran Examples)

The app includes 15 built-in sample SWMM4 Extran models from the January 5, 2003 example set. Click Sample Models > Load All 15 Examples to populate model slots 1-15 with all examples ready to run.

Example Description
EXAM1 Basic pipe system (Figure 3-1)
EXAM2 Basic pipe system with tide gate (Figure 3-2)
EXAM3 Sump orifice at junction 82309 (Figure 3-3)
EXAM4 Weir at junction 82309 (Figure 3-4)
EXAM4a Weir with alternate NEW_ISOL_1 solution
EXAM5 Storage facility and side outlet orifice (Figure 3-5)
EXAM6 Off-line pump station at junction 82310 (Figure 3-6)
EXAM7 In-line pump station at junction 82309 (Figure 3-7)
EXAM8 Multiple conduit and diversion types with hot start
EXAM9 Detention pond routing (Bedient-Huber Example 6.10, metric)
EXAM10 Type 3 dynamic head pumps (pump over a hill)
EXAM11 Steven's Ave, Lancaster PA - November 28, 1973 storm
EXAM12 Plethora of pumping situations (elevation input)
EXAM13 Looped sewer system
EXAM14 Variable orifice area and coefficient
EXAM15 Flap gate in conduit (steep, adverse, mild slopes)

How It Works

  1. Select an engine from the dropdown or browse for a custom .exe
  2. Pick an input file (.dat or .inp) - output/report/CDM paths auto-fill
  3. Check "Active Model" to include it in the batch run
  4. Use +/- buttons to navigate between the 25 model slots
  5. Click "Run Active Models" to generate the batch file
  6. Copy or download the generated myengine.bat

The generated batch file runs each active model sequentially:

@echo off
REM CDM SWMM4 Batch File
echo === Running Model 1: SWMM4_99.exe ===
SWMM4_99.exe C:\models\basin1.dat C:\models\basin1.out
echo === Running Model 2: SWMM4_99.exe ===
SWMM4_99.exe C:\models\basin2.dat C:\models\basin2.out
pause    Pause to read the Continuity Error

History

SWMM4 (versions 4.0 through 4.4G/4.99) was the workhorse of urban drainage modeling from the late 1980s through the mid-2000s. It used a block-based architecture where separate computational modules (Runoff, Transport, Extran, Rain, Temp, Combine, Statistics, Storage/Treatment) communicated through binary interface files.

The CDM_SWMM desktop application was created by Robert Dickinson at Camp, Dresser & McKee (now CDM Smith) to simplify the process of running multiple SWMM4 models. The original was built in Visual Basic 6, later upgraded to VB.NET (Visual Basic Express 2008).

Key contributors to SWMM4 development:

  • EPA (Environmental Protection Agency) - Original SWMM development
  • CDM (Camp, Dresser & McKee) - Extran block enhancements, CDM_SWMM interface
  • WCH (Water Resources Consultants of Hawaii) - SWMM 4.3/4.4 maintenance
  • University of Florida - Early SWMM development

Original VB.NET Source

The HTML5 app was recreated from the original VB.NET source code:

cdm_swmm.NET/
  cdm_compare.vb        - Main form (model selection, batch generation)
  cdm_compare.Designer.vb - Form layout (25 model slots, file frames)
  cdm_editor.vb         - Built-in text editor
  cdm_about.vb          - About dialog
  ini.vb                - INI file read/write (project persistence)
  ini_reader.vb         - INI file viewer
  launchfile.vb         - File launcher utilities
  gradient.vb           - Gradient background rendering
  CFileDia.vb           - Common file dialog wrapper
  modCloseBtn.vb        - Close button handler
  robohelp.vb           - Help system integration

License

This project is in the public domain. The original SWMM4 engine executables are public domain software developed by the U.S. Environmental Protection Agency.


Built by Robert Dickinson | Original CDM_SWMM (c) 2000/2004 Camp, Dresser & McKee

About

HTML5 batch engine runner for EPA SWMM4 models, recreating the original CDM_SWMM app.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages