From f115ed43f5605b93d2b0559d8dace579e11d409a Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Mon, 30 Mar 2020 13:39:04 +0200 Subject: [PATCH] msim: Ensure that only open wells get an assigned rate --- msim/src/msim.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/msim/src/msim.cpp b/msim/src/msim.cpp index 6b5bb40bf..2f20b3aae 100644 --- a/msim/src/msim.cpp +++ b/msim/src/msim.cpp @@ -135,6 +135,10 @@ void msim::simulate(const Schedule& schedule, const SummaryState& st, data::Solu for (const auto& well_pair : this->well_rates) { const std::string& well_name = well_pair.first; + const auto& sched_well = schedule.getWell(well_name, report_step); + if (sched_well.getStatus() != Well::Status::OPEN) + continue; + data::Well& well = well_data[well_name]; for (const auto& rate_pair : well_pair.second) { auto rate = rate_pair.first;