Add WellSegments::process() front-end method
This commit is contained in:
parent
167a7a8c38
commit
fbece57167
@ -41,7 +41,6 @@ namespace Opm {
|
||||
double lengthTopSegment() const;
|
||||
double volumeTopSegment() const;
|
||||
|
||||
WellSegment::LengthDepthEnum lengthDepthType() const;
|
||||
WellSegment::CompPressureDropEnum compPressureDrop() const;
|
||||
WellSegment::MultiPhaseModelEnum multiPhaseModel() const;
|
||||
|
||||
@ -56,13 +55,14 @@ namespace Opm {
|
||||
|
||||
const Segment& operator[](size_t idx) const;
|
||||
void orderSegments();
|
||||
void processABS();
|
||||
void processINC(const bool first_time);
|
||||
void process(bool first_time);
|
||||
|
||||
bool operator==( const WellSegments& ) const;
|
||||
bool operator!=( const WellSegments& ) const;
|
||||
|
||||
private:
|
||||
void processABS();
|
||||
void processINC(const bool first_time);
|
||||
|
||||
// name of the well
|
||||
std::string m_well_name;
|
||||
|
@ -59,9 +59,6 @@ namespace Opm {
|
||||
return m_volume_top;
|
||||
}
|
||||
|
||||
WellSegment::LengthDepthEnum WellSegments::lengthDepthType() const {
|
||||
return m_length_depth_type;
|
||||
}
|
||||
|
||||
WellSegment::CompPressureDropEnum WellSegments::compPressureDrop() const {
|
||||
return m_comp_pressure_drop;
|
||||
@ -228,6 +225,16 @@ namespace Opm {
|
||||
return m_segments[segment_index];
|
||||
}
|
||||
|
||||
void WellSegments::process(bool first_time) {
|
||||
if (this->m_length_depth_type == WellSegment::ABS)
|
||||
this->processABS();
|
||||
else if (this->m_length_depth_type == WellSegment::INC)
|
||||
this->processINC(first_time);
|
||||
else
|
||||
throw std::logic_error("Invalid llength/depth/type in segment data structure");
|
||||
}
|
||||
|
||||
|
||||
void WellSegments::processABS() {
|
||||
const double invalid_value = Segment::invalidValue(); // meaningless value to indicate unspecified/uncompleted values
|
||||
|
||||
|
@ -459,14 +459,7 @@ namespace Opm {
|
||||
// overwrite the BHP reference depth with the one from WELSEGS keyword
|
||||
const double ref_depth = new_segmentset.depthTopSegment();
|
||||
m_refDepth.update( time_step, ref_depth );
|
||||
|
||||
if (new_segmentset.lengthDepthType() == WellSegment::ABS) {
|
||||
new_segmentset.processABS();
|
||||
} else if (new_segmentset.lengthDepthType() == WellSegment::INC) {
|
||||
new_segmentset.processINC(first_time);
|
||||
} else {
|
||||
throw std::logic_error(" unknown length_depth_type in the new_segmentset");
|
||||
}
|
||||
new_segmentset.process(first_time);
|
||||
m_segmentset.update(time_step, new_segmentset);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user