fix: compressor sampled evaluation input validation#1244
Open
fix: compressor sampled evaluation input validation#1244
Conversation
Contributor
|
I think CompressorModelSampled would benefit from a better docstring explaining the init args. Not relevant to the implementation, but can consider adding/improving it. Its very confusing having those vaguely understandable variables in the init for example, like: Also, could benefit from some more inline comments maybe, if you feel you are close to this code now and can make inline comments about the data flow then that could benefit future readers. |
kjbrak
approved these changes
Nov 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement validation to ensure that the evaluation input for sampled compressor (qhull-based) models matches the required variables. The new validation raises a dedicated exception if any required input for the compressor's evaluation (rate, suction pressure, or discharge pressure) is missing.
Previously, the code did not check that the correct evaluation variables were always set. This likely hasn't caused issues because 'rate' is typically present in the user's input data (e.g., facility input). Several tests are added to confirm that the required inputs are enforced across 1D, 2D, and 3D models.