2012-05-18 02:45:23 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-23 08:04:57 -05:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05: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 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05: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 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2012-05-18 02:45:23 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-08-11 03:25:33 -05:00
|
|
|
#include "RiaPorosityModel.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
|
2017-06-13 08:41:52 -05:00
|
|
|
#include "RiaDefines.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "RimCase.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
|
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
#include "cafPdmChildField.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
|
2017-04-06 07:12:24 -05:00
|
|
|
#include "cvfColor3.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cvfObject.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
|
2021-09-27 05:14:06 -05:00
|
|
|
#include <memory>
|
2018-07-10 05:44:58 -05:00
|
|
|
#include <set>
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
class QString;
|
2012-08-31 12:12:47 -05:00
|
|
|
|
2017-09-12 04:39:32 -05:00
|
|
|
class RigCaseCellResultsData;
|
2019-11-06 03:54:42 -06:00
|
|
|
class RigEclipseCaseData;
|
2012-05-18 02:45:23 -05:00
|
|
|
class RigGridBase;
|
2018-01-30 06:29:14 -06:00
|
|
|
class RigMainGrid;
|
2019-11-06 03:54:42 -06:00
|
|
|
class RigVirtualPerforationTransmissibilities;
|
2013-03-13 05:42:26 -05:00
|
|
|
class RimCaseCollection;
|
2019-01-11 06:56:35 -06:00
|
|
|
class RimEclipseContourMapView;
|
2019-01-16 03:51:43 -06:00
|
|
|
class RimEclipseContourMapViewCollection;
|
2019-10-30 09:27:31 -05:00
|
|
|
class RimEclipseInputPropertyCollection;
|
2019-11-06 03:54:42 -06:00
|
|
|
class RimEclipseView;
|
|
|
|
class RimIdenticalGridCaseGroup;
|
|
|
|
class RimReservoirCellResultsStorage;
|
2022-05-11 12:17:46 -05:00
|
|
|
class RimEclipseResultAddressCollection;
|
2021-09-27 05:14:06 -05:00
|
|
|
class RifReaderSettings;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// Interface for reservoirs.
|
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
//==================================================================================================
|
2015-05-15 11:51:49 -05:00
|
|
|
class RimEclipseCase : public RimCase
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2013-03-18 05:40:39 -05:00
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
public:
|
2015-05-15 01:40:27 -05:00
|
|
|
RimEclipseCase();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimEclipseCase() override;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
// Fields:
|
|
|
|
caf::PdmChildArrayField<RimEclipseView*> reservoirViews;
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<QString> filesContainingFaults() const;
|
|
|
|
void setFilesContainingFaults( const std::vector<QString>& val );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool ensureReservoirCaseIsOpen();
|
|
|
|
bool openReserviorCase();
|
|
|
|
virtual bool openEclipseGridFile() = 0;
|
2019-10-30 10:52:25 -05:00
|
|
|
virtual bool importAsciiInputProperties( const QStringList& fileNames );
|
2018-01-30 06:29:14 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RigEclipseCaseData* eclipseCaseData();
|
|
|
|
const RigEclipseCaseData* eclipseCaseData() const;
|
|
|
|
void ensureDeckIsParsedForEquilData();
|
|
|
|
cvf::Color3f defaultWellColor( const QString& wellName );
|
2017-09-12 04:39:32 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
const RigMainGrid* mainGrid() const;
|
2022-11-17 08:51:01 -06:00
|
|
|
bool isGridSizeEqualTo( const RimEclipseCase* otherCase ) const;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RigCaseCellResultsData* results( RiaDefines::PorosityModelType porosityModel );
|
|
|
|
const RigCaseCellResultsData* results( RiaDefines::PorosityModelType porosityModel ) const;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RimReservoirCellResultsStorage* resultsStorage( RiaDefines::PorosityModelType porosityModel );
|
|
|
|
const RimReservoirCellResultsStorage* resultsStorage( RiaDefines::PorosityModelType porosityModel ) const;
|
2013-04-11 05:06:38 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RimEclipseView* createAndAddReservoirView();
|
|
|
|
RimEclipseView* createCopyAndAddView( const RimEclipseView* sourceView );
|
2013-03-19 06:47:38 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
const RigVirtualPerforationTransmissibilities* computeAndGetVirtualPerforationTransmissibilities();
|
2018-11-08 09:18:03 -06:00
|
|
|
|
2020-02-12 04:13:38 -06:00
|
|
|
virtual QString locationOnDisc() const { return QString(); }
|
2017-03-24 09:09:10 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RimCaseCollection* parentCaseCollection();
|
|
|
|
RimEclipseContourMapViewCollection* contourMapCollection();
|
2023-05-11 01:37:58 -05:00
|
|
|
RimEclipseInputPropertyCollection* inputPropertyCollection() const;
|
2015-09-21 04:20:07 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
QStringList timeStepStrings() const override;
|
|
|
|
QString timeStepName( int frameIdx ) const override;
|
|
|
|
std::vector<QDateTime> timeStepDates() const override;
|
2015-11-16 00:16:30 -06:00
|
|
|
|
2020-01-23 07:43:51 -06:00
|
|
|
cvf::BoundingBox reservoirBoundingBox() override;
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::BoundingBox activeCellsBoundingBox() const override;
|
|
|
|
cvf::BoundingBox allCellsBoundingBox() const override;
|
|
|
|
cvf::Vec3d displayModelOffset() const override;
|
2017-04-21 05:02:48 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
virtual void reloadEclipseGridFile() = 0;
|
2017-06-19 13:55:58 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
double characteristicCellSize() const override;
|
2015-05-16 01:45:50 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::set<QString> sortedSimWellNames() const;
|
2017-12-01 06:24:43 -06:00
|
|
|
|
2022-12-21 12:57:46 -06:00
|
|
|
void loadAndSynchronizeInputProperties( bool importGridOrFaultData );
|
2020-03-26 07:04:57 -05:00
|
|
|
|
2020-05-13 10:57:21 -05:00
|
|
|
void ensureFaultDataIsComputed();
|
2020-05-16 08:51:59 -05:00
|
|
|
bool ensureNncDataIsComputed();
|
|
|
|
void createDisplayModelAndUpdateAllViews();
|
2020-05-13 10:57:21 -05:00
|
|
|
|
2021-09-27 05:14:06 -05:00
|
|
|
void setReaderSettings( std::shared_ptr<RifReaderSettings> readerSettings );
|
|
|
|
|
2022-09-01 04:01:47 -05:00
|
|
|
void updateResultAddressCollection();
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
protected:
|
2019-09-06 03:40:57 -05:00
|
|
|
void initAfterRead() override;
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 03:40:57 -05:00
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void updateFormationNamesData() override;
|
2016-09-06 03:27:30 -05:00
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
// Internal methods
|
|
|
|
protected:
|
2020-03-26 07:04:57 -05:00
|
|
|
void computeCachedData();
|
|
|
|
void setReservoirData( RigEclipseCaseData* eclipseCase );
|
|
|
|
std::vector<QString> additionalFiles() const;
|
2015-05-15 11:51:49 -05:00
|
|
|
|
2013-03-13 05:42:26 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
void createTimeStepFormatString();
|
|
|
|
std::vector<Rim3dView*> allSpecialViews() const override;
|
2022-09-01 04:01:47 -05:00
|
|
|
void buildResultChildNodes();
|
2013-03-13 05:42:26 -05:00
|
|
|
|
2018-08-24 02:34:24 -05:00
|
|
|
protected:
|
2019-10-30 09:27:31 -05:00
|
|
|
caf::PdmField<bool> m_flipXAxis;
|
|
|
|
caf::PdmField<bool> m_flipYAxis;
|
|
|
|
caf::PdmChildField<RimEclipseInputPropertyCollection*> m_inputPropertyCollection;
|
2018-08-24 02:34:24 -05:00
|
|
|
|
2021-09-27 05:14:06 -05:00
|
|
|
std::shared_ptr<RifReaderSettings> m_readerSettings;
|
|
|
|
|
2013-03-18 08:34:29 -05:00
|
|
|
private:
|
2021-06-10 08:12:50 -05:00
|
|
|
caf::PdmField<bool> m_releaseResultMemory;
|
2018-08-24 02:34:24 -05:00
|
|
|
|
2019-01-16 03:51:43 -06:00
|
|
|
caf::PdmChildField<RimEclipseContourMapViewCollection*> m_contourMapCollection;
|
2018-10-23 09:32:40 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<RigEclipseCaseData> m_rigEclipseCase;
|
|
|
|
QString m_timeStepFormatString;
|
|
|
|
std::map<QString, cvf::Color3f> m_wellToColorMap;
|
2017-04-06 07:12:24 -05:00
|
|
|
|
2022-05-11 12:17:46 -05:00
|
|
|
caf::PdmChildArrayField<RimEclipseResultAddressCollection*> m_resultAddressCollections;
|
|
|
|
|
2017-06-16 09:40:35 -05:00
|
|
|
caf::PdmChildField<RimReservoirCellResultsStorage*> m_matrixModelResults;
|
|
|
|
caf::PdmChildField<RimReservoirCellResultsStorage*> m_fractureModelResults;
|
2021-06-10 08:12:50 -05:00
|
|
|
|
|
|
|
// To be removed as the caching of file names causes issues when using the project file as template
|
|
|
|
// https://github.com/OPM/ResInsight/issues/7308
|
|
|
|
caf::PdmField<std::vector<caf::FilePath>> m_filesContainingFaults_OBSOLETE;
|
2013-03-18 05:40:39 -05:00
|
|
|
};
|