My Project
Loading...
Searching...
No Matches
PerfData.hpp
1/*
2 Copyright 2021 Equinor ASA.
3
4
5 This file is part of the Open Porous Media project (OPM).
6
7 OPM is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 OPM is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with OPM. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef OPM_PERFDATA_HEADER_INCLUDED
22#define OPM_PERFDATA_HEADER_INCLUDED
23
24#include <cstddef>
25#include <vector>
26
27namespace Opm {
28
30{
31private:
32 bool injector;
33
34public:
35 PerfData() = default;
36 PerfData(std::size_t num_perf, double pressure_first_connection_, bool injector_, std::size_t num_phases);
37
38 static PerfData serializationTestObject();
39
40 std::size_t size() const;
41 bool empty() const;
42 bool try_assign(const PerfData& other);
43
44 template<class Serializer>
45 void serializeOp(Serializer& serializer)
46 {
47 serializer(pressure_first_connection);
48 serializer(pressure);
49 serializer(rates);
50 serializer(phase_rates);
51 serializer(solvent_rates);
52 serializer(polymer_rates);
53 serializer(brine_rates);
54 serializer(prod_index);
55 serializer(micp_rates);
56 serializer(cell_index);
57 serializer(connection_transmissibility_factor);
58 serializer(satnum_id);
59 serializer(ecl_index);
60 serializer(water_throughput);
61 serializer(skin_pressure);
62 serializer(water_velocity);
63 }
64
65 bool operator==(const PerfData&) const;
66
67 double pressure_first_connection{};
68 std::vector<double> pressure;
69 std::vector<double> rates;
70 std::vector<double> phase_rates;
71 std::vector<double> solvent_rates;
72 std::vector<double> polymer_rates;
73 std::vector<double> brine_rates;
74 std::vector<double> prod_index;
75 std::vector<double> micp_rates;
76
77 std::vector<std::size_t> cell_index;
78 std::vector<double> connection_transmissibility_factor;
79 std::vector<int> satnum_id;
80 std::vector<std::size_t> ecl_index;
81
82 // The water_throughput, skin_pressure and water_velocity variables are only
83 // used for injectors to check the injectivity.
84 std::vector<double> water_throughput;
85 std::vector<double> skin_pressure;
86 std::vector<double> water_velocity;
87};
88
89} // namespace Opm
90
91#endif // OPM_PERFORATIONDATA_HEADER_INCLUDED
Definition AquiferInterface.hpp:35
Definition PerfData.hpp:30
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27