From fafca7b3824ebfedea1cef65832ec754b56acbfc Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Thu, 4 May 2023 12:48:15 +0200 Subject: [PATCH] changed: introduce a struct StandardWellConnections::Properties this holds the various properties for a connection --- .../wells/StandardWellConnections.hpp | 10 ++++++++ opm/simulators/wells/StandardWell_impl.hpp | 23 ++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/opm/simulators/wells/StandardWellConnections.hpp b/opm/simulators/wells/StandardWellConnections.hpp index 127637f01..79a338bdf 100644 --- a/opm/simulators/wells/StandardWellConnections.hpp +++ b/opm/simulators/wells/StandardWellConnections.hpp @@ -39,6 +39,16 @@ class StandardWellConnections public: StandardWellConnections(const WellInterfaceIndices& well); + struct Properties + { + std::vector b_perf; + std::vector rsmax_perf; + std::vector rvmax_perf; + std::vector rvwmax_perf; + std::vector rswmax_perf; + std::vector surf_dens_perf; + }; + void computePropertiesForPressures(const WellState& well_state, const std::function& getTemperature, const std::function& getSaltConcentration, diff --git a/opm/simulators/wells/StandardWell_impl.hpp b/opm/simulators/wells/StandardWell_impl.hpp index 70f6133f7..e57c9f125 100644 --- a/opm/simulators/wells/StandardWell_impl.hpp +++ b/opm/simulators/wells/StandardWell_impl.hpp @@ -1576,14 +1576,21 @@ namespace Opm // 1. Compute properties required by computePressureDelta(). // Note that some of the complexity of this part is due to the function // taking std::vector arguments, and not Eigen objects. - std::vector b_perf; - std::vector rsmax_perf; - std::vector rvmax_perf; - std::vector rvwmax_perf; - std::vector rswmax_perf; - std::vector surf_dens_perf; - computePropertiesForWellConnectionPressures(ebosSimulator, well_state, b_perf, rsmax_perf, rvmax_perf, rvwmax_perf, rswmax_perf, surf_dens_perf); - computeWellConnectionDensitesPressures(ebosSimulator, well_state, b_perf, rsmax_perf, rvmax_perf, rvwmax_perf, rswmax_perf, surf_dens_perf, deferred_logger); + StdWellEval::StdWellConnections::Properties props; + computePropertiesForWellConnectionPressures(ebosSimulator, well_state, + props.b_perf, + props.rsmax_perf, + props.rvmax_perf, + props.rvwmax_perf, + props.rswmax_perf, + props.surf_dens_perf); + computeWellConnectionDensitesPressures(ebosSimulator, well_state, + props.b_perf, + props.rsmax_perf, + props.rvmax_perf, + props.rvwmax_perf, + props.rswmax_perf, + props.surf_dens_perf, deferred_logger); }