support nupcol
This commit is contained in:
parent
b00615d21f
commit
09b445f69d
@ -216,6 +216,7 @@ namespace Opm
|
||||
size_t size() const;
|
||||
|
||||
void applyAction(size_t reportStep, const Action::ActionX& action, const Action::Result& result);
|
||||
int getNupcol(size_t reportStep) const;
|
||||
private:
|
||||
TimeMap m_timeMap;
|
||||
OrderedMap< std::string, DynamicState<std::shared_ptr<Well2>>> wells_static;
|
||||
@ -239,6 +240,7 @@ namespace Opm
|
||||
Action::Actions m_actions;
|
||||
|
||||
std::map<std::string,Events> well_events;
|
||||
DynamicState<int> m_nupcol;
|
||||
|
||||
GTNode groupTree(const std::string& root_node, std::size_t report_step, const GTNode * parent) const;
|
||||
void updateGroup(std::shared_ptr<Group2> group, size_t reportStep);
|
||||
@ -281,6 +283,7 @@ namespace Opm
|
||||
void handleGUIDERAT( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleWEFAC( const DeckKeyword& keyword, size_t currentStep, const ParseContext& parseContext, ErrorGuard& errors);
|
||||
void handleTUNING( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleNUPCOL( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleGRUPTREE( const DeckKeyword& keyword, size_t currentStep, const UnitSystem& unit_system, const ParseContext& parseContext, ErrorGuard& errors);
|
||||
void handleGRUPNET( const DeckKeyword& keyword, size_t currentStep, const UnitSystem& unit_system);
|
||||
void handleWRFT( const DeckKeyword& keyword, size_t currentStep);
|
||||
|
@ -123,7 +123,8 @@ namespace {
|
||||
udq_active(this->m_timeMap, std::make_shared<UDQActive>()),
|
||||
guide_rate_model(this->m_timeMap, std::make_shared<GuideRateModel>()),
|
||||
global_whistctl_mode(this->m_timeMap, WellProducer::CMODE_UNDEFINED),
|
||||
rft_config(this->m_timeMap)
|
||||
rft_config(this->m_timeMap),
|
||||
m_nupcol(this->m_timeMap, 3)
|
||||
{
|
||||
addGroup( "FIELD", 0, deck.getActiveUnitSystem());
|
||||
|
||||
@ -385,6 +386,9 @@ namespace {
|
||||
else if (keyword.name() == "VFPPROD")
|
||||
handleVFPPROD(keyword, unit_system, currentStep);
|
||||
|
||||
else if (keyword.name() == "NUPCOL")
|
||||
handleNUPCOL(keyword, currentStep);
|
||||
|
||||
else if (geoModifiers.find( keyword.name() ) != geoModifiers.end()) {
|
||||
bool supported = geoModifiers.at( keyword.name() );
|
||||
if (supported) {
|
||||
@ -515,6 +519,12 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
void Schedule::handleNUPCOL( const DeckKeyword& keyword, size_t currentStep) {
|
||||
const int nupcol = keyword.getRecord(0).getItem("NUM_ITER").get<int>(0);
|
||||
this->m_nupcol.update(currentStep, nupcol);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Schedule::handleCOMPORD(const ParseContext& parseContext, ErrorGuard& errors, const DeckKeyword& compordKeyword, size_t /* currentStep */) {
|
||||
for (const auto& record : compordKeyword) {
|
||||
@ -2565,5 +2575,10 @@ void Schedule::handleGRUPTREE( const DeckKeyword& keyword, size_t currentStep, c
|
||||
|
||||
}
|
||||
|
||||
int Schedule::getNupcol(size_t reportStep) const {
|
||||
return this->m_nupcol.get(reportStep);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -3336,3 +3336,40 @@ BOOST_AUTO_TEST_CASE(RFT_CONFIG2) {
|
||||
const auto& rft_config = schedule.rftConfig();
|
||||
BOOST_CHECK_EQUAL(1, rft_config.firstRFTOutput());
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(nupcol) {
|
||||
Opm::Parser parser;
|
||||
std::string input =
|
||||
"START -- 0 \n"
|
||||
"19 JUN 2007 / \n"
|
||||
"SCHEDULE\n"
|
||||
"DATES\n -- 1\n"
|
||||
" 10 OKT 2008 / \n"
|
||||
"/\n"
|
||||
"NUPCOL\n"
|
||||
" 4 /\n"
|
||||
"DATES\n -- 1\n"
|
||||
" 10 OKT 2009 / \n"
|
||||
"/\n"
|
||||
"NUPCOL\n"
|
||||
" 10 /\n"
|
||||
"DATES\n -- 1\n"
|
||||
" 10 OKT 2010 / \n"
|
||||
"/\n"
|
||||
|
||||
;
|
||||
|
||||
auto deck = parser.parseString(input);
|
||||
EclipseGrid grid(10,10,10);
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Runspec runspec (deck);
|
||||
Schedule schedule( deck, grid, eclipseProperties,runspec);
|
||||
|
||||
{
|
||||
BOOST_CHECK_EQUAL(schedule.getNupcol(0),3);
|
||||
BOOST_CHECK_EQUAL(schedule.getNupcol(1),4);
|
||||
BOOST_CHECK_EQUAL(schedule.getNupcol(2),10);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user