WIP in supporting the keyword WINJDAM

This commit is contained in:
Kai Bao
2023-06-26 11:58:06 +02:00
parent 5710164a7b
commit e94c1aa386
6 changed files with 49 additions and 0 deletions

View File

@@ -746,6 +746,7 @@ namespace Opm
void handleWVFPEXP (HandlerContext&);
void handleWWPAVE (HandlerContext&);
void handleWPIMULT (HandlerContext&);
void handleWINJDAM (HandlerContext&);
void handleWINJMULT (HandlerContext&);
void handleWPMITAB (HandlerContext&);
void handleWPOLYMER (HandlerContext&);

View File

@@ -79,6 +79,19 @@ namespace RestartIO {
Defaulted,
};
// TODO: the following related to filter cake modeling should probably go to its own files
enum class FilterCakeGeometry {
LINEAR,
RADIAL,
NONE,
};
static FilterCakeGeometry filterCakeGeometryFromString(const std::string& str);
// TODO: the end of the filter cake model
Connection();
Connection(int i, int j , int k ,
std::size_t global_index,

View File

@@ -481,6 +481,8 @@ public:
bool handleWELOPENConnections(const DeckRecord& record, Connection::State status);
bool handleCOMPLUMP(const DeckRecord& record);
bool handleWPIMULT(const DeckRecord& record);
// TODO: not sure need to return bool
bool handleWINJDAM(const DeckRecord& record);
bool handleWINJMULT(const DeckRecord& record, const KeywordLocation& location);
bool applyGlobalWPIMULT(double scale_factor);

View File

@@ -1969,6 +1969,20 @@ Well{0} entered with 'FIELD' parent group:
}
}
void Schedule::handleWINJDAM(HandlerContext& handlerContext) {
for (const auto& record : handlerContext.keyword) {
const std::string& wellNamePattern = record.getItem("WELL_NAME").getTrimmedString(0);
const auto well_names = wellNames(wellNamePattern);
for (const auto& well_name : well_names) {
auto well = this->snapshots.back().wells(well_name);
if (well.handleWINJDAM(record)) {
this->snapshots.back().wells.update( std::move(well) );
}
}
}
}
void Schedule::handleWPMITAB(HandlerContext& handlerContext) {
for (const auto& record : handlerContext.keyword) {
const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0);
@@ -2550,6 +2564,7 @@ Well{0} entered with 'FIELD' parent group:
{ "WVFPEXP" , &Schedule::handleWVFPEXP },
{ "WWPAVE" , &Schedule::handleWWPAVE },
{ "WPIMULT" , &Schedule::handleWPIMULT },
{ "WINJDAM" , &Schedule::handleWINJDAM },
{ "WPMITAB" , &Schedule::handleWPMITAB },
{ "WPOLYMER", &Schedule::handleWPOLYMER },
{ "WRFT" , &Schedule::handleWRFT },

View File

@@ -460,5 +460,18 @@ bool Connection::activeInjMult() const {
void Connection::setInjMult(const InjMult& inj_mult) {
m_injmult = inj_mult;
}
Connection::FilterCakeGeometry
Connection::filterCakeGeometryFromString(const std::string& str)
{
if (str == "LINEAR")
return Connection::FilterCakeGeometry::LINEAR;
else if (str == "RADIAL")
return Connection::FilterCakeGeometry::RADIAL;
else if (str == "NONE")
return Connection::FilterCakeGeometry::NONE;
else
throw std::invalid_argument("Unknow enum INJMultMode string: " + str);
}
}

View File

@@ -1303,6 +1303,11 @@ bool Well::handleWPIMULT(const DeckRecord& record) {
return this->updateConnections(std::move(new_connections), false);
}
bool Well::handleWINJDAM(const Opm::DeckRecord& record)
{
return false;
}
bool Well::handleWINJMULT(const Opm::DeckRecord& record, const KeywordLocation& location) {
// for this keyword, the default for I, J, K will be negative