OpenWaterAnalytics / EPANET

The Water Distribution System Hydraulic and Water Quality Analysis Toolkit
MIT License
273 stars 203 forks source link

Use barrier functions for PDA & Emitters #722

Open LRossman opened 1 year ago

LRossman commented 1 year ago

Todini et al. (J. Hydroinformatics, 24:697, 2022) showed improved performance of EPANET for demands under Pressure Dependent Analysis (PDA) when continuous barrier functions were added to the inverted demand function instead of using EPANET's current PDA method. The hydcoeffs.c file has been updated to implement this approach for both PDA demands and for emitters where back flow is not allowed. PR #721 has been issued for this commit.

The continuous barrier function approach can also be used to prevent flows greater than a FCV's flow setting and flows less than zero for pipes with CVs. This eliminates the need to treat FCVs and CVs as discrete state elements whose status must be periodically checked and should lead to fewer trials when solving network hydraulics. Updates for these elements will be forthcoming.

jamesuber commented 1 year ago

Lew I have not reviewed this but it sounds like a great addition. Making the iterative process more continuous and “natural” should be really helpful.

James Uber, Ph.D. Director, Product Development and Research Xylem Decision Intelligence Solutions M: (513) 368-6303

From: Lew Rossman @.> Date: Wednesday, March 29, 2023 at 10:55 AM To: OpenWaterAnalytics/EPANET @.> Cc: Subscribed @.***> Subject: [OpenWaterAnalytics/EPANET] Use barrier functions for PDA & Emitters (Issue #722)

Todini et al. (J. Hydroinformatics, 24:697, 2022) showed improved performance of EPANET for demands under Pressure Dependent Analysis (PDA) when continuous barrier functions were added to the inverted demand function instead of using EPANET's current PDA method. The hydcoeffs.c file has been updated to implement this approach for both PDA demands and for emitters where back flow is not allowed. PR #721https://urldefense.com/v3/__https:/github.com/OpenWaterAnalytics/EPANET/pull/721__;!!OKzgfr8!f6P_X4fPw7Hg2DbIYPCGSU6pdNCZJ63l4ntHoAukdip2bewMFjnW-0TwSSukDWXap2fKVboqUBd9MJ_xvrt1HcZCdeU$ has been issued for this commit.

The continuous barrier function approach can also be used to prevent flows greater than a FCV's flow setting and flows less than zero for pipes with CVs. This eliminates the need to treat FCVs and CVs as discrete state elements whose status must be periodically checked and should lead to fewer trials when solving network hydraulics. Updates for these elements will be forthcoming.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/OpenWaterAnalytics/EPANET/issues/722__;!!OKzgfr8!f6P_X4fPw7Hg2DbIYPCGSU6pdNCZJ63l4ntHoAukdip2bewMFjnW-0TwSSukDWXap2fKVboqUBd9MJ_xvrt1S18bgv8$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AASMACN6WSO52Z2L3ILPXY3W6REOJANCNFSM6AAAAAAWMBYDK4__;!!OKzgfr8!f6P_X4fPw7Hg2DbIYPCGSU6pdNCZJ63l4ntHoAukdip2bewMFjnW-0TwSSukDWXap2fKVboqUBd9MJ_xvrt1P-v8soQ$. You are receiving this because you are subscribed to this thread.Message ID: @.***>

CONFIDENTIALITY NOTICE: This e-mail, including any attachments and/or linked documents, is intended for the sole use of the intended addressee and may contain information that is privileged, confidential, proprietary, or otherwise protected by law. Any unauthorized review, dissemination, distribution, or copying is prohibited. If you have received this communication in error, please contact the original sender immediately by reply email and destroy all copies of the original message and any attachments. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Xylem Inc..

LRossman commented 1 year ago

I've tested using barrier functions to continuously restrict flow in CVs and FCVs (rather than use periodic status checks) on 30 large scale networks ranging from 1,000 to 111,000 pipes with dozens (some with hundreds) of pumps and valves. Unfortunately improvements in convergence rates were not consistently obtained when compared to the current EPANET solver. Therefore I'm dropping the idea of extending the use of barrier functions to CVs and FCVs at this time.