#11871 Remove simulation well fractures and completion export

This commit is contained in:
Magne Sjaastad 2025-02-03 18:19:03 +01:00 committed by GitHub
parent 0c8a056b0d
commit 28d3050433
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
34 changed files with 28 additions and 1524 deletions

View File

@ -5,7 +5,6 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicfExportMsw.h ${CMAKE_CURRENT_LIST_DIR}/RicfExportMsw.h
${CMAKE_CURRENT_LIST_DIR}/RicfExportMultiCaseSnapshots.h ${CMAKE_CURRENT_LIST_DIR}/RicfExportMultiCaseSnapshots.h
${CMAKE_CURRENT_LIST_DIR}/RicfExportProperty.h ${CMAKE_CURRENT_LIST_DIR}/RicfExportProperty.h
${CMAKE_CURRENT_LIST_DIR}/RicfExportSimWellFractureCompletions.h
${CMAKE_CURRENT_LIST_DIR}/RicfExportSnapshots.h ${CMAKE_CURRENT_LIST_DIR}/RicfExportSnapshots.h
${CMAKE_CURRENT_LIST_DIR}/RicfExportWellPathCompletions.h ${CMAKE_CURRENT_LIST_DIR}/RicfExportWellPathCompletions.h
${CMAKE_CURRENT_LIST_DIR}/RicfLoadCase.h ${CMAKE_CURRENT_LIST_DIR}/RicfLoadCase.h
@ -46,7 +45,6 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicfExportMsw.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfExportMsw.cpp
${CMAKE_CURRENT_LIST_DIR}/RicfExportMultiCaseSnapshots.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfExportMultiCaseSnapshots.cpp
${CMAKE_CURRENT_LIST_DIR}/RicfExportProperty.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfExportProperty.cpp
${CMAKE_CURRENT_LIST_DIR}/RicfExportSimWellFractureCompletions.cpp
${CMAKE_CURRENT_LIST_DIR}/RicfExportSnapshots.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfExportSnapshots.cpp
${CMAKE_CURRENT_LIST_DIR}/RicfExportWellPathCompletions.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfExportWellPathCompletions.cpp
${CMAKE_CURRENT_LIST_DIR}/RicfLoadCase.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfLoadCase.cpp

View File

@ -1,156 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicfExportSimWellFractureCompletions.h"
#include "RicfApplicationTools.h"
#include "RicfCommandFileExecutor.h"
#include "RiaApplication.h"
#include "RiaLogging.h"
#include "RimDialogData.h"
#include "RimEclipseCase.h"
#include "RimEclipseCaseCollection.h"
#include "RimEclipseView.h"
#include "RimOilField.h"
#include "RimProject.h"
#include "RimSimWellInView.h"
#include "RimSimWellInViewCollection.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.h"
#include "cafPdmFieldScriptingCapability.h"
CAF_PDM_SOURCE_INIT( RicfExportSimWellFractureCompletions, "exportSimWellFractureCompletions" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RicfExportSimWellFractureCompletions::RicfExportSimWellFractureCompletions()
{
CAF_PDM_InitScriptableField( &m_caseId, "caseId", -1, "Case ID" );
CAF_PDM_InitScriptableField( &m_viewId, "viewId", -1, "View ID" );
CAF_PDM_InitScriptableField( &m_viewName, "viewName", QString( "" ), "View Name" );
CAF_PDM_InitScriptableField( &m_timeStep, "timeStep", -1, "Time Step Index" );
CAF_PDM_InitScriptableField( &m_simWellNames, "simulationWellNames", std::vector<QString>(), "Simulation Well Names" );
CAF_PDM_InitScriptableField( &m_fileSplit, "fileSplit", RicExportCompletionDataSettingsUi::ExportSplitType(), "File Split" );
CAF_PDM_InitScriptableField( &m_compdatExport, "compdatExport", RicExportCompletionDataSettingsUi::CompdatExportType(), "Compdat Export" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmScriptResponse RicfExportSimWellFractureCompletions::execute()
{
using TOOLS = RicfApplicationTools;
RicExportCompletionDataSettingsUi exportSettings;
exportSettings.timeStep = m_timeStep;
exportSettings.fileSplit = m_fileSplit;
exportSettings.compdatExport = m_compdatExport;
exportSettings.setExportDataSourceAsComment( true );
{
auto eclipseCase = TOOLS::caseFromId( m_caseId() );
if ( !eclipseCase )
{
QString error = QString( "exportSimWellCompletions: Could not find case with ID %1" ).arg( m_caseId() );
RiaLogging::error( error );
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
exportSettings.caseToApply = eclipseCase;
}
QString exportFolder = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
if ( exportFolder.isNull() )
{
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "completions" );
}
exportSettings.folder = exportFolder;
std::vector<RimEclipseView*> views;
for ( Rim3dView* v : exportSettings.caseToApply->views() )
{
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( v );
if ( eclipseView && ( eclipseView->id() == m_viewId() || eclipseView->name() == m_viewName() ) )
{
views.push_back( eclipseView );
}
}
if ( views.empty() )
{
QString error = QString( "exportSimWellCompletions: Could not find any views with id %1 or named \"%2\" in the "
"case with ID %3" )
.arg( m_viewId )
.arg( m_viewName )
.arg( m_caseId() );
RiaLogging::error( error );
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
caf::PdmScriptResponse response;
std::vector<RimSimWellInView*> simWells;
if ( m_simWellNames().empty() )
{
for ( RimEclipseView* view : views )
{
for ( auto simWell : view->wellCollection()->wells )
{
if ( simWell->showWell() )
{
simWells.push_back( simWell );
}
}
}
}
else
{
for ( const QString& wellPathName : m_simWellNames() )
{
for ( RimEclipseView* view : views )
{
RimSimWellInView* simWell = view->wellCollection()->findWell( wellPathName );
if ( simWell )
{
simWells.push_back( simWell );
}
else
{
QString warning = QString( "exportSimWellCompletions: Could not find well with name %1 in view "
"\"%2\" on case with ID %2" )
.arg( wellPathName )
.arg( m_viewName )
.arg( m_caseId() );
RiaLogging::warning( warning );
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
}
}
}
}
std::vector<RimWellPath*> wellPaths;
RicWellPathExportCompletionDataFeatureImpl::exportCompletions( wellPaths, simWells, exportSettings );
return response;
}

View File

@ -1,50 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "RicfCommandObject.h"
#include "CompletionExportCommands/RicExportCompletionDataSettingsUi.h"
#include "cafPdmField.h"
//==================================================================================================
//
//
//
//==================================================================================================
class RicfExportSimWellFractureCompletions : public RicfCommandObject
{
CAF_PDM_HEADER_INIT;
public:
RicfExportSimWellFractureCompletions();
caf::PdmScriptResponse execute() override;
private:
caf::PdmField<int> m_caseId;
caf::PdmField<int> m_viewId;
caf::PdmField<QString> m_viewName;
caf::PdmField<int> m_timeStep;
caf::PdmField<std::vector<QString>> m_simWellNames;
caf::PdmField<RicExportCompletionDataSettingsUi::ExportSplitType> m_fileSplit;
caf::PdmField<RicExportCompletionDataSettingsUi::CompdatExportType> m_compdatExport;
};

View File

@ -187,9 +187,7 @@ caf::PdmScriptResponse RicfExportWellPathCompletions::execute()
} }
} }
std::vector<RimSimWellInView*> simWells; RicWellPathExportCompletionDataFeatureImpl::exportCompletions( wellPaths, exportSettings );
RicWellPathExportCompletionDataFeatureImpl::exportCompletions( wellPaths, simWells, exportSettings );
return response; return response;
} }

