Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move validate operational conditions from compressor train #256

Conversation

olelod
Copy link
Contributor

@olelod olelod commented Oct 27, 2023

Rename validate_operational_conditions to validate_model_input because it is validation of model input.

Move the validation out of compressor train, since model input of other models (such as pumps) should also be validated in the same way.

Adding ModelInputFailureStatus enum to keep track of valid/invalid model input.

@olelod olelod force-pushed the refactor-move-validate-operational-conditions-out-of-compressor-train branch 2 times, most recently from e7c294a to 4bee347 Compare October 27, 2023 09:19
Comment on lines +63 to +64
# any remaining zero or negative suction/discharge pressures (for unvalidated time steps, others are already changed)
# must be set to 1 (for neqsim to initiate fluid streams)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have unvalidated timesteps, and why is the pressure values relevant then? Unvalidated has zero rate or negative as far as I understand. I assume it is related to multiple streams, but not sure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think it is the current implementation of simplified train that requires it.

(

inlet_streams = self.fluid.get_fluid_streams(
)

@olelod olelod marked this pull request as ready for review October 27, 2023 09:57
@olelod olelod requested a review from a team as a code owner October 27, 2023 09:57
… rename to validate model input

chore: add ModelInputFailureStatus

chore: fix tests
@olelod olelod force-pushed the refactor-move-validate-operational-conditions-out-of-compressor-train branch from 4bee347 to 03d0087 Compare October 27, 2023 10:12
@olelod olelod merged commit 6b0c728 into main Oct 27, 2023
6 checks passed
@olelod olelod deleted the refactor-move-validate-operational-conditions-out-of-compressor-train branch October 27, 2023 10:35
equinor-schen pushed a commit that referenced this pull request Nov 22, 2023
… rename to validate model input (#256)

chore: add ModelInputFailureStatus

chore: fix tests
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