mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge branch 'dev' into well-path-restructure
This commit is contained in:
@@ -109,6 +109,14 @@ std::vector<const RimFishboneWellPath*> RimFishboneWellPathCollection::wellPaths
|
||||
return paths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishboneWellPathCollection::setUnitSystemSpecificDefaults()
|
||||
{
|
||||
m_pipeProperties->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "RimFishboneWellPath.h"
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
@@ -45,9 +47,11 @@ public:
|
||||
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;
|
||||
|
||||
|
||||
@@ -84,6 +84,39 @@ void RimFishbonesCollection::fieldChangedByUi(const caf::PdmFieldHandle* changed
|
||||
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);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -92,6 +125,7 @@ void RimFishbonesCollection::appendFishbonesSubs(RimFishbonesMultipleSubs* subs)
|
||||
subs->fishbonesColor = nextFishbonesColor();
|
||||
fishbonesSubs.push_back(subs);
|
||||
|
||||
subs->setUnitSystemSpecificDefaults();
|
||||
subs->recomputeLateralLocations();
|
||||
}
|
||||
|
||||
@@ -157,3 +191,83 @@ void RimFishbonesCollection::recalculateStartMD()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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;
|
||||
|
||||
@@ -174,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;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -239,6 +316,37 @@ void RimFishbonesMultipleSubs::recomputeLateralLocations()
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -352,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,11 +81,11 @@ 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;
|
||||
@@ -92,6 +94,8 @@ public:
|
||||
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>
|
||||
|
||||
|
||||
@@ -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,10 +19,13 @@
|
||||
#include "RimWellPathCompletions.h"
|
||||
|
||||
#include "RimFishbonesCollection.h"
|
||||
#include "RimFishboneWellPathCollection.h"
|
||||
#include "RimPerforationCollection.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellPathCompletions, "WellPathCompletions");
|
||||
|
||||
@@ -80,3 +83,39 @@ QString RimWellPathCompletions::wellNameForExport() const
|
||||
return m_wellNameForExport();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,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:
|
||||
|
||||
@@ -86,12 +86,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);
|
||||
|
||||
@@ -1543,7 +1543,7 @@ bool RimReservoirCellResultsStorage::isDataPresent(size_t scalarResultIndex) con
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::vector< std::vector<double> > data = m_cellResults->cellScalarResults(scalarResultIndex);
|
||||
const std::vector< std::vector<double> >& data = m_cellResults->cellScalarResults(scalarResultIndex);
|
||||
|
||||
for (size_t tsIdx = 0; tsIdx < data.size(); ++tsIdx)
|
||||
{
|
||||
@@ -1575,25 +1575,7 @@ double RimReservoirCellResultsStorage::darchysValue()
|
||||
|
||||
if (rimCase && rimCase->eclipseCaseData())
|
||||
{
|
||||
RigEclipseCaseData::UnitsType unitsType = rimCase->eclipseCaseData()->unitsType();
|
||||
|
||||
if (unitsType == RigEclipseCaseData::UNITS_FIELD)
|
||||
{
|
||||
darchy = 0.001127;
|
||||
}
|
||||
else if (unitsType == RigEclipseCaseData::UNITS_METRIC)
|
||||
{
|
||||
darchy = 0.008527;
|
||||
}
|
||||
else if (unitsType == RigEclipseCaseData::UNITS_LAB)
|
||||
{
|
||||
darchy = 3.6;
|
||||
}
|
||||
else
|
||||
{
|
||||
darchy = 0.00864; // Assuming (PVT - M)
|
||||
CVF_TIGHT_ASSERT(false); // The enum and doc does not state that the PVT-M actually exists, so to trap this in debug
|
||||
}
|
||||
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
|
||||
|
||||
|
||||
@@ -366,7 +366,11 @@ void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, Q
|
||||
{
|
||||
uiTreeOrdering.skipRemainingChildren(true);
|
||||
uiTreeOrdering.add(&m_wellLogFile);
|
||||
uiTreeOrdering.add(&m_completions);
|
||||
|
||||
if (m_completions->hasCompletions())
|
||||
{
|
||||
uiTreeOrdering.add(&m_completions);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -479,6 +483,8 @@ double RimWellPath::combinedScaleFactor() const
|
||||
void RimWellPath::setUnitSystem(RiaEclipseUnitTools::UnitSystem unitSystem)
|
||||
{
|
||||
m_unitSystem = unitSystem;
|
||||
|
||||
m_completions->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -439,14 +439,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