mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1351 - pre-proto - Adding well radius to fracture and fracture template. Well radius, perforation length and perforation efficiency for fracture is updated from fracture template if no local adjustments have been made. Units (meter -feet) is not yet handled.
This commit is contained in:
parent
e82a8efc59
commit
a7ac9f89ec
@ -45,7 +45,6 @@ RimEllipseFractureTemplate::RimEllipseFractureTemplate(void)
|
||||
CAF_PDM_InitField(&halfLength, "HalfLength", 650.0f, "Halflength X<sub>f</sub>", "", "", "");
|
||||
CAF_PDM_InitField(&height, "Height", 75.0f, "Height", "", "", "");
|
||||
CAF_PDM_InitField(&width, "Width", 1.0f, "Width", "", "", "");
|
||||
CAF_PDM_InitField(&perforationLength, "PerforationLength", 0.0f, "Perforation Length", "", "", ""); //Is this correct description?
|
||||
|
||||
CAF_PDM_InitField(&permeability,"Permeability", 22000.f, "Permeability [mD]", "", "", "");
|
||||
}
|
||||
@ -65,7 +64,7 @@ void RimEllipseFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
{
|
||||
RimFractureTemplate::fieldChangedByUi(changedField, oldValue, newValue);
|
||||
|
||||
if (changedField == &halfLength || changedField == &height || changedField == &perforationLength)
|
||||
if (changedField == &halfLength || changedField == &height)
|
||||
{
|
||||
//Changes to one of these parameters should change all fractures with this fracture template attached.
|
||||
RimProject* proj;
|
||||
@ -80,16 +79,7 @@ void RimEllipseFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
{
|
||||
if (fracture->attachedFractureDefinition() == this)
|
||||
{
|
||||
if (changedField == &halfLength || changedField == &height)
|
||||
{
|
||||
fracture->setRecomputeGeometryFlag();
|
||||
}
|
||||
|
||||
if (changedField == &perforationLength && (abs(oldValue.toDouble() - fracture->perforationLength()) < 1e-5))
|
||||
{
|
||||
fracture->perforationLength = perforationLength;
|
||||
}
|
||||
|
||||
fracture->setRecomputeGeometryFlag();
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,7 +157,7 @@ void RimEllipseFractureTemplate::changeUnits()
|
||||
halfLength = RimDefines::meterToFeet(halfLength);
|
||||
height = RimDefines::meterToFeet(height);
|
||||
width = RimDefines::meterToInch(width);
|
||||
perforationLength = RimDefines::meterToFeet(perforationLength);
|
||||
//perforationLength = RimDefines::meterToFeet(perforationLength);
|
||||
fractureTemplateUnit = RimDefines::UNITS_FIELD;
|
||||
//TODO: Darcy unit?
|
||||
}
|
||||
@ -176,7 +166,7 @@ void RimEllipseFractureTemplate::changeUnits()
|
||||
halfLength = RimDefines::feetToMeter(halfLength);
|
||||
height = RimDefines::feetToMeter(height);
|
||||
width = RimDefines::inchToMeter(width);
|
||||
perforationLength = RimDefines::feetToMeter(perforationLength);
|
||||
//perforationLength = RimDefines::feetToMeter(perforationLength);
|
||||
fractureTemplateUnit = RimDefines::UNITS_METRIC;
|
||||
}
|
||||
|
||||
@ -195,14 +185,14 @@ void RimEllipseFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
halfLength.uiCapability()->setUiName("Halflenght X<sub>f</sub> [m]");
|
||||
height.uiCapability()->setUiName("Height [m]");
|
||||
width.uiCapability()->setUiName("Width [m]");
|
||||
perforationLength.uiCapability()->setUiName("Perforation Length [m]");
|
||||
//perforationLength.uiCapability()->setUiName("Perforation Length [m]");
|
||||
}
|
||||
else if (fractureTemplateUnit == RimDefines::UNITS_FIELD)
|
||||
{
|
||||
halfLength.uiCapability()->setUiName("Halflenght X<sub>f</sub> [Ft]");
|
||||
height.uiCapability()->setUiName("Height [Ft]");
|
||||
width.uiCapability()->setUiName("Width [inches]");
|
||||
perforationLength.uiCapability()->setUiName("Perforation Length [Ft]");
|
||||
//perforationLength.uiCapability()->setUiName("Perforation Length [Ft]");
|
||||
}
|
||||
|
||||
|
||||
@ -223,6 +213,8 @@ void RimEllipseFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
}
|
||||
propertyGroup->add(&skinFactor);
|
||||
propertyGroup->add(&perforationLength);
|
||||
propertyGroup->add(&perforationEfficiency);
|
||||
propertyGroup->add(&wellRadius);
|
||||
|
||||
uiOrdering.add(&fractureTemplateUnit);
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
|
@ -46,7 +46,6 @@ public:
|
||||
|
||||
caf::PdmField<float> halfLength;
|
||||
caf::PdmField<float> height;
|
||||
caf::PdmField<float> perforationLength;
|
||||
|
||||
caf::PdmField<float> width;
|
||||
caf::PdmField<float> permeability;
|
||||
|
@ -86,6 +86,7 @@ RimFracture::RimFracture(void)
|
||||
CAF_PDM_InitField(&perforationLength, "PerforationLength", 0.0, "Perforation Length", "", "", "");
|
||||
CAF_PDM_InitField(&perforationEfficiency, "perforationEfficiency", 1.0, "perforation Efficiency", "", "", "");
|
||||
perforationEfficiency.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
CAF_PDM_InitField(&wellRadius, "wellRadius", 0.0, "Well Radius at Fracture", "", "", "");
|
||||
CAF_PDM_InitField(&dip, "Dip", 0.0, "Dip", "", "", "");
|
||||
CAF_PDM_InitField(&tilt, "Tilt", 0.0, "Tilt", "", "", "");
|
||||
CAF_PDM_InitField(&showPolygonFractureOutline, "showPolygonFractureOutline", true, "Show Polygon Outline", "", "", "");
|
||||
|
@ -56,6 +56,7 @@ public:
|
||||
caf::PdmField<double> azimuth;
|
||||
caf::PdmField<double> perforationLength;
|
||||
caf::PdmField<double> perforationEfficiency;
|
||||
caf::PdmField<double> wellRadius;
|
||||
|
||||
caf::PdmField<double> dip;
|
||||
caf::PdmField<double> tilt;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmUiDoubleSliderEditor.h"
|
||||
|
||||
#include "cvfVector3.h"
|
||||
|
||||
@ -67,11 +68,15 @@ RimFractureTemplate::RimFractureTemplate(void)
|
||||
CAF_PDM_InitField(&fractureTemplateUnit, "fractureTemplateUnit", caf::AppEnum<RimDefines::UnitSystem>(RimDefines::UNITS_METRIC), "Units System", "", "", "");
|
||||
fractureTemplateUnit.uiCapability()->setUiReadOnly(true);
|
||||
|
||||
|
||||
CAF_PDM_InitField(&orientation, "Orientation", caf::AppEnum<FracOrientationEnum>(TRANSVERSE_WELL_PATH), "Fracture Orientation", "", "", "");
|
||||
CAF_PDM_InitField(&azimuthAngle, "AzimuthAngle", 0.0f, "Azimuth Angle", "", "", ""); //Is this correct description?
|
||||
CAF_PDM_InitField(&skinFactor, "SkinFactor", 1.0f, "Skin Factor", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&perforationLength, "PerforationLength", 0.0, "Perforation Length", "", "", "");
|
||||
CAF_PDM_InitField(&perforationEfficiency, "perforationEfficiency", 1.0, "perforation Efficiency", "", "", "");
|
||||
perforationEfficiency.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
CAF_PDM_InitField(&wellRadius, "wellRadius", 0.0, "Well Radius at Fracture", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&fractureConductivity, "FractureCondictivity", caf::AppEnum<FracConductivityEnum>(INFINITE_CONDUCTIVITY), "Conductivity in Fracture", "", "", "");
|
||||
|
||||
}
|
||||
@ -130,8 +135,35 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (changedField == &perforationLength || changedField == &perforationEfficiency || changedField == &wellRadius)
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (!proj) return;
|
||||
std::vector<RimFracture*> fractures;
|
||||
proj->descendantsIncludingThisOfType(fractures);
|
||||
|
||||
for (RimFracture* fracture : fractures)
|
||||
{
|
||||
if (fracture->attachedFractureDefinition() == this)
|
||||
{
|
||||
if (changedField == &perforationLength && (abs(oldValue.toDouble() - fracture->perforationLength()) < 1e-5))
|
||||
{
|
||||
fracture->perforationLength = perforationLength;
|
||||
}
|
||||
if (changedField == &perforationEfficiency && (abs(oldValue.toDouble() - fracture->perforationEfficiency()) < 1e-5))
|
||||
{
|
||||
fracture->perforationEfficiency = perforationEfficiency;
|
||||
}
|
||||
if (changedField == &wellRadius && (abs(oldValue.toDouble() - fracture->wellRadius()) < 1e-5))
|
||||
{
|
||||
fracture->wellRadius = wellRadius;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -149,3 +181,19 @@ void RimFractureTemplate::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
|
||||
azimuthAngle.uiCapability()->setUiHidden(false);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
|
||||
{
|
||||
if (field == &perforationEfficiency)
|
||||
{
|
||||
caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>(attribute);
|
||||
if (myAttr)
|
||||
{
|
||||
myAttr->m_minimum = 0;
|
||||
myAttr->m_maximum = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,6 +49,10 @@ public:
|
||||
caf::PdmField<float> azimuthAngle;
|
||||
caf::PdmField<float> skinFactor;
|
||||
|
||||
caf::PdmField<double> perforationLength;
|
||||
caf::PdmField<double> perforationEfficiency;
|
||||
caf::PdmField<double> wellRadius;
|
||||
|
||||
enum FracOrientationEnum
|
||||
{
|
||||
AZIMUTH,
|
||||
@ -73,4 +77,7 @@ public:
|
||||
virtual std::vector<cvf::Vec3f> fracturePolygon(caf::AppEnum< RimDefines::UnitSystem > fractureTemplateUnit) = 0;
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
|
||||
};
|
||||
|
@ -191,6 +191,7 @@ void RimSimWellFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi
|
||||
propertyGroup->add(&stimPlanTimeIndexToPlot);
|
||||
propertyGroup->add(&perforationLength);
|
||||
propertyGroup->add(&perforationEfficiency);
|
||||
propertyGroup->add(&wellRadius);
|
||||
|
||||
caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup("Fracture Center Info");
|
||||
fractureCenterGroup->add(&m_uiAnchorPosition);
|
||||
|
@ -1081,6 +1081,9 @@ void RimStimPlanFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pd
|
||||
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
|
||||
propertyGroup->add(&fractureConductivity);
|
||||
propertyGroup->add(&skinFactor);
|
||||
propertyGroup->add(&perforationLength);
|
||||
propertyGroup->add(&perforationEfficiency);
|
||||
propertyGroup->add(&wellRadius);
|
||||
|
||||
caf::PdmUiGroup* polygonGroup = uiOrdering.addNewGroup("Fracture Polygon Basis");
|
||||
polygonGroup->add(¶meterForPolygon);
|
||||
@ -1091,6 +1094,8 @@ void RimStimPlanFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pd
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute)
|
||||
{
|
||||
RimFractureTemplate::defineEditorAttribute(field, uiConfigName, attribute);
|
||||
|
||||
if (field == &m_stimPlanFileName)
|
||||
{
|
||||
caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast<caf::PdmUiFilePathEditorAttribute*>(attribute);
|
||||
|
@ -174,6 +174,7 @@ void RimWellPathFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
|
||||
propertyGroup->add(&stimPlanTimeIndexToPlot);
|
||||
propertyGroup->add(&perforationLength);
|
||||
propertyGroup->add(&perforationEfficiency);
|
||||
propertyGroup->add(&wellRadius);
|
||||
|
||||
caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup("Fracture Center Info");
|
||||
fractureCenterGroup->add(&m_uiAnchorPosition);
|
||||
|
Loading…
Reference in New Issue
Block a user