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

Canonicalise Region Selectors in Action Conditions #4449

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

bska
Copy link
Member

@bska bska commented Jan 27, 2025

This PR translates ACTIONX condition region quantities of the form

RPR 1 RE3

i.e., including the region set name RE3 (FIPRE3) into the common summary vector format

RPR__RE3 1

which is expected elsewhere. Doing so enables using the former syntax in ACTIONX conditions like

RPR 1 RE3 < 215 /

without incurring significant downstream changes in the vector evaluation code. Defaulted ('1*') or blank (' ') region set names are treated as the default region set (FIPNUM).

@bska
Copy link
Member Author

bska commented Jan 27, 2025

I am creating this PR in draft mode for two reasons

  1. It depends on, and contains, the earlier PR Simplify Action Condition Parsing API #4448.
  2. It will require some additional testing before it's ready for review and merging.

I will keep the PR in a draft state until such time as it is ready for review and merging. The PR does however allow me to run UDQ_REG-01 (PR OPM/opm-tests#1174) with the changes below.


--- /home/bska/work/opm/src/opm/opm-tests/udq_actionx/UDQ_REG-01.DATA	2024-02-08 10:44:34.853937886 +0100
+++ ./TEST1_FLOW.DATA	2024-06-02 14:20:04.000000000 +0200
@@ -252,6 +252,9 @@
 RPR
  1 2 3 4 5 6 /
 
+RPR__RE3
+/
+
 FURE2
 FUGASX
 FUGIRD
@@ -261,8 +264,13 @@
 SCHEDULE
 ------------------------------------------------------------------------------------------------
 
--- start: 10  'OCT' 2018 /
+-- __ start: 10  'OCT' 2018 /
 
+TUNING
+ 1.0 3.0 /
+ /
+ /
+ 
 GRUPTREE
  'TEST'  'FIELD' /
 /
@@ -322,6 +330,17 @@
 UNITS  FUGIRDX SM3D /
 /
 
+ACTIONX
+TESTR1 1000 10.0 /
+RPR 1 RE3  < 215.0 /
+/
+
+WELTARG
+ 'D-1H' 'ORAT' 1000.0 /
+/
+ 
+ENDACTIO
+
   
 DATES
  1 NOV 2018 /

Here are some selected summary vectors from this run (mpirun -np 6).

Level Vectors
Field field-vectors
Region region-vectors
Well well-vectors

@bska
Copy link
Member Author

bska commented Jan 27, 2025

jenkins build this please

@bska bska force-pushed the actionx-reg-select-syntax branch 5 times, most recently from ab65298 to 67938b3 Compare January 31, 2025 08:18
@tskille
Copy link
Contributor

tskille commented Jan 31, 2025

Perfect, this has now been tested in Equinor and results are excellent. Looking forward to see this going into master

This commit translates ACTIONX condition region quantities of the
form

    RPR 1 RE3

i.e., including the region set name 'RE3' (FIPRE3) into the common
summary vector format

    RPR__RE3 1

which is expected elsewhere.  Doing so enables using the former
syntax in ACTIONX conditions like

    RPR 1 RE3 < 215 /

without incurring significant downstream changes in the vector
evaluation code.  Defaulted ('1*') or blank (' ') region set names
are treated as the default region set (FIPNUM).
@bska bska force-pushed the actionx-reg-select-syntax branch from 67938b3 to 3053b04 Compare January 31, 2025 11:16
@bska
Copy link
Member Author

bska commented Jan 31, 2025

This has now been tested in Equinor and results are excellent.

Thank you for testing. In that case I'll mark this PR as "ready for review" and I'll run a build check.

@bska bska marked this pull request as ready for review January 31, 2025 11:17
@bska
Copy link
Member Author

bska commented Jan 31, 2025

jenkins build this please

@bska
Copy link
Member Author

bska commented Feb 3, 2025

PR approved and build check is green. I'll merge into master.

@bska bska merged commit ae47d09 into OPM:master Feb 3, 2025
1 check passed
@bska bska deleted the actionx-reg-select-syntax branch February 3, 2025 09:41
@blattms
Copy link
Member

blattms commented Feb 5, 2025

Wow, nice clean diff for such an improvement. 💪

@bska
Copy link
Member Author

bska commented Feb 5, 2025

nice clean diff for such an improvement.

Thanks! Sometimes the stars just align to enable these kinds of changes.

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.

4 participants