My Project
Tuning.hpp
1 /*
2  Copyright 2015 Statoil 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_TUNING_HPP
21 #define OPM_TUNING_HPP
22 
23 namespace Opm {
24  struct Tuning {
25  Tuning();
26 
27  static Tuning serializeObject();
28 
29  // Record1
30  double TSINIT;
31  double TSMAXZ;
32  double TSMINZ;
33  double TSMCHP;
34  double TSFMAX;
35  double TSFMIN;
36  double TFDIFF;
37  double TSFCNV;
38  double THRUPT;
39  double TMAXWC = 0.0;
40  bool TMAXWC_has_value = false;
41 
42  // Record 2
43  double TRGTTE;
44  double TRGCNV;
45  double TRGMBE;
46  double TRGLCV;
47  double XXXTTE;
48  double XXXCNV;
49  double XXXMBE;
50  double XXXLCV;
51  double XXXWFL;
52  double TRGFIP;
53  double TRGSFT = 0.0;
54  bool TRGSFT_has_value = false;
55  double THIONX;
56  double TRWGHT;
57 
58  // Record 3
59  int NEWTMX;
60  int NEWTMN;
61  int LITMAX;
62  int LITMIN;
63  int MXWSIT;
64  int MXWPIT;
65  double DDPLIM;
66  double DDSLIM;
67  double TRGDPR;
68  double XXXDPR;
69  bool XXXDPR_has_value = false;
70 
71  /*
72  In addition to the values set in the TUNING keyword this Tuning
73  implementation also contains the result of the WSEGITER keyword, which
74  is special tuning parameters to be applied to the multisegment well
75  model. Observe that the maximum number of well iterations - MXWSIT -
76  is specified by both the TUNING keyword and the WSEGITER keyword, but
77  with different defaults.
78  */
79  int WSEG_MAX_RESTART;
80  double WSEG_REDUCTION_FACTOR;
81  double WSEG_INCREASE_FACTOR;
82 
83 
84  bool operator==(const Tuning& data) const;
85  bool operator !=(const Tuning& data) const {
86  return !(*this == data);
87  }
88 
89  template<class Serializer>
90  void serializeOp(Serializer& serializer)
91  {
92  serializer(TSINIT);
93  serializer(TSMAXZ);
94  serializer(TSMINZ);
95  serializer(TSMCHP);
96  serializer(TSFMAX);
97  serializer(TSFMIN);
98  serializer(TFDIFF);
99  serializer(TSFCNV);
100  serializer(THRUPT);
101  serializer(TMAXWC);
102  serializer(TMAXWC_has_value);
103 
104  serializer(TRGTTE);
105  serializer(TRGCNV);
106  serializer(TRGMBE);
107  serializer(TRGLCV);
108  serializer(XXXTTE);
109  serializer(XXXCNV);
110  serializer(XXXMBE);
111  serializer(XXXLCV);
112  serializer(XXXWFL);
113  serializer(TRGFIP);
114  serializer(TRGSFT);
115  serializer(TRGSFT_has_value);
116  serializer(THIONX);
117  serializer(TRWGHT);
118 
119  serializer(NEWTMX);
120  serializer(NEWTMN);
121  serializer(LITMAX);
122  serializer(LITMIN);
123  serializer(MXWSIT);
124  serializer(MXWPIT);
125  serializer(DDPLIM);
126  serializer(DDSLIM);
127  serializer(TRGDPR);
128  serializer(XXXDPR);
129  serializer(XXXDPR_has_value);
130 
131  serializer(WSEG_MAX_RESTART);
132  serializer(WSEG_REDUCTION_FACTOR);
133  serializer(WSEG_INCREASE_FACTOR);
134  }
135  };
136 
137 } //namespace Opm
138 
139 #endif
Definition: Serializer.hpp:38
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Definition: Tuning.hpp:24