View File

@ -9,7 +9,6 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.h ${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.h
${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.h ${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.h
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleWellPathsFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleWellPathsFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleSimWellsFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicMswBranch.h ${CMAKE_CURRENT_LIST_DIR}/RicMswBranch.h
${CMAKE_CURRENT_LIST_DIR}/RicMswCompletions.h ${CMAKE_CURRENT_LIST_DIR}/RicMswCompletions.h
${CMAKE_CURRENT_LIST_DIR}/RicMswExportInfo.h ${CMAKE_CURRENT_LIST_DIR}/RicMswExportInfo.h
@ -34,7 +33,6 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.cpp ${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.cpp
${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.cpp ${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleWellPathsFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleWellPathsFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleSimWellsFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicMswBranch.cpp ${CMAKE_CURRENT_LIST_DIR}/RicMswBranch.cpp
${CMAKE_CURRENT_LIST_DIR}/RicMswCompletions.cpp ${CMAKE_CURRENT_LIST_DIR}/RicMswCompletions.cpp
${CMAKE_CURRENT_LIST_DIR}/RicMswExportInfo.cpp ${CMAKE_CURRENT_LIST_DIR}/RicMswExportInfo.cpp

View File

@ -112,8 +112,6 @@ RicExportCompletionDataSettingsUi::RicExportCompletionDataSettingsUi()
CAF_PDM_InitField( &m_useCustomFileName, "UseCustomFileName", false, "Use Custom Filename" ); CAF_PDM_InitField( &m_useCustomFileName, "UseCustomFileName", false, "Use Custom Filename" );
CAF_PDM_InitField( &m_customFileName, "CustomFileName", {}, "Custom Filename" ); CAF_PDM_InitField( &m_customFileName, "CustomFileName", {}, "Custom Filename" );
m_displayForSimWell = true;
m_fracturesEnabled = true; m_fracturesEnabled = true;
m_perforationsEnabled = true; m_perforationsEnabled = true;
m_fishbonesEnabled = true; m_fishbonesEnabled = true;
@ -127,22 +125,6 @@ void RicExportCompletionDataSettingsUi::enableIncludeMsw()
includeMsw = true; includeMsw = true;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportCompletionDataSettingsUi::showForSimWells()
{
m_displayForSimWell = true;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportCompletionDataSettingsUi::showForWellPath()
{
m_displayForSimWell = false;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -381,17 +363,14 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering( QString uiConfigName,
{ {
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Completions Export Selection" ); caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Completions Export Selection" );
if ( !m_displayForSimWell ) if ( m_perforationsEnabled )
{ {
if ( m_perforationsEnabled ) group->add( &includePerforations );
{ group->add( &timeStep );
group->add( &includePerforations ); if ( !includePerforations )
group->add( &timeStep ); timeStep.uiCapability()->setUiReadOnly( true );
if ( !includePerforations ) else
timeStep.uiCapability()->setUiReadOnly( true ); timeStep.uiCapability()->setUiReadOnly( false );
else
timeStep.uiCapability()->setUiReadOnly( false );
}
} }
if ( m_fracturesEnabled ) if ( m_fracturesEnabled )
@ -442,19 +421,16 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering( QString uiConfigName,
!includeMsw ); !includeMsw );
} }
if ( !m_displayForSimWell ) if ( m_fishbonesEnabled )
{ {
if ( m_fishbonesEnabled ) group->add( &includeFishbones );
{ group->add( &excludeMainBoreForFishbones );
group->add( &includeFishbones );
group->add( &excludeMainBoreForFishbones );
// Set visibility // Set visibility
if ( !includeFishbones ) if ( !includeFishbones )
excludeMainBoreForFishbones.uiCapability()->setUiReadOnly( true ); excludeMainBoreForFishbones.uiCapability()->setUiReadOnly( true );
else else
excludeMainBoreForFishbones.uiCapability()->setUiReadOnly( false ); excludeMainBoreForFishbones.uiCapability()->setUiReadOnly( false );
}
} }
} }

View File

@ -81,8 +81,6 @@ public:
caf::PdmField<bool> includeFractures; caf::PdmField<bool> includeFractures;
void enableIncludeMsw(); void enableIncludeMsw();
void showForSimWells();
void showForWellPath();
void setCombinationMode( CombinationMode combinationMode ); void setCombinationMode( CombinationMode combinationMode );
@ -121,7 +119,6 @@ private:
caf::PdmField<bool> m_useCustomFileName; caf::PdmField<bool> m_useCustomFileName;
caf::PdmField<QString> m_customFileName; caf::PdmField<QString> m_customFileName;
bool m_displayForSimWell;
bool m_fracturesEnabled; bool m_fracturesEnabled;
bool m_perforationsEnabled; bool m_perforationsEnabled;
bool m_fishbonesEnabled; bool m_fishbonesEnabled;

View File

@ -61,10 +61,8 @@ void RicExportCompletionsForTemporaryLgrsFeature::onActionTriggered( bool isChec
return; return;
} }
std::vector<RimSimWellInView*> simWells; QString dialogTitle = "Export Completion Data for Temporary LGRs";
QString dialogTitle = "Export Completion Data for Temporary LGRs"; RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths );
RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths, simWells );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -1,107 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicExportCompletionsForVisibleSimWellsFeature.h"
#include "RicWellPathExportCompletionDataFeature.h"
#include "RimSimWellInView.h"
#include "RimSimWellInViewCollection.h"
#include "cafSelectionManager.h"
#include <QAction>
CAF_CMD_SOURCE_INIT( RicExportCompletionsForVisibleSimWellsFeature, "RicExportCompletionsForVisibleSimWellsFeature" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicExportCompletionsForVisibleSimWellsFeature::isCommandEnabled() const
{
std::vector<RimSimWellInView*> simWells = visibleSimWells();
return !simWells.empty();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportCompletionsForVisibleSimWellsFeature::onActionTriggered( bool isChecked )
{
std::vector<RimSimWellInView*> simWells = visibleSimWells();
CVF_ASSERT( !simWells.empty() );
std::vector<RimWellPath*> wellPaths;
QString dialogTitle = "Export Completion Data for Visible Simulation Wells";
RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths, simWells );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportCompletionsForVisibleSimWellsFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "Export Completion Data for Visible Simulation Wells" );
actionToSetup->setIcon( QIcon( ":/ExportCompletionsSymbol16x16.png" ) );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimSimWellInView*> RicExportCompletionsForVisibleSimWellsFeature::visibleSimWells()
{
std::vector<RimSimWellInView*> simWells;
{
std::vector<RimSimWellInViewCollection*> simWellCollection;
caf::SelectionManager::instance()->objectsByType( &simWellCollection );
if ( simWellCollection.empty() )
{
std::vector<RimSimWellInView*> selectedSimWells;
caf::SelectionManager::instance()->objectsByType( &selectedSimWells );
if ( !selectedSimWells.empty() )
{
RimSimWellInViewCollection* parent = selectedSimWells[0]->firstAncestorOrThisOfType<RimSimWellInViewCollection>();
if ( parent )
{
simWellCollection.push_back( parent );
}
}
}
for ( auto coll : simWellCollection )
{
for ( const auto& wellPath : coll->wells() )
{
if ( wellPath->showWell() )
{
simWells.push_back( wellPath );
}
}
}
}
std::set<RimSimWellInView*> uniqueWellPaths( simWells.begin(), simWells.end() );
simWells.assign( uniqueWellPaths.begin(), uniqueWellPaths.end() );
return simWells;
}

View File

@ -1,39 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafCmdFeature.h"
class RimSimWellInView;
//==================================================================================================
///
//==================================================================================================
class RicExportCompletionsForVisibleSimWellsFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
bool isCommandEnabled() const override;
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
private:
static std::vector<RimSimWellInView*> visibleSimWells();
};

View File

@ -71,10 +71,8 @@ void RicExportCompletionsForVisibleWellPathsFeature::onActionTriggered( bool isC
std::vector<RimWellPath*> wellPaths = visibleWellPaths(); std::vector<RimWellPath*> wellPaths = visibleWellPaths();
if ( wellPaths.empty() ) return RiaLogging::warning( "No visible well paths found, no data exported." ); if ( wellPaths.empty() ) return RiaLogging::warning( "No visible well paths found, no data exported." );
std::vector<RimSimWellInView*> simWells; QString dialogTitle = "Export Completion Data for Visible Well Paths";
QString dialogTitle = "Export Completion Data for Visible Well Paths"; RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths );
RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths, simWells );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -35,9 +35,6 @@
#include "RimObservedEclipseUserData.h" #include "RimObservedEclipseUserData.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimReloadCaseTools.h" #include "RimReloadCaseTools.h"
#include "RimSimWellFracture.h"
#include "RimSimWellFractureCollection.h"
#include "RimSimWellInView.h"
#include "RimStimPlanFractureTemplate.h" #include "RimStimPlanFractureTemplate.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimWellPath.h" #include "RimWellPath.h"
@ -97,46 +94,6 @@ std::vector<RigCompletionData>
pdParams ); pdParams );
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RigCompletionData>
RicExportFractureCompletionsImpl::generateCompdatValuesForSimWell( RimEclipseCase* eclipseCase,
const RimSimWellInView* well,
QTextStream* outputStreamForIntermediateResultsText,
PressureDepletionParameters pdParams )
{
std::vector<RigCompletionData> completionData;
auto branches = well->wellPipeBranches();
for ( size_t branchIndex = 0; branchIndex < branches.size(); ++branchIndex )
{
std::vector<const RimFracture*> fractures;
for ( RimSimWellFracture* fracture : well->simwellFractureCollection->simwellFractures() )
{
if ( fracture->isChecked() && static_cast<size_t>( fracture->branchIndex() ) == branchIndex )
{
fracture->ensureValidNonDarcyProperties();
fractures.push_back( fracture );
}
}
std::vector<RigCompletionData> branchCompletions = generateCompdatValues( eclipseCase,
well->name(),
branches[branchIndex],
fractures,
nullptr,
outputStreamForIntermediateResultsText,
pdParams );
completionData.insert( completionData.end(), branchCompletions.begin(), branchCompletions.end() );
}
return completionData;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -37,7 +37,6 @@ class RigCaseCellResultsData;
class RimEclipseCase; class RimEclipseCase;
class RimFracture; class RimFracture;
class RimFractureTemplate; class RimFractureTemplate;
class RimSimWellInView;
class RimWellPath; class RimWellPath;
class QTextStream; class QTextStream;
@ -84,12 +83,6 @@ public:
QTextStream* outputStreamForIntermediateResultsText, QTextStream* outputStreamForIntermediateResultsText,
PressureDepletionParameters pdParams = PressureDepletionParameters() ); PressureDepletionParameters pdParams = PressureDepletionParameters() );
static std::vector<RigCompletionData>
generateCompdatValuesForSimWell( RimEclipseCase* eclipseCase,
const RimSimWellInView* well,
QTextStream* outputStreamForIntermediateResultsText,
PressureDepletionParameters pdParams = PressureDepletionParameters() );
static std::vector<RigCompletionData> generateCompdatValues( RimEclipseCase* caseToApply, static std::vector<RigCompletionData> generateCompdatValues( RimEclipseCase* caseToApply,
const QString& wellNameForExport, const QString& wellNameForExport,
const RigWellPath* wellPathGeometry, const RigWellPath* wellPathGeometry,

View File

@ -29,9 +29,6 @@
#include "RimFishbones.h" #include "RimFishbones.h"
#include "RimPerforationInterval.h" #include "RimPerforationInterval.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSimWellFracture.h"
#include "RimSimWellInView.h"
#include "RimSimWellInViewCollection.h"
#include "RimWellPath.h" #include "RimWellPath.h"
#include "RimWellPathCollection.h" #include "RimWellPathCollection.h"
#include "RimWellPathCompletions.h" #include "RimWellPathCompletions.h"
@ -51,9 +48,8 @@ CAF_CMD_SOURCE_INIT( RicWellPathExportCompletionDataFeature, "RicWellPathExportC
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( const QString& dialogTitle, void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( const QString& dialogTitle,
const std::vector<RimWellPath*>& wellPaths, const std::vector<RimWellPath*>& wellPaths )
const std::vector<RimSimWellInView*>& simWells )
{ {
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
RimProject* project = app->project(); RimProject* project = app->project();
@ -61,15 +57,6 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData(); RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData();
if ( wellPaths.empty() )
{
exportSettings->showForSimWells();
}
else
{
exportSettings->showForWellPath();
}
if ( !exportSettings->caseToApply() ) if ( !exportSettings->caseToApply() )
{ {
std::vector<RimCase*> cases = app->project()->allGridCases(); std::vector<RimCase*> cases = app->project()->allGridCases();
@ -86,17 +73,10 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
if ( exportSettings->folder().isEmpty() ) exportSettings->folder = defaultDir; if ( exportSettings->folder().isEmpty() ) exportSettings->folder = defaultDir;
std::vector<RimSimWellFracture*> simWellFractures;
std::vector<RimWellPathFracture*> wellPathFractures; std::vector<RimWellPathFracture*> wellPathFractures;
std::vector<RimFishbones*> wellPathFishbones; std::vector<RimFishbones*> wellPathFishbones;
std::vector<RimPerforationInterval*> wellPathPerforations; std::vector<RimPerforationInterval*> wellPathPerforations;
for ( auto s : simWells )
{
auto fratures = s->descendantsIncludingThisOfType<RimSimWellFracture>();
simWellFractures.insert( simWellFractures.end(), fratures.begin(), fratures.end() );
}
std::vector<RimWellPath*> topLevelWells; std::vector<RimWellPath*> topLevelWells;
{ {
std::set<RimWellPath*> myWells; std::set<RimWellPath*> myWells;
@ -137,7 +117,7 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
wellPathPerforations.insert( wellPathPerforations.end(), perforations.begin(), perforations.end() ); wellPathPerforations.insert( wellPathPerforations.end(), perforations.begin(), perforations.end() );
} }
if ( ( !simWellFractures.empty() ) || ( !wellPathFractures.empty() ) ) if ( !wellPathFractures.empty() )
{ {
exportSettings->showFractureInUi( true ); exportSettings->showFractureInUi( true );
} }
@ -194,7 +174,7 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
RiaApplication::instance()->setLastUsedDialogDirectory( "COMPLETIONS", exportSettings->folder ); RiaApplication::instance()->setLastUsedDialogDirectory( "COMPLETIONS", exportSettings->folder );
RicWellPathExportCompletionDataFeatureImpl::exportCompletions( topLevelWells, simWells, *exportSettings ); RicWellPathExportCompletionDataFeatureImpl::exportCompletions( topLevelWells, *exportSettings );
} }
} }
@ -216,10 +196,8 @@ void RicWellPathExportCompletionDataFeature::onActionTriggered( bool isChecked )
std::vector<RimWellPath*> wellPaths = selectedWellPaths(); std::vector<RimWellPath*> wellPaths = selectedWellPaths();
CVF_ASSERT( !wellPaths.empty() ); CVF_ASSERT( !wellPaths.empty() );
std::vector<RimSimWellInView*> simWells; QString dialogTitle = "Export Completion Data for Selected Well Paths";
QString dialogTitle = "Export Completion Data for Selected Well Paths"; RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths );
RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths, simWells );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -31,9 +31,7 @@ class RicWellPathExportCompletionDataFeature : public caf::CmdFeature
CAF_CMD_HEADER_INIT; CAF_CMD_HEADER_INIT;
public: public:
static void prepareExportSettingsAndExportCompletions( const QString& dialogTitle, static void prepareExportSettingsAndExportCompletions( const QString& dialogTitle, const std::vector<RimWellPath*>& wellPaths );
const std::vector<RimWellPath*>& wellPaths,
const std::vector<RimSimWellInView*>& simWells );
protected: protected:
bool isCommandEnabled() const override; bool isCommandEnabled() const override;

View File

@ -88,7 +88,6 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::vector<RimWellPath*>& wellPaths, void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::vector<RimWellPath*>& wellPaths,
const std::vector<RimSimWellInView*>& simWells,
const RicExportCompletionDataSettingsUi& exportSettings ) const RicExportCompletionDataSettingsUi& exportSettings )
{ {
if ( exportSettings.caseToApply() == nullptr ) if ( exportSettings.caseToApply() == nullptr )
@ -281,28 +280,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
} }
} }
for ( auto simWell : simWells )
{
std::map<size_t, std::vector<RigCompletionData>> completionsPerEclipseCell;
std::vector<RigCompletionData> fractureCompletionData = RicExportFractureCompletionsImpl::
generateCompdatValuesForSimWell( exportSettings.caseToApply(),
simWell,
fractureTransmissibilityExportInformationStream.get(),
RicExportFractureCompletionsImpl::
PressureDepletionParameters( exportSettings.performTransScaling(),
exportSettings.transScalingTimeStep(),
exportSettings.transScalingWBHPSource(),
exportSettings.transScalingWBHP() ) );
appendCompletionData( &completionsPerEclipseCell, fractureCompletionData );
for ( auto& data : completionsPerEclipseCell )
{
completions.push_back( combineEclipseCellCompletions( data.second, exportSettings ) );
}
}
const QString eclipseCaseName = exportSettings.caseToApply->caseUserDescription(); const QString eclipseCaseName = exportSettings.caseToApply->caseUserDescription();
if ( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::ExportSplit::UNIFIED_FILE ) if ( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::ExportSplit::UNIFIED_FILE )
@ -413,35 +390,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
} }
} }
} }
// Export sim wells
if ( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL ||
exportSettings.fileSplit == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL_AND_COMPLETION_TYPE )
{
for ( auto simWell : simWells )
{
std::vector<RigCompletionData> wellCompletions;
for ( const auto& completion : completions )
{
if ( completion.wellName() == simWell->name() )
{
wellCompletions.push_back( completion );
}
}
if ( wellCompletions.empty() ) continue;
QString fileName = QString( "%1_Fractures_%2" ).arg( simWell->name() ).arg( eclipseCaseName );
sortAndExportCompletionsToFile( exportSettings.caseToApply,
exportSettings.folder,
fileName,
wellCompletions,
fractureDataReportItems,
exportSettings.compdatExport,
exportSettings.exportDataSourceAsComment(),
exportSettings.exportWelspec() );
}
}
} }
if ( exportSettings.includeMsw ) if ( exportSettings.includeMsw )

