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
|
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.
|
|
|
|
|
//
|
|
|
|
|
// 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
|
|
|
|
|
|
2017-08-11 10:25:33 +02:00
|
|
|
#include "RiaPorosityModel.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
|
|
|
|
|
#include "RimCase.h"
|
2017-06-13 15:41:52 +02:00
|
|
|
#include "RiaDefines.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-02-24 11:07:15 +01:00
|
|
|
#include "cvfBase.h"
|
|
|
|
|
#include "cvfObject.h"
|
2017-04-06 14:12:24 +02:00
|
|
|
#include "cvfColor3.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-01-10 09:51:39 +01:00
|
|
|
class RigEclipseCaseData;
|
2017-09-12 11:39:32 +02:00
|
|
|
class RigCaseCellResultsData;
|
2012-05-18 09:45:23 +02:00
|
|
|
class RigGridBase;
|
2018-01-30 13:29:14 +01:00
|
|
|
class RigMainGrid;
|
2013-03-13 11:42:26 +01:00
|
|
|
class RimCaseCollection;
|
2013-04-08 12:16:38 +02:00
|
|
|
class RimIdenticalGridCaseGroup;
|
2013-05-06 10:55:00 +02:00
|
|
|
class RimReservoirCellResultsStorage;
|
2018-11-09 09:04:40 +01:00
|
|
|
class RimContourMapView;
|
|
|
|
|
class RimContourMapViewCollection;
|
2017-02-24 11:07:15 +01:00
|
|
|
class RimEclipseView;
|
2018-03-14 09:35:48 +01:00
|
|
|
class RigVirtualPerforationTransmissibilities;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-05-15 18:51:49 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
//==================================================================================================
|
|
|
|
|
//
|
2012-06-26 16:10:41 +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;
|
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
|
|
|
|
2013-03-18 14:34:29 +01:00
|
|
|
// Fields:
|
2015-07-31 18:58:23 +02:00
|
|
|
caf::PdmChildArrayField<RimEclipseView*> reservoirViews;
|
2013-12-17 11:37:58 +01:00
|
|
|
|
2017-06-19 10:54:05 +02:00
|
|
|
std::vector<QString> filesContainingFaults() const;
|
|
|
|
|
void setFilesContainingFaults(const std::vector<QString>& val);
|
2012-06-26 16:10:41 +02:00
|
|
|
|
2014-08-21 08:39:19 +02:00
|
|
|
bool openReserviorCase();
|
2015-05-15 18:51:49 +02:00
|
|
|
virtual bool openEclipseGridFile() = 0;
|
2013-03-18 14:34:29 +01:00
|
|
|
|
2017-03-15 09:10:16 +01:00
|
|
|
RigEclipseCaseData* eclipseCaseData();
|
|
|
|
|
const RigEclipseCaseData* eclipseCaseData() const;
|
2017-04-06 14:12:24 +02:00
|
|
|
cvf::Color3f defaultWellColor(const QString& wellName);
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2018-01-30 13:29:14 +01:00
|
|
|
const RigMainGrid* mainGrid() const;
|
|
|
|
|
|
2017-09-12 11:39:32 +02:00
|
|
|
RigCaseCellResultsData* results(RiaDefines::PorosityModelType porosityModel);
|
|
|
|
|
const RigCaseCellResultsData* results(RiaDefines::PorosityModelType porosityModel) const;
|
2018-08-24 09:59:37 +02:00
|
|
|
bool loadStaticResultsByName(const std::vector<QString>& resultNames);
|
2017-09-12 11:39:32 +02:00
|
|
|
|
|
|
|
|
RimReservoirCellResultsStorage* resultsStorage(RiaDefines::PorosityModelType porosityModel);
|
|
|
|
|
const RimReservoirCellResultsStorage* resultsStorage(RiaDefines::PorosityModelType porosityModel) const;
|
2013-03-18 14:34:29 +01:00
|
|
|
|
2015-11-16 07:16:30 +01:00
|
|
|
RimEclipseView* createAndAddReservoirView();
|
2016-12-22 08:45:30 +01:00
|
|
|
RimEclipseView* createCopyAndAddView(const RimEclipseView* sourceView);
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2018-03-14 09:35:48 +01:00
|
|
|
const RigVirtualPerforationTransmissibilities* computeAndGetVirtualPerforationTransmissibilities();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2013-03-18 14:34:29 +01:00
|
|
|
virtual QString locationOnDisc() const { return QString(); }
|
2013-04-11 12:06:38 +02:00
|
|
|
virtual QString gridFileName() const { return QString(); }
|
|
|
|
|
|
2013-03-19 12:47:38 +01:00
|
|
|
|
|
|
|
|
RimCaseCollection* parentCaseCollection();
|
2018-11-09 09:04:40 +01:00
|
|
|
RimContourMapViewCollection* contourMapCollection();
|
2018-11-08 16:18:03 +01:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
QStringList timeStepStrings() const override;
|
|
|
|
|
QString timeStepName(int frameIdx) const override;
|
|
|
|
|
std::vector<QDateTime> timeStepDates() const override;
|
2017-03-24 15:09:10 +01:00
|
|
|
|
2015-09-21 11:20:07 +02:00
|
|
|
|
2018-08-24 09:22:18 +02:00
|
|
|
cvf::BoundingBox activeCellsBoundingBox() const override;
|
|
|
|
|
cvf::BoundingBox allCellsBoundingBox() const override;
|
|
|
|
|
cvf::Vec3d displayModelOffset() const override;
|
2015-11-16 07:16:30 +01:00
|
|
|
|
2017-04-24 12:04:49 +02:00
|
|
|
void reloadDataAndUpdate();
|
2017-04-21 12:02:48 +02:00
|
|
|
virtual void reloadEclipseGridFile() = 0;
|
|
|
|
|
|
2017-06-19 20:55:58 +02:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
double characteristicCellSize() const override;
|
2015-05-16 08:45:50 +02:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
void setFormationNames(RimFormationNames* formationNames) override;
|
2017-12-01 13:24:43 +01:00
|
|
|
|
2018-10-23 16:32:40 +02:00
|
|
|
std::set<QString> sortedSimWellNames() const;
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
protected:
|
2018-08-24 09:22:18 +02:00
|
|
|
void initAfterRead() override;
|
|
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2018-10-18 19:45:57 +02:00
|
|
|
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2018-10-18 19:45: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:
|
|
|
|
|
void computeCachedData();
|
2017-01-10 09:51:39 +01:00
|
|
|
void setReservoirData(RigEclipseCaseData* eclipseCase);
|
2015-05-15 18:51:49 +02:00
|
|
|
|
2013-03-13 11:42:26 +01:00
|
|
|
private:
|
2017-06-16 16:40:35 +02:00
|
|
|
void createTimeStepFormatString();
|
2018-10-18 19:45:57 +02:00
|
|
|
std::vector<Rim3dView*> allSpecialViews() const override;
|
2013-03-13 11:42:26 +01:00
|
|
|
|
2018-08-24 09:34:24 +02:00
|
|
|
protected:
|
|
|
|
|
caf::PdmField<bool> m_flipXAxis;
|
|
|
|
|
caf::PdmField<bool> m_flipYAxis;
|
|
|
|
|
|
2013-03-18 14:34:29 +01:00
|
|
|
private:
|
2018-08-24 09:34:24 +02:00
|
|
|
caf::PdmField<QString> m_filesContainingFaultsSemColSeparated;
|
|
|
|
|
caf::PdmField<bool> m_releaseResultMemory;
|
|
|
|
|
|
2018-11-09 09:04:40 +01:00
|
|
|
caf::PdmChildField<RimContourMapViewCollection*> m_contourMapCollection;
|
2018-10-23 16:32:40 +02:00
|
|
|
|
2017-06-16 16:40:35 +02:00
|
|
|
cvf::ref<RigEclipseCaseData> m_rigEclipseCase;
|
2015-11-11 16:21:07 +01:00
|
|
|
QString m_timeStepFormatString;
|
2018-08-24 09:34:24 +02:00
|
|
|
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:
|
2018-01-09 09:57:54 +01:00
|
|
|
caf::PdmField<QString> m_caseName_OBSOLETE;
|
2017-06-19 10:54:05 +02:00
|
|
|
private:
|
|
|
|
|
caf::PdmField<std::vector<QString> > m_filesContainingFaults_OBSOLETE;
|
|
|
|
|
|
2013-03-18 11:40:39 +01:00
|
|
|
};
|