applying the efficiency factors to the multi-segment wells.

This commit is contained in:
Kai Bao 2016-10-19 10:51:43 +02:00
parent 623ef3850e
commit e13cf827b5
3 changed files with 54 additions and 0 deletions

View File

@ -272,6 +272,8 @@ namespace Opm {
}
assert(start_perforation == nperf_total_);
calculateEfficiencyFactors();
}
@ -393,6 +395,45 @@ namespace Opm {
return well_collection_;
}
void
MultisegmentWells::
calculateEfficiencyFactors()
{
if ( !localWellsActive() ) {
return;
}
// get efficiency factor for each well first
const int nw = wells_->number_of_wells;
Vector well_efficiency_factors = Vector::Ones(nw);
for (int w = 0; w < nw; ++w) {
const std::string well_name = wells_->name[w];
const WellNode* well_node = dynamic_cast<const WellNode *>(well_collection_->findNode(well_name));
well_efficiency_factors(w) = well_node->getAccumulativeEfficiencyFactor();
}
// map them to the perforation.
well_perforation_efficiency_factors_ = wellOps().w2p * well_efficiency_factors.matrix();
}
const
MultisegmentWells::Vector&
MultisegmentWells::
wellPerfEfficiencyFactors() const
{
return well_perforation_efficiency_factors_;
}
} // end of namespace Opm

View File

@ -233,6 +233,11 @@ namespace Opm {
WellCollection* wellCollection() const;
void calculateEfficiencyFactors();
const Vector& wellPerfEfficiencyFactors() const;
protected:
// TODO: probably a wells_active_ will be required here.
bool wells_active_;
@ -241,6 +246,11 @@ namespace Opm {
// It will probably need to be updated during running time.
WellCollection* well_collection_;
// The efficiency factor for each connection
// It is specified based on wells and groups
// By default, they should all be one.
Vector well_perforation_efficiency_factors_;
const int num_phases_;
int nseg_total_;
int nperf_total_;

View File

@ -1639,6 +1639,9 @@ namespace Opm
}
const StandardWells::Vector&
StandardWells::wellPerfEfficiencyFactors() const
{