mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Restructure RicMswExportInfo code into multiple files.
This commit is contained in:
parent
73be6b6b19
commit
55f980eeb7
@ -10,7 +10,10 @@ ${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleWellPathsFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleSimWellsFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicMultiSegmentWellExportInfo.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicMswCompletions.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicMswExportInfo.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicMswSegment.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicMswSubSegment.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathFractureTextReportFeatureImpl.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathFractureReportItem.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForTemporaryLgrsFeature.h
|
||||
@ -28,7 +31,10 @@ ${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleWellPathsFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleSimWellsFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicMultiSegmentWellExportInfo.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicMswCompletions.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicMswExportInfo.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicMswSegment.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicMswSubSegment.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathFractureTextReportFeatureImpl.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathFractureReportItem.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForTemporaryLgrsFeature.cpp
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "RifEclipseDataTableFormatter.h"
|
||||
|
||||
#include "RicExportFeatureImpl.h"
|
||||
#include "RicMultiSegmentWellExportInfo.h"
|
||||
#include "RicMswExportInfo.h"
|
||||
#include "RicWellPathExportCompletionDataFeatureImpl.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "RicCaseAndFileExportSettingsUi.h"
|
||||
#include "RicExportFeatureImpl.h"
|
||||
#include "RicMultiSegmentWellExportInfo.h"
|
||||
#include "RicMswExportInfo.h"
|
||||
#include "RicWellPathExportCompletionDataFeatureImpl.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
|
@ -0,0 +1,211 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor 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 "RicMswCompletions.h"
|
||||
#include "RicMswSubSegment.h"
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswCompletion::RicMswCompletion(const QString& label,
|
||||
size_t index /* = cvf::UNDEFINED_SIZE_T */,
|
||||
int branchNumber /*= 0*/)
|
||||
: m_label(label)
|
||||
, m_index(index)
|
||||
, m_branchNumber(branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& RicMswCompletion::label() const
|
||||
{
|
||||
return m_label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RicMswCompletion::index() const
|
||||
{
|
||||
return m_index;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicMswCompletion::branchNumber() const
|
||||
{
|
||||
return m_branchNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswCompletion::setBranchNumber(int branchNumber)
|
||||
{
|
||||
m_branchNumber = branchNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswCompletion::addSubSegment(std::shared_ptr<RicMswSubSegment> subSegment)
|
||||
{
|
||||
m_subSegments.push_back(subSegment);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::shared_ptr<RicMswSubSegment>>& RicMswCompletion::subSegments()
|
||||
{
|
||||
return m_subSegments;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::shared_ptr<RicMswSubSegment>>& RicMswCompletion::subSegments() const
|
||||
{
|
||||
return m_subSegments;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswCompletion::setLabel(const QString& label)
|
||||
{
|
||||
m_label = label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswICD::RicMswICD(const QString& label, size_t index /*= cvf::UNDEFINED_SIZE_T*/, int branchNumber /*= cvf::UNDEFINED_INT*/)
|
||||
: RicMswCompletion(label, index, branchNumber)
|
||||
, m_flowCoefficient(0.0)
|
||||
, m_area(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswICD::flowCoefficient() const
|
||||
{
|
||||
return m_flowCoefficient;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswICD::area() const
|
||||
{
|
||||
return m_area;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswICD::setFlowCoefficient(double icdFlowCoefficient)
|
||||
{
|
||||
m_flowCoefficient = icdFlowCoefficient;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswICD::setArea(double icdArea)
|
||||
{
|
||||
m_area = icdArea;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswFishbonesICD::RicMswFishbonesICD(const QString& label,
|
||||
size_t index /*= cvf::UNDEFINED_SIZE_T*/,
|
||||
int branchNumber /*= cvf::UNDEFINED_INT*/)
|
||||
: RicMswICD(label, index, branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCompletionData::CompletionType RicMswFishbonesICD::completionType() const
|
||||
{
|
||||
return RigCompletionData::FISHBONES_ICD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswFracture::RicMswFracture(const QString& label,
|
||||
size_t index /*= cvf::UNDEFINED_SIZE_T*/,
|
||||
int branchNumber /*= cvf::UNDEFINED_INT*/)
|
||||
: RicMswCompletion(label, index, branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCompletionData::CompletionType RicMswFracture::completionType() const
|
||||
{
|
||||
return RigCompletionData::FRACTURE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswPerforation::RicMswPerforation(const QString& label,
|
||||
size_t index /*= cvf::UNDEFINED_SIZE_T*/,
|
||||
int branchNumber /*= cvf::UNDEFINED_INT*/)
|
||||
: RicMswCompletion(label, index, branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCompletionData::CompletionType RicMswPerforation::completionType() const
|
||||
{
|
||||
return RigCompletionData::PERFORATION;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswPerforationICD::RicMswPerforationICD(const QString& label,
|
||||
size_t index /*= cvf::UNDEFINED_SIZE_T*/,
|
||||
int branchNumber /*= cvf::UNDEFINED_INT*/)
|
||||
: RicMswICD(label, index, branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCompletionData::CompletionType RicMswPerforationICD::completionType() const
|
||||
{
|
||||
return RigCompletionData::PERFORATION_ICD;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,126 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor 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 "RicMswSubSegment.h"
|
||||
|
||||
#include "RigCompletionData.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfMath.h"
|
||||
|
||||
#include <QString>
|
||||
#include <memory>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswCompletion
|
||||
{
|
||||
public:
|
||||
RicMswCompletion(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
|
||||
virtual RigCompletionData::CompletionType completionType() const = 0;
|
||||
|
||||
const QString& label() const;
|
||||
size_t index() const;
|
||||
int branchNumber() const;
|
||||
void setBranchNumber(int branchNumber);
|
||||
|
||||
void addSubSegment(std::shared_ptr<RicMswSubSegment> subSegment);
|
||||
|
||||
std::vector<std::shared_ptr<RicMswSubSegment>>& subSegments();
|
||||
const std::vector<std::shared_ptr<RicMswSubSegment>>& subSegments() const;
|
||||
|
||||
void setLabel(const QString& label);
|
||||
|
||||
private:
|
||||
QString m_label;
|
||||
size_t m_index;
|
||||
int m_branchNumber;
|
||||
|
||||
std::vector<std::shared_ptr<RicMswSubSegment>> m_subSegments;
|
||||
};
|
||||
|
||||
class RicMswFishbones : public RicMswCompletion
|
||||
{
|
||||
public:
|
||||
RicMswFishbones(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT)
|
||||
: RicMswCompletion(label, index, branchNumber)
|
||||
{}
|
||||
|
||||
RigCompletionData::CompletionType completionType() const override { return RigCompletionData::FISHBONES; }
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswICD : public RicMswCompletion
|
||||
{
|
||||
public:
|
||||
RicMswICD(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
double flowCoefficient() const;
|
||||
double area() const;
|
||||
void setFlowCoefficient(double icdFlowCoefficient);
|
||||
void setArea(double icdArea);
|
||||
private:
|
||||
double m_flowCoefficient;
|
||||
double m_area;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswFishbonesICD : public RicMswICD
|
||||
{
|
||||
public:
|
||||
RicMswFishbonesICD(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
RigCompletionData::CompletionType completionType() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswFracture : public RicMswCompletion
|
||||
{
|
||||
public:
|
||||
RicMswFracture(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
RigCompletionData::CompletionType completionType() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswPerforation : public RicMswCompletion
|
||||
{
|
||||
public:
|
||||
RicMswPerforation(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
RigCompletionData::CompletionType completionType() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswPerforationICD : public RicMswICD
|
||||
{
|
||||
public:
|
||||
RicMswPerforationICD(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
RigCompletionData::CompletionType completionType() const override;
|
||||
};
|
||||
|
||||
|
@ -0,0 +1,208 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor 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 "RicMswExportInfo.h"
|
||||
|
||||
#include "RicMswSegment.h"
|
||||
|
||||
#include "RimMswCompletionParameters.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswExportInfo::RicMswExportInfo(const RimWellPath* wellPath,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem,
|
||||
double initialMD,
|
||||
const QString& lengthAndDepthText,
|
||||
const QString& pressureDropText)
|
||||
: m_wellPath(wellPath)
|
||||
, m_initialMD(initialMD)
|
||||
, m_unitSystem(unitSystem)
|
||||
, m_topWellBoreVolume(RicMswExportInfo::defaultDoubleValue())
|
||||
, m_linerDiameter(RimMswCompletionParameters::defaultLinerDiameter(unitSystem))
|
||||
, m_roughnessFactor(RimMswCompletionParameters::defaultRoughnessFactor(unitSystem))
|
||||
, m_lengthAndDepthText(lengthAndDepthText)
|
||||
, m_pressureDropText(pressureDropText)
|
||||
, m_hasSubGridIntersections(false)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::setTopWellBoreVolume(double topWellBoreVolume)
|
||||
{
|
||||
m_topWellBoreVolume = topWellBoreVolume;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::setLinerDiameter(double linerDiameter)
|
||||
{
|
||||
m_linerDiameter = linerDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::setRoughnessFactor(double roughnessFactor)
|
||||
{
|
||||
m_roughnessFactor = roughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::setHasSubGridIntersections(bool subGridIntersections)
|
||||
{
|
||||
m_hasSubGridIntersections = subGridIntersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::addWellSegment(std::shared_ptr<RicMswSegment> location)
|
||||
{
|
||||
m_wellSegmentLocations.push_back(location);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::sortLocations()
|
||||
{
|
||||
std::sort(m_wellSegmentLocations.begin(),
|
||||
m_wellSegmentLocations.end(),
|
||||
[](std::shared_ptr<RicMswSegment> lhs, std::shared_ptr<RicMswSegment> rhs)
|
||||
{
|
||||
return *lhs < *rhs;
|
||||
});
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimWellPath* RicMswExportInfo::wellPath() const
|
||||
{
|
||||
return m_wellPath;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::initialMD() const
|
||||
{
|
||||
return m_initialMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::initialTVD() const
|
||||
{
|
||||
return -m_wellPath->wellPathGeometry()->interpolatedPointAlongWellPath(m_initialMD).z();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RicMswExportInfo::unitSystem() const
|
||||
{
|
||||
return m_unitSystem;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::topWellBoreVolume() const
|
||||
{
|
||||
return m_topWellBoreVolume;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::linerDiameter() const
|
||||
{
|
||||
return m_linerDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::roughnessFactor() const
|
||||
{
|
||||
return m_roughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicMswExportInfo::lengthAndDepthText() const
|
||||
{
|
||||
return m_lengthAndDepthText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicMswExportInfo::pressureDropText() const
|
||||
{
|
||||
return m_pressureDropText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicMswExportInfo::hasSubGridIntersections() const
|
||||
{
|
||||
return m_hasSubGridIntersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::defaultDoubleValue()
|
||||
{
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::shared_ptr<RicMswSegment>>& RicMswExportInfo::wellSegmentLocations() const
|
||||
{
|
||||
return m_wellSegmentLocations;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::shared_ptr<RicMswSegment>>& RicMswExportInfo::wellSegmentLocations()
|
||||
{
|
||||
return m_wellSegmentLocations;
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor 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 "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RicMswSegment.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <memory>
|
||||
|
||||
class RimWellPath;
|
||||
class RimFishbonesMultipleSubs;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswExportInfo
|
||||
{
|
||||
public:
|
||||
RicMswExportInfo(const RimWellPath* wellPath,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem,
|
||||
double initialMD,
|
||||
const QString& lengthAndDepthText,
|
||||
const QString& pressureDropText);
|
||||
|
||||
void setTopWellBoreVolume(double topWellBoreVolume);
|
||||
void setLinerDiameter(double linerDiameter);
|
||||
void setRoughnessFactor(double roughnessFactor);
|
||||
void setHasSubGridIntersections(bool subGridIntersections);
|
||||
|
||||
void addWellSegment(std::shared_ptr<RicMswSegment> location);
|
||||
void sortLocations();
|
||||
|
||||
const RimWellPath* wellPath() const;
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const;
|
||||
double initialMD() const;
|
||||
double initialTVD() const;
|
||||
double topWellBoreVolume() const;
|
||||
double linerDiameter() const;
|
||||
double roughnessFactor() const;
|
||||
QString lengthAndDepthText() const;
|
||||
QString pressureDropText() const;
|
||||
bool hasSubGridIntersections() const;
|
||||
static double defaultDoubleValue();
|
||||
|
||||
const std::vector<std::shared_ptr<RicMswSegment>>& wellSegmentLocations() const;
|
||||
std::vector<std::shared_ptr<RicMswSegment>>& wellSegmentLocations();
|
||||
|
||||
private:
|
||||
const RimWellPath* m_wellPath;
|
||||
RiaEclipseUnitTools::UnitSystem m_unitSystem;
|
||||
double m_initialMD;
|
||||
double m_topWellBoreVolume;
|
||||
double m_linerDiameter;
|
||||
double m_roughnessFactor;
|
||||
QString m_lengthAndDepthText;
|
||||
QString m_pressureDropText;
|
||||
bool m_hasSubGridIntersections;
|
||||
|
||||
std::vector<std::shared_ptr<RicMswSegment>> m_wellSegmentLocations;
|
||||
};
|
||||
|
@ -0,0 +1,250 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor 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 "RicMswSegment.h"
|
||||
|
||||
#include "RicMswExportInfo.h"
|
||||
|
||||
#include <cafPdmBase.h>
|
||||
#include <cafPdmObject.h>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswSegment::RicMswSegment(const QString& label,
|
||||
double startMD,
|
||||
double endMD,
|
||||
double startTVD,
|
||||
double endTVD,
|
||||
size_t subIndex,
|
||||
int segmentNumber /*= -1*/)
|
||||
: m_label(label)
|
||||
, m_startMD(startMD)
|
||||
, m_endMD(endMD)
|
||||
, m_startTVD(startTVD)
|
||||
, m_endTVD(endTVD)
|
||||
, m_effectiveDiameter(0.15)
|
||||
, m_holeDiameter(RicMswExportInfo::defaultDoubleValue())
|
||||
, m_openHoleRoughnessFactor(5.0e-5)
|
||||
, m_skinFactor(RicMswExportInfo::defaultDoubleValue())
|
||||
, m_subIndex(subIndex)
|
||||
, m_segmentNumber(segmentNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicMswSegment::label() const
|
||||
{
|
||||
return m_label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::startMD() const
|
||||
{
|
||||
return m_startMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::endMD() const
|
||||
{
|
||||
return m_endMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::deltaMD() const
|
||||
{
|
||||
return m_endMD - m_startMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::startTVD() const
|
||||
{
|
||||
return m_startTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::endTVD() const
|
||||
{
|
||||
return m_endTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::deltaTVD() const
|
||||
{
|
||||
return m_endTVD - m_startTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::effectiveDiameter() const
|
||||
{
|
||||
return m_effectiveDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::holeDiameter() const
|
||||
{
|
||||
return m_holeDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::openHoleRoughnessFactor() const
|
||||
{
|
||||
return m_openHoleRoughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::skinFactor() const
|
||||
{
|
||||
return m_skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RicMswSegment::subIndex() const
|
||||
{
|
||||
return m_subIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicMswSegment::segmentNumber() const
|
||||
{
|
||||
return m_segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::shared_ptr<RicMswCompletion>>& RicMswSegment::completions() const
|
||||
{
|
||||
return m_completions;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::shared_ptr<RicMswCompletion>>& RicMswSegment::completions()
|
||||
{
|
||||
return m_completions;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setLabel(const QString& label)
|
||||
{
|
||||
m_label = label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setEffectiveDiameter(double effectiveDiameter)
|
||||
{
|
||||
m_effectiveDiameter = effectiveDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setHoleDiameter(double holeDiameter)
|
||||
{
|
||||
m_holeDiameter = holeDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setOpenHoleRoughnessFactor(double roughnessFactor)
|
||||
{
|
||||
m_openHoleRoughnessFactor = roughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setSkinFactor(double skinFactor)
|
||||
{
|
||||
m_skinFactor = skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setSegmentNumber(int segmentNumber)
|
||||
{
|
||||
m_segmentNumber = segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::addCompletion(std::shared_ptr<RicMswCompletion> completion)
|
||||
{
|
||||
m_completions.push_back(completion);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setSourcePdmObject(const caf::PdmObject* object)
|
||||
{
|
||||
m_sourcePdmObject = const_cast<caf::PdmObject*>(object);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const caf::PdmObject* RicMswSegment::sourcePdmObject() const
|
||||
{
|
||||
return m_sourcePdmObject;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicMswSegment::operator<(const RicMswSegment& rhs) const
|
||||
{
|
||||
return startMD() < rhs.startMD();
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,92 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor 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 "RicMswCompletions.h"
|
||||
|
||||
#include <cafPdmPointer.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswSegment
|
||||
{
|
||||
public:
|
||||
RicMswSegment(const QString& label,
|
||||
double startMD,
|
||||
double endMD,
|
||||
double startTVD,
|
||||
double endTVD,
|
||||
size_t subIndex = cvf::UNDEFINED_SIZE_T,
|
||||
int segmentNumber = -1);
|
||||
|
||||
QString label() const;
|
||||
|
||||
double startMD() const;
|
||||
double endMD() const;
|
||||
double deltaMD() const;
|
||||
double startTVD() const;
|
||||
double endTVD() const;
|
||||
double deltaTVD() const;
|
||||
|
||||
double effectiveDiameter() const;
|
||||
double holeDiameter() const;
|
||||
double openHoleRoughnessFactor() const;
|
||||
double skinFactor() const;
|
||||
|
||||
size_t subIndex() const;
|
||||
int segmentNumber() const;
|
||||
|
||||
const std::vector<std::shared_ptr<RicMswCompletion>>& completions() const;
|
||||
std::vector<std::shared_ptr<RicMswCompletion>>& completions();
|
||||
|
||||
void setLabel(const QString& label);
|
||||
void setEffectiveDiameter(double effectiveDiameter);
|
||||
void setHoleDiameter(double holeDiameter);
|
||||
void setOpenHoleRoughnessFactor(double roughnessFactor);
|
||||
void setSkinFactor(double skinFactor);
|
||||
void setSegmentNumber(int segmentNumber);
|
||||
void addCompletion(std::shared_ptr<RicMswCompletion> completion);
|
||||
|
||||
void setSourcePdmObject(const caf::PdmObject* object);
|
||||
const caf::PdmObject* sourcePdmObject() const;
|
||||
|
||||
bool operator<(const RicMswSegment& rhs) const;
|
||||
|
||||
private:
|
||||
QString m_label;
|
||||
double m_startMD;
|
||||
double m_endMD;
|
||||
double m_startTVD;
|
||||
double m_endTVD;
|
||||
double m_effectiveDiameter;
|
||||
double m_holeDiameter;
|
||||
double m_linerDiameter;
|
||||
double m_openHoleRoughnessFactor;
|
||||
double m_skinFactor;
|
||||
|
||||
size_t m_subIndex;
|
||||
int m_segmentNumber;
|
||||
|
||||
std::vector<std::shared_ptr<RicMswCompletion>> m_completions;
|
||||
|
||||
caf::PdmPointer<caf::PdmObject> m_sourcePdmObject;
|
||||
};
|
||||
|
@ -0,0 +1,168 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor 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 "RicMswSubSegment.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswSubSegmentCellIntersection::RicMswSubSegmentCellIntersection(const QString& gridName,
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3st& gridLocalCellIJK,
|
||||
const cvf::Vec3d& lengthsInCell)
|
||||
: m_gridName(gridName)
|
||||
, m_globalCellIndex(globalCellIndex)
|
||||
, m_gridLocalCellIJK(gridLocalCellIJK)
|
||||
, m_lengthsInCell(lengthsInCell)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& RicMswSubSegmentCellIntersection::gridName() const
|
||||
{
|
||||
return m_gridName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RicMswSubSegmentCellIntersection::globalCellIndex() const
|
||||
{
|
||||
return m_globalCellIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3st RicMswSubSegmentCellIntersection::gridLocalCellIJK() const
|
||||
{
|
||||
return m_gridLocalCellIJK;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const cvf::Vec3d& RicMswSubSegmentCellIntersection::lengthsInCell() const
|
||||
{
|
||||
return m_lengthsInCell;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswSubSegment::RicMswSubSegment(double startMD, double deltaMD, double startTVD, double deltaTVD)
|
||||
: m_startMD(startMD)
|
||||
, m_deltaMD(deltaMD)
|
||||
, m_startTVD(startTVD)
|
||||
, m_deltaTVD(deltaTVD)
|
||||
, m_segmentNumber(-1)
|
||||
, m_attachedSegmentNumber(-1)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSubSegment::startMD() const
|
||||
{
|
||||
return m_startMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSubSegment::deltaMD() const
|
||||
{
|
||||
return m_deltaMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSubSegment::startTVD() const
|
||||
{
|
||||
return m_startTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSubSegment::deltaTVD() const
|
||||
{
|
||||
return m_deltaTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicMswSubSegment::segmentNumber() const
|
||||
{
|
||||
return m_segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicMswSubSegment::attachedSegmentNumber() const
|
||||
{
|
||||
return m_attachedSegmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSubSegment::setSegmentNumber(int segmentNumber)
|
||||
{
|
||||
m_segmentNumber = segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSubSegment::setAttachedSegmentNumber(int attachedSegmentNumber)
|
||||
{
|
||||
m_attachedSegmentNumber = attachedSegmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSubSegment::addIntersection(std::shared_ptr<RicMswSubSegmentCellIntersection> intersection)
|
||||
{
|
||||
m_intersections.push_back(intersection);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>>& RicMswSubSegment::intersections() const
|
||||
{
|
||||
return m_intersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>>& RicMswSubSegment::intersections()
|
||||
{
|
||||
return m_intersections;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,86 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor 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 <QString>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswSubSegmentCellIntersection
|
||||
{
|
||||
public:
|
||||
RicMswSubSegmentCellIntersection(const QString& gridName, // Pass in empty string for main grid
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3st& gridLocalCellIJK,
|
||||
const cvf::Vec3d& lengthsInCell);
|
||||
const QString& gridName() const;
|
||||
size_t globalCellIndex() const;
|
||||
cvf::Vec3st gridLocalCellIJK() const;
|
||||
const cvf::Vec3d& lengthsInCell() const;
|
||||
private:
|
||||
QString m_gridName;
|
||||
size_t m_globalCellIndex;
|
||||
cvf::Vec3st m_gridLocalCellIJK;
|
||||
cvf::Vec3d m_lengthsInCell;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswSubSegment
|
||||
{
|
||||
public:
|
||||
RicMswSubSegment(double startMD,
|
||||
double deltaMD,
|
||||
double startTVD,
|
||||
double deltaTVD);
|
||||
|
||||
double startMD() const;
|
||||
double deltaMD() const;
|
||||
double startTVD() const;
|
||||
double deltaTVD() const;
|
||||
|
||||
int segmentNumber() const;
|
||||
int attachedSegmentNumber() const;
|
||||
|
||||
void setSegmentNumber(int segmentNumber);
|
||||
void setAttachedSegmentNumber(int attachedSegmentNumber);
|
||||
void addIntersection(std::shared_ptr<RicMswSubSegmentCellIntersection> intersection);
|
||||
|
||||
const std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>>& intersections() const;
|
||||
std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>>& intersections();
|
||||
|
||||
|
||||
private:
|
||||
double m_startMD;
|
||||
double m_deltaMD;
|
||||
double m_startTVD;
|
||||
double m_deltaTVD;
|
||||
int m_segmentNumber;
|
||||
int m_attachedSegmentNumber;
|
||||
|
||||
std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>> m_intersections;
|
||||
};
|
||||
|
||||
|
@ -1,748 +0,0 @@
|
||||
#include "RicMultiSegmentWellExportInfo.h"
|
||||
|
||||
#include "RimMswCompletionParameters.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswSubSegmentCellIntersection::RicMswSubSegmentCellIntersection(const QString& gridName,
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3st& gridLocalCellIJK,
|
||||
const cvf::Vec3d& lengthsInCell)
|
||||
: m_gridName(gridName)
|
||||
, m_globalCellIndex(globalCellIndex)
|
||||
, m_gridLocalCellIJK(gridLocalCellIJK)
|
||||
, m_lengthsInCell(lengthsInCell)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& RicMswSubSegmentCellIntersection::gridName() const
|
||||
{
|
||||
return m_gridName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RicMswSubSegmentCellIntersection::globalCellIndex() const
|
||||
{
|
||||
return m_globalCellIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3st RicMswSubSegmentCellIntersection::gridLocalCellIJK() const
|
||||
{
|
||||
return m_gridLocalCellIJK;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const cvf::Vec3d& RicMswSubSegmentCellIntersection::lengthsInCell() const
|
||||
{
|
||||
return m_lengthsInCell;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswSubSegment::RicMswSubSegment(double startMD, double deltaMD, double startTVD, double deltaTVD)
|
||||
: m_startMD(startMD)
|
||||
, m_deltaMD(deltaMD)
|
||||
, m_startTVD(startTVD)
|
||||
, m_deltaTVD(deltaTVD)
|
||||
, m_segmentNumber(-1)
|
||||
, m_attachedSegmentNumber(-1)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSubSegment::startMD() const
|
||||
{
|
||||
return m_startMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSubSegment::deltaMD() const
|
||||
{
|
||||
return m_deltaMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSubSegment::startTVD() const
|
||||
{
|
||||
return m_startTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSubSegment::deltaTVD() const
|
||||
{
|
||||
return m_deltaTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicMswSubSegment::segmentNumber() const
|
||||
{
|
||||
return m_segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicMswSubSegment::attachedSegmentNumber() const
|
||||
{
|
||||
return m_attachedSegmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSubSegment::setSegmentNumber(int segmentNumber)
|
||||
{
|
||||
m_segmentNumber = segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSubSegment::setAttachedSegmentNumber(int attachedSegmentNumber)
|
||||
{
|
||||
m_attachedSegmentNumber = attachedSegmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSubSegment::addIntersection(std::shared_ptr<RicMswSubSegmentCellIntersection> intersection)
|
||||
{
|
||||
m_intersections.push_back(intersection);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>>& RicMswSubSegment::intersections() const
|
||||
{
|
||||
return m_intersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>>& RicMswSubSegment::intersections()
|
||||
{
|
||||
return m_intersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswCompletion::RicMswCompletion(const QString& label,
|
||||
size_t index /* = cvf::UNDEFINED_SIZE_T */,
|
||||
int branchNumber /*= 0*/)
|
||||
: m_label(label)
|
||||
, m_index(index)
|
||||
, m_branchNumber(branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& RicMswCompletion::label() const
|
||||
{
|
||||
return m_label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RicMswCompletion::index() const
|
||||
{
|
||||
return m_index;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicMswCompletion::branchNumber() const
|
||||
{
|
||||
return m_branchNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswCompletion::setBranchNumber(int branchNumber)
|
||||
{
|
||||
m_branchNumber = branchNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswCompletion::addSubSegment(std::shared_ptr<RicMswSubSegment> subSegment)
|
||||
{
|
||||
m_subSegments.push_back(subSegment);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::shared_ptr<RicMswSubSegment>>& RicMswCompletion::subSegments()
|
||||
{
|
||||
return m_subSegments;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::shared_ptr<RicMswSubSegment>>& RicMswCompletion::subSegments() const
|
||||
{
|
||||
return m_subSegments;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswCompletion::setLabel(const QString& label)
|
||||
{
|
||||
m_label = label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswICD::RicMswICD(const QString& label, size_t index /*= cvf::UNDEFINED_SIZE_T*/, int branchNumber /*= cvf::UNDEFINED_INT*/)
|
||||
: RicMswCompletion(label, index, branchNumber)
|
||||
, m_flowCoefficient(0.0)
|
||||
, m_area(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswICD::flowCoefficient() const
|
||||
{
|
||||
return m_flowCoefficient;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswICD::area() const
|
||||
{
|
||||
return m_area;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswICD::setFlowCoefficient(double icdFlowCoefficient)
|
||||
{
|
||||
m_flowCoefficient = icdFlowCoefficient;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswICD::setArea(double icdArea)
|
||||
{
|
||||
m_area = icdArea;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswFishbonesICD::RicMswFishbonesICD(const QString& label,
|
||||
size_t index /*= cvf::UNDEFINED_SIZE_T*/,
|
||||
int branchNumber /*= cvf::UNDEFINED_INT*/)
|
||||
: RicMswICD(label, index, branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCompletionData::CompletionType RicMswFishbonesICD::completionType() const
|
||||
{
|
||||
return RigCompletionData::FISHBONES_ICD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswFracture::RicMswFracture(const QString& label,
|
||||
size_t index /*= cvf::UNDEFINED_SIZE_T*/,
|
||||
int branchNumber /*= cvf::UNDEFINED_INT*/)
|
||||
: RicMswCompletion(label, index, branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCompletionData::CompletionType RicMswFracture::completionType() const
|
||||
{
|
||||
return RigCompletionData::FRACTURE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswPerforation::RicMswPerforation(const QString& label,
|
||||
size_t index /*= cvf::UNDEFINED_SIZE_T*/,
|
||||
int branchNumber /*= cvf::UNDEFINED_INT*/)
|
||||
: RicMswCompletion(label, index, branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCompletionData::CompletionType RicMswPerforation::completionType() const
|
||||
{
|
||||
return RigCompletionData::PERFORATION;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswPerforationICD::RicMswPerforationICD(const QString& label,
|
||||
size_t index /*= cvf::UNDEFINED_SIZE_T*/,
|
||||
int branchNumber /*= cvf::UNDEFINED_INT*/)
|
||||
: RicMswICD(label, index, branchNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCompletionData::CompletionType RicMswPerforationICD::completionType() const
|
||||
{
|
||||
return RigCompletionData::PERFORATION_ICD;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswSegment::RicMswSegment(const QString& label,
|
||||
double startMD,
|
||||
double endMD,
|
||||
double startTVD,
|
||||
double endTVD,
|
||||
size_t subIndex,
|
||||
int segmentNumber /*= -1*/)
|
||||
: m_label(label)
|
||||
, m_startMD(startMD)
|
||||
, m_endMD(endMD)
|
||||
, m_startTVD(startTVD)
|
||||
, m_endTVD(endTVD)
|
||||
, m_effectiveDiameter(0.15)
|
||||
, m_holeDiameter(RicMswExportInfo::defaultDoubleValue())
|
||||
, m_openHoleRoughnessFactor(5.0e-5)
|
||||
, m_skinFactor(RicMswExportInfo::defaultDoubleValue())
|
||||
, m_subIndex(subIndex)
|
||||
, m_segmentNumber(segmentNumber)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicMswSegment::label() const
|
||||
{
|
||||
return m_label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::startMD() const
|
||||
{
|
||||
return m_startMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::endMD() const
|
||||
{
|
||||
return m_endMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::deltaMD() const
|
||||
{
|
||||
return m_endMD - m_startMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::startTVD() const
|
||||
{
|
||||
return m_startTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::endTVD() const
|
||||
{
|
||||
return m_endTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::deltaTVD() const
|
||||
{
|
||||
return m_endTVD - m_startTVD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::effectiveDiameter() const
|
||||
{
|
||||
return m_effectiveDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::holeDiameter() const
|
||||
{
|
||||
return m_holeDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::openHoleRoughnessFactor() const
|
||||
{
|
||||
return m_openHoleRoughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswSegment::skinFactor() const
|
||||
{
|
||||
return m_skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RicMswSegment::subIndex() const
|
||||
{
|
||||
return m_subIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RicMswSegment::segmentNumber() const
|
||||
{
|
||||
return m_segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::shared_ptr<RicMswCompletion>>& RicMswSegment::completions() const
|
||||
{
|
||||
return m_completions;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::shared_ptr<RicMswCompletion>>& RicMswSegment::completions()
|
||||
{
|
||||
return m_completions;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setLabel(const QString& label)
|
||||
{
|
||||
m_label = label;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setEffectiveDiameter(double effectiveDiameter)
|
||||
{
|
||||
m_effectiveDiameter = effectiveDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setHoleDiameter(double holeDiameter)
|
||||
{
|
||||
m_holeDiameter = holeDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setOpenHoleRoughnessFactor(double roughnessFactor)
|
||||
{
|
||||
m_openHoleRoughnessFactor = roughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setSkinFactor(double skinFactor)
|
||||
{
|
||||
m_skinFactor = skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setSegmentNumber(int segmentNumber)
|
||||
{
|
||||
m_segmentNumber = segmentNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::addCompletion(std::shared_ptr<RicMswCompletion> completion)
|
||||
{
|
||||
m_completions.push_back(completion);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswSegment::setSourcePdmObject(const caf::PdmObject* object)
|
||||
{
|
||||
m_sourcePdmObject = const_cast<caf::PdmObject*>(object);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const caf::PdmObject* RicMswSegment::sourcePdmObject() const
|
||||
{
|
||||
return m_sourcePdmObject;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicMswSegment::operator<(const RicMswSegment& rhs) const
|
||||
{
|
||||
return startMD() < rhs.startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswExportInfo::RicMswExportInfo(const RimWellPath* wellPath,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem,
|
||||
double initialMD,
|
||||
const QString& lengthAndDepthText,
|
||||
const QString& pressureDropText)
|
||||
: m_wellPath(wellPath)
|
||||
, m_initialMD(initialMD)
|
||||
, m_unitSystem(unitSystem)
|
||||
, m_topWellBoreVolume(RicMswExportInfo::defaultDoubleValue())
|
||||
, m_linerDiameter(RimMswCompletionParameters::defaultLinerDiameter(unitSystem))
|
||||
, m_roughnessFactor(RimMswCompletionParameters::defaultRoughnessFactor(unitSystem))
|
||||
, m_lengthAndDepthText(lengthAndDepthText)
|
||||
, m_pressureDropText(pressureDropText)
|
||||
, m_hasSubGridIntersections(false)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::setTopWellBoreVolume(double topWellBoreVolume)
|
||||
{
|
||||
m_topWellBoreVolume = topWellBoreVolume;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::setLinerDiameter(double linerDiameter)
|
||||
{
|
||||
m_linerDiameter = linerDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::setRoughnessFactor(double roughnessFactor)
|
||||
{
|
||||
m_roughnessFactor = roughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::setHasSubGridIntersections(bool subGridIntersections)
|
||||
{
|
||||
m_hasSubGridIntersections = subGridIntersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::addWellSegment(std::shared_ptr<RicMswSegment> location)
|
||||
{
|
||||
m_wellSegmentLocations.push_back(location);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicMswExportInfo::sortLocations()
|
||||
{
|
||||
std::sort(m_wellSegmentLocations.begin(),
|
||||
m_wellSegmentLocations.end(),
|
||||
[](std::shared_ptr<RicMswSegment> lhs, std::shared_ptr<RicMswSegment> rhs)
|
||||
{
|
||||
return *lhs < *rhs;
|
||||
});
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimWellPath* RicMswExportInfo::wellPath() const
|
||||
{
|
||||
return m_wellPath;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::initialMD() const
|
||||
{
|
||||
return m_initialMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::initialTVD() const
|
||||
{
|
||||
return -m_wellPath->wellPathGeometry()->interpolatedPointAlongWellPath(m_initialMD).z();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystem RicMswExportInfo::unitSystem() const
|
||||
{
|
||||
return m_unitSystem;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::topWellBoreVolume() const
|
||||
{
|
||||
return m_topWellBoreVolume;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::linerDiameter() const
|
||||
{
|
||||
return m_linerDiameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::roughnessFactor() const
|
||||
{
|
||||
return m_roughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicMswExportInfo::lengthAndDepthText() const
|
||||
{
|
||||
return m_lengthAndDepthText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicMswExportInfo::pressureDropText() const
|
||||
{
|
||||
return m_pressureDropText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicMswExportInfo::hasSubGridIntersections() const
|
||||
{
|
||||
return m_hasSubGridIntersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicMswExportInfo::defaultDoubleValue()
|
||||
{
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::shared_ptr<RicMswSegment>>& RicMswExportInfo::wellSegmentLocations() const
|
||||
{
|
||||
return m_wellSegmentLocations;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::shared_ptr<RicMswSegment>>& RicMswExportInfo::wellSegmentLocations()
|
||||
{
|
||||
return m_wellSegmentLocations;
|
||||
}
|
@ -1,303 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor 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 "RiaEclipseUnitTools.h"
|
||||
#include "RigCompletionData.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfMath.h"
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <memory>
|
||||
|
||||
class RimWellPath;
|
||||
class RimFishbonesMultipleSubs;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswSubSegmentCellIntersection
|
||||
{
|
||||
public:
|
||||
RicMswSubSegmentCellIntersection(const QString& gridName, // Pass in empty string for main grid
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3st& gridLocalCellIJK,
|
||||
const cvf::Vec3d& lengthsInCell);
|
||||
const QString& gridName() const;
|
||||
size_t globalCellIndex() const;
|
||||
cvf::Vec3st gridLocalCellIJK() const;
|
||||
const cvf::Vec3d& lengthsInCell() const;
|
||||
private:
|
||||
QString m_gridName;
|
||||
size_t m_globalCellIndex;
|
||||
cvf::Vec3st m_gridLocalCellIJK;
|
||||
cvf::Vec3d m_lengthsInCell;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswSubSegment
|
||||
{
|
||||
public:
|
||||
RicMswSubSegment(double startMD,
|
||||
double deltaMD,
|
||||
double startTVD,
|
||||
double deltaTVD);
|
||||
|
||||
double startMD() const;
|
||||
double deltaMD() const;
|
||||
double startTVD() const;
|
||||
double deltaTVD() const;
|
||||
|
||||
int segmentNumber() const;
|
||||
int attachedSegmentNumber() const;
|
||||
|
||||
void setSegmentNumber(int segmentNumber);
|
||||
void setAttachedSegmentNumber(int attachedSegmentNumber);
|
||||
void addIntersection(std::shared_ptr<RicMswSubSegmentCellIntersection> intersection);
|
||||
|
||||
const std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>>& intersections() const;
|
||||
std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>>& intersections();
|
||||
|
||||
|
||||
private:
|
||||
double m_startMD;
|
||||
double m_deltaMD;
|
||||
double m_startTVD;
|
||||
double m_deltaTVD;
|
||||
int m_segmentNumber;
|
||||
int m_attachedSegmentNumber;
|
||||
|
||||
std::vector<std::shared_ptr<RicMswSubSegmentCellIntersection>> m_intersections;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswCompletion
|
||||
{
|
||||
public:
|
||||
RicMswCompletion(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
|
||||
virtual RigCompletionData::CompletionType completionType() const = 0;
|
||||
|
||||
const QString& label() const;
|
||||
size_t index() const;
|
||||
int branchNumber() const;
|
||||
void setBranchNumber(int branchNumber);
|
||||
|
||||
void addSubSegment(std::shared_ptr<RicMswSubSegment> subSegment);
|
||||
|
||||
std::vector<std::shared_ptr<RicMswSubSegment>>& subSegments();
|
||||
const std::vector<std::shared_ptr<RicMswSubSegment>>& subSegments() const;
|
||||
|
||||
void setLabel(const QString& label);
|
||||
|
||||
private:
|
||||
QString m_label;
|
||||
size_t m_index;
|
||||
int m_branchNumber;
|
||||
|
||||
std::vector<std::shared_ptr<RicMswSubSegment>> m_subSegments;
|
||||
};
|
||||
|
||||
class RicMswFishbones : public RicMswCompletion
|
||||
{
|
||||
public:
|
||||
RicMswFishbones(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT)
|
||||
: RicMswCompletion(label, index, branchNumber)
|
||||
{}
|
||||
|
||||
RigCompletionData::CompletionType completionType() const override { return RigCompletionData::FISHBONES; }
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswICD : public RicMswCompletion
|
||||
{
|
||||
public:
|
||||
RicMswICD(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
double flowCoefficient() const;
|
||||
double area() const;
|
||||
void setFlowCoefficient(double icdFlowCoefficient);
|
||||
void setArea(double icdArea);
|
||||
private:
|
||||
double m_flowCoefficient;
|
||||
double m_area;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswFishbonesICD : public RicMswICD
|
||||
{
|
||||
public:
|
||||
RicMswFishbonesICD(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
RigCompletionData::CompletionType completionType() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswFracture : public RicMswCompletion
|
||||
{
|
||||
public:
|
||||
RicMswFracture(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
RigCompletionData::CompletionType completionType() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswPerforation : public RicMswCompletion
|
||||
{
|
||||
public:
|
||||
RicMswPerforation(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
RigCompletionData::CompletionType completionType() const override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswPerforationICD : public RicMswICD
|
||||
{
|
||||
public:
|
||||
RicMswPerforationICD(const QString& label, size_t index = cvf::UNDEFINED_SIZE_T, int branchNumber = cvf::UNDEFINED_INT);
|
||||
RigCompletionData::CompletionType completionType() const override;
|
||||
};
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicMswSegment
|
||||
{
|
||||
public:
|
||||
RicMswSegment(const QString& label,
|
||||
double startMD,
|
||||
double endMD,
|
||||
double startTVD,
|
||||
double endTVD,
|
||||
size_t subIndex = cvf::UNDEFINED_SIZE_T,
|
||||
int segmentNumber = -1);
|
||||
|
||||
QString label() const;
|
||||
|
||||
double startMD() const;
|
||||
double endMD() const;
|
||||
double deltaMD() const;
|
||||
double startTVD() const;
|
||||
double endTVD() const;
|
||||
double deltaTVD() const;
|
||||
|
||||
double effectiveDiameter() const;
|
||||
double holeDiameter() const;
|
||||
double openHoleRoughnessFactor() const;
|
||||
double skinFactor() const;
|
||||
|
||||
size_t subIndex() const;
|
||||
int segmentNumber() const;
|
||||
|
||||
const std::vector<std::shared_ptr<RicMswCompletion>>& completions() const;
|
||||
std::vector<std::shared_ptr<RicMswCompletion>>& completions();
|
||||
|
||||
void setLabel(const QString& label);
|
||||
void setEffectiveDiameter(double effectiveDiameter);
|
||||
void setHoleDiameter(double holeDiameter);
|
||||
void setOpenHoleRoughnessFactor(double roughnessFactor);
|
||||
void setSkinFactor(double skinFactor);
|
||||
void setSegmentNumber(int segmentNumber);
|
||||
void addCompletion(std::shared_ptr<RicMswCompletion> completion);
|
||||
|
||||
void setSourcePdmObject(const caf::PdmObject* object);
|
||||
const caf::PdmObject* sourcePdmObject() const;
|
||||
|
||||
bool operator<(const RicMswSegment& rhs) const;
|
||||
|
||||
private:
|
||||
QString m_label;
|
||||
double m_startMD;
|
||||
double m_endMD;
|
||||
double m_startTVD;
|
||||
double m_endTVD;
|
||||
double m_effectiveDiameter;
|
||||
double m_holeDiameter;
|
||||
double m_linerDiameter;
|
||||
double m_openHoleRoughnessFactor;
|
||||
double m_skinFactor;
|
||||
|
||||
size_t m_subIndex;
|
||||
int m_segmentNumber;
|
||||
|
||||
std::vector<std::shared_ptr<RicMswCompletion>> m_completions;
|
||||
|
||||
caf::PdmPointer<caf::PdmObject> m_sourcePdmObject;
|
||||
};
|
||||
|
||||
class RicMswExportInfo
|
||||
{
|
||||
public:
|
||||
RicMswExportInfo(const RimWellPath* wellPath,
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem,
|
||||
double initialMD,
|
||||
const QString& lengthAndDepthText,
|
||||
const QString& pressureDropText);
|
||||
|
||||
void setTopWellBoreVolume(double topWellBoreVolume);
|
||||
void setLinerDiameter(double linerDiameter);
|
||||
void setRoughnessFactor(double roughnessFactor);
|
||||
void setHasSubGridIntersections(bool subGridIntersections);
|
||||
|
||||
void addWellSegment(std::shared_ptr<RicMswSegment> location);
|
||||
void sortLocations();
|
||||
|
||||
const RimWellPath* wellPath() const;
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem() const;
|
||||
double initialMD() const;
|
||||
double initialTVD() const;
|
||||
double topWellBoreVolume() const;
|
||||
double linerDiameter() const;
|
||||
double roughnessFactor() const;
|
||||
QString lengthAndDepthText() const;
|
||||
QString pressureDropText() const;
|
||||
bool hasSubGridIntersections() const;
|
||||
static double defaultDoubleValue();
|
||||
|
||||
const std::vector<std::shared_ptr<RicMswSegment>>& wellSegmentLocations() const;
|
||||
std::vector<std::shared_ptr<RicMswSegment>>& wellSegmentLocations();
|
||||
|
||||
private:
|
||||
const RimWellPath* m_wellPath;
|
||||
RiaEclipseUnitTools::UnitSystem m_unitSystem;
|
||||
double m_initialMD;
|
||||
double m_topWellBoreVolume;
|
||||
double m_linerDiameter;
|
||||
double m_roughnessFactor;
|
||||
QString m_lengthAndDepthText;
|
||||
QString m_pressureDropText;
|
||||
bool m_hasSubGridIntersections;
|
||||
|
||||
std::vector<std::shared_ptr<RicMswSegment>> m_wellSegmentLocations;
|
||||
};
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "RigCompletionData.h"
|
||||
|
||||
#include "RicExportCompletionDataSettingsUi.h"
|
||||
#include "RicMultiSegmentWellExportInfo.h"
|
||||
#include "RicMswExportInfo.h"
|
||||
#include "RicWellPathFractureReportItem.h"
|
||||
|
||||
#include <QFile>
|
||||
|
Loading…
Reference in New Issue
Block a user