View File

@ -38,7 +38,6 @@ class RigEclipseCaseData;
class RigMainGrid; class RigMainGrid;
class RimEclipseCase; class RimEclipseCase;
class RimFishbones; class RimFishbones;
class RimSimWellInView;
class RimPerforationInterval; class RimPerforationInterval;
class RimWellPath; class RimWellPath;
class RimWellPathValve; class RimWellPathValve;
@ -117,9 +116,7 @@ public:
const RimNonDarcyPerforationParameters* nonDarcyParameters, const RimNonDarcyPerforationParameters* nonDarcyParameters,
const double effectivePermeability ); const double effectivePermeability );
static void exportCompletions( const std::vector<RimWellPath*>& wellPaths, static void exportCompletions( const std::vector<RimWellPath*>& wellPaths, const RicExportCompletionDataSettingsUi& exportSettings );
const std::vector<RimSimWellInView*>& simWells,
const RicExportCompletionDataSettingsUi& exportSettings );
static std::vector<RigCompletionData> computeStaticCompletionsForWellPath( RimWellPath* wellPath, RimEclipseCase* eclipseCase ); static std::vector<RigCompletionData> computeStaticCompletionsForWellPath( RimWellPath* wellPath, RimEclipseCase* eclipseCase );

View File

@ -6,8 +6,6 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicCreateDuplicateTemplateInOtherUnitSystemFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicCreateDuplicateTemplateInOtherUnitSystemFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicFractureNameGenerator.h ${CMAKE_CURRENT_LIST_DIR}/RicFractureNameGenerator.h
${CMAKE_CURRENT_LIST_DIR}/RicNewEllipseFractureTemplateFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewEllipseFractureTemplateFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicNewSimWellFractureAtPosFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicNewSimWellFractureFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanFractureTemplateFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanFractureTemplateFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicNewThermalFractureTemplateFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewThermalFractureTemplateFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureAtPosFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureAtPosFeature.h
@ -32,8 +30,6 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicCreateDuplicateTemplateInOtherUnitSystemFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicCreateDuplicateTemplateInOtherUnitSystemFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicFractureNameGenerator.cpp ${CMAKE_CURRENT_LIST_DIR}/RicFractureNameGenerator.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewEllipseFractureTemplateFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewEllipseFractureTemplateFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewSimWellFractureAtPosFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewSimWellFractureFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanFractureTemplateFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanFractureTemplateFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewThermalFractureTemplateFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewThermalFractureTemplateFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureAtPosFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureAtPosFeature.cpp

