BlackoilWellModel: move calculateEfficiencyFactors to generic class

This commit is contained in:
Arne Morten Kvarving 2021-06-07 12:20:49 +02:00
parent 811afb854b
commit 60e7c90b1e
4 changed files with 18 additions and 21 deletions

View File

@ -362,8 +362,6 @@ namespace Opm {
const std::vector<double>& wellPerfEfficiencyFactors() const;
void calculateEfficiencyFactors(const int reportStepIdx);
void calculateProductivityIndexValuesShutWells(const int reportStepIdx, DeferredLogger& deferred_logger);
void calculateProductivityIndexValues(DeferredLogger& deferred_logger);
void calculateProductivityIndexValues(const WellInterface<TypeTag>* wellPtr,

View File

@ -1605,4 +1605,20 @@ updateNetworkPressures(const int reportStepIdx)
}
}
void
BlackoilWellModelGeneric::
calculateEfficiencyFactors(const int reportStepIdx)
{
if ( !localWellsActive() ) {
return;
}
for (auto& well : well_container_generic_) {
const Well& wellEcl = well->wellEcl();
double well_efficiency_factor = wellEcl.getEfficiencyFactor();
WellGroupHelpers::accumulateGroupEfficiencyFactor(schedule().getGroup(wellEcl.groupName(), reportStepIdx), schedule(), reportStepIdx, well_efficiency_factor);
well->setWellEfficiencyFactor(well_efficiency_factor);
}
}
}

View File

@ -271,6 +271,8 @@ protected:
std::unordered_map<std::string, data::GroupGuideRates>
calculateAllGroupGuiderates(const int reportStepIdx) const;
void calculateEfficiencyFactors(const int reportStepIdx);
bool checkGroupConstraints(const Group& group,
const int reportStepIdx,
DeferredLogger& deferred_logger) const;

View File

@ -1388,25 +1388,6 @@ namespace Opm {
template<typename TypeTag>
void
BlackoilWellModel<TypeTag>::
calculateEfficiencyFactors(const int reportStepIdx)
{
if ( !localWellsActive() ) {
return;
}
for (auto& well : well_container_) {
const Well& wellEcl = well->wellEcl();
double well_efficiency_factor = wellEcl.getEfficiencyFactor();
WellGroupHelpers::accumulateGroupEfficiencyFactor(schedule().getGroup(wellEcl.groupName(), reportStepIdx), schedule(), reportStepIdx, well_efficiency_factor);
well->setWellEfficiencyFactor(well_efficiency_factor);
}
}
template<typename TypeTag>
void
BlackoilWellModel<TypeTag>::