USEPA/Stormwater-Management-Model

Seepage doesn't work unless links present in model

MitchHeineman opened this issue ยท 6 comments

A storage node that should drain via seepage remains full unless the model includes links. This sounds like an oddball case, but I am working in a drainage system in the southwestern US that primarily consists of infiltration galleries and drywells with little piping.

The more important issue for my project is that an isolated storage node not connected to a link where surcharge occurs never drains!

[OPTIONS]
FLOW_UNITS CFS
INFILTRATION MODIFIED_GREEN_AMPT
FLOW_ROUTING DYNWAVE
START_DATE 10/20/2023
END_DATE 10/21/2023

[JUNCTIONS]
;;Name Elevation MaxDepth InitDepth SurDepth Aponded
;;-------------- ---------- ---------- ---------- ---------- ----------
3 24 1 1 0 0

[OUTFALLS]
;;Name Elevation Type Stage Data Gated Route To
;;-------------- ---------- ---------- ---------------- -------- ----------------
2 0 FREE NO

[STORAGE]
;;Name Elev. MaxDepth InitDepth Shape Curve Type/Params SurDepth Fevap Psi Ksat IMD
;;-------------- -------- ---------- ----------- ---------- ---------------------------- --------- -------- -------- --------
1 0 25 25 FUNCTIONAL 0 0 12.57 25 0 4 8.333 0.33
4 0 25 25 FUNCTIONAL 0 0 12.57 0 0 4 8.333 0.33
5 0 25 26 FUNCTIONAL 0 0 12.57 1 0 4 8.333 0.33

[CONDUITS]
;;Name From Node To Node Length Roughness InOffset OutOffset InitFlow MaxFlow
;;-------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ---------- ----------
1 3 4 100 0.013 0 23 0 0

[XSECTIONS]
;;Link Shape Geom1 Geom2 Geom3 Geom4 Barrels Culvert
;;-------------- ------------ ---------------- ---------- ---------- ---------- ---------- ----------
1 CIRCULAR 0.5 0 0 0 1

[COORDINATES]
;;Node X-Coord Y-Coord
;;-------------- ------------------ ------------------
3 4785.021 7004.161
2 3162.275 5658.807
1 3134.535 6976.422
4 4590.846 5603.329
5 1595.007 7267.684

The source of the problem is at lines 413 - 417 of routing.c:

    // --- route flow through the drainage network
    if ( Nobjects[LINK] > 0 )
    {
        stepCount = flowrout_execute(SortedLinks, routingModel, routingStep);
    }

which causes flow routing to be skipped if there are no links in a project. The fix is to replace line 414 with:

    if ( Nobjects[LINK] > 0 || Nobjects[NODE] > 0 )

After making this change @MitchHeineman 's example runs OK.

Thanks Lew. I apologize that I posted the issue before I realized there were two separate issues. I subsequently edited the text but could not alter the title. I have not tested the code, but expect that your fix addresses the title issue, but does not address the faulty behavior of isolated storage nodes with surcharge enabled. Again, this would have seemed quite esoteric to me until I got involved working on a system with few pipes but many infiltration structures. In the model included as text in the edited version of the issue, nodes 1 and 4 drain, but node 5 remains pegged at 26 feet.

I have seen this issue with other models. Sometimes the test model is way to small. Good to see that there is an explanation.

The fix for the isolated surcharged storage node issue is to add the following code at line 712 of the setNodeDepth function in dynwave.c:

    // --- remove surcharged status if node has no flow response to change
    //     in head (example would be a storage node with exfiltration but
    //     no connecting links)
    if (isSurcharged && Xnode[i].sumdqdh == 0.0) isSurcharged = FALSE;

This doesn't appear to be an issue for the other flow routing methods.

Exfiltration seems off for the surcharged condition using proposed solution. Digging into it further...

Screenshot 2023-11-01 101927

@MitchHeineman Infiltration for surcharged node conditions now works correctly and should make it into the next point release. Thank you for bringing it to our attention.

image