mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3267 MSW export. Add Max Segment Length field to MSW properties
This commit is contained in:
parent
086fbd6756
commit
244741d96b
@ -1640,7 +1640,9 @@ RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMs
|
|||||||
exportInfo.setLinerDiameter(wellPath->fishbonesCollection()->mswParameters()->linerDiameter(unitSystem));
|
exportInfo.setLinerDiameter(wellPath->fishbonesCollection()->mswParameters()->linerDiameter(unitSystem));
|
||||||
exportInfo.setRoughnessFactor(wellPath->fishbonesCollection()->mswParameters()->roughnessFactor(unitSystem));
|
exportInfo.setRoughnessFactor(wellPath->fishbonesCollection()->mswParameters()->roughnessFactor(unitSystem));
|
||||||
|
|
||||||
double maxSegmentLength = enableSegmentSplitting ? 500 : std::numeric_limits<double>::max(); // Fetch value from fishbones collection
|
double maxSegmentLength = enableSegmentSplitting
|
||||||
|
? wellPath->fishbonesCollection()->mswParameters()->maxSegmentLength()
|
||||||
|
: std::numeric_limits<double>::infinity();
|
||||||
bool foundSubGridIntersections = false;
|
bool foundSubGridIntersections = false;
|
||||||
double subStartMD = wellPath->fishbonesCollection()->startMD();
|
double subStartMD = wellPath->fishbonesCollection()->startMD();
|
||||||
for (RimFishbonesMultipleSubs* subs : fishbonesSubs)
|
for (RimFishbonesMultipleSubs* subs : fishbonesSubs)
|
||||||
@ -1732,7 +1734,7 @@ RicMswExportInfo
|
|||||||
std::vector<WellPathCellIntersectionInfo> intersections =
|
std::vector<WellPathCellIntersectionInfo> intersections =
|
||||||
RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(caseToApply->eclipseCaseData(), coords, mds);
|
RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(caseToApply->eclipseCaseData(), coords, mds);
|
||||||
|
|
||||||
double maxSegmentLength = 500; // Fetch value from fractures collection
|
double maxSegmentLength = wellPath->fractureCollection()->mswParameters()->maxSegmentLength();
|
||||||
std::vector<SubSegmentIntersectionInfo> subSegIntersections = spiltIntersectionSegmentsToMaxLength(wellPathGeometry, intersections, maxSegmentLength);
|
std::vector<SubSegmentIntersectionInfo> subSegIntersections = spiltIntersectionSegmentsToMaxLength(wellPathGeometry, intersections, maxSegmentLength);
|
||||||
|
|
||||||
double initialMD = 0.0;
|
double initialMD = 0.0;
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
|
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
|
|
||||||
|
#include "cafPdmUiObjectEditorHandle.h"
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
namespace caf {
|
namespace caf {
|
||||||
template<>
|
template<>
|
||||||
@ -52,6 +55,10 @@ RimMswCompletionParameters::RimMswCompletionParameters()
|
|||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_pressureDrop, "PressureDrop", "Pressure Drop", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_pressureDrop, "PressureDrop", "Pressure Drop", "", "", "");
|
||||||
CAF_PDM_InitFieldNoDefault(&m_lengthAndDepth, "LengthAndDepth", "Length and Depth", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_lengthAndDepth, "LengthAndDepth", "Length and Depth", "", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitField(&m_enforceMaxSegmentLength, "EnforceMaxSegmentLength", false, "Enforce Max Segment Length", "", "", "");
|
||||||
|
CAF_PDM_InitField(&m_maxSegmentLength, "MaxSegmentLength", 10.0, "Max Segment Length", "", "", "");
|
||||||
|
m_maxSegmentLength.uiCapability()->setUiHidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -144,6 +151,14 @@ RimMswCompletionParameters::LengthAndDepthEnum RimMswCompletionParameters::lengt
|
|||||||
return m_lengthAndDepth();
|
return m_lengthAndDepth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
double RimMswCompletionParameters::maxSegmentLength() const
|
||||||
|
{
|
||||||
|
return m_enforceMaxSegmentLength ? m_maxSegmentLength : std::numeric_limits<double>::infinity();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -176,6 +191,18 @@ void RimMswCompletionParameters::setLengthAndDepth(LengthAndDepthType lengthAndD
|
|||||||
m_lengthAndDepth = lengthAndDepthType;
|
m_lengthAndDepth = lengthAndDepthType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimMswCompletionParameters::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||||
|
{
|
||||||
|
if (changedField == &m_enforceMaxSegmentLength)
|
||||||
|
{
|
||||||
|
m_maxSegmentLength.uiCapability()->setUiHidden(!m_enforceMaxSegmentLength());
|
||||||
|
caf::PdmUiObjectEditorHandle::updateUiAllObjectEditors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -203,6 +230,10 @@ void RimMswCompletionParameters::defineUiOrdering(QString uiConfigName, caf::Pdm
|
|||||||
uiOrdering.add(&m_roughnessFactor);
|
uiOrdering.add(&m_roughnessFactor);
|
||||||
uiOrdering.add(&m_pressureDrop);
|
uiOrdering.add(&m_pressureDrop);
|
||||||
uiOrdering.add(&m_lengthAndDepth);
|
uiOrdering.add(&m_lengthAndDepth);
|
||||||
|
uiOrdering.add(&m_enforceMaxSegmentLength);
|
||||||
|
uiOrdering.add(&m_maxSegmentLength);
|
||||||
|
|
||||||
|
uiOrdering.skipRemainingFields(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -51,6 +51,7 @@ public:
|
|||||||
static double defaultRoughnessFactor(RiaEclipseUnitTools::UnitSystem unitSystem);
|
static double defaultRoughnessFactor(RiaEclipseUnitTools::UnitSystem unitSystem);
|
||||||
PressureDropEnum pressureDrop() const;
|
PressureDropEnum pressureDrop() const;
|
||||||
LengthAndDepthEnum lengthAndDepth() const;
|
LengthAndDepthEnum lengthAndDepth() const;
|
||||||
|
double maxSegmentLength() const;
|
||||||
void setLinerDiameter(double diameter);
|
void setLinerDiameter(double diameter);
|
||||||
void setRoughnessFactor(double roughnessFactor);
|
void setRoughnessFactor(double roughnessFactor);
|
||||||
void setPressureDrop(PressureDropType pressureDropType);
|
void setPressureDrop(PressureDropType pressureDropType);
|
||||||
@ -60,6 +61,9 @@ public:
|
|||||||
void setUnitSystemSpecificDefaults();
|
void setUnitSystemSpecificDefaults();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||||
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue);
|
||||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
virtual void initAfterRead() override;
|
virtual void initAfterRead() override;
|
||||||
|
|
||||||
@ -69,4 +73,7 @@ private:
|
|||||||
|
|
||||||
caf::PdmField<PressureDropEnum> m_pressureDrop;
|
caf::PdmField<PressureDropEnum> m_pressureDrop;
|
||||||
caf::PdmField<LengthAndDepthEnum> m_lengthAndDepth;
|
caf::PdmField<LengthAndDepthEnum> m_lengthAndDepth;
|
||||||
|
|
||||||
|
caf::PdmField<bool> m_enforceMaxSegmentLength;
|
||||||
|
caf::PdmField<double> m_maxSegmentLength;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user