mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Move computation of well potentials from simulator class ot model class
- the computation of well potentials in the model class calculates the well potentials using computeWellFlux() - in this way the well potential calculations also handle well where some perforations are closed by the simulator due to cross-flow. - the well potentials pr perforation and phase is stored in the well state.
This commit is contained in:
@@ -102,6 +102,9 @@ namespace Opm
|
||||
current_controls_[w] = well_controls_get_current(wells->ctrls[w]);
|
||||
}
|
||||
|
||||
well_potentials_.clear();
|
||||
well_potentials_.resize(nperf * np, 0.0);
|
||||
|
||||
// intialize wells that have been there before
|
||||
// order may change so the mapping is based on the well name
|
||||
if( ! prevState.wellMap().empty() )
|
||||
@@ -184,9 +187,14 @@ namespace Opm
|
||||
std::vector<int>& currentControls() { return current_controls_; }
|
||||
const std::vector<int>& currentControls() const { return current_controls_; }
|
||||
|
||||
/// One rate per phase and well connection.
|
||||
std::vector<double>& wellPotentials() { return well_potentials_; }
|
||||
const std::vector<double>& wellPotentials() const { return well_potentials_; }
|
||||
|
||||
private:
|
||||
std::vector<double> perfphaserates_;
|
||||
std::vector<int> current_controls_;
|
||||
std::vector<double> well_potentials_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
Reference in New Issue
Block a user