mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add RigEclipseCaseDataTools
This commit is contained in:
parent
5c92cf1511
commit
e2e441c1a0
@ -2,6 +2,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RigActiveCellInfo.h
|
${CMAKE_CURRENT_LIST_DIR}/RigActiveCellInfo.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RigCell.h
|
${CMAKE_CURRENT_LIST_DIR}/RigCell.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RigEclipseCaseData.h
|
${CMAKE_CURRENT_LIST_DIR}/RigEclipseCaseData.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RigEclipseCaseDataTools.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RigGridBase.h
|
${CMAKE_CURRENT_LIST_DIR}/RigGridBase.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RigGridManager.h
|
${CMAKE_CURRENT_LIST_DIR}/RigGridManager.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RigCellGeometryTools.h
|
${CMAKE_CURRENT_LIST_DIR}/RigCellGeometryTools.h
|
||||||
@ -103,6 +104,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RigActiveCellInfo.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RigActiveCellInfo.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RigCell.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RigCell.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RigEclipseCaseData.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RigEclipseCaseData.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RigEclipseCaseDataTools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RigGridBase.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RigGridBase.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RigGridManager.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RigGridManager.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RigCellGeometryTools.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RigCellGeometryTools.cpp
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2024 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 "RigEclipseCaseDataTools.h"
|
||||||
|
|
||||||
|
#include "RigCaseCellResultsData.h"
|
||||||
|
#include "RigEclipseCaseData.h"
|
||||||
|
#include "RigSimWellData.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RigEclipseCaseDataTools::firstProducer( RigEclipseCaseData* eclipseCaseData )
|
||||||
|
{
|
||||||
|
if ( !eclipseCaseData ) return {};
|
||||||
|
|
||||||
|
auto caseCellResultsData = eclipseCaseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||||
|
if ( !caseCellResultsData ) return {};
|
||||||
|
|
||||||
|
auto timeStepCount = caseCellResultsData->timeStepDates().size();
|
||||||
|
if ( timeStepCount == 0 ) return {};
|
||||||
|
|
||||||
|
auto simWells = eclipseCaseData->wellResults();
|
||||||
|
for ( const auto& well : simWells )
|
||||||
|
{
|
||||||
|
if ( well->wellProductionType( timeStepCount - 1 ) == RiaDefines::WellProductionType::PRODUCER )
|
||||||
|
{
|
||||||
|
return well->m_wellName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {};
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2024 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 "QString"
|
||||||
|
|
||||||
|
class RigEclipseCaseData;
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
class RigEclipseCaseDataTools
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static QString firstProducer( RigEclipseCaseData* eclipseCaseData );
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user