2018-12-07 13:18:01 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2018 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
|
|
|
|
|
|
2021-01-21 12:58:46 +01:00
|
|
|
#include "RiaDefines.h"
|
2018-12-07 13:18:01 +01:00
|
|
|
#include "RiaWeightedMeanCalculator.h"
|
2018-12-07 15:48:11 +01:00
|
|
|
#include "RimWellPathAicdParameters.h"
|
2018-12-07 13:18:01 +01:00
|
|
|
|
2018-12-07 15:48:11 +01:00
|
|
|
#include <array>
|
2018-12-07 13:18:01 +01:00
|
|
|
|
|
|
|
|
class RimWellPathValve;
|
|
|
|
|
class RicMswValve;
|
|
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
class RicMswValveAccumulator
|
|
|
|
|
{
|
|
|
|
|
public:
|
2021-02-26 14:27:59 +01:00
|
|
|
RicMswValveAccumulator( RicMswValve* valve, RiaDefines::EclipseUnitSystem unitSystem )
|
2020-10-19 09:52:45 +02:00
|
|
|
: m_valve( valve )
|
|
|
|
|
, m_unitSystem( unitSystem )
|
2020-10-19 18:48:37 +02:00
|
|
|
, m_valid( false )
|
2019-09-06 10:40:57 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
virtual bool accumulateValveParameters( const RimWellPathValve* wellPathValve,
|
2020-10-19 09:52:45 +02:00
|
|
|
double overlapLength,
|
|
|
|
|
double perforationCompsegsLength ) = 0;
|
|
|
|
|
virtual void applyToSuperValve() = 0;
|
|
|
|
|
|
2021-02-26 14:27:59 +01:00
|
|
|
RicMswValve* superValve() const { return m_valve; }
|
2018-12-07 13:18:01 +01:00
|
|
|
|
|
|
|
|
protected:
|
2021-02-26 14:27:59 +01:00
|
|
|
RicMswValve* m_valve;
|
2021-01-21 12:58:46 +01:00
|
|
|
RiaDefines::EclipseUnitSystem m_unitSystem;
|
|
|
|
|
bool m_valid;
|
2018-12-07 13:18:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
class RicMswICDAccumulator : public RicMswValveAccumulator
|
|
|
|
|
{
|
|
|
|
|
public:
|
2021-02-26 14:27:59 +01:00
|
|
|
RicMswICDAccumulator( RicMswValve* valve, RiaDefines::EclipseUnitSystem unitSystem );
|
2019-09-06 10:40:57 +02:00
|
|
|
bool accumulateValveParameters( const RimWellPathValve* wellPathValve,
|
2020-10-19 09:52:45 +02:00
|
|
|
double overlapLength,
|
|
|
|
|
double perforationCompsegsLength ) override;
|
|
|
|
|
void applyToSuperValve() override;
|
2018-12-07 13:18:01 +01:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
RiaWeightedMeanCalculator<double> m_coefficientCalculator;
|
|
|
|
|
double m_areaSum;
|
|
|
|
|
};
|
|
|
|
|
|
2018-12-07 15:48:11 +01:00
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
class RicMswAICDAccumulator : public RicMswValveAccumulator
|
|
|
|
|
{
|
|
|
|
|
public:
|
2021-02-26 14:27:59 +01:00
|
|
|
RicMswAICDAccumulator( RicMswValve* valve, RiaDefines::EclipseUnitSystem unitSystem );
|
2020-10-19 18:48:37 +02:00
|
|
|
bool accumulateValveParameters( const RimWellPathValve* wellPathValve,
|
|
|
|
|
double overlapLength,
|
|
|
|
|
double perforationCompsegsLength ) override;
|
|
|
|
|
void applyToSuperValve() override;
|
|
|
|
|
double accumulatedLength() const;
|
2018-12-07 13:18:01 +01:00
|
|
|
|
2018-12-07 15:48:11 +01:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
bool m_deviceOpen;
|
2018-12-07 15:48:11 +01:00
|
|
|
std::array<RiaWeightedMeanCalculator<double>, AICD_NUM_PARAMS> m_meanCalculators;
|
2018-12-13 19:49:37 +01:00
|
|
|
double m_accumulatedLength;
|
2020-06-24 12:35:51 +02:00
|
|
|
double m_accumulatedFlowScalingFactorDivisor;
|
|
|
|
|
};
|