mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding addWellContributionToMassBalanceEq to BlackoilMultiSegmentModel
This commit is contained in:
parent
f087ac14e8
commit
747a295122
@ -231,10 +231,10 @@ namespace Opm {
|
|||||||
addWellFluxEq(const std::vector<ADB>& cq_s,
|
addWellFluxEq(const std::vector<ADB>& cq_s,
|
||||||
const SolutionState& state);
|
const SolutionState& state);
|
||||||
|
|
||||||
/* void
|
void
|
||||||
addWellContributionToMassBalanceEq(const std::vector<ADB>& cq_s,
|
addWellContributionToMassBalanceEq(const std::vector<ADB>& cq_s,
|
||||||
const SolutionState& state,
|
const SolutionState& state,
|
||||||
const WellState& xw) {}; */
|
const WellState& xw);
|
||||||
|
|
||||||
/* void
|
/* void
|
||||||
addWellControlEq(const SolutionState& state,
|
addWellControlEq(const SolutionState& state,
|
||||||
|
@ -482,20 +482,41 @@ namespace Opm {
|
|||||||
computeWellFlux(state, mob_perfcells, b_perfcells, aliveWells, cq_s);
|
computeWellFlux(state, mob_perfcells, b_perfcells, aliveWells, cq_s);
|
||||||
updatePerfPhaseRatesAndPressures(cq_s, state, well_state);
|
updatePerfPhaseRatesAndPressures(cq_s, state, well_state);
|
||||||
addWellFluxEq(cq_s, state);
|
addWellFluxEq(cq_s, state);
|
||||||
// asImpl().addWellContributionToMassBalanceEq(cq_s, state, well_state);
|
addWellContributionToMassBalanceEq(cq_s, state, well_state);
|
||||||
// addWellControlEq(state, well_state, aliveWells);
|
// addWellControlEq(state, well_state, aliveWells);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
template <class Grid, class Implementation>
|
|
||||||
|
template <class Grid>
|
||||||
void
|
void
|
||||||
BlackoilModelBase<Grid, Implementation>::addWellContributionToMassBalanceEq(const std::vector<ADB>& cq_s,
|
BlackoilMultiSegmentModel<Grid>::addWellContributionToMassBalanceEq(const std::vector<ADB>& cq_s,
|
||||||
const SolutionState&,
|
const SolutionState&,
|
||||||
const WellState&)
|
const WellState& xw)
|
||||||
{
|
{
|
||||||
|
// For the version at the moment, it has to be done one well by one well
|
||||||
|
// later, we may need to develop a new wells class for optimization.
|
||||||
|
const int nw = wellsMultiSegment().size();
|
||||||
|
const int nc = Opm::AutoDiffGrid::numCells(grid_);
|
||||||
|
const int np = numPhases();
|
||||||
|
const int nperf = xw.numberOfPerforations();
|
||||||
|
|
||||||
|
std::vector<int> well_cells;
|
||||||
|
|
||||||
|
for (int w = 0; w < nw; ++w) {
|
||||||
|
WellMultiSegmentConstPtr well = wellsMultiSegment()[w];
|
||||||
|
well_cells.insert(well_cells.end(), well->wellCells().begin(), well->wellCells().end());
|
||||||
|
}
|
||||||
|
|
||||||
|
assert(well_cells.size() == nperf);
|
||||||
|
|
||||||
|
for (int phase = 0; phase < np; ++phase) {
|
||||||
|
residual_.material_balance_eq[phase] -= superset(cq_s[phase], well_cells, nc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: it must be done one by one?
|
// TODO: it must be done one by one?
|
||||||
// or we develop a new Wells class?
|
// or we develop a new Wells class?
|
||||||
// Add well contributions to mass balance equations
|
// Add well contributions to mass balance equations
|
||||||
@ -509,7 +530,7 @@ namespace Opm {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user