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