View File

@ -1,143 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicNewSimWellFractureAtPosFeature.h"
#include "RiaApplication.h"
#include "RigEclipseCaseData.h"
#include "Rim3dView.h"
#include "RimCase.h"
#include "RimEclipseResultCase.h"
#include "RimEclipseView.h"
#include "RimEllipseFractureTemplate.h"
#include "RimFractureTemplateCollection.h"
#include "RimOilField.h"
#include "RimProject.h"
#include "RimSimWellFracture.h"
#include "RimSimWellFractureCollection.h"
#include "RimSimWellInView.h"
#include "RimStimPlanColors.h"
#include "Riu3DMainWindowTools.h"
#include "Riu3dSelectionManager.h"
#include "RivSimWellPipeSourceInfo.h"
#include "cafSelectionManager.h"
#include "cvfAssert.h"
#include <QAction>
CAF_CMD_SOURCE_INIT( RicNewSimWellFractureAtPosFeature, "RicNewSimWellFractureAtPosFeature" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewSimWellFractureAtPosFeature::onActionTriggered( bool isChecked )
{
RimProject* proj = RimProject::current();
if ( proj->allFractureTemplates().empty() ) return;
Rim3dView* activeView = RiaApplication::instance()->activeReservoirView();
if ( !activeView ) return;
Riu3dSelectionManager* riuSelManager = Riu3dSelectionManager::instance();
RiuSelectionItem* selItem = riuSelManager->selectedItem( Riu3dSelectionManager::RUI_TEMPORARY );
RiuSimWellSelectionItem* simWellItem = static_cast<RiuSimWellSelectionItem*>( selItem );
if ( !simWellItem ) return;
RimSimWellInView* simWell = simWellItem->m_simWell;
if ( !simWell ) return;
RimSimWellFractureCollection* fractureCollection = simWell->simwellFractureCollection();
if ( !fractureCollection ) return;
RimSimWellFracture* fracture = new RimSimWellFracture();
if ( fractureCollection->simwellFractures.empty() )
{
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( RiaApplication::instance()->activeReservoirView() );
if ( eclipseView )
{
eclipseView->fractureColors()->setDefaultResultName();
}
}
fractureCollection->simwellFractures.push_back( fracture );
fracture->setClosestWellCoord( simWellItem->m_domainCoord, simWellItem->m_branchIndex );
RimOilField* oilfield = RimProject::current()->activeOilField();
if ( !oilfield ) return;
std::vector<RimFracture*> oldFractures = oilfield->descendantsIncludingThisOfType<RimFracture>();
QString fracNum = QString( "%1" ).arg( oldFractures.size(), 2, 10, QChar( '0' ) );
fracture->setName( QString( "Fracture_" ) + fracNum );
auto unitSet = RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
{
RimEclipseResultCase* eclipseCase = simWell->firstAncestorOrThisOfType<RimEclipseResultCase>();
if ( eclipseCase )
{
unitSet = eclipseCase->eclipseCaseData()->unitsType();
}
fracture->setFractureUnit( unitSet );
}
RimFractureTemplate* fracDef = oilfield->fractureDefinitionCollection()->firstFractureOfUnit( unitSet );
fracture->setFractureTemplate( fracDef );
simWell->updateConnectedEditors();
activeView->scheduleCreateDisplayModelAndRedraw();
auto eclipseCase = simWell->firstAncestorOrThisOfType<RimEclipseCase>();
if ( eclipseCase )
{
proj->reloadCompletionTypeResultsForEclipseCase( eclipseCase );
fractureCollection->updateConnectedEditors();
}
Riu3DMainWindowTools::selectAsCurrentItem( fracture );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewSimWellFractureAtPosFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setIcon( QIcon( ":/FractureSymbol16x16.png" ) );
actionToSetup->setText( "Create Fracture" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicNewSimWellFractureAtPosFeature::isCommandEnabled() const
{
RimProject* proj = RimProject::current();
if ( proj->allFractureTemplates().empty() ) return false;
auto objHandle = caf::SelectionManager::instance()->selectedItemOfType<caf::PdmObjectHandle>();
if ( !objHandle ) return false;
RimSimWellInView* eclipseWell = objHandle->firstAncestorOrThisOfType<RimSimWellInView>();
return eclipseWell != nullptr;
}

View File

@ -1,36 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafCmdFeature.h"
#include <vector>
//==================================================================================================
///
//==================================================================================================
class RicNewSimWellFractureAtPosFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
bool isCommandEnabled() const override;
};

View File

@ -1,127 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicNewSimWellFractureFeature.h"
#include "RicFractureNameGenerator.h"
#include "RiaApplication.h"
#include "RigEclipseCaseData.h"
#include "RimCase.h"
#include "RimEclipseCase.h"
#include "RimEclipseResultCase.h"
#include "RimEclipseView.h"
#include "RimEllipseFractureTemplate.h"
#include "RimFractureTemplateCollection.h"
#include "RimOilField.h"
#include "RimProject.h"
#include "RimSimWellFracture.h"
#include "RimSimWellFractureCollection.h"
#include "RimSimWellInView.h"
#include "RimStimPlanColors.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
#include "cvfAssert.h"
#include <QAction>
CAF_CMD_SOURCE_INIT( RicNewSimWellFractureFeature, "RicNewSimWellFractureFeature" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewSimWellFractureFeature::onActionTriggered( bool isChecked )
{
RimProject* proj = RimProject::current();
if ( proj->allFractureTemplates().empty() ) return;
auto objHandle = caf::SelectionManager::instance()->selectedItemOfType<caf::PdmObjectHandle>();
if ( !objHandle ) return;
auto eclipseWell = objHandle->firstAncestorOrThisOfType<RimSimWellInView>();
RimSimWellFracture* fracture = new RimSimWellFracture();
if ( eclipseWell->simwellFractureCollection()->simwellFractures.empty() )
{
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>( RiaApplication::instance()->activeReservoirView() );
if ( activeView )
{
activeView->fractureColors()->setDefaultResultName();
}
}
eclipseWell->simwellFractureCollection()->simwellFractures.push_back( fracture );
auto oilfield = objHandle->firstAncestorOrThisOfType<RimOilField>();
if ( !oilfield ) return;
fracture->setName( RicFractureNameGenerator::nameForNewFracture() );
auto unitSet = RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
{
auto eclipseCase = objHandle->firstAncestorOrThisOfType<RimEclipseResultCase>();
if ( eclipseCase )
{
unitSet = eclipseCase->eclipseCaseData()->unitsType();
}
fracture->setFractureUnit( unitSet );
}
RimFractureTemplate* fracDef = oilfield->fractureDefinitionCollection()->firstFractureOfUnit( unitSet );
fracture->setFractureTemplate( fracDef );
fracture->updateFracturePositionFromLocation();
eclipseWell->updateConnectedEditors();
auto eclipseCase = objHandle->firstAncestorOrThisOfType<RimEclipseCase>();
if ( eclipseCase )
{
proj->reloadCompletionTypeResultsForEclipseCase( eclipseCase );
eclipseWell->simwellFractureCollection()->updateConnectedEditors();
}
Riu3DMainWindowTools::selectAsCurrentItem( fracture );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewSimWellFractureFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setIcon( QIcon( ":/FractureSymbol16x16.png" ) );
actionToSetup->setText( "New Fracture" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicNewSimWellFractureFeature::isCommandEnabled() const
{
RimProject* proj = RimProject::current();
if ( proj->allFractureTemplates().empty() ) return false;
auto objHandle = caf::SelectionManager::instance()->selectedItemOfType<caf::PdmObjectHandle>();
if ( !objHandle ) return false;
auto simWell = objHandle->firstAncestorOrThisOfType<RimSimWellInView>();
return simWell != nullptr;
}

View File

@ -1,36 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafCmdFeature.h"
#include <vector>
//==================================================================================================
///
//==================================================================================================
class RicNewSimWellFractureFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
bool isCommandEnabled() const override;
};

View File

@ -19,8 +19,6 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplateCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplateCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimValveTemplateCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimValveTemplateCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimValveTemplate.h ${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}/RimMeshFractureTemplate.h
${CMAKE_CURRENT_LIST_DIR}/RimThermalFractureTemplate.h ${CMAKE_CURRENT_LIST_DIR}/RimThermalFractureTemplate.h
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.h ${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.h
@ -56,8 +54,6 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplateCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplateCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimValveTemplateCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimValveTemplateCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimValveTemplate.cpp ${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}/RimMeshFractureTemplate.cpp
${CMAKE_CURRENT_LIST_DIR}/RimThermalFractureTemplate.cpp ${CMAKE_CURRENT_LIST_DIR}/RimThermalFractureTemplate.cpp
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.cpp ${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.cpp

View File

@ -1,368 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimSimWellFracture.h"
#include "RigCell.h"
#include "RigMainGrid.h"
#include "Well/RigSimWellData.h"
#include "Well/RigSimulationWellCenterLineCalculator.h"
#include "Well/RigWellPath.h"
#include "Well/RigWellResultPoint.h"
#include "RimEclipseView.h"
#include "RimEllipseFractureTemplate.h"
#include "RimFracture.h"
#include "RimFractureTemplate.h"
#include "RimProject.h"
#include "RimSimWellInView.h"
#include "cafPdmUiDoubleSliderEditor.h"
CAF_PDM_SOURCE_INIT( RimSimWellFracture, "SimWellFracture" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSimWellFracture::RimSimWellFracture()
{
CAF_PDM_InitObject( "SimWellFracture", ":/FractureSymbol16x16.png" );
CAF_PDM_InitField( &m_location, "MeasuredDepth", 0.0f, "Pseudo Length Location" );
m_location.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
CAF_PDM_InitFieldNoDefault( &m_displayIJK, "Cell_IJK", "Cell IJK" );
m_displayIJK.registerGetMethod( this, &RimSimWellFracture::createOneBasedIJKText );
m_displayIJK.uiCapability()->setUiReadOnly( true );
m_displayIJK.xmlCapability()->disableIO();
CAF_PDM_InitField( &m_branchIndex, "Branch", 0, "Branch" );
setDeletable( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSimWellFracture::~RimSimWellFracture()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::setClosestWellCoord( cvf::Vec3d& position, size_t branchIndex )
{
computeSimWellBranchesIfRequired();
double location = m_branchCenterLines[branchIndex].locationAlongWellCoords( position );
m_branchIndex = static_cast<int>( branchIndex );
m_location = location;
updateFracturePositionFromLocation();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::updateAzimuthBasedOnWellAzimuthAngle()
{
computeSimWellBranchesIfRequired();
if ( !fractureTemplate() ) return;
if ( fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH ||
fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH )
{
double simWellAzimuth = wellAzimuthAtFracturePosition();
if ( fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH )
{
m_azimuth = simWellAzimuth;
}
else if ( fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH )
{
if ( simWellAzimuth + 90 < 360 )
m_azimuth = simWellAzimuth + 90;
else
m_azimuth = simWellAzimuth - 90;
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimSimWellFracture::wellAzimuthAtFracturePosition() const
{
double simWellAzimuth = m_branchCenterLines[m_branchIndex].simWellAzimuthAngle( fracturePosition() );
if ( simWellAzimuth < 0 ) simWellAzimuth += 360;
return simWellAzimuth;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::loadDataAndUpdate()
{
computeSimWellBranchCenterLines();
updateFracturePositionFromLocation();
updateAzimuthBasedOnWellAzimuthAngle();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<cvf::Vec3d> RimSimWellFracture::perforationLengthCenterLineCoords() const
{
std::vector<cvf::Vec3d> coords;
if ( !m_branchCenterLines.empty() && m_branchIndex < static_cast<int>( m_branchCenterLines.size() ) )
{
RigWellPath wellPathGeometry( m_branchCenterLines[m_branchIndex].wellPathPoints(),
m_branchCenterLines[m_branchIndex].measuredDepths() );
double startMd = m_location - perforationLength() / 2.0;
double endMd = m_location + perforationLength() / 2.0;
coords = wellPathGeometry.clippedPointSubset( startMd, endMd ).first;
}
return coords;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimSimWellFracture::isEnabled() const
{
return isChecked();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::applyOffset( double offsetMD )
{
m_location = m_location + offsetMD;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
{
RimFracture::fieldChangedByUi( changedField, oldValue, newValue );
if ( changedField == &m_location || changedField == &m_branchIndex )
{
updateFracturePositionFromLocation();
RimFractureTemplate::FracOrientationEnum orientation;
if ( fractureTemplate() )
orientation = fractureTemplate()->orientationType();
else
orientation = RimFractureTemplate::AZIMUTH;
if ( orientation != RimFractureTemplate::AZIMUTH )
{
updateAzimuthBasedOnWellAzimuthAngle();
}
RimProject* proj = RimProject::current();
if ( proj ) proj->reloadCompletionTypeResultsInAllViews();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::recomputeWellCenterlineCoordinates()
{
m_branchCenterLines.clear();
computeSimWellBranchesIfRequired();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::updateFracturePositionFromLocation()
{
computeSimWellBranchesIfRequired();
if ( !m_branchCenterLines.empty() )
{
cvf::Vec3d interpolated = m_branchCenterLines[m_branchIndex()].interpolatedPointAlongWellPath( m_location() );
setAnchorPosition( interpolated );
RimProject* proj = RimProject::current();
if ( proj ) proj->scheduleCreateDisplayModelAndRedrawAllViews();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
RimFracture::defineUiOrdering( uiConfigName, uiOrdering );
uiOrdering.add( nameField() );
uiOrdering.add( &m_fractureTemplate );
caf::PdmUiGroup* locationGroup = uiOrdering.addNewGroup( "Location / Orientation" );
locationGroup->add( &m_location );
locationGroup->add( &m_branchIndex );
locationGroup->add( &m_azimuth );
locationGroup->add( &m_uiWellPathAzimuth );
locationGroup->add( &m_uiWellFractureAzimuthDiff );
locationGroup->add( &m_wellFractureAzimuthAngleWarning );
locationGroup->add( &m_dip );
locationGroup->add( &m_tilt );
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup( "Properties" );
propertyGroup->add( &m_fractureUnit );
propertyGroup->add( &m_stimPlanTimeIndexToPlot );
propertyGroup->add( &m_perforationLength );
propertyGroup->add( &m_perforationEfficiency );
propertyGroup->add( &m_wellDiameter );
caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup( "Fracture Center Info" );
fractureCenterGroup->add( &m_uiAnchorPosition );
fractureCenterGroup->add( &m_displayIJK );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
{
RimFracture::defineEditorAttribute( field, uiConfigName, attribute );
if ( field == &m_location )
{
caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
if ( myAttr )
{
computeSimWellBranchesIfRequired();
if ( !m_branchCenterLines.empty() )
{
const RigSimulationWellCoordsAndMD& pointAndMd = m_branchCenterLines[m_branchIndex];
myAttr->m_minimum = pointAndMd.measuredDepths().front();
myAttr->m_maximum = pointAndMd.measuredDepths().back();
myAttr->m_sliderTickCount = pointAndMd.measuredDepths().back();
}
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RimSimWellFracture::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
{
QList<caf::PdmOptionItemInfo> options = RimFracture::calculateValueOptions( fieldNeedingOptions );
if ( fieldNeedingOptions == &m_branchIndex )
{
if ( m_branchCenterLines.empty() )
{
computeSimWellBranchesIfRequired();
}
if ( !m_branchCenterLines.empty() )
{
size_t branchCount = m_branchCenterLines.size();
for ( size_t bIdx = 0; bIdx < branchCount; ++bIdx )
{
// Use 1-based index in UI
options.push_back( caf::PdmOptionItemInfo( QString::number( bIdx + 1 ), QVariant::fromValue( bIdx ) ) );
}
}
}
return options;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigMainGrid* RimSimWellFracture::ownerCaseMainGrid() const
{
auto ownerEclView = firstAncestorOrThisOfType<RimEclipseView>();
if ( ownerEclView )
return ownerEclView->mainGrid();
else
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::computeSimWellBranchesIfRequired()
{
if ( m_branchCenterLines.empty() )
{
computeSimWellBranchCenterLines();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::computeSimWellBranchCenterLines()
{
m_branchCenterLines.clear();
auto rimWell = firstAncestorOrThisOfTypeAsserted<RimSimWellInView>();
const auto simWellBranches = RigSimulationWellCenterLineCalculator::calculateWellPipeStaticCenterline( rimWell );
for ( const auto& [coords, wellCells] : simWellBranches )
{
RigSimulationWellCoordsAndMD wellPathWithMD( coords );
m_branchCenterLines.push_back( wellPathWithMD );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimSimWellFracture::createOneBasedIJKText() const
{
RigMainGrid* mainGrid = ownerCaseMainGrid();
size_t i, j, k;
size_t anchorCellIdx = mainGrid->findReservoirCellIndexFromPoint( anchorPosition() );
if ( anchorCellIdx == cvf::UNDEFINED_SIZE_T ) return "";
size_t gridLocalCellIdx;
const RigGridBase* hostGrid = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( anchorCellIdx, &gridLocalCellIdx );
bool ok = hostGrid->ijkFromCellIndex( gridLocalCellIdx, &i, &j, &k );
if ( !ok ) return "";
return QString( "Grid %1: [%2, %3, %4]" ).arg( QString::fromStdString( hostGrid->gridName() ) ).arg( i + 1 ).arg( j + 1 ).arg( k + 1 );
}

View File

@ -1,76 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "RimFracture.h"
#include "Well/RigSimulationWellCoordsAndMD.h"
#include "RimEllipseFractureTemplate.h"
//==================================================================================================
///
///
//==================================================================================================
class RimSimWellFracture : public RimFracture
{
CAF_PDM_HEADER_INIT;
public:
RimSimWellFracture();
~RimSimWellFracture() override;
void setClosestWellCoord( cvf::Vec3d& position, size_t branchIndex );
void recomputeWellCenterlineCoordinates();
void updateFracturePositionFromLocation();
void updateAzimuthBasedOnWellAzimuthAngle() override;
double wellAzimuthAtFracturePosition() const override;
double fractureMD() const override { return m_location; }
int branchIndex() const { return m_branchIndex(); }
void loadDataAndUpdate() override;
std::vector<cvf::Vec3d> perforationLengthCenterLineCoords() const override;
bool isEnabled() const override; // RimWellPathCompletionsInterface override
void applyOffset( double offsetMD ) override;
protected:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
private:
RigMainGrid* ownerCaseMainGrid() const;
void computeSimWellBranchesIfRequired();
void computeSimWellBranchCenterLines();
QString createOneBasedIJKText() const;
private:
caf::PdmField<float> m_location;
caf::PdmField<int> m_branchIndex;
std::vector<RigSimulationWellCoordsAndMD> m_branchCenterLines;
caf::PdmProxyValueField<QString> m_displayIJK;
};

View File

@ -1,55 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimSimWellFractureCollection.h"
#include "RimSimWellFracture.h"
#include "cafPdmObject.h"
CAF_PDM_SOURCE_INIT( RimSimWellFractureCollection, "SimWellFractureCollection" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSimWellFractureCollection::RimSimWellFractureCollection()
{
CAF_PDM_InitObject( "Fractures", ":/FractureLayout16x16.png" );
CAF_PDM_InitFieldNoDefault( &simwellFractures, "Fractures", "" );
setDeletable( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFractureCollection::deleteFractures()
{
simwellFractures.deleteChildren();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFractureCollection::recomputeSimWellCenterlines()
{
for ( RimSimWellFracture* frac : simwellFractures() )
{
frac->recomputeWellCenterlineCoordinates();
}
}

View File

@ -1,43 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafPdmChildArrayField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
class RimSimWellFracture;
//==================================================================================================
///
///
//==================================================================================================
class RimSimWellFractureCollection : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimSimWellFractureCollection();
caf::PdmChildArrayField<RimSimWellFracture*> simwellFractures;
void deleteFractures();
void recomputeSimWellCenterlines();
};

View File

@ -111,9 +111,7 @@
#include "RimSeismicDataCollection.h" #include "RimSeismicDataCollection.h"
#include "RimSeismicSectionCollection.h" #include "RimSeismicSectionCollection.h"
#include "RimSeismicViewCollection.h" #include "RimSeismicViewCollection.h"
#include "RimSimWellFracture.h"
#include "RimSimWellInView.h" #include "RimSimWellInView.h"
#include "RimSimWellInViewCollection.h"
#include "RimStimPlanFractureTemplate.h" #include "RimStimPlanFractureTemplate.h"
#include "RimStimPlanModel.h" #include "RimStimPlanModel.h"
#include "RimStimPlanModelCollection.h" #include "RimStimPlanModelCollection.h"
@ -842,12 +840,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder << "RicShowWellAllocationPlotFeature"; menuBuilder << "RicShowWellAllocationPlotFeature";
menuBuilder << "RicShowCumulativePhasePlotFeature"; menuBuilder << "RicShowCumulativePhasePlotFeature";
menuBuilder.subMenuEnd(); menuBuilder.subMenuEnd();
menuBuilder << "RicExportCompletionsForVisibleSimWellsFeature";
}
else if ( dynamic_cast<RimSimWellInViewCollection*>( firstUiItem ) )
{
menuBuilder << "RicExportCompletionsForVisibleSimWellsFeature";
} }
else if ( dynamic_cast<RimColorLegendCollection*>( firstUiItem ) ) else if ( dynamic_cast<RimColorLegendCollection*>( firstUiItem ) )
{ {
@ -903,10 +895,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
#endif #endif
menuBuilder << "RicShowGridStatisticsFeature"; menuBuilder << "RicShowGridStatisticsFeature";
} }
else if ( dynamic_cast<RimSimWellFracture*>( firstUiItem ) )
{
menuBuilder << "RicNewSimWellFractureFeature";
}
else if ( dynamic_cast<RimValveTemplateCollection*>( firstUiItem ) ) else if ( dynamic_cast<RimValveTemplateCollection*>( firstUiItem ) )
{ {
menuBuilder << "RicNewValveTemplateFeature"; menuBuilder << "RicNewValveTemplateFeature";
@ -1222,7 +1210,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder << "RicEclipseWellShowWellCellsFeature"; menuBuilder << "RicEclipseWellShowWellCellsFeature";
menuBuilder << "RicEclipseWellShowWellCellFenceFeature"; menuBuilder << "RicEclipseWellShowWellCellFenceFeature";
menuBuilder << "Separator"; menuBuilder << "Separator";
menuBuilder << "RicNewSimWellFractureFeature";
menuBuilder << "RicNewSimWellIntersectionFeature"; menuBuilder << "RicNewSimWellIntersectionFeature";
} }
else if ( dynamic_cast<RimSummaryAddress*>( firstUiItem ) ) else if ( dynamic_cast<RimSummaryAddress*>( firstUiItem ) )

View File

@ -79,7 +79,6 @@
#include "RimReservoirCellResultsStorage.h" #include "RimReservoirCellResultsStorage.h"
#include "RimSeismicSection.h" #include "RimSeismicSection.h"
#include "RimSeismicSectionCollection.h" #include "RimSeismicSectionCollection.h"
#include "RimSimWellFracture.h"
#include "RimSimWellInView.h" #include "RimSimWellInView.h"
#include "RimSimWellInViewCollection.h" #include "RimSimWellInViewCollection.h"
#include "RimStimPlanColors.h" #include "RimStimPlanColors.h"
@ -1101,37 +1100,6 @@ void RimEclipseView::appendWellsAndFracturesToModel()
frameScene->addModel( wellPathModelBasicList.p() ); frameScene->addModel( wellPathModelBasicList.p() );
} }
// Sim Well Fractures
{
cvf::String name = "SimWellFracturesModel";
RimEclipseView::removeModelByName( frameScene, name );
cvf::ref<cvf::ModelBasicList> simWellFracturesModelBasicList = new cvf::ModelBasicList;
simWellFracturesModelBasicList->setName( name );
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
std::vector<RimFracture*> fractures = descendantsIncludingThisOfType<RimFracture>();
for ( RimFracture* f : fractures )
{
RimSimWellInView* simWell = f->firstAncestorOrThisOfType<RimSimWellInView>();
if ( simWell )
{
bool isAnyGeometryPresent = simWell->isWellPipeVisible( m_currentTimeStep ) ||
simWell->isWellSpheresVisible( m_currentTimeStep );
if ( !isAnyGeometryPresent )
{
continue;
}
}
f->fracturePartManager()->appendGeometryPartsToModel( simWellFracturesModelBasicList.p(), *this );
}
simWellFracturesModelBasicList->updateBoundingBoxesRecursive();
frameScene->addModel( simWellFracturesModelBasicList.p() );
}
} }
} }
} }
@ -1238,16 +1206,6 @@ void RimEclipseView::onLoadDataAndUpdate()
synchronizeLocalAnnotationsFromGlobal(); synchronizeLocalAnnotationsFromGlobal();
{
// Update simulation well fractures after well cell results are imported
std::vector<RimSimWellFracture*> simFractures = descendantsIncludingThisOfType<RimSimWellFracture>();
for ( auto fracture : simFractures )
{
fracture->loadDataAndUpdate();
}
}
if ( isVirtualConnectionFactorGeometryVisible() ) if ( isVirtualConnectionFactorGeometryVisible() )
{ {
m_virtualPerforationResult->loadData(); m_virtualPerforationResult->loadData();

View File

@ -39,8 +39,6 @@
#include "RimExtrudedCurveIntersection.h" #include "RimExtrudedCurveIntersection.h"
#include "RimIntersectionCollection.h" #include "RimIntersectionCollection.h"
#include "RimPropertyFilterCollection.h" #include "RimPropertyFilterCollection.h"
#include "RimSimWellFracture.h"
#include "RimSimWellFractureCollection.h"
#include "RimSimWellInViewCollection.h" #include "RimSimWellInViewCollection.h"
#include "RimSimWellInViewTools.h" #include "RimSimWellInViewTools.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
@ -88,28 +86,16 @@ RimSimWellInView::RimSimWellInView()
CAF_PDM_InitField( &showWellCells, "ShowWellCells", false, "Well Cells" ); CAF_PDM_InitField( &showWellCells, "ShowWellCells", false, "Well Cells" );
CAF_PDM_InitField( &showWellCellFence, "ShowWellCellFence", false, "Well Cell Fence" ); CAF_PDM_InitField( &showWellCellFence, "ShowWellCellFence", false, "Well Cell Fence" );
CAF_PDM_InitFieldNoDefault( &simwellFractureCollection, "FractureCollection", "Fractures" );
name.uiCapability()->setUiHidden( true ); name.uiCapability()->setUiHidden( true );
name.uiCapability()->setUiReadOnly( true ); name.uiCapability()->setUiReadOnly( true );
m_resultWellIndex = cvf::UNDEFINED_SIZE_T; m_resultWellIndex = cvf::UNDEFINED_SIZE_T;
simwellFractureCollection = new RimSimWellFractureCollection();
m_isInjector = false; m_isInjector = false;
m_isValidDisk = false; m_isValidDisk = false;
m_diskScale = 1.0; m_diskScale = 1.0;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSimWellInView::~RimSimWellInView()
{
if ( simwellFractureCollection() ) delete simwellFractureCollection();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -439,10 +425,6 @@ void RimSimWellInView::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimSimWellInView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ ) void RimSimWellInView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
{ {
for ( RimSimWellFracture* fracture : simwellFractureCollection()->simwellFractures() )
{
uiTreeOrdering.add( fracture );
}
uiTreeOrdering.skipRemainingChildren( true ); uiTreeOrdering.skipRemainingChildren( true );
const auto reservoirView = firstAncestorOrThisOfType<RimEclipseView>(); const auto reservoirView = firstAncestorOrThisOfType<RimEclipseView>();

View File

@ -38,7 +38,6 @@
class RigSimWellData; class RigSimWellData;
class RigWellResultFrame; class RigWellResultFrame;
class RimSimWellFractureCollection;
class RigWellPath; class RigWellPath;
class RimWellDiskConfig; class RimWellDiskConfig;
@ -52,7 +51,6 @@ class RimSimWellInView : public caf::PdmObject, public Rim3dPropertiesInterface
public: public:
RimSimWellInView(); RimSimWellInView();
~RimSimWellInView() override;
void setSimWellData( RigSimWellData* simWellData, size_t resultWellIndex ); void setSimWellData( RigSimWellData* simWellData, size_t resultWellIndex );
RigSimWellData* simWellData(); RigSimWellData* simWellData();
@ -102,8 +100,6 @@ public:
caf::PdmField<bool> showWellCells; caf::PdmField<bool> showWellCells;
caf::PdmField<bool> showWellCellFence; caf::PdmField<bool> showWellCellFence;
caf::PdmChildField<RimSimWellFractureCollection*> simwellFractureCollection;
double calculateInjectionProductionFractions( const RimWellDiskConfig& wellDiskConfig, bool* isOk ); double calculateInjectionProductionFractions( const RimWellDiskConfig& wellDiskConfig, bool* isOk );
void scaleDisk( double minValue, double maxValue ); void scaleDisk( double minValue, double maxValue );

View File

@ -32,7 +32,6 @@
#include "RimEclipseResultCase.h" #include "RimEclipseResultCase.h"
#include "RimEclipseView.h" #include "RimEclipseView.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimSimWellFractureCollection.h"
#include "RimSimWellInView.h" #include "RimSimWellInView.h"
#include "RimSimWellInViewTools.h" #include "RimSimWellInViewTools.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
@ -475,11 +474,6 @@ void RimSimWellInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* ch
if ( &wellPipeCoordType == changedField || &isAutoDetectingBranches == changedField ) if ( &wellPipeCoordType == changedField || &isAutoDetectingBranches == changedField )
{ {
if ( m_reservoirView ) m_reservoirView->scheduleCreateDisplayModelAndRedraw(); if ( m_reservoirView ) m_reservoirView->scheduleCreateDisplayModelAndRedraw();
for ( RimSimWellInView* w : wells )
{
w->simwellFractureCollection()->recomputeSimWellCenterlines();
}
} }
} }

View File

@ -25,7 +25,6 @@
#include "RimFracture.h" #include "RimFracture.h"
#include "RimFractureTemplate.h" #include "RimFractureTemplate.h"
#include "RimSimWellFracture.h"
#include "RimStimPlanFractureTemplate.h" #include "RimStimPlanFractureTemplate.h"
#include "cvfMath.h" #include "cvfMath.h"

View File

@ -569,8 +569,6 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
menuBuilder.addSeparator(); menuBuilder.addSeparator();
menuBuilder << "RicShowContributingWellsFeature"; menuBuilder << "RicShowContributingWellsFeature";
menuBuilder.addSeparator(); menuBuilder.addSeparator();
menuBuilder << "RicNewSimWellFractureAtPosFeature";
menuBuilder.addSeparator();
menuBuilder << "RicNewSimWellIntersectionFeature"; menuBuilder << "RicNewSimWellIntersectionFeature";
} }
} }