My Project
Loading...
Searching...
No Matches
PerfData.hpp
1/*
2 Copyright 2021 Equinor ASA.
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_PERFDATA_HEADER_INCLUDED
21#define OPM_PERFDATA_HEADER_INCLUDED
22
23#include <opm/simulators/wells/ConnFiltrateData.hpp>
24
25#include <cstddef>
26#include <vector>
27#include <array>
28
29namespace Opm {
30
32{
33private:
34 bool injector;
35
36public:
37 PerfData() = default;
38 PerfData(std::size_t num_perf,
39 double pressure_first_connection_,
40 bool injector_,
41 std::size_t num_phases);
42
43 static PerfData serializationTestObject();
44
45 std::size_t size() const;
46 bool empty() const;
47 bool try_assign(const PerfData& other);
48
49 template<class Serializer>
50 void serializeOp(Serializer& serializer)
51 {
52 serializer(pressure_first_connection);
53 serializer(pressure);
54 serializer(rates);
55 serializer(phase_rates);
56 serializer(phase_mixing_rates);
57 serializer(solvent_rates);
58 serializer(polymer_rates);
59 serializer(brine_rates);
60 serializer(prod_index);
61 serializer(micp_rates);
62 serializer(cell_index);
63 serializer(connection_transmissibility_factor);
64 serializer(connection_d_factor);
65 serializer(connection_compaction_tmult);
66 serializer(satnum_id);
67 serializer(ecl_index);
68 serializer(water_throughput);
69 serializer(skin_pressure);
70 serializer(water_velocity);
71 serializer(filtrate_data);
72 }
73
74 bool operator==(const PerfData&) const;
75
76 // Note to maintainers: If you make changes to this list of data
77 // members, then please update the constructor, operator==(),
78 // serializationTestObject(), and serializeOp() accordingly. Moreover,
79 // if you're adding a new member representing a dynamically calculated
80 // result, e.g., a flow rate, then please update try_assign() as well.
81
82 double pressure_first_connection{};
83 std::vector<double> pressure{};
84 std::vector<double> rates{};
85 std::vector<double> phase_rates{};
86 std::vector<std::array<double,4>> phase_mixing_rates{};
87 std::vector<double> solvent_rates{};
88 std::vector<double> polymer_rates{};
89 std::vector<double> brine_rates{};
90 std::vector<double> prod_index{};
91 std::vector<double> micp_rates{};
92 std::vector<std::size_t> cell_index{};
93 std::vector<double> connection_transmissibility_factor{};
94 std::vector<double> connection_d_factor{};
95 std::vector<double> connection_compaction_tmult{};
96 std::vector<int> satnum_id{};
97 std::vector<std::size_t> ecl_index{};
98
99 // The water_throughput, skin_pressure and water_velocity variables are
100 // only used for injectors to check the injectivity.
101 std::vector<double> water_throughput{};
102 std::vector<double> skin_pressure{};
103 std::vector<double> water_velocity{};
104
105 ConnFiltrateData filtrate_data{};
106};
107
108} // namespace Opm
109
110#endif // OPM_PERFDATA_HEADER_INCLUDED
Definition PerfData.hpp:32
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27
Definition ConnFiltrateData.hpp:27