opm-common
NumericalAquiferConnection.hpp
1 /*
2  Copyright (C) 2020 SINTEF Digital
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_NUMERICALAQUIFERCONNECTION_HPP
21 #define OPM_NUMERICALAQUIFERCONNECTION_HPP
22 
23 #include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
24 #include <map>
25 #include <array>
26 #include <vector>
27 
28 namespace Opm {
29 
30  class EclipseGrid;
31  class Deck;
32  class DeckRecord;
33 
35  {
36  // TODO: I do not think we need all the values here
37  size_t aquifer_id{};
38  size_t I{}, J{}, K{};
39  size_t global_index{};
40  FaceDir::DirEnum face_dir{FaceDir::Unknown};
41  double trans_multipler{};
42  int trans_option{};
43  bool connect_active_cell{false};
44 
45  // The following are options related to VE simulation
46  double ve_frac_relperm{};
47  double ve_frac_cappress{};
48 
49  NumericalAquiferConnection(size_t i, size_t j, size_t k, size_t global_index, bool allow_connect_active, const DeckRecord& record);
50  NumericalAquiferConnection() = default;
51 
52  bool operator==(const NumericalAquiferConnection& other) const;
53 
54  template<class Serializer>
55  void serializeOp(Serializer& serializer) {
56  serializer(this->aquifer_id);
57  serializer(this->I);
58  serializer(this->J);
59  serializer(this->K);
60  serializer(this->global_index);
61  serializer(this->face_dir);
62  serializer(this->trans_multipler);
63  serializer(this->trans_option);
64  serializer(this->connect_active_cell);
65  serializer(this->ve_frac_relperm);
66  serializer(this->ve_frac_cappress);
67  }
68 
69  static std::map<size_t, std::map<size_t, NumericalAquiferConnection>>
70  generateConnections(const Deck& deck, const EclipseGrid& grid);
71 
72  private:
73  static std::vector<NumericalAquiferConnection>
74  connectionsFromSingleRecord(const EclipseGrid& grid, const DeckRecord& record);
75  };
76 }
77 
78 #endif //OPM_NUMERICALAQUIFERCONNECTION_HPP
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition: EclipseGrid.hpp:62
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: Deck.hpp:46
Definition: DeckRecord.hpp:32
Class for (de-)serializing.
Definition: Serializer.hpp:94
Definition: NumericalAquiferConnection.hpp:34