Files
ResInsight/ApplicationLibCode/ProjectDataModel/Jobs/RimKeywordFactory.h
T

94 lines
4.0 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// 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.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "ReservoirDataModel/SimulationFile/RigSimulationInputTool.h"
#include "cvfVector3.h"
#include "RigRefinement.h"
#include <QDateTime>
#include <QString>
#include <optional>
#include <string>
#include <vector>
class RigCompletionData;
class RigMainGrid;
class RigMswTableData;
class RimEclipseCase;
class RimWellPath;
struct RimWellSpecData;
namespace Opm
{
class DeckKeyword;
class DeckRecord;
} // namespace Opm
//==================================================================================================
///
///
//==================================================================================================
namespace RigEclipseResultTools
{
struct BorderCellFace;
}
namespace RimKeywordFactory
{
Opm::DeckKeyword
welspecsKeyword( const std::string wellGrpName, RimEclipseCase* eCase, RimWellPath* wellPath, const RimWellSpecData* wellSpecData = nullptr );
Opm::DeckKeyword compordKeyword( const std::string& wellName );
Opm::DeckKeyword compdatKeyword( const std::vector<RigCompletionData>& compdata, const std::string wellName );
Opm::DeckKeyword wpimultKeyword( const std::vector<RigCompletionData>& compdata, const std::string wellName );
Opm::DeckKeyword complumpKeyword( const std::vector<RigCompletionData>& compdata, const std::string wellName );
Opm::DeckKeyword welsegsKeyword( const RigMswTableData& mswData, int& maxSegments, int& maxBranches );
Opm::DeckKeyword compsegsKeyword( const RigMswTableData& mswData );
Opm::DeckKeyword wsegvalvKeyword( const RigMswTableData& mswData );
Opm::DeckKeyword wsegaicdKeyword( const RigMswTableData& mswData );
Opm::DeckKeyword wsegsicdKeyword( const RigMswTableData& mswData );
Opm::DeckKeyword faultsKeyword( const RigMainGrid* mainGrid, const cvf::Vec3st& min, const cvf::Vec3st& max, const RigRefinement& refinement );
Opm::DeckKeyword bcconKeyword( const std::vector<RigEclipseResultTools::BorderCellFace>& borderCellFaces );
Opm::DeckKeyword bcpropKeyword( const std::vector<RigEclipseResultTools::BorderCellFace>& boundaryConditions,
const std::vector<Opm::DeckRecord>& boundaryConditionProperties );
Opm::DeckKeyword operaterKeyword( std::string targetProperty,
int regionId,
std::string equation,
std::string inputProperty,
std::optional<float> alpha = std::nullopt,
std::optional<float> beta = std::nullopt );
Opm::DeckKeyword editnncKeyword( const std::vector<RigSimulationInputTool::TransformedNNCConnection>& connections );
Opm::DeckKeyword datesKeyword( const QDateTime& date );
QString deckKeywordToString( const Opm::DeckKeyword& keyword );
// Serialize a keyword as human-readable text: a "--"-prefixed column-header comment line listing
// the item names, followed by data rows right-aligned into fixed-width columns with a two-space
// indent. Unlike deckKeywordToString(), each item renders in its own column (consecutive defaults
// are not collapsed into "N*"), so columns stay aligned.
QString deckKeywordToAlignedString( const Opm::DeckKeyword& keyword );
} // namespace RimKeywordFactory