From bcc8b2c17cd0052e6eeebb7ed5ca17aeb9d06bd5 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Wed, 28 Aug 2019 00:30:12 +0200 Subject: [PATCH] Adapt to enum changes --- ebos/ecltracermodel.hh | 4 +- ebos/eclwellmanager.hh | 60 ++++++------- opm/core/wells/WellCollection.cpp | 2 +- opm/core/wells/WellsGroup.cpp | 10 +-- opm/core/wells/WellsManager.cpp | 88 +++++++++---------- opm/core/wells/WellsManager_impl.hpp | 12 +-- .../wells/MultisegmentWell_impl.hpp | 2 +- opm/simulators/wells/SimFIBODetails.hpp | 2 +- opm/simulators/wells/StandardWell_impl.hpp | 4 +- opm/simulators/wells/WellInterface_impl.hpp | 16 ++-- .../wells/WellStateFullyImplicitBlackoil.hpp | 2 +- 11 files changed, 101 insertions(+), 101 deletions(-) diff --git a/ebos/ecltracermodel.hh b/ebos/ecltracermodel.hh index e2a988e7530..97b4a4ce0ab 100644 --- a/ebos/ecltracermodel.hh +++ b/ebos/ecltracermodel.hh @@ -485,14 +485,14 @@ protected: const auto& wells = simulator_.vanguard().schedule().getWells2(episodeIdx); for (const auto& well : wells) { - if (well.getStatus() == Opm::WellCommon::SHUT) + if (well.getStatus() == Opm::Well2::Status::SHUT) continue; const double wtracer = well.getTracerProperties().getConcentration(tracerNames_[tracerIdx]); std::array cartesianCoordinate; for (auto& connection : well.getConnections()) { - if (connection.state() == Opm::WellCompletion::SHUT) + if (connection.state() == Opm::Connection::State::SHUT) continue; cartesianCoordinate[0] = connection.getI(); diff --git a/ebos/eclwellmanager.hh b/ebos/eclwellmanager.hh index 31ca712130d..a08f7770de3 100644 --- a/ebos/eclwellmanager.hh +++ b/ebos/eclwellmanager.hh @@ -158,17 +158,17 @@ public: if (deckWell.isInjector( )) well->setTemperature(deckWell.injectionControls(summaryState).temperature); - Opm::WellCommon::StatusEnum deckWellStatus = deckWell.getStatus( ); + auto deckWellStatus = deckWell.getStatus( ); switch (deckWellStatus) { - case Opm::WellCommon::AUTO: + case Opm::Well2::Status::AUTO: // TODO: for now, auto means open... - case Opm::WellCommon::OPEN: + case Opm::Well2::Status::OPEN: well->setWellStatus(Well::Open); break; - case Opm::WellCommon::STOP: + case Opm::Well2::Status::STOP: well->setWellStatus(Well::Closed); break; - case Opm::WellCommon::SHUT: + case Opm::Well2::Status::SHUT: well->setWellStatus(Well::Shut); break; } @@ -183,40 +183,40 @@ public: well->setWellType(Well::Injector); const auto controls = deckWell.injectionControls(summaryState); switch (controls.injector_type) { - case Opm::WellInjector::WATER: + case Opm::Well2::InjectorType::WATER: well->setInjectedPhaseIndex(FluidSystem::waterPhaseIdx); break; - case Opm::WellInjector::GAS: + case Opm::Well2::InjectorType::GAS: well->setInjectedPhaseIndex(FluidSystem::gasPhaseIdx); break; - case Opm::WellInjector::OIL: + case Opm::Well2::InjectorType::OIL: well->setInjectedPhaseIndex(FluidSystem::oilPhaseIdx); break; - case Opm::WellInjector::MULTI: + case Opm::Well2::InjectorType::MULTI: throw std::runtime_error("Not implemented: Multi-phase injector wells"); } switch (controls.cmode) { - case Opm::WellInjector::RATE: + case Opm::Well2::InjectorCMode::RATE: well->setControlMode(Well::ControlMode::VolumetricSurfaceRate); break; - case Opm::WellInjector::RESV: + case Opm::Well2::InjectorCMode::RESV: well->setControlMode(Well::ControlMode::VolumetricReservoirRate); break; - case Opm::WellInjector::BHP: + case Opm::Well2::InjectorCMode::BHP: well->setControlMode(Well::ControlMode::BottomHolePressure); break; - case Opm::WellInjector::THP: + case Opm::Well2::InjectorCMode::THP: well->setControlMode(Well::ControlMode::TubingHeadPressure); break; - case Opm::WellInjector::GRUP: + case Opm::Well2::InjectorCMode::GRUP: throw std::runtime_error("Not implemented: Well groups"); - case Opm::WellInjector::CMODE_UNDEFINED: + case Opm::Well2::InjectorCMode::CMODE_UNDEFINED: std::cout << "Warning: Control mode of injection well " << well->name() << " is undefined. Assuming well to be shut.\n"; well->setWellStatus(Well::WellStatus::Shut); @@ -224,19 +224,19 @@ public: } switch (controls.injector_type) { - case Opm::WellInjector::WATER: + case Opm::Well2::InjectorType::WATER: well->setVolumetricPhaseWeights(/*oil=*/0.0, /*gas=*/0.0, /*water=*/1.0); break; - case Opm::WellInjector::OIL: + case Opm::Well2::InjectorType::OIL: well->setVolumetricPhaseWeights(/*oil=*/1.0, /*gas=*/0.0, /*water=*/0.0); break; - case Opm::WellInjector::GAS: + case Opm::Well2::InjectorType::GAS: well->setVolumetricPhaseWeights(/*oil=*/0.0, /*gas=*/1.0, /*water=*/0.0); break; - case Opm::WellInjector::MULTI: + case Opm::Well2::InjectorType::MULTI: throw std::runtime_error("Not implemented: Multi-phase injection wells"); } @@ -254,53 +254,53 @@ public: const auto controls = deckWell.productionControls(summaryState); switch (controls.cmode) { - case Opm::WellProducer::ORAT: + case Opm::Well2::ProducerCMode::ORAT: well->setControlMode(Well::ControlMode::VolumetricSurfaceRate); well->setVolumetricPhaseWeights(/*oil=*/1.0, /*gas=*/0.0, /*water=*/0.0); well->setMaximumSurfaceRate(controls.oil_rate); break; - case Opm::WellProducer::GRAT: + case Opm::Well2::ProducerCMode::GRAT: well->setControlMode(Well::ControlMode::VolumetricSurfaceRate); well->setVolumetricPhaseWeights(/*oil=*/0.0, /*gas=*/1.0, /*water=*/0.0); well->setMaximumSurfaceRate(controls.gas_rate); break; - case Opm::WellProducer::WRAT: + case Opm::Well2::ProducerCMode::WRAT: well->setControlMode(Well::ControlMode::VolumetricSurfaceRate); well->setVolumetricPhaseWeights(/*oil=*/0.0, /*gas=*/0.0, /*water=*/1.0); well->setMaximumSurfaceRate(controls.water_rate); break; - case Opm::WellProducer::LRAT: + case Opm::Well2::ProducerCMode::LRAT: well->setControlMode(Well::ControlMode::VolumetricSurfaceRate); well->setVolumetricPhaseWeights(/*oil=*/1.0, /*gas=*/0.0, /*water=*/1.0); well->setMaximumSurfaceRate(controls.liquid_rate); break; - case Opm::WellProducer::CRAT: + case Opm::Well2::ProducerCMode::CRAT: throw std::runtime_error("Not implemented: Linearly combined rates"); - case Opm::WellProducer::RESV: + case Opm::Well2::ProducerCMode::RESV: well->setControlMode(Well::ControlMode::VolumetricReservoirRate); well->setVolumetricPhaseWeights(/*oil=*/1.0, /*gas=*/1.0, /*water=*/1.0); well->setMaximumSurfaceRate(controls.resv_rate); break; - case Opm::WellProducer::BHP: + case Opm::Well2::ProducerCMode::BHP: well->setControlMode(Well::ControlMode::BottomHolePressure); break; - case Opm::WellProducer::THP: + case Opm::Well2::ProducerCMode::THP: well->setControlMode(Well::ControlMode::TubingHeadPressure); break; - case Opm::WellProducer::GRUP: + case Opm::Well2::ProducerCMode::GRUP: throw std::runtime_error("Not implemented: Well groups"); - case Opm::WellProducer::NONE: + case Opm::Well2::ProducerCMode::NONE: // fall-through - case Opm::WellProducer::CMODE_UNDEFINED: + case Opm::Well2::ProducerCMode::CMODE_UNDEFINED: std::cout << "Warning: Control mode of production well " << well->name() << " is undefined. Assuming well to be shut."; well->setWellStatus(Well::WellStatus::Shut); diff --git a/opm/core/wells/WellCollection.cpp b/opm/core/wells/WellCollection.cpp index f2c16d627e5..770ca1468c9 100644 --- a/opm/core/wells/WellCollection.cpp +++ b/opm/core/wells/WellCollection.cpp @@ -69,7 +69,7 @@ namespace Opm } void WellCollection::addWell(const Well2& wellChild, const SummaryState& summaryState, const PhaseUsage& phaseUsage) { - if (wellChild.getStatus() == WellCommon::SHUT) { + if (wellChild.getStatus() == Well2::Status::SHUT) { //SHUT wells are not added to the well collection return; } diff --git a/opm/core/wells/WellsGroup.cpp b/opm/core/wells/WellsGroup.cpp index a042cee2640..92786f5a370 100644 --- a/opm/core/wells/WellsGroup.cpp +++ b/opm/core/wells/WellsGroup.cpp @@ -1603,12 +1603,12 @@ namespace Opm if (well.isInjector()) { const auto controls = well.injectionControls(summaryState); injection_specification.BHP_limit_ = controls.bhp_limit; - injection_specification.injector_type_ = toInjectorType(WellInjector::Type2String(controls.injector_type)); + injection_specification.injector_type_ = toInjectorType(Well2::InjectorType2String(controls.injector_type)); injection_specification.surface_flow_max_rate_ = controls.surface_rate; injection_specification.reservoir_flow_max_rate_ = controls.reservoir_rate; production_specification.guide_rate_ = 0.0; // We know we're not a producer - if (controls.cmode != WellInjector::CMODE_UNDEFINED) { - injection_specification.control_mode_ = toInjectionControlMode(WellInjector::ControlMode2String(controls.cmode)); + if (controls.cmode != Well2::InjectorCMode::CMODE_UNDEFINED) { + injection_specification.control_mode_ = toInjectionControlMode(Well2::InjectorCMode2String(controls.cmode)); } } else if (well.isProducer()) { @@ -1618,8 +1618,8 @@ namespace Opm production_specification.oil_max_rate_ = controls.oil_rate; production_specification.water_max_rate_ = controls.water_rate; injection_specification.guide_rate_ = 0.0; // we know we're not an injector - if (controls.cmode != WellProducer::CMODE_UNDEFINED) { - production_specification.control_mode_ = toProductionControlMode(WellProducer::ControlMode2String(controls.cmode)); + if (controls.cmode != Well2::ProducerCMode::CMODE_UNDEFINED) { + production_specification.control_mode_ = toProductionControlMode(Well2::ProducerCMode2String(controls.cmode)); } } // Efficiency factor given specified with WEFAC diff --git a/opm/core/wells/WellsManager.cpp b/opm/core/wells/WellsManager.cpp index 21e09ebe9d8..087f5994506 100644 --- a/opm/core/wells/WellsManager.cpp +++ b/opm/core/wells/WellsManager.cpp @@ -92,26 +92,26 @@ namespace WellsManagerDetail } - Mode mode(Opm::WellProducer::ControlModeEnum controlMode) + Mode mode(Opm::Well2::ProducerCMode controlMode) { switch( controlMode ) { - case Opm::WellProducer::ORAT: + case Opm::Well2::ProducerCMode::ORAT: return ORAT; - case Opm::WellProducer::WRAT: + case Opm::Well2::ProducerCMode::WRAT: return WRAT; - case Opm::WellProducer::GRAT: + case Opm::Well2::ProducerCMode::GRAT: return GRAT; - case Opm::WellProducer::LRAT: + case Opm::Well2::ProducerCMode::LRAT: return LRAT; - case Opm::WellProducer::CRAT: + case Opm::Well2::ProducerCMode::CRAT: return CRAT; - case Opm::WellProducer::RESV: + case Opm::Well2::ProducerCMode::RESV: return RESV; - case Opm::WellProducer::BHP: + case Opm::Well2::ProducerCMode::BHP: return BHP; - case Opm::WellProducer::THP: + case Opm::Well2::ProducerCMode::THP: return THP; - case Opm::WellProducer::GRUP: + case Opm::Well2::ProducerCMode::GRUP: return GRUP; default: throw std::invalid_argument("unhandled enum value"); @@ -155,18 +155,18 @@ namespace WellsManagerDetail } } - Mode mode(Opm::WellInjector::ControlModeEnum controlMode) - { + Mode mode(Opm::Well2::InjectorCMode controlMode) + { switch ( controlMode ) { - case Opm::WellInjector::GRUP: + case Opm::Well2::InjectorCMode::GRUP: return GRUP; - case Opm::WellInjector::RESV: + case Opm::Well2::InjectorCMode::RESV: return RESV; - case Opm::WellInjector::RATE: + case Opm::Well2::InjectorCMode::RATE: return RATE; - case Opm::WellInjector::THP: + case Opm::Well2::InjectorCMode::THP: return THP; - case Opm::WellInjector::BHP: + case Opm::Well2::InjectorCMode::BHP: return BHP; default: throw std::invalid_argument("unhandled enum value"); @@ -309,12 +309,12 @@ namespace Opm const auto& well = (*wellIter); - if (well.getStatus() == WellCommon::SHUT) { + if (well.getStatus() == Well2::Status::SHUT) { //SHUT wells are not added to the well list continue; } - if (well.getStatus() == WellCommon::STOP) { + if (well.getStatus() == Well2::Status::STOP) { // Stopped wells are kept in the well list but marked as stopped. well_controls_stop_well(w_->ctrls[well_index]); } @@ -326,16 +326,16 @@ namespace Opm int control_pos[5] = { -1, -1, -1, -1, -1 }; clear_well_controls(well_index, w_); - if (controls.hasControl(WellInjector::RATE)) { + if (controls.hasControl(Well2::InjectorCMode::RATE)) { control_pos[WellsManagerDetail::InjectionControl::RATE] = well_controls_get_num(w_->ctrls[well_index]); double distr[3] = { 0.0, 0.0, 0.0 }; - WellInjector::TypeEnum injectorType = controls.injector_type; + auto injectorType = controls.injector_type; - if (injectorType == WellInjector::TypeEnum::WATER) { + if (injectorType == Well2::InjectorType::WATER) { distr[phaseUsage.phase_pos[BlackoilPhases::Aqua]] = 1.0; - } else if (injectorType == WellInjector::TypeEnum::OIL) { + } else if (injectorType == Well2::InjectorType::OIL) { distr[phaseUsage.phase_pos[BlackoilPhases::Liquid]] = 1.0; - } else if (injectorType == WellInjector::TypeEnum::GAS) { + } else if (injectorType == Well2::InjectorType::GAS) { distr[phaseUsage.phase_pos[BlackoilPhases::Vapour]] = 1.0; } @@ -348,16 +348,16 @@ namespace Opm w_); } - if (ok && controls.hasControl(WellInjector::RESV)) { + if (ok && controls.hasControl(Well2::InjectorCMode::RESV)) { control_pos[WellsManagerDetail::InjectionControl::RESV] = well_controls_get_num(w_->ctrls[well_index]); double distr[3] = { 0.0, 0.0, 0.0 }; - WellInjector::TypeEnum injectorType = controls.injector_type; + auto injectorType = controls.injector_type; - if (injectorType == WellInjector::TypeEnum::WATER) { + if (injectorType == Well2::InjectorType::WATER) { distr[phaseUsage.phase_pos[BlackoilPhases::Aqua]] = 1.0; - } else if (injectorType == WellInjector::TypeEnum::OIL) { + } else if (injectorType == Well2::InjectorType::OIL) { distr[phaseUsage.phase_pos[BlackoilPhases::Liquid]] = 1.0; - } else if (injectorType == WellInjector::TypeEnum::GAS) { + } else if (injectorType == Well2::InjectorType::GAS) { distr[phaseUsage.phase_pos[BlackoilPhases::Vapour]] = 1.0; } @@ -370,7 +370,7 @@ namespace Opm w_); } - if (ok && controls.hasControl(WellInjector::BHP)) { + if (ok && controls.hasControl(Well2::InjectorCMode::BHP)) { control_pos[WellsManagerDetail::InjectionControl::BHP] = well_controls_get_num(w_->ctrls[well_index]); ok = append_well_controls(BHP, controls.bhp_limit, @@ -381,7 +381,7 @@ namespace Opm w_); } - if (ok && controls.hasControl(WellInjector::THP)) { + if (ok && controls.hasControl(Well2::InjectorCMode::THP)) { control_pos[WellsManagerDetail::InjectionControl::THP] = well_controls_get_num(w_->ctrls[well_index]); const double thp_limit = controls.thp_limit; const int vfp_number = controls.vfp_table_number; @@ -398,7 +398,7 @@ namespace Opm OPM_THROW(std::runtime_error, "Failure occured appending controls for well " << well_names[well_index]); } - if (controls.cmode != WellInjector::CMODE_UNDEFINED) { + if (controls.cmode != Well2::InjectorCMode::CMODE_UNDEFINED) { WellsManagerDetail::InjectionControl::Mode mode = WellsManagerDetail::InjectionControl::mode(controls.cmode); int cpos = control_pos[mode]; if (cpos == -1 && mode != WellsManagerDetail::InjectionControl::GRUP) { @@ -411,19 +411,19 @@ namespace Opm // Set well component fraction. double cf[3] = { 0.0, 0.0, 0.0 }; { - WellInjector::TypeEnum injectorType = controls.injector_type; + auto injectorType = controls.injector_type; - if (injectorType == WellInjector::WATER) { + if (injectorType == Well2::InjectorType::WATER) { if (!phaseUsage.phase_used[BlackoilPhases::Aqua]) { OPM_THROW(std::runtime_error, "Water phase not used, yet found water-injecting well."); } cf[phaseUsage.phase_pos[BlackoilPhases::Aqua]] = 1.0; - } else if (injectorType == WellInjector::OIL) { + } else if (injectorType == Well2::InjectorType::OIL) { if (!phaseUsage.phase_used[BlackoilPhases::Liquid]) { OPM_THROW(std::runtime_error, "Oil phase not used, yet found oil-injecting well."); } cf[phaseUsage.phase_pos[BlackoilPhases::Liquid]] = 1.0; - } else if (injectorType == WellInjector::GAS) { + } else if (injectorType == Well2::InjectorType::GAS) { if (!phaseUsage.phase_used[BlackoilPhases::Vapour]) { OPM_THROW(std::runtime_error, "Gas phase not used, yet found gas-injecting well."); } @@ -442,7 +442,7 @@ namespace Opm int ok = 1; clear_well_controls(well_index, w_); - if (ok && controls.hasControl(WellProducer::ORAT)) { + if (ok && controls.hasControl(Well2::ProducerCMode::ORAT)) { if (!phaseUsage.phase_used[BlackoilPhases::Liquid]) { OPM_THROW(std::runtime_error, "Oil phase not active and ORAT control specified."); } @@ -459,7 +459,7 @@ namespace Opm w_); } - if (ok && controls.hasControl(WellProducer::WRAT)) { + if (ok && controls.hasControl(Well2::ProducerCMode::WRAT)) { if (!phaseUsage.phase_used[BlackoilPhases::Aqua]) { OPM_THROW(std::runtime_error, "Water phase not active and WRAT control specified."); } @@ -475,7 +475,7 @@ namespace Opm w_); } - if (ok && controls.hasControl(WellProducer::GRAT)) { + if (ok && controls.hasControl(Well2::ProducerCMode::GRAT)) { if (!phaseUsage.phase_used[BlackoilPhases::Vapour]) { OPM_THROW(std::runtime_error, "Gas phase not active and GRAT control specified."); } @@ -491,7 +491,7 @@ namespace Opm w_); } - if (ok && controls.hasControl(WellProducer::LRAT)) { + if (ok && controls.hasControl(Well2::ProducerCMode::LRAT)) { if (!phaseUsage.phase_used[BlackoilPhases::Aqua]) { OPM_THROW(std::runtime_error, "Water phase not active and LRAT control specified."); } @@ -511,7 +511,7 @@ namespace Opm w_); } - if (ok && controls.hasControl(WellProducer::RESV)) { + if (ok && controls.hasControl(Well2::ProducerCMode::RESV)) { control_pos[WellsManagerDetail::ProductionControl::RESV] = well_controls_get_num(w_->ctrls[well_index]); double distr[3] = { 1.0, 1.0, 1.0 }; ok = append_well_controls(RESERVOIR_RATE, @@ -523,7 +523,7 @@ namespace Opm w_); } - if (ok && controls.hasControl(WellProducer::THP)) { + if (ok && controls.hasControl(Well2::ProducerCMode::THP)) { const double thp_limit = controls.thp_limit; const double alq_value = controls.alq_value; const int vfp_number = controls.vfp_table_number; @@ -553,7 +553,7 @@ namespace Opm OPM_THROW(std::runtime_error, "Failure occured appending controls for well " << well_names[well_index]); } - if (controls.cmode != WellProducer::CMODE_UNDEFINED) { + if (controls.cmode != Well2::ProducerCMode::CMODE_UNDEFINED) { WellsManagerDetail::ProductionControl::Mode mode = WellsManagerDetail::ProductionControl::mode(controls.cmode); int cpos = control_pos[mode]; if (cpos == -1 && mode != WellsManagerDetail::ProductionControl::GRUP) { @@ -603,7 +603,7 @@ namespace Opm for (auto wellIter = wells.begin(); wellIter != wells.end(); ++wellIter ) { const auto& well = *wellIter; - if (well.getStatus() == WellCommon::SHUT) { + if (well.getStatus() == Well2::Status::SHUT) { //SHUT wells does not need guide rates continue; } diff --git a/opm/core/wells/WellsManager_impl.hpp b/opm/core/wells/WellsManager_impl.hpp index d2749955138..d6c109739cc 100644 --- a/opm/core/wells/WellsManager_impl.hpp +++ b/opm/core/wells/WellsManager_impl.hpp @@ -34,7 +34,7 @@ namespace WellsManagerDetail Mode mode(const std::string& control); - Mode mode(Opm::WellProducer::ControlModeEnum controlMode); + Mode mode(Opm::Well2::ProducerCMode controlMode); } // namespace ProductionControl @@ -50,7 +50,7 @@ namespace WellsManagerDetail */ Mode mode(const std::string& control); - Mode mode(Opm::WellInjector::ControlModeEnum controlMode); + Mode mode(Opm::Well2::InjectorCMode controlMode); } // namespace InjectionControl @@ -136,7 +136,7 @@ void WellsManager::createWellsFromSpecs(const std::vector& wells, size_t for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) { const auto& well = (*wellIter); - if (well.getStatus() == WellCommon::SHUT) { + if (well.getStatus() == Well2::Status::SHUT) { continue; } @@ -149,7 +149,7 @@ void WellsManager::createWellsFromSpecs(const std::vector& wells, size_t // shut completions and open ones stored in this process will have 1 others 0. for(const auto& completion : well.getConnections()) { - if (completion.state() == WellCompletion::OPEN) { + if (completion.state() == Connection::State::OPEN) { const int i = completion.getI(); const int j = completion.getJ(); const int k = completion.getK(); @@ -172,8 +172,8 @@ void WellsManager::createWellsFromSpecs(const std::vector& wells, size_t wellperf_data[active_well_index].push_back(pd); } } else { - if (completion.state() != WellCompletion::SHUT) { - OPM_THROW(std::runtime_error, "Completion state: " << WellCompletion::StateEnum2String( completion.state() ) << " not handled"); + if (completion.state() != Connection::State::SHUT) { + OPM_THROW(std::runtime_error, "Completion state: " << Connection::State2String( completion.state() ) << " not handled"); } } } diff --git a/opm/simulators/wells/MultisegmentWell_impl.hpp b/opm/simulators/wells/MultisegmentWell_impl.hpp index 02197b4b9b9..097611e2bc1 100644 --- a/opm/simulators/wells/MultisegmentWell_impl.hpp +++ b/opm/simulators/wells/MultisegmentWell_impl.hpp @@ -72,7 +72,7 @@ namespace Opm perf_depth_.resize(number_of_perforations_, 0.); for (size_t perf = 0; perf < completion_set.size(); ++perf) { const Connection& connection = completion_set.get(perf); - if (connection.state() == WellCompletion::OPEN) { + if (connection.state() == Connection::State::OPEN) { const int segment_index = segmentNumberToIndex(connection.segment()); segment_perforations_[segment_index].push_back(i_perf_wells); perf_depth_[i_perf_wells] = connection.depth(); diff --git a/opm/simulators/wells/SimFIBODetails.hpp b/opm/simulators/wells/SimFIBODetails.hpp index 22df8d66ebc..a3105a543d9 100644 --- a/opm/simulators/wells/SimFIBODetails.hpp +++ b/opm/simulators/wells/SimFIBODetails.hpp @@ -85,7 +85,7 @@ namespace Opm inline void historyRates(const PhaseUsage& pu, - const ProductionControls& p, + const Well2::ProductionControls& p, std::vector& rates) { assert (! p.prediction_mode); diff --git a/opm/simulators/wells/StandardWell_impl.hpp b/opm/simulators/wells/StandardWell_impl.hpp index 9aaab7b222b..19312f05041 100644 --- a/opm/simulators/wells/StandardWell_impl.hpp +++ b/opm/simulators/wells/StandardWell_impl.hpp @@ -2534,7 +2534,7 @@ namespace Opm auto phase = well_ecl_.getInjectionProperties().injectorType; // only single phase injection handled if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) { - if (phase == WellInjector::TypeEnum::WATER) { + if (phase == Well2::InjectorType::WATER) { primary_variables_[WFrac] = 1.0; } else { primary_variables_[WFrac] = 0.0; @@ -2542,7 +2542,7 @@ namespace Opm } if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) { - if (phase == WellInjector::TypeEnum::GAS) { + if (phase == Well2::InjectorType::GAS) { primary_variables_[GFrac] = 1.0 - wsolvent(); if (has_solvent) { primary_variables_[SFrac] = wsolvent(); diff --git a/opm/simulators/wells/WellInterface_impl.hpp b/opm/simulators/wells/WellInterface_impl.hpp index 2fd362a9670..570a38ec7a9 100644 --- a/opm/simulators/wells/WellInterface_impl.hpp +++ b/opm/simulators/wells/WellInterface_impl.hpp @@ -152,7 +152,7 @@ namespace Opm int num_active_connections = 0; for (int c = 0; c < num_conns; ++c) { - if (connections[c].state() == WellCompletion::OPEN) { + if (connections[c].state() == Connection::State::OPEN) { completions_[connections[c].complnum()].push_back(num_active_connections++); } } @@ -312,7 +312,7 @@ namespace Opm } auto injectorType = well_ecl_.injectorType(); - if (injectorType == WellInjector::GAS) { + if (injectorType == Well2::InjectorType::GAS) { double solvent_fraction = well_ecl_.getSolventFraction(); return solvent_fraction; } else { @@ -336,7 +336,7 @@ namespace Opm auto injectorType = well_ecl_.injectorType(); - if (injectorType == WellInjector::WATER) { + if (injectorType == Well2::InjectorType::WATER) { WellPolymerProperties polymer = well_ecl_.getPolymerProperties(); const double polymer_injection_concentration = polymer.m_polymerConcentration; return polymer_injection_concentration; @@ -361,7 +361,7 @@ namespace Opm auto injectorType = well_ecl_.injectorType(); - if (injectorType == WellInjector::GAS) { + if (injectorType == Well2::InjectorType::GAS) { WellFoamProperties fprop = well_ecl_.getFoamProperties(); return fprop.m_foamConcentration; } else { @@ -1152,7 +1152,7 @@ namespace Opm const auto& connectionSet = well_ecl_.getConnections(); for (size_t c=0; c> segment_perforations(well_nseg); for (size_t perf = 0; perf < completion_set.size(); ++perf) { const Connection& connection = completion_set.get(perf); - if (connection.state() == WellCompletion::OPEN) { + if (connection.state() == Connection::State::OPEN) { const int segment_index = segment_set.segmentNumberToIndex(connection.segment()); segment_perforations[segment_index].push_back(n_activeperf); n_activeperf++;