2017-08-25 13:28:42 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2017- Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-08-25 13:28:42 +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
|
|
|
//
|
2017-08-25 13:28:42 +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>
|
2017-08-25 13:28:42 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2020-05-12 18:19:27 +02:00
|
|
|
#include "RigNncConnection.h"
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
#include <QString>
|
2017-08-25 13:28:42 +02:00
|
|
|
#include <cstddef>
|
2020-05-12 18:19:27 +02:00
|
|
|
#include <deque>
|
2017-08-25 13:28:42 +02:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
class RimEclipseCase;
|
|
|
|
|
class RigMainGrid;
|
|
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-08-25 13:28:42 +02:00
|
|
|
//==================================================================================================
|
|
|
|
|
|
|
|
|
|
class RigNumberOfFloodedPoreVolumesCalculator
|
|
|
|
|
{
|
|
|
|
|
public:
|
2020-02-12 11:43:15 +01:00
|
|
|
explicit RigNumberOfFloodedPoreVolumesCalculator( RimEclipseCase* caseToApply, const std::vector<QString>& tracerNames );
|
2017-08-25 13:28:42 +02:00
|
|
|
|
2017-09-05 12:01:59 +02:00
|
|
|
// Used to "steal" the data from this one using swap
|
2017-08-28 12:35:44 +02:00
|
|
|
|
2017-09-05 12:01:59 +02:00
|
|
|
std::vector<std::vector<double>>& numberOfFloodedPorevolumes();
|
2017-08-28 14:14:21 +02:00
|
|
|
|
|
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
void calculate( RigMainGrid* mainGrid,
|
|
|
|
|
RimEclipseCase* caseToApply,
|
|
|
|
|
std::vector<double> daysSinceSimulationStart,
|
|
|
|
|
const std::vector<double>* porvResults,
|
|
|
|
|
const std::vector<double>* scwrResults,
|
|
|
|
|
std::vector<const std::vector<double>*> flowrateIatAllTimeSteps,
|
|
|
|
|
std::vector<const std::vector<double>*> flowrateJatAllTimeSteps,
|
|
|
|
|
std::vector<const std::vector<double>*> flowrateKatAllTimeSteps,
|
2020-05-12 18:19:27 +02:00
|
|
|
const RigConnectionContainer& connections,
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<const std::vector<double>*> flowrateNNCatAllTimeSteps,
|
|
|
|
|
std::vector<std::vector<double>> summedTracersAtAllTimesteps );
|
2017-08-28 14:14:21 +02:00
|
|
|
|
2020-05-12 18:19:27 +02:00
|
|
|
void distributeNNCflow( const RigConnectionContainer& connections,
|
|
|
|
|
RimEclipseCase* caseToApply,
|
|
|
|
|
const std::vector<double>& summedTracerValues,
|
|
|
|
|
const std::vector<double>* flowrateNNC,
|
|
|
|
|
std::vector<double>& flowrateIntoCell );
|
2017-08-28 14:14:21 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void distributeNeighbourCellFlow( RigMainGrid* mainGrid,
|
|
|
|
|
RimEclipseCase* caseToApply,
|
2019-11-03 14:08:21 +01:00
|
|
|
const std::vector<double>& summedTracerValues,
|
2019-09-06 10:40:57 +02:00
|
|
|
const std::vector<double>* flrWatResultI,
|
|
|
|
|
const std::vector<double>* flrWatResultJ,
|
|
|
|
|
const std::vector<double>* flrWatResultK,
|
|
|
|
|
std::vector<double>& totalFlowrateIntoCell );
|
2017-08-28 14:14:21 +02:00
|
|
|
|
2017-08-25 13:28:42 +02:00
|
|
|
private:
|
2017-08-28 10:06:39 +02:00
|
|
|
std::vector<std::vector<double>> m_cumWinflowPVAllTimeSteps;
|
2017-08-25 13:28:42 +02:00
|
|
|
};
|