mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
#1534 Perforation Intervals : Do not include in export based on time step
This commit is contained in:
parent
1112f6a2e0
commit
8fd50721cc
@ -27,9 +27,39 @@ RicExportCompletionDataSettingsUi::RicExportCompletionDataSettingsUi()
|
||||
{
|
||||
CAF_PDM_InitObject("RimExportCompletionDataSettings", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&timeStep, "TimeStepIndex", 0, "Time Step", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&includePerforations, "IncludePerforations", true, "Include Perforations", "", "", "");
|
||||
CAF_PDM_InitField(&includeFishbones, "IncludeFishbones", true, "Include Fishbones", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&includeWpimult, "IncludeWPIMULT", true, "Include WPIMLUT", "", "", "");
|
||||
CAF_PDM_InitField(&removeLateralsInMainBoreCells, "RemoveLateralsInMainBoreCells", false, "Remove Laterals in Main Bore Cells", "", "", "");
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RicExportCompletionDataSettingsUi::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
if (fieldNeedingOptions == &timeStep)
|
||||
{
|
||||
QStringList timeStepNames;
|
||||
|
||||
if (caseToApply)
|
||||
{
|
||||
timeStepNames = caseToApply->timeStepStrings();
|
||||
}
|
||||
|
||||
for (int i = 0; i < timeStepNames.size(); i++)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(timeStepNames[i], i));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
options = RicCaseAndFileExportSettingsUi::calculateValueOptions(fieldNeedingOptions, useOptionsOnly);
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
@ -38,4 +38,9 @@ public:
|
||||
|
||||
caf::PdmField<bool> includeWpimult;
|
||||
caf::PdmField<bool> removeLateralsInMainBoreCells;
|
||||
|
||||
caf::PdmField<int> timeStep;
|
||||
|
||||
protected:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
};
|
||||
|
@ -372,6 +372,8 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeature::generateP
|
||||
|
||||
for (const RimPerforationInterval* interval : wellPath->perforationIntervalCollection()->perforations())
|
||||
{
|
||||
if (!interval->isActiveOnDate(settings.caseToApply->timeStepDates()[settings.timeStep])) continue;
|
||||
|
||||
std::vector<cvf::Vec3d> perforationPoints = wellPath->wellPathGeometry()->clippedPointSubset(interval->startMD(), interval->endMD());
|
||||
std::vector<WellPathCellIntersectionInfo> intersectedCells = RigWellPathIntersectionTools::findCellsIntersectedByPath(settings.caseToApply->eclipseCaseData(), perforationPoints);
|
||||
for (auto& cell : intersectedCells)
|
||||
|
@ -99,6 +99,18 @@ void RimPerforationInterval::setSkinFactor(double skinFactor)
|
||||
m_skinFactor = skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPerforationInterval::isActiveOnDate(const QDateTime& date) const
|
||||
{
|
||||
if (m_startOfHistory())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return m_date() < date;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -48,6 +48,8 @@ public:
|
||||
double diameter() const { return m_diameter(); }
|
||||
double skinFactor() const { return m_skinFactor(); }
|
||||
|
||||
bool isActiveOnDate(const QDateTime& date) const;
|
||||
|
||||
virtual cvf::BoundingBox boundingBoxInDomainCoords() override;
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user