make WellProductionProperties constructible from variables
also make it default constructible and add an accessor
This commit is contained in:
@@ -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<int>(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 );
|
||||
|
||||
@@ -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<UDAValue>(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
|
||||
|
||||
Reference in New Issue
Block a user