mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
#1138 - pre-proto - Adding fields for fractures for stimPlan parameter to plot and time step.
This commit is contained in:
parent
c815cfa835
commit
1cf6d073fe
@ -42,6 +42,7 @@
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RimStimPlanFractureTemplate.h"
|
||||
#include "RimView.h"
|
||||
|
||||
#include "RivWellFracturePartMgr.h"
|
||||
@ -60,8 +61,22 @@
|
||||
#include <math.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
|
||||
void caf::AppEnum< RimFracture::stimPlanPlotParameterEnum>::setUp()
|
||||
{
|
||||
addItem(RimFracture::CONDUCTIVITY, "Cond", "Conductivity");
|
||||
addItem(RimFracture::PERMEABILITY, "Perm", "Permeability");
|
||||
addItem(RimFracture::WIDTH, "Width", "Width");
|
||||
|
||||
setDefault(RimFracture::CONDUCTIVITY);
|
||||
}
|
||||
}
|
||||
|
||||
CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimFracture, "Fracture");
|
||||
|
||||
@ -83,11 +98,11 @@ RimFracture::RimFracture(void)
|
||||
m_uiAnchorPosition.registerGetMethod(this, &RimFracture::fracturePositionForUi);
|
||||
m_uiAnchorPosition.uiCapability()->setUiReadOnly(true);
|
||||
CAF_PDM_InitField(&azimuth, "Azimuth", 0.0, "Azimuth", "", "", "");
|
||||
|
||||
azimuth.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
CAF_PDM_InitField(&perforationLength, "PerforationLength", 0.0, "PerforationLength", "", "", "");
|
||||
|
||||
|
||||
azimuth.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
CAF_PDM_InitField(&stimPlanParameterToPlot, "parameterToPlot", caf::AppEnum<stimPlanPlotParameterEnum>(WIDTH), "Parameter from StimPlan file to plot", "", "", "");
|
||||
CAF_PDM_InitField(&stimPlanTimeIndexToPlot, "timeIndexToPlot", 0, "Timestep from StimPlan file to plot", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_i, "I", 1, "Fracture location cell I", "", "", "");
|
||||
m_i.uiCapability()->setUiHidden(true);
|
||||
@ -602,6 +617,25 @@ QList<caf::PdmOptionItemInfo> RimFracture::calculateValueOptions(const caf::PdmF
|
||||
options.push_back(caf::PdmOptionItemInfo(fracDef->name(), fracDef));
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &stimPlanTimeIndexToPlot)
|
||||
{
|
||||
if (attachedFractureDefinition())
|
||||
{
|
||||
RimFractureTemplate* fracTemplate = attachedFractureDefinition();
|
||||
if (dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate))
|
||||
{
|
||||
RimStimPlanFractureTemplate* fracTemplateStimPlan = dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate);
|
||||
std::vector<double> timeValues = fracTemplateStimPlan->getStimPlanTimeValues();
|
||||
int index = 0;
|
||||
for (double value : timeValues)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(QString::number(value), index));
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
@ -611,16 +645,41 @@ QList<caf::PdmOptionItemInfo> RimFracture::calculateValueOptions(const caf::PdmF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
uiOrdering.add(&name);
|
||||
|
||||
caf::PdmUiGroup* geometryGroup = uiOrdering.addNewGroup("Properties");
|
||||
geometryGroup->add(&azimuth);
|
||||
geometryGroup->add(&perforationLength);
|
||||
geometryGroup->add(&m_fractureTemplate);
|
||||
if (attachedFractureDefinition())
|
||||
{
|
||||
if (attachedFractureDefinition()->orientation == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| attachedFractureDefinition()->orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
azimuth.uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
else if (attachedFractureDefinition()->orientation == RimFractureTemplate::AZIMUTH)
|
||||
{
|
||||
azimuth.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
|
||||
|
||||
RimFractureTemplate* fracTemplate= attachedFractureDefinition();
|
||||
if (dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate))
|
||||
{
|
||||
stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(false);
|
||||
stimPlanParameterToPlot.uiCapability()->setUiHidden(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(true);
|
||||
stimPlanParameterToPlot.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(true);
|
||||
stimPlanParameterToPlot.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup("Fracture Center Info");
|
||||
fractureCenterGroup->add(&m_uiAnchorPosition);
|
||||
fractureCenterGroup->add(&m_displayIJK);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -35,7 +35,6 @@
|
||||
#include "cafPdmProxyValueField.h"
|
||||
#include "cafPdmPtrField.h"
|
||||
|
||||
//#include "RimEllipseFractureTemplate.h"
|
||||
|
||||
class RigFracture;
|
||||
class RimEclipseCase;
|
||||
@ -59,6 +58,16 @@ public:
|
||||
caf::PdmField<double> azimuth;
|
||||
caf::PdmField<double> perforationLength;
|
||||
|
||||
caf::PdmField<int> stimPlanTimeIndexToPlot;
|
||||
enum stimPlanPlotParameterEnum
|
||||
{
|
||||
CONDUCTIVITY,
|
||||
PERMEABILITY,
|
||||
WIDTH
|
||||
};
|
||||
caf::PdmField< caf::AppEnum< stimPlanPlotParameterEnum > > stimPlanParameterToPlot;
|
||||
|
||||
|
||||
cvf::Vec3d anchorPosition();
|
||||
void setAnchorPosition(const cvf::Vec3d& pos);
|
||||
virtual void setAzimuth() =0;
|
||||
|
@ -153,27 +153,19 @@ void RimSimWellFracture::updateFracturePositionFromLocation()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
RimFracture::defineUiOrdering(uiConfigName, uiOrdering);
|
||||
|
||||
uiOrdering.add(&name);
|
||||
|
||||
caf::PdmUiGroup* locationGroup = uiOrdering.addNewGroup("Location / Orientation");
|
||||
locationGroup->add(&m_location);
|
||||
locationGroup->add(&m_branchIndex);
|
||||
locationGroup->add(&azimuth);
|
||||
if (attachedFractureDefinition())
|
||||
{
|
||||
if (attachedFractureDefinition()->orientation == RimEllipseFractureTemplate::ALONG_WELL_PATH
|
||||
|| attachedFractureDefinition()->orientation == RimEllipseFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
azimuth.uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
else if (attachedFractureDefinition()->orientation == RimEllipseFractureTemplate::AZIMUTH)
|
||||
{
|
||||
azimuth.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
|
||||
propertyGroup->add(&m_fractureTemplate);
|
||||
propertyGroup->add(&stimPlanParameterToPlot);
|
||||
propertyGroup->add(&stimPlanTimeIndexToPlot);
|
||||
propertyGroup->add(&perforationLength);
|
||||
|
||||
caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup("Fracture Center Info");
|
||||
|
@ -469,6 +469,14 @@ std::vector<double> RimStimPlanFractureTemplate::adjustedDepthCoordsAroundWellP
|
||||
return depthRelativeToWellPath;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RimStimPlanFractureTemplate::getStimPlanTimeValues()
|
||||
{
|
||||
return m_stimPlanFractureDefinitionData->timeSteps;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -57,6 +57,7 @@ public:
|
||||
|
||||
std::vector<double> getNegAndPosXcoords();
|
||||
std::vector<double> adjustedDepthCoordsAroundWellPathPosition();
|
||||
std::vector<double> getStimPlanTimeValues();
|
||||
|
||||
caf::PdmField<double> wellPathDepthAtFracture;
|
||||
|
||||
|
@ -147,26 +147,19 @@ void RimWellPathFracture::updatePositionFromMeasuredDepth()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
RimFracture::defineUiOrdering(uiConfigName, uiOrdering);
|
||||
|
||||
uiOrdering.add(&name);
|
||||
|
||||
caf::PdmUiGroup* locationGroup = uiOrdering.addNewGroup("Location / Orientation");
|
||||
locationGroup->add(&m_measuredDepth);
|
||||
locationGroup->add(&azimuth);
|
||||
if (attachedFractureDefinition())
|
||||
{
|
||||
if (attachedFractureDefinition()->orientation == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| attachedFractureDefinition()->orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
azimuth.uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
else if (attachedFractureDefinition()->orientation == RimFractureTemplate::AZIMUTH)
|
||||
{
|
||||
azimuth.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
|
||||
propertyGroup->add(&m_fractureTemplate);
|
||||
propertyGroup->add(&stimPlanParameterToPlot);
|
||||
propertyGroup->add(&stimPlanTimeIndexToPlot);
|
||||
propertyGroup->add(&perforationLength);
|
||||
|
||||
caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup("Fracture Center Info");
|
||||
|
Loading…
Reference in New Issue
Block a user