2012-05-18 09:45:23 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-23 15:04:57 +02:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2012-05-18 09:45:23 +02:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2012-05-18 09:45:23 +02:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2012-05-18 09:45:23 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2021-01-21 12:58:46 +01:00
|
|
|
#include "RiaDefines.h"
|
2018-10-09 12:23:44 +02:00
|
|
|
|
2015-05-15 09:16:33 +02:00
|
|
|
#include "RimEclipseCase.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-12-10 16:19:39 +01:00
|
|
|
#include "cafFilePath.h"
|
2022-02-23 13:57:02 +01:00
|
|
|
#include "cafPdmProxyValueField.h"
|
2018-10-09 12:23:44 +02:00
|
|
|
|
2022-02-23 13:57:02 +01:00
|
|
|
class RifReaderRftInterface;
|
2019-10-30 16:52:25 +01:00
|
|
|
class RifReaderEclipseRft;
|
2022-02-23 13:57:02 +01:00
|
|
|
class RifReaderOpmRft;
|
2013-02-27 15:27:33 +01:00
|
|
|
class RifReaderInterface;
|
2019-10-30 16:52:25 +01:00
|
|
|
class RigFlowDiagSolverInterface;
|
2013-02-27 15:27:33 +01:00
|
|
|
class RigMainGrid;
|
2019-10-30 16:52:25 +01:00
|
|
|
class RimEclipseInputProperty;
|
|
|
|
|
class RimEclipseInputPropertyCollection;
|
2016-12-14 09:50:30 +01:00
|
|
|
class RimFlowDiagSolution;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
//
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2012-05-18 09:45:23 +02:00
|
|
|
//
|
|
|
|
|
//==================================================================================================
|
2015-06-25 11:56:18 +02:00
|
|
|
class RimEclipseResultCase : public RimEclipseCase
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
2012-06-26 16:10:41 +02:00
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
public:
|
2015-06-25 11:56:18 +02:00
|
|
|
RimEclipseResultCase();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimEclipseResultCase() override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setCaseInfo( const QString& userDescription, const QString& fileName );
|
|
|
|
|
void setSourSimFileName( const QString& fileName );
|
|
|
|
|
bool hasSourSimFile();
|
2013-04-08 14:29:43 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool openEclipseGridFile() override;
|
2025-01-14 21:52:54 +01:00
|
|
|
void closeReservoirCase() override;
|
2017-08-25 06:51:56 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool importGridAndResultMetaData( bool showTimeStepFilter );
|
2020-09-14 21:47:48 +02:00
|
|
|
bool importAsciiInputProperties( const QStringList& fileNames ) override;
|
2017-08-25 06:51:56 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool openAndReadActiveCellData( RigEclipseCaseData* mainEclipseCase );
|
|
|
|
|
void readGridDimensions( std::vector<std::vector<int>>& gridDimensions );
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2021-01-21 12:58:46 +01:00
|
|
|
caf::AppEnum<RiaDefines::EclipseUnitSystem> unitSystem();
|
2020-09-25 11:14:56 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
QString locationOnDisc() const override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2017-03-09 22:45:47 +01:00
|
|
|
RimFlowDiagSolution* defaultFlowDiagSolution();
|
2016-12-14 09:50:30 +01:00
|
|
|
std::vector<RimFlowDiagSolution*> flowDiagSolutions();
|
2016-12-20 11:41:05 +01:00
|
|
|
RigFlowDiagSolverInterface* flowDiagSolverInterface();
|
|
|
|
|
|
2022-02-23 13:57:02 +01:00
|
|
|
RifReaderRftInterface* rftReader();
|
2017-10-05 09:29:19 +02:00
|
|
|
|
2024-01-25 18:17:10 +01:00
|
|
|
// A multi segment well can have multiple well paths. Valves can be modeled using short branches. This threshold defines the limit for
|
|
|
|
|
// merging branches into the upstream branch.
|
|
|
|
|
int mswMergeThreshold() const;
|
|
|
|
|
|
2017-03-31 11:37:07 +02:00
|
|
|
protected:
|
2020-02-12 11:43:15 +01:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2023-02-26 10:48:40 +01:00
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
2025-01-29 01:36:29 +01:00
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
|
|
|
|
void initAfterRead() override;
|
2017-03-31 11:37:07 +02:00
|
|
|
|
|
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
void loadAndUpdateSourSimData();
|
2022-02-24 08:20:43 +01:00
|
|
|
void ensureRftDataIsImported();
|
2024-06-18 13:03:48 +02:00
|
|
|
bool showTimeStepFilterGUI();
|
2017-03-31 11:37:07 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<RifReaderInterface> createMockModel( QString modelName );
|
2023-08-28 12:17:34 +02:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2013-04-11 12:06:38 +02:00
|
|
|
|
2023-08-28 12:17:34 +02:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<RigFlowDiagSolverInterface> m_flowDagSolverInterface;
|
2016-12-20 11:41:05 +01:00
|
|
|
|
2017-10-05 09:29:19 +02:00
|
|
|
cvf::ref<RifReaderEclipseRft> m_readerEclipseRft;
|
2022-02-23 13:57:02 +01:00
|
|
|
cvf::ref<RifReaderOpmRft> m_readerOpmRft;
|
2017-10-05 09:29:19 +02:00
|
|
|
|
2021-01-21 12:58:46 +01:00
|
|
|
caf::PdmProxyValueField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_unitSystem;
|
|
|
|
|
caf::PdmChildArrayField<RimFlowDiagSolution*> m_flowDiagSolutions;
|
|
|
|
|
caf::PdmField<caf::FilePath> m_sourSimFileName;
|
2016-12-14 09:50:30 +01:00
|
|
|
|
2024-01-25 18:17:10 +01:00
|
|
|
caf::PdmField<std::pair<bool, int>> m_mswMergeThreshold;
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool m_gridAndWellDataIsReadFromFile;
|
|
|
|
|
bool m_activeCellInfoIsReadFromFile;
|
2022-02-23 13:57:02 +01:00
|
|
|
bool m_useOpmRftReader;
|
2022-02-24 08:20:43 +01:00
|
|
|
bool m_rftDataIsReadFromFile;
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|