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:
@@ -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_;
|
||||
|
@@ -265,6 +265,7 @@ try
|
||||
well_group_prod_spec.control_mode_ = ProductionSpecification::RESV;
|
||||
/// \internal[production specification]
|
||||
/// \endinternal
|
||||
const double group_efficiency_factor = 0.9;
|
||||
|
||||
/// \page tutorial4
|
||||
/// \details Create our well group. We hand it an empty injection specification,
|
||||
@@ -272,8 +273,8 @@ try
|
||||
/// what the interface expects. The first argument is the (unique) name of the group.
|
||||
/// \snippet tutorial4.cpp injection specification
|
||||
/// \internal[injection specification]
|
||||
std::shared_ptr<WellsGroupInterface> well_group(new WellsGroup("group", well_group_prod_spec, InjectionSpecification(),
|
||||
phase_usage));
|
||||
std::shared_ptr<WellsGroupInterface> well_group(new WellsGroup("group", group_efficiency_factor, well_group_prod_spec,
|
||||
InjectionSpecification(), phase_usage));
|
||||
/// \internal[injection specification]
|
||||
/// \endinternal
|
||||
|
||||
@@ -297,8 +298,9 @@ try
|
||||
well_name << "well" << i;
|
||||
ProductionSpecification production_specification;
|
||||
production_specification.control_mode_ = ProductionSpecification::GRUP;
|
||||
std::shared_ptr<WellsGroupInterface> well_leaf_node(new WellNode(well_name.str(), production_specification, InjectionSpecification(),
|
||||
phase_usage));
|
||||
const double efficiency_factor = 0.8;
|
||||
std::shared_ptr<WellsGroupInterface> well_leaf_node(new WellNode(well_name.str(), efficiency_factor, production_specification,
|
||||
InjectionSpecification(), phase_usage));
|
||||
well_collection.addChild(well_leaf_node, "group");
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user