Apply MULTXYZ multipliers from Schedule section

This commit is contained in:
Joakim Hove 2021-11-07 20:56:36 +01:00
parent 243beeb96a
commit 2921838895
2 changed files with 99 additions and 104 deletions

View File

@ -597,84 +597,85 @@ namespace Opm
void handleWELPIRuntime(HandlerContext&);
// Normal keyword handlers -- in KeywordHandlers.cpp
void handleBRANPROP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleCOMPDAT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleCOMPLUMP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleCOMPORD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleCOMPSEGS (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleDRSDT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleDRSDTCON (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleDRSDTR (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleDRVDT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleDRVDTR (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleEXIT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGCONINJE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGCONPROD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGCONSALE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGCONSUMP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGEFAC (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGLIFTOPT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGPMAINT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGRUPNET (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGRUPTREE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGUIDERAT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleLIFTOPT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleLINCOM (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleMESSAGES (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleMULTFLT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleMXUNSUPP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleNETBALAN (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleNEXTSTEP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleNODEPROP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleNUPCOL (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleRPTONLY (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleRPTONLYO (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleRPTRST (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleRPTSCHED (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleTUNING (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleSAVE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleSUMTHIN (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleUDQ (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleVAPPARS (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleVFPINJ (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleVFPPROD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWCONHIST (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWCONINJE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWCONINJH (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWCONPROD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWECON (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWEFAC (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWELOPEN (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWELPI (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWELSEGS (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWELSPECS (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWELTARG (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWFOAM (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWGRUPCON (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWHISTCTL (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWINJTEMP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWLIFTOPT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWLIST (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWMICP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWPAVE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWPAVEDEP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWWPAVE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWPIMULT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWPMITAB (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWPOLYMER (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWRFT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWRFTPLT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSALT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSEGITER (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSEGSICD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSEGAICD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSEGVALV (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSKPTAB (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSOLVENT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWTEMP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWTEST (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWTMULT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWTRACER (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleBRANPROP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleCOMPDAT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleCOMPLUMP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleCOMPORD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleCOMPSEGS (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleDRSDT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleDRSDTCON (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleDRSDTR (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleDRVDT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleDRVDTR (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleEXIT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGCONINJE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGCONPROD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGCONSALE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGCONSUMP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGEFAC (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGEOKeyword(HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGLIFTOPT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGPMAINT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGRUPNET (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGRUPTREE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleGUIDERAT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleLIFTOPT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleLINCOM (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleMESSAGES (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleMULTFLT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleMXUNSUPP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleNETBALAN (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleNEXTSTEP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleNODEPROP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleNUPCOL (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleRPTONLY (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleRPTONLYO (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleRPTRST (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleRPTSCHED (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleTUNING (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleSAVE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleSUMTHIN (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleUDQ (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleVAPPARS (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleVFPINJ (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleVFPPROD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWCONHIST (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWCONINJE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWCONINJH (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWCONPROD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWECON (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWEFAC (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWELOPEN (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWELPI (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWELSEGS (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWELSPECS (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWELTARG (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWFOAM (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWGRUPCON (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWHISTCTL (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWINJTEMP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWLIFTOPT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWLIST (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWMICP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWPAVE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWPAVEDEP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWWPAVE (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWPIMULT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWPMITAB (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWPOLYMER (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWRFT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWRFTPLT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSALT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSEGITER (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSEGSICD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSEGAICD (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSEGVALV (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSKPTAB (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWSOLVENT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWTEMP (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWTEST (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWTMULT (HandlerContext&, const ParseContext&, ErrorGuard&);
void handleWTRACER (HandlerContext&, const ParseContext&, ErrorGuard&);
};
}

View File

@ -361,44 +361,38 @@ AquiferConfig load_aquifers(const Deck& deck, const TableManager& tables, NNC& i
}
}
/*
The apply_schedule_keywords can apply a small set of keywords from the
Schdule section for transmissibility scaling; the currently supported
keywords are: {MULTFLT, MULTX, MULTX-, MULTY, MULTY-, MULTZ, MULTZ-}.
Observe that the multiplier scalars which are in the schedule section are
applied by multiplying with the transmissibility which has already been
calculated, i.e. to increase the permeability you must use a multiplier
greater than one.
*/
void EclipseState::apply_schedule_keywords(const std::vector<DeckKeyword>& keywords) {
using namespace ParserKeywords;
static const std::unordered_set<std::string> multipliers = {"MULTFLT", "MULTX", "MULTX-", "MULTY", "MULTY-", "MULTZ", "MULTZ-"};
for (const auto& keyword : keywords) {
if (keyword.isKeyword<MULTFLT>()) {
for (const auto& record : keyword) {
const std::string& faultName = record.getItem<MULTFLT::fault>().get< std::string >(0);
auto& fault = m_faults.getFault( faultName );
double tmpMultFlt = record.getItem<MULTFLT::factor>().get< double >(0);
double oldMultFlt = fault.getTransMult( );
double newMultFlt = oldMultFlt * tmpMultFlt;
auto multflt = record.getItem<MULTFLT::factor>().get< double >(0);
/*
This extremely contrived way of doing it is because of difference in
behavior and section awareness between the Fault object and the
Transmult object:
1. MULTFLT keywords found in the SCHEDULE section should apply the
transmissibility modifiers cumulatively - i.e. the current
transmissibility across the fault should be *multiplied* with the
newly entered MULTFLT value, and the resulting transmissibility
multplier for this fault should be the product of the newly
entered value and the current value.
2. The TransMult::applyMULTFLT() implementation will *multiply* the
transmissibility across a face with the value in the fault
object. Hence the current value has already been multiplied in;
we therefor first *set* the MULTFLT value to the new value, then
apply it to the TransMult object and then eventually update the
MULTFLT value in the fault instance.
*/
fault.setTransMult( tmpMultFlt );
fault.setTransMult( multflt );
m_transMult.applyMULTFLT( fault );
fault.setTransMult( newMultFlt );
}
}
if (multipliers.count(keyword.name()) == 1)
OpmLog::info(fmt::format("Apply transmissibility multiplier: {}", keyword.name()));
}
this->field_props.apply_schedule_keywords(keywords);
this->applyMULTXYZ();
}