Files
ResInsight/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswTableData.h
T

84 lines
4.4 KiB
C++
Raw Normal View History

2025-10-30 18:46:04 +01:00
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2025 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.
//
/////////////////////////////////////////////////////////////////////////////////
2025-11-24 08:06:39 +01:00
2025-10-30 18:46:04 +01:00
#pragma once
2025-12-02 16:03:56 +01:00
#include "Tools/enum_bitmask.hpp"
2025-10-30 18:46:04 +01:00
#include <expected>
#include <optional>
#include <vector>
#include <QDateTime>
2025-10-30 18:46:04 +01:00
class RigActiveCellInfo;
class RimEclipseCase;
class RimWellPath;
class RigMswTableData;
class RimSegmentCollection;
2025-10-30 18:46:04 +01:00
class RigWellPath;
struct WellPathCellIntersectionInfo;
//--------------------------------------------------------------------------------------------------
/// This class is responsible for exporting well path MSW table data
/// This class is based on RicWellPathExportMswCompletionsImpl
//--------------------------------------------------------------------------------------------------
class RicWellPathExportMswTableData
{
public:
2025-12-02 16:03:56 +01:00
enum class CompletionType
{
NONE = 0x00,
PERFORATIONS = 0x01,
FISHBONES = 0x02,
FRACTURES = 0x04,
ALL = PERFORATIONS | FISHBONES | FRACTURES
};
2025-11-24 08:06:39 +01:00
// The intention is to extract MSW data from a single well. Any handling of multiple wells is supposed to be managed in a different class
2025-11-13 14:53:14 +01:00
static std::expected<RigMswTableData, std::string> extractSingleWellMswData( RimEclipseCase* eclipseCase,
RimWellPath* wellPath,
2025-12-02 16:03:56 +01:00
bool exportCompletionsAfterMainBoreSegments = true,
CompletionType completionType = CompletionType::ALL,
const std::optional<QDateTime>& exportDate = std::nullopt );
2025-12-02 16:03:56 +01:00
static std::expected<RigMswTableData, std::string> extractSingleWellMsw( RimEclipseCase* eclipseCase,
RimWellPath* wellPath,
bool exportCompletionsAfterMainBoreSegments = true,
CompletionType completionType = CompletionType::ALL,
const std::optional<QDateTime>& exportDate = std::nullopt );
2025-12-02 16:03:56 +01:00
static CompletionType convertFromExportSettings( const class RicExportCompletionDataSettingsUi& settings );
2025-10-30 18:46:04 +01:00
static std::vector<WellPathCellIntersectionInfo> generateCellSegments( const RimEclipseCase* eclipseCase, const RimWellPath* wellPath );
static std::vector<WellPathCellIntersectionInfo> filterIntersections( const std::vector<WellPathCellIntersectionInfo>& intersections,
double initialMD,
const RigWellPath* wellPathGeometry,
const RimEclipseCase* eclipseCase );
static std::vector<RimWellPath*> wellPathsWithTieIn( const RimWellPath* wellPath );
static double computeIntitialMeasuredDepth( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RimSegmentCollection* segmentCollection,
const std::vector<WellPathCellIntersectionInfo>& allIntersections );
2025-10-30 18:46:04 +01:00
};
2025-12-02 16:03:56 +01:00
ENABLE_BITMASK_OPERATORS( RicWellPathExportMswTableData::CompletionType )