mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
Merge branch 'dev' into pre-proto
This commit is contained in:
commit
7c99a2573a
47 files changed
+1460
-395
No files matched your search
@@ -62,5 +62,5 @@ private:
|
||||
|
||||
caf::PdmField< std::vector< cvf::Vec3d> > m_coordinates;
|
||||
caf::PdmField< std::vector< double > > m_measuredDepths;
|
||||
caf::PdmProxyValueField< QString > m_displayCoordinates;
|
||||
caf::PdmProxyValueField< QString > m_displayCoordinates;
|
||||
};
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "RimFishboneWellPath.h"
|
||||
#include "RimView.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimFishbonesCollection.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
@@ -53,6 +54,36 @@ RimFishboneWellPathCollection::RimFishboneWellPathCollection()
|
||||
m_pipeProperties = new RimFishbonesPipeProperties;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishboneWellPathCollection::importCompletionsFromFile(const QStringList& filePaths)
|
||||
{
|
||||
RifWellPathImporter wellPathImporter;
|
||||
|
||||
for (const QString& filePath : filePaths)
|
||||
{
|
||||
size_t wellDataCount = wellPathImporter.wellDataCount(filePath);
|
||||
|
||||
for (size_t i = 0; i < wellDataCount; ++i)
|
||||
{
|
||||
RifWellPathImporter::WellData wellData = wellPathImporter.readWellData(filePath, i);
|
||||
RimFishboneWellPath* wellCompletion = new RimFishboneWellPath();
|
||||
wellCompletion->setName(wellData.m_name);
|
||||
wellCompletion->setCoordinates(wellData.m_wellPathGeometry->m_wellPathPoints);
|
||||
wellCompletion->setMeasuredDepths(wellData.m_wellPathGeometry->m_measuredDepths);
|
||||
appendCompletion(wellCompletion);
|
||||
}
|
||||
}
|
||||
|
||||
RimFishbonesCollection* fishbonesCollection;
|
||||
firstAncestorOrThisOfType(fishbonesCollection);
|
||||
if (fishbonesCollection != nullptr)
|
||||
{
|
||||
fishbonesCollection->recalculateStartMD();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -78,6 +109,14 @@ std::vector<const RimFishboneWellPath*> RimFishboneWellPathCollection::wellPaths
|
||||
return paths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishboneWellPathCollection::setUnitSystemSpecificDefaults()
|
||||
{
|
||||
m_pipeProperties->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -106,25 +145,3 @@ void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* comple
|
||||
project->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishboneWellPathCollection::importCompletionsFromFile(const QStringList& filePaths)
|
||||
{
|
||||
RifWellPathImporter wellPathImporter;
|
||||
|
||||
foreach(const QString& filePath, filePaths) {
|
||||
size_t wellDataCount = wellPathImporter.wellDataCount(filePath);
|
||||
|
||||
for (size_t i = 0; i < wellDataCount; ++i)
|
||||
{
|
||||
RifWellPathImporter::WellData wellData = wellPathImporter.readWellData(filePath, i);
|
||||
RimFishboneWellPath* wellCompletion = new RimFishboneWellPath();
|
||||
wellCompletion->setName(wellData.m_name);
|
||||
wellCompletion->setCoordinates(wellData.m_wellPathGeometry->m_wellPathPoints);
|
||||
wellCompletion->setMeasuredDepths(wellData.m_wellPathGeometry->m_measuredDepths);
|
||||
appendCompletion(wellCompletion);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "RimFishboneWellPath.h"
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
@@ -40,19 +42,21 @@ class RimFishboneWellPathCollection : public RimCheckableNamedObject
|
||||
public:
|
||||
RimFishboneWellPathCollection();
|
||||
|
||||
void importCompletionsFromFile(const QStringList& filePaths);
|
||||
void importCompletionsFromFile(const QStringList& filePaths);
|
||||
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
std::vector<const RimFishboneWellPath*> wellPaths() const;
|
||||
double holeDiameter() const { return m_pipeProperties->holeDiameter(); }
|
||||
double holeDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const { return m_pipeProperties->holeDiameter(unitSystem); }
|
||||
double skinFactor() const { return m_pipeProperties->skinFactor(); }
|
||||
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
private:
|
||||
void appendCompletion(RimFishboneWellPath* completion);
|
||||
void appendCompletion(RimFishboneWellPath* completion);
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimFishboneWellPath*> m_wellPaths;
|
||||
|
||||
@@ -55,6 +55,8 @@ RimFishbonesCollection::RimFishbonesCollection()
|
||||
CAF_PDM_InitField(&m_mainBoreDiameter, "MainBoreDiameter", 0.216, "Main Bore Diameter", "", "", "");
|
||||
CAF_PDM_InitField(&m_linerDiameter, "LinerDiameter", 0.152, "Liner Inner Diameter", "", "", "");
|
||||
CAF_PDM_InitField(&m_roughnessFactor, "RoughnessFactor", 1e-05, "Roughness Factor", "", "", "");
|
||||
|
||||
manuallyModifiedStartMD = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -72,11 +74,49 @@ RimFishboneWellPathCollection* RimFishbonesCollection::wellPathCollection() cons
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &m_startMD)
|
||||
{
|
||||
manuallyModifiedStartMD = true;
|
||||
}
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_startMD.uiCapability()->setUiName("Start MD [m]");
|
||||
m_mainBoreDiameter.uiCapability()->setUiName("Main Bore Diameter [m]");
|
||||
m_linerDiameter.uiCapability()->setUiName("Liner Inner Diameter [m]");
|
||||
m_roughnessFactor.uiCapability()->setUiName("Roughness Factor [m]");
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_startMD.uiCapability()->setUiName("Start MD [ft]");
|
||||
m_mainBoreDiameter.uiCapability()->setUiName("Main Bore Diameter [ft]");
|
||||
m_linerDiameter.uiCapability()->setUiName("Liner Inner Diameter [ft]");
|
||||
m_roughnessFactor.uiCapability()->setUiName("Roughness Factor [ft]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uiOrdering.add(&m_startMD);
|
||||
uiOrdering.add(&m_mainBoreDiameter);
|
||||
uiOrdering.add(&m_linerDiameter);
|
||||
uiOrdering.add(&m_roughnessFactor);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -85,7 +125,8 @@ void RimFishbonesCollection::appendFishbonesSubs(RimFishbonesMultipleSubs* subs)
|
||||
subs->fishbonesColor = nextFishbonesColor();
|
||||
fishbonesSubs.push_back(subs);
|
||||
|
||||
recalculateStartMD();
|
||||
subs->setUnitSystemSpecificDefaults();
|
||||
subs->recomputeLateralLocations();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -136,9 +177,97 @@ void RimFishbonesCollection::recalculateStartMD()
|
||||
}
|
||||
}
|
||||
|
||||
if (minStartMD < m_startMD())
|
||||
for (const RimFishboneWellPath* wellPath : m_wellPathCollection->wellPaths())
|
||||
{
|
||||
if (wellPath->measuredDepths().size() > 0)
|
||||
{
|
||||
minStartMD = std::min(minStartMD, wellPath->measuredDepths()[0] - 13.0);
|
||||
}
|
||||
}
|
||||
|
||||
if (!manuallyModifiedStartMD || minStartMD < m_startMD())
|
||||
{
|
||||
m_startMD = minStartMD;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesCollection::mainBoreDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD && unitSystem == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter(m_mainBoreDiameter());
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC && unitSystem == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet(m_mainBoreDiameter());
|
||||
}
|
||||
return m_mainBoreDiameter();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesCollection::linerDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD && unitSystem == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter(m_linerDiameter());
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC && unitSystem == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet(m_linerDiameter());
|
||||
}
|
||||
return m_linerDiameter();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesCollection::roughnessFactor(RiaEclipseUnitTools::UnitSystem unitSystem) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD && unitSystem == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter(m_roughnessFactor());
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC && unitSystem == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet(m_roughnessFactor());
|
||||
}
|
||||
return m_roughnessFactor();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesCollection::setUnitSystemSpecificDefaults()
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_mainBoreDiameter = 0.216;
|
||||
m_linerDiameter = 0.152;
|
||||
m_roughnessFactor = 1e-05;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_mainBoreDiameter = 0.708;
|
||||
m_linerDiameter = 0.5;
|
||||
m_roughnessFactor = 3.28e-05;
|
||||
}
|
||||
|
||||
m_wellPathCollection->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
@@ -47,13 +49,16 @@ public:
|
||||
caf::PdmChildArrayField<RimFishbonesMultipleSubs*> fishbonesSubs;
|
||||
|
||||
void recalculateStartMD();
|
||||
double startMD() const { return m_startMD(); }
|
||||
double mainBoreDiameter() const { return m_mainBoreDiameter(); }
|
||||
double linerDiameter() const { return m_linerDiameter(); }
|
||||
double roughnessFactor() const { return m_roughnessFactor(); }
|
||||
double startMD() const { return m_startMD; }
|
||||
double mainBoreDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const;
|
||||
double linerDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const;
|
||||
double roughnessFactor(RiaEclipseUnitTools::UnitSystem unitSystem) const;
|
||||
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
|
||||
private:
|
||||
cvf::Color3f nextFishbonesColor() const;
|
||||
@@ -65,4 +70,6 @@ private:
|
||||
caf::PdmField<double> m_mainBoreDiameter;
|
||||
caf::PdmField<double> m_linerDiameter;
|
||||
caf::PdmField<double> m_roughnessFactor;
|
||||
|
||||
bool manuallyModifiedStartMD;
|
||||
};
|
||||
@@ -103,8 +103,6 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
nameField()->uiCapability()->setUiReadOnly(true);
|
||||
|
||||
m_rigFishbonesGeometry = std::unique_ptr<RigFisbonesGeometry>(new RigFisbonesGeometry(this));
|
||||
|
||||
computeSubLateralIndices();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -128,7 +126,6 @@ void RimFishbonesMultipleSubs::setMeasuredDepthAndCount(double measuredDepth, do
|
||||
|
||||
computeRangesAndLocations();
|
||||
computeRotationAngles();
|
||||
computeSubLateralIndices();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -177,11 +174,88 @@ double RimFishbonesMultipleSubs::buildAngle() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::tubingDiameter() const
|
||||
double RimFishbonesMultipleSubs::tubingDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const
|
||||
{
|
||||
return m_lateralTubingDiameter;
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
if (unitSystem == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::inchToMeter(m_lateralTubingDiameter());
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_lateralTubingDiameter() / 1000;
|
||||
}
|
||||
}
|
||||
else if (unitSystem == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet(m_lateralTubingDiameter() / 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
return RiaEclipseUnitTools::inchToFeet(m_lateralTubingDiameter());
|
||||
}
|
||||
}
|
||||
CVF_ASSERT(false);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::openHoleRoughnessFactor(RiaEclipseUnitTools::UnitSystem unitSystem) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD && unitSystem == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter(m_lateralOpenHoleRoghnessFactor());
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC && unitSystem == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet(m_lateralOpenHoleRoghnessFactor());
|
||||
}
|
||||
return m_lateralOpenHoleRoghnessFactor();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::icdOrificeDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
if (unitSystem == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::inchToMeter(m_icdOrificeDiameter());
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_icdOrificeDiameter() / 1000;
|
||||
}
|
||||
}
|
||||
else if (unitSystem == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet(m_icdOrificeDiameter() / 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
return RiaEclipseUnitTools::inchToFeet(m_icdOrificeDiameter());
|
||||
}
|
||||
}
|
||||
CVF_ASSERT(false);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -233,6 +307,46 @@ std::vector<std::pair<cvf::Vec3d, double>> RimFishbonesMultipleSubs::coordsAndMD
|
||||
return m_rigFishbonesGeometry->coordsForLateral(subIndex, lateralIndex);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesMultipleSubs::recomputeLateralLocations()
|
||||
{
|
||||
computeRangesAndLocations();
|
||||
computeRotationAngles();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesMultipleSubs::setUnitSystemSpecificDefaults()
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_rangeSubSpacing = 13;
|
||||
m_lateralLength = "11";
|
||||
m_lateralTubingDiameter = 8;
|
||||
m_lateralOpenHoleRoghnessFactor = 0.001;
|
||||
m_lateralTubingRoghnessFactor = 1e-05;
|
||||
m_icdOrificeDiameter = 7;
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_rangeSubSpacing = 42;
|
||||
m_lateralLength = "36";
|
||||
m_lateralTubingDiameter = 0.31;
|
||||
m_lateralOpenHoleRoghnessFactor = 0.0032;
|
||||
m_lateralTubingRoghnessFactor = 3.28e-05;
|
||||
m_icdOrificeDiameter = 0.28;
|
||||
}
|
||||
m_pipeProperties->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -275,8 +389,7 @@ void RimFishbonesMultipleSubs::fieldChangedByUi(const caf::PdmFieldHandle* chang
|
||||
computeRotationAngles();
|
||||
}
|
||||
|
||||
if (recomputeLocations ||
|
||||
changedField == &m_locationOfSubs ||
|
||||
if (changedField == &m_locationOfSubs ||
|
||||
changedField == &m_lateralInstallSuccessFraction ||
|
||||
changedField == &m_lateralCountPerSub)
|
||||
{
|
||||
@@ -338,6 +451,7 @@ void RimFishbonesMultipleSubs::computeRangesAndLocations()
|
||||
|
||||
RimFishbonesCollection* collection;
|
||||
this->firstAncestorOrThisOfTypeAsserted(collection);
|
||||
computeSubLateralIndices();
|
||||
collection->recalculateStartMD();
|
||||
}
|
||||
|
||||
@@ -346,6 +460,44 @@ void RimFishbonesMultipleSubs::computeRangesAndLocations()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesMultipleSubs::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_lateralLength.uiCapability()->setUiName("Length(s) [m]");
|
||||
m_lateralBuildAngle.uiCapability()->setUiName("Build Angle [deg/m]");
|
||||
m_lateralTubingDiameter.uiCapability()->setUiName("Tubing Diameter [mm]");
|
||||
m_lateralOpenHoleRoghnessFactor.uiCapability()->setUiName("Open Hole Roughness Factor [m]");
|
||||
m_lateralTubingRoghnessFactor.uiCapability()->setUiName("Tubing Roughness Factor [m]");
|
||||
|
||||
m_icdOrificeDiameter.uiCapability()->setUiName("ICD Orifice Diameter [mm]");
|
||||
|
||||
m_locationOfSubs.uiCapability()->setUiName("Measured Depths [m]");
|
||||
m_rangeStart.uiCapability()->setUiName("Start MD [m]");
|
||||
m_rangeEnd.uiCapability()->setUiName("End MD [m]");
|
||||
m_rangeSubSpacing.uiCapability()->setUiName("Spacing [m]");
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_lateralLength.uiCapability()->setUiName("Length(s) [ft]");
|
||||
m_lateralBuildAngle.uiCapability()->setUiName("Build Angle [deg/ft]");
|
||||
m_lateralTubingDiameter.uiCapability()->setUiName("Tubing Diameter [in]");
|
||||
m_lateralOpenHoleRoghnessFactor.uiCapability()->setUiName("Open Hole Roughness Factor [ft]");
|
||||
m_lateralTubingRoghnessFactor.uiCapability()->setUiName("Tubing Roughness Factor [ft]");
|
||||
|
||||
m_icdOrificeDiameter.uiCapability()->setUiName("ICD Orifice Diameter [in]");
|
||||
|
||||
m_locationOfSubs.uiCapability()->setUiName("Measured Depths [ft]");
|
||||
m_rangeStart.uiCapability()->setUiName("Start MD [ft]");
|
||||
m_rangeEnd.uiCapability()->setUiName("End MD [ft]");
|
||||
m_rangeSubSpacing.uiCapability()->setUiName("Spacing [ft]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("Appearance");
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfVector3.h"
|
||||
#include "cvfColor3.h"
|
||||
@@ -79,19 +81,21 @@ public:
|
||||
double exitAngle() const;
|
||||
double buildAngle() const;
|
||||
|
||||
double tubingDiameter() const;
|
||||
double holeDiameter() const { return m_pipeProperties()->holeDiameter(); }
|
||||
double tubingDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const;
|
||||
double holeDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const { return m_pipeProperties()->holeDiameter(unitSystem); }
|
||||
double skinFactor() const { return m_pipeProperties()->skinFactor(); }
|
||||
double openHoleRoughnessFactor() const { return m_lateralOpenHoleRoghnessFactor(); }
|
||||
double icdOrificeDiameter() const { return m_icdOrificeDiameter(); }
|
||||
double openHoleRoughnessFactor(RiaEclipseUnitTools::UnitSystem unitSystem) const;
|
||||
double icdOrificeDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const;
|
||||
double icdFlowCoefficient() const { return m_icdFlowCoefficient(); }
|
||||
size_t icdCount() const { return m_icdCount(); }
|
||||
std::vector<double> lateralLengths() const;
|
||||
|
||||
const std::vector<SubLateralIndex>& installedLateralIndices() const { return m_subLateralIndices; };
|
||||
|
||||
const std::vector<SubLateralIndex>& installedLateralIndices() const { return m_subLateralIndices; };
|
||||
std::vector<cvf::Vec3d> coordsForLateral(size_t subIndex, size_t lateralIndex) const;
|
||||
std::vector<std::pair<cvf::Vec3d, double>> coordsAndMDForLateral(size_t subIndex, size_t lateralIndex) const;
|
||||
void recomputeLateralLocations();
|
||||
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
// Override from Rim3dPropertiesInterface
|
||||
virtual cvf::BoundingBox boundingBoxInDomainCoords() override;
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
@@ -31,7 +33,7 @@ RimFishbonesPipeProperties::RimFishbonesPipeProperties()
|
||||
CAF_PDM_InitObject("FishbonesPipeProperties", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_lateralHoleDiameter, "LateralHoleDiameter", 12.5, "Hole Diameter [mm]", "", "", "");
|
||||
CAF_PDM_InitField(&m_skinFactor, "SkinFactor", 1.0, "Skin Factor [0..1]", "", "", "");
|
||||
CAF_PDM_InitField(&m_skinFactor, "SkinFactor", 0.0, "Skin Factor [0..1]", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -42,11 +44,80 @@ RimFishbonesPipeProperties::~RimFishbonesPipeProperties()
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesPipeProperties::holeDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
if (unitSystem == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::inchToMeter(m_lateralHoleDiameter());
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_lateralHoleDiameter() / 1000;
|
||||
}
|
||||
}
|
||||
else if (unitSystem == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet(m_lateralHoleDiameter() / 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
return RiaEclipseUnitTools::inchToFeet(m_lateralHoleDiameter());
|
||||
}
|
||||
}
|
||||
CVF_ASSERT(false);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesPipeProperties::setUnitSystemSpecificDefaults()
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_lateralHoleDiameter = 12.5;
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_lateralHoleDiameter = 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesPipeProperties::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering & uiOrdering)
|
||||
{
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_lateralHoleDiameter.uiCapability()->setUiName("Hole Diameter [mm]");
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_lateralHoleDiameter.uiCapability()->setUiName("Hole Diameter [in]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uiOrdering.add(&m_lateralHoleDiameter);
|
||||
uiOrdering.add(&m_skinFactor);
|
||||
}
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfVector3.h"
|
||||
#include "cvfColor3.h"
|
||||
@@ -41,7 +43,9 @@ public:
|
||||
virtual ~RimFishbonesPipeProperties();
|
||||
|
||||
double skinFactor() const { return m_skinFactor(); }
|
||||
double holeDiameter() const { return m_lateralHoleDiameter(); }
|
||||
double holeDiameter(RiaEclipseUnitTools::UnitSystem unitSystem) const;
|
||||
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
@@ -72,6 +72,8 @@ void RimPerforationCollection::appendPerforation(RimPerforationInterval* perfora
|
||||
{
|
||||
m_perforations.push_back(perforation);
|
||||
|
||||
perforation->setUnitSystemSpecificDefaults();
|
||||
|
||||
updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(perforation);
|
||||
|
||||
|
||||
@@ -40,10 +40,10 @@ public:
|
||||
RimPerforationCollection();
|
||||
~RimPerforationCollection();
|
||||
|
||||
void appendPerforation(RimPerforationInterval* perforation);
|
||||
void appendPerforation(RimPerforationInterval* perforation);
|
||||
std::vector<const RimPerforationInterval*> perforations() const;
|
||||
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
friend class RiuEditPerforationCollectionWidget;
|
||||
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "cafPdmUiListEditor.h"
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
#include "cafPdmUiLineEditor.h"
|
||||
#include "cafPdmUiDateEditor.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimPerforationInterval, "Perforation");
|
||||
|
||||
@@ -38,13 +36,12 @@ RimPerforationInterval::RimPerforationInterval()
|
||||
{
|
||||
CAF_PDM_InitObject("Perforation", ":/PerforationInterval16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_startMD, "StartMeasuredDepth", 0.0, "Start MD [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_endMD, "EndMeasuredDepth", 0.0, "End MD [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_diameter, "Diameter", 0.216, "Diameter [m]", "", "", "");
|
||||
CAF_PDM_InitField(&m_skinFactor, "SkinFactor", 0.0, "Skin Factor", "", "", "");
|
||||
CAF_PDM_InitField(&m_startOfHistory, "StartOfHistory", true, "Start of History", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_date, "StartDate", "Start Date", "", "", "");
|
||||
m_date.uiCapability()->setUiEditorTypeName(caf::PdmUiLineEditor::uiEditorTypeName());
|
||||
CAF_PDM_InitField(&m_startMD, "StartMeasuredDepth", 0.0, "Start MD", "", "", "");
|
||||
CAF_PDM_InitField(&m_endMD, "EndMeasuredDepth", 0.0, "End MD", "", "", "");
|
||||
CAF_PDM_InitField(&m_diameter, "Diameter", 0.216, "Diameter", "", "", "");
|
||||
CAF_PDM_InitField(&m_skinFactor, "SkinFactor", 0.0, "Skin Factor", "", "", "");
|
||||
CAF_PDM_InitField(&m_startOfHistory, "StartOfHistory", true, "Start of History", "", "", "");
|
||||
CAF_PDM_InitField(&m_date, "StartDate", QDateTime::currentDateTime(), "Start Date", "", "", "");
|
||||
|
||||
nameField()->uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
@@ -100,6 +97,24 @@ void RimPerforationInterval::setSkinFactor(double skinFactor)
|
||||
m_skinFactor = skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::diameter(RiaEclipseUnitTools::UnitSystem unitSystem) const
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
if (unitSystem == RiaEclipseUnitTools::UNITS_METRIC && wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::feetToMeter(m_diameter());
|
||||
}
|
||||
else if (unitSystem == RiaEclipseUnitTools::UNITS_FIELD && wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::meterToFeet(m_diameter());
|
||||
}
|
||||
return m_diameter();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -132,6 +147,26 @@ cvf::BoundingBox RimPerforationInterval::boundingBoxInDomainCoords()
|
||||
return bb;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::setUnitSystemSpecificDefaults()
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_diameter = 0.216;
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_diameter = 0.709;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -161,6 +196,25 @@ void RimPerforationInterval::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTree
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_startMD.uiCapability()->setUiName("Start MD [m]");
|
||||
m_endMD.uiCapability()->setUiName("End MD [m]");
|
||||
m_diameter.uiCapability()->setUiName("Diameter [m]");
|
||||
}
|
||||
else if (wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_startMD.uiCapability()->setUiName("Start MD [ft]");
|
||||
m_endMD.uiCapability()->setUiName("End MD [ft]");
|
||||
m_diameter.uiCapability()->setUiName("Diameter [ft]");
|
||||
}
|
||||
}
|
||||
}
|
||||
m_date.uiCapability()->setUiReadOnly(m_startOfHistory());
|
||||
|
||||
uiOrdering.add(&m_startMD);
|
||||
@@ -173,3 +227,18 @@ void RimPerforationInterval::defineUiOrdering(QString uiConfigName, caf::PdmUiOr
|
||||
uiOrdering.skipRemainingFields();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
|
||||
{
|
||||
if (field == &m_date)
|
||||
{
|
||||
caf::PdmUiDateEditorAttribute* myAttr = static_cast<caf::PdmUiDateEditorAttribute*>(attribute);
|
||||
if (myAttr)
|
||||
{
|
||||
myAttr->dateFormat = "dd MMM yyyy";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
@@ -45,17 +47,20 @@ public:
|
||||
void setSkinFactor(double skinFactor);
|
||||
double startMD() const { return m_startMD(); }
|
||||
double endMD() const { return m_endMD(); }
|
||||
double diameter() const { return m_diameter(); }
|
||||
double diameter(RiaEclipseUnitTools::UnitSystem unitSystem) const;
|
||||
double skinFactor() const { return m_skinFactor(); }
|
||||
|
||||
bool isActiveOnDate(const QDateTime& date) const;
|
||||
|
||||
virtual cvf::BoundingBox boundingBoxInDomainCoords() override;
|
||||
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
|
||||
private:
|
||||
caf::PdmField< double > m_startMD;
|
||||
|
||||
@@ -19,11 +19,14 @@
|
||||
#include "RimWellPathCompletions.h"
|
||||
|
||||
#include "RimFishbonesCollection.h"
|
||||
#include "RimFishboneWellPathCollection.h"
|
||||
#include "RimPerforationCollection.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellPathCompletions, "WellPathCompletions");
|
||||
|
||||
@@ -94,3 +97,40 @@ RimWellPathFractureCollection* RimWellPathCompletions::fractureCollection() cons
|
||||
|
||||
return m_fractureCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPathCompletions::hasCompletions() const
|
||||
{
|
||||
return !fishbonesCollection()->fishbonesSubs().empty() ||
|
||||
!fishbonesCollection()->wellPathCollection()->wellPaths().empty() ||
|
||||
!perforationCollection()->perforations().empty();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCompletions::setUnitSystemSpecificDefaults()
|
||||
{
|
||||
m_fishbonesCollection->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCompletions::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName)
|
||||
{
|
||||
uiTreeOrdering.skipRemainingChildren(true);
|
||||
|
||||
if (!perforationCollection()->perforations().empty())
|
||||
{
|
||||
uiTreeOrdering.add(&m_perforationCollection);
|
||||
}
|
||||
|
||||
if (!fishbonesCollection()->fishbonesSubs().empty() ||
|
||||
!fishbonesCollection()->wellPathCollection()->wellPaths().empty())
|
||||
{
|
||||
uiTreeOrdering.add(&m_fishbonesCollection);
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,12 @@ public:
|
||||
|
||||
void setWellNameForExport(const QString& name);
|
||||
QString wellNameForExport() const;
|
||||
bool hasCompletions() const;
|
||||
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
protected:
|
||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName) override;
|
||||
|
||||
private:
|
||||
caf::PdmChildField<RimFishbonesCollection*> m_fishbonesCollection;
|
||||
|
||||
@@ -356,7 +356,7 @@ std::map<QString, const std::vector<double> *> RimWellAllocationPlot::findReleva
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTrack)
|
||||
{
|
||||
RigEclipseCaseData::UnitsType unitSet = m_case->eclipseCaseData()->unitsType();
|
||||
RiaEclipseUnitTools::UnitSystem unitSet = m_case->eclipseCaseData()->unitsType();
|
||||
|
||||
|
||||
if (m_flowDiagSolution)
|
||||
@@ -364,13 +364,13 @@ void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTr
|
||||
QString unitText;
|
||||
switch ( unitSet )
|
||||
{
|
||||
case RigEclipseCaseData::UNITS_METRIC:
|
||||
case RiaEclipseUnitTools::UNITS_METRIC:
|
||||
unitText = "[m<sup>3</sup>/day]";
|
||||
break;
|
||||
case RigEclipseCaseData::UNITS_FIELD:
|
||||
case RiaEclipseUnitTools::UNITS_FIELD:
|
||||
unitText = "[Brl/day]";
|
||||
break;
|
||||
case RigEclipseCaseData::UNITS_LAB:
|
||||
case RiaEclipseUnitTools::UNITS_LAB:
|
||||
unitText = "[cm<sup>3</sup>/hr]";
|
||||
break;
|
||||
default:
|
||||
@@ -384,13 +384,13 @@ void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTr
|
||||
QString unitText;
|
||||
switch ( unitSet )
|
||||
{
|
||||
case RigEclipseCaseData::UNITS_METRIC:
|
||||
case RiaEclipseUnitTools::UNITS_METRIC:
|
||||
unitText = "[Liquid Sm<sup>3</sup>/day], [Gas kSm<sup>3</sup>/day]";
|
||||
break;
|
||||
case RigEclipseCaseData::UNITS_FIELD:
|
||||
case RiaEclipseUnitTools::UNITS_FIELD:
|
||||
unitText = "[Liquid BBL/day], [Gas BOE/day]";
|
||||
break;
|
||||
case RigEclipseCaseData::UNITS_LAB:
|
||||
case RiaEclipseUnitTools::UNITS_LAB:
|
||||
unitText = "[cm<sup>3</sup>/hr]";
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -93,12 +93,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
|
||||
std::vector<caf::PdmUiItem*> uiItems;
|
||||
caf::SelectionManager::instance()->selectedItems(uiItems);
|
||||
|
||||
if (uiItems.size() == 0)
|
||||
{
|
||||
commandIds << "RicNewWellLogPlotFeature";
|
||||
commandIds << "RicNewSummaryPlotFeature";
|
||||
}
|
||||
else if (uiItems.size() == 1)
|
||||
if (uiItems.size() == 1)
|
||||
{
|
||||
caf::PdmUiItem* uiItem = uiItems[0];
|
||||
CVF_ASSERT(uiItem);
|
||||
|
||||
@@ -1568,7 +1568,7 @@ double RimReservoirCellResultsStorage::darchysValue()
|
||||
|
||||
if (rimCase && rimCase->eclipseCaseData())
|
||||
{
|
||||
darchy = rimCase->eclipseCaseData()->darchysValue();
|
||||
darchy = RiaEclipseUnitTools::darcysConstant(rimCase->eclipseCaseData()->unitsType());
|
||||
}
|
||||
|
||||
return darchy;
|
||||
|
||||
@@ -349,8 +349,8 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
|
||||
eclExtractor->curveData(resAcc.p(), &values);
|
||||
}
|
||||
|
||||
RigEclipseCaseData::UnitsType eclipseUnitsType = eclipseCase->eclipseCaseData()->unitsType();
|
||||
if (eclipseUnitsType == RigEclipseCaseData::UNITS_FIELD)
|
||||
RiaEclipseUnitTools::UnitSystem eclipseUnitsType = eclipseCase->eclipseCaseData()->unitsType();
|
||||
if (eclipseUnitsType == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
// See https://github.com/OPM/ResInsight/issues/538
|
||||
|
||||
|
||||
@@ -386,7 +386,12 @@ void RimWellPath::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO
|
||||
void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName)
|
||||
{
|
||||
uiTreeOrdering.add(&m_wellLogFile);
|
||||
uiTreeOrdering.add(&m_completions);
|
||||
|
||||
if (m_completions->hasCompletions())
|
||||
{
|
||||
uiTreeOrdering.add(&m_completions);
|
||||
}
|
||||
|
||||
uiTreeOrdering.skipRemainingChildren(true);
|
||||
}
|
||||
|
||||
@@ -500,6 +505,8 @@ double RimWellPath::combinedScaleFactor() const
|
||||
void RimWellPath::setUnitSystem(RiaEclipseUnitTools::UnitSystem unitSystem)
|
||||
{
|
||||
m_unitSystem = unitSystem;
|
||||
|
||||
m_completions->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -440,14 +440,7 @@ RiaEclipseUnitTools::UnitSystemType RimWellPathCollection::findUnitSystemForWell
|
||||
|
||||
if (caseBoundingBox.intersects(wellPathBoundingBox))
|
||||
{
|
||||
if (eclipseCaseData->unitsType() == RigEclipseCaseData::UNITS_FIELD)
|
||||
{
|
||||
return RiaEclipseUnitTools::UNITS_FIELD;
|
||||
}
|
||||
else if (eclipseCaseData->unitsType() == RigEclipseCaseData::UNITS_METRIC)
|
||||
{
|
||||
return RiaEclipseUnitTools::UNITS_METRIC;
|
||||
}
|
||||
return eclipseCaseData->unitsType();
|
||||
}
|
||||
return RiaEclipseUnitTools::UNITS_UNKNOWN;
|
||||
}
|
||||
Reference in new issue
Block a user