2017-08-25 06:28:42 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017- Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-08-25 06:28:42 -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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-08-25 06:28:42 -05: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 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-08-25 06:28:42 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-05-12 11:19:27 -05:00
|
|
|
#include "RigNncConnection.h"
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
#include <QString>
|
2017-08-25 06:28:42 -05:00
|
|
|
#include <cstddef>
|
2020-05-12 11:19:27 -05:00
|
|
|
#include <deque>
|
2017-08-25 06:28:42 -05:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class RimEclipseCase;
|
|
|
|
class RigMainGrid;
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-08-25 06:28:42 -05:00
|
|
|
//==================================================================================================
|
|
|
|
|
|
|
|
class RigNumberOfFloodedPoreVolumesCalculator
|
|
|
|
{
|
|
|
|
public:
|
2020-02-12 04:43:15 -06:00
|
|
|
explicit RigNumberOfFloodedPoreVolumesCalculator( RimEclipseCase* caseToApply, const std::vector<QString>& tracerNames );
|
2017-08-25 06:28:42 -05:00
|
|
|
|
2017-09-05 05:01:59 -05:00
|
|
|
// Used to "steal" the data from this one using swap
|
2017-08-28 05:35:44 -05:00
|
|
|
|
2017-09-05 05:01:59 -05:00
|
|
|
std::vector<std::vector<double>>& numberOfFloodedPorevolumes();
|
2017-08-28 07:14:21 -05:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05: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 11:19:27 -05:00
|
|
|
const RigConnectionContainer& connections,
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<const std::vector<double>*> flowrateNNCatAllTimeSteps,
|
|
|
|
std::vector<std::vector<double>> summedTracersAtAllTimesteps );
|
2017-08-28 07:14:21 -05:00
|
|
|
|
2020-05-12 11:19:27 -05: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 07:14:21 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void distributeNeighbourCellFlow( RigMainGrid* mainGrid,
|
|
|
|
RimEclipseCase* caseToApply,
|
2019-11-03 07:08:21 -06:00
|
|
|
const std::vector<double>& summedTracerValues,
|
2019-09-06 03:40:57 -05:00
|
|
|
const std::vector<double>* flrWatResultI,
|
|
|
|
const std::vector<double>* flrWatResultJ,
|
|
|
|
const std::vector<double>* flrWatResultK,
|
|
|
|
std::vector<double>& totalFlowrateIntoCell );
|
2017-08-28 07:14:21 -05:00
|
|
|
|
2017-08-25 06:28:42 -05:00
|
|
|
private:
|
2017-08-28 03:06:39 -05:00
|
|
|
std::vector<std::vector<double>> m_cumWinflowPVAllTimeSteps;
|
2017-08-25 06:28:42 -05:00
|
|
|
};
|