mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
GasLiftStage2: use WellInterfaceGeneric
to lessen typetag dependence
This commit is contained in:
@@ -113,7 +113,7 @@ namespace Opm {
|
|||||||
using GLiftOptWells =
|
using GLiftOptWells =
|
||||||
std::map<std::string,std::unique_ptr<GasLiftSingleWell>>;
|
std::map<std::string,std::unique_ptr<GasLiftSingleWell>>;
|
||||||
using GLiftProdWells =
|
using GLiftProdWells =
|
||||||
std::map<std::string,const WellInterface<TypeTag> *>;
|
std::map<std::string,const WellInterfaceGeneric*>;
|
||||||
|
|
||||||
static const int numEq = Indices::numEq;
|
static const int numEq = Indices::numEq;
|
||||||
static const int solventSaturationIdx = Indices::solventSaturationIdx;
|
static const int solventSaturationIdx = Indices::solventSaturationIdx;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/GasLiftOpt.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/GasLiftOpt.hpp>
|
||||||
|
#include <opm/simulators/wells/WellInterfaceGeneric.hpp>
|
||||||
#include <opm/simulators/wells/StandardWell.hpp>
|
#include <opm/simulators/wells/StandardWell.hpp>
|
||||||
#include <opm/simulators/wells/GasLiftSingleWell.hpp>
|
#include <opm/simulators/wells/GasLiftSingleWell.hpp>
|
||||||
#include <opm/simulators/wells/GasLiftWellState.hpp>
|
#include <opm/simulators/wells/GasLiftWellState.hpp>
|
||||||
@@ -53,7 +54,7 @@ namespace Opm
|
|||||||
class GasLiftStage2 {
|
class GasLiftStage2 {
|
||||||
using GasLiftSingleWell = ::Opm::GasLiftSingleWell<TypeTag>;
|
using GasLiftSingleWell = ::Opm::GasLiftSingleWell<TypeTag>;
|
||||||
using GLiftOptWells = std::map<std::string,std::unique_ptr<GasLiftSingleWell>>;
|
using GLiftOptWells = std::map<std::string,std::unique_ptr<GasLiftSingleWell>>;
|
||||||
using GLiftProdWells = std::map<std::string,const WellInterface<TypeTag> *>;
|
using GLiftProdWells = std::map<std::string,const WellInterfaceGeneric*>;
|
||||||
using GLiftWellStateMap = std::map<std::string,std::unique_ptr<GasLiftWellState>>;
|
using GLiftWellStateMap = std::map<std::string,std::unique_ptr<GasLiftWellState>>;
|
||||||
using GradPair = std::pair<std::string, double>;
|
using GradPair = std::pair<std::string, double>;
|
||||||
using GradPairItr = std::vector<GradPair>::iterator;
|
using GradPairItr = std::vector<GradPair>::iterator;
|
||||||
@@ -106,7 +107,7 @@ namespace Opm
|
|||||||
const Group &group);
|
const Group &group);
|
||||||
void getGroupGliftWellsRecursive_(
|
void getGroupGliftWellsRecursive_(
|
||||||
const Group &group, std::vector<GasLiftSingleWell *> &wells);
|
const Group &group, std::vector<GasLiftSingleWell *> &wells);
|
||||||
std::pair<double, double> getStdWellRates_(const WellInterface<TypeTag> &well);
|
std::pair<double, double> getStdWellRates_(const WellInterfaceGeneric &well);
|
||||||
void optimizeGroup_(const Group &group);
|
void optimizeGroup_(const Group &group);
|
||||||
void optimizeGroupsRecursive_(const Group &group);
|
void optimizeGroupsRecursive_(const Group &group);
|
||||||
void recalculateGradientAndUpdateData_(
|
void recalculateGradientAndUpdateData_(
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ getCurrentWellRates_(const std::string &well_name, const std::string &group_name
|
|||||||
{
|
{
|
||||||
double oil_rate, gas_rate, alq;
|
double oil_rate, gas_rate, alq;
|
||||||
bool success = false;
|
bool success = false;
|
||||||
const WellInterface<TypeTag> *well_ptr = nullptr;
|
const WellInterfaceGeneric *well_ptr = nullptr;
|
||||||
std::string debug_info;
|
std::string debug_info;
|
||||||
if (this->stage1_wells_.count(well_name) == 1) {
|
if (this->stage1_wells_.count(well_name) == 1) {
|
||||||
GasLiftSingleWell &gs_well = *(this->stage1_wells_.at(well_name).get());
|
GasLiftSingleWell &gs_well = *(this->stage1_wells_.at(well_name).get());
|
||||||
@@ -415,7 +415,7 @@ getCurrentWellRates_(const std::string &well_name, const std::string &group_name
|
|||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
std::pair<double, double>
|
std::pair<double, double>
|
||||||
GasLiftStage2<TypeTag>::
|
GasLiftStage2<TypeTag>::
|
||||||
getStdWellRates_(const WellInterface<TypeTag> &well)
|
getStdWellRates_(const WellInterfaceGeneric &well)
|
||||||
{
|
{
|
||||||
const int well_index = well.indexOfWell();
|
const int well_index = well.indexOfWell();
|
||||||
const auto& pu = well.phaseUsage();
|
const auto& pu = well.phaseUsage();
|
||||||
|
|||||||
Reference in New Issue
Block a user