assigning BHP limit for WCONHIST and WCONINJH keywords
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp>
|
||||
#include <opm/parser/eclipse/Units/Dimension.hpp>
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
#include <opm/parser/eclipse/Units/Units.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -986,20 +987,34 @@ namespace Opm {
|
||||
|
||||
properties.injectorType = injectorType;
|
||||
|
||||
const std::string& cmodeString = record.getItem("CMODE").getTrimmedString(0);
|
||||
WellInjector::ControlModeEnum controlMode = WellInjector::ControlModeFromString( cmodeString );
|
||||
if (!record.getItem("RATE").defaultApplied(0)) {
|
||||
properties.surfaceInjectionRate = injectionRate;
|
||||
properties.addInjectionControl(controlMode);
|
||||
properties.controlMode = controlMode;
|
||||
}
|
||||
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);
|
||||
|
||||
const std::string& cmodeString = record.getItem("CMODE").getTrimmedString(0);
|
||||
WellInjector::ControlModeEnum controlMode = WellInjector::ControlModeFromString( cmodeString );
|
||||
if (controlMode == WellInjector::BHP) {
|
||||
properties.BHPLimit = properties.BHPH;
|
||||
} else {
|
||||
if (properties.predictionMode || properties.controlMode == WellInjector::RATE) {
|
||||
// there is no document about what value the default BHP limit should be
|
||||
// we use the one from WCONINJE for now
|
||||
properties.BHPLimit = 6895. * unit::barsa;
|
||||
}
|
||||
// otherwise, the BHPLimit stays the same
|
||||
}
|
||||
properties.addInjectionControl(WellInjector::BHP);
|
||||
|
||||
properties.addInjectionControl(controlMode);
|
||||
properties.controlMode = controlMode;
|
||||
|
||||
properties.predictionMode = false;
|
||||
|
||||
const int VFPTableNumber = record.getItem("VFP_TABLE").get< int >(0);
|
||||
if (VFPTableNumber > 0) {
|
||||
properties.VFPTableNumber = VFPTableNumber;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp>
|
||||
#include <opm/parser/eclipse/Units/Units.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
@@ -75,11 +76,16 @@ namespace Opm {
|
||||
if ( !p.hasProductionControl( wp::BHP ) )
|
||||
p.addProductionControl( wp::BHP );
|
||||
|
||||
|
||||
if (cmode == wp::BHP)
|
||||
if (cmode == wp::BHP) {
|
||||
p.BHPLimit = record.getItem( "BHP" ).getSIDouble( 0 );
|
||||
else
|
||||
p.BHPLimit = prev_properties.BHPLimit;
|
||||
} else {
|
||||
if (!prev_properties.predictionMode) {
|
||||
p.BHPLimit = prev_properties.BHPLimit;
|
||||
} else {
|
||||
// by default the BHP limit is 1 atm
|
||||
p.BHPLimit = 1. * unit::atm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( record.getItem( "BHP" ).hasValue(0) )
|
||||
|
||||
@@ -850,7 +850,7 @@ BOOST_AUTO_TEST_CASE(WCH_All_Specified_BHP_Defaulted)
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK_EQUAL(p.VFPTableNumber, 12);
|
||||
BOOST_CHECK_EQUAL(p.ALQValue, 18.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 100.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 101325.);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_ORAT_Defaulted_BHP_Defaulted)
|
||||
@@ -868,7 +868,7 @@ BOOST_AUTO_TEST_CASE(WCH_ORAT_Defaulted_BHP_Defaulted)
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK_EQUAL(p.VFPTableNumber, 12);
|
||||
BOOST_CHECK_EQUAL(p.ALQValue, 18.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 100.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 101325.);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_OWRAT_Defaulted_BHP_Defaulted)
|
||||
@@ -886,7 +886,7 @@ BOOST_AUTO_TEST_CASE(WCH_OWRAT_Defaulted_BHP_Defaulted)
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK_EQUAL(p.VFPTableNumber, 12);
|
||||
BOOST_CHECK_EQUAL(p.ALQValue, 18.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 100.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 101325.);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_Rates_Defaulted_BHP_Defaulted)
|
||||
@@ -904,7 +904,7 @@ BOOST_AUTO_TEST_CASE(WCH_Rates_Defaulted_BHP_Defaulted)
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK_EQUAL(p.VFPTableNumber, 12);
|
||||
BOOST_CHECK_EQUAL(p.ALQValue, 18.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 100.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 101325.);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_Rates_Defaulted_BHP_Specified)
|
||||
@@ -923,7 +923,7 @@ BOOST_AUTO_TEST_CASE(WCH_Rates_Defaulted_BHP_Specified)
|
||||
BOOST_CHECK_EQUAL(true, p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK_EQUAL(p.VFPTableNumber, 12);
|
||||
BOOST_CHECK_EQUAL(p.ALQValue, 18.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 100.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 101325.);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_Rates_NON_Defaulted_VFP)
|
||||
@@ -942,7 +942,7 @@ BOOST_AUTO_TEST_CASE(WCH_Rates_NON_Defaulted_VFP)
|
||||
BOOST_CHECK_EQUAL(true, p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK_EQUAL(p.VFPTableNumber, 3);
|
||||
BOOST_CHECK_EQUAL(p.ALQValue, 10.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 100.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 101325.);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_Whistctl)
|
||||
@@ -963,7 +963,7 @@ BOOST_AUTO_TEST_CASE(WCH_Whistctl)
|
||||
BOOST_CHECK_EQUAL(true, p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK_EQUAL(p.VFPTableNumber, 3);
|
||||
BOOST_CHECK_EQUAL(p.ALQValue, 10.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 100.);
|
||||
BOOST_CHECK_EQUAL(p.BHPLimit, 101325.);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_BHP_Specified)
|
||||
|
||||
Reference in New Issue
Block a user