Merge pull request #1718 from joakim-hove/welspecs-items

Internalize Gas inflow equation flag in Well - for reporting
This commit is contained in:
Bård Skaflestad 2020-04-19 23:45:51 +02:00 committed by GitHub
commit 4da5a81233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 101 additions and 33 deletions

View File

@ -360,6 +360,7 @@ namespace Opm
bool allowCrossFlow,
bool automaticShutIn,
int pvt_table,
Well::GasInflowEquation gas_inflow,
size_t timeStep,
Connection::Order wellConnectionOrder,
const UnitSystem& unit_system);

View File

@ -149,6 +149,16 @@ public:
static GuideRateTarget GuideRateTargetFromString( const std::string& stringValue );
enum class GasInflowEquation {
STD = 0,
R_G = 1,
P_P = 2,
GPP = 3
};
static const std::string GasInflowEquation2String(GasInflowEquation enumValue);
static GasInflowEquation GasInflowEquationFromString(const std::string& stringValue);
struct WellGuideRate {
bool available;
@ -431,7 +441,8 @@ public:
double dr,
bool allow_xflow,
bool auto_shutin,
int pvt_table);
int pvt_table,
GasInflowEquation inflow_eq);
Well(const RestartIO::RstWell& rst_well,
int report_step,
@ -542,6 +553,7 @@ public:
int vfp_table_number() const;
int pvt_table_number() const;
int fip_region_number() const;
GasInflowEquation gas_inflow_equation() const;
bool segmented_density_calculation() const { return true; }
double alq_value() const;
double temperature() const;
@ -566,6 +578,7 @@ public:
serializer(allow_cross_flow);
serializer(automatic_shutin);
serializer(pvt_table);
serializer(gas_inflow);
wtype.serializeOp(serializer);
guide_rate.serializeOp(serializer);
serializer(efficiency_factor);
@ -597,6 +610,7 @@ private:
bool allow_cross_flow;
bool automatic_shutin;
int pvt_table;
GasInflowEquation gas_inflow = GasInflowEquation::STD; // Will NOT be loaded/assigned from restart file
UnitSystem unit_system;
double udq_undefined;
Status status;
@ -606,6 +620,7 @@ private:
double solvent_fraction;
bool prediction_mode = true;
std::shared_ptr<WellEconProductionLimits> econ_limits;
std::shared_ptr<WellFoamProperties> foam_properties;
std::shared_ptr<WellPolymerProperties> polymer_properties;

View File

@ -304,12 +304,22 @@ namespace {
we have therefor hardcoded that for now.
*/
std::string D_factor(std::size_t) const {
return "0?";
return "0";
}
std::string cross_flow(std::size_t) const {
return well.getAllowCrossFlow() ? "YES" : "NO";
}
std::string drainage_radius(std::size_t) const {
if (well.getDrainageRadius() == 0)
return "P.EQUIV.R";
return std::to_string(well.getDrainageRadius()).substr(0,6);
}
std::string gas_inflow(std::size_t) const {
return Opm::Well::GasInflowEquation2String( well.gas_inflow_equation() );
}
};
const subreport<Opm::Well, WellWrapper, 3> well_specification { "WELL SPECIFICATION DATA", {
@ -318,19 +328,19 @@ namespace {
{ 8, { "WELLHEAD" , "LOCATION" , "( I, J )" }, &WellWrapper::wellhead_location, left_align },
{ 8, { "B.H.REF" , "DEPTH" , "METRES" }, &WellWrapper::reference_depth , right_align },
{ 5, { "PREF-" , "ERRED" , "PHASE" }, &WellWrapper::preferred_phase , },
{ 8, { "DRAINAGE" , "RADIUS" , "METRES" }, &WellWrapper::unimplemented , },
{ 4, { "GAS" , "INFL" , "EQUN" }, &WellWrapper::unimplemented , },
{ 8, { "DRAINAGE" , "RADIUS" , "METRES" }, &WellWrapper::drainage_radius , },
{ 4, { "GAS" , "INFL" , "EQUN" }, &WellWrapper::gas_inflow , },
{ 7, { "SHUT-IN" , "INSTRCT" , }, &WellWrapper::shut_status , },
{ 5, { "CROSS" , "FLOW" , "ABLTY" }, &WellWrapper::cross_flow , },
{ 3, { "PVT" , "TAB" , }, &WellWrapper::pvt_tab , },
{ 4, { "WELL" , "DENS" , "CALC" }, &WellWrapper::dens_calc , },
{ 3, { "FIP" , "REG" , }, &WellWrapper::region_number , },
{ 11, { "WELL" , "D-FACTOR" , "DAY/SM3" }, &WellWrapper::D_factor , },
{ 11, { "WELL" , "D-FACTOR?" , "DAY/SM3" }, &WellWrapper::D_factor , },
}};
void subreport_well_specification_data(std::ostream& os, const std::vector<Opm::Well>& data) {
well_specification.print(os, data);
os << "? The WELL D-FACTOR is not implemented - and the report will always show the default value 0." << std::endl;
os << std::endl;
}
@ -394,6 +404,10 @@ namespace {
return std::to_string(connection.skinFactor()).substr(0, 8);
}
std::string sat_scaling(std::size_t) const {
return "";
}
const std::string &unimplemented(std::size_t) const {
static const std::string s { };
return s;
@ -423,12 +437,12 @@ namespace {
{ 7, {"K H" ,"VALUE" ,"MD.METRE" }, &WellConnection::kh_value , right_align },
{ 6, {"SKIN" ,"FACTOR" , }, &WellConnection::skin_factor , right_align },
{ 10, {"CONNECTION" ,"D-FACTOR" ,"DAY/SM3" }, &WellConnection::unimplemented , },
{ 23, {"SATURATION SCALING DATA","SWMIN SWMAX SGMIN SGMAX", }, &WellConnection::unimplemented , },
{ 23, {"SATURATION SCALING DATA","SWMIN SWMAX SGMIN SGMAX","&" }, &WellConnection::sat_scaling , },
}};
void subreport_well_connection_data(std::ostream& os, const std::vector<Opm::Well>& data) {
well_connection.print(os, data);
os << "&: The saturation scaling data has not been implemented in the report and will show blank" << std::endl;
os << std::endl;
}
}

View File

@ -2287,6 +2287,7 @@ void Schedule::invalidNamePattern( const std::string& namePattern, std::size_t
const std::string& group = record.getItem<ParserKeywords::WELSPECS::GROUP>().getTrimmedString(0);
auto pvt_table = record.getItem<WS::P_TABLE>().get<int>(0);
auto gas_inflow = Well::GasInflowEquationFromString( record.getItem<WS::INFLOW_EQ>().get<std::string>(0) );
this->addWell(wellName,
group,
@ -2298,6 +2299,7 @@ void Schedule::invalidNamePattern( const std::string& namePattern, std::size_t
allowCrossFlow,
automaticShutIn,
pvt_table,
gas_inflow,
timeStep,
wellConnectionOrder,
unit_system);
@ -2328,6 +2330,7 @@ void Schedule::invalidNamePattern( const std::string& namePattern, std::size_t
bool allowCrossFlow,
bool automaticShutIn,
int pvt_table,
Well::GasInflowEquation gas_inflow,
size_t timeStep,
Connection::Order wellConnectionOrder,
const UnitSystem& unit_system) {
@ -2346,7 +2349,8 @@ void Schedule::invalidNamePattern( const std::string& namePattern, std::size_t
drainageRadius,
allowCrossFlow,
automaticShutIn,
pvt_table);
pvt_table,
gas_inflow);
this->addWell( std::move(well), timeStep );
}

View File

@ -290,7 +290,8 @@ Well::Well(const std::string& wname_arg,
double dr,
bool allow_xflow,
bool auto_shutin,
int pvt_table_):
int pvt_table_,
GasInflowEquation inflow_eq):
wname(wname_arg),
group_name(gname),
init_step(init_step_arg),
@ -302,6 +303,7 @@ Well::Well(const std::string& wname_arg,
allow_cross_flow(allow_xflow),
automatic_shutin(auto_shutin),
pvt_table(pvt_table_),
gas_inflow(inflow_eq),
unit_system(unit_system_arg),
udq_undefined(udq_undefined_arg),
status(Status::SHUT),
@ -340,6 +342,7 @@ Well Well::serializeObject()
result.allow_cross_flow = true;
result.automatic_shutin = false;
result.pvt_table = 77;
result.gas_inflow = GasInflowEquation::GPP;
result.wtype = WellType(Phase::WATER);
result.guide_rate = WellGuideRate::serializeObject();
result.efficiency_factor = 8.0;
@ -992,6 +995,40 @@ bool Well::hasBeenDefined(size_t timeStep) const {
return true;
}
Well::GasInflowEquation Well::gas_inflow_equation() const {
return this->gas_inflow;
}
const std::string Well::GasInflowEquation2String(GasInflowEquation enumValue) {
switch(enumValue) {
case GasInflowEquation::STD:
return "STD";
case GasInflowEquation::R_G:
return "R-G";
case GasInflowEquation::P_P:
return "P-P";
case GasInflowEquation::GPP:
return "GPP";
default:
throw std::invalid_argument("Unhandled enum value");
}
}
Well::GasInflowEquation Well::GasInflowEquationFromString(const std::string& stringValue) {
if (stringValue == "STD" || stringValue == "NO")
return GasInflowEquation::STD;
if (stringValue == "R-G" || stringValue == "YES")
return GasInflowEquation::R_G;
if (stringValue == "P-P")
return GasInflowEquation::P_P;
if (stringValue == "GPP")
return GasInflowEquation::GPP;
throw std::invalid_argument("Gas inflow equation type: " + stringValue + " not recognized");
}
bool Well::canOpen() const {

View File

@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE(WTEST_STATE2) {
const UnitSystem us{};
std::vector<Well> wells;
wells.emplace_back("WELL_NAME", "A", 0, 0, 1, 1, 200., WellType(Phase::OIL), Well::ProducerCMode::NONE, Connection::Order::TRACK, us, 0., 1.0, true, true, 0);
wells.emplace_back("WELL_NAME", "A", 0, 0, 1, 1, 200., WellType(Phase::OIL), Well::ProducerCMode::NONE, Connection::Order::TRACK, us, 0., 1.0, true, true, 0, Well::GasInflowEquation::STD);
{
wells[0].updateStatus(Well::Status::SHUT, false);
auto shut_wells = st.updateWells(wc, wells, 5000);
@ -111,8 +111,8 @@ BOOST_AUTO_TEST_CASE(WTEST_STATE) {
const UnitSystem us{};
std::vector<Well> wells;
wells.emplace_back("WELL_NAME", "A", 0, 0, 1, 1, 200., WellType(Phase::OIL), Well::ProducerCMode::NONE, Connection::Order::TRACK, us, 0., 1.0, true, true, 0);
wells.emplace_back("WELLX", "A", 0, 0, 2, 2, 200., WellType(Phase::OIL), Well::ProducerCMode::NONE, Connection::Order::TRACK, us, 0., 1.0, true, true, 0);
wells.emplace_back("WELL_NAME", "A", 0, 0, 1, 1, 200., WellType(Phase::OIL), Well::ProducerCMode::NONE, Connection::Order::TRACK, us, 0., 1.0, true, true, 0, Well::GasInflowEquation::STD);
wells.emplace_back("WELLX", "A", 0, 0, 2, 2, 200., WellType(Phase::OIL), Well::ProducerCMode::NONE, Connection::Order::TRACK, us, 0., 1.0, true, true, 0, Well::GasInflowEquation::STD);
WellTestConfig wc;
{
@ -182,9 +182,9 @@ BOOST_AUTO_TEST_CASE(WTEST_STATE_COMPLETIONS) {
const UnitSystem us{};
std::vector<Well> wells;
wells.emplace_back("WELL_NAME", "A", 0, 0, 1, 1, 200., WellType(Phase::OIL), Well::ProducerCMode::NONE, Connection::Order::TRACK, us, 0., 1.0, true, true, 0);
wells.emplace_back("WELL_NAME", "A", 0, 0, 1, 1, 200., WellType(Phase::OIL), Well::ProducerCMode::NONE, Connection::Order::TRACK, us, 0., 1.0, true, true, 0, Well::GasInflowEquation::STD);
wells[0].updateStatus(Well::Status::OPEN, false);
wells.emplace_back("WELLX", "A", 0, 0, 2, 2, 200., WellType(Phase::OIL), Well::ProducerCMode::NONE, Connection::Order::TRACK, us, 0., 1.0, true, true, 0);
wells.emplace_back("WELLX", "A", 0, 0, 2, 2, 200., WellType(Phase::OIL), Well::ProducerCMode::NONE, Connection::Order::TRACK, us, 0., 1.0, true, true, 0, Well::GasInflowEquation::STD);
wells[1].updateStatus(Well::Status::OPEN, false);
auto closed_completions = st.updateWells(wc, wells, 5000);

View File

@ -188,9 +188,6 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestINPUT) {
const auto& completions = op_1.getConnections();
BOOST_CHECK_EQUAL(9U, completions.size());
//Verify INPUT completion ordering
BOOST_CHECK_EQUAL(completions.get( 0 ).getK(), 0);
BOOST_CHECK_EQUAL(completions.get( 1 ).getK(), 2);
BOOST_CHECK_EQUAL(completions.get( 2 ).getK(), 3);
BOOST_CHECK_EQUAL(completions.get( 3 ).getK(), 4);
@ -202,7 +199,7 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestINPUT) {
}
BOOST_AUTO_TEST_CASE(NewWellZeroCompletions) {
Opm::Well well("WELL1", "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1", "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
BOOST_CHECK_EQUAL( 0U , well.getConnections( ).size() );
}
@ -211,7 +208,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
// HACK: This test checks correctly setting of isProducer/isInjector. This property depends on which of
// WellProductionProperties/WellInjectionProperties is set last, independent of actual values.
{
Opm::Well well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
/* 1: Well is created as producer */
@ -229,7 +226,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
{
Opm::Well well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
/* Set a reservoir injection rate => Well becomes an Injector */
auto injectionProps2 = std::make_shared<Opm::Well::WellInjectionProperties>(well.getInjectionProperties());
@ -240,7 +237,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
}
{
Opm::Well well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
/* Set rates => Well becomes a producer; injection rate should be set to 0. */
auto injectionProps3 = std::make_shared<Opm::Well::WellInjectionProperties>(well.getInjectionProperties());
@ -263,7 +260,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
}
BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) {
Opm::Well well("WELL1" , "G1", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1" , "G1", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
BOOST_CHECK_EQUAL("G1" , well.groupName());
well.updateGroup( "GROUP2");
@ -272,7 +269,7 @@ BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) {
BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) {
Opm::Well well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::WellType(Opm::Phase::WATER), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::WellType(Opm::Phase::WATER), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
BOOST_CHECK_EQUAL(23, well.getHeadI());
BOOST_CHECK_EQUAL(42, well.getHeadJ());
@ -282,7 +279,7 @@ BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) {
BOOST_AUTO_TEST_CASE(XHPLimitDefault) {
Opm::Well well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::WellType(Opm::Phase::WATER), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::WellType(Opm::Phase::WATER), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
auto productionProps = std::make_shared<Opm::Well::WellProductionProperties>(well.getProductionProperties());
@ -302,7 +299,7 @@ BOOST_AUTO_TEST_CASE(XHPLimitDefault) {
BOOST_AUTO_TEST_CASE(ScheduleTypesInjectorType) {
Opm::Well well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::WellType(Opm::Phase::WATER), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::WellType(Opm::Phase::WATER), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
auto injectionProps = std::make_shared<Opm::Well::WellInjectionProperties>(well.getInjectionProperties());
@ -320,7 +317,7 @@ BOOST_AUTO_TEST_CASE(ScheduleTypesInjectorType) {
BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) {
Opm::Well well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::WellType(Opm::Phase::WATER), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::WellType(Opm::Phase::WATER), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
BOOST_CHECK( !well.getProductionProperties().hasProductionControl( Opm::Well::ProducerCMode::ORAT ));
@ -367,7 +364,7 @@ BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) {
BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
Opm::Well well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::WellType(Opm::Phase::WATER), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::WellType(Opm::Phase::WATER), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
BOOST_CHECK( !well.getInjectionProperties().hasInjectionControl( Opm::Well::InjectorCMode::RATE ));
BOOST_CHECK( !well.getInjectionProperties().hasInjectionControl( Opm::Well::InjectorCMode::RESV ));
@ -409,7 +406,7 @@ BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
/*********************************************************************/
BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
Opm::Well well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
BOOST_CHECK(Opm::Well::GuideRateTarget::UNDEFINED == well.getGuideRatePhase());
@ -420,7 +417,7 @@ BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
}
BOOST_AUTO_TEST_CASE(WellEfficiencyFactorSet) {
Opm::Well well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
BOOST_CHECK_EQUAL(1.0, well.getEfficiencyFactor());
BOOST_CHECK( well.updateEfficiencyFactor(0.9));
@ -789,7 +786,7 @@ BOOST_AUTO_TEST_CASE(CMODE_DEFAULT) {
BOOST_AUTO_TEST_CASE(WELL_CONTROLS) {
auto unit_system = UnitSystem::newMETRIC();
Opm::Well well("WELL", "GROUP", 0, 0, 0, 0, 1000, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Opm::Connection::Order::DEPTH, unit_system, 0, 1.0, false, false, 0);
Opm::Well well("WELL", "GROUP", 0, 0, 0, 0, 1000, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Opm::Connection::Order::DEPTH, unit_system, 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
Opm::Well::WellProductionProperties prod(unit_system, "OP1");
Opm::SummaryState st(std::chrono::system_clock::now());
well.productionControls(st);
@ -810,8 +807,8 @@ BOOST_AUTO_TEST_CASE(WELL_CONTROLS) {
BOOST_AUTO_TEST_CASE(ExtraAccessors) {
Opm::Well inj("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well prod("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0);
Opm::Well inj("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
Opm::Well prod("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::WellType(Opm::Phase::OIL), Opm::Well::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0, 1.0, false, false, 0, Opm::Well::GasInflowEquation::STD);
auto inj_props= std::make_shared<Opm::Well::WellInjectionProperties>(inj.getInjectionProperties());
inj_props->VFPTableNumber = 100;