From f89ea176c120fe3d878bfad13dac633f55fa5d1a Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 9 Aug 2023 10:08:32 -0400 Subject: [PATCH 1/6] Fixed bug in writing pollutant buildup to hostart #136 --- src/solver/hotstart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solver/hotstart.c b/src/solver/hotstart.c index 69f7abcc9..d247d818b 100644 --- a/src/solver/hotstart.c +++ b/src/solver/hotstart.c @@ -416,7 +416,7 @@ void saveRunoff(void) for (j=0; j Date: Wed, 9 Aug 2023 16:56:41 -0400 Subject: [PATCH 2/6] Added note to update history --- src/solver/hotstart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/solver/hotstart.c b/src/solver/hotstart.c index d247d818b..5eeed590c 100644 --- a/src/solver/hotstart.c +++ b/src/solver/hotstart.c @@ -35,6 +35,8 @@ // - Link control setting bug when reading a hot start file fixed. // Build 5.1.015: // - Support added for multiple infiltration methods within a project. +// Build 5.2.5: +// - Fixed bug in fwrite count argument when writing of pollutant build-up. //----------------------------------------------------------------------------- #define _CRT_SECURE_NO_DEPRECATE From 32c46eb610e4b635363b742094ef15ef426f6014 Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 9 Aug 2023 18:04:35 -0400 Subject: [PATCH 3/6] Changed rpt flow fmt so that large values are not concatenated #109 --- CMakeLists.txt | 2 +- src/solver/hotstart.c | 3 ++- src/solver/statsrpt.c | 4 ++-- src/solver/swmm5.c | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b651cf71..99af0d1cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ endif() project(swmm-solver - VERSION 5.2.3 + VERSION 5.2.4 LANGUAGES C CXX ) diff --git a/src/solver/hotstart.c b/src/solver/hotstart.c index 5eeed590c..376403b9d 100644 --- a/src/solver/hotstart.c +++ b/src/solver/hotstart.c @@ -36,7 +36,8 @@ // Build 5.1.015: // - Support added for multiple infiltration methods within a project. // Build 5.2.5: -// - Fixed bug in fwrite count argument when writing of pollutant build-up. +// - Fixed bug in fwrite count argument when writing catchment landuse pollutant +// build-up. //----------------------------------------------------------------------------- #define _CRT_SECURE_NO_DEPRECATE diff --git a/src/solver/statsrpt.c b/src/solver/statsrpt.c index 52cc169eb..9711a947a 100644 --- a/src/solver/statsrpt.c +++ b/src/solver/statsrpt.c @@ -89,8 +89,8 @@ void statsrpt_writeReport() // { // --- set number of decimal places for reporting flow values - if ( FlowUnits == MGD || FlowUnits == CMS ) sstrncpy(FlowFmt, "%9.3f", 5); - else sstrncpy(FlowFmt, "%9.2f", 5); + if ( FlowUnits == MGD || FlowUnits == CMS ) sstrncpy(FlowFmt, "%9.3g", 5); + else sstrncpy(FlowFmt, "%9.2g", 5); // --- conversion factor from cu. ft. to mil. gallons or megaliters if (UnitSystem == US) Vcf = 7.48 / 1.0e6; diff --git a/src/solver/swmm5.c b/src/solver/swmm5.c index 6ff8c9b26..5eca090a5 100644 --- a/src/solver/swmm5.c +++ b/src/solver/swmm5.c @@ -42,6 +42,9 @@ // - Prevented possible infinite loop if swmm_step() called when ErrorCode > 0. // - Prevented early exit from swmm_end() when ErrorCode > 0. // - Support added for relative file names. +// Build 5.2.5 +// - Changed flow format to scientic to prevent the merging of extremely +// large flows that make it difficult to interpret results. //----------------------------------------------------------------------------- #define _CRT_SECURE_NO_DEPRECATE From 71a4c316e122bab22c1f1acfb84ef8333a34dc6c Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 9 Aug 2023 18:25:33 -0400 Subject: [PATCH 4/6] Updated update history section #109 --- src/solver/statsrpt.c | 3 +++ src/solver/swmm5.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/solver/statsrpt.c b/src/solver/statsrpt.c index 9711a947a..8c69c5c2f 100644 --- a/src/solver/statsrpt.c +++ b/src/solver/statsrpt.c @@ -30,6 +30,9 @@ // Build 5.2.2 // - Calculation of % Evaporation and % Exfiltration losses for storage // units was corrected. +// Build 5.2.5 +// - Changed flow format to scientific to prevent the merging of extremely +// large flows that make it difficult to interpret results. //----------------------------------------------------------------------------- #define _CRT_SECURE_NO_DEPRECATE diff --git a/src/solver/swmm5.c b/src/solver/swmm5.c index 5eca090a5..6ff8c9b26 100644 --- a/src/solver/swmm5.c +++ b/src/solver/swmm5.c @@ -42,9 +42,6 @@ // - Prevented possible infinite loop if swmm_step() called when ErrorCode > 0. // - Prevented early exit from swmm_end() when ErrorCode > 0. // - Support added for relative file names. -// Build 5.2.5 -// - Changed flow format to scientic to prevent the merging of extremely -// large flows that make it difficult to interpret results. //----------------------------------------------------------------------------- #define _CRT_SECURE_NO_DEPRECATE From 467e52a8f9a5b303e9325d6e6232fe9d0c54420f Mon Sep 17 00:00:00 2001 From: Caleb Date: Thu, 5 Oct 2023 10:05:14 -0400 Subject: [PATCH 5/6] Fixed incorrect geom for elliptical pipes #144, fixed dead links --- README.md | 4 ++-- src/solver/xsect.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1c35a7366..11817b668 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Stormwater Management Model (aka "SWMM") solver only ## Build Status -[![Build and Test](https://github.com/USEPA/Stormwater-Management-Model/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/USEPA/Stormwater-Management-Model/actions/workflows/build-and-test.yml) +[![Build and Test](../../actions/workflows/build-and-test.yml/badge.svg)](../../actions/workflows/build-and-test.yml) ## Disclaimer The United States Environmental Protection Agency (EPA) GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. EPA has relinquished control of the information and no longer has responsibility to protect the integrity, confidentiality, or availability of the information. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by EPA. The EPA seal and logo shall not be used in any manner to imply endorsement of any commercial product or activity by EPA or the United States Government. @@ -18,4 +18,4 @@ SWMM is a dynamic hydrology-hydraulic water quality simulation model. It is used ## Find Out More -The source code distributed here is identical to the code found at the official [SWMM Website](http://www2.epa.gov/water-research/storm-water-management-model-swmm). +The source code distributed here is identical to the code found at the official [SWMM Website](https://www.epa.gov/water-research/storm-water-management-model-swmm). diff --git a/src/solver/xsect.c b/src/solver/xsect.c index 1a53d36e2..78aa926a0 100644 --- a/src/solver/xsect.c +++ b/src/solver/xsect.c @@ -34,6 +34,10 @@ // - Support added for Street cross sections. // Build 5.2.2: // - Feasibility check added to Mod. Baskethandle & Rect.-Round shapes. +// Build 5.2.5: +// - Addressing inconsistent results for custom sized elliptical pipes. +// Stems from inccorect equations for pipe full area and hydraulic radius +// for elliptical pipes from SWMM 4.4. //----------------------------------------------------------------------------- #define _CRT_SECURE_NO_DEPRECATE @@ -569,8 +573,8 @@ int xsect_setParams(TXsect *xsect, int type, double p[], double ucf) // --- length of major axis if ( p[1] < 0.0 ) return FALSE; xsect->wMax = p[1]/ucf; - xsect->aFull = 1.2692 * xsect->yFull * xsect->yFull; - xsect->rFull = 0.3061 * xsect->yFull; + xsect->aFull = 0.8117 * xsect->yFull * xsect->wMax; + xsect->rFull = 0.2448 * sqrt(xsect->yFull * xsect->wMax); } xsect->sFull = xsect->aFull * pow(xsect->rFull, 2./3.); xsect->sMax = xsect->sFull; @@ -597,8 +601,8 @@ int xsect_setParams(TXsect *xsect, int type, double p[], double ucf) // --- length of minor axis xsect->yFull = p[0]/ucf; xsect->wMax = p[1]/ucf; - xsect->aFull = 1.2692 * xsect->wMax * xsect->wMax; - xsect->rFull = 0.3061 * xsect->wMax; + xsect->aFull = 0.8117 * xsect->yFull * xsect->wMax; + xsect->rFull = 0.2448 * sqrt(xsect->yFull * xsect->wMax); } xsect->sFull = xsect->aFull * pow(xsect->rFull, 2./3.); xsect->sMax = xsect->sFull; From 5742f727402c1118b08267cb2dc99ac05891c51e Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Tue, 10 Oct 2023 16:20:39 -0400 Subject: [PATCH 6/6] Update benchmark tag --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 4db9c3af0..c012d0e14 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -80,7 +80,7 @@ jobs: - name: Before reg test env: NRTESTS_URL: https://github.com/USEPA/swmm-nrtestsuite - BENCHMARK_TAG: v2.4.0 + BENCHMARK_TAG: v2.5.0-dev run: before-nrtest.cmd ${{ env.BENCHMARK_TAG }} - name: Run reg test