mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding extractWellPerfProperties to StandardWells
It causes problem for the flow_multisegment. So the version in BlackoilModelBase is kept for now. On the other hand, it is few of functions that will be both required by the standard wells and multisegment wells. Some decision will be made later on how to put this function.
This commit is contained in:
parent
c8b66821d5
commit
e9e1b9fda8
@ -851,7 +851,7 @@ namespace detail {
|
||||
|
||||
std::vector<ADB> mob_perfcells;
|
||||
std::vector<ADB> b_perfcells;
|
||||
asImpl().extractWellPerfProperties(state, mob_perfcells, b_perfcells);
|
||||
asImpl().stdWells().extractWellPerfProperties(rq_, fluid_.numPhases(), mob_perfcells, b_perfcells);
|
||||
if (param_.solve_welleq_initially_ && initial_assembly) {
|
||||
// solve the well equations as a pre-processing step
|
||||
asImpl().solveWellEq(mob_perfcells, b_perfcells, state, well_state);
|
||||
|
@ -101,6 +101,12 @@ namespace Opm {
|
||||
const std::vector<double>& depth_perf,
|
||||
const double grav);
|
||||
|
||||
template <class ReservoirResidualQuant>
|
||||
void extractWellPerfProperties(const std::vector<ReservoirResidualQuant>& rq,
|
||||
const int np,
|
||||
std::vector<ADB>& mob_perfcells,
|
||||
std::vector<ADB>& b_perfcells) const;
|
||||
|
||||
|
||||
protected:
|
||||
bool wells_active_;
|
||||
|
@ -247,6 +247,10 @@ namespace Opm
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <class WellState>
|
||||
void
|
||||
StandardWells::
|
||||
@ -277,4 +281,33 @@ namespace Opm
|
||||
well_perforation_pressure_diffs_ = Eigen::Map<const Vector>(cdp.data(), nperf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <class ReservoirResidualQuant>
|
||||
void
|
||||
StandardWells::
|
||||
extractWellPerfProperties(const std::vector<ReservoirResidualQuant>& rq,
|
||||
const int np,
|
||||
std::vector<ADB>& mob_perfcells,
|
||||
std::vector<ADB>& b_perfcells) const
|
||||
{
|
||||
// If we have wells, extract the mobilities and b-factors for
|
||||
// the well-perforated cells.
|
||||
if ( !localWellsActive() ) {
|
||||
mob_perfcells.clear();
|
||||
b_perfcells.clear();
|
||||
return;
|
||||
} else {
|
||||
const std::vector<int>& well_cells = wellOps().well_cells;
|
||||
mob_perfcells.resize(np, ADB::null());
|
||||
b_perfcells.resize(np, ADB::null());
|
||||
for (int phase = 0; phase < np; ++phase) {
|
||||
mob_perfcells[phase] = subset(rq[phase].mob, well_cells);
|
||||
b_perfcells[phase] = subset(rq[phase].b, well_cells);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user