mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
function for accumulative efficiency factor for WellNode
This is the final efficiency factor that goes to the source/sink terms in the material balance equations.
This commit is contained in:
parent
194d9b161d
commit
f922ed6ad9
@ -1295,7 +1295,9 @@ namespace Opm
|
||||
production_specification.reservoir_flow_max_rate_ = group.getReservoirVolumeTargetRate(timeStep);
|
||||
}
|
||||
|
||||
std::shared_ptr<WellsGroupInterface> wells_group(new WellsGroup(group.name(), production_specification, injection_specification, phase_usage));
|
||||
const double efficiency_factor = group.getGroupEfficiencyFactor(timeStep);
|
||||
|
||||
std::shared_ptr<WellsGroupInterface> wells_group(new WellsGroup(group.name(), efficiency_factor, production_specification, injection_specification, phase_usage));
|
||||
return wells_group;
|
||||
}
|
||||
|
||||
@ -1339,4 +1341,21 @@ namespace Opm
|
||||
std::shared_ptr<WellsGroupInterface> wells_group(new WellNode(well->name(), efficiency_factor, production_specification, injection_specification, phase_usage));
|
||||
return wells_group;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
double WellNode::getAccumulativeEfficiencyFactor() const {
|
||||
// TODO: not sure whether a well can be exempted from repsponding to the efficiency factor
|
||||
// for the parent group.
|
||||
double efficicency_factor = efficicencyFactor();
|
||||
const WellsGroupInterface* parent_node = getParent();
|
||||
while (parent_node != nullptr) {
|
||||
efficicency_factor *= parent_node->efficicencyFactor();
|
||||
parent_node = parent_node->getParent();
|
||||
}
|
||||
|
||||
return efficicency_factor;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -233,6 +233,9 @@ namespace Opm
|
||||
|
||||
virtual void updateWellInjectionTargets(const std::vector<double>& well_rates) = 0;
|
||||
|
||||
double efficicencyFactor() const;
|
||||
|
||||
void setEfficiencyFactor(const double efficicency_factor);
|
||||
|
||||
protected:
|
||||
/// Calculates the correct rate for the given ProductionSpecification::ControlMode
|
||||
@ -245,9 +248,6 @@ namespace Opm
|
||||
const double* surf_rates,
|
||||
const InjectionSpecification::ControlMode mode);
|
||||
|
||||
double efficicencyFactor() const;
|
||||
void setEfficiencyFactor(const double efficicency_factor);
|
||||
|
||||
WellsGroupInterface* parent_;
|
||||
|
||||
// when some well (mabye group also later), change status from group control
|
||||
@ -469,6 +469,9 @@ namespace Opm
|
||||
|
||||
virtual void updateWellInjectionTargets(const std::vector<double>& well_rates);
|
||||
|
||||
/// the efficiency factor for groups are muliplitive, this function return the resulted final efficiency factor
|
||||
/// to the well in a multi-layer group structure.
|
||||
double getAccumulativeEfficiencyFactor() const;
|
||||
|
||||
private:
|
||||
Wells* wells_;
|
||||
|
Loading…
Reference in New Issue
Block a user