Add support for WTHPH+WBHPH keywords
This commit is contained in:
parent
adb017aec4
commit
ff193322e4
@ -32,6 +32,8 @@ namespace Opm {
|
|||||||
double temperature;
|
double temperature;
|
||||||
double BHPLimit;
|
double BHPLimit;
|
||||||
double THPLimit;
|
double THPLimit;
|
||||||
|
double BHPH;
|
||||||
|
double THPH;
|
||||||
int VFPTableNumber;
|
int VFPTableNumber;
|
||||||
bool predictionMode;
|
bool predictionMode;
|
||||||
int injectionControls;
|
int injectionControls;
|
||||||
|
@ -39,6 +39,8 @@ namespace Opm {
|
|||||||
double ResVRate = 0.0;
|
double ResVRate = 0.0;
|
||||||
double BHPLimit = 0.0;
|
double BHPLimit = 0.0;
|
||||||
double THPLimit = 0.0;
|
double THPLimit = 0.0;
|
||||||
|
double BHPH = 0.0;
|
||||||
|
double THPH = 0.0;
|
||||||
int VFPTableNumber = 0;
|
int VFPTableNumber = 0;
|
||||||
double ALQValue = 0.0;
|
double ALQValue = 0.0;
|
||||||
bool predictionMode = false;
|
bool predictionMode = false;
|
||||||
|
@ -763,6 +763,11 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
properties.predictionMode = false;
|
properties.predictionMode = false;
|
||||||
|
|
||||||
|
if ( record.getItem( "BHP" ).hasValue(0) )
|
||||||
|
properties.BHPH = record.getItem("BHP").getSIDouble(0);
|
||||||
|
if ( record.getItem( "THP" ).hasValue(0) )
|
||||||
|
properties.THPH = record.getItem("THP").getSIDouble(0);
|
||||||
|
|
||||||
if (well.setInjectionProperties(currentStep, properties))
|
if (well.setInjectionProperties(currentStep, properties))
|
||||||
m_events.addEvent( ScheduleEvents::INJECTION_UPDATE , currentStep );
|
m_events.addEvent( ScheduleEvents::INJECTION_UPDATE , currentStep );
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ namespace Opm {
|
|||||||
+ ParserKeywords::STCOND::TEMPERATURE::defaultValue;
|
+ ParserKeywords::STCOND::TEMPERATURE::defaultValue;
|
||||||
BHPLimit=0.0;
|
BHPLimit=0.0;
|
||||||
THPLimit=0.0;
|
THPLimit=0.0;
|
||||||
|
BHPH=0.0;
|
||||||
|
THPH=0.0;
|
||||||
VFPTableNumber=0;
|
VFPTableNumber=0;
|
||||||
predictionMode=true;
|
predictionMode=true;
|
||||||
injectionControls=0;
|
injectionControls=0;
|
||||||
@ -48,6 +50,8 @@ namespace Opm {
|
|||||||
(temperature == other.temperature) &&
|
(temperature == other.temperature) &&
|
||||||
(BHPLimit == other.BHPLimit) &&
|
(BHPLimit == other.BHPLimit) &&
|
||||||
(THPLimit == other.THPLimit) &&
|
(THPLimit == other.THPLimit) &&
|
||||||
|
(BHPH == other.BHPH) &&
|
||||||
|
(THPH == other.THPH) &&
|
||||||
(VFPTableNumber == other.VFPTableNumber) &&
|
(VFPTableNumber == other.VFPTableNumber) &&
|
||||||
(predictionMode == other.predictionMode) &&
|
(predictionMode == other.predictionMode) &&
|
||||||
(injectionControls == other.injectionControls) &&
|
(injectionControls == other.injectionControls) &&
|
||||||
@ -71,6 +75,8 @@ namespace Opm {
|
|||||||
<< "temperature: " << wp.temperature << ", "
|
<< "temperature: " << wp.temperature << ", "
|
||||||
<< "BHP limit: " << wp.BHPLimit << ", "
|
<< "BHP limit: " << wp.BHPLimit << ", "
|
||||||
<< "THP limit: " << wp.THPLimit << ", "
|
<< "THP limit: " << wp.THPLimit << ", "
|
||||||
|
<< "BHPH: " << wp.BHPH << ", "
|
||||||
|
<< "THPH: " << wp.THPH << ", "
|
||||||
<< "VFP table: " << wp.VFPTableNumber << ", "
|
<< "VFP table: " << wp.VFPTableNumber << ", "
|
||||||
<< "prediction mode: " << wp.predictionMode << ", "
|
<< "prediction mode: " << wp.predictionMode << ", "
|
||||||
<< "injection ctrl: " << wp.injectionControls << ", "
|
<< "injection ctrl: " << wp.injectionControls << ", "
|
||||||
|
@ -86,6 +86,11 @@ namespace Opm {
|
|||||||
throw std::invalid_argument("Setting CMODE to unspecified control");
|
throw std::invalid_argument("Setting CMODE to unspecified control");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( record.getItem( "BHP" ).hasValue(0) )
|
||||||
|
p.BHPH = record.getItem("BHP").getSIDouble(0);
|
||||||
|
if ( record.getItem( "THP" ).hasValue(0) )
|
||||||
|
p.THPH = record.getItem("THP").getSIDouble(0);
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,6 +151,8 @@ namespace Opm {
|
|||||||
&& ResVRate == other.ResVRate
|
&& ResVRate == other.ResVRate
|
||||||
&& BHPLimit == other.BHPLimit
|
&& BHPLimit == other.BHPLimit
|
||||||
&& THPLimit == other.THPLimit
|
&& THPLimit == other.THPLimit
|
||||||
|
&& BHPH == other.BHPH
|
||||||
|
&& THPH == other.THPH
|
||||||
&& VFPTableNumber == other.VFPTableNumber
|
&& VFPTableNumber == other.VFPTableNumber
|
||||||
&& controlMode == other.controlMode
|
&& controlMode == other.controlMode
|
||||||
&& m_productionControls == other.m_productionControls
|
&& m_productionControls == other.m_productionControls
|
||||||
@ -168,6 +175,8 @@ namespace Opm {
|
|||||||
<< "ResV rate: " << wp.ResVRate << ", "
|
<< "ResV rate: " << wp.ResVRate << ", "
|
||||||
<< "BHP limit: " << wp.BHPLimit << ", "
|
<< "BHP limit: " << wp.BHPLimit << ", "
|
||||||
<< "THP limit: " << wp.THPLimit << ", "
|
<< "THP limit: " << wp.THPLimit << ", "
|
||||||
|
<< "BHPH: " << wp.BHPH << ", "
|
||||||
|
<< "THPH: " << wp.THPH << ", "
|
||||||
<< "VFP table: " << wp.VFPTableNumber << ", "
|
<< "VFP table: " << wp.VFPTableNumber << ", "
|
||||||
<< "ALQ: " << wp.ALQValue << ", "
|
<< "ALQ: " << wp.ALQValue << ", "
|
||||||
<< "prediction: " << wp.predictionMode << " }";
|
<< "prediction: " << wp.predictionMode << " }";
|
||||||
|
@ -2178,3 +2178,47 @@ BOOST_AUTO_TEST_CASE(handleWEFAC) {
|
|||||||
BOOST_CHECK_EQUAL(well_i->getEfficiencyFactor(3), 0.9);
|
BOOST_CHECK_EQUAL(well_i->getEfficiencyFactor(3), 0.9);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(historic_BHP_and_THP) {
|
||||||
|
Opm::Parser parser;
|
||||||
|
std::string input =
|
||||||
|
"START -- 0 \n"
|
||||||
|
"19 JUN 2007 / \n"
|
||||||
|
"SCHEDULE\n"
|
||||||
|
"DATES -- 1\n"
|
||||||
|
" 10 OKT 2008 / \n"
|
||||||
|
"/\n"
|
||||||
|
"WELSPECS\n"
|
||||||
|
" 'P' 'OP' 9 9 1* 'OIL' 1* / \n"
|
||||||
|
" 'P1' 'OP' 9 9 1* 'OIL' 1* / \n"
|
||||||
|
" 'I' 'OP' 9 9 1* 'WATER' 1* / \n"
|
||||||
|
"/\n"
|
||||||
|
"WCONHIST\n"
|
||||||
|
" P SHUT ORAT 6 500 0 0 0 1.2 1.1 / \n"
|
||||||
|
"/\n"
|
||||||
|
"WCONPROD\n"
|
||||||
|
" P1 SHUT ORAT 6 500 0 0 0 3.2 3.1 / \n"
|
||||||
|
"/\n"
|
||||||
|
"WCONINJH\n"
|
||||||
|
" I WATER STOP 100 2.1 2.2 / \n"
|
||||||
|
"/\n"
|
||||||
|
;
|
||||||
|
|
||||||
|
ParseContext parseContext;
|
||||||
|
auto deck = parser.parseString(input, parseContext);
|
||||||
|
EclipseGrid grid(10,10,10);
|
||||||
|
TableManager table ( deck );
|
||||||
|
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
Schedule schedule( deck, grid, eclipseProperties, Phases( true, true, true ) ,parseContext);
|
||||||
|
|
||||||
|
const auto& prod = schedule.getWell("P")->getProductionProperties(1);
|
||||||
|
const auto& pro1 = schedule.getWell("P1")->getProductionProperties(1);
|
||||||
|
const auto& inje = schedule.getWell("I")->getInjectionProperties(1);
|
||||||
|
|
||||||
|
BOOST_CHECK_CLOSE( 1.1 * 1e5, prod.BHPH, 1e-5 );
|
||||||
|
BOOST_CHECK_CLOSE( 1.2 * 1e5, prod.THPH, 1e-5 );
|
||||||
|
BOOST_CHECK_CLOSE( 2.1 * 1e5, inje.BHPH, 1e-5 );
|
||||||
|
BOOST_CHECK_CLOSE( 2.2 * 1e5, inje.THPH, 1e-5 );
|
||||||
|
BOOST_CHECK_CLOSE( 0.0 * 1e5, pro1.BHPH, 1e-5 );
|
||||||
|
BOOST_CHECK_CLOSE( 0.0 * 1e5, pro1.THPH, 1e-5 );
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user