MaximaLabsOpen app

Piping Stress & Water-Hammer Surge

ASME B31.3 §304.1.2 pressure-design wall, Barlow hoop/longitudinal stress, §302.3.5(d) thermal-expansion stress range, and a §302.3.6 occasional-load check fed by the Method-of-Lines water-hammer transient's peak surge pressure — a code-formula line-rating screen, not a full pipe-flexibility model.

pipingb31.3water-hammer
Concept

Where mechanical rating covers a vessel, this rates a pipe run to ASME B31.3 (Process Piping): the pressure-design wall, hoop/longitudinal stress against the material allowable, the thermal-expansion (displacement) stress range against its allowable, and — the panel's real differentiator — an occasional-load check that feeds the water-hammer transient's peak surge pressure straight in as an added longitudinal stress. It's a code-formula line-rating screen (outer diameter + wall you specify directly, not a nominal-pipe-size/schedule lookup table), not a 3-D pipe-flexibility model.

The math
Show the governing equations
t=PD2(SEW+PY)+CA(§304.1.2 pressure design)t = \frac{P\,D}{2\,(S\,E\,W + P\,Y)} + CA \quad \text{(§304.1.2 pressure design)}
σh=PD2t,σL=PD4t(Barlow hoop / longitudinal)\sigma_h = \frac{P\,D}{2t}, \quad \sigma_L = \frac{P\,D}{4t} \quad \text{(Barlow hoop / longitudinal)}
SE=i3EDαΔTL    SA=f(1.25Sc+0.25Sh)(§302.3.5(d))S_E = i\cdot\frac{3\,E\,D\,\alpha\,\Delta T}{L} \;\le\; S_A = f(1.25\,S_c + 0.25\,S_h) \quad \text{(§302.3.5(d))}
σL+FsurgeAmetal    1.33Sh,Fsurge=ΔPsurgeAflow(§302.3.6 occasional)\sigma_L + \frac{F_{surge}}{A_{metal}} \;\le\; 1.33\,S_h, \quad F_{surge} = \Delta P_{surge}\cdot A_{flow} \quad \text{(§302.3.6 occasional)}
The guided-cantilever expansion-stress form is a single-leg screening estimate (a real layout needs a full flexibility analysis); the occasional-load check is what makes the panel a genuine coupling to the water-hammer transient rather than two unrelated tools.
Execution

Where it actually lives

Open via the right-hand rail's analysis cluster (the waves icon, "Piping & surge") — one panel with two coupled halves: the Method-of-Lines water-hammer transient(length, diameter, wave speed, friction, closure time) on the left, and the B31.3 line rating (design pressure, OD, wall, a real material dropdown — A106-B/A53-B/A333-6/A312-304/A312-316, thermal ΔT, leg span, stress-intensification factor) on the right. Enabling the surge-coupling toggle feeds the transient's peak pressure into the occasional- load check live.

import requests

r = requests.post(
    "https://maximalabs.io/api/analysis/piping-stress",
    json={
        "design_pressure": 2.0e6,
        "outer_diameter": 0.219,     # m (~8" pipe)
        "design_temperature": 420.0,
        "thermal_delta_t": 150.0,     # enables the §302.3.5(d) expansion check
        "pipe_span": 8.0,
        "surge_pressure": 3.5e6,      # e.g. from the water-hammer panel's peak_pressure
        "material": "A106-B",
    },
)
rating = r.json()["fields"]
print(rating["hoop_ok"], rating["expansion_ok"], rating["occasional_ok"])
Execution

Failure / risk flags

pressure_design_ok = falseThe actual wall is thinner than the §304.1.2 pressure-design requirement.
hoop_ok / sustained_ok = falseBarlow hoop or sustained longitudinal stress exceeds the material allowable S.
expansion_ok = falseThermal-expansion stress range exceeds S_A — add flexibility (loops, expansion joints) or reduce the leg span.
occasional_ok = falseSustained + surge-induced longitudinal stress exceeds 1.33·S_h — the water-hammer transient is overstressing the line.