My Project
SingleNumericalAquifer.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_SINGLENUMERICALAQUIFER_HPP
21#define OPM_SINGLENUMERICALAQUIFER_HPP
22
23#include <vector>
24#include <set>
25
26#include <opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferConnection.hpp>
27#include <opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferCell.hpp>
28
29namespace Opm {
30 class NNC;
31 struct NNCdata;
32 class FieldPropsManager;
33
35 double volume;
36 double pore_volume;
37 double depth;
38 double porosity;
39 int satnum;
40 int pvtnum;
41 };
42
44 public:
45 explicit SingleNumericalAquifer(const size_t aqu_id);
46 SingleNumericalAquifer() = default;
47
48 void addAquiferCell(const NumericalAquiferCell& aqu_cell);
49 void addAquiferConnection(const NumericalAquiferConnection& aqu_con);
50
51 void postProcessConnections(const EclipseGrid& grid, const std::vector<int>& actnum);
52
53 // TODO: the following two can be made one function. Let us see
54 // how we use them at the end
55 size_t numCells() const;
56 size_t id() const;
57 size_t numConnections() const;
58 const NumericalAquiferCell* getCellPrt(size_t index) const;
59
60 std::unordered_map<size_t, AquiferCellProps> aquiferCellProps() const;
61
62 std::vector<NNCdata> aquiferCellNNCs() const;
63 std::vector<NNCdata> aquiferConnectionNNCs(const EclipseGrid &grid, const FieldPropsManager &fp) const;
64
65 const std::vector<NumericalAquiferConnection>& connections() const;
66
67 bool operator==(const SingleNumericalAquifer& other) const;
68
69 template<class Serializer>
70 void serializeOp(Serializer& serializer) {
71 serializer(this->id_);
72 serializer(this->cells_);
73 serializer(this->connections_);
74 }
75
76 private:
77 // Maybe this id_ is not necessary
78 // Because if it is a map, the id will be there
79 // Then adding aquifer cells will be much easier with the
80 // default constructor
81 size_t id_;
82 std::vector<NumericalAquiferCell> cells_;
83 std::vector<NumericalAquiferConnection> connections_;
84 };
85}
86
87
88#endif //OPM_SINGLENUMERICALAQUIFER_HPP
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition: EclipseGrid.hpp:54
Definition: FieldPropsManager.hpp:38
Class for (de-)serializing.
Definition: Serializer.hpp:75
Definition: SingleNumericalAquifer.hpp:43
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Definition: SingleNumericalAquifer.hpp:34
Definition: NumericalAquiferCell.hpp:31
Definition: NumericalAquiferConnection.hpp:34