cad-editor/crates/stormsewer/examples/sample.ssn
Michael Flynn 9b44eb6400 Add Storm Sewer module: storm-drain network analysis (Rational + Manning + HGL)
Adds a "Storm Sewer" ribbon tab backed by a new in-repo `stormsewer` engine
crate (vendored under crates/). The engine implements standard public-domain
methods — Rational-method peak-flow accumulation, Manning circular-pipe
hydraulics, time-of-concentration / IDF intensity, and an HGL backwater pass
with junction losses — with 24 unit tests and no external dependencies.

Module (src/modules/storm_sewer/):
- Drafting: SS_INLET / SS_JUNCTION / SS_OUTFALL place structure markers and
  SS_PIPE chains pipe runs (interactive CadCommands).
- Analysis: SS_ANALYZE / SS_REPORT / SS_PROFILE open a .ssn network file, run
  the engine, draw the plan and HGL long-section, and print a report.
- SVG icons; SS_* commands registered for command-line autocomplete.

Integration is additive: build.rs auto-discovers the module and one dispatch
block is added to src/app/commands.rs. 7 module integration tests.

See src/modules/storm_sewer/INTEGRATION.md for the design and the optional
follow-up (drive analysis from canvas geometry via XDATA).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 17:16:30 -04:00

18 lines
939 B
Text

# Sample storm-sewer network (stormsewer-cli examples/sample.ssn)
# A short, properly-sized trunk line: two catch basins + a junction to outfall.
IDF 60 10 0.8 # i = 60 / (t+10)^0.8 (in/hr, t in minutes) ~ 5 in/hr
TAILWATER 100.5 # outfall tailwater elevation (ft)
MINTC 10 # minimum time of concentration (min)
JUNCTIONK 0.5 # junction loss coefficient
# id kind x y invert rim area C tc_inlet
NODE N1 inlet 0 0 104.0 110.0 1.0 0.70 12
NODE N2 inlet 300 0 102.5 108.5 1.0 0.70 10
NODE N3 junction 550 0 101.2 107.0 0.5 0.80 8
NODE OUT outfall 730 0 100.0 106.0
# id from to length dia n (dia: 15in=1.25, 18in=1.5, 21in=1.75)
PIPE P1 N1 N2 300 1.25 0.013
PIPE P2 N2 N3 250 1.50 0.013
PIPE P3 N3 OUT 180 1.75 0.013