Commit Graph

12 Commits

Author SHA1 Message Date
Lew Rossman
869e441fe8 Revise status test for full/empty tanks
Simplifies status check for links connected to full/empty tanks and now includes case where link connects two tanks.
2023-02-03 11:29:05 -05:00
Lew Rossman
6ccddb811d Update hydstatus.c 2022-08-08 18:37:07 -04:00
Lew Rossman
2d783041a4 Fix for FCV problem
This update prevents a solution where the computed loss coefficient for a FCV at its flow setting would be less than the user supplied fully opened coefficient.
2022-08-08 18:08:45 -04:00
Lew Rossman
409a600455 Improved flow checks for full and empty tanks
Improves  the way link flow into full and out of empty tanks is checked. Also corrects the head loss and gradient calculation for constant horsepower pumps at very low and very high flow rates (this was affecting one of the examples used to test the full/empty tank fix).
2021-04-16 17:01:54 -04:00
Lew Rossman
aaa9b44aaf Removed unreferenced variable in hydstatus.c 2021-01-26 15:47:04 -05:00
Lew Rossman
9d2256433f Fix having flow out of an empty tank 2021-01-26 15:41:01 -05:00
Lew Rossman
9669742ab3 Adds tank overflow feature 2019-06-17 09:16:04 -04:00
Lew Rossman
c9b836973e Removes _DEBUG directives from all source files
This commit removes the #ifdef _DEBUG statements at the top of all source code files per issue #482. It also updates the doc files to stress that the speedup observed for hydraulic analysis with the MMD node re-ordering method only applies to single period runs.
2019-05-13 23:49:19 -04:00
Michael Tryby
84bf6f98d0 Cleaning up include statements adding crtdbg.h 2019-04-03 15:55:23 -04:00
Lew Rossman
9a540cc0f4 Code cleanup
1. Added a standard header to each code module and removed obsolete comments.
2. Re-named several of the sub-structs in the project struct and re-arranged some of their contents.
3. Re-named _defaultModel to _defaultProject.
4. Removed the need to call EN_createproject and EN_deleteproject when working with the default project.
5. Made X & Y coords. part of Snode properties instead of a separate struct.
6. Moved the non-API functions in epanet.c into a new module named project.c.
7. Re-factored the quality module so that it uses the same nodal adjacency lists as the hydraulics solver.
8. Re-factored the sparse matrix module (smatrix.c) to be more memory efficient.
9. Restricted line lengths to < 90 columns.
10. Grouped the placement of functions in EPANET2.H and EPANET.C by category.
2018-11-27 14:22:06 -05:00
Lew Rossman
7443cea9d4 Fixes #172 (adjust controls when node/link is deleted) & EN_addrule added
- Deleting controls with node/link deletion made conditional.
- New EN_addrule function added along with a test file.
- Rule structures re-named & rules.c heavily modified.
- Issue with exceeding limit on number of temporary file names fixed.
- VB declaration and DEF files updated.
2018-11-07 23:09:47 -05:00
Lew Rossman
b5e3986e6b Pressure Dependent Demands added to address issue 163 2018-08-09 10:42:47 -04:00