-
Notifications
You must be signed in to change notification settings - Fork 130
Rework initialization of segment pressures #6587
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
ed4e182
cd5a082
91650e6
88f7cfc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -176,6 +176,14 @@ class WellState | |
| const int segment, | ||
| std::vector<Scalar>& segment_rates); | ||
|
|
||
| void setSegmentPressuresFromInlets(std::vector<Scalar>& segment_pressures, | ||
|
||
| const std::vector<std::vector<int>>& segment_inlets, | ||
| const int segment); | ||
|
|
||
| void setSegmentPressuresFromOutlets(std::vector<Scalar>& segment_pressures, | ||
| const std::vector<std::vector<int>>& segment_outlets, | ||
| const int segment, | ||
| const int outlet_segment); | ||
|
|
||
| void communicateGroupRates(const Parallel::Communication& comm); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make this code work
segment_pressures[0]can not be negative. an safety checking will be needed here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if top segment pressure us unset at this stage, it means the well has no connections which I guess should not happen at this stage, but better to be safe. In this situation arises, I guess it's best just to set it to bhp (which means all segments will get that pressure).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or more directly, inside the function
setSegmentPressuresFromOutlets(), make sure the -1 index should not be used.