20 #ifndef SEGMENTSET_HPP_HEADER_INCLUDED 21 #define SEGMENTSET_HPP_HEADER_INCLUDED 23 #include <opm/input/eclipse/Schedule/MSW/Segment.hpp> 29 #include <string_view> 36 class KeywordLocation;
41 class WellConnections;
46 enum class WellSegmentCompPressureDrop {
53 class KeywordLocation;
57 enum class LengthDepth {
61 static const std::string LengthDepthToString(LengthDepth enumValue);
62 static LengthDepth LengthDepthFromString(
const std::string& stringValue);
64 using CompPressureDrop = WellSegmentCompPressureDrop;
66 static const std::string CompPressureDropToString(CompPressureDrop enumValue);
67 static CompPressureDrop CompPressureDropFromString(
const std::string& stringValue);
70 enum class MultiPhaseModel {
74 static const std::string MultiPhaseModelToString(MultiPhaseModel enumValue);
75 static MultiPhaseModel MultiPhaseModelFromString(
const std::string& stringValue);
79 const std::vector<Segment>& segments);
81 void addWellSegmentsFromLengthsAndDepths(
const std::string &wname,
82 const std::vector<std::pair<double, double>>& lengths_and_depths,
83 double diameter,
const UnitSystem& unit_system);
87 std::size_t size()
const;
89 int maxSegmentID()
const;
90 int maxBranchID()
const;
91 double depthTopSegment()
const;
92 double lengthTopSegment()
const;
93 double volumeTopSegment()
const;
95 CompPressureDrop compPressureDrop()
const;
98 int segmentNumberToIndex(
const int segment_number)
const;
100 const Segment& getFromSegmentNumber(
const int segment_number)
const;
102 const Segment& operator[](
size_t idx)
const;
103 void orderSegments();
108 double segmentLength(
const int segment_number)
const;
109 double segmentDepthChange(
const int segment_number)
const;
110 std::vector<Segment> branchSegments(
int branch)
const;
111 std::set<int> branches()
const;
115 bool updateWSEGAICD(std::string_view well_name,
116 const std::vector<std::pair<int, AutoICD>>& aicd_pairs,
121 bool updateWSEGSICD(std::string_view well_name,
122 const std::vector<std::pair<int, SICD>>& sicd_pairs,
127 bool updateWSEGVALV(std::string_view well_name,
128 const std::vector<std::pair<int, Valve>>& valve_pairs,
133 auto begin()
const {
return this->m_segments.begin(); }
134 auto end()
const {
return this->m_segments.end(); }
136 void checkSegmentDepthConsistency(
const std::string& well_name,
const UnitSystem& unit_system)
const;
140 template<
class Serializer>
143 serializer(m_comp_pressure_drop);
144 serializer(m_segments);
145 serializer(segment_number_to_index);
150 void processINC(
double depth_top,
double length_top);
151 void process(
const std::string& well_name,
const UnitSystem& unit_system,
152 LengthDepth length_depth,
double depth_top,
double length_top);
153 void addSegment(
const Segment& new_segment);
154 void addSegment(
const int segment_number,
156 const int outlet_segment,
159 const double internal_diameter,
160 const double roughness,
161 const double cross_area,
163 const bool data_ready,
165 const double node_y);
166 const Segment& topSegment()
const;
169 CompPressureDrop m_comp_pressure_drop{CompPressureDrop::HFA};
173 std::vector< Segment > m_segments{};
176 std::map<int, int> segment_number_to_index{};
Definition: KeywordLocation.hpp:27
Definition: WellSegments.hpp:55
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: UnitSystem.hpp:34
Control parser behaviour in failure conditions.
Definition: ParseContext.hpp:114
Definition: WellConnections.hpp:48
Definition: Segment.hpp:39
Class for (de-)serializing.
Definition: Serializer.hpp:94
Definition: DeckKeyword.hpp:36
Definition: ErrorGuard.hpp:30