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 
25 #include <array>
26 #include <cstddef>
27 #include <map>
28 #include <vector>
29 
30 namespace Opm {
31 
32  class EclipseGrid;
33  class Deck;
34  class DeckRecord;
35 
37  {
38  // TODO: I do not think we need all the values here
39  std::size_t aquifer_id{};
40  std::size_t I{}, J{}, K{};
41  std::size_t global_index{};
42  FaceDir::DirEnum face_dir{FaceDir::Unknown};
43  double trans_multipler{};
44  int trans_option{};
45  bool connect_active_cell{false};
46 
47  // The following are options related to VE simulation
48  double ve_frac_relperm{};
49  double ve_frac_cappress{};
50 
51  NumericalAquiferConnection(std::size_t i, std::size_t j, std::size_t k, std::size_t global_index, bool allow_connect_active, const DeckRecord& record);
52  NumericalAquiferConnection() = default;
53 
54  bool operator==(const NumericalAquiferConnection& other) const;
55 
56  template<class Serializer>
57  void serializeOp(Serializer& serializer) {
58  serializer(this->aquifer_id);
59  serializer(this->I);
60  serializer(this->J);
61  serializer(this->K);
62  serializer(this->global_index);
63  serializer(this->face_dir);
64  serializer(this->trans_multipler);
65  serializer(this->trans_option);
66  serializer(this->connect_active_cell);
67  serializer(this->ve_frac_relperm);
68  serializer(this->ve_frac_cappress);
69  }
70 
71  static std::map<std::size_t, std::map<std::size_t, NumericalAquiferConnection>>
72  generateConnections(const Deck& deck, const EclipseGrid& grid);
73 
74  private:
75  static std::vector<NumericalAquiferConnection>
76  connectionsFromSingleRecord(const EclipseGrid& grid, const DeckRecord& record);
77  };
78 }
79 
80 #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:63
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:33
Class for (de-)serializing.
Definition: Serializer.hpp:95
Definition: NumericalAquiferConnection.hpp:36