mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1517 Extract pipe properties from RimFishbonesMultipleSubs
This commit is contained in:
parent
6cb652630f
commit
a5f00147df
@ -6,11 +6,13 @@ endif()
|
||||
|
||||
set (SOURCE_GROUP_HEADER_FILES
|
||||
${CEE_CURRENT_LIST_DIR}RimFishbonesMultipleSubs.h
|
||||
${CEE_CURRENT_LIST_DIR}RimFishbonesPipeProperties.h
|
||||
${CEE_CURRENT_LIST_DIR}RimFishbonesCollection.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
${CEE_CURRENT_LIST_DIR}RimFishbonesMultipleSubs.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimFishbonesPipeProperties.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimFishbonesCollection.cpp
|
||||
)
|
||||
|
||||
|
@ -59,7 +59,7 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
{
|
||||
CAF_PDM_InitObject("FishbonesMultipleSubs", ":/Default.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&fishbonesColor, "FishbonesColor", cvf::Color3f(0.999f, 0.333f, 0.999f), "Fishbones Color", "", "", "");
|
||||
CAF_PDM_InitField(&fishbonesColor, "FishbonesColor", cvf::Color3f(0.999f, 0.333f, 0.999f), "Fishbones Color", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_lateralCountPerSub, "LateralCountPerSub", size_t(3), "Laterals Per Sub", "", "", "");
|
||||
CAF_PDM_InitField(&m_lateralLength, "LateralLength", QString("12.0"), "Length(s) [m]", "", "Specify multiple length values if the sub lengths differ", "");
|
||||
@ -67,7 +67,6 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
CAF_PDM_InitField(&m_lateralExitAngle, "LateralExitAngle", 35.0, "Exit Angle [deg]", "", "", "");
|
||||
CAF_PDM_InitField(&m_lateralBuildAngle, "LateralBuildAngle", 5.0, "Build Angle [deg/m]", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_lateralHoleRadius, "LateralHoleRadius", 12.0, "Hole Radius [mm]", "", "", "");
|
||||
CAF_PDM_InitField(&m_lateralTubingRadius, "LateralTubingRadius", 8.0, "Tubing Radius [mm]", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_lateralOpenHoleRoghnessFactor, "LateralOpenHoleRoghnessFactor", 0.001, "Open Hole Roghness Factor [m]", "", "", "");
|
||||
@ -75,7 +74,6 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
|
||||
CAF_PDM_InitField(&m_lateralLengthFraction, "LateralLengthFraction", 0.8, "Length Fraction [0..1]", "", "", "");
|
||||
CAF_PDM_InitField(&m_lateralInstallFraction, "LateralInstallFraction", 0.7, "Install Fraction [0..1]", "", "", "");
|
||||
CAF_PDM_InitField(&m_skinFactor, "SkinFactor", 1.0, "Skin Factor [0..1]", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_icdCount, "IcdCount", size_t(2), "ICD Count", "", "", "");
|
||||
CAF_PDM_InitField(&m_icdOrificeRadius, "IcdOrificeRadius", 8.0, "ICD Orifice Radius [mm]", "", "", "");
|
||||
@ -95,6 +93,12 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
m_installationRotationAngles.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitField(&m_fixedInstallationRotationAngle, "FixedInstallationRotationAngle", 0.0, " Fixed Angle [deg]", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_pipeProperties, "PipeProperties", "Pipe Properties", "", "", "");
|
||||
m_pipeProperties.uiCapability()->setUiHidden(true);
|
||||
m_pipeProperties.uiCapability()->setUiTreeChildrenHidden(true);
|
||||
|
||||
m_pipeProperties = new RimFishbonesPipeProperties;
|
||||
|
||||
m_name.uiCapability()->setUiReadOnly(true);
|
||||
|
||||
m_rigFishbonesGeometry = std::unique_ptr<RigFisbonesGeometry>(new RigFisbonesGeometry(this));
|
||||
@ -370,12 +374,6 @@ void RimFishbonesMultipleSubs::defineUiOrdering(QString uiConfigName, caf::PdmUi
|
||||
lateralConfigGroup->add(&m_fixedInstallationRotationAngle);
|
||||
}
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* wellGroup = lateralConfigGroup->addNewGroup("Well Properties");
|
||||
|
||||
wellGroup->add(&m_lateralHoleRadius);
|
||||
wellGroup->add(&m_skinFactor);
|
||||
}
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* successGroup = lateralConfigGroup->addNewGroup("Installation Success Fractions");
|
||||
@ -386,6 +384,12 @@ void RimFishbonesMultipleSubs::defineUiOrdering(QString uiConfigName, caf::PdmUi
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* wellGroup = uiOrdering.addNewGroup("Well Properties");
|
||||
|
||||
m_pipeProperties->uiOrdering(uiConfigName, *wellGroup);
|
||||
}
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* mswGroup = uiOrdering.addNewGroup("Multi Segment Wells");
|
||||
mswGroup->setCollapsedByDefault(true);
|
||||
|
@ -20,13 +20,15 @@
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfVector3.h"
|
||||
#include "cvfColor3.h"
|
||||
|
||||
// Include to make Pdm work for cvf::Color
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
#include "cafPdmChildField.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
@ -69,7 +71,7 @@ public:
|
||||
double buildAngle() const;
|
||||
|
||||
double tubingRadius() const;
|
||||
double holeRadius() const { return m_lateralHoleRadius(); }
|
||||
double holeRadius() const { return m_pipeProperties()->holeRadius(); }
|
||||
double openHoleRoughnessFactor() const { return m_lateralOpenHoleRoghnessFactor(); }
|
||||
double lateralCountPerSub() const;
|
||||
std::vector<double> lateralLengths() const;
|
||||
@ -104,9 +106,6 @@ private:
|
||||
caf::PdmField<double> m_lateralExitAngle;
|
||||
caf::PdmField<double> m_lateralBuildAngle;
|
||||
|
||||
caf::PdmField<double> m_skinFactor;
|
||||
|
||||
caf::PdmField<double> m_lateralHoleRadius;
|
||||
caf::PdmField<double> m_lateralTubingRadius;
|
||||
|
||||
caf::PdmField<double> m_lateralOpenHoleRoghnessFactor;
|
||||
@ -131,5 +130,7 @@ private:
|
||||
caf::PdmField<std::vector<double>> m_installationRotationAngles;
|
||||
caf::PdmField<double> m_fixedInstallationRotationAngle;
|
||||
|
||||
caf::PdmChildField<RimFishbonesPipeProperties*> m_pipeProperties;
|
||||
|
||||
std::unique_ptr<RigFisbonesGeometry> m_rigFishbonesGeometry;
|
||||
};
|
||||
|
@ -0,0 +1,52 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimFishbonesPipeProperties, "FishbonesPipeProperties");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishbonesPipeProperties::RimFishbonesPipeProperties()
|
||||
{
|
||||
CAF_PDM_InitObject("FishbonesPipeProperties", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_lateralHoleRadius, "LateralHoleRadius", 12.0, "Hole Radius [mm]", "", "", "");
|
||||
CAF_PDM_InitField(&m_skinFactor, "SkinFactor", 1.0, "Skin Factor [0..1]", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFishbonesPipeProperties::~RimFishbonesPipeProperties()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesPipeProperties::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering & uiOrdering)
|
||||
{
|
||||
uiOrdering.add(&m_lateralHoleRadius);
|
||||
uiOrdering.add(&m_skinFactor);
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfVector3.h"
|
||||
#include "cvfColor3.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmField.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFishbonesPipeProperties : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimFishbonesPipeProperties();
|
||||
virtual ~RimFishbonesPipeProperties();
|
||||
|
||||
double skinFactor() const { return m_skinFactor(); }
|
||||
double holeRadius() const { return m_lateralHoleRadius(); }
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<double> m_skinFactor;
|
||||
caf::PdmField<double> m_lateralHoleRadius;
|
||||
};
|
@ -45,6 +45,12 @@ RimFishboneWellPathCollection::RimFishboneWellPathCollection()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellPaths, "WellPaths", "Well Paths", "", "", "");
|
||||
m_wellPaths.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_pipeProperties, "PipeProperties", "Pipe Properties", "", "", "");
|
||||
m_pipeProperties.uiCapability()->setUiHidden(true);
|
||||
m_pipeProperties.uiCapability()->setUiTreeHidden(true);
|
||||
m_pipeProperties.uiCapability()->setUiTreeChildrenHidden(true);
|
||||
m_pipeProperties = new RimFishbonesPipeProperties;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -57,6 +63,15 @@ void RimFishboneWellPathCollection::fieldChangedByUi(const caf::PdmFieldHandle*
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishboneWellPathCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
caf::PdmUiGroup* wellPropertiesGroup = uiOrdering.addNewGroup("Well Properties");
|
||||
m_pipeProperties->uiOrdering(uiConfigName, *wellPropertiesGroup);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -21,9 +21,11 @@
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "RimFishboneWellPath.h"
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmField.h"
|
||||
|
||||
//==================================================================================================
|
||||
@ -42,9 +44,13 @@ public:
|
||||
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
private:
|
||||
void appendCompletion(RimFishboneWellPath* completion);
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimFishboneWellPath*> m_wellPaths;
|
||||
caf::PdmChildField<RimFishbonesPipeProperties*> m_pipeProperties;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user