opm-common
doubhead.hpp
1 /*
2  Copyright (c) 2018 Equinor ASA
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef OPM_OUTPUT_ECLIPSE_VECTOR_DOUBHEAD_HPP
21 #define OPM_OUTPUT_ECLIPSE_VECTOR_DOUBHEAD_HPP
22 
23 #include <vector>
24 #include <cmath>
25 
26 namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems {
27 
28  // This is a subset of the items in src/opm/output/eclipse/DoubHEAD.cpp .
29  // Promote items from that list to this in order to make them public.
30  enum doubhead : std::vector<double>::size_type {
31  TsInit = 1, // Maximum Length of Next Timestep
32  TsMaxz = 2, // Maximum Length of Timestep After Next
33  TsMinz = 3, // Minumum Length of All Timesteps
34  TsMchp = 4,
35  TsFMax = 5,
36  TsFMin = 6,
37  TsFcnv = 7,
38  TrgTTE = 8,
39  TrgCNV = 9,
40  TrgMBE = 10,
41  TrgLCV = 11,
42  XxxTTE = 16,
43  XxxCNV = 17,
44  XxxMBE = 18,
45  XxxLCV = 19,
46  XxxWFL = 20,
47 
48  dRsDt = 25,
49 
50  OilVapPropensity = 26, // Oil's propensity to vaporise into
51  // unsaturated gas phase (VAPPARS(1)).
52 
53  OilVapDensPropensity = 27, // Oil's density increase propensity as
54  // lighter fractions vaporise
55  // (VAPPARS(2)).
56 
57  Netbalthpc = 50, // Network balancing THP convergence limit (NETBALAN(4))
58  Netbalint = 51, // Network balancing interval (NETBALAN(1))
59  Netbalnpre = 53, // Network balancing nodal pressure
60  // convergence limit (NETBALAN(2))
61 
62  Netbaltarerr = 63, // Target largest branch network balancing
63  // error at end of timestep (NETBALAN(6))
64 
65  Netbalmaxerr = 64, // Maximum permitted network balancing error
66  // at end of timestep (NETBALAN(7))
67 
68  Netbalstepsz = 66, // Minimum stepsize for steps limited by
69  // network balancing errors (NETBALAN(8))
70 
71  TrgDPR = 82,
72  TfDiff = 83,
73  DdpLim = 84,
74  DdsLim = 85,
75  GRpar_a = 87, // Guiderate parameter A
76  GRpar_b = 88, // Guiderate parameter B
77  GRpar_c = 89, // Guiderate parameter C
78  GRpar_d = 90, // Guiderate parameter D
79  GRpar_e = 91, // Guiderate parameter E
80  GRpar_f = 92, // Guiderate parameter F
81  LOminInt = 93, // LIFTOP - Minimum interval between gas lift optimizations
82  LOincrsz = 95, // LIFTOPT - Increment size for lift gas injection rate
83  LOminEcGrad = 96, // LIFTOPT - Minimum economic gradient
84  GRpar_int = 97, // Guiderate parameter delay interval
85  ThrUPT = 99,
86  XxxDPR = 100,
87  TrgFIP = 101,
88  TrgSFT = 102,
89  GRpar_damp = 144, // Guiderate parameter damping factor
90  WsegRedFac = 145, // WSEGITER parameter (item 3) Reduction factor (F_R)
91  WsegIncFac = 146, // WSEGITER parameter (item 4) Increas factor (F_I)
92  UdqPar_2 = 212, // UDQPARAM item number 2 (Permitted range (+/-) of user-defined quantities)
93  UdqPar_3 = 213, // UDQPARAM item number 3 (Value given to undefined elements when outputting data)
94  UdqPar_4 = 214, // UDQPARAM item number 4 (fractional equality tolerance used in ==, <= etc. functions)
95  };
96 
97  namespace DoubHeadValue {
98  // Default if no active network (BRANPROP/NODEPROP)
99  constexpr auto NetBalNodPressDefault = 0.0; // Barsa
100 
101  // Default => Use TSMINZ from TUNING
102  constexpr auto NetBalMinTSDefault = 0.0;
103 
104  // Default => Let Simulator choose TSINIT
105  constexpr auto TSINITNoValue = 1.00000011;
106  inline bool TSINITHasNoValue(const double value) {
107  return std::abs(value - TSINITNoValue) < 1.0e-7;
108  }
109  }
110 
111 }}}} // Opm::RestartIO::Helpers::VectorItems
112 
113 #endif // OPM_OUTPUT_ECLIPSE_VECTOR_DOUBHEAD_HPP
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30