keyword ROCK: size->UNKNOWN. Added keyword ADSORP.
added keyword ADSOPR w/ test. keyword ADSORP: size set to NTSFUN, TABDIMS. keyword ADSORP size shift:1. ParserTests: added test for kw ROCK.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{"name": "ADSORP", "sections": ["PROPS"], "size": {"keyword" : "TABDIMS" , "item" : "NTSFUN", "shift" : 1},
|
||||
"records": [
|
||||
[
|
||||
{"name": "ADSORBING_COMP", "value_type": "STRING"}
|
||||
],
|
||||
[
|
||||
{"name": "ADORPTION_ISOTHERM", "value_type": "STRING", "default" : "LANGMUIR"},
|
||||
{"name": "A1", "value_type": "DOUBLE"},
|
||||
{"name": "A2", "value_type": "DOUBLE"},
|
||||
{"name": "B", "value_type": "DOUBLE"},
|
||||
{"name": "M", "value_type": "DOUBLE", "dimension" : "1", "default" : 0.5},
|
||||
{"name": "N", "value_type": "DOUBLE", "dimension" : "1", "default" : 0.5},
|
||||
{"name": "K_REF", "value_type": "DOUBLE"}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ROCK",
|
||||
"sections": ["PROPS"],
|
||||
"size": {"keyword":"TABDIMS", "item":"NTPVT"},
|
||||
"size": "UNKNOWN",
|
||||
"items": [
|
||||
{"name": "PREF", "value_type": "DOUBLE", "default": 1.0132, "dimension": "Pressure"},
|
||||
{"name": "COMPRESSIBILITY", "value_type": "DOUBLE", "default": 0, "dimension": "1/Pressure"}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#Some keywords are found to be of 'special' structure:
|
||||
#These are :
|
||||
#
|
||||
# ADSOPRP: size = {"keyword" : "TABDIMS" , "item" : "NTSFUN"} + 1
|
||||
# UDT: user defined table
|
||||
#
|
||||
|
||||
@@ -30,6 +29,7 @@ set( keywords
|
||||
000_Eclipse100/A/ADDREG
|
||||
000_Eclipse100/A/ADDZCORN
|
||||
000_Eclipse100/A/ADSALNOD
|
||||
000_Eclipse100/A/ADSORP
|
||||
000_Eclipse100/A/AITS
|
||||
000_Eclipse100/A/AITSOFF
|
||||
000_Eclipse100/A/ALL
|
||||
|
||||
@@ -2268,8 +2268,37 @@ PLAT-B 15 /
|
||||
BOOST_CHECK_EQUAL(record08.getItem(0).get<std::string>(0), "PLY");
|
||||
BOOST_CHECK(record08.getItem(2).getType() == type_tag::fdouble);
|
||||
BOOST_CHECK_EQUAL(record08.getItem(2).get<double>(0), 0.7);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ParseSpecialKeywords) {
|
||||
const auto deck_string = std::string { R"(RUNSPEC
|
||||
FIELD
|
||||
TABDIMS
|
||||
2 /
|
||||
PROPS
|
||||
|
||||
ADSORP
|
||||
POLYMER /
|
||||
LANGMUIR 0.0012 0.7 0.4 1.1 0.5 100 /
|
||||
LANGMUIR 0.0009 0.7 0.5 1.2 0.3 50 /
|
||||
|
||||
ROCK
|
||||
3600.00 .40E-05 /
|
||||
3600.00 .40E-05 /
|
||||
3000 0 /
|
||||
|
||||
SCHEDULE
|
||||
GCUTBACK
|
||||
G1 0.6 3* 0.9 LIQ /
|
||||
/
|
||||
)"};
|
||||
|
||||
Parser parser;
|
||||
auto deck = parser.parseString(deck_string);
|
||||
BOOST_CHECK( deck.hasKeyword("GCUTBACK") );
|
||||
auto kw = deck.getKeyword("GCUTBACK");
|
||||
BOOST_CHECK_EQUAL( kw.size(), 1 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user