mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-26 17:20:59 -06:00
[bugfix] Fix well transmissibility weights for distributed wells.
If we compute a sum over all perforations than we need to cater for the case of distributed wells. That is we need to also sum up over all processes involved after performing the local sum. One of these global sums was missing in computeWellConnectionDensitesPressures for producers when we compute the weights based on well transmissibilities.
This commit is contained in:
parent
0203939bc6
commit
bfd1d3187a
@ -1474,6 +1474,11 @@ namespace Opm
|
|||||||
for (int perf = 0; perf < nperf; ++perf) {
|
for (int perf = 0; perf < nperf; ++perf) {
|
||||||
total_tw += this->well_index_[perf];
|
total_tw += this->well_index_[perf];
|
||||||
}
|
}
|
||||||
|
const auto& comm = this->parallel_well_info_.communication();
|
||||||
|
if (comm.size() > 1)
|
||||||
|
{
|
||||||
|
total_tw = comm.sum(total_tw);
|
||||||
|
}
|
||||||
for (int perf = 0; perf < nperf; ++perf) {
|
for (int perf = 0; perf < nperf; ++perf) {
|
||||||
const int cell_idx = this->well_cells_[perf];
|
const int cell_idx = this->well_cells_[perf];
|
||||||
const auto& intQuants = *(ebosSimulator.model().cachedIntensiveQuantities(cell_idx, /*timeIdx=*/0));
|
const auto& intQuants = *(ebosSimulator.model().cachedIntensiveQuantities(cell_idx, /*timeIdx=*/0));
|
||||||
|
Loading…
Reference in New Issue
Block a user