2012-06-26 09:10:41 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
|
|
|
#include "RifReaderInterface.h"
|
|
|
|
#include <QList>
|
|
|
|
#include <QDateTime>
|
|
|
|
|
|
|
|
class RifEclipseOutputFileTools;
|
|
|
|
class RifEclipseRestartDataAccess;
|
2013-01-25 08:20:41 -06:00
|
|
|
class RigGridBase;
|
2013-02-05 03:51:32 -06:00
|
|
|
class RigMainGrid;
|
2012-06-26 09:10:41 -05:00
|
|
|
|
|
|
|
typedef struct ecl_grid_struct ecl_grid_type;
|
2013-02-05 03:51:32 -06:00
|
|
|
typedef struct ecl_file_struct ecl_file_type;
|
|
|
|
|
2012-06-26 09:10:41 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
//
|
|
|
|
// File interface for Eclipse output files
|
|
|
|
//
|
|
|
|
//==================================================================================================
|
|
|
|
class RifReaderEclipseOutput : public RifReaderInterface
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RifReaderEclipseOutput();
|
|
|
|
virtual ~RifReaderEclipseOutput();
|
|
|
|
|
|
|
|
bool open(const QString& fileName, RigReservoir* reservoir);
|
|
|
|
void close();
|
|
|
|
|
2013-01-30 07:13:50 -06:00
|
|
|
bool staticResult(const QString& result, PorosityModelResultType matrixOrFracture, std::vector<double>* values);
|
|
|
|
bool dynamicResult(const QString& result, PorosityModelResultType matrixOrFracture, size_t stepIndex, std::vector<double>* values);
|
2012-06-26 09:10:41 -05:00
|
|
|
|
|
|
|
static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigReservoir* reservoir);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void ground();
|
|
|
|
bool buildMetaData(RigReservoir* reservoir);
|
|
|
|
void readWellCells(RigReservoir* reservoir);
|
|
|
|
|
2013-02-05 03:51:32 -06:00
|
|
|
void extractResultValuesBasedOnPorosityModel(PorosityModelResultType matrixOrFracture, std::vector<double>* values, const std::vector<double>& fileValues);
|
|
|
|
|
|
|
|
static RifEclipseRestartDataAccess* staticResultsAccess(const QStringList& fileSet);
|
|
|
|
static RifEclipseRestartDataAccess* dynamicResultsAccess(const QStringList& fileSet);
|
|
|
|
|
|
|
|
QStringList validKeywordsForPorosityModel(const QStringList& keywords, const std::vector<size_t>& keywordDataItemCounts, PorosityModelResultType matrixOrFracture, size_t timeStepCount) const;
|
2012-06-26 09:10:41 -05:00
|
|
|
|
|
|
|
private:
|
2013-01-30 07:13:50 -06:00
|
|
|
QString m_fileName; // Name of file used to start accessing Eclipse output files
|
|
|
|
QStringList m_fileSet; // Set of files in filename's path with same base name as filename
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2013-02-05 03:51:32 -06:00
|
|
|
cvf::cref<RigMainGrid> m_mainGrid;
|
|
|
|
|
2013-01-30 07:13:50 -06:00
|
|
|
QList<QDateTime> m_timeSteps;
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2013-02-05 03:51:32 -06:00
|
|
|
ecl_file_type* m_ecl_file; // File access to static results
|
2013-01-30 07:13:50 -06:00
|
|
|
cvf::ref<RifEclipseRestartDataAccess> m_dynamicResultsAccess; // File access to dynamic results
|
2012-06-26 09:10:41 -05:00
|
|
|
};
|