mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use well index for segment hydrostatic pressure drop
This commit is contained in:
@@ -1924,7 +1924,7 @@ namespace Opm
|
|||||||
// TODO: we might be able to add member variables to store these values, then we update well state
|
// TODO: we might be able to add member variables to store these values, then we update well state
|
||||||
// after converged
|
// after converged
|
||||||
const auto hydro_pressure_drop = getHydroPressureLoss(seg);
|
const auto hydro_pressure_drop = getHydroPressureLoss(seg);
|
||||||
well_state.segPressDropHydroStatic()[top_segment_index + seg] = hydro_pressure_drop.value();
|
well_state.segPressDropHydroStatic(index_of_well_)[seg] = hydro_pressure_drop.value();
|
||||||
pressure_equation -= hydro_pressure_drop;
|
pressure_equation -= hydro_pressure_drop;
|
||||||
|
|
||||||
if (frictionalPressureLossConsidered()) {
|
if (frictionalPressureLossConsidered()) {
|
||||||
@@ -2706,7 +2706,8 @@ namespace Opm
|
|||||||
|
|
||||||
auto seg_press_drop = well_state.segPressDrop(index_of_well_);
|
auto seg_press_drop = well_state.segPressDrop(index_of_well_);
|
||||||
auto seg_press_friction = well_state.segPressDropFriction(index_of_well_);
|
auto seg_press_friction = well_state.segPressDropFriction(index_of_well_);
|
||||||
seg_press_drop[seg] = well_state.segPressDropHydroStatic()[seg] +
|
auto seg_press_static = well_state.segPressDropHydroStatic(index_of_well_);
|
||||||
|
seg_press_drop[seg] = seg_press_static[seg] +
|
||||||
seg_press_friction[seg] +
|
seg_press_friction[seg] +
|
||||||
well_state.segPressDropAcceleration()[seg];
|
well_state.segPressDropAcceleration()[seg];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1158,7 +1158,7 @@ WellState::reportSegmentResults(const PhaseUsage& pu,
|
|||||||
auto& segpress = seg_res.pressures;
|
auto& segpress = seg_res.pressures;
|
||||||
segpress[Value::Pressure] = this->segPress(well_id)[seg_ix];
|
segpress[Value::Pressure] = this->segPress(well_id)[seg_ix];
|
||||||
segpress[Value::PDrop] = this->segPressDrop(well_id)[seg_ix];
|
segpress[Value::PDrop] = this->segPressDrop(well_id)[seg_ix];
|
||||||
segpress[Value::PDropHydrostatic] = this->segPressDropHydroStatic()[seg_dof];
|
segpress[Value::PDropHydrostatic] = this->segPressDropHydroStatic(well_id)[seg_ix];
|
||||||
segpress[Value::PDropFriction] = this->segPressDropFriction(well_id)[seg_ix];
|
segpress[Value::PDropFriction] = this->segPressDropFriction(well_id)[seg_ix];
|
||||||
segpress[Value::PDropAccel] = this->segPressDropAcceleration()[seg_dof];
|
segpress[Value::PDropAccel] = this->segPressDropAcceleration()[seg_dof];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,14 +241,16 @@ public:
|
|||||||
return &seg_pressdrop_friction_[top_segment_index];
|
return &seg_pressdrop_friction_[top_segment_index];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double>& segPressDropHydroStatic()
|
double* segPressDropHydroStatic(std::size_t well_index)
|
||||||
{
|
{
|
||||||
return seg_pressdrop_hydorstatic_;
|
const int top_segment_index = this->top_segment_index_[well_index];
|
||||||
|
return &seg_pressdrop_hydorstatic_[top_segment_index];
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<double>& segPressDropHydroStatic() const
|
const double* segPressDropHydroStatic(std::size_t well_index) const
|
||||||
{
|
{
|
||||||
return seg_pressdrop_hydorstatic_;
|
const int top_segment_index = this->top_segment_index_[well_index];
|
||||||
|
return &seg_pressdrop_hydorstatic_[top_segment_index];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double>& segPressDropAcceleration()
|
std::vector<double>& segPressDropAcceleration()
|
||||||
|
|||||||
Reference in New Issue
Block a user