From 9a2410ddb24c7f8c18417f10221bd07ba51a91cc Mon Sep 17 00:00:00 2001 From: Jostein Alvestad Date: Tue, 25 Aug 2020 16:02:52 +0200 Subject: [PATCH] corrections to IWEL for pressure loss model and multiphase model --- opm/output/eclipse/VectorItems/well.hpp | 28 +++++++++++++++++ src/opm/output/eclipse/AggregateWellData.cpp | 32 ++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/opm/output/eclipse/VectorItems/well.hpp b/opm/output/eclipse/VectorItems/well.hpp index 62ec24117..bb464030a 100644 --- a/opm/output/eclipse/VectorItems/well.hpp +++ b/opm/output/eclipse/VectorItems/well.hpp @@ -58,6 +58,18 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems // Value 0 for regular wells // Value #segments for MS wells + MSW_PlossMod = 81, // Pressure loss model for well segments + // = 0 for regular wells + // = 0 for MSW wells and HFA (WELSEGS item 6) + // = 1 for MSW wells and HF- (WELSEGS item 6) + // = 2 for MSW wells and H-- (WELSEGS item 6) + + MSW_MulPhaseMod = 85, // Multiphase flow model for well segments - NOTE DF - model is not implemented yet!! + // = 0 for regular wells + // = 1 for MSW wells and HO (WELSEGS item 7) + // = 2 for MSW wells and DF (WELSEGS item 7) + + CompOrd = 98, // Well's completion ordering scheme. }; @@ -97,6 +109,22 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems // appearance in simulation model's // COMPDAT keyword. }; + + enum PLossMod : int { + HFA = 0, // Components of pressure loss in MSW model for well (WELSEGS item 6) + // Hydrostatic, Friction, Acceleration + + HF_ = 1, // Hydrostatic, Friction, + + H__ = 2, // Hydrostatic + }; + + /*enum MPMod : int { + HO = 1, // Multiphase flow model for MSW well + // Homogeneous flow + + DF = 2, // Drift flux model + };*/ } // Value } // IWell diff --git a/src/opm/output/eclipse/AggregateWellData.cpp b/src/opm/output/eclipse/AggregateWellData.cpp index cc02d2e77..d150f6c1f 100644 --- a/src/opm/output/eclipse/AggregateWellData.cpp +++ b/src/opm/output/eclipse/AggregateWellData.cpp @@ -186,6 +186,33 @@ namespace { return 0; } + int PLossMod(const Opm::Well& well) + { + using CPD = ::Opm::WellSegments::CompPressureDrop; + using PLM = ::Opm::RestartIO::Helpers:: + VectorItems::IWell::Value::PLossMod; + switch (well.getSegments().compPressureDrop()) { + case CPD::HFA: return PLM::HFA; + case CPD::HF_: return PLM::HF_; + case CPD::H__: return PLM::H__; + } + + return 0; + } + + /*int MPhaseMod(const Opm::Well& well) + { + using MPM = ::Opm::WellSegments::MultiPhaseModel; + using MUM = ::Opm::RestartIO::Helpers:: + VectorItems::IWell::Value::MPMod; + switch (well.getSegments().multiPhaseModel()) { + case MPM::HO: return MUM::HO; + case MPM::DF: return MUM::DF; + } + + return 0; + }*/ + template void setCurrentControl(const Opm::Well& well, const int curr, @@ -268,9 +295,14 @@ namespace { // Multi-segmented well information iWell[Ix::MsWID] = 0; // MS Well ID (0 or 1..#MS wells) iWell[Ix::NWseg] = 0; // Number of well segments + iWell[Ix::MSW_PlossMod] = 0; // Segment pressure loss model + iWell[Ix::MSW_MulPhaseMod] = 0; // Segment multi phase flow model if (well.isMultiSegment()) { iWell[Ix::MsWID] = static_cast(msWellID); iWell[Ix::NWseg] = well.getSegments().size(); + iWell[Ix::MSW_PlossMod] = PLossMod(well); + iWell[Ix::MSW_MulPhaseMod] = 1; // temporary solution - valid for HO - multiphase model - only implemented now + //iWell[Ix::MSW_MulPhaseMod] = MPhaseMod(well); } iWell[Ix::CompOrd] = compOrder(well);