Skip to main content

Crate stormsewer

Crate stormsewer 

Source
Expand description

§StormSewer

Native-Rust storm-sewer network hydrology & hydraulics engine — the standalone StormSewer product.

It implements the standard, public-domain methods used by tools such as Autodesk Hydraflow Storm Sewers:

  • Rational method peak-flow accumulation down a pipe network,
  • Manning open-channel / partial-flow hydraulics for circular conduits,
  • normal-depth, critical-depth and full-flow capacity,
  • HGL backwater with junction losses and standard-pipe sizing against velocity / capacity criteria (Hydraflow-style design checks).
  • HEC-22 inlet interception — on-grade gutter-spread method (frontal / side-flow split, curb L_T) and sag weir/orifice — with the grate splash-over velocity and clogging fraction as inputs; plus multi-RP IDF sets.

This is an engine only: no GUI and no CAD dependencies, so it compiles to a native library, to WASM, and can be embedded in desktop or web apps.

use stormsewer::{Network, Node, NodeKind, Pipe};
let net = Network {
    nodes: vec![
        Node::inlet("N1", 100.0, 105.0, 2.0, 0.7),
        Node::outfall("OUT", 99.0, 104.0),
    ],
    pipes: vec![Pipe::new("P1", "N1", "OUT", 100.0, 1.5, 0.013)],
};
let results = net.analyze_rational(4.0).unwrap(); // i = 4 in/hr
assert_eq!(results.len(), 1);
assert!((results[0].design_q - 5.6).abs() < 1e-6); // 4 * (0.7*2.0)

Re-exports§

pub use catchment::*;
pub use diagnostics::*;
pub use design::*;
pub use units::*;
pub use drawing::*;
pub use hydraulics::*;
pub use hydrology::*;
pub use idf::*;
pub use io::*;
pub use network::*;
pub use params::*;
pub use parse::*;
pub use report_html::*;

Modules§

access_hole
FHWA HEC-22 access-hole (manhole / junction) energy-loss coefficient.
catchment
Catchment polygon geometry helpers (CAD-agnostic).
design
Storm-sewer design: criteria catalogs, pipe sizing, and sizing reports.
diagnostics
Network topology and data-quality diagnostics.
drawing
Convert an analyzed network into drawable primitives (CAD-agnostic).
hydraulics
Open-channel & partial-flow hydraulics for circular closed conduits.
hydrology
idf
Rainfall intensity–duration–frequency (IDF) curves.
io
network
Storm-sewer network model: nodes (inlets / junctions / outfalls), pipes, topology, Rational-method peak-flow accumulation, time-of-concentration / IDF intensity, and a hydraulic-grade-line (HGL) backwater pass.
params
Global storm-sewer analysis parameters (hydrology, hydraulics, sizing).
parse
Parser for the .ssn storm-sewer network text format.
report
Plain-text report tables for an Analysis, in the spirit of Hydraflow Storm Sewers’ pipe and HGL summaries.
report_html
KaTeX-enabled HTML analysis reports (Hydraflow-style transparency).
units
Unit system conversion (Hydraflow Options → Units parity).