mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixing the comments.
No change in the functions and results.
This commit is contained in:
@@ -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)
|
void WellCollection::updateWellTargets(const std::vector<double>& well_rates)
|
||||||
{
|
{
|
||||||
if ( !needUpdateWellTargets() ) {
|
if ( !needUpdateWellTargets() ) {
|
||||||
@@ -319,6 +306,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool WellCollection::havingVREPGroups() const {
|
bool WellCollection::havingVREPGroups() const {
|
||||||
return having_vrep_groups_;
|
return having_vrep_groups_;
|
||||||
}
|
}
|
||||||
|
@@ -130,12 +130,6 @@ namespace Opm
|
|||||||
/// Checking whehter need to update the targets for the production wells.
|
/// Checking whehter need to update the targets for the production wells.
|
||||||
bool needUpdateProductionTargets() const;
|
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.
|
/// Updating the well targets based on the well rates.
|
||||||
void updateWellTargets(const std::vector<double>& well_rates);
|
void updateWellTargets(const std::vector<double>& well_rates);
|
||||||
|
|
||||||
|
@@ -778,7 +778,7 @@ namespace Opm
|
|||||||
double rate_individual_control = 0.;
|
double rate_individual_control = 0.;
|
||||||
|
|
||||||
for (size_t i = 0; i < children_.size(); ++i) {
|
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());
|
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);
|
const double my_guide_rate = productionGuideRate(true);
|
||||||
|
|
||||||
for (size_t i = 0; i < children_.size(); ++i) {
|
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);
|
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]->applyProdGroupControl(prod_mode, (children_guide_rate / my_guide_rate) * rate_for_group_control, true);
|
||||||
children_[i]->setTargetUpdated(true);
|
children_[i]->setTargetUpdated(true);
|
||||||
@@ -808,22 +808,14 @@ namespace Opm
|
|||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double WellsGroup::getProductionRate(const std::vector<double>& well_rates,
|
||||||
bool WellsGroup::isProducer() const
|
const ProductionSpecification::ControlMode prod_mode) const
|
||||||
{
|
{
|
||||||
return false;
|
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);
|
||||||
bool WellsGroup::isInjector() const
|
}
|
||||||
{
|
return total_production_rate;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
double WellsGroup::getProductionRate(const std::vector<double>& /* well_rates */,
|
|
||||||
const ProductionSpecification::ControlMode /* prod_mode */) const
|
|
||||||
{
|
|
||||||
// TODO: to be implemented
|
|
||||||
return -1.e98;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============== WellNode members ============
|
// ============== WellNode members ============
|
||||||
@@ -1268,7 +1260,7 @@ namespace Opm
|
|||||||
// Current understanding. Two ways might prevent to return the guide_rate here
|
// Current understanding. Two ways might prevent to return the guide_rate here
|
||||||
// 1. preventing the well from group control with keyword WGRUPCON
|
// 1. preventing the well from group control with keyword WGRUPCON
|
||||||
// 2. the well violating some limits and working under limits.
|
// 2. the well violating some limits and working under limits.
|
||||||
if (!only_group || !individualControl()) {
|
if ( (!only_group || !individualControl()) && isProducer() ) {
|
||||||
return prodSpec().guide_rate_;
|
return prodSpec().guide_rate_;
|
||||||
} else {
|
} else {
|
||||||
return 0.0;
|
return 0.0;
|
||||||
@@ -1280,7 +1272,7 @@ namespace Opm
|
|||||||
/// wells under group control
|
/// wells under group control
|
||||||
double WellNode::injectionGuideRate(bool only_group)
|
double WellNode::injectionGuideRate(bool only_group)
|
||||||
{
|
{
|
||||||
if (!only_group || !individualControl()) {
|
if ( (!only_group || !individualControl()) && isInjector() ) {
|
||||||
return injSpec().guide_rate_;
|
return injSpec().guide_rate_;
|
||||||
} else {
|
} else {
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
@@ -226,14 +226,6 @@ namespace Opm
|
|||||||
/// Update the status for individual contrl
|
/// Update the status for individual contrl
|
||||||
void setIndividualControl(const bool);
|
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,
|
virtual double getProductionRate(const std::vector<double>& well_rates,
|
||||||
const ProductionSpecification::ControlMode prod_mode) const = 0;
|
const ProductionSpecification::ControlMode prod_mode) const = 0;
|
||||||
|
|
||||||
@@ -374,14 +366,6 @@ namespace Opm
|
|||||||
|
|
||||||
virtual void setTargetUpdated(const bool flag);
|
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,
|
virtual double getProductionRate(const std::vector<double>& well_rates,
|
||||||
const ProductionSpecification::ControlMode prod_mode) const;
|
const ProductionSpecification::ControlMode prod_mode) const;
|
||||||
|
|
||||||
@@ -492,10 +476,6 @@ namespace Opm
|
|||||||
|
|
||||||
int groupControlIndex() const;
|
int groupControlIndex() const;
|
||||||
|
|
||||||
virtual bool isProducer() const;
|
|
||||||
|
|
||||||
virtual bool isInjector() const;
|
|
||||||
|
|
||||||
virtual double getProductionRate(const std::vector<double>& well_rates,
|
virtual double getProductionRate(const std::vector<double>& well_rates,
|
||||||
const ProductionSpecification::ControlMode prod_mode) const;
|
const ProductionSpecification::ControlMode prod_mode) const;
|
||||||
|
|
||||||
@@ -507,6 +487,10 @@ namespace Opm
|
|||||||
/// to the well in a multi-layer group structure.
|
/// to the well in a multi-layer group structure.
|
||||||
double getAccumulativeEfficiencyFactor() const;
|
double getAccumulativeEfficiencyFactor() const;
|
||||||
|
|
||||||
|
bool isProducer() const;
|
||||||
|
|
||||||
|
bool isInjector() const;
|
||||||
|
|
||||||
int selfIndex() const;
|
int selfIndex() const;
|
||||||
|
|
||||||
bool targetUpdated() const;
|
bool targetUpdated() const;
|
||||||
|
Reference in New Issue
Block a user