In ResInsight we are using keywords from opm-common to generate schedule files with multi-segment well data. We have created an API for adding arbitrary keyword at given date. Our current approach is to take the keyword with item values as input from the end-user. The keyword configuration is given as a python dictionary mapping from item names to values, e.g { "WELNAME": "WELL_A", "I": 1, "J": 4, "SATNUM": 3}. Here we expect the item name to be "SATNUM" based on the manual, but the mapping fails since it is named "SAT_TABLE" in the code.
We assumed that the item names in the manual and the code would be the same, and they are clearly not. That was wrong assumption on our part, but it would be nice to use find the parser keyword and add items based on the "manual name".
See example from COMPDAT below. Here there is a mismatch between WELL/WELNAME, STATE/STATUS, SAT_TABLE/SATNUM, CONNECTION_TRANSMISSIBILITY_FACTOR/CONFACT and so on.
class COMPDAT:
const std::string COMPDAT::keywordName = "COMPDAT";
const std::string COMPDAT::WELL::itemName = "WELL";
const std::string COMPDAT::I::itemName = "I";
const std::string COMPDAT::J::itemName = "J";
const std::string COMPDAT::K1::itemName = "K1";
const std::string COMPDAT::K2::itemName = "K2";
const std::string COMPDAT::STATE::itemName = "STATE";
const std::string COMPDAT::STATE::defaultValue = "OPEN";
const std::string COMPDAT::SAT_TABLE::itemName = "SAT_TABLE";
const std::string COMPDAT::CONNECTION_TRANSMISSIBILITY_FACTOR::itemName = "CONNECTION_TRANSMISSIBILITY_FACTOR";
const std::string COMPDAT::DIAMETER::itemName = "DIAMETER";
const std::string COMPDAT::Kh::itemName = "Kh";
const std::string COMPDAT::SKIN::itemName = "SKIN";
const std::string COMPDAT::D_FACTOR::itemName = "D_FACTOR";
const std::string COMPDAT::DIR::itemName = "DIR";
const std::string COMPDAT::DIR::defaultValue = "Z";
const std::string COMPDAT::PR::itemName = "PR";
We also have problems with the long names when generating comment headers based on the itemName value and right-aligning the data. Here we end-up exceeding the commercial simulator max line width (132) due to SURFACE_*_FRACTION .
Would there be interest in adding a "shortName" or "manual name" to the keyword definitions? I would be willing to do the work. Continuing with the COMPDAT example:
class COMPDAT:
const std::string COMPDAT::keywordName = "COMPDAT";
// WELL -> WELNAME
const std::string COMPDAT::WELL::itemName = "WELL";
const std::string COMPDAT::WELL::shortName = "WELNAME";
const std::string COMPDAT::I::itemName = "I";
const std::string COMPDAT::J::itemName = "J";
const std::string COMPDAT::K1::itemName = "K1";
const std::string COMPDAT::K2::itemName = "K2";
// STATE -> STATUS
const std::string COMPDAT::STATE::itemName = "STATE";
const std::string COMPDAT::STATE::shortName = "STATUS";
const std::string COMPDAT::STATE::defaultValue = "OPEN";
// SAT_TABLE -> SATNUM
const std::string COMPDAT::SAT_TABLE::itemName = "SAT_TABLE";
const std::string COMPDAT::SAT_TABLE::shortName = "SATNUM";
// CONNECTION_TRANSMISSIBILITY_FACTOR -> CONFACT
const std::string COMPDAT::CONNECTION_TRANSMISSIBILITY_FACTOR::itemName = "CONNECTION_TRANSMISSIBILITY_FACTOR";
const std::string COMPDAT::CONNECTION_TRANSMISSIBILITY_FACTOR::shortName = "CONFACT";
// DIAMETER -> DW
const std::string COMPDAT::DIAMETER::itemName = "DIAMETER";
const std::string COMPDAT::DIAMETER::shortName = "DW";
....
With this in place we can lookup item by their "short" or "manual" name.
In ResInsight we are using keywords from opm-common to generate schedule files with multi-segment well data. We have created an API for adding arbitrary keyword at given date. Our current approach is to take the keyword with item values as input from the end-user. The keyword configuration is given as a python dictionary mapping from item names to values, e.g
{ "WELNAME": "WELL_A", "I": 1, "J": 4, "SATNUM": 3}. Here we expect the item name to be "SATNUM" based on the manual, but the mapping fails since it is named "SAT_TABLE" in the code.We assumed that the item names in the manual and the code would be the same, and they are clearly not. That was wrong assumption on our part, but it would be nice to use find the parser keyword and add items based on the "manual name".
See example from COMPDAT below. Here there is a mismatch between WELL/WELNAME, STATE/STATUS, SAT_TABLE/SATNUM, CONNECTION_TRANSMISSIBILITY_FACTOR/CONFACT and so on.
We also have problems with the long names when generating comment headers based on the itemName value and right-aligning the data. Here we end-up exceeding the commercial simulator max line width (132) due to SURFACE_*_FRACTION .
Would there be interest in adding a "shortName" or "manual name" to the keyword definitions? I would be willing to do the work. Continuing with the COMPDAT example:
With this in place we can lookup item by their "short" or "manual" name.