USEPA/Stormwater-Management-Model

Error in Street Transect

jlhomme opened this issue ยท 7 comments

In transect_createStreetTransect(), on line 613, the calculation of y3 is missing the street cross-slope, making the gutter too shallow.

	// --- assign height (y) and width (w) to road & gutter sections
	ymin = 0.0;
	w1 = street->backWidth;
	w2 = street->gutterWidth;
	w3 = street->width;
	w4 = w3 - w2;
	y3 = street->gutterDepression;				// EPA bug
	y1 = street->curbHeight + y3;
	ymax = street->backSlope * street->backWidth + y1;
	y4 = y3 + street->slope * w4;
	ymax = MAX(ymax, y4);

It should be this:
y3 = street->gutterDepression + street->slope * w2;
This is making Station 3 of the transect consistent with the sketch on page 377 of the SWMM5 manual or Figure 4-13 of the HEC Manual.

Thanks @jlhomme for your thorough review of the source code. I believe that after making the suggested correction to y3 the expression for y1 on the line following it should be changed to:
y1 = street->curbHeight + street->gutterDepression

Good point @LRossman, I had ignored the impact of y3 on y1, probably because I wasn't considering the street backing in my tests.

@michaeltryby @LRossman @michelleannesimon What is the project policy currently regarding branches and pull requests? Does it help if I create a pull request with my proposed fix(es)?
I can't create a branch here on github.com but I can do that with Github Desktop.

@jlhomme I appreciate your efforts identifying bugs and would welcome the submission of PRs for fixes.

Please be patient while I trouble shoot repository settings to accommodate PRs. Thanks for reaching out!

@jlhomme Please follow basic GitHub flow for preparation and submission of PRs. Thanks!

@michaeltryby I will create a few PRs for those issues I raised in the next few weeks, when I will have a gap in my regular development work.