mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1948 PLT Plot. Display curves from well log file
This commit is contained in:
@@ -66,12 +66,12 @@ bool RicNewPltPlotFeature::isCommandEnabled()
|
|||||||
RimEclipseResultCase* eclCase = caf::firstAncestorOfTypeFromSelectedObject<RimEclipseResultCase*>();
|
RimEclipseResultCase* eclCase = caf::firstAncestorOfTypeFromSelectedObject<RimEclipseResultCase*>();
|
||||||
if (simWell != nullptr)
|
if (simWell != nullptr)
|
||||||
{
|
{
|
||||||
enable &= RimWellPltPlot::hasPressureData(eclCase);
|
enable &= RimWellPltPlot::hasFlowData(eclCase);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (rimWellPath)
|
else if (rimWellPath)
|
||||||
{
|
{
|
||||||
enable &= RimWellPltPlot::hasPressureData(rimWellPath);
|
enable &= RimWellPltPlot::hasFlowData(rimWellPath);
|
||||||
}
|
}
|
||||||
return enable;
|
return enable;
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ void RicNewPltPlotFeature::onActionTriggered(bool isChecked)
|
|||||||
pltPlotColl->addPlot(pltPlot);
|
pltPlotColl->addPlot(pltPlot);
|
||||||
pltPlot->setDescription(plotName);
|
pltPlot->setDescription(plotName);
|
||||||
|
|
||||||
pltPlot->applyInitialSelections();
|
//pltPlot->applyInitialSelections();
|
||||||
pltPlot->loadDataAndUpdate();
|
pltPlot->loadDataAndUpdate();
|
||||||
pltPlotColl->updateConnectedEditors();
|
pltPlotColl->updateConnectedEditors();
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "RimViewWindow.h"
|
#include "RimViewWindow.h"
|
||||||
|
#include "RigFlowDiagResultAddress.h"
|
||||||
|
|
||||||
#include "cafPdmField.h"
|
#include "cafPdmField.h"
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
@@ -41,6 +42,8 @@ class RimWellLogFileChannel;
|
|||||||
class RimWellLogPlot;
|
class RimWellLogPlot;
|
||||||
class RimWellPath;
|
class RimWellPath;
|
||||||
class RiuWellPltPlot;
|
class RiuWellPltPlot;
|
||||||
|
class RimWellLogTrack;
|
||||||
|
|
||||||
|
|
||||||
namespace cvf {
|
namespace cvf {
|
||||||
class Color3f;
|
class Color3f;
|
||||||
@@ -59,7 +62,15 @@ class RimWellPltPlot : public RimViewWindow
|
|||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
static const char PRESSURE_DATA_NAME[];
|
enum FlowType { FLOW_TYPE_TOTAL, FLOW_TYPE_PHASE_SPLIT };
|
||||||
|
enum FlowPhase { PHASE_NONE, PHASE_OIL, PHASE_GAS, PHASE_WATER, PHASE_TOTAL };
|
||||||
|
|
||||||
|
static const QString OIL_CHANNEL_NAME;
|
||||||
|
static const QString GAS_CHANNEL_NAME;
|
||||||
|
static const QString WATER_CHANNEL_NAME;
|
||||||
|
static const QString TOTAL_CHANNEL_NAME;
|
||||||
|
|
||||||
|
static const std::set<QString> FLOW_DATA_NAMES;
|
||||||
static const char PLOT_NAME_QFORMAT_STRING[];
|
static const char PLOT_NAME_QFORMAT_STRING[];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -79,13 +90,13 @@ public:
|
|||||||
void setCurrentWellName(const QString& currWellName);
|
void setCurrentWellName(const QString& currWellName);
|
||||||
QString currentWellName() const;
|
QString currentWellName() const;
|
||||||
|
|
||||||
static bool hasPressureData(const RimWellLogFile* wellLogFile);
|
static bool hasFlowData(const RimWellLogFile* wellLogFile);
|
||||||
static bool isPressureChannel(RimWellLogFileChannel* channel);
|
static bool isFlowChannel(RimWellLogFileChannel* channel);
|
||||||
static bool hasPressureData(RimEclipseResultCase* gridCase);
|
static bool hasFlowData(RimEclipseResultCase* gridCase);
|
||||||
static bool hasPressureData(RimWellPath* wellPath);
|
static bool hasFlowData(RimWellPath* wellPath);
|
||||||
static const char* plotNameFormatString();
|
static const char* plotNameFormatString();
|
||||||
|
|
||||||
void applyInitialSelections();
|
//void applyInitialSelections();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Overridden PDM methods
|
// Overridden PDM methods
|
||||||
@@ -98,6 +109,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void addTimeStepToMap(std::map<QDateTime, std::set<RimWellRftAddress>>& destMap,
|
void addTimeStepToMap(std::map<QDateTime, std::set<RimWellRftAddress>>& destMap,
|
||||||
@@ -112,16 +124,16 @@ private:
|
|||||||
|
|
||||||
void syncCurvesFromUiSelection();
|
void syncCurvesFromUiSelection();
|
||||||
|
|
||||||
std::vector<RimWellLogFile*> wellLogFilesContainingPressure(const QString& wellName) const;
|
std::vector<RimWellLogFile*> wellLogFilesContainingFlow(const QString& wellName) const;
|
||||||
RimWellLogFileChannel* getPressureChannelFromWellFile(const RimWellLogFile* wellLogFile) const;
|
std::vector<RimWellLogFileChannel*> getFlowChannelsFromWellFile(const RimWellLogFile* wellLogFile) const;
|
||||||
|
|
||||||
RimWellPath* wellPathFromWellLogFile(const RimWellLogFile* wellLogFile) const;
|
RimWellPath* wellPathFromWellLogFile(const RimWellLogFile* wellLogFile) const;
|
||||||
|
|
||||||
std::vector<std::tuple<RimEclipseResultCase*, bool, bool>> eclipseCasesForWell(const QString& wellName) const;
|
//std::vector<std::tuple<RimEclipseResultCase*, bool, bool>> eclipseCasesForWell(const QString& wellName) const;
|
||||||
std::vector<RimEclipseResultCase*> gridCasesFromEclipseCases(const std::vector<std::tuple<RimEclipseResultCase*, bool, bool>>& eclipseCasesTuple) const;
|
//std::vector<RimEclipseResultCase*> gridCasesFromEclipseCases(const std::vector<std::tuple<RimEclipseResultCase*, bool, bool>>& eclipseCasesTuple) const;
|
||||||
std::vector<RimEclipseResultCase*> rftCasesFromEclipseCases(const std::vector<std::tuple<RimEclipseResultCase*, bool, bool>>& eclipseCasesTuple) const;
|
//std::vector<RimEclipseResultCase*> rftCasesFromEclipseCases(const std::vector<std::tuple<RimEclipseResultCase*, bool, bool>>& eclipseCasesTuple) const;
|
||||||
std::map<QDateTime, std::set<RimWellRftAddress>> timeStepsFromRftCase(RimEclipseResultCase* gridCase) const;
|
//std::map<QDateTime, std::set<RimWellRftAddress>> timeStepsFromRftCase(RimEclipseResultCase* gridCase) const;
|
||||||
std::map<QDateTime, std::set<RimWellRftAddress>> timeStepsFromGridCase(RimEclipseCase* gridCase) const;
|
//std::map<QDateTime, std::set<RimWellRftAddress>> timeStepsFromGridCase(RimEclipseCase* gridCase) const;
|
||||||
std::map<QDateTime, std::set<RimWellRftAddress>> timeStepsFromWellLogFile(RimWellLogFile* wellLogFile) const;
|
std::map<QDateTime, std::set<RimWellRftAddress>> timeStepsFromWellLogFile(RimWellLogFile* wellLogFile) const;
|
||||||
std::map<QDateTime, std::set<RimWellRftAddress>> adjacentTimeSteps(const std::vector<std::pair<QDateTime, std::set<RimWellRftAddress>>>& allTimeSteps,
|
std::map<QDateTime, std::set<RimWellRftAddress>> adjacentTimeSteps(const std::vector<std::pair<QDateTime, std::set<RimWellRftAddress>>>& allTimeSteps,
|
||||||
const std::pair<QDateTime, std::set<RimWellRftAddress>>& searchTimeStepPair);
|
const std::pair<QDateTime, std::set<RimWellRftAddress>>& searchTimeStepPair);
|
||||||
@@ -130,9 +142,12 @@ private:
|
|||||||
std::set<std::pair<RimWellRftAddress, QDateTime>> selectedCurveDefs() const;
|
std::set<std::pair<RimWellRftAddress, QDateTime>> selectedCurveDefs() const;
|
||||||
std::set<std::pair<RimWellRftAddress, QDateTime>> curveDefsFromCurves() const;
|
std::set<std::pair<RimWellRftAddress, QDateTime>> curveDefsFromCurves() const;
|
||||||
std::pair<RimWellRftAddress, QDateTime> curveDefFromCurve(const RimWellLogCurve* curve) const;
|
std::pair<RimWellRftAddress, QDateTime> curveDefFromCurve(const RimWellLogCurve* curve) const;
|
||||||
void updateCurvesInPlot(const std::set<std::pair<RimWellRftAddress, QDateTime>>& allCurveDefs,
|
void updateCurvesInPlot(const std::set<std::pair<RimWellRftAddress, QDateTime>>& curveDefs);
|
||||||
const std::set<std::pair<RimWellRftAddress, QDateTime>>& curveDefsToAdd,
|
void addStackedCurve(const QString& tracerName,
|
||||||
const std::set<RimWellLogCurve*>& curvesToDelete);
|
const std::vector<double>& depthValues,
|
||||||
|
const std::vector<double>& accFlow,
|
||||||
|
RimWellLogTrack* plotTrack);
|
||||||
|
|
||||||
bool isOnlyGridSourcesSelected() const;
|
bool isOnlyGridSourcesSelected() const;
|
||||||
bool isAnySourceAddressSelected(const std::set<RimWellRftAddress>& addresses) const;
|
bool isAnySourceAddressSelected(const std::set<RimWellRftAddress>& addresses) const;
|
||||||
std::vector<RimWellRftAddress> selectedSources() const;
|
std::vector<RimWellRftAddress> selectedSources() const;
|
||||||
@@ -142,8 +157,11 @@ private:
|
|||||||
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||||
virtual void deleteViewWidget() override;
|
virtual void deleteViewWidget() override;
|
||||||
|
|
||||||
void applyCurveAppearance(RimWellLogCurve* newCurve);
|
//void applyCurveAppearance(RimWellLogCurve* newCurve);
|
||||||
void updateSelectedTimeStepsFromSelectedSources();
|
void updateSelectedTimeStepsFromSelectedSources();
|
||||||
|
static FlowPhase flowPhaseFromChannelName(const QString& channelName);
|
||||||
|
void setPlotXAxisTitles(RimWellLogTrack* plotTrack);
|
||||||
|
std::vector<RimEclipseCase*> eclipseCases() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<bool> m_showPlotTitle;
|
caf::PdmField<bool> m_showPlotTitle;
|
||||||
@@ -161,5 +179,6 @@ private:
|
|||||||
|
|
||||||
std::map<QDateTime, std::set<RimWellRftAddress>> m_timeStepsToAddresses;
|
std::map<QDateTime, std::set<RimWellRftAddress>> m_timeStepsToAddresses;
|
||||||
|
|
||||||
bool m_selectedSourcesOrTimeStepsFieldsChanged;
|
caf::PdmField<caf::AppEnum<FlowType>> m_phaseSelectionMode;
|
||||||
|
caf::PdmField<std::vector<caf::AppEnum<FlowPhase>>> m_phases;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
#include "RimWellAllocationPlot.h"
|
#include "RimWellAllocationPlot.h"
|
||||||
#include "RimWellLogCurve.h"
|
#include "RimWellLogCurve.h"
|
||||||
#include "RimWellLogTrack.h"
|
#include "RimWellLogTrack.h"
|
||||||
|
#include "RimWellRftPlot.h"
|
||||||
|
#include "RimWellPltPlot.h"
|
||||||
|
|
||||||
#include "RiuMainPlotWindow.h"
|
#include "RiuMainPlotWindow.h"
|
||||||
#include "RiuWellLogPlot.h"
|
#include "RiuWellLogPlot.h"
|
||||||
@@ -34,7 +36,6 @@
|
|||||||
#include "cvfAssert.h"
|
#include "cvfAssert.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "RimWellRftPlot.h"
|
|
||||||
|
|
||||||
#define RI_LOGPLOT_MINDEPTH_DEFAULT 0.0
|
#define RI_LOGPLOT_MINDEPTH_DEFAULT 0.0
|
||||||
#define RI_LOGPLOT_MAXDEPTH_DEFAULT 1000.0
|
#define RI_LOGPLOT_MAXDEPTH_DEFAULT 1000.0
|
||||||
@@ -503,6 +504,24 @@ bool RimWellLogPlot::isRftPlotChild() const
|
|||||||
return rftPlot() != nullptr;
|
return rftPlot() != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimWellPltPlot* RimWellLogPlot::pltPlot() const
|
||||||
|
{
|
||||||
|
RimWellPltPlot* pltPlot;
|
||||||
|
firstAncestorOrThisOfType(pltPlot);
|
||||||
|
return pltPlot;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimWellLogPlot::isPltPlotChild() const
|
||||||
|
{
|
||||||
|
return pltPlot() != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -815,6 +834,11 @@ void RimWellLogPlot::updateDisabledDepthTypes()
|
|||||||
m_disabledDepthTypes.insert(PSEUDO_LENGTH);
|
m_disabledDepthTypes.insert(PSEUDO_LENGTH);
|
||||||
m_disabledDepthTypes.insert(CONNECTION_NUMBER);
|
m_disabledDepthTypes.insert(CONNECTION_NUMBER);
|
||||||
}
|
}
|
||||||
|
else if (isPltPlotChild())
|
||||||
|
{
|
||||||
|
m_disabledDepthTypes.insert(TRUE_VERTICAL_DEPTH);
|
||||||
|
m_disabledDepthTypes.insert(CONNECTION_NUMBER);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_disabledDepthTypes.insert(PSEUDO_LENGTH);
|
m_disabledDepthTypes.insert(PSEUDO_LENGTH);
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
class RiuWellLogPlot;
|
class RiuWellLogPlot;
|
||||||
class RimWellLogTrack;
|
class RimWellLogTrack;
|
||||||
class RimWellRftPlot;
|
class RimWellRftPlot;
|
||||||
|
class RimWellPltPlot;
|
||||||
|
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
@@ -104,6 +105,8 @@ public:
|
|||||||
|
|
||||||
RimWellRftPlot* rftPlot() const;
|
RimWellRftPlot* rftPlot() const;
|
||||||
bool isRftPlotChild() const;
|
bool isRftPlotChild() const;
|
||||||
|
RimWellPltPlot* pltPlot() const;
|
||||||
|
bool isPltPlotChild() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user