From 7d774d733c4760babbdcea0444b776578c86db28 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Fri, 23 Sep 2022 15:48:27 +0200 Subject: [PATCH] Thermal Fracture: compute filter cake mobility. --- .../RimThermalFractureTemplate.cpp | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimThermalFractureTemplate.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimThermalFractureTemplate.cpp index 7474d3f08a..0d3b548c3a 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimThermalFractureTemplate.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimThermalFractureTemplate.cpp @@ -172,7 +172,33 @@ void RimThermalFractureTemplate::loadDataAndUpdate() } }; + auto addFilterCakeMobility = []( std::shared_ptr def ) { + int leakoffPressureDropIndex = def->getPropertyIndex( "LeakoffPressureDrop" ); + int filtratePressureDropIndex = def->getPropertyIndex( "FiltratePressureDrop" ); + int leakoffMobilityIndex = def->getPropertyIndex( "LeakoffMobility" ); + QString filterCakeMobilityValueTag = "FilterCakeMobility"; + def->addProperty( filterCakeMobilityValueTag, "m/day/bar" ); + + int filterCakeMobilityDeclineIndex = def->getPropertyIndex( filterCakeMobilityValueTag ); + + for ( size_t nodeIndex = 0; nodeIndex < def->numNodes(); nodeIndex++ ) + { + for ( size_t timeStepIndex = 0; timeStepIndex < def->numTimeSteps(); timeStepIndex++ ) + { + double leakoffPressureDrop = + def->getPropertyValue( leakoffPressureDropIndex, nodeIndex, timeStepIndex ); + double filtratePressureDrop = + def->getPropertyValue( filtratePressureDropIndex, nodeIndex, timeStepIndex ); + double leakoffMobility = def->getPropertyValue( leakoffMobilityIndex, nodeIndex, timeStepIndex ); + + double filterCakeMobilityValue = leakoffMobility * ( leakoffPressureDrop / filtratePressureDrop ); + def->appendPropertyValue( filterCakeMobilityDeclineIndex, nodeIndex, filterCakeMobilityValue ); + } + } + }; + addInjectivityDecline( m_fractureDefinitionData ); + addFilterCakeMobility( m_fractureDefinitionData ); setDefaultConductivityResultIfEmpty();