mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-26 01:01:00 -06:00
GasLiftStage2: use GasLiftSingleWellGeneric
This commit is contained in:
parent
8f14e51c9e
commit
775177d73a
@ -106,7 +106,7 @@ namespace Opm {
|
||||
using SparseMatrixAdapter = GetPropType<TypeTag, Properties::SparseMatrixAdapter>;
|
||||
|
||||
typedef typename BaseAuxiliaryModule<TypeTag>::NeighborSet NeighborSet;
|
||||
using GasLiftSingleWell = ::Opm::GasLiftSingleWell<TypeTag>;
|
||||
using GasLiftSingleWell = GasLiftSingleWellGeneric;
|
||||
using GasLiftStage2 = ::Opm::GasLiftStage2<TypeTag>;
|
||||
using GLiftWellStateMap =
|
||||
std::map<std::string,std::unique_ptr<GasLiftWellState>>;
|
||||
|
@ -49,7 +49,7 @@ namespace Opm
|
||||
DeferredLogger &deferred_logger,
|
||||
WellState &well_state
|
||||
);
|
||||
const WellInterface<TypeTag> &getStdWell() const { return std_well_; }
|
||||
const WellInterfaceGeneric &getStdWell() const override { return std_well_; }
|
||||
|
||||
private:
|
||||
std::optional<double> computeBhpAtThpLimit_(double alq) const override;
|
||||
|
@ -39,6 +39,7 @@ class DeferredLogger;
|
||||
class GasLiftWellState;
|
||||
class Schedule;
|
||||
class SummaryState;
|
||||
class WellInterfaceGeneric;
|
||||
class WellState;
|
||||
|
||||
class GasLiftSingleWellGeneric
|
||||
@ -82,6 +83,8 @@ public:
|
||||
|
||||
std::unique_ptr<GasLiftWellState> runOptimize(const int iteration_idx);
|
||||
|
||||
virtual const WellInterfaceGeneric& getStdWell() const = 0;
|
||||
|
||||
protected:
|
||||
GasLiftSingleWellGeneric(DeferredLogger &deferred_logger,
|
||||
WellState &well_state,
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/GasLiftOpt.hpp>
|
||||
#include <opm/simulators/wells/WellInterfaceGeneric.hpp>
|
||||
#include <opm/simulators/wells/StandardWell.hpp>
|
||||
#include <opm/simulators/wells/GasLiftSingleWell.hpp>
|
||||
#include <opm/simulators/wells/GasLiftSingleWellGeneric.hpp>
|
||||
#include <opm/simulators/wells/GasLiftWellState.hpp>
|
||||
#include <opm/simulators/utils/DeferredLogger.hpp>
|
||||
#include <opm/simulators/wells/WellState.hpp>
|
||||
@ -52,13 +52,13 @@ namespace Opm
|
||||
{
|
||||
template<class TypeTag>
|
||||
class GasLiftStage2 {
|
||||
using GasLiftSingleWell = ::Opm::GasLiftSingleWell<TypeTag>;
|
||||
using GasLiftSingleWell = GasLiftSingleWellGeneric;
|
||||
using GLiftOptWells = std::map<std::string,std::unique_ptr<GasLiftSingleWell>>;
|
||||
using GLiftProdWells = std::map<std::string,const WellInterfaceGeneric*>;
|
||||
using GLiftWellStateMap = std::map<std::string,std::unique_ptr<GasLiftWellState>>;
|
||||
using GradPair = std::pair<std::string, double>;
|
||||
using GradPairItr = std::vector<GradPair>::iterator;
|
||||
using GradInfo = typename GasLiftSingleWell::GradInfo;
|
||||
using GradInfo = typename GasLiftSingleWellGeneric::GradInfo;
|
||||
using GradMap = std::map<std::string, GradInfo>;
|
||||
using MPIComm = typename Dune::MPIHelper::MPICommunicator;
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
@ -217,7 +217,6 @@ namespace Opm
|
||||
bool checkGasTarget();
|
||||
bool checkOilTarget();
|
||||
void updateRates(const std::string &name);
|
||||
private:
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -350,7 +350,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 WellInterface<TypeTag> &well = gs_well.getStdWell();
|
||||
const WellInterfaceGeneric &well = gs_well.getStdWell();
|
||||
well_ptr = &well;
|
||||
GasLiftWellState &state = *(this->well_state_map_.at(well_name).get());
|
||||
std::tie(oil_rate, gas_rate) = state.getRates();
|
||||
@ -435,7 +435,7 @@ getStdWellRates_(const WellInterfaceGeneric &well)
|
||||
// groups are located at the other nodes (not leaf nodes) of the tree
|
||||
//
|
||||
template<typename TypeTag>
|
||||
std::vector<GasLiftSingleWell<TypeTag> *>
|
||||
std::vector<GasLiftSingleWellGeneric*>
|
||||
GasLiftStage2<TypeTag>::
|
||||
getGroupGliftWells_(const Group &group)
|
||||
{
|
||||
@ -1135,7 +1135,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 WellInterface<TypeTag> &well = gs_well.getStdWell();
|
||||
const WellInterfaceGeneric &well = gs_well.getStdWell();
|
||||
// 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();
|
||||
|
Loading…
Reference in New Issue
Block a user