mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1629 Set default values on completions dependent on selected unit system
This commit is contained in:
parent
d3f512f783
commit
088617ea5c
@ -109,6 +109,14 @@ std::vector<const RimFishboneWellPath*> RimFishboneWellPathCollection::wellPaths
|
||||
return paths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishboneWellPathCollection::setUnitSystemSpecificDefaults()
|
||||
{
|
||||
m_pipeProperties->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -50,6 +50,8 @@ public:
|
||||
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;
|
||||
|
||||
|
@ -125,6 +125,7 @@ void RimFishbonesCollection::appendFishbonesSubs(RimFishbonesMultipleSubs* subs)
|
||||
subs->fishbonesColor = nextFishbonesColor();
|
||||
fishbonesSubs.push_back(subs);
|
||||
|
||||
subs->setUnitSystemSpecificDefaults();
|
||||
subs->recomputeLateralLocations();
|
||||
}
|
||||
|
||||
@ -244,3 +245,29 @@ double RimFishbonesCollection::roughnessFactor(RiaEclipseUnitTools::UnitSystem u
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,8 @@ public:
|
||||
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 );
|
||||
|
@ -316,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();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -94,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;
|
||||
|
@ -77,6 +77,26 @@ double RimFishbonesPipeProperties::holeDiameter(RiaEclipseUnitTools::UnitSystem
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -45,6 +45,8 @@ public:
|
||||
double skinFactor() const { return m_skinFactor(); }
|
||||
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;
|
||||
|
||||
|
@ -147,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -54,6 +54,8 @@ public:
|
||||
|
||||
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;
|
||||
|
@ -93,6 +93,14 @@ bool RimWellPathCompletions::hasCompletions() const
|
||||
!perforationCollection()->perforations().empty();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCompletions::setUnitSystemSpecificDefaults()
|
||||
{
|
||||
m_fishbonesCollection->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -43,6 +43,8 @@ public:
|
||||
QString wellNameForExport() const;
|
||||
bool hasCompletions() const;
|
||||
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
protected:
|
||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName) override;
|
||||
|
||||
|
@ -483,6 +483,8 @@ double RimWellPath::combinedScaleFactor() const
|
||||
void RimWellPath::setUnitSystem(RiaEclipseUnitTools::UnitSystem unitSystem)
|
||||
{
|
||||
m_unitSystem = unitSystem;
|
||||
|
||||
m_completions->setUnitSystemSpecificDefaults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user