-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add support for WTHPH+WBHPH keywords #1162
Conversation
The code in itself looks perfectly OK, but there have been insane amounts of confusion regarding BHP in this code, and I fear the current PR will add to that. I will look carefully through - hopefully we can guard against this confusion by just using better names, but I am not certain. The problem is that the term BHP is used in (at least) three different ways:
What I fear is that there is some non-trivial interaction between 2 and 3 above, need to verify that before this can be merged. |
I quite frankly do not fully understand if this is enough; but I think this should be enough:
|
I opened an issue ( #1163 ) regarding the ambiguities in WellProductionProperties and WellInjectionProperties as these are used for representing both history matching and control data, with a boolean property separating the two. Having separate types for history matching and control would enable terms such as BHP (as well as Oil production rate etc. ) to be interpreted as historic data or targets/limits from context. As far as I understand, case 1 will not be represented in WellProductionProperties and WellInjectionProperties. |
Do the keywords |
These are not keywords, but suggested class member names. Should only affect output. |
To clarify, WTHPH and WBHPH are keywords for the summary output (THPH and BHPH are suggested class member names). This PR is adding support for historic BHP and THP data to be accessed in opm-output in order to support these keywords, as these are not read from WCONHIST and WCONINJH as of now. |
I have not looked at The simulator manages to work with other further processing, so some adjustment needs to be done there. |
Which values were read as limits? |
If I understand the function correctly,
|
The rates are read into the same variables for limits and historic data. However, this is not the case for BHP and THP. Since the BHPLimit variable is used for other purposes in the code this can not be done for this variable. Using BHPH and THPH could help to make this distinction somewhat clearer. It is true that solving issue #1163 would solve this. Should I fix this PR or await an alternative solution? |
Do you mean in the keyword like WCONHIST, the rates not under control serve also as limits not just historical data? I thought they will just be observed data for comparison while will serve as control/limit. |
A question about SUMMARY keyword, do we support customization the output of SUMMARY, or what we output through summary is fixed by the simulator. The definition of the keyword The support of the keyword WTHPH+WBHPH should be defined in the |
Yes - the parser checks the
yes - and that is already implemented and works.
We will only output them if asked for - but we will output them also for non-history matching wells if they are requested. I guess you could call that a logical f...up. |
good, then we will focus on make the correct values in place |
The plan is to merge this PR (#1162) quite soon, that should be a pure additive change not conflicting with anything[1]. I think I agree that a Good Solution™ involves splitting the well properties objects into a historical class and a prediction class - along the lines of #1032, but experience has shown that these topics (historical/prediction/rates/controls/ ...) is a massive conceptual clusterf..k in Eclipse - so getting a correct and easily maintainable solution of this in our code might be quite non trivial. [1]: Please scream out if you disagree strongly. |
Sure. Please feel free to do that. My focus is making the treatment of history matching wells correct. Especially, when we remove the usage of the WellControls from opm-core, using the injection and production properties from opm-parser directly, it will look bad if we redo the same trick with WellControls again with the injection and production properties from opm-parser. |
6d33086
to
c58cd09
Compare
lib/eclipse/tests/ScheduleTests.cpp
Outdated
" 'P' 'OP' 9 9 1* 'OIL' 1* / \n" | ||
" 'I' 'OP' 9 9 1* 'WATER' 1* / \n" | ||
"/\n" | ||
"WCONHIST\n" |
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.
Add a WCONPROD
keyword with well P2
- set the BHP
and THP
items of that well, and verify that the BHPH
and THPH
variables have not been set.
@@ -86,6 +86,9 @@ namespace Opm { | |||
throw std::invalid_argument("Setting CMODE to unspecified control"); | |||
} | |||
|
|||
p.BHPH = record.getItem("BHP").getSIDouble(0); |
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.
The BHP
and THP
items do not have default values, so this must be "protected" with hasValue(0)
checks.
@@ -740,6 +740,13 @@ namespace Opm { | |||
} | |||
properties.predictionMode = false; | |||
|
|||
properties.BHPH = record.getItem( "BHP" ).hasValue(0) |
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.
The BHPH
and THPH
elements should be initialized to zero; no need to explicitly assign to 0.0.
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.
A couple of small comments, then this can be merged.
c58cd09
to
f8bbb7c
Compare
f8bbb7c
to
f78373a
Compare
jenkins build this with downstreams opm-output=222 please |
No description provided.