fixing the comments.
No change in the functions and results.
This commit is contained in:
parent
708bfd169b
commit
c3b00dc7fd
@ -275,19 +275,6 @@ namespace Opm
|
||||
}
|
||||
|
||||
|
||||
|
||||
size_t WellCollection::numNode() const
|
||||
{
|
||||
return leaf_nodes_.size();
|
||||
}
|
||||
|
||||
|
||||
WellNode* WellCollection::getNode(size_t i) const
|
||||
{
|
||||
assert( i< numNode());
|
||||
return leaf_nodes_[i];
|
||||
}
|
||||
|
||||
void WellCollection::updateWellTargets(const std::vector<double>& well_rates)
|
||||
{
|
||||
if ( !needUpdateWellTargets() ) {
|
||||
@ -319,6 +306,7 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool WellCollection::havingVREPGroups() const {
|
||||
return having_vrep_groups_;
|
||||
}
|
||||
|
@ -130,12 +130,6 @@ namespace Opm
|
||||
/// Checking whehter need to update the targets for the production wells.
|
||||
bool needUpdateProductionTargets() const;
|
||||
|
||||
/// Number of the well nodes.
|
||||
size_t numNode() const;
|
||||
|
||||
/// Getting the ith well node.
|
||||
WellNode* getNode(size_t i) const;
|
||||
|
||||
/// Updating the well targets based on the well rates.
|
||||
void updateWellTargets(const std::vector<double>& well_rates);
|
||||
|
||||
|
@ -778,7 +778,7 @@ namespace Opm
|
||||
double rate_individual_control = 0.;
|
||||
|
||||
for (size_t i = 0; i < children_.size(); ++i) {
|
||||
if (children_[i]->individualControl() && children_[i]->isProducer()) {
|
||||
if (children_[i]->individualControl()) {
|
||||
rate_individual_control += std::abs(children_[i]->getProductionRate(well_rates, prod_mode) * children_[i]->efficiencyFactor());
|
||||
}
|
||||
}
|
||||
@ -789,7 +789,7 @@ namespace Opm
|
||||
const double my_guide_rate = productionGuideRate(true);
|
||||
|
||||
for (size_t i = 0; i < children_.size(); ++i) {
|
||||
if (!children_[i]->individualControl() && children_[i]->isProducer()) {
|
||||
if (!children_[i]->individualControl()) {
|
||||
const double children_guide_rate = children_[i]->productionGuideRate(true);
|
||||
children_[i]->applyProdGroupControl(prod_mode, (children_guide_rate / my_guide_rate) * rate_for_group_control, true);
|
||||
children_[i]->setTargetUpdated(true);
|
||||
@ -808,22 +808,14 @@ namespace Opm
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
bool WellsGroup::isProducer() const
|
||||
double WellsGroup::getProductionRate(const std::vector<double>& well_rates,
|
||||
const ProductionSpecification::ControlMode prod_mode) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool WellsGroup::isInjector() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
double WellsGroup::getProductionRate(const std::vector<double>& /* well_rates */,
|
||||
const ProductionSpecification::ControlMode /* prod_mode */) const
|
||||
{
|
||||
// TODO: to be implemented
|
||||
return -1.e98;
|
||||
double total_production_rate = 0.0;
|
||||
for (const std::shared_ptr<const WellsGroupInterface>& child_node : children_) {
|
||||
total_production_rate += child_node->getProductionRate(well_rates, prod_mode);
|
||||
}
|
||||
return total_production_rate;
|
||||
}
|
||||
|
||||
// ============== WellNode members ============
|
||||
@ -1268,7 +1260,7 @@ namespace Opm
|
||||
// Current understanding. Two ways might prevent to return the guide_rate here
|
||||
// 1. preventing the well from group control with keyword WGRUPCON
|
||||
// 2. the well violating some limits and working under limits.
|
||||
if (!only_group || !individualControl()) {
|
||||
if ( (!only_group || !individualControl()) && isProducer() ) {
|
||||
return prodSpec().guide_rate_;
|
||||
} else {
|
||||
return 0.0;
|
||||
@ -1280,7 +1272,7 @@ namespace Opm
|
||||
/// wells under group control
|
||||
double WellNode::injectionGuideRate(bool only_group)
|
||||
{
|
||||
if (!only_group || !individualControl()) {
|
||||
if ( (!only_group || !individualControl()) && isInjector() ) {
|
||||
return injSpec().guide_rate_;
|
||||
} else {
|
||||
return 0.0;
|
||||
|
@ -226,14 +226,6 @@ namespace Opm
|
||||
/// Update the status for individual contrl
|
||||
void setIndividualControl(const bool);
|
||||
|
||||
/// Whether it is a production well
|
||||
/// Should only appy for WellNode
|
||||
virtual bool isProducer() const = 0;
|
||||
|
||||
/// Whether it is an injection well
|
||||
/// Should only appy for WellNode
|
||||
virtual bool isInjector() const = 0;
|
||||
|
||||
virtual double getProductionRate(const std::vector<double>& well_rates,
|
||||
const ProductionSpecification::ControlMode prod_mode) const = 0;
|
||||
|
||||
@ -374,14 +366,6 @@ namespace Opm
|
||||
|
||||
virtual void setTargetUpdated(const bool flag);
|
||||
|
||||
/// Whether it is a production well
|
||||
/// Should only appy for WellNode
|
||||
virtual bool isProducer() const;
|
||||
|
||||
/// Whether it is an injection well
|
||||
/// Should only appy for WellNode
|
||||
virtual bool isInjector() const;
|
||||
|
||||
virtual double getProductionRate(const std::vector<double>& well_rates,
|
||||
const ProductionSpecification::ControlMode prod_mode) const;
|
||||
|
||||
@ -492,10 +476,6 @@ namespace Opm
|
||||
|
||||
int groupControlIndex() const;
|
||||
|
||||
virtual bool isProducer() const;
|
||||
|
||||
virtual bool isInjector() const;
|
||||
|
||||
virtual double getProductionRate(const std::vector<double>& well_rates,
|
||||
const ProductionSpecification::ControlMode prod_mode) const;
|
||||
|
||||
@ -507,6 +487,10 @@ namespace Opm
|
||||
/// to the well in a multi-layer group structure.
|
||||
double getAccumulativeEfficiencyFactor() const;
|
||||
|
||||
bool isProducer() const;
|
||||
|
||||
bool isInjector() const;
|
||||
|
||||
int selfIndex() const;
|
||||
|
||||
bool targetUpdated() const;
|
||||
|
Loading…
Reference in New Issue
Block a user