diff --git a/opm/input/eclipse/Schedule/MSW/Valve.hpp b/opm/input/eclipse/Schedule/MSW/Valve.hpp index 8a884ddbc..003efc2eb 100644 --- a/opm/input/eclipse/Schedule/MSW/Valve.hpp +++ b/opm/input/eclipse/Schedule/MSW/Valve.hpp @@ -69,6 +69,7 @@ namespace Opm { // Status: OPEN or SHUT ICDStatus status() const; + int ecl_status() const; void setConMaxCrossArea(const double area); diff --git a/src/opm/input/eclipse/Schedule/MSW/Valve.cpp b/src/opm/input/eclipse/Schedule/MSW/Valve.cpp index fae47e64a..ab86b1d77 100644 --- a/src/opm/input/eclipse/Schedule/MSW/Valve.cpp +++ b/src/opm/input/eclipse/Schedule/MSW/Valve.cpp @@ -18,9 +18,11 @@ */ #include + #include #include +#include "icd_convert.hpp" namespace Opm { @@ -130,6 +132,11 @@ namespace Opm { return m_status; } + int Valve::ecl_status() const + { + return to_int(this->status()); + } + double Valve::conFlowCoefficient() const { return m_con_flow_coeff; } diff --git a/src/opm/output/eclipse/AggregateMSWData.cpp b/src/opm/output/eclipse/AggregateMSWData.cpp index e4325168e..cd6ea408e 100644 --- a/src/opm/output/eclipse/AggregateMSWData.cpp +++ b/src/opm/output/eclipse/AggregateMSWData.cpp @@ -495,7 +495,6 @@ namespace { VectorItems::ISeg::index; const auto& sicd = segment.spiralICD(); - iSeg[baseIndex + Ix::SegmentType] = segment.ecl_type_id(); iSeg[baseIndex + Ix::ICDScalingMode] = sicd.methodFlowScaling(); iSeg[baseIndex + Ix::ICDOpenShutFlag] = sicd.ecl_status(); } @@ -509,11 +508,21 @@ namespace { VectorItems::ISeg::index; const auto& aicd = segment.autoICD(); - iSeg[baseIndex + Ix::SegmentType] = segment.ecl_type_id(); iSeg[baseIndex + Ix::ICDScalingMode] = aicd.methodFlowScaling(); iSeg[baseIndex + Ix::ICDOpenShutFlag] = aicd.ecl_status(); } + template + void assignValveCharacteristics(const Opm::Segment& segment, + const std::size_t baseIndex, + ISegArray& iSeg) + { + using Ix = ::Opm::RestartIO::Helpers::VectorItems::ISeg::index; + + const auto& valve = segment.valve(); + iSeg[baseIndex + Ix::ICDOpenShutFlag] = valve.ecl_status(); + } + template void assignSegmentTypeCharacteristics(const Opm::Segment& segment, const std::size_t baseIndex, @@ -522,9 +531,14 @@ namespace { if (segment.isSpiralICD()) { assignSpiralICDCharacteristics(segment, baseIndex, iSeg); } + if (segment.isAICD()) { assignAICDCharacteristics(segment, baseIndex, iSeg); } + + if (segment.isValve()) { + assignValveCharacteristics(segment, baseIndex, iSeg); + } } template