SpiralICD.hpp
Go to the documentation of this file.
1/*
2 Copyright 2017 SINTEF Digital, Mathematics and Cybernetics.
3 Copyright 2019 Equinor ASA.
4
5 This file is part of the Open Porous Media project (OPM).
6
7 OPM is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 OPM is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with OPM. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef SPIRALICD_HPP_HEADER_INCLUDED
22#define SPIRALICD_HPP_HEADER_INCLUDED
23
24#include <map>
25#include <utility>
26#include <vector>
27#include <string>
28
30
31namespace Opm {
32
33 class DeckRecord;
34 class DeckKeyword;
35
36 class SpiralICD {
37 public:
38
40 explicit SpiralICD(const DeckRecord& record);
42 double length,
43 double densityCalibration,
45 double criticalValue,
47 double maxViscosityRatio,
49 double maxAbsoluteRate,
51 double scalingFactor);
52
54
55 // the function will return a map
56 // [
57 // "WELL1" : [<seg1, sicd1>, <seg2, sicd2> ...]
58 // ....
59 static std::map<std::string, std::vector<std::pair<int, SpiralICD> > >
60 fromWSEGSICD(const DeckKeyword& wsegsicd);
61
62 double maxAbsoluteRate() const;
64 double strength() const;
65 double length() const;
66 double densityCalibration() const;
67 double viscosityCalibration() const;
68 double criticalValue() const;
69 double widthTransitionRegion() const;
70 double maxViscosityRatio() const;
71 int methodFlowScaling() const;
72
73 void updateScalingFactor(const double segment_length, const double completion_length);
74 double scalingFactor() const;
75 int ecl_status() const;
76 bool operator==(const SpiralICD& data) const;
77
78 template<class Serializer>
79 void serializeOp(Serializer& serializer)
80 {
81 serializer(m_strength);
82 serializer(m_length);
83 serializer(m_density_calibration);
84 serializer(m_viscosity_calibration);
85 serializer(m_critical_value);
86 serializer(m_width_transition_region);
87 serializer(m_max_viscosity_ratio);
88 serializer(m_method_flow_scaling);
89 serializer(m_max_absolute_rate);
90 serializer(m_status);
91 serializer(m_scaling_factor);
92 }
93
94 private:
95 double m_strength;
96 double m_length;
97 double m_density_calibration;
98 double m_viscosity_calibration;
99 double m_critical_value;
100 double m_width_transition_region;
101 double m_max_viscosity_ratio;
102 int m_method_flow_scaling;
103 double m_max_absolute_rate;
104 ICDStatus m_status;
105 // scaling factor is the only one can not be gotten from deck directly, needs to be
106 // updated afterwards
107 double m_scaling_factor;
108};
109
110}
111
112#endif
Definition: DeckKeyword.hpp:38
Definition: DeckRecord.hpp:32
Definition: Serializer.hpp:38
Definition: SpiralICD.hpp:36
SpiralICD(const DeckRecord &record)
double widthTransitionRegion() const
double criticalValue() const
bool operator==(const SpiralICD &data) const
double maxAbsoluteRate() const
ICDStatus status() const
double densityCalibration() const
int ecl_status() const
double maxViscosityRatio() const
double length() const
double viscosityCalibration() const
double scalingFactor() const
void updateScalingFactor(const double segment_length, const double completion_length)
SpiralICD(double strength, double length, double densityCalibration, double viscosityCalibration, double criticalValue, double widthTransitionRegion, double maxViscosityRatio, int methodFlowScaling, double maxAbsoluteRate, ICDStatus status, double scalingFactor)
int methodFlowScaling() const
double strength() const
void serializeOp(Serializer &serializer)
Definition: SpiralICD.hpp:79
static SpiralICD serializeObject()
static std::map< std::string, std::vector< std::pair< int, SpiralICD > > > fromWSEGSICD(const DeckKeyword &wsegsicd)
Definition: A.hpp:4
ICDStatus
Definition: icd.hpp:26
static std::string data()
Definition: exprtk.hpp:40022