added initial input reading for group control (GRUP-keyword)

This commit is contained in:
Kjetil Olsen Lye 2012-03-27 09:23:24 +02:00
parent 3f63435100
commit 4773318b28
5 changed files with 19 additions and 2 deletions

View File

@ -18,3 +18,10 @@ $(BOOST_SYSTEM_LIB) \
$(LDADD) \
$(LAPACK_LIBS)
endif
noinst_PROGRAMS += wells_example
wells_example_SOURCES = wells_example.cpp
wells_example_LDADD = \
$(BOOST_FILESYSTEM_LIB) \
$(BOOST_SYSTEM_LIB) \
$(LDADD)

View File

@ -342,6 +342,8 @@ namespace Opm
well_data[wix].control = BHP;
well_data[wix].target = wconinjes.wconinje[kw].THP_limit_;
break;
case 4:
break;
default:
THROW("Unknown well control mode; WCONIJE = "
<< wconinjes.wconinje[kw].control_mode_
@ -411,6 +413,9 @@ namespace Opm
well_data[wix].control = BHP;
well_data[wix].target = wconprods.wconprod[kw].THP_limit_;
break;
case 7:
well_data[wix].control = GRUP;
break;
default:
THROW("Unknown well control mode; WCONPROD = "
<< wconprods.wconprod[kw].control_mode_

View File

@ -585,6 +585,7 @@ EclipseGridParser::createSpecialField(std::istream& is,
string ukey = upcase(fieldname);
std::tr1::shared_ptr<SpecialBase> spec_ptr
= Factory<SpecialBase>::createObject(fieldname);
is >> ignoreWhitespace;
spec_ptr->read(is);
return spec_ptr;
}

View File

@ -5,7 +5,7 @@
// Created: Tue Dec 22 11:35:32 2009
//
// Author(s): Atgeirr F Rasmussen <atgeirr@sintef.no>
// Bård Skaflestad <bard.skaflestad@sintef.no>
// B<EFBFBD>rd Skaflestad <bard.skaflestad@sintef.no>
//
// $Date$
//
@ -107,6 +107,9 @@ namespace
} else if (dummy == '-') { // "comment test"
is >> ignoreLine; // This line is a comment
} else {
char buffer[1000];
is.getline(buffer, sizeof(buffer));
std::cout << buffer<<std::endl;
THROW("Encountered format error while reading data values. Value = " << dummy);
}
} else {
@ -250,6 +253,7 @@ namespace
is >> year;
ignoreSlashLine(is);
int month = getMonthNumber(month_name);
return boost::gregorian::date(boost::gregorian::greg_year(year),
boost::gregorian::greg_month(month),
boost::gregorian::greg_day(day));

View File

@ -25,7 +25,7 @@ extern "C" {
#endif
enum well_type { INJECTOR, PRODUCER };
enum control_type { BHP , RATE };
enum control_type { BHP , RATE, GRUP };
enum surface_component { WATER = 0, OIL = 1, GAS = 2 };