From a89899b7dc839aa40065720eb777c82205c257c9 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Fri, 17 Jun 2022 22:22:44 +0200 Subject: [PATCH] Refactor: Introduce MeshFractureTemplate, and convert StimPlanFractureTemplate to it. --- .../RicNewStimPlanFractureTemplateFeature.cpp | 2 +- .../Completions/CMakeLists_files.cmake | 2 + .../Completions/RimMeshFractureTemplate.cpp | 539 ++++++++++++++++++ .../Completions/RimMeshFractureTemplate.h | 108 ++++ .../RimStimPlanFractureTemplate.cpp | 422 +------------- .../Completions/RimStimPlanFractureTemplate.h | 95 ++- 6 files changed, 705 insertions(+), 463 deletions(-) create mode 100644 ApplicationLibCode/ProjectDataModel/Completions/RimMeshFractureTemplate.cpp create mode 100644 ApplicationLibCode/ProjectDataModel/Completions/RimMeshFractureTemplate.h diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.cpp index 5bb0726c7d..a1c93f796f 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.cpp @@ -145,7 +145,7 @@ std::vector fractureDef->setFileName( fileName ); fractureDef->loadDataAndUpdate(); - fractureDef->setDefaultsBasedOnXMLfile(); + fractureDef->setDefaultsBasedOnFile(); fractureDef->setDefaultWellDiameterFromUnit(); newFractures.push_back( fractureDef ); } diff --git a/ApplicationLibCode/ProjectDataModel/Completions/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Completions/CMakeLists_files.cmake index 954be3b55a..d682b35963 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Completions/CMakeLists_files.cmake @@ -21,6 +21,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimValveTemplate.h ${CMAKE_CURRENT_LIST_DIR}/RimSimWellFracture.h ${CMAKE_CURRENT_LIST_DIR}/RimSimWellFractureCollection.h + ${CMAKE_CURRENT_LIST_DIR}/RimMeshFractureTemplate.h ${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.h ${CMAKE_CURRENT_LIST_DIR}/RimWellPathFracture.h ${CMAKE_CURRENT_LIST_DIR}/RimWellPathFractureCollection.h @@ -56,6 +57,7 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimValveTemplate.cpp ${CMAKE_CURRENT_LIST_DIR}/RimSimWellFracture.cpp ${CMAKE_CURRENT_LIST_DIR}/RimSimWellFractureCollection.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimMeshFractureTemplate.cpp ${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.cpp ${CMAKE_CURRENT_LIST_DIR}/RimWellPathFracture.cpp ${CMAKE_CURRENT_LIST_DIR}/RimWellPathFractureCollection.cpp diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimMeshFractureTemplate.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimMeshFractureTemplate.cpp new file mode 100644 index 0000000000..fbaefc9a4c --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimMeshFractureTemplate.cpp @@ -0,0 +1,539 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2022 - Equinor ASA +// +// ResInsight is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. +// +// See the GNU General Public License at +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimMeshFractureTemplate.h" + +#include "RiaApplication.h" +#include "RiaCompletionTypeCalculationScheduler.h" +#include "RiaEclipseUnitTools.h" +#include "RiaFractureDefines.h" +#include "RiaWeightedGeometricMeanCalculator.h" +#include "RiaWeightedMeanCalculator.h" + +#include "RigFractureCell.h" +#include "RigFractureGrid.h" +#include "RigTransmissibilityEquations.h" +#include "RigWellPathStimplanIntersector.h" + +#include "RimEclipseView.h" +#include "RimFracture.h" +#include "RimFractureContainment.h" +#include "RimProject.h" +#include "RimTools.h" +#include "RimWellPath.h" + +#include "cafPdmFieldScriptingCapability.h" +#include "cafPdmObject.h" +#include "cafPdmObjectScriptingCapability.h" +#include "cafPdmUiFilePathEditor.h" + +#include +#include +#include + +CAF_PDM_ABSTRACT_SOURCE_INIT( RimMeshFractureTemplate, "MeshFractureTemplate", "RimMeshFractureTemplate" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimMeshFractureTemplate::RimMeshFractureTemplate() +{ + CAF_PDM_InitScriptableObject( "Fracture Template", ":/FractureTemplate16x16.png" ); + + CAF_PDM_InitFieldNoDefault( &m_stimPlanFileName, "StimFileName", "File Name" ); + m_stimPlanFileName.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_userDefinedWellPathDepthAtFracture, + "UserDefinedWellPathDepthAtFracture", + false, + "User-Defined Well/Fracture Intersection Depth" ); + + CAF_PDM_InitField( &m_borderPolygonResultName, "BorderPolygonResultName", QString( "" ), "Parameter" ); + m_borderPolygonResultName.uiCapability()->setUiHidden( true ); + + CAF_PDM_InitField( &m_activeTimeStepIndex, "ActiveTimeStepIndex", 0, "Active TimeStep Index" ); + CAF_PDM_InitField( &m_conductivityResultNameOnFile, + "ConductivityResultName", + QString( "" ), + "Active Conductivity Result Name" ); + + m_readError = false; + + setDeletable( true ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimMeshFractureTemplate::~RimMeshFractureTemplate() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +int RimMeshFractureTemplate::activeTimeStepIndex() +{ + return m_activeTimeStepIndex; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMeshFractureTemplate::fieldChangedByUi( const caf::PdmFieldHandle* changedField, + const QVariant& oldValue, + const QVariant& newValue ) +{ + RimFractureTemplate::fieldChangedByUi( changedField, oldValue, newValue ); + + if ( &m_stimPlanFileName == changedField ) + { + m_readError = false; + loadDataAndUpdate(); + setDefaultsBasedOnFile(); + } + + if ( &m_userDefinedWellPathDepthAtFracture == changedField ) + { + if ( !m_userDefinedWellPathDepthAtFracture ) + { + m_readError = false; + loadDataAndUpdate(); + RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews(); + } + } + + if ( &m_activeTimeStepIndex == changedField ) + { + // Changes to this parameters should change all fractures with this fracture template attached. + RimProject* proj = RimProject::current(); + for ( RimFracture* fracture : fracturesUsingThisTemplate() ) + { + fracture->setStimPlanTimeIndexToPlot( m_activeTimeStepIndex ); + } + proj->scheduleCreateDisplayModelAndRedrawAllViews(); + } + + if ( &m_borderPolygonResultName == changedField || &m_activeTimeStepIndex == changedField || + &m_stimPlanFileName == changedField || &m_conductivityResultNameOnFile == changedField ) + { + // Update fracture grid for all fractures using this template + RimProject* proj = RimProject::current(); + for ( RimFracture* fracture : fracturesUsingThisTemplate() ) + { + fracture->updateFractureGrid(); + } + proj->scheduleCreateDisplayModelAndRedrawAllViews(); + } + + if ( changedField == &m_scaleApplyButton ) + { + m_scaleApplyButton = false; + onLoadDataAndUpdateGeometryHasChanged(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMeshFractureTemplate::setFileName( const QString& fileName ) +{ + m_stimPlanFileName = fileName; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimMeshFractureTemplate::fileName() +{ + return m_stimPlanFileName().path(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimMeshFractureTemplate::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) +{ + QList options; + + if ( fieldNeedingOptions == &m_fractureWidthType ) + { + options.push_back( + caf::PdmOptionItemInfo( caf::AppEnum::uiText( USER_DEFINED_WIDTH ), USER_DEFINED_WIDTH ) ); + + if ( !widthResultValues().empty() ) + { + options.push_back( + caf::PdmOptionItemInfo( caf::AppEnum::uiText( WIDTH_FROM_FRACTURE ), WIDTH_FROM_FRACTURE ) ); + } + } + + if ( fieldNeedingOptions == &m_betaFactorType ) + { + options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( USER_DEFINED_BETA_FACTOR ), + USER_DEFINED_BETA_FACTOR ) ); + + if ( isBetaFactorAvailableOnFile() ) + { + options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( BETA_FACTOR_FROM_FRACTURE ), + BETA_FACTOR_FROM_FRACTURE ) ); + } + } + + if ( fieldNeedingOptions == &m_borderPolygonResultName ) + { + for ( std::pair nameUnit : uiResultNamesWithUnit() ) + { + options.push_back( caf::PdmOptionItemInfo( nameUnit.first, nameUnit.first ) ); + } + } + else if ( fieldNeedingOptions == &m_activeTimeStepIndex ) + { + std::vector timeValues = timeSteps(); + int index = 0; + for ( double value : timeValues ) + { + options.push_back( caf::PdmOptionItemInfo( QString::number( value ), index ) ); + index++; + } + } + else if ( fieldNeedingOptions == &m_conductivityResultNameOnFile ) + { + QStringList resultNames = conductivityResultNames(); + for ( const auto& resultName : resultNames ) + { + options.push_back( caf::PdmOptionItemInfo( resultName, resultName ) ); + } + } + + return options; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +WellFractureIntersectionData RimMeshFractureTemplate::wellFractureIntersectionData( const RimFracture* fractureInstance ) const +{ + if ( !fractureInstance || !fractureInstance->fractureGrid() ) return {}; + + WellFractureIntersectionData values; + + const RigFractureGrid* fractureGrid = fractureInstance->fractureGrid(); + if ( orientationType() == ALONG_WELL_PATH ) + { + RimWellPath* rimWellPath = nullptr; + fractureInstance->firstAncestorOrThisOfType( rimWellPath ); + + if ( rimWellPath && rimWellPath->wellPathGeometry() ) + { + double totalLength = 0.0; + double weightedConductivity = 0.0; + double weightedWidth = 0.0; + double weightedBetaFactorOnFile = 0.0; + + { + std::vector widthResultValues; + { + auto nameUnit = widthParameterNameAndUnit(); + widthResultValues = fractureGridResultsForUnitSystem( nameUnit.first, + nameUnit.second, + m_activeTimeStepIndex, + fractureTemplateUnit() ); + } + + std::vector conductivityResultValues; + { + auto nameUnit = conductivityParameterNameAndUnit(); + conductivityResultValues = fractureGridResultsForUnitSystem( nameUnit.first, + nameUnit.second, + m_activeTimeStepIndex, + fractureTemplateUnit() ); + } + + std::vector betaFactorResultValues; + { + auto nameUnit = betaFactorParameterNameAndUnit(); + betaFactorResultValues = fractureGridResults( nameUnit.first, nameUnit.second, m_activeTimeStepIndex ); + } + + RiaWeightedMeanCalculator widthCalc; + RiaWeightedMeanCalculator conductivityCalc; + RiaWeightedGeometricMeanCalculator betaFactorCalc; + + RigWellPathStimplanIntersector intersector( rimWellPath->wellPathGeometry(), fractureInstance ); + for ( const auto& v : intersector.intersections() ) + { + size_t fractureGlobalCellIndex = v.first; + double intersectionLength = v.second.computeLength(); + + if ( fractureGlobalCellIndex < widthResultValues.size() ) + { + widthCalc.addValueAndWeight( widthResultValues[fractureGlobalCellIndex], intersectionLength ); + } + + if ( fractureGlobalCellIndex < conductivityResultValues.size() ) + { + conductivityCalc.addValueAndWeight( conductivityResultValues[fractureGlobalCellIndex], + intersectionLength ); + } + + if ( fractureGlobalCellIndex < betaFactorResultValues.size() ) + { + double nativeBetaFactor = betaFactorResultValues[fractureGlobalCellIndex]; + + // Guard against zero beta values, as these values will set the geometric mean to zero + // Consider using the conductivity threshold instead of a local beta threshold + const double threshold = 1e-6; + if ( fabs( nativeBetaFactor ) > threshold ) + { + betaFactorCalc.addValueAndWeight( nativeBetaFactor, intersectionLength ); + } + } + } + if ( conductivityCalc.validAggregatedWeight() ) + { + weightedConductivity = conductivityCalc.weightedMean(); + } + if ( widthCalc.validAggregatedWeight() ) + { + weightedWidth = widthCalc.weightedMean(); + totalLength = widthCalc.aggregatedWeight(); + } + if ( betaFactorCalc.validAggregatedWeight() ) + { + weightedBetaFactorOnFile = betaFactorCalc.weightedMean(); + } + } + + if ( totalLength > 1e-7 ) + { + values.m_width = weightedWidth; + values.m_conductivity = weightedConductivity; + + double conversionFactorForBeta = conversionFactorForBetaValues(); + double betaFactorForcheimer = weightedBetaFactorOnFile / conversionFactorForBeta; + + values.m_betaFactorInForcheimerUnits = betaFactorForcheimer; + } + + values.m_permeability = RigTransmissibilityEquations::permeability( weightedConductivity, weightedWidth ); + } + } + else + { + std::pair wellCellIJ = fractureGrid->fractureCellAtWellCenter(); + size_t wellCellIndex = fractureGrid->getGlobalIndexFromIJ( wellCellIJ.first, wellCellIJ.second ); + const RigFractureCell& wellCell = fractureGrid->cellFromIndex( wellCellIndex ); + + double conductivity = wellCell.getConductivityValue(); + values.m_conductivity = conductivity; + + { + auto nameUnit = widthParameterNameAndUnit(); + if ( !nameUnit.first.isEmpty() ) + { + double widthInRequiredUnit = HUGE_VAL; + { + auto resultValues = fractureGridResultsForUnitSystem( nameUnit.first, + nameUnit.second, + m_activeTimeStepIndex, + fractureTemplateUnit() ); + + if ( wellCellIndex < resultValues.size() ) + { + widthInRequiredUnit = resultValues[wellCellIndex]; + } + } + + if ( widthInRequiredUnit != HUGE_VAL && fabs( widthInRequiredUnit ) > 1e-20 ) + { + values.m_width = widthInRequiredUnit; + values.m_permeability = RigTransmissibilityEquations::permeability( conductivity, widthInRequiredUnit ); + } + } + } + + { + auto nameUnit = betaFactorParameterNameAndUnit(); + std::vector betaFactorResultValues = + fractureGridResults( nameUnit.first, nameUnit.second, m_activeTimeStepIndex ); + + if ( wellCellIndex < betaFactorResultValues.size() ) + { + double nativeBetaValue = betaFactorResultValues[wellCellIndex]; + + double conversionFactorForBeta = conversionFactorForBetaValues(); + double betaFactorForcheimer = nativeBetaValue / conversionFactorForBeta; + + values.m_betaFactorInForcheimerUnits = betaFactorForcheimer; + } + } + } + + return values; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimMeshFractureTemplate::conversionFactorForBetaValues() const +{ + auto nameUnit = betaFactorParameterNameAndUnit(); + + double conversionFactorForBeta = 1.0; + + QString trimmedUnit = nameUnit.second.trimmed().toLower(); + if ( trimmedUnit == "/m" ) + { + conversionFactorForBeta = 1.01325E+08; + } + else if ( trimmedUnit == "/cm" ) + { + conversionFactorForBeta = 1.01325E+06; + } + else if ( trimmedUnit == "/ft" ) + { + conversionFactorForBeta = 3.088386E+07; + } + + return conversionFactorForBeta; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimMeshFractureTemplate::mapUiResultNameToFileResultName( const QString& uiResultName ) const +{ + QString fileResultName; + + if ( uiResultName == RiaDefines::conductivityResultName() ) + { + fileResultName = m_conductivityResultNameOnFile(); + } + else + { + fileResultName = uiResultName; + } + + return fileResultName; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMeshFractureTemplate::onLoadDataAndUpdateGeometryHasChanged() +{ + loadDataAndUpdate(); + + RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews(); + RiaCompletionTypeCalculationScheduler::instance()->scheduleRecalculateCompletionTypeAndRedrawAllViews(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimMeshFractureTemplate::widthResultValues() const +{ + std::vector resultValues; + + auto nameUnit = widthParameterNameAndUnit(); + if ( !nameUnit.first.isEmpty() ) + { + resultValues = fractureGridResultsForUnitSystem( nameUnit.first, + nameUnit.second, + m_activeTimeStepIndex, + fractureTemplateUnit() ); + } + + return resultValues; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMeshFractureTemplate::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) +{ + uiOrdering.add( &m_name ); + uiOrdering.add( &m_id ); + + { + caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Input" ); + group->add( &m_stimPlanFileName ); + group->add( &m_activeTimeStepIndex ); + group->add( &m_userDefinedWellPathDepthAtFracture ); + group->add( &m_wellPathDepthAtFracture ); + + m_wellPathDepthAtFracture.uiCapability()->setUiReadOnly( !m_userDefinedWellPathDepthAtFracture() ); + } + + { + caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Geometry" ); + group->add( &m_orientationType ); + group->add( &m_azimuthAngle ); + } + + { + caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Fracture Truncation" ); + group->setCollapsedByDefault( true ); + m_fractureContainment()->uiOrdering( uiConfigName, *group ); + } + + { + caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Properties" ); + group->add( &m_conductivityResultNameOnFile ); + group->add( &m_conductivityType ); + group->add( &m_skinFactor ); + group->add( &m_perforationLength ); + group->add( &m_perforationEfficiency ); + group->add( &m_wellDiameter ); + } + + if ( widthResultValues().empty() ) + { + m_fractureWidthType = USER_DEFINED_WIDTH; + } + + RimFractureTemplate::defineUiOrdering( uiConfigName, uiOrdering ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMeshFractureTemplate::defineEditorAttribute( const caf::PdmFieldHandle* field, + QString uiConfigName, + caf::PdmUiEditorAttribute* attribute ) +{ + RimFractureTemplate::defineEditorAttribute( field, uiConfigName, attribute ); + + if ( field == &m_stimPlanFileName ) + { + caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast( attribute ); + if ( myAttr ) + { + myAttr->m_fileSelectionFilter = getFileSelectionFilter(); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimMeshFractureTemplate::wellPathDepthAtFractureUiName() const +{ + return "Well/Fracture Intersection Depth"; +} diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimMeshFractureTemplate.h b/ApplicationLibCode/ProjectDataModel/Completions/RimMeshFractureTemplate.h new file mode 100644 index 0000000000..a9645f9447 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimMeshFractureTemplate.h @@ -0,0 +1,108 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 - Statoil ASA +// +// ResInsight is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. +// +// See the GNU General Public License at +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include "RimFractureTemplate.h" + +#include "cafPdmChildArrayField.h" +#include "cafPdmField.h" +#include "cafPdmFieldCvfVec3d.h" +#include "cafPdmFieldHandle.h" +#include "cafPdmObject.h" +#include "cafPdmPtrField.h" + +#include "cvfObject.h" +#include "cvfVector3.h" + +#include + +//================================================================================================== +/// +/// +//================================================================================================== +class RimMeshFractureTemplate : public RimFractureTemplate +{ + CAF_PDM_HEADER_INIT; + +public: + RimMeshFractureTemplate(); + ~RimMeshFractureTemplate() override; + + int activeTimeStepIndex(); + + virtual void setDefaultsBasedOnFile() = 0; + + void setFileName( const QString& fileName ); + QString fileName(); + + QString wellPathDepthAtFractureUiName() const override; + + // Result Access + virtual std::vector timeSteps() = 0; + virtual QStringList conductivityResultNames() const = 0; + virtual std::vector> + resultValues( const QString& uiResultName, const QString& unitName, size_t timeStepIndex ) const = 0; + virtual std::vector + fractureGridResults( const QString& resultName, const QString& unitName, size_t timeStepIndex ) const = 0; + virtual bool hasConductivity() const = 0; + virtual double resultValueAtIJ( const RigFractureGrid* fractureGrid, + const QString& uiResultName, + const QString& unitName, + size_t timeStepIndex, + size_t i, + size_t j ) = 0; + + virtual QString getFileSelectionFilter() const = 0; + + virtual std::vector widthResultValues() const; + + QString mapUiResultNameToFileResultName( const QString& uiResultName ) const; + +protected: + void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; + QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + void defineEditorAttribute( const caf::PdmFieldHandle* field, + QString uiConfigName, + caf::PdmUiEditorAttribute* attribute ) override; + void onLoadDataAndUpdateGeometryHasChanged() override; + + virtual std::vector + fractureGridResultsForUnitSystem( const QString& resultName, + const QString& unitName, + size_t timeStepIndex, + RiaDefines::EclipseUnitSystem requiredUnitSystem ) const = 0; + + WellFractureIntersectionData wellFractureIntersectionData( const RimFracture* fractureInstance ) const override; + + virtual std::pair widthParameterNameAndUnit() const = 0; + virtual std::pair conductivityParameterNameAndUnit() const = 0; + virtual std::pair betaFactorParameterNameAndUnit() const = 0; + + double conversionFactorForBetaValues() const; + +protected: + caf::PdmField m_stimPlanFileName; + bool m_readError; + + caf::PdmField m_activeTimeStepIndex; + caf::PdmField m_conductivityResultNameOnFile; + + caf::PdmField m_userDefinedWellPathDepthAtFracture; + caf::PdmField m_borderPolygonResultName; +}; diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.cpp index bca9c76949..5388cae47c 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.cpp @@ -63,8 +63,6 @@ #include #include -static std::vector EMPTY_DOUBLE_VECTOR; - CAF_PDM_SOURCE_INIT( RimStimPlanFractureTemplate, "StimPlanFractureTemplate", "RimStimPlanFractureTemplate" ); //-------------------------------------------------------------------------------------------------- @@ -74,23 +72,6 @@ RimStimPlanFractureTemplate::RimStimPlanFractureTemplate() { CAF_PDM_InitScriptableObject( "Fracture Template", ":/FractureTemplate16x16.png" ); - CAF_PDM_InitFieldNoDefault( &m_stimPlanFileName, "StimPlanFileName", "File Name" ); - m_stimPlanFileName.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() ); - - CAF_PDM_InitField( &m_userDefinedWellPathDepthAtFracture, - "UserDefinedWellPathDepthAtFracture", - false, - "User-Defined Well/Fracture Intersection Depth" ); - - CAF_PDM_InitField( &m_borderPolygonResultName, "BorderPolygonResultName", QString( "" ), "Parameter" ); - m_borderPolygonResultName.uiCapability()->setUiHidden( true ); - - CAF_PDM_InitField( &m_activeTimeStepIndex, "ActiveTimeStepIndex", 0, "Active TimeStep Index" ); - CAF_PDM_InitField( &m_conductivityResultNameOnFile, - "ConductivityResultName", - QString( "" ), - "Active Conductivity Result Name" ); - CAF_PDM_InitFieldNoDefault( &m_propertiesTable, "PropertiesTable", "Properties Table" ); m_propertiesTable.uiCapability()->setUiEditorTypeName( caf::PdmUiTextEditor::uiEditorTypeName() ); m_propertiesTable.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN ); @@ -116,87 +97,7 @@ RimStimPlanFractureTemplate::~RimStimPlanFractureTemplate() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -int RimStimPlanFractureTemplate::activeTimeStepIndex() -{ - return m_activeTimeStepIndex; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimStimPlanFractureTemplate::fieldChangedByUi( const caf::PdmFieldHandle* changedField, - const QVariant& oldValue, - const QVariant& newValue ) -{ - RimFractureTemplate::fieldChangedByUi( changedField, oldValue, newValue ); - - if ( &m_stimPlanFileName == changedField ) - { - m_readError = false; - loadDataAndUpdate(); - setDefaultsBasedOnXMLfile(); - } - - if ( &m_userDefinedWellPathDepthAtFracture == changedField ) - { - if ( !m_userDefinedWellPathDepthAtFracture ) - { - m_readError = false; - loadDataAndUpdate(); - RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews(); - } - } - - if ( &m_activeTimeStepIndex == changedField ) - { - // Changes to this parameters should change all fractures with this fracture template attached. - RimProject* proj = RimProject::current(); - for ( RimFracture* fracture : fracturesUsingThisTemplate() ) - { - fracture->setStimPlanTimeIndexToPlot( m_activeTimeStepIndex ); - } - proj->scheduleCreateDisplayModelAndRedrawAllViews(); - } - - if ( &m_borderPolygonResultName == changedField || &m_activeTimeStepIndex == changedField || - &m_stimPlanFileName == changedField || &m_conductivityResultNameOnFile == changedField ) - { - // Update fracture grid for all fractures using this template - RimProject* proj = RimProject::current(); - for ( RimFracture* fracture : fracturesUsingThisTemplate() ) - { - fracture->updateFractureGrid(); - } - proj->scheduleCreateDisplayModelAndRedrawAllViews(); - } - - if ( changedField == &m_scaleApplyButton ) - { - m_scaleApplyButton = false; - onLoadDataAndUpdateGeometryHasChanged(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimStimPlanFractureTemplate::setFileName( const QString& fileName ) -{ - m_stimPlanFileName = fileName; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QString RimStimPlanFractureTemplate::fileName() -{ - return m_stimPlanFileName().path(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimStimPlanFractureTemplate::setDefaultsBasedOnXMLfile() +void RimStimPlanFractureTemplate::setDefaultsBasedOnFile() { if ( m_stimPlanFractureDefinitionData.isNull() ) return; @@ -324,65 +225,9 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QList - RimStimPlanFractureTemplate::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) +QStringList RimStimPlanFractureTemplate::conductivityResultNames() const { - QList options; - - if ( fieldNeedingOptions == &m_fractureWidthType ) - { - options.push_back( - caf::PdmOptionItemInfo( caf::AppEnum::uiText( USER_DEFINED_WIDTH ), USER_DEFINED_WIDTH ) ); - - if ( !widthResultValues().empty() ) - { - options.push_back( - caf::PdmOptionItemInfo( caf::AppEnum::uiText( WIDTH_FROM_FRACTURE ), WIDTH_FROM_FRACTURE ) ); - } - } - - if ( fieldNeedingOptions == &m_betaFactorType ) - { - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( USER_DEFINED_BETA_FACTOR ), - USER_DEFINED_BETA_FACTOR ) ); - - if ( isBetaFactorAvailableOnFile() ) - { - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( BETA_FACTOR_FROM_FRACTURE ), - BETA_FACTOR_FROM_FRACTURE ) ); - } - } - - if ( fieldNeedingOptions == &m_borderPolygonResultName ) - { - for ( std::pair nameUnit : uiResultNamesWithUnit() ) - { - options.push_back( caf::PdmOptionItemInfo( nameUnit.first, nameUnit.first ) ); - } - } - else if ( fieldNeedingOptions == &m_activeTimeStepIndex ) - { - std::vector timeValues = timeSteps(); - int index = 0; - for ( double value : timeValues ) - { - options.push_back( caf::PdmOptionItemInfo( QString::number( value ), index ) ); - index++; - } - } - else if ( fieldNeedingOptions == &m_conductivityResultNameOnFile ) - { - if ( m_stimPlanFractureDefinitionData.notNull() ) - { - QStringList conductivityResultNames = m_stimPlanFractureDefinitionData->conductivityResultNames(); - for ( const auto& resultName : conductivityResultNames ) - { - options.push_back( caf::PdmOptionItemInfo( resultName, resultName ) ); - } - } - } - - return options; + return m_stimPlanFractureDefinitionData->conductivityResultNames(); } //-------------------------------------------------------------------------------------------------- @@ -465,175 +310,6 @@ std::vector return resultValues; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -WellFractureIntersectionData - RimStimPlanFractureTemplate::wellFractureIntersectionData( const RimFracture* fractureInstance ) const -{ - if ( !fractureInstance || !fractureInstance->fractureGrid() ) return {}; - - WellFractureIntersectionData values; - - const RigFractureGrid* fractureGrid = fractureInstance->fractureGrid(); - if ( orientationType() == ALONG_WELL_PATH ) - { - RimWellPath* rimWellPath = nullptr; - fractureInstance->firstAncestorOrThisOfType( rimWellPath ); - - if ( rimWellPath && rimWellPath->wellPathGeometry() ) - { - double totalLength = 0.0; - double weightedConductivity = 0.0; - double weightedWidth = 0.0; - double weightedBetaFactorOnFile = 0.0; - - { - std::vector widthResultValues; - { - auto nameUnit = widthParameterNameAndUnit(); - widthResultValues = fractureGridResultsForUnitSystem( nameUnit.first, - nameUnit.second, - m_activeTimeStepIndex, - fractureTemplateUnit() ); - } - - std::vector conductivityResultValues; - { - auto nameUnit = conductivityParameterNameAndUnit(); - conductivityResultValues = fractureGridResultsForUnitSystem( nameUnit.first, - nameUnit.second, - m_activeTimeStepIndex, - fractureTemplateUnit() ); - } - - std::vector betaFactorResultValues; - { - auto nameUnit = betaFactorParameterNameAndUnit(); - betaFactorResultValues = m_stimPlanFractureDefinitionData->fractureGridResults( nameUnit.first, - nameUnit.second, - m_activeTimeStepIndex ); - } - - RiaWeightedMeanCalculator widthCalc; - RiaWeightedMeanCalculator conductivityCalc; - RiaWeightedGeometricMeanCalculator betaFactorCalc; - - RigWellPathStimplanIntersector intersector( rimWellPath->wellPathGeometry(), fractureInstance ); - for ( const auto& v : intersector.intersections() ) - { - size_t fractureGlobalCellIndex = v.first; - double intersectionLength = v.second.computeLength(); - - if ( fractureGlobalCellIndex < widthResultValues.size() ) - { - widthCalc.addValueAndWeight( widthResultValues[fractureGlobalCellIndex], intersectionLength ); - } - - if ( fractureGlobalCellIndex < conductivityResultValues.size() ) - { - conductivityCalc.addValueAndWeight( conductivityResultValues[fractureGlobalCellIndex], - intersectionLength ); - } - - if ( fractureGlobalCellIndex < betaFactorResultValues.size() ) - { - double nativeBetaFactor = betaFactorResultValues[fractureGlobalCellIndex]; - - // Guard against zero beta values, as these values will set the geometric mean to zero - // Consider using the conductivity threshold instead of a local beta threshold - const double threshold = 1e-6; - if ( fabs( nativeBetaFactor ) > threshold ) - { - betaFactorCalc.addValueAndWeight( nativeBetaFactor, intersectionLength ); - } - } - } - if ( conductivityCalc.validAggregatedWeight() ) - { - weightedConductivity = conductivityCalc.weightedMean(); - } - if ( widthCalc.validAggregatedWeight() ) - { - weightedWidth = widthCalc.weightedMean(); - totalLength = widthCalc.aggregatedWeight(); - } - if ( betaFactorCalc.validAggregatedWeight() ) - { - weightedBetaFactorOnFile = betaFactorCalc.weightedMean(); - } - } - - if ( totalLength > 1e-7 ) - { - values.m_width = weightedWidth; - values.m_conductivity = weightedConductivity; - - double conversionFactorForBeta = conversionFactorForBetaValues(); - double betaFactorForcheimer = weightedBetaFactorOnFile / conversionFactorForBeta; - - values.m_betaFactorInForcheimerUnits = betaFactorForcheimer; - } - - values.m_permeability = RigTransmissibilityEquations::permeability( weightedConductivity, weightedWidth ); - } - } - else - { - std::pair wellCellIJ = fractureGrid->fractureCellAtWellCenter(); - size_t wellCellIndex = fractureGrid->getGlobalIndexFromIJ( wellCellIJ.first, wellCellIJ.second ); - const RigFractureCell& wellCell = fractureGrid->cellFromIndex( wellCellIndex ); - - double conductivity = wellCell.getConductivityValue(); - values.m_conductivity = conductivity; - - { - auto nameUnit = widthParameterNameAndUnit(); - if ( !nameUnit.first.isEmpty() ) - { - double widthInRequiredUnit = HUGE_VAL; - { - auto resultValues = fractureGridResultsForUnitSystem( nameUnit.first, - nameUnit.second, - m_activeTimeStepIndex, - fractureTemplateUnit() ); - - if ( wellCellIndex < resultValues.size() ) - { - widthInRequiredUnit = resultValues[wellCellIndex]; - } - } - - if ( widthInRequiredUnit != HUGE_VAL && fabs( widthInRequiredUnit ) > 1e-20 ) - { - values.m_width = widthInRequiredUnit; - values.m_permeability = RigTransmissibilityEquations::permeability( conductivity, widthInRequiredUnit ); - } - } - } - - { - auto nameUnit = betaFactorParameterNameAndUnit(); - std::vector betaFactorResultValues = - m_stimPlanFractureDefinitionData->fractureGridResults( nameUnit.first, - nameUnit.second, - m_activeTimeStepIndex ); - - if ( wellCellIndex < betaFactorResultValues.size() ) - { - double nativeBetaValue = betaFactorResultValues[wellCellIndex]; - - double conversionFactorForBeta = conversionFactorForBetaValues(); - double betaFactorForcheimer = nativeBetaValue / conversionFactorForBeta; - - values.m_betaFactorInForcheimerUnits = betaFactorForcheimer; - } - } - } - - return values; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -829,17 +505,6 @@ void RimStimPlanFractureTemplate::convertToUnitSystem( RiaDefines::EclipseUnitSy } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimStimPlanFractureTemplate::onLoadDataAndUpdateGeometryHasChanged() -{ - loadDataAndUpdate(); - - RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews(); - RiaCompletionTypeCalculationScheduler::instance()->scheduleRecalculateCompletionTypeAndRedrawAllViews(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -964,25 +629,6 @@ double RimStimPlanFractureTemplate::resultValueAtIJ( const RigFractureGrid* frac return values[adjustedJ][adjustedI]; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RimStimPlanFractureTemplate::widthResultValues() const -{ - std::vector resultValues; - - auto nameUnit = widthParameterNameAndUnit(); - if ( !nameUnit.first.isEmpty() ) - { - resultValues = fractureGridResultsForUnitSystem( nameUnit.first, - nameUnit.second, - m_activeTimeStepIndex, - fractureTemplateUnit() ); - } - - return resultValues; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1025,49 +671,22 @@ void RimStimPlanFractureTemplate::fractureTriangleGeometry( std::vectoradd( &m_stimPlanFileName ); - group->add( &m_activeTimeStepIndex ); - group->add( &m_userDefinedWellPathDepthAtFracture ); - group->add( &m_wellPathDepthAtFracture ); - - m_wellPathDepthAtFracture.uiCapability()->setUiReadOnly( !m_userDefinedWellPathDepthAtFracture() ); - } - - { - caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Geometry" ); - group->add( &m_orientationType ); - group->add( &m_azimuthAngle ); - } - - { - caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Fracture Truncation" ); - group->setCollapsedByDefault( true ); - m_fractureContainment()->uiOrdering( uiConfigName, *group ); - } - - { - caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Properties" ); - group->add( &m_conductivityResultNameOnFile ); - group->add( &m_conductivityType ); - group->add( &m_skinFactor ); - group->add( &m_perforationLength ); - group->add( &m_perforationEfficiency ); - group->add( &m_wellDiameter ); - } + RimMeshFractureTemplate::defineUiOrdering( uiConfigName, uiOrdering ); uiOrdering.add( &m_propertiesTable ); - if ( widthResultValues().empty() ) - { - m_fractureWidthType = USER_DEFINED_WIDTH; - } + // if ( widthResultValues().empty() ) + // { + // m_fractureWidthType = USER_DEFINED_WIDTH; + // } +} - RimFractureTemplate::defineUiOrdering( uiConfigName, uiOrdering ); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimStimPlanFractureTemplate::getFileSelectionFilter() const +{ + return "StimPlan Xml Files(*.xml);;All Files (*.*)"; } //-------------------------------------------------------------------------------------------------- @@ -1077,16 +696,7 @@ void RimStimPlanFractureTemplate::defineEditorAttribute( const caf::PdmFieldHand QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) { - RimFractureTemplate::defineEditorAttribute( field, uiConfigName, attribute ); - - if ( field == &m_stimPlanFileName ) - { - caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast( attribute ); - if ( myAttr ) - { - myAttr->m_fileSelectionFilter = "StimPlan Xml Files(*.xml);;All Files (*.*)"; - } - } + RimMeshFractureTemplate::defineEditorAttribute( field, uiConfigName, attribute ); if ( field == &m_propertiesTable ) { diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.h b/ApplicationLibCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.h index f1290b2e62..6208eff167 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.h +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.h @@ -7,8 +7,8 @@ // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY -// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// ResInsight is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. // // See the GNU General Public License at @@ -17,7 +17,7 @@ ///////////////////////////////////////////////////////////////////////////////// #pragma once -#include "RimFractureTemplate.h" +#include "RimMeshFractureTemplate.h" #include "cafAppEnum.h" #include "cafPdmChildArrayField.h" @@ -45,7 +45,7 @@ class RigFractureGrid; /// /// //================================================================================================== -class RimStimPlanFractureTemplate : public RimFractureTemplate +class RimStimPlanFractureTemplate : public RimMeshFractureTemplate { CAF_PDM_HEADER_INIT; @@ -53,13 +53,8 @@ public: RimStimPlanFractureTemplate(); ~RimStimPlanFractureTemplate() override; - int activeTimeStepIndex(); - void loadDataAndUpdate() override; - void setDefaultsBasedOnXMLfile(); - - void setFileName( const QString& fileName ); - QString fileName(); + void setDefaultsBasedOnFile() override; std::pair wellPathDepthAtFractureRange() const override; QString wellPathDepthAtFractureUiName() const override; @@ -73,61 +68,39 @@ public: // Result Access - std::vector timeSteps(); + std::vector timeSteps() override; std::vector> uiResultNamesWithUnit() const override; std::vector> - resultValues( const QString& uiResultName, const QString& unitName, size_t timeStepIndex ) const; - std::vector fractureGridResults( const QString& resultName, const QString& unitName, size_t timeStepIndex ) const; - bool hasConductivity() const; - double resultValueAtIJ( const RigFractureGrid* fractureGrid, - const QString& uiResultName, - const QString& unitName, - size_t timeStepIndex, - size_t i, - size_t j ); - - std::vector widthResultValues() const; + resultValues( const QString& uiResultName, const QString& unitName, size_t timeStepIndex ) const override; + std::vector + fractureGridResults( const QString& resultName, const QString& unitName, size_t timeStepIndex ) const override; + bool hasConductivity() const override; + double resultValueAtIJ( const RigFractureGrid* fractureGrid, + const QString& uiResultName, + const QString& unitName, + size_t timeStepIndex, + size_t i, + size_t j ) override; void appendDataToResultStatistics( const QString& uiResultName, const QString& unit, MinMaxAccumulator& minMaxAccumulator, PosNegAccumulator& posNegAccumulator ) const override; - QString mapUiResultNameToFileResultName( const QString& uiResultName ) const; - - void convertToUnitSystem( RiaDefines::EclipseUnitSystem neededUnit ) override; - - double formationDip() const; - - static std::pair widthParameterNameAndUnit( cvf::ref def ); - -protected: - void initAfterRead() override; - -private: - void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; - QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; - void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; - void defineEditorAttribute( const caf::PdmFieldHandle* field, - QString uiConfigName, - caf::PdmUiEditorAttribute* attribute ) override; - void onLoadDataAndUpdateGeometryHasChanged() override; - void setDefaultConductivityResultIfEmpty(); bool setBorderPolygonResultNameToDefault(); + void computeDepthOfWellPathAtFracture(); void computePerforationLength(); std::vector fractureGridResultsForUnitSystem( const QString& resultName, const QString& unitName, size_t timeStepIndex, - RiaDefines::EclipseUnitSystem requiredUnitSystem ) const; + RiaDefines::EclipseUnitSystem requiredUnitSystem ) const override; - WellFractureIntersectionData wellFractureIntersectionData( const RimFracture* fractureInstance ) const override; - - std::pair widthParameterNameAndUnit() const; - std::pair conductivityParameterNameAndUnit() const; - std::pair betaFactorParameterNameAndUnit() const; + std::pair widthParameterNameAndUnit() const override; + std::pair conductivityParameterNameAndUnit() const override; + std::pair betaFactorParameterNameAndUnit() const override; bool isBetaFactorAvailableOnFile() const override; double conversionFactorForBetaValues() const; @@ -138,16 +111,26 @@ private: double value, RigEnsembleFractureStatisticsCalculator::PropertyType propertyType ); + QString mapUiResultNameToFileResultName( const QString& uiResultName ) const; + void convertToUnitSystem( RiaDefines::EclipseUnitSystem neededUnit ) override; + + double formationDip() const; + + static std::pair widthParameterNameAndUnit( cvf::ref def ); + +protected: + void initAfterRead() override; + + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + void defineEditorAttribute( const caf::PdmFieldHandle* field, + QString uiConfigName, + caf::PdmUiEditorAttribute* attribute ) override; + + QString getFileSelectionFilter() const override; + QStringList conductivityResultNames() const override; + private: - caf::PdmField m_activeTimeStepIndex; - caf::PdmField m_conductivityResultNameOnFile; - - caf::PdmField m_userDefinedWellPathDepthAtFracture; - caf::PdmField m_borderPolygonResultName; - - caf::PdmField m_stimPlanFileName; cvf::ref m_stimPlanFractureDefinitionData; - bool m_readError; caf::PdmField m_propertiesTable;