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 <opm/simulators/wells/ConnFiltrateData.hpp>
25
26#include <cstddef>
27#include <vector>
28
29namespace Opm {
30
32{
33private:
34 bool injector;
35
36public:
37 PerfData() = default;
38 PerfData(std::size_t num_perf, double pressure_first_connection_, bool injector_, std::size_t num_phases);
39
40 static PerfData serializationTestObject();
41
42 std::size_t size() const;
43 bool empty() const;
44 bool try_assign(const PerfData& other);
45
46 template<class Serializer>
47 void serializeOp(Serializer& serializer)
48 {
49 serializer(pressure_first_connection);
50 serializer(pressure);
51 serializer(rates);
52 serializer(phase_rates);
53 serializer(solvent_rates);
54 serializer(polymer_rates);
55 serializer(brine_rates);
56 serializer(prod_index);
57 serializer(micp_rates);
58 serializer(cell_index);
59 serializer(connection_transmissibility_factor);
60 serializer(satnum_id);
61 serializer(ecl_index);
62 serializer(water_throughput);
63 serializer(skin_pressure);
64 serializer(water_velocity);
65 serializer(filtrate_data);
66 }
67
68 bool operator==(const PerfData&) const;
69
70 double pressure_first_connection{};
71 std::vector<double> pressure;
72 std::vector<double> rates;
73 std::vector<double> phase_rates;
74 std::vector<double> solvent_rates;
75 std::vector<double> polymer_rates;
76 std::vector<double> brine_rates;
77 std::vector<double> prod_index;
78 std::vector<double> micp_rates;
79 std::vector<std::size_t> cell_index;
80 std::vector<double> connection_transmissibility_factor;
81 std::vector<int> satnum_id;
82 std::vector<std::size_t> ecl_index;
83
84 // The water_throughput, skin_pressure and water_velocity variables are only
85 // used for injectors to check the injectivity.
86 std::vector<double> water_throughput;
87 std::vector<double> skin_pressure;
88 std::vector<double> water_velocity;
89
90 ConnFiltrateData filtrate_data;
91};
92
93} // namespace Opm
94
95#endif // OPM_PERFORATIONDATA_HEADER_INCLUDED
Definition AquiferInterface.hpp:35
Definition PerfData.hpp:32
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27
Definition ConnFiltrateData.hpp:27