20 #ifndef SEGMENT_HPP_HEADER_INCLUDED
21 #define SEGMENT_HPP_HEADER_INCLUDED
27 #include <opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.hpp>
28 #include <opm/parser/eclipse/EclipseState/Schedule/MSW/SICD.hpp>
29 #include <opm/parser/eclipse/EclipseState/Schedule/MSW/AICD.hpp>
48 template<
class Serializer>
66 enum class SegmentType {
75 Segment(
const Segment& src,
double new_depth,
double new_length,
double new_volume);
78 Segment(
int segment_number_in,
int branch_in,
int outlet_segment_in,
double length_in,
double depth_in,
79 double internal_diameter_in,
double roughness_in,
double cross_area_in,
double volume_in,
bool data_ready_in);
82 static Segment serializeObject();
84 int segmentNumber()
const;
85 int branchNumber()
const;
86 int outletSegment()
const;
87 double perfLength()
const;
88 double totalLength()
const;
90 double internalDiameter()
const;
91 double roughness()
const;
92 double crossArea()
const;
93 double volume()
const;
94 bool dataReady()
const;
96 SegmentType segmentType()
const;
97 int ecl_type_id()
const;
100 const std::vector<int>& inletSegments()
const;
102 static double invalidValue();
103 static SegmentType type_from_int(
int ecl_id);
105 bool operator==(
const Segment& )
const;
106 bool operator!=(
const Segment& )
const;
108 const SICD& spiralICD()
const;
109 const AutoICD& autoICD()
const;
110 const Valve& valve()
const;
112 void updatePerfLength(
double perf_length);
113 void updateSpiralICD(
const SICD& spiral_icd);
114 void updateAutoICD(
const AutoICD& aicd);
115 void updateValve(
const Valve& valve,
const double segment_length);
116 void updateValve(
const Valve& valve);
117 void addInletSegment(
const int segment_number);
119 bool isRegular()
const
121 return std::holds_alternative<RegularSegment>(this->m_icd);
124 inline bool isSpiralICD()
const
126 return std::holds_alternative<SICD>(this->m_icd);
129 inline bool isAICD()
const
131 return std::holds_alternative<AutoICD>(this->m_icd);
134 inline bool isValve()
const
136 return std::holds_alternative<Valve>(this->m_icd);
139 template<
class Serializer>
142 serializer(m_segment_number);
143 serializer(m_branch);
144 serializer(m_outlet_segment);
145 serializer(m_inlet_segments);
146 serializer(m_total_length);
148 serializer(m_internal_diameter);
149 serializer(m_roughness);
150 serializer(m_cross_area);
151 serializer(m_volume);
152 serializer(m_data_ready);
153 serializer(m_perf_length);
158 void updateValve__(
Valve& valve,
const double segment_length);
161 int m_segment_number;
167 int m_outlet_segment;
169 std::vector<int> m_inlet_segments;
175 double m_total_length;
186 double m_internal_diameter;
204 std::optional<double> m_perf_length;
205 std::variant<RegularSegment, SICD, AutoICD, Valve> m_icd;
Definition: Segment.hpp:63
Definition: Serializer.hpp:38
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Definition: Segment.hpp:46
Definition: segment.hpp:32