mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 15:26:48 -06:00
#2442 Fracture Template : Move more fields from public to protected
This commit is contained in:
parent
a1c891cd99
commit
778119bf62
@ -63,7 +63,7 @@ void RicConvertAllFractureTemplatesToFieldFeature::onActionTriggered(bool isChec
|
||||
|
||||
for (auto ellipseFracTemplate : ellipseFracTemplates)
|
||||
{
|
||||
if (ellipseFracTemplate->fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
if (ellipseFracTemplate->fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
ellipseFracTemplate->changeUnits();
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ void RicConvertAllFractureTemplatesToMetricFeature::onActionTriggered(bool isChe
|
||||
|
||||
for (auto ellipseFracTemplate : ellipseFracTemplates)
|
||||
{
|
||||
if (ellipseFracTemplate->fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
if (ellipseFracTemplate->fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
ellipseFracTemplate->changeUnits();
|
||||
}
|
||||
|
@ -78,11 +78,11 @@ void RicConvertFractureTemplateUnitFeature::setupActionLook(QAction* actionToSet
|
||||
if (!ellipseFractureTemplate) return;
|
||||
|
||||
QString text = "Convert Values to ";
|
||||
if (ellipseFractureTemplate->fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
if (ellipseFractureTemplate->fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
text += "Field";
|
||||
}
|
||||
else if (ellipseFractureTemplate->fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
else if (ellipseFractureTemplate->fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
text += "Metric";
|
||||
}
|
||||
|
@ -54,8 +54,8 @@ void RicNewEllipseFractureTemplateFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimEllipseFractureTemplate* ellipseFractureTemplate = new RimEllipseFractureTemplate();
|
||||
fracDefColl->fractureDefinitions.push_back(ellipseFractureTemplate);
|
||||
ellipseFractureTemplate->name = "Ellipse Fracture Template";
|
||||
ellipseFractureTemplate->fractureTemplateUnit = fracDefColl->defaultUnitsForFracTemplates();
|
||||
ellipseFractureTemplate->setName("Ellipse Fracture Template");
|
||||
ellipseFractureTemplate->setFractureTemplateUnit(fracDefColl->defaultUnitsForFracTemplates());
|
||||
ellipseFractureTemplate->setDefaultValuesFromUnit();
|
||||
ellipseFractureTemplate->loadDataAndUpdate();
|
||||
|
||||
|
@ -61,7 +61,7 @@ void RicNewStimPlanFractureTemplateFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimStimPlanFractureTemplate* fractureDef = new RimStimPlanFractureTemplate();
|
||||
fracDefColl->fractureDefinitions.push_back(fractureDef);
|
||||
fractureDef->name = "StimPlan Fracture Template";
|
||||
fractureDef->setName("StimPlan Fracture Template");
|
||||
fractureDef->setFileName(fileName);
|
||||
fractureDef->loadDataAndUpdate();
|
||||
fractureDef->setDefaultsBasedOnXMLfile();
|
||||
|
@ -173,23 +173,25 @@ std::vector<cvf::Vec3f> RimEllipseFractureTemplate::fractureBorderPolygon(RiaEcl
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::changeUnits()
|
||||
{
|
||||
if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_halfLength = RiaEclipseUnitTools::meterToFeet(m_halfLength);
|
||||
m_height = RiaEclipseUnitTools::meterToFeet(m_height);
|
||||
m_width = RiaEclipseUnitTools::meterToInch(m_width);
|
||||
m_wellDiameter = RiaEclipseUnitTools::meterToInch(m_wellDiameter);
|
||||
m_perforationLength = RiaEclipseUnitTools::meterToFeet(m_perforationLength);
|
||||
fractureTemplateUnit = RiaEclipseUnitTools::UNITS_FIELD;
|
||||
|
||||
setFractureTemplateUnit(RiaEclipseUnitTools::UNITS_FIELD);
|
||||
}
|
||||
else if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
else if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_halfLength = RiaEclipseUnitTools::feetToMeter(m_halfLength);
|
||||
m_height = RiaEclipseUnitTools::feetToMeter(m_height);
|
||||
m_width = RiaEclipseUnitTools::inchToMeter(m_width);
|
||||
m_wellDiameter = RiaEclipseUnitTools::inchToMeter(m_wellDiameter);
|
||||
m_perforationLength = RiaEclipseUnitTools::feetToMeter(m_perforationLength);
|
||||
fractureTemplateUnit = RiaEclipseUnitTools::UNITS_METRIC;
|
||||
|
||||
setFractureTemplateUnit(RiaEclipseUnitTools::UNITS_METRIC);
|
||||
}
|
||||
|
||||
this->updateConnectedEditors();
|
||||
@ -281,7 +283,7 @@ const RigFractureGrid* RimEllipseFractureTemplate::fractureGrid() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::setDefaultValuesFromUnit()
|
||||
{
|
||||
if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_width = 0.5f;
|
||||
m_permeability = 80000.0f;
|
||||
@ -305,12 +307,12 @@ void RimEllipseFractureTemplate::setDefaultValuesFromUnit()
|
||||
double RimEllipseFractureTemplate::conductivity() const
|
||||
{
|
||||
double cond = cvf::UNDEFINED_DOUBLE;
|
||||
if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
//Conductivity should be md-m, width is in m
|
||||
cond = m_permeability * m_width;
|
||||
}
|
||||
else if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
else if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
//Conductivity should be md-ft, but width is in inches
|
||||
cond = m_permeability * RiaEclipseUnitTools::inchToFeet(m_width);
|
||||
@ -350,14 +352,14 @@ void RimEllipseFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
{
|
||||
RimFractureTemplate::defineUiOrdering(uiConfigName, uiOrdering);
|
||||
|
||||
if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_halfLength.uiCapability()->setUiName("Halflenght X<sub>f</sub> [m]");
|
||||
m_height.uiCapability()->setUiName("Height [m]");
|
||||
m_width.uiCapability()->setUiName("Width [m]");
|
||||
m_wellDiameter.uiCapability()->setUiName("Well Diameter [m]");
|
||||
}
|
||||
else if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
else if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_halfLength.uiCapability()->setUiName("Halflenght X<sub>f</sub> [Ft]");
|
||||
m_height.uiCapability()->setUiName("Height [Ft]");
|
||||
@ -378,12 +380,12 @@ void RimEllipseFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
}
|
||||
|
||||
|
||||
uiOrdering.add(&name);
|
||||
uiOrdering.add(&m_name);
|
||||
|
||||
caf::PdmUiGroup* geometryGroup = uiOrdering.addNewGroup("Geometry");
|
||||
geometryGroup->add(&m_halfLength);
|
||||
geometryGroup->add(&m_height);
|
||||
geometryGroup->add(&orientationType);
|
||||
geometryGroup->add(&m_orientationType);
|
||||
geometryGroup->add(&m_azimuthAngle);
|
||||
|
||||
caf::PdmUiGroup* trGr = uiOrdering.addNewGroup("Fracture Truncation");
|
||||
@ -398,7 +400,7 @@ void RimEllipseFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
propertyGroup->add(&m_perforationEfficiency);
|
||||
propertyGroup->add(&m_wellDiameter);
|
||||
|
||||
uiOrdering.add(&fractureTemplateUnit);
|
||||
uiOrdering.add(&m_fractureTemplateUnit);
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
}
|
||||
|
||||
|
@ -438,15 +438,15 @@ void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO
|
||||
|
||||
if (fractureTemplate())
|
||||
{
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
m_uiWellPathAzimuth.uiCapability()->setUiHidden(true);
|
||||
m_uiWellFractureAzimuthDiff.uiCapability()->setUiHidden(true);
|
||||
m_wellFractureAzimuthAngleWarning.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
else if (fractureTemplate()->orientationType == RimFractureTemplate::AZIMUTH)
|
||||
else if (fractureTemplate()->orientationType() == RimFractureTemplate::AZIMUTH)
|
||||
{
|
||||
m_uiWellPathAzimuth.uiCapability()->setUiHidden(false);
|
||||
m_uiWellFractureAzimuthDiff.uiCapability()->setUiHidden(false);
|
||||
@ -462,17 +462,17 @@ void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO
|
||||
}
|
||||
}
|
||||
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
m_azimuth.uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
else if (fractureTemplate()->orientationType == RimFractureTemplate::AZIMUTH)
|
||||
else if (fractureTemplate()->orientationType() == RimFractureTemplate::AZIMUTH)
|
||||
{
|
||||
m_azimuth.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
m_perforationEfficiency.uiCapability()->setUiHidden(false);
|
||||
m_perforationLength.uiCapability()->setUiHidden(false);
|
||||
@ -626,7 +626,7 @@ void RimFracture::setFractureTemplate(RimFractureTemplate* fractureTemplate)
|
||||
m_stimPlanTimeIndexToPlot = stimPlanFracTemplate->activeTimeStepIndex();
|
||||
}
|
||||
|
||||
if (fractureTemplate->orientationType == RimFractureTemplate::AZIMUTH)
|
||||
if (fractureTemplate->orientationType() == RimFractureTemplate::AZIMUTH)
|
||||
{
|
||||
m_azimuth = fractureTemplate->azimuthAngle();
|
||||
}
|
||||
|
@ -65,11 +65,11 @@ RimFractureTemplate::RimFractureTemplate()
|
||||
{
|
||||
CAF_PDM_InitObject("Fracture Template", ":/FractureTemplate16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&name, "UserDescription", QString("Fracture Template"), "Name", "", "", "");
|
||||
CAF_PDM_InitField(&fractureTemplateUnit,"UnitSystem", caf::AppEnum<RiaEclipseUnitTools::UnitSystem>(RiaEclipseUnitTools::UNITS_METRIC), "Units System", "", "", "");
|
||||
fractureTemplateUnit.uiCapability()->setUiReadOnly(true);
|
||||
CAF_PDM_InitField(&m_name, "UserDescription", QString("Fracture Template"), "Name", "", "", "");
|
||||
CAF_PDM_InitField(&m_fractureTemplateUnit,"UnitSystem", caf::AppEnum<RiaEclipseUnitTools::UnitSystem>(RiaEclipseUnitTools::UNITS_METRIC), "Units System", "", "", "");
|
||||
m_fractureTemplateUnit.uiCapability()->setUiReadOnly(true);
|
||||
|
||||
CAF_PDM_InitField(&orientationType, "Orientation", caf::AppEnum<FracOrientationEnum>(TRANSVERSE_WELL_PATH), "Fracture Orientation", "", "", "");
|
||||
CAF_PDM_InitField(&m_orientationType, "Orientation", caf::AppEnum<FracOrientationEnum>(TRANSVERSE_WELL_PATH), "Fracture Orientation", "", "", "");
|
||||
CAF_PDM_InitField(&m_azimuthAngle, "AzimuthAngle", 0.0f, "Azimuth Angle", "", "", ""); //Is this correct description?
|
||||
CAF_PDM_InitField(&m_skinFactor, "SkinFactor", 0.0f, "Skin Factor", "", "", "");
|
||||
|
||||
@ -93,12 +93,52 @@ RimFractureTemplate::~RimFractureTemplate()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setName(const QString& name)
|
||||
{
|
||||
m_name = name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setFractureTemplateUnit(RiaEclipseUnitTools::UnitSystemType unitSystem)
|
||||
{
|
||||
m_fractureTemplateUnit = unitSystem;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFractureTemplate::name() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureTemplate::FracOrientationEnum RimFractureTemplate::orientationType() const
|
||||
{
|
||||
return m_orientationType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystemType RimFractureTemplate::fractureTemplateUnit() const
|
||||
{
|
||||
return m_fractureTemplateUnit();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimFractureTemplate::userDescriptionField()
|
||||
{
|
||||
return &name;
|
||||
return &m_name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -106,7 +146,7 @@ caf::PdmFieldHandle* RimFractureTemplate::userDescriptionField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &m_azimuthAngle || changedField == &orientationType)
|
||||
if (changedField == &m_azimuthAngle || changedField == &m_orientationType)
|
||||
{
|
||||
//Changes to one of these parameters should change all fractures with this fracture template attached.
|
||||
RimProject* proj;
|
||||
@ -126,7 +166,7 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
fracture->m_azimuth = m_azimuthAngle;
|
||||
}
|
||||
|
||||
if (changedField == &orientationType)
|
||||
if (changedField == &m_orientationType)
|
||||
{
|
||||
if (newValue == AZIMUTH)
|
||||
{
|
||||
@ -186,28 +226,28 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
void RimFractureTemplate::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
|
||||
if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
if (m_fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_wellDiameter.uiCapability()->setUiName("Well Diameter [m]");
|
||||
m_perforationLength.uiCapability()->setUiName("Perforation Length [m]");
|
||||
}
|
||||
else if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
else if (m_fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_wellDiameter.uiCapability()->setUiName("Well Diameter [inches]");
|
||||
m_perforationLength.uiCapability()->setUiName("Perforation Length [Ft]");
|
||||
}
|
||||
|
||||
if (orientationType == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
if (m_orientationType == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| m_orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
m_azimuthAngle.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
else if (orientationType == RimFractureTemplate::AZIMUTH)
|
||||
else if (m_orientationType == RimFractureTemplate::AZIMUTH)
|
||||
{
|
||||
m_azimuthAngle.uiCapability()->setUiHidden(false);
|
||||
}
|
||||
|
||||
if (orientationType == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
if (m_orientationType == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
m_perforationEfficiency.uiCapability()->setUiHidden(false);
|
||||
m_perforationLength.uiCapability()->setUiHidden(false);
|
||||
@ -251,16 +291,16 @@ void RimFractureTemplate::defineEditorAttribute(const caf::PdmFieldHandle* field
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureTemplate::wellDiameterInFractureUnit(RiaEclipseUnitTools::UnitSystemType fractureUnit)
|
||||
{
|
||||
if (fractureUnit == fractureTemplateUnit())
|
||||
if (fractureUnit == m_fractureTemplateUnit())
|
||||
{
|
||||
return m_wellDiameter;
|
||||
}
|
||||
else if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC
|
||||
else if (m_fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC
|
||||
&& fractureUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToInch(m_wellDiameter);
|
||||
}
|
||||
else if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD
|
||||
else if (m_fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD
|
||||
&& fractureUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::inchToMeter(m_wellDiameter);
|
||||
@ -274,16 +314,16 @@ double RimFractureTemplate::wellDiameterInFractureUnit(RiaEclipseUnitTools::Unit
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureTemplate::perforationLengthInFractureUnit(RiaEclipseUnitTools::UnitSystemType fractureUnit)
|
||||
{
|
||||
if (fractureUnit == fractureTemplateUnit())
|
||||
if (fractureUnit == m_fractureTemplateUnit())
|
||||
{
|
||||
return m_perforationLength;
|
||||
}
|
||||
else if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC
|
||||
else if (m_fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC
|
||||
&& fractureUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet(m_perforationLength);
|
||||
}
|
||||
else if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD
|
||||
else if (m_fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD
|
||||
&& fractureUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter(m_perforationLength);
|
||||
@ -329,11 +369,11 @@ float RimFractureTemplate::skinFactor() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setDefaultWellDiameterFromUnit()
|
||||
{
|
||||
if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
if (m_fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_wellDiameter = 8.5;
|
||||
}
|
||||
else if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
else if (m_fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_wellDiameter = 0.216;
|
||||
}
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
class RigEclipseCaseData;
|
||||
class RigFractureGrid;
|
||||
class RimFractureContainment;
|
||||
class MinMaxAccumulator;
|
||||
@ -64,23 +63,21 @@ public:
|
||||
RimFractureTemplate();
|
||||
virtual ~RimFractureTemplate();
|
||||
|
||||
caf::PdmField<QString> name;
|
||||
caf::PdmField<caf::AppEnum<FracOrientationEnum>> orientationType;
|
||||
caf::PdmField<RiaEclipseUnitTools::UnitSystemType> fractureTemplateUnit;
|
||||
|
||||
FracConductivityEnum conductivityType() const;
|
||||
QString name() const;
|
||||
RiaEclipseUnitTools::UnitSystemType fractureTemplateUnit() const;
|
||||
FracOrientationEnum orientationType() const;
|
||||
float azimuthAngle() const;
|
||||
float skinFactor() const;
|
||||
void setDefaultWellDiameterFromUnit();
|
||||
double wellDiameterInFractureUnit(RiaEclipseUnitTools::UnitSystemType fractureUnit);
|
||||
FracConductivityEnum conductivityType() const;
|
||||
double perforationLengthInFractureUnit(RiaEclipseUnitTools::UnitSystemType fractureUnit);
|
||||
|
||||
virtual void fractureTriangleGeometry(std::vector<cvf::Vec3f>* nodeCoords,
|
||||
std::vector<cvf::uint>* triangleIndices,
|
||||
RiaEclipseUnitTools::UnitSystem neededUnit) = 0;
|
||||
|
||||
virtual std::vector<cvf::Vec3f> fractureBorderPolygon(RiaEclipseUnitTools::UnitSystem neededUnit) = 0;
|
||||
virtual const RigFractureGrid* fractureGrid() const = 0;
|
||||
virtual std::vector<cvf::Vec3f> fractureBorderPolygon(RiaEclipseUnitTools::UnitSystem neededUnit) = 0;
|
||||
virtual const RigFractureGrid* fractureGrid() const = 0;
|
||||
const RimFractureContainment* fractureContainment();
|
||||
|
||||
virtual void appendDataToResultStatistics(const QString& resultName,
|
||||
@ -88,7 +85,11 @@ public:
|
||||
MinMaxAccumulator& minMaxAccumulator,
|
||||
PosNegAccumulator& posNegAccumulator) const = 0;
|
||||
|
||||
virtual std::vector<std::pair<QString, QString>> uiResultNamesWithUnit() const = 0;
|
||||
virtual std::vector<std::pair<QString, QString>> uiResultNamesWithUnit() const = 0;
|
||||
|
||||
void setName(const QString& name);
|
||||
void setFractureTemplateUnit(RiaEclipseUnitTools::UnitSystemType unitSystem);
|
||||
void setDefaultWellDiameterFromUnit();
|
||||
|
||||
protected:
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||
@ -97,12 +98,14 @@ protected:
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
|
||||
protected:
|
||||
caf::PdmField<double> m_wellDiameter;
|
||||
caf::PdmField<double> m_perforationLength;
|
||||
caf::PdmField<double> m_perforationEfficiency;
|
||||
caf::PdmField<float> m_skinFactor;
|
||||
caf::PdmField<float> m_azimuthAngle;
|
||||
|
||||
caf::PdmChildField<RimFractureContainment*> m_fractureContainment;
|
||||
caf::PdmField<caf::AppEnum<FracConductivityEnum>> m_conductivityType;
|
||||
caf::PdmField<QString> m_name;
|
||||
caf::PdmField<RiaEclipseUnitTools::UnitSystemType> m_fractureTemplateUnit;
|
||||
caf::PdmField<caf::AppEnum<FracOrientationEnum>> m_orientationType;
|
||||
caf::PdmField<float> m_azimuthAngle;
|
||||
caf::PdmField<float> m_skinFactor;
|
||||
caf::PdmField<double> m_perforationLength;
|
||||
caf::PdmField<double> m_perforationEfficiency;
|
||||
caf::PdmField<double> m_wellDiameter;
|
||||
caf::PdmField<caf::AppEnum<FracConductivityEnum>> m_conductivityType;
|
||||
caf::PdmChildField<RimFractureContainment*> m_fractureContainment;
|
||||
};
|
||||
|
@ -84,16 +84,16 @@ void RimSimWellFracture::updateAzimuthBasedOnWellAzimuthAngle()
|
||||
updateBranchGeometry();
|
||||
|
||||
if (!fractureTemplate()) return;
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
double simWellAzimuth = wellAzimuthAtFracturePosition();
|
||||
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH )
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH )
|
||||
{
|
||||
m_azimuth = simWellAzimuth;
|
||||
}
|
||||
else if (fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
else if (fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
if (simWellAzimuth + 90 < 360) m_azimuth = simWellAzimuth + 90;
|
||||
else m_azimuth = simWellAzimuth - 90;
|
||||
|
@ -268,12 +268,12 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
|
||||
if (m_stimPlanFractureDefinitionData.notNull())
|
||||
{
|
||||
fractureTemplateUnit = m_stimPlanFractureDefinitionData->unitSet();
|
||||
setFractureTemplateUnit(m_stimPlanFractureDefinitionData->unitSet());
|
||||
m_readError = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
fractureTemplateUnit = RiaEclipseUnitTools::UNITS_UNKNOWN;
|
||||
setFractureTemplateUnit(RiaEclipseUnitTools::UNITS_UNKNOWN);
|
||||
m_readError = true;
|
||||
}
|
||||
|
||||
@ -367,11 +367,11 @@ void RimStimPlanFractureTemplate::setPerforationLength()
|
||||
}
|
||||
}
|
||||
|
||||
if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC && m_perforationLength < 10)
|
||||
if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_METRIC && m_perforationLength < 10)
|
||||
{
|
||||
m_perforationLength = 10;
|
||||
}
|
||||
else if (fractureTemplateUnit == RiaEclipseUnitTools::UNITS_FIELD && m_perforationLength < RiaEclipseUnitTools::meterToFeet(10))
|
||||
else if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_FIELD && m_perforationLength < RiaEclipseUnitTools::meterToFeet(10))
|
||||
{
|
||||
m_perforationLength = std::round(RiaEclipseUnitTools::meterToFeet(10));
|
||||
}
|
||||
@ -571,7 +571,7 @@ void RimStimPlanFractureTemplate::updateFractureGrid()
|
||||
{
|
||||
m_fractureGrid = m_stimPlanFractureDefinitionData->createFractureGrid(m_conductivityResultNameOnFile,
|
||||
m_activeTimeStepIndex,
|
||||
fractureTemplateUnit,
|
||||
fractureTemplateUnit(),
|
||||
m_wellPathDepthAtFracture);
|
||||
}
|
||||
}
|
||||
@ -594,7 +594,7 @@ void RimStimPlanFractureTemplate::fractureTriangleGeometry(std::vector<cvf::Vec3
|
||||
{
|
||||
m_stimPlanFractureDefinitionData->createFractureTriangleGeometry(m_wellPathDepthAtFracture,
|
||||
neededUnit,
|
||||
name,
|
||||
name(),
|
||||
nodeCoords,
|
||||
triangleIndices);
|
||||
}
|
||||
@ -617,7 +617,7 @@ std::vector<cvf::Vec3f> RimStimPlanFractureTemplate::fractureBorderPolygon(RiaEc
|
||||
m_activeTimeStepIndex,
|
||||
m_wellPathDepthAtFracture,
|
||||
neededUnit,
|
||||
name);
|
||||
name());
|
||||
}
|
||||
|
||||
return std::vector<cvf::Vec3f>();
|
||||
@ -631,7 +631,7 @@ void RimStimPlanFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pd
|
||||
{
|
||||
RimFractureTemplate::defineUiOrdering(uiConfigName, uiOrdering);
|
||||
|
||||
uiOrdering.add(&name);
|
||||
uiOrdering.add(&m_name);
|
||||
|
||||
caf::PdmUiGroup* fileGroup = uiOrdering.addNewGroup("Input");
|
||||
fileGroup->add(&m_stimPlanFileName);
|
||||
@ -639,7 +639,7 @@ void RimStimPlanFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pd
|
||||
fileGroup->add(&m_wellPathDepthAtFracture);
|
||||
|
||||
caf::PdmUiGroup* geometryGroup = uiOrdering.addNewGroup("Geometry");
|
||||
geometryGroup->add(&orientationType);
|
||||
geometryGroup->add(&m_orientationType);
|
||||
geometryGroup->add(&m_azimuthAngle);
|
||||
|
||||
caf::PdmUiGroup* trGr = uiOrdering.addNewGroup("Fracture Truncation");
|
||||
|
@ -83,17 +83,17 @@ void RimWellPathFracture::updateAzimuthBasedOnWellAzimuthAngle()
|
||||
{
|
||||
if (!fractureTemplate()) return;
|
||||
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
|
||||
double wellPathAzimuth = wellAzimuthAtFracturePosition();
|
||||
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
m_azimuth = wellPathAzimuth;
|
||||
}
|
||||
if (fractureTemplate()->orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
if (wellPathAzimuth + 90 < 360) m_azimuth = wellPathAzimuth + 90;
|
||||
else m_azimuth = wellPathAzimuth - 90;
|
||||
|
Loading…
Reference in New Issue
Block a user