From 4333a69cd4dde9110812c1e2a479eae05c1ffd70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Tue, 31 May 2022 16:19:47 +0200 Subject: [PATCH] Require ENDSCALE When JFUNC Entered We effectively ignore JFUNC data unless end-point scaling is activated through the ENDSCALE keyword in the RUNSPEC section. Alert the user to this fact by terminating the simulation run if the case uses JFUNC without ENDSCALE present in RUNSPEC. In this case, issue a diagnostic message of the form Error: Unrecoverable errors while loading input: Problem with keyword JFUNC In CASE.DATA line 125 Incompatible keyword combination: JFUNC declared, but ENDSCALE is missing. --- python/tests/data/JFUNC.DATA | 4 ++++ python/tests/test_state.py | 2 ++ src/opm/input/eclipse/share/keywords/000_Eclipse100/J/JFUNC | 1 + src/opm/input/eclipse/share/keywords/000_Eclipse100/J/JFUNCR | 1 + 4 files changed, 8 insertions(+) diff --git a/python/tests/data/JFUNC.DATA b/python/tests/data/JFUNC.DATA index e41d964c6..0c5effafd 100644 --- a/python/tests/data/JFUNC.DATA +++ b/python/tests/data/JFUNC.DATA @@ -5,6 +5,10 @@ TITLE DIMENS 10 10 10 / + +ENDSCALE +/ + GRID DX 1000*0.25 / diff --git a/python/tests/test_state.py b/python/tests/test_state.py index 5f807b9d3..9051df7e8 100644 --- a/python/tests/test_state.py +++ b/python/tests/test_state.py @@ -156,6 +156,8 @@ SATNUM jfunc_gas = """ DIMENS 10 10 10 / +ENDSCALE +/ GRID DX 1000*0.25 / diff --git a/src/opm/input/eclipse/share/keywords/000_Eclipse100/J/JFUNC b/src/opm/input/eclipse/share/keywords/000_Eclipse100/J/JFUNC index 7ff81128a..679c11da5 100644 --- a/src/opm/input/eclipse/share/keywords/000_Eclipse100/J/JFUNC +++ b/src/opm/input/eclipse/share/keywords/000_Eclipse100/J/JFUNC @@ -4,6 +4,7 @@ "GRID" ], "size": 1, + "requires": ["ENDSCALE"], "items": [ { "name": "FLAG", diff --git a/src/opm/input/eclipse/share/keywords/000_Eclipse100/J/JFUNCR b/src/opm/input/eclipse/share/keywords/000_Eclipse100/J/JFUNCR index 80885f45f..bf865940e 100644 --- a/src/opm/input/eclipse/share/keywords/000_Eclipse100/J/JFUNCR +++ b/src/opm/input/eclipse/share/keywords/000_Eclipse100/J/JFUNCR @@ -7,6 +7,7 @@ "keyword": "TABDIMS", "item": "NTSFUN" }, + "requires": ["ENDSCALE"], "items": [ { "name": "J_FUNCTION",