mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use segmentstate for hydrostatic pressure drop
This commit is contained in:
parent
9801469488
commit
33f18279d7
@ -1923,8 +1923,8 @@ namespace Opm
|
||||
// TODO: we might be able to add member variables to store these values, then we update well state
|
||||
// after converged
|
||||
const auto hydro_pressure_drop = getHydroPressureLoss(seg);
|
||||
well_state.segPressDropHydroStatic(index_of_well_)[seg] = hydro_pressure_drop.value();
|
||||
auto& segments = well_state.segments(this->index_of_well_);
|
||||
segments.pressure_drop_hydrostatic[seg] = hydro_pressure_drop.value();
|
||||
pressure_equation -= hydro_pressure_drop;
|
||||
|
||||
if (frictionalPressureLossConsidered()) {
|
||||
|
@ -535,7 +535,6 @@ void WellState::init(const std::vector<double>& cellPressures,
|
||||
}
|
||||
//seg_rates_ = wellRates();
|
||||
seg_rates_.assign(nw*np, 0);
|
||||
seg_pressdrop_hydorstatic_.assign(nw, 0.);
|
||||
seg_pressdrop_acceleration_.assign(nw, 0.);
|
||||
}
|
||||
|
||||
@ -941,7 +940,6 @@ void WellState::initWellStateMSWell(const std::vector<Well>& wells_ecl,
|
||||
assert(int(seg_press_.size()) == nseg_);
|
||||
assert(int(seg_rates_.size()) == nseg_ * numPhases() );
|
||||
|
||||
seg_pressdrop_hydorstatic_.assign(nseg_, 0.);
|
||||
seg_pressdrop_acceleration_.assign(nseg_, 0.);
|
||||
|
||||
if (prev_well_state && !prev_well_state->wellMap().empty()) {
|
||||
@ -1157,8 +1155,8 @@ WellState::reportSegmentResults(const PhaseUsage& pu,
|
||||
auto& segpress = seg_res.pressures;
|
||||
segpress[Value::Pressure] = this->segPress(well_id)[seg_ix];
|
||||
segpress[Value::PDrop] = this->segPressDrop(well_id, seg_ix);
|
||||
segpress[Value::PDropHydrostatic] = this->segPressDropHydroStatic(well_id)[seg_ix];
|
||||
segpress[Value::PDropAccel] = this->segPressDropAcceleration(well_id)[seg_ix];
|
||||
segpress[Value::PDropHydrostatic] = segments.pressure_drop_hydrostatic[seg_ix];
|
||||
segpress[Value::PDropFriction] = segments.pressure_drop_friction[seg_ix];
|
||||
}
|
||||
|
||||
|
@ -225,22 +225,10 @@ public:
|
||||
const auto& segments = this->segments(well_index);
|
||||
const int top_segment_index = this->top_segment_index_[well_index];
|
||||
return segments.pressure_drop_friction[segment_index] +
|
||||
this->seg_pressdrop_hydorstatic_[top_segment_index + segment_index] +
|
||||
segments.pressure_drop_hydrostatic[segment_index] +
|
||||
this->seg_pressdrop_acceleration_[top_segment_index + segment_index];
|
||||
}
|
||||
|
||||
double* segPressDropHydroStatic(std::size_t well_index)
|
||||
{
|
||||
const int top_segment_index = this->top_segment_index_[well_index];
|
||||
return &seg_pressdrop_hydorstatic_[top_segment_index];
|
||||
}
|
||||
|
||||
const double* segPressDropHydroStatic(std::size_t well_index) const
|
||||
{
|
||||
const int top_segment_index = this->top_segment_index_[well_index];
|
||||
return &seg_pressdrop_hydorstatic_[top_segment_index];
|
||||
}
|
||||
|
||||
double * segPressDropAcceleration(std::size_t well_index)
|
||||
{
|
||||
const int top_segment_index = this->top_segment_index_[well_index];
|
||||
@ -534,8 +522,6 @@ private:
|
||||
int nseg_; // total number of the segments
|
||||
|
||||
// The following data are only recorded for output
|
||||
// hydrostatic pressure drop
|
||||
std::vector<double> seg_pressdrop_hydorstatic_;
|
||||
// accelerational pressure drop
|
||||
std::vector<double> seg_pressdrop_acceleration_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user