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
|
|
|
|
|
|
2017-08-11 10:25:33 +02:00
|
|
|
#include "RiaPorosityModel.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
|
2017-06-13 15:41:52 +02:00
|
|
|
#include "RiaDefines.h"
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "RimCase.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
|
|
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
|
#include "cafPdmChildField.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
|
#include "cafPdmObject.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
|
2017-04-06 14:12:24 +02:00
|
|
|
#include "cvfColor3.h"
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "cvfObject.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
|
2018-07-10 12:44:58 +02:00
|
|
|
#include <set>
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
class QString;
|
2012-08-31 19:12:47 +02:00
|
|
|
|
2017-09-12 11:39:32 +02:00
|
|
|
class RigCaseCellResultsData;
|
2019-11-06 10:54:42 +01:00
|
|
|
class RigEclipseCaseData;
|
2012-05-18 09:45:23 +02:00
|
|
|
class RigGridBase;
|
2018-01-30 13:29:14 +01:00
|
|
|
class RigMainGrid;
|
2019-11-06 10:54:42 +01:00
|
|
|
class RigVirtualPerforationTransmissibilities;
|
2013-03-13 11:42:26 +01:00
|
|
|
class RimCaseCollection;
|
2019-01-11 13:56:35 +01:00
|
|
|
class RimEclipseContourMapView;
|
2019-01-16 10:51:43 +01:00
|
|
|
class RimEclipseContourMapViewCollection;
|
2019-10-30 15:27:31 +01:00
|
|
|
class RimEclipseInputPropertyCollection;
|
2019-11-06 10:54:42 +01:00
|
|
|
class RimEclipseView;
|
|
|
|
|
class RimIdenticalGridCaseGroup;
|
|
|
|
|
class RimReservoirCellResultsStorage;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// Interface for reservoirs.
|
|
|
|
|
//
|
2012-05-18 09:45:23 +02:00
|
|
|
//==================================================================================================
|
2015-05-15 18:51:49 +02:00
|
|
|
class RimEclipseCase : public RimCase
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
2013-03-18 11:40:39 +01:00
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
public:
|
2015-05-15 08:40:27 +02:00
|
|
|
RimEclipseCase();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimEclipseCase() override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
// Fields:
|
|
|
|
|
caf::PdmChildArrayField<RimEclipseView*> reservoirViews;
|
2012-06-26 16:10:41 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<QString> filesContainingFaults() const;
|
|
|
|
|
void setFilesContainingFaults( const std::vector<QString>& val );
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool ensureReservoirCaseIsOpen();
|
|
|
|
|
bool openReserviorCase();
|
|
|
|
|
virtual bool openEclipseGridFile() = 0;
|
2019-10-30 16:52:25 +01:00
|
|
|
virtual bool importAsciiInputProperties( const QStringList& fileNames );
|
2018-01-30 13:29:14 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RigEclipseCaseData* eclipseCaseData();
|
|
|
|
|
const RigEclipseCaseData* eclipseCaseData() const;
|
|
|
|
|
void ensureDeckIsParsedForEquilData();
|
|
|
|
|
cvf::Color3f defaultWellColor( const QString& wellName );
|
2017-09-12 11:39:32 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
const RigMainGrid* mainGrid() const;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RigCaseCellResultsData* results( RiaDefines::PorosityModelType porosityModel );
|
|
|
|
|
const RigCaseCellResultsData* results( RiaDefines::PorosityModelType porosityModel ) const;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RimReservoirCellResultsStorage* resultsStorage( RiaDefines::PorosityModelType porosityModel );
|
|
|
|
|
const RimReservoirCellResultsStorage* resultsStorage( RiaDefines::PorosityModelType porosityModel ) const;
|
2013-04-11 12:06:38 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RimEclipseView* createAndAddReservoirView();
|
|
|
|
|
RimEclipseView* createCopyAndAddView( const RimEclipseView* sourceView );
|
2013-03-19 12:47:38 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
const RigVirtualPerforationTransmissibilities* computeAndGetVirtualPerforationTransmissibilities();
|
2018-11-08 16:18:03 +01:00
|
|
|
|
2020-02-12 11:13:38 +01:00
|
|
|
virtual QString locationOnDisc() const { return QString(); }
|
2017-03-24 15:09:10 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RimCaseCollection* parentCaseCollection();
|
|
|
|
|
RimEclipseContourMapViewCollection* contourMapCollection();
|
2019-10-30 15:27:31 +01:00
|
|
|
RimEclipseInputPropertyCollection* inputPropertyCollection();
|
2015-09-21 11:20:07 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
QStringList timeStepStrings() const override;
|
|
|
|
|
QString timeStepName( int frameIdx ) const override;
|
|
|
|
|
std::vector<QDateTime> timeStepDates() const override;
|
2015-11-16 07:16:30 +01:00
|
|
|
|
2020-01-23 14:43:51 +01:00
|
|
|
cvf::BoundingBox reservoirBoundingBox() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::BoundingBox activeCellsBoundingBox() const override;
|
|
|
|
|
cvf::BoundingBox allCellsBoundingBox() const override;
|
|
|
|
|
cvf::Vec3d displayModelOffset() const override;
|
2017-04-21 12:02:48 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
virtual void reloadEclipseGridFile() = 0;
|
2017-06-19 20:55:58 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
double characteristicCellSize() const override;
|
2015-05-16 08:45:50 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
std::set<QString> sortedSimWellNames() const;
|
2017-12-01 13:24:43 +01:00
|
|
|
|
2020-03-26 13:04:57 +01:00
|
|
|
void loadAndSyncronizeInputProperties( bool includeGridFileName );
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
protected:
|
2019-09-06 10:40:57 +02:00
|
|
|
void initAfterRead() override;
|
2020-02-12 11:43:15 +01:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateFormationNamesData() override;
|
2016-09-06 10:27:30 +02:00
|
|
|
|
2013-03-18 14:34:29 +01:00
|
|
|
// Internal methods
|
|
|
|
|
protected:
|
2020-03-26 13:04:57 +01:00
|
|
|
void computeCachedData();
|
|
|
|
|
void setReservoirData( RigEclipseCaseData* eclipseCase );
|
|
|
|
|
std::vector<QString> additionalFiles() const;
|
2015-05-15 18:51:49 +02:00
|
|
|
|
2013-03-13 11:42:26 +01:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
void createTimeStepFormatString();
|
|
|
|
|
std::vector<Rim3dView*> allSpecialViews() const override;
|
2013-03-13 11:42:26 +01:00
|
|
|
|
2018-08-24 09:34:24 +02:00
|
|
|
protected:
|
2019-10-30 15:27:31 +01:00
|
|
|
caf::PdmField<bool> m_flipXAxis;
|
|
|
|
|
caf::PdmField<bool> m_flipYAxis;
|
|
|
|
|
caf::PdmChildField<RimEclipseInputPropertyCollection*> m_inputPropertyCollection;
|
2018-08-24 09:34:24 +02:00
|
|
|
|
2013-03-18 14:34:29 +01:00
|
|
|
private:
|
2019-12-10 16:36:07 +01:00
|
|
|
caf::PdmField<std::vector<caf::FilePath>> m_filesContainingFaults;
|
|
|
|
|
caf::PdmField<bool> m_releaseResultMemory;
|
2018-08-24 09:34:24 +02:00
|
|
|
|
2019-01-16 10:51:43 +01:00
|
|
|
caf::PdmChildField<RimEclipseContourMapViewCollection*> m_contourMapCollection;
|
2018-10-23 16:32:40 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<RigEclipseCaseData> m_rigEclipseCase;
|
|
|
|
|
QString m_timeStepFormatString;
|
|
|
|
|
std::map<QString, cvf::Color3f> m_wellToColorMap;
|
2017-04-06 14:12:24 +02:00
|
|
|
|
2017-06-16 16:40:35 +02:00
|
|
|
caf::PdmChildField<RimReservoirCellResultsStorage*> m_matrixModelResults;
|
|
|
|
|
caf::PdmChildField<RimReservoirCellResultsStorage*> m_fractureModelResults;
|
2017-04-06 14:12:24 +02:00
|
|
|
|
2013-04-11 12:06:38 +02:00
|
|
|
// Obsolete fields
|
|
|
|
|
protected:
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmField<QString> m_caseName_OBSOLETE;
|
2017-06-19 10:54:05 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
private:
|
|
|
|
|
caf::PdmField<std::vector<QString>> m_filesContainingFaults_OBSOLETE;
|
2013-03-18 11:40:39 +01:00
|
|
|
};
|