ResInsight/ApplicationLibCode/ReservoirDataModel/RigWellAllocationOverTime.h
Jørgen Herje 535811cc4f
Producer/Injector Connectivity Table (#9928)
- Crated new RimMatrixPlotWidget to show table data
- Create RimWellConnectivityTable for showing Producer/Injector connectivity table data
- Rename RimWellAllocationOverTimeCollection to RigWellAllocationOverTime for well allocation over time data storage
- Created heatmap color palette
- Move utils from RimWellAllocationOverTimePlot to RiaQDateTimeTools
- Create RimFlowDiagnosticsTools for producer/injector well utility functions


---------

Co-authored-by: jorgenherje <jorgenherje@users.noreply.github.com>
2023-03-21 08:32:38 +01:00

64 lines
2.5 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2023- Equinor ASA
//
// 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 <QDateTime>
#include <QString>
#include <map>
#include <vector>
class RigAccWellFlowCalculator;
class RigWellAllocationOverTime
{
public:
RigWellAllocationOverTime( const std::vector<QDateTime>& timeStepDates,
const std::map<QDateTime, RigAccWellFlowCalculator>& timeStepAndCalculatorPairs );
const std::vector<QDateTime> timeStepDates() const { return m_timeStepDates; }
const std::map<QString, std::map<QDateTime, double>> wellValuesMap() const { return m_wellValuesMap; }
void fillWithFlowRateFractionValues();
void fillWithFlowRatePercentageValues();
void fillWithFlowRateValues();
void fillWithFlowVolumeValues();
void fillWithAccumulatedFlowVolumeValues( double smallContributionsThreshold );
void fillWithAccumulatedFlowVolumeFractionValues( double smallContributionsThreshold );
void fillWithAccumulatedFlowVolumePercentageValues( double smallContributionsThreshold );
private:
enum class FractionOrPercentage
{
FRACTION,
PERCENTAGE
};
void fillWithAccumulatedFlowVolumeFractionOrPercentageValues( FractionOrPercentage selection, double smallContributionsThreshold );
void groupAccumulatedFlowVolumes( std::map<QString, std::map<QDateTime, double>>& rWellValuesMap, double threshold );
void groupAccumulatedFlowVolumeFractionsOrPercentages( std::map<QString, std::map<QDateTime, double>>& rWellValuesMap, double threshold );
private:
std::map<QDateTime, RigAccWellFlowCalculator> m_timeStepAndCalculatorPairs;
std::vector<QDateTime> m_timeStepDates;
std::map<QString, std::map<QDateTime, double>> m_defaultWellValuesMap;
std::map<QString, std::map<QDateTime, double>> m_wellValuesMap;
};