Merge pull request #3580 from joakim-hove/wtest-rename

Remove ecl wells argument to check wells for testing
This commit is contained in:
Joakim Hove
2021-10-10 09:54:16 +02:00
committed by GitHub
3 changed files with 8 additions and 6 deletions

View File

@@ -388,12 +388,14 @@ namespace Opm {
const auto& wtest_config = schedule()[timeStepIdx].wtest_config();
if (!wtest_config.empty()) { // there is a WTEST request
const std::vector<std::string> wellsForTesting = wellTestState()
.updateWells(wtest_config, wells_ecl_, simulationTime);
.test_wells(wtest_config, simulationTime);
for (const std::string& well_name : wellsForTesting) {
// this is the well we will test
WellInterfacePtr well = createWellForWellTest(well_name, timeStepIdx, deferred_logger);
const auto& ws = this->wellState().well(well_name);
if (ws.status != Well::Status::OPEN)
continue;
WellInterfacePtr well = createWellForWellTest(well_name, timeStepIdx, deferred_logger);
// some preparation before the well can be used
well->init(&phase_usage_, depth_, gravity_, local_num_cells_, B_avg_);
const Well& wellEcl = schedule().getWell(well_name, timeStepIdx);

View File

@@ -227,14 +227,14 @@ void WellInterfaceGeneric::initCompletions()
assert(my_next_perf == perf_data_->end());
}
void WellInterfaceGeneric::closeCompletions(WellTestState& wellTestState)
void WellInterfaceGeneric::closeCompletions(const WellTestState& wellTestState)
{
const auto& connections = well_ecl_.getConnections();
int perfIdx = 0;
for (const auto& connection : connections) {
if (connection.state() == Connection::State::OPEN) {
if (wellTestState.completion_is_closed(name(), connection.complnum())) {
well_index_[perfIdx] = 0.0;
this->well_index_[perfIdx] = 0.0;
}
perfIdx++;
}

View File

@@ -85,7 +85,7 @@ public:
bool isOperableAndSolvable() const;
void initCompletions();
void closeCompletions(WellTestState& wellTestState);
void closeCompletions(const WellTestState& wellTestState);
void setVFPProperties(const VFPProperties* vfp_properties_arg);
void setGuideRate(const GuideRate* guide_rate_arg);