mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
756c7ca92b
@ -170,6 +170,7 @@ namespace Opm {
|
|||||||
|
|
||||||
void
|
void
|
||||||
addWellEq(const SolutionState& state,
|
addWellEq(const SolutionState& state,
|
||||||
|
WellStateFullyImplicitBlackoil& xw,
|
||||||
V& aliveWells);
|
V& aliveWells);
|
||||||
|
|
||||||
void updateWellControls(ADB& bhp,
|
void updateWellControls(ADB& bhp,
|
||||||
|
@ -712,7 +712,7 @@ namespace {
|
|||||||
// a well control is switched.
|
// a well control is switched.
|
||||||
updateWellControls(state.bhp, state.qs, xw);
|
updateWellControls(state.bhp, state.qs, xw);
|
||||||
V aliveWells;
|
V aliveWells;
|
||||||
addWellEq(state, aliveWells);
|
addWellEq(state, xw, aliveWells);
|
||||||
addWellControlEq(state, xw, aliveWells);
|
addWellControlEq(state, xw, aliveWells);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -722,6 +722,7 @@ namespace {
|
|||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void FullyImplicitBlackoilSolver<T>::addWellEq(const SolutionState& state,
|
void FullyImplicitBlackoilSolver<T>::addWellEq(const SolutionState& state,
|
||||||
|
WellStateFullyImplicitBlackoil& xw,
|
||||||
V& aliveWells)
|
V& aliveWells)
|
||||||
{
|
{
|
||||||
const int nc = Opm::AutoDiffGrid::numCells(grid_);
|
const int nc = Opm::AutoDiffGrid::numCells(grid_);
|
||||||
@ -904,6 +905,7 @@ namespace {
|
|||||||
residual_.material_balance_eq[phase] -= superset(cq_s[phase],well_cells,nc);
|
residual_.material_balance_eq[phase] -= superset(cq_s[phase],well_cells,nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add WELL EQUATIONS
|
// Add WELL EQUATIONS
|
||||||
ADB qs = state.qs;
|
ADB qs = state.qs;
|
||||||
for (int phase = 0; phase < np; ++phase) {
|
for (int phase = 0; phase < np; ++phase) {
|
||||||
@ -911,6 +913,15 @@ namespace {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
V cq = superset(cq_s[0].value(), Span(nperf, np, 0), nperf*np);
|
||||||
|
for (int phase = 1; phase < np; ++phase) {
|
||||||
|
cq += superset(cq_s[phase].value(), Span(nperf, np, phase), nperf*np);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<double> cq_d(cq.data(), cq.data() + nperf*np);
|
||||||
|
xw.perfPhaseRates() = cq_d;
|
||||||
|
|
||||||
residual_.well_flux_eq = qs;
|
residual_.well_flux_eq = qs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user