Use segmentstate for friction pressure

This commit is contained in:
Joakim Hove
2021-05-30 19:51:04 +02:00
parent bccb4f36e4
commit 9801469488
3 changed files with 10 additions and 20 deletions

View File

@@ -222,24 +222,13 @@ public:
double segPressDrop(std::size_t well_index, std::size_t segment_index) const
{
const auto& segments = this->segments(well_index);
const int top_segment_index = this->top_segment_index_[well_index];
return this->seg_pressdrop_friction_[top_segment_index + segment_index] +
return segments.pressure_drop_friction[segment_index] +
this->seg_pressdrop_hydorstatic_[top_segment_index + segment_index] +
this->seg_pressdrop_acceleration_[top_segment_index + segment_index];
}
double* segPressDropFriction(std::size_t well_index)
{
const int top_segment_index = this->top_segment_index_[well_index];
return &seg_pressdrop_friction_[top_segment_index];
}
const double* segPressDropFriction(std::size_t well_index) const
{
const int top_segment_index = this->top_segment_index_[well_index];
return &seg_pressdrop_friction_[top_segment_index];
}
double* segPressDropHydroStatic(std::size_t well_index)
{
const int top_segment_index = this->top_segment_index_[well_index];
@@ -545,8 +534,6 @@ private:
int nseg_; // total number of the segments
// The following data are only recorded for output
// frictional pressure drop
std::vector<double> seg_pressdrop_friction_;
// hydrostatic pressure drop
std::vector<double> seg_pressdrop_hydorstatic_;
// accelerational pressure drop