AquiferCT.hpp
Go to the documentation of this file.
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*/
29
35
39
40namespace Opm {
41
42 class TableManager;
43
44 class AquiferCT {
45 public:
46
47 struct AQUCT_data{
48
49 AQUCT_data(const DeckRecord& record, const TableManager& tables);
50 AQUCT_data() = default;
51 AQUCT_data(int aqID,
52 int infID,
53 int pvtID,
54 double phi_aq_,
55 double d0_,
56 double C_t_,
57 double r_o_,
58 double k_a_,
59 double c1_,
60 double h_,
61 double theta_,
62 double c2_,
63 const std::pair<bool, double>& p0_,
64 const std::vector<double>& td_,
65 const std::vector<double>& pi_,
66 const std::vector<int>& cell_id_);
67
70
71 double phi_aq , // aquifer porosity
72 d0, // aquifer datum depth
73 C_t , // total compressibility
74 r_o , // aquifer inner radius
75 k_a , // aquifer permeability
76 c1, // 0.008527 (METRIC, PVT-M); 0.006328 (FIELD); 3.6 (LAB)
77 h , // aquifer thickness
78 theta , // angle subtended by the aquifer boundary
79 c2 ; // 6.283 (METRIC, PVT-M); 1.1191 (FIELD); 6.283 (LAB).
80
81 std::pair<bool, double> p0; //Initial aquifer pressure at datum depth, d0
82 std::vector<double> td, pi;
83 std::vector<int> cell_id;
84
85 bool operator==(const AQUCT_data& other) const;
86
87 template<class Serializer>
88 void serializeOp(Serializer& serializer)
89 {
90 serializer(aquiferID);
91 serializer(inftableID);
92 serializer(pvttableID);
93 serializer(phi_aq);
94 serializer(d0);
95 serializer(C_t);
96 serializer(r_o);
97 serializer(k_a);
98 serializer(c1);
99 serializer(h);
100 serializer(theta);
101 serializer(c2);
102 serializer(p0);
103 serializer(td);
104 serializer(pi);
105 serializer(cell_id);
106 }
107 };
108
109 AquiferCT() = default;
110 AquiferCT(const TableManager& tables, const Deck& deck);
111 AquiferCT(const std::vector<AquiferCT::AQUCT_data>& data);
112
114
115 std::size_t size() const;
116 std::vector<AquiferCT::AQUCT_data>::const_iterator begin() const;
117 std::vector<AquiferCT::AQUCT_data>::const_iterator end() const;
118 const std::vector<AquiferCT::AQUCT_data>& data() const;
119 bool operator==(const AquiferCT& other) const;
120
121 template<class Serializer>
122 void serializeOp(Serializer& serializer)
123 {
124 serializer.vector(m_aquct);
125 }
126
127 private:
128 std::vector<AquiferCT::AQUCT_data> m_aquct;
129 };
130}
131
132
133#endif
Definition: AquiferCT.hpp:44
AquiferCT(const TableManager &tables, const Deck &deck)
std::vector< AquiferCT::AQUCT_data >::const_iterator end() const
const std::vector< AquiferCT::AQUCT_data > & data() const
AquiferCT()=default
AquiferCT(const std::vector< AquiferCT::AQUCT_data > &data)
std::size_t size() const
std::vector< AquiferCT::AQUCT_data >::const_iterator begin() const
static AquiferCT serializeObject()
bool operator==(const AquiferCT &other) const
void serializeOp(Serializer &serializer)
Definition: AquiferCT.hpp:122
Definition: Deck.hpp:115
Definition: DeckRecord.hpp:32
Definition: Serializer.hpp:38
Definition: TableManager.hpp:63
Definition: A.hpp:4
Definition: AquiferCT.hpp:47
double d0
Definition: AquiferCT.hpp:72
double theta
Definition: AquiferCT.hpp:78
double c2
Definition: AquiferCT.hpp:79
double k_a
Definition: AquiferCT.hpp:75
void serializeOp(Serializer &serializer)
Definition: AquiferCT.hpp:88
double h
Definition: AquiferCT.hpp:77
int inftableID
Definition: AquiferCT.hpp:69
bool operator==(const AQUCT_data &other) const
int aquiferID
Definition: AquiferCT.hpp:68
double phi_aq
Definition: AquiferCT.hpp:71
double r_o
Definition: AquiferCT.hpp:74
double C_t
Definition: AquiferCT.hpp:73
int pvttableID
Definition: AquiferCT.hpp:69
std::vector< double > td
Definition: AquiferCT.hpp:82
std::pair< bool, double > p0
Definition: AquiferCT.hpp:81
std::vector< double > pi
Definition: AquiferCT.hpp:82
double c1
Definition: AquiferCT.hpp:76
std::vector< int > cell_id
Definition: AquiferCT.hpp:83
AQUCT_data(const DeckRecord &record, const TableManager &tables)
AQUCT_data(int aqID, int infID, int pvtID, double phi_aq_, double d0_, double C_t_, double r_o_, double k_a_, double c1_, double h_, double theta_, double c2_, const std::pair< bool, double > &p0_, const std::vector< double > &td_, const std::vector< double > &pi_, const std::vector< int > &cell_id_)