From 93fb5a2c529af5a9bded85f8a6d49636a7cd850d Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Tue, 27 Nov 2018 13:41:24 +0100 Subject: [PATCH] add a few fields related to injectivity to WellStateFullyImplicitBlackoil to account for the water throughput, skin pressure and water velocity for each perforation. --- .../WellStateFullyImplicitBlackoil.hpp | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/opm/autodiff/WellStateFullyImplicitBlackoil.hpp b/opm/autodiff/WellStateFullyImplicitBlackoil.hpp index 667f66482..304f7d104 100644 --- a/opm/autodiff/WellStateFullyImplicitBlackoil.hpp +++ b/opm/autodiff/WellStateFullyImplicitBlackoil.hpp @@ -122,6 +122,15 @@ namespace Opm // Ensure that we start out with zero rates by default. perfphaserates_.clear(); perfphaserates_.resize(nperf * np, 0.0); + + // these are only used to monitor the injectivity + perf_water_throughput_.clear(); + perf_water_throughput_.resize(nperf, 0.0); + perf_water_velocity_.clear(); + perf_water_velocity_.resize(nperf, 0.0); + perf_skin_pressure_.clear(); + perf_skin_pressure_.resize(nperf, 0.0); + for (int w = 0; w < nw; ++w) { assert((wells->type[w] == INJECTOR) || (wells->type[w] == PRODUCER)); const WellControls* ctrl = wells->ctrls[w]; @@ -137,6 +146,13 @@ namespace Opm perfphaserates_[np*perf + p] = wellRates()[np*w + p] / double(num_perf_this_well); } perfPress()[perf] = cellPressures[wells->well_cells[perf]]; + + // here we did not consider the case that we close some perforation during the running + // and also, wells can be shut and re-opened + // it should only be updated when necessary, while WellState might not have the facility to do it + perf_water_throughput_[ perf ] = prevState->perfThroughput()[ oldPerf_idx ]; + perf_skin_pressure_[ perf ] = prevState->perfSkinPressure()[ oldPerf_idx ]; + perf_water_velocity_[ perf ] = prevState->perfWaterVelocity()[ oldPerf_idx ]; } } } @@ -831,11 +847,48 @@ namespace Opm return well_potentials_; } + std::vector& perfThroughput() { + return perf_water_throughput_; + } + + const std::vector& perfThroughput() const { + return perf_water_throughput_; + } + + std::vector& perfSkinPressure() { + return perf_skin_pressure_; + } + + const std::vector& perfSkinPressure() const { + return perf_skin_pressure_; + } + + std::vector& perfWaterVelocity() { + return perf_water_velocity_; + } + + const std::vector& perfWaterVelocity() const { + return perf_water_velocity_; + } + private: std::vector perfphaserates_; std::vector current_controls_; std::vector perfRateSolvent_; + // it is the throughput of water flow through the perforations + // it is used as a measure of formation damage around well-bore due to particle deposition + // it will only be used for injectors to check the injectivity + std::vector perf_water_throughput_; + + // skin pressure of peforation + // it will only be used for injectors to check the injectivity + std::vector perf_skin_pressure_; + + // it will only be used for injectors to check the injectivity + // water velocity of perforation + std::vector perf_water_velocity_; + // phase rates under reservoir condition for wells // or voidage phase rates std::vector well_reservoir_rates_;