2015-09-02 12:34:12 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-09-02 12:34:12 +02:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-09-02 12:34:12 +02:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-09-02 12:34:12 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2019-11-06 10:07:56 +01:00
|
|
|
#include "RigWbsParameter.h"
|
2015-11-04 16:22:53 +01:00
|
|
|
#include "RimWellLogCurve.h"
|
2015-09-18 19:42:54 +02:00
|
|
|
|
2015-09-02 12:34:12 +02:00
|
|
|
#include "cafPdmChildField.h"
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "cafPdmPtrField.h"
|
2015-09-02 12:34:12 +02:00
|
|
|
|
2019-02-11 14:23:05 +01:00
|
|
|
class RigFemResultAddress;
|
2018-09-03 11:24:35 +02:00
|
|
|
class RigGeoMechWellLogExtractor;
|
2017-12-07 14:51:58 +01:00
|
|
|
class RigWellPath;
|
2015-09-18 19:42:54 +02:00
|
|
|
class RimCase;
|
2015-09-02 12:34:12 +02:00
|
|
|
class RimEclipseResultDefinition;
|
|
|
|
|
class RimGeoMechResultDefinition;
|
2018-01-09 10:11:28 +01:00
|
|
|
class Rim3dView;
|
2015-12-09 11:32:46 +01:00
|
|
|
class RimWellPath;
|
2015-09-02 12:34:12 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
|
|
|
|
///
|
2015-09-02 12:34:12 +02:00
|
|
|
//==================================================================================================
|
2015-11-04 16:19:38 +01:00
|
|
|
class RimWellLogExtractionCurve : public RimWellLogCurve
|
2015-09-02 12:34:12 +02:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2015-09-02 12:34:12 +02:00
|
|
|
public:
|
|
|
|
|
RimWellLogExtractionCurve();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimWellLogExtractionCurve() override;
|
2017-04-25 12:31:49 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
enum TrajectoryType
|
|
|
|
|
{
|
|
|
|
|
WELL_PATH,
|
|
|
|
|
SIMULATION_WELL
|
|
|
|
|
};
|
2016-12-17 16:30:38 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setWellPath( RimWellPath* wellPath );
|
|
|
|
|
RimWellPath* wellPath() const;
|
2017-04-25 16:12:22 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setFromSimulationWellName( const QString& simWellName, int branchIndex, bool branchDetection );
|
2016-12-17 16:30:38 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setCase( RimCase* rimCase );
|
|
|
|
|
RimCase* rimCase() const;
|
2015-09-02 12:34:12 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setPropertiesFromView( Rim3dView* view );
|
2015-10-15 14:37:57 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
TrajectoryType trajectoryType() const;
|
|
|
|
|
QString wellName() const override;
|
2020-01-28 10:09:23 +01:00
|
|
|
QString wellLogChannelUiName() const override;
|
2019-09-06 10:40:57 +02:00
|
|
|
QString wellLogChannelName() const override;
|
2020-01-29 12:52:07 +01:00
|
|
|
QString wellLogChannelUnits() const override;
|
2019-09-06 10:40:57 +02:00
|
|
|
QString wellDate() const override;
|
|
|
|
|
int branchIndex() const;
|
|
|
|
|
bool branchDetection() const;
|
2016-09-16 12:46:25 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool isEclipseCurve() const;
|
|
|
|
|
QString caseName() const;
|
2017-10-04 14:36:33 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
int currentTimeStep() const;
|
|
|
|
|
void setCurrentTimeStep( int timeStep );
|
2017-04-26 16:59:52 +02:00
|
|
|
|
2020-06-05 15:58:25 +02:00
|
|
|
void setEclipseResultVariable( const QString& resVarname );
|
|
|
|
|
QString eclipseResultVariable() const;
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setGeoMechResultAddress( const RigFemResultAddress& resAddr );
|
2018-07-10 12:44:58 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setTrajectoryType( TrajectoryType trajectoryType );
|
|
|
|
|
void setWellName( QString wellName );
|
|
|
|
|
void setBranchDetection( bool branchDetection );
|
|
|
|
|
void setBranchIndex( int index );
|
2018-10-18 19:45:57 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
static void findAndLoadWbsParametersFromLasFiles( const RimWellPath* wellPath,
|
|
|
|
|
RigGeoMechWellLogExtractor* geomExtractor );
|
|
|
|
|
|
2019-10-03 14:41:37 +02:00
|
|
|
void setAutoNameComponents( bool addCaseName, bool addProperty, bool addWellname, bool addTimeStep, bool addDate );
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
protected:
|
2019-10-03 14:16:56 +02:00
|
|
|
QString createCurveAutoName() override;
|
|
|
|
|
void onLoadDataAndUpdate( bool updateParentPlot ) override;
|
|
|
|
|
virtual void performDataExtraction( bool* isUsingPseudoLength );
|
2019-10-03 14:57:46 +02:00
|
|
|
void extractData( bool* isUsingPseudoLength, bool performDataSmoothing = false, double smoothingThreshold = -1.0 );
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2020-02-12 11:43:15 +01:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
|
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
|
|
|
|
bool* useOptionsOnly ) override;
|
|
|
|
|
void initAfterRead() override;
|
2015-09-03 20:54:15 +02:00
|
|
|
|
2019-10-03 14:57:46 +02:00
|
|
|
static QString dataSourceGroupKeyword();
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setLogScaleFromSelectedResult();
|
|
|
|
|
void clampTimestep();
|
|
|
|
|
void clampBranchIndex();
|
|
|
|
|
std::set<QString> sortedSimWellNames();
|
|
|
|
|
void clearGeneratedSimWellPaths();
|
2020-06-19 12:40:48 +02:00
|
|
|
bool isDefaultColor( const cvf::Color3f& color ) const;
|
|
|
|
|
void checkAndApplyDefaultFillColor() override;
|
2015-12-09 11:32:46 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmPtrField<RimCase*> m_case;
|
|
|
|
|
caf::PdmField<caf::AppEnum<TrajectoryType>> m_trajectoryType;
|
|
|
|
|
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
|
|
|
|
caf::PdmField<QString> m_simWellName;
|
|
|
|
|
caf::PdmField<int> m_branchIndex;
|
|
|
|
|
caf::PdmField<bool> m_branchDetection;
|
2017-10-05 13:42:40 +02:00
|
|
|
|
2015-09-02 12:34:12 +02:00
|
|
|
caf::PdmChildField<RimEclipseResultDefinition*> m_eclipseResultDefinition;
|
|
|
|
|
caf::PdmChildField<RimGeoMechResultDefinition*> m_geomResultDefinition;
|
|
|
|
|
caf::PdmField<int> m_timeStep;
|
2015-09-17 18:42:35 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmField<bool> m_addCaseNameToCurveName;
|
|
|
|
|
caf::PdmField<bool> m_addPropertyToCurveName;
|
|
|
|
|
caf::PdmField<bool> m_addWellNameToCurveName;
|
|
|
|
|
caf::PdmField<bool> m_addTimestepToCurveName;
|
|
|
|
|
caf::PdmField<bool> m_addDateToCurveName;
|
2017-04-25 12:31:49 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<const RigWellPath*> m_wellPathsWithExtractors;
|
2015-09-02 12:34:12 +02:00
|
|
|
};
|