Add test for COMPDAT as ACTIONX keyword
This commit is contained in:
parent
10314ce169
commit
1d6a930784
@ -60,7 +60,7 @@ std::string dequote(const std::string& token, const std::optional<KeywordLocatio
|
||||
|
||||
bool ActionX::valid_keyword(const std::string& keyword) {
|
||||
static std::unordered_set<std::string> actionx_allowed_list = {
|
||||
"COMPLUMP",
|
||||
"COMPLUMP", "COMPDAT",
|
||||
"EXIT",
|
||||
"GCONINJE", "GCONPROD", "GCONSUMP", "GLIFTOPT", "GRUPNET", "GRUPTARG", "GRUPTREE", "GSATINJE", "GSATPROD",
|
||||
"UDQ",
|
||||
|
@ -1266,6 +1266,57 @@ TSTEP
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Action_COMPDAT_ACTION) {
|
||||
const auto deck_string = std::string{ R"(
|
||||
GRID
|
||||
PORO
|
||||
1000*0.1 /
|
||||
PERMX
|
||||
1000*1 /
|
||||
PERMY
|
||||
1000*0.1 /
|
||||
PERMZ
|
||||
1000*0.01 /
|
||||
SCHEDULE
|
||||
|
||||
|
||||
ACTIONX
|
||||
'A' /
|
||||
WWCT 'OPX' > 0.75 AND /
|
||||
FPR < 100 /
|
||||
/
|
||||
|
||||
WELSPECS
|
||||
'PROD1' 'G1' 1 1 10 'OIL' /
|
||||
/
|
||||
|
||||
COMPDAT
|
||||
'PROD1' 1 1 1 3 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 /
|
||||
/
|
||||
|
||||
ENDACTIO
|
||||
|
||||
TSTEP
|
||||
10 /
|
||||
|
||||
)"};
|
||||
|
||||
const auto st = SummaryState{ TimeService::now() };
|
||||
Schedule sched = make_schedule(deck_string);
|
||||
const auto& action1 = sched[0].actions.get()["A"];
|
||||
|
||||
BOOST_CHECK(!sched.hasWell("PROD1"));
|
||||
|
||||
Action::Result action_result(true);
|
||||
sched.applyAction(0, TimeService::now(), action1, action_result, {});
|
||||
|
||||
const auto& well = sched.getWell("PROD1", 1);
|
||||
const auto& connections = well.getConnections();
|
||||
BOOST_CHECK_EQUAL(connections.size(), 3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Action_WELPI) {
|
||||
const auto deck_string = std::string{ R"(
|
||||
GRID
|
||||
|
Loading…
Reference in New Issue
Block a user