Add support for item 11 and 12 in GCONINJE

This commit is contained in:
Tor Harald Sandve
2019-11-01 12:46:16 +01:00
parent e296140f75
commit 64f4919085
4 changed files with 20 additions and 1 deletions

View File

@@ -109,6 +109,8 @@ struct GroupInjectionProperties {
UDAValue resv_max_rate;
UDAValue target_reinj_fraction;
UDAValue target_void_fraction;
std::string reinj_group;
std::string voidage_group;
int injection_controls = 0;
bool operator==(const GroupInjectionProperties& other) const;
@@ -123,6 +125,8 @@ struct InjectionControls {
double target_reinj_fraction;
double target_void_fraction;
int injection_controls = 0;
std::string reinj_group;
std::string voidage_group;
bool has_control(InjectionCMode control) const;
};

View File

@@ -115,7 +115,9 @@ bool Group2::GroupInjectionProperties::operator==(const GroupInjectionProperties
this->resv_max_rate == other.resv_max_rate &&
this->target_reinj_fraction == other.target_reinj_fraction &&
this->injection_controls == other.injection_controls &&
this->target_void_fraction == other.target_void_fraction;
this->target_void_fraction == other.target_void_fraction &&
this->reinj_group == other.reinj_group &&
this->voidage_group == other.voidage_group;
}
@@ -288,6 +290,8 @@ Group2::InjectionControls Group2::injectionControls(const SummaryState& st) cons
ic.resv_max_rate = UDA::eval_group_uda(this->injection_properties.resv_max_rate, this->m_name, st, this->udq_undefined);
ic.target_reinj_fraction = UDA::eval_group_uda(this->injection_properties.target_reinj_fraction, this->m_name, st, this->udq_undefined);
ic.target_void_fraction = UDA::eval_group_uda(this->injection_properties.target_void_fraction, this->m_name, st, this->udq_undefined);
ic.reinj_group = this->injection_properties.reinj_group;
ic.voidage_group = this->injection_properties.voidage_group;
return ic;
}

View File

@@ -1458,6 +1458,13 @@ namespace {
auto reservoirInjectionRate = record.getItem("RESV_TARGET").get<UDAValue>(0);
auto reinj_target = record.getItem("REINJ_TARGET").get<UDAValue>(0);
auto voidage_target = record.getItem("VOIDAGE_TARGET").get<UDAValue>(0);
std::string reinj_group = group_name;
if (!record.getItem("REINJECT_GROUP").defaultApplied(0))
reinj_group = record.getItem("REINJECT_GROUP").getTrimmedString(0);
std::string voidage_group = group_name;
if (!record.getItem("VOIDAGE_GROUP").defaultApplied(0))
voidage_group = record.getItem("VOIDAGE_GROUP").getTrimmedString(0);;
//surfaceInjectionRate = injection::rateToSI(surfaceInjectionRate, phase, section.unitSystem());
{
@@ -1470,6 +1477,8 @@ namespace {
injection.target_reinj_fraction = reinj_target;
injection.target_void_fraction = voidage_target;
injection.injection_controls = 0;
injection.reinj_group = reinj_group;
injection.voidage_group = voidage_group;
if (!record.getItem("SURFACE_TARGET").defaultApplied(0))
injection.injection_controls += static_cast<int>(Group2::InjectionCMode::RATE);

View File

@@ -348,6 +348,8 @@ BOOST_AUTO_TEST_CASE( WellTestGroups ) {
BOOST_CHECK_CLOSE( 20/Metric::Time , injection.resv_max_rate, 0.001);
BOOST_CHECK_EQUAL( 0.75 , injection.target_reinj_fraction);
BOOST_CHECK_EQUAL( 0.95 , injection.target_void_fraction);
BOOST_CHECK_EQUAL("INJ" , injection.reinj_group);
BOOST_CHECK_EQUAL("INJ" , injection.voidage_group);
BOOST_CHECK(group.isInjectionGroup());
}
{