Add name to WellProductionPropertis
This commit is contained in:
parent
f8aa13f6e8
commit
96b7797c4e
@ -107,10 +107,10 @@ Well2::Well2(const std::string& wname,
|
||||
polymer_properties(std::make_shared<WellPolymerProperties>()),
|
||||
tracer_properties(std::make_shared<WellTracerProperties>()),
|
||||
connections(std::make_shared<WellConnections>(headI, headJ)),
|
||||
production(std::make_shared<WellProductionProperties>()),
|
||||
production(std::make_shared<WellProductionProperties>(wname)),
|
||||
injection(std::make_shared<WellInjectionProperties>())
|
||||
{
|
||||
auto p = std::make_shared<WellProductionProperties>();
|
||||
auto p = std::make_shared<WellProductionProperties>(wname);
|
||||
p->whistctl_cmode = whistctl_cmode;
|
||||
this->updateProduction(p);
|
||||
}
|
||||
|
@ -31,8 +31,9 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
WellProductionProperties::
|
||||
WellProductionProperties() : predictionMode( true )
|
||||
WellProductionProperties::WellProductionProperties(const std::string& name_arg) :
|
||||
name(name_arg),
|
||||
predictionMode( true )
|
||||
{}
|
||||
|
||||
|
||||
|
@ -36,6 +36,7 @@ namespace Opm {
|
||||
public:
|
||||
// the rates serve as limits under prediction mode
|
||||
// while they are observed rates under historical mode
|
||||
std::string name;
|
||||
double OilRate = 0.0;
|
||||
double WaterRate = 0.0;
|
||||
double GasRate = 0.0;
|
||||
@ -55,7 +56,7 @@ namespace Opm {
|
||||
|
||||
bool operator==(const WellProductionProperties& other) const;
|
||||
bool operator!=(const WellProductionProperties& other) const;
|
||||
WellProductionProperties();
|
||||
WellProductionProperties(const std::string& name_arg);
|
||||
|
||||
bool hasProductionControl(WellProducer::ControlModeEnum controlModeArg) const {
|
||||
return (m_productionControls & controlModeArg) != 0;
|
||||
|
@ -488,7 +488,7 @@ namespace {
|
||||
|
||||
auto deck = parser.parseString(input);
|
||||
const auto& record = deck.getKeyword("WCONHIST").getRecord(0);
|
||||
Opm::WellProductionProperties hist;
|
||||
Opm::WellProductionProperties hist("W");
|
||||
hist.handleWCONHIST(record);
|
||||
|
||||
|
||||
@ -542,7 +542,7 @@ namespace {
|
||||
auto deck = parser.parseString(input);
|
||||
const auto& kwd = deck.getKeyword("WCONPROD");
|
||||
const auto& record = kwd.getRecord(0);
|
||||
Opm::WellProductionProperties pred;
|
||||
Opm::WellProductionProperties pred("W");
|
||||
pred.handleWCONPROD(record);
|
||||
|
||||
return pred;
|
||||
@ -744,8 +744,8 @@ BOOST_AUTO_TEST_CASE(BHP_CMODE)
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CMODE_DEFAULT) {
|
||||
const Opm::WellProductionProperties Pproperties;
|
||||
const Opm::WellInjectionProperties Iproperties;
|
||||
const Opm::WellProductionProperties Pproperties("W");
|
||||
|
||||
BOOST_CHECK_EQUAL( Pproperties.controlMode , Opm::WellProducer::CMODE_UNDEFINED );
|
||||
BOOST_CHECK_EQUAL( Iproperties.controlMode , Opm::WellInjector::CMODE_UNDEFINED );
|
||||
|
Loading…
Reference in New Issue
Block a user