mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Rename some methods and variables.
Renames some methods and variables to reflect that the well is no longer necessarily a StandardWell. It can be either a MultisegmentWell or a StandardWell. This should avoid confusion about the nature of the variable.
This commit is contained in:
parent
54160827de
commit
c7aa43a82b
@ -42,7 +42,7 @@ namespace Opm
|
||||
|
||||
public:
|
||||
GasLiftSingleWell(
|
||||
const WellInterface<TypeTag> &std_well,
|
||||
const WellInterface<TypeTag> &well,
|
||||
const Simulator &ebos_simulator,
|
||||
const SummaryState &summary_state,
|
||||
DeferredLogger &deferred_logger,
|
||||
@ -52,7 +52,7 @@ namespace Opm
|
||||
GLiftSyncGroups &sync_groups,
|
||||
bool glift_debug
|
||||
);
|
||||
const WellInterfaceGeneric &getStdWell() const override { return std_well_; }
|
||||
const WellInterfaceGeneric &getWell() const override { return well_; }
|
||||
|
||||
private:
|
||||
std::optional<double> computeBhpAtThpLimit_(double alq) const override;
|
||||
@ -61,7 +61,7 @@ namespace Opm
|
||||
void setAlqMaxRate_(const GasLiftOpt::Well& well);
|
||||
|
||||
const Simulator &ebos_simulator_;
|
||||
const WellInterface<TypeTag> &std_well_;
|
||||
const WellInterface<TypeTag> &well_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
|
||||
std::unique_ptr<GasLiftWellState> runOptimize(const int iteration_idx);
|
||||
|
||||
virtual const WellInterfaceGeneric& getStdWell() const = 0;
|
||||
virtual const WellInterfaceGeneric& getWell() const = 0;
|
||||
|
||||
protected:
|
||||
GasLiftSingleWellGeneric(
|
||||
|
@ -21,7 +21,7 @@ namespace Opm {
|
||||
|
||||
template<typename TypeTag>
|
||||
GasLiftSingleWell<TypeTag>::
|
||||
GasLiftSingleWell(const WellInterface<TypeTag> &std_well,
|
||||
GasLiftSingleWell(const WellInterface<TypeTag> &well,
|
||||
const Simulator &ebos_simulator,
|
||||
const SummaryState &summary_state,
|
||||
DeferredLogger &deferred_logger,
|
||||
@ -37,17 +37,17 @@ GasLiftSingleWell(const WellInterface<TypeTag> &std_well,
|
||||
deferred_logger,
|
||||
well_state,
|
||||
group_state,
|
||||
std_well.wellEcl(),
|
||||
well.wellEcl(),
|
||||
summary_state,
|
||||
group_info,
|
||||
std_well.phaseUsage(),
|
||||
well.phaseUsage(),
|
||||
ebos_simulator.vanguard().schedule(),
|
||||
ebos_simulator.episodeIndex(),
|
||||
sync_groups,
|
||||
glift_debug
|
||||
)
|
||||
, ebos_simulator_{ebos_simulator}
|
||||
, std_well_{std_well}
|
||||
, well_{well}
|
||||
{
|
||||
const auto& gl_well = *gl_well_;
|
||||
if(useFixedAlq_(gl_well)) {
|
||||
@ -59,7 +59,7 @@ GasLiftSingleWell(const WellInterface<TypeTag> &std_well,
|
||||
this->optimize_ = true;
|
||||
}
|
||||
|
||||
const auto& pu = std_well_.phaseUsage();
|
||||
const auto& pu = well_.phaseUsage();
|
||||
this->oil_pos_ = pu.phase_pos[Oil];
|
||||
this->gas_pos_ = pu.phase_pos[Gas];
|
||||
this->water_pos_ = pu.phase_pos[Water];
|
||||
@ -103,7 +103,7 @@ GasLiftSingleWell<TypeTag>::
|
||||
computeWellRates_( double bhp, bool bhp_is_limited, bool debug_output ) const
|
||||
{
|
||||
std::vector<double> potentials(this->num_phases_, 0.0);
|
||||
this->std_well_.computeWellRatesWithBhp(
|
||||
this->well_.computeWellRatesWithBhp(
|
||||
this->ebos_simulator_, bhp, potentials, this->deferred_logger_);
|
||||
if (debug_output) {
|
||||
const std::string msg = fmt::format("computed well potentials given bhp {}, "
|
||||
@ -128,7 +128,7 @@ std::optional<double>
|
||||
GasLiftSingleWell<TypeTag>::
|
||||
computeBhpAtThpLimit_(double alq) const
|
||||
{
|
||||
auto bhp_at_thp_limit = this->std_well_.computeBhpAtThpLimitProdWithAlq(
|
||||
auto bhp_at_thp_limit = this->well_.computeBhpAtThpLimitProdWithAlq(
|
||||
this->ebos_simulator_,
|
||||
this->summary_state_,
|
||||
this->deferred_logger_,
|
||||
@ -167,7 +167,7 @@ setAlqMaxRate_(const GasLiftOpt::Well &well)
|
||||
// According to the manual for WLIFTOPT, item 3:
|
||||
// The default value should be set to the largest ALQ
|
||||
// value in the well's VFP table
|
||||
const auto& table = std_well_.vfpProperties()->getProd()->getTable(
|
||||
const auto& table = well_.vfpProperties()->getProd()->getTable(
|
||||
this->controls_.vfp_table_number);
|
||||
const auto& alq_values = table.getALQAxis();
|
||||
// Assume the alq_values are sorted in ascending order, so
|
||||
|
@ -349,7 +349,7 @@ getCurrentWellRates_(const std::string &well_name, const std::string &group_name
|
||||
std::string debug_info;
|
||||
if (this->stage1_wells_.count(well_name) == 1) {
|
||||
GasLiftSingleWell &gs_well = *(this->stage1_wells_.at(well_name).get());
|
||||
const WellInterfaceGeneric &well = gs_well.getStdWell();
|
||||
const WellInterfaceGeneric &well = gs_well.getWell();
|
||||
well_ptr = &well;
|
||||
GasLiftWellState &state = *(this->well_state_map_.at(well_name).get());
|
||||
std::tie(oil_rate, gas_rate) = state.getRates();
|
||||
@ -358,7 +358,7 @@ getCurrentWellRates_(const std::string &well_name, const std::string &group_name
|
||||
}
|
||||
else if (this->prod_wells_.count(well_name) == 1) {
|
||||
well_ptr = this->prod_wells_.at(well_name);
|
||||
std::tie(oil_rate, gas_rate) = getStdWellRates_(*well_ptr);
|
||||
std::tie(oil_rate, gas_rate) = getWellRates_(*well_ptr);
|
||||
success = true;
|
||||
if ( this->debug) debug_info = "(B)";
|
||||
}
|
||||
@ -413,7 +413,7 @@ getCurrentWellRates_(const std::string &well_name, const std::string &group_name
|
||||
|
||||
std::pair<double, double>
|
||||
GasLiftStage2::
|
||||
getStdWellRates_(const WellInterfaceGeneric &well)
|
||||
getWellRates_(const WellInterfaceGeneric &well)
|
||||
{
|
||||
const int well_index = well.indexOfWell();
|
||||
const auto& ws = this->well_state_.well(well_index);
|
||||
@ -890,7 +890,7 @@ checkAtLeastTwoWells(std::vector<GasLiftSingleWell *> &wells)
|
||||
{
|
||||
int numberOfwells = 0;
|
||||
for (auto well : wells){
|
||||
int index_of_wells = well->getStdWell().indexOfWell();
|
||||
int index_of_wells = well->getWell().indexOfWell();
|
||||
if (!this->parent.well_state_.wellIsOwned(index_of_wells, well->name()))
|
||||
continue;
|
||||
numberOfwells++;
|
||||
@ -1107,7 +1107,7 @@ updateRates(const std::string &well_name)
|
||||
const GradInfo &gi = this->parent.dec_grads_.at(well_name);
|
||||
GasLiftWellState &state = *(this->parent.well_state_map_.at(well_name).get());
|
||||
GasLiftSingleWell &gs_well = *(this->parent.stage1_wells_.at(well_name).get());
|
||||
const WellInterfaceGeneric &well = gs_well.getStdWell();
|
||||
const WellInterfaceGeneric &well = gs_well.getWell();
|
||||
// only get deltas for wells owned by this rank
|
||||
if (this->parent.well_state_.wellIsOwned(well.indexOfWell(), well_name)) {
|
||||
const auto &well_ecl = well.wellEcl();
|
||||
|
@ -96,7 +96,7 @@ protected:
|
||||
const Group& group);
|
||||
void getGroupGliftWellsRecursive_(
|
||||
const Group& group, std::vector<GasLiftSingleWell *>& wells);
|
||||
std::pair<double, double> getStdWellRates_(const WellInterfaceGeneric& well);
|
||||
std::pair<double, double> getWellRates_(const WellInterfaceGeneric& well);
|
||||
void optimizeGroup_(const Group& group);
|
||||
void optimizeGroupsRecursive_(const Group& group);
|
||||
void recalculateGradientAndUpdateData_(
|
||||
|
Loading…
Reference in New Issue
Block a user