Support GCONLIFT in ACTIONX
This commit is contained in:
parent
7dd50935d1
commit
f3d6c3abe4
@ -33,7 +33,7 @@ namespace Action {
|
||||
|
||||
|
||||
bool ActionX::valid_keyword(const std::string& keyword) {
|
||||
static std::unordered_set<std::string> actionx_allowed_list = {"EXIT", "GCONPROD", "WELSPECS","WELOPEN", "UDQ"};
|
||||
static std::unordered_set<std::string> actionx_allowed_list = {"EXIT", "GCONPROD", "GLIFTOPT", "WELSPECS","WELOPEN", "UDQ"};
|
||||
return (actionx_allowed_list.find(keyword) != actionx_allowed_list.end());
|
||||
}
|
||||
|
||||
|
@ -1499,6 +1499,9 @@ private:
|
||||
|
||||
if (keyword.name() == "GCONPROD")
|
||||
this->handleGCONPROD(keyword, reportStep, parseContext, errors);
|
||||
|
||||
if (keyword.name() == "GLIFTOPT")
|
||||
this->handleGLIFTOPT(keyword, reportStep, parseContext, errors);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -981,3 +981,62 @@ TSTEP
|
||||
BOOST_CHECK_CLOSE( prod.oil_target , unit_system.to_si(UnitSystem::measure::liquid_surface_rate, 200), 1e-5 );
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GASLIFT_OPT_DECK) {
|
||||
const auto input = R"(-- Turns on gas lift optimization
|
||||
RUNSPEC
|
||||
LIFTOPT
|
||||
/
|
||||
|
||||
SCHEDULE
|
||||
|
||||
GRUPTREE
|
||||
'PROD' 'FIELD' /
|
||||
|
||||
'M5S' 'PLAT-A' /
|
||||
'M5N' 'PLAT-A' /
|
||||
|
||||
'C1' 'M5N' /
|
||||
'F1' 'M5N' /
|
||||
'B1' 'M5S' /
|
||||
'G1' 'M5S' /
|
||||
/
|
||||
|
||||
ACTIONX
|
||||
'A' /
|
||||
WWCT 'OPX' > 0.75 AND /
|
||||
FPR < 100 /
|
||||
/
|
||||
|
||||
GLIFTOPT
|
||||
'PLAT-A' 200000 / --
|
||||
/
|
||||
|
||||
ENDACTIO
|
||||
|
||||
TSTEP
|
||||
10 /
|
||||
|
||||
|
||||
)";
|
||||
|
||||
Opm::UnitSystem unitSystem = UnitSystem( UnitSystem::UnitType::UNIT_TYPE_METRIC );
|
||||
auto sched = make_schedule(input);
|
||||
const auto& action1 = sched.actions(0).get("A");
|
||||
{
|
||||
const auto& glo = sched.glo(0);
|
||||
BOOST_CHECK(!glo.has_group("PLAT-A"));
|
||||
}
|
||||
|
||||
Action::Result action_result(true);
|
||||
sched.applyAction(0, action1, action_result);
|
||||
|
||||
{
|
||||
const auto& glo = sched.glo(0);
|
||||
BOOST_CHECK(glo.has_group("PLAT-A"));
|
||||
const auto& plat_group = glo.group("PLAT-A");
|
||||
BOOST_CHECK_EQUAL( *plat_group.max_lift_gas(), unitSystem.to_si( UnitSystem::measure::gas_surface_rate, 200000));
|
||||
BOOST_CHECK(!plat_group.max_total_gas().has_value());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user