Handle WEFAC
Added test combining WEFAC and GEFAC
This commit is contained in:
parent
1d1347d2b3
commit
1b13f44e12
|
@ -1612,8 +1612,8 @@ namespace Opm
|
||||||
production_specification.control_mode_ = toProductionControlMode(WellProducer::ControlMode2String(properties.controlMode));
|
production_specification.control_mode_ = toProductionControlMode(WellProducer::ControlMode2String(properties.controlMode));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: should be specified with WEFAC, while we do not have this keyword support yet.
|
// Efficiency factor given specified with WEFAC
|
||||||
const double efficiency_factor = 1.0;
|
const double efficiency_factor = well->getEfficiencyFactor(timeStep);
|
||||||
std::shared_ptr<WellsGroupInterface> wells_group(new WellNode(well->name(), efficiency_factor, production_specification, injection_specification, phase_usage));
|
std::shared_ptr<WellsGroupInterface> wells_group(new WellNode(well->name(), efficiency_factor, production_specification, injection_specification, phase_usage));
|
||||||
return wells_group;
|
return wells_group;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,3 +78,42 @@ BOOST_AUTO_TEST_CASE(AddWellsAndGroupToCollection) {
|
||||||
BOOST_CHECK_EQUAL("G2", collection.findNode("PROD2")->getParent()->name());
|
BOOST_CHECK_EQUAL("G2", collection.findNode("PROD2")->getParent()->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(EfficiencyFactor) {
|
||||||
|
Parser parser;
|
||||||
|
std::string scheduleFile("wells_group.data");
|
||||||
|
ParseContext parseContext;
|
||||||
|
Deck deck = parser.parseFile(scheduleFile, parseContext);
|
||||||
|
EclipseState eclipseState(deck, parseContext);
|
||||||
|
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||||
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const TableManager table ( deck );
|
||||||
|
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
|
size_t timestep = 2;
|
||||||
|
WellCollection collection;
|
||||||
|
// Add groups to WellCollection
|
||||||
|
const auto& fieldGroup = sched.getGroup("FIELD");
|
||||||
|
collection.addField(fieldGroup, timestep, pu);
|
||||||
|
collection.addGroup( sched.getGroup( "G1" ), fieldGroup.name(), timestep, pu);
|
||||||
|
collection.addGroup( sched.getGroup( "G2" ), fieldGroup.name(), timestep, pu);
|
||||||
|
|
||||||
|
BOOST_CHECK_EQUAL(1.0, collection.findNode("FIELD")->efficiencyFactor());
|
||||||
|
BOOST_CHECK_EQUAL(1.0, collection.findNode("G1")->getParent()->efficiencyFactor());
|
||||||
|
BOOST_CHECK_EQUAL(1.0, collection.findNode("G2")->getParent()->efficiencyFactor());
|
||||||
|
|
||||||
|
// Add wells to WellCollection
|
||||||
|
auto wells1 = sched.getWells(timestep);
|
||||||
|
for (size_t i=0; i<wells1.size(); i++) {
|
||||||
|
collection.addWell(wells1[i], timestep, pu);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 0.5(inj1) * 0.8(G1)
|
||||||
|
BOOST_CHECK_CLOSE(0.4, collection.findWellNode("INJ1").getAccumulativeEfficiencyFactor(), 1e-10);
|
||||||
|
// 0.8(inj2) * 0.8(G1)
|
||||||
|
BOOST_CHECK_CLOSE(0.64, collection.findWellNode("INJ2").getAccumulativeEfficiencyFactor(), 1e-10);
|
||||||
|
// 0.5 (prod1) * 1.0 (G2)
|
||||||
|
BOOST_CHECK_CLOSE(0.5, collection.findWellNode("PROD1").getAccumulativeEfficiencyFactor(), 1e-10);
|
||||||
|
// 1.0 (prod2) * 1.0 (G2)
|
||||||
|
BOOST_CHECK_CLOSE(1.0, collection.findWellNode("PROD2").getAccumulativeEfficiencyFactor(), 1e-10);
|
||||||
|
}
|
||||||
|
|
|
@ -122,5 +122,30 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromGroup) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(EfficiencyFactor) {
|
||||||
|
Parser parser;
|
||||||
|
ParseContext parseContext;
|
||||||
|
std::string scheduleFile("wells_group.data");
|
||||||
|
Deck deck = parser.parseFile(scheduleFile, parseContext);
|
||||||
|
EclipseState eclipseState(deck , parseContext);
|
||||||
|
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||||
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const TableManager table ( deck );
|
||||||
|
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
|
|
||||||
|
const auto& nodes = sched.getGroupTree(2);
|
||||||
|
|
||||||
|
for( const auto& grp : sched.getGroups() ) {
|
||||||
|
if( !nodes.exists( grp->name() ) ) continue;
|
||||||
|
const auto& group = *grp;
|
||||||
|
|
||||||
|
std::shared_ptr<WellsGroupInterface> wellsGroup = createGroupWellsGroup(group, 2, pu);
|
||||||
|
BOOST_CHECK_EQUAL(group.name(), wellsGroup->name());
|
||||||
|
BOOST_CHECK_EQUAL(group.getGroupEfficiencyFactor(2), wellsGroup->efficiencyFactor());
|
||||||
|
BOOST_CHECK_EQUAL(group.getGroupEfficiencyFactor(2), wellsGroup->efficiencyFactor());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,11 @@ COMPDAT
|
||||||
'PROD1' 10 1 1 1 'OPEN' 0 10.6092 0.5 /
|
'PROD1' 10 1 1 1 'OPEN' 0 10.6092 0.5 /
|
||||||
/
|
/
|
||||||
|
|
||||||
|
WEFAC
|
||||||
|
'INJ1' 0.5 /
|
||||||
|
'PROD1' 0.5 /
|
||||||
|
/
|
||||||
|
|
||||||
TSTEP
|
TSTEP
|
||||||
14.0 /
|
14.0 /
|
||||||
|
|
||||||
|
@ -61,6 +66,15 @@ GCONPROD
|
||||||
'G2' ORAT 10000 /
|
'G2' ORAT 10000 /
|
||||||
/
|
/
|
||||||
|
|
||||||
|
WEFAC
|
||||||
|
'INJ2' 0.8 /
|
||||||
|
'PROD2' 1.0 /
|
||||||
|
/
|
||||||
|
|
||||||
|
GEFAC
|
||||||
|
'G1' 0.8 /
|
||||||
|
/
|
||||||
|
|
||||||
WCONINJE
|
WCONINJE
|
||||||
'INJ1' 'WATER' 'OPEN' 'RESV' 10 20 40 /
|
'INJ1' 'WATER' 'OPEN' 'RESV' 10 20 40 /
|
||||||
'INJ2' 'WATER' 'OPEN' 'RESV' 10 20 40 /
|
'INJ2' 'WATER' 'OPEN' 'RESV' 10 20 40 /
|
||||||
|
|
Loading…
Reference in New Issue
Block a user