changing length to total_length to for more correct meaning.
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Opm {
|
||||
: m_segment_number(-1),
|
||||
m_branch(-1),
|
||||
m_outlet_segment(-1),
|
||||
m_length(invalid_value),
|
||||
m_total_length(invalid_value),
|
||||
m_depth(invalid_value),
|
||||
m_internal_diameter(invalid_value),
|
||||
m_roughness(invalid_value),
|
||||
@@ -24,7 +24,7 @@ namespace Opm {
|
||||
: m_segment_number(segment_number_in),
|
||||
m_branch(branch_in),
|
||||
m_outlet_segment(outlet_segment_in),
|
||||
m_length(length_in),
|
||||
m_total_length(length_in),
|
||||
m_depth(depth_in),
|
||||
m_internal_diameter(internal_diameter_in),
|
||||
m_roughness(roughness_in),
|
||||
@@ -38,7 +38,7 @@ namespace Opm {
|
||||
: m_segment_number(segment_in->segmentNumber()),
|
||||
m_branch(segment_in->branchNumber()),
|
||||
m_outlet_segment(segment_in->outletSegment()),
|
||||
m_length(segment_in->length()),
|
||||
m_total_length(segment_in->totalLength()),
|
||||
m_depth(segment_in->depth()),
|
||||
m_internal_diameter(segment_in->internalDiameter()),
|
||||
m_roughness(segment_in->roughness()),
|
||||
@@ -64,8 +64,8 @@ namespace Opm {
|
||||
}
|
||||
|
||||
|
||||
double Segment::length() const {
|
||||
return m_length;
|
||||
double Segment::totalLength() const {
|
||||
return m_total_length;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Opm {
|
||||
}
|
||||
|
||||
void Segment::setDepthAndLength(const double depth_in, const double length_in) {
|
||||
m_length = length_in;
|
||||
m_total_length = length_in;
|
||||
m_depth = depth_in;
|
||||
m_data_ready = true;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Opm {
|
||||
int segmentNumber() const;
|
||||
int branchNumber() const;
|
||||
int outletSegment() const;
|
||||
double length() const;
|
||||
double totalLength() const;
|
||||
double depth() const;
|
||||
double internalDiameter() const;
|
||||
double roughness() const;
|
||||
@@ -63,20 +63,17 @@ namespace Opm {
|
||||
// the outlet junction segment
|
||||
// for top segment, it should be -1
|
||||
int m_outlet_segment;
|
||||
// length of the nodes
|
||||
// depending on item 5 in the record 1
|
||||
// 'INC' or 'ABS'
|
||||
// if it is 'INC', for top segment, it will be 0
|
||||
// length of the segment node to the bhp reference point.
|
||||
// when reading in from deck, with 'INC',
|
||||
// it will be incremental length before processing.
|
||||
// After processing and in the class Well, it always stores the 'ABS' value.
|
||||
// which means the total_length
|
||||
double m_total_length;
|
||||
// depth of the nodes to the bhp reference point
|
||||
// when reading in from deck, with 'INC',
|
||||
// it will be the incremental depth before processing.
|
||||
// in the class Well, it always stores the 'ABS' value.
|
||||
double m_length;
|
||||
// depth of the nodes
|
||||
// depending on item 5 in the record 1
|
||||
// 'INC' or 'ABS'
|
||||
// if it is 'INC', for top segment, it will be 0
|
||||
// TODO: to check if it is good to use 'ABS' always.
|
||||
// since it is easy to compute the 'INC' value with the 'ABS' value
|
||||
// while not easy the other way.
|
||||
// in the class Well, it always stores the 'ABS' value.
|
||||
double m_depth;
|
||||
// tubing internal diameter
|
||||
// or the equivalent diameter for annular cross-sections
|
||||
|
||||
@@ -235,10 +235,10 @@ namespace Opm {
|
||||
int number_segments = range_end - range_begin + 1;
|
||||
assert(number_segments > 1); //if only 1, the information should be complete
|
||||
|
||||
const double length_outlet = m_segments[outlet_loc]->length();
|
||||
const double length_outlet = m_segments[outlet_loc]->totalLength();
|
||||
const double depth_outlet = m_segments[outlet_loc]->depth();
|
||||
|
||||
const double length_last = m_segments[range_end]->length();
|
||||
const double length_last = m_segments[range_end]->totalLength();
|
||||
const double depth_last = m_segments[range_end]->depth();
|
||||
|
||||
// incremental length and depth for the segments within the range
|
||||
@@ -270,7 +270,7 @@ namespace Opm {
|
||||
SegmentPtr new_segment = std::make_shared<Segment>(m_segments[i]);
|
||||
const int outlet_segment = m_segments[i]->outletSegment();
|
||||
const int outlet_location = numberToLocation(outlet_segment);
|
||||
const double segment_length = m_segments[i]->length() - m_segments[outlet_location]->length();
|
||||
const double segment_length = m_segments[i]->totalLength() - m_segments[outlet_location]->totalLength();
|
||||
const double segment_volume = m_segments[i]->crossArea() * segment_length;
|
||||
new_segment->setVolume(segment_volume);
|
||||
addSegment(new_segment);
|
||||
@@ -301,9 +301,9 @@ namespace Opm {
|
||||
assert(m_segments[outlet_loc]->dataReady());
|
||||
|
||||
const double outlet_depth = m_segments[outlet_loc]->depth();
|
||||
const double outlet_length = m_segments[outlet_loc]->length();
|
||||
const double outlet_length = m_segments[outlet_loc]->totalLength();
|
||||
const double temp_depth = outlet_depth + m_segments[i_loc]->depth();
|
||||
const double temp_length = outlet_length + m_segments[i_loc]->length();
|
||||
const double temp_length = outlet_length + m_segments[i_loc]->totalLength();
|
||||
|
||||
// applying the calculated length and depth to the current segment
|
||||
SegmentPtr new_segment = std::make_shared<Segment>(m_segments[i_loc]);
|
||||
|
||||
Reference in New Issue
Block a user