diff --git a/opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp b/opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp index 21e341985..4a23c8668 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp @@ -310,7 +310,25 @@ public: bool operator==(const WellProductionProperties& other) const; bool operator!=(const WellProductionProperties& other) const; + + WellProductionProperties(); WellProductionProperties(const std::string& name_arg); + WellProductionProperties(const std::string& wname, + const UDAValue& oilRate, + const UDAValue& waterRate, + const UDAValue& gasRate, + const UDAValue& liquidRate, + const UDAValue& resvRate, + const UDAValue& BHP, + const UDAValue& THP, + double bhph, + double thph, + int vfpTableNum, + double alqValue, + bool predMode, + ProducerCMode ctrlMode, + ProducerCMode whistctlMode, + int prodCtrls); bool hasProductionControl(ProducerCMode controlModeArg) const { return (m_productionControls & static_cast(controlModeArg)) != 0; @@ -335,6 +353,9 @@ public: void clearControls(); ProductionControls controls(const SummaryState& st, double udq_default) const; bool updateUDQActive(const UDQConfig& udq_config, UDQActive& active) const; + + int getNumProductionControls() const; + private: int m_productionControls = 0; void init_rates( const DeckRecord& record ); diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp index f9280aa8c..78dfce441 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp @@ -33,11 +33,57 @@ namespace Opm { + Well::WellProductionProperties::WellProductionProperties() + : BHPH(0.0), THPH(0.0), VFPTableNumber(0), + ALQValue(0.0), predictionMode(false), + controlMode(ProducerCMode::NONE), + whistctl_cmode(ProducerCMode::NONE), + m_productionControls(0) + {} + Well::WellProductionProperties::WellProductionProperties(const std::string& name_arg) : name(name_arg), predictionMode( true ) {} + Well::WellProductionProperties::WellProductionProperties(const std::string& wname, + const UDAValue& oilRate, + const UDAValue& waterRate, + const UDAValue& gasRate, + const UDAValue& liquidRate, + const UDAValue& resvRate, + const UDAValue& BHP, + const UDAValue& THP, + double bhph, + double thph, + int vfpTableNum, + double alqValue, + bool predMode, + ProducerCMode ctrlMode, + ProducerCMode whistctlMode, + int prodCtrls) + : name(wname), + OilRate(oilRate), + WaterRate(waterRate), + GasRate(gasRate), + LiquidRate(liquidRate), + ResVRate(resvRate), + BHPLimit(BHP), + THPLimit(THP), + BHPH(bhph), + THPH(thph), + VFPTableNumber(vfpTableNum), + ALQValue(alqValue), + predictionMode(predMode), + controlMode(ctrlMode), + whistctl_cmode(whistctlMode), + m_productionControls(prodCtrls) + { + } + + + + void Well::WellProductionProperties::init_rates( const DeckRecord& record ) { this->OilRate = record.getItem("ORAT").get(0); @@ -308,5 +354,8 @@ bool Well::WellProductionProperties::effectiveHistoryProductionControl(const Wel return (update_count > 0); } + int Well::WellProductionProperties::getNumProductionControls() const { + return m_productionControls; + } } // namespace Opm