22#ifndef OPM_MULTISEGMENTWELL_GENERIC_HEADER_INCLUDED
23#define OPM_MULTISEGMENTWELL_GENERIC_HEADER_INCLUDED
25#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
37class WellInterfaceGeneric;
40template <
typename Scalar>
47 void scaleSegmentRatesWithWellRates(
WellState& well_state)
const;
48 void scaleSegmentPressuresWithBhp(
WellState& well_state)
const;
51 const WellSegments& segmentSet()
const;
54 WellSegments::CompPressureDrop compPressureDrop()
const;
58 int segmentNumberToIndex(
const int segment_number)
const;
63 double calculateThpFromBhp(
const std::vector<double>& rates,
68 std::optional<double> computeBhpAtThpLimitInj(
const std::function<std::vector<double>(
const double)>& frates,
69 const SummaryState& summary_state,
73 std::optional<double> computeBhpAtThpLimitProdWithAlq(
74 const std::function<std::vector<double>(
const double)>& frates,
75 const SummaryState& summary_state,
76 const double maxPerfPress,
79 double alq_value)
const;
81 std::optional<double> bhpMax(
const std::function<
double(
const double)>& fflo,
82 const double bhp_limit,
83 const double maxPerfPress,
84 const double vfp_flo_front,
87 bool bruteForceBracket(
const std::function<
double(
const double)>& eq,
88 const std::array<double, 2>& range,
89 double& low,
double& high,
92 bool bisectBracket(
const std::function<
double(
const double)>& eq,
93 const std::array<double, 2>& range,
94 double& low,
double& high,
95 std::optional<double>& approximate_solution,
102 bool& stagnate)
const;
104 bool accelerationalPressureLossConsidered()
const;
105 bool frictionalPressureLossConsidered()
const;
118 std::vector<std::vector<int>> segment_perforations_;
121 std::vector<std::vector<int>> segment_inlets_;
123 std::vector<double> segment_depth_diffs_;
128 std::vector<double> perforation_segment_depth_diffs_;
Definition: DeferredLogger.hpp:57
Definition: MultisegmentWellGeneric.hpp:42
int numberOfSegments() const
number of segments for this well
Definition: MultisegmentWellGeneric.cpp:159
void detectOscillations(const std::vector< double > &measure_history, const int it, bool &oscillate, bool &stagnate) const
Detect oscillation or stagnation based on the residual measure history.
Definition: MultisegmentWellGeneric.cpp:225
Definition: WellInterfaceGeneric.hpp:51
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition: WellState.hpp:56
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27