Prepare for Revised Implementation of WBPn

This initial commit changes the Summary class's API for consuming
block-averaged well level pressure values (summary keywords WBPn).
The former approach was intended to consume a collection of source
values--pressures, densities, and pore-volumes--and then to defer
calculation of the WBPn summary vectors to the Summary class.

This commit introduces a 'WellBlockAvgPress' container class which
holds precomputed WBPn results and the intention is to move the
calculation to the simulator side for greater parallelism.
This commit is contained in:
Bård Skaflestad
2023-06-06 15:31:34 +02:00
parent ba0845c5f3
commit 89bc182876
11 changed files with 389 additions and 280 deletions

View File

@@ -196,7 +196,7 @@ END
auto summary_config = SummaryConfig{deck, sched, es.fieldProps(), es.aquifer()};
const auto& w1 = sched.getWell("P1", 0);
const auto& porv = es.globalFieldProps().porv(true);
auto calc = w1.pavg_calculator(grid, porv);
auto calc = PAvgCalculator(w1.name(), w1.getWPaveRefDepth(), grid, porv, w1.getConnections(), w1.pavg());
{
const auto& index_list = calc.index_list();
@@ -235,7 +235,7 @@ END
//----------------------------------------------------
const auto& w5 = sched.getWell("P5", 0);
auto calc5 = w5.pavg_calculator(grid, porv);
auto calc5 = PAvgCalculator(w5.name(), w5.getWPaveRefDepth(), grid, porv, w5.getConnections(), w5.pavg());
{
const auto& index_list = calc5.index_list();
@@ -263,8 +263,8 @@ END
// We emulate MPI and calc1 and calc2 are on two different processors
{
auto calc1 = w5.pavg_calculator(grid, porv);
auto calc2 = w5.pavg_calculator(grid, porv);
auto calc1 = PAvgCalculator(w5.name(), w5.getWPaveRefDepth(), grid, porv, w5.getConnections(), w5.pavg());
auto calc2 = PAvgCalculator(w5.name(), w5.getWPaveRefDepth(), grid, porv, w5.getConnections(), w5.pavg());
for (std::size_t k = 0; k < 3; k++) {
calc1.add_pressure(grid.getGlobalIndex(0,0,k), 1);
calc2.add_pressure(grid.getGlobalIndex(1,0,k), 2.0);
@@ -277,9 +277,8 @@ END
PAvgCalculatorCollection calculators;
calculators.add(w1.pavg_calculator(grid, porv));
calculators.add(w5.pavg_calculator(grid, porv));
calculators.add(PAvgCalculator(w1.name(), w1.getWPaveRefDepth(), grid, porv, w1.getConnections(), w1.pavg()));
calculators.add(PAvgCalculator(w5.name(), w5.getWPaveRefDepth(), grid, porv, w5.getConnections(), w5.pavg()));
BOOST_CHECK( calculators.has("P1"));
BOOST_CHECK( calculators.has("P5"));