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) \ $(LDADD) \
$(LAPACK_LIBS) $(LAPACK_LIBS)
endif 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].control = BHP;
well_data[wix].target = wconinjes.wconinje[kw].THP_limit_; well_data[wix].target = wconinjes.wconinje[kw].THP_limit_;
break; break;
case 4:
break;
default: default:
THROW("Unknown well control mode; WCONIJE = " THROW("Unknown well control mode; WCONIJE = "
<< wconinjes.wconinje[kw].control_mode_ << wconinjes.wconinje[kw].control_mode_
@ -411,6 +413,9 @@ namespace Opm
well_data[wix].control = BHP; well_data[wix].control = BHP;
well_data[wix].target = wconprods.wconprod[kw].THP_limit_; well_data[wix].target = wconprods.wconprod[kw].THP_limit_;
break; break;
case 7:
well_data[wix].control = GRUP;
break;
default: default:
THROW("Unknown well control mode; WCONPROD = " THROW("Unknown well control mode; WCONPROD = "
<< wconprods.wconprod[kw].control_mode_ << wconprods.wconprod[kw].control_mode_

View File

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

View File

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

View File

@ -25,7 +25,7 @@ extern "C" {
#endif #endif
enum well_type { INJECTOR, PRODUCER }; 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 }; enum surface_component { WATER = 0, OIL = 1, GAS = 2 };