mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
trying to make the numerical aquifer runs in parallel
the current approach is not necessarily correct. When aquifer cells are on the overlap layers, things are much more complicated. But it mostly affects only the summary output of the numerical aquifers. The well data should be fine.
This commit is contained in:
@@ -1713,7 +1713,7 @@ public:
|
||||
|
||||
// Compute pressures, saturations, rs and rv factors.
|
||||
const auto& comm = gridView.comm();
|
||||
calcPressSatRsRv(eqlmap, rec, materialLawManager, gridView, num_aquifers, comm, grav);
|
||||
calcPressSatRsRv(eqlmap, rec, materialLawManager, num_aquifers, comm, grav);
|
||||
|
||||
// Modify oil pressure in no-oil regions so that the pressures of present phases can
|
||||
// be recovered from the oil pressure and capillary relations.
|
||||
@@ -1826,7 +1826,6 @@ private:
|
||||
void calcPressSatRsRv(const RMap& reg,
|
||||
const std::vector<Opm::EquilRecord>& rec,
|
||||
MaterialLawManager& materialLawManager,
|
||||
const GridView& gridView,
|
||||
const NumericalAquifers& aquifer,
|
||||
const Comm& comm,
|
||||
const double grav)
|
||||
@@ -1864,7 +1863,7 @@ private:
|
||||
const auto acc = eqreg.equilibrationAccuracy();
|
||||
if (acc == 0) {
|
||||
// Centre-point method
|
||||
this->equilibrateCellCentres(cells, eqreg, ptable, gridView, aquifer, psat);
|
||||
this->equilibrateCellCentres(cells, eqreg, ptable, aquifer, psat);
|
||||
}
|
||||
else if (acc < 0) {
|
||||
// Horizontal subdivision
|
||||
@@ -1928,7 +1927,6 @@ private:
|
||||
void equilibrateCellCentres(const CellRange& cells,
|
||||
const EquilReg& eqreg,
|
||||
const PressTable& ptable,
|
||||
const GridView& gridView,
|
||||
const NumericalAquifers& aquifer,
|
||||
PhaseSat& psat)
|
||||
{
|
||||
|
||||
@@ -64,12 +64,16 @@ public:
|
||||
for (size_t idx = 0; idx < aquifer.numCells(); ++idx) {
|
||||
const auto& cell = *(aquifer.getCellPrt(idx));
|
||||
const int global_idx = cell.global_index;
|
||||
const auto search = cartesian_to_compressed.find(global_idx);
|
||||
// Due to parallelisation, the cell might not exist in the current process
|
||||
if (search != cartesian_to_compressed.end()) {
|
||||
const int cell_idx = cartesian_to_compressed.at(global_idx);
|
||||
this->cell_to_aquifer_cell_idx_[cell_idx] = idx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void initFromRestart(const std::vector<data::AquiferData>& aquiferSoln)
|
||||
void initFromRestart([[maybe_unused]]const std::vector<data::AquiferData>& aquiferSoln)
|
||||
{
|
||||
// NOT handling Restart for now
|
||||
}
|
||||
@@ -148,6 +152,9 @@ private:
|
||||
sum_watervolume += water_volume;
|
||||
}
|
||||
|
||||
const auto& comm = this->ebos_simulator_.vanguard().grid().comm();
|
||||
comm.sum(&sum_pressure_watervolume, 1);
|
||||
comm.sum(&sum_watervolume, 1);
|
||||
return sum_pressure_watervolume / sum_watervolume;
|
||||
}
|
||||
|
||||
@@ -208,6 +215,8 @@ private:
|
||||
break;
|
||||
}
|
||||
|
||||
const auto& comm = this->ebos_simulator_.vanguard().grid().comm();
|
||||
comm.sum(&aquifer_flux, 1);
|
||||
return aquifer_flux;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user