My Project
Loading...
Searching...
No Matches
AquiferCT.hpp
1/*
2 Copyright (C) 2017 TNO
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_AQUIFERCT_HPP
21#define OPM_AQUIFERCT_HPP
22
23/*
24 The AquiferCT which stands for AquiferCarterTracy is a data container object meant to hold the data for the aquifer carter tracy model.
25 This includes the logic for parsing as well as the associated tables. It is meant to be used by opm-grid and opm-simulators in order to
26 implement the Carter Tracy analytical aquifer model in OPM Flow.
27*/
28
29#include <cstddef>
30#include <optional>
31#include <vector>
32
33namespace Opm {
34 class Deck;
35 class DeckRecord;
36 class TableManager;
37}
38
39namespace Opm { namespace RestartIO {
40 class RstAquifer;
41}} // Opm::RestartIO
42
43namespace Opm {
44
45 class AquiferCT {
46 public:
47
49 {
50 friend class AquiferCT;
51
52 AQUCT_data() = default;
53 AQUCT_data(const DeckRecord& record, const TableManager& tables);
54 AQUCT_data(const int aqID,
55 const int infID,
56 const int pvtID,
57 const double phi_aq_,
58 const double d0_,
59 const double C_t_,
60 const double r_o_,
61 const double k_a_,
62 const double h_,
63 const double theta_,
64 const double p0_,
65 const double T0_);
66
67 int aquiferID{};
68 int inftableID{};
69 int pvttableID{};
70
71 double porosity{};
72 double datum_depth{};
73 double total_compr{};
74 double inner_radius{};
75 double permeability{};
76 double thickness{};
77 double angle_fraction{};
78
79 std::optional<double> initial_pressure{};
80 std::optional<double> initial_temperature{};
81 std::vector<double> dimensionless_time{};
82 std::vector<double> dimensionless_pressure{};
83
84 static AQUCT_data serializationTestObject();
85
86 double timeConstant() const { return this->time_constant_; }
87 double influxConstant() const { return this->influx_constant_; }
88 double waterDensity() const { return this->water_density_; }
89 double waterViscosity() const { return this->water_viscosity_; }
90
91 bool operator==(const AQUCT_data& other) const;
92
93 void finishInitialisation(const TableManager& tables);
94
95 template<class Serializer>
96 void serializeOp(Serializer& serializer)
97 {
98 serializer(this->aquiferID);
99 serializer(this->inftableID);
100 serializer(this->pvttableID);
101 serializer(this->porosity);
102 serializer(this->datum_depth);
103 serializer(this->total_compr);
104 serializer(this->inner_radius);
105 serializer(this->permeability);
106 serializer(this->thickness);
107 serializer(this->angle_fraction);
108 serializer(this->initial_pressure);
109 serializer(this->initial_temperature);
110 serializer(this->dimensionless_time);
111 serializer(this->dimensionless_pressure);
112 serializer(this->time_constant_);
113 serializer(this->influx_constant_);
114 serializer(this->water_density_);
115 serializer(this->water_viscosity_);
116 }
117
118 private:
119 double time_constant_{};
120 double influx_constant_{};
121 double water_density_{};
122 double water_viscosity_{};
123 };
124
125 AquiferCT() = default;
126 AquiferCT(const TableManager& tables, const Deck& deck);
127 explicit AquiferCT(const std::vector<AquiferCT::AQUCT_data>& data);
128
129 void loadFromRestart(const RestartIO::RstAquifer& rst,
130 const TableManager& tables);
131
132 static AquiferCT serializationTestObject();
133
134 std::size_t size() const;
135 std::vector<AquiferCT::AQUCT_data>::const_iterator begin() const;
136 std::vector<AquiferCT::AQUCT_data>::const_iterator end() const;
137 const std::vector<AquiferCT::AQUCT_data>& data() const;
138 bool operator==(const AquiferCT& other) const;
139
140 bool hasAquifer(const int aquID) const;
141
142 template<class Serializer>
143 void serializeOp(Serializer& serializer)
144 {
145 serializer(m_aquct);
146 }
147
148 private:
149 std::vector<AquiferCT::AQUCT_data> m_aquct;
150 };
151}
152
153
154#endif
Definition AquiferCT.hpp:45
Definition DeckRecord.hpp:32
Definition Deck.hpp:49
Definition aquifer.hpp:45
Class for (de-)serializing.
Definition Serializer.hpp:84
Definition TableManager.hpp:66
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Definition AquiferCT.hpp:49