Skip to content

Preserve cylindrical tank volumes in EN_settankdata - #934

Merged
LRossman merged 1 commit into
OpenWaterAnalytics:devfrom
aowis-org:fix-tankdata-volume-fidelity
Aug 25, 2026
Merged

Preserve cylindrical tank volumes in EN_settankdata#934
LRossman merged 1 commit into
OpenWaterAnalytics:devfrom
aowis-org:fix-tankdata-volume-fidelity

Conversation

@aowis-becker

Copy link
Copy Markdown

EN_settankdata() currently reconstructs cylindrical tank volumes through
the internal-unit tankvolume() path. This uses a different floating-point
operation order than the INP parser when constructing the same tank.

As a result, reapplying identical tank data through the Toolkit can change
the internally stored tank volumes by a very small amount. In event-driven
hydraulic simulations this can alter the ordering of otherwise simultaneous
tank events and lead to different downstream results.

This change computes cylindrical tank volumes in user units before
converting them to internal units, matching the arithmetic path used by the
INP parser.

A regression test verifies that reapplying identical EN_settankdata()
parameters preserves the initial, minimum, and maximum tank volumes
bit-for-bit.

@LRossman
LRossman merged commit 68595f8 into OpenWaterAnalytics:dev Aug 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants