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#include <opm/simulators/wells/ConnFracStatistics.hpp>
25
26#include <cstddef>
27#include <vector>
28#include <array>
29
30namespace Opm {
31
32template<class Scalar>
34{
35private:
36 bool injector{false};
37
38public:
39 PerfData() = default;
40 PerfData(std::size_t num_perf,
42 bool injector_,
43 std::size_t num_phases);
44
45 static PerfData serializationTestObject();
46
47 std::size_t size() const;
48 bool empty() const;
49 bool try_assign(const PerfData& other);
50
55
56 template<class Serializer>
57 void serializeOp(Serializer& serializer)
58 {
59 serializer(injector);
60 serializer(pressure_first_connection);
61 serializer(pressure);
62 serializer(rates);
63 serializer(phase_rates);
64 serializer(phase_mixing_rates);
65 serializer(solvent_rates);
66 serializer(polymer_rates);
67 serializer(brine_rates);
68 serializer(prod_index);
69 serializer(micp_rates);
70 serializer(cell_index);
71 serializer(connection_transmissibility_factor);
72 serializer(connection_d_factor);
73 serializer(connection_compaction_tmult);
74 serializer(satnum_id);
75 serializer(ecl_index);
76 serializer(water_throughput);
77 serializer(skin_pressure);
78 serializer(water_velocity);
79 serializer(filtrate_data);
80 serializer(connFracStatistics);
81 }
82
83 bool operator==(const PerfData&) const;
84
85 // Note to maintainers: If you make changes to this list of data
86 // members, then please update the constructor, operator==(),
87 // serializationTestObject(), and serializeOp() accordingly. Moreover,
88 // if you're adding a new member representing a dynamically calculated
89 // result, e.g., a flow rate, then please update try_assign() as well.
90
91 Scalar pressure_first_connection{};
92 std::vector<Scalar> pressure{};
93 std::vector<Scalar> rates{};
94 std::vector<Scalar> phase_rates{};
95 std::vector<std::array<Scalar,4>> phase_mixing_rates{};
96 std::vector<Scalar> solvent_rates{};
97 std::vector<Scalar> polymer_rates{};
98 std::vector<Scalar> brine_rates{};
99 std::vector<Scalar> prod_index{};
100 std::vector<Scalar> micp_rates{};
101 std::vector<std::size_t> cell_index{};
102 std::vector<Scalar> connection_transmissibility_factor{};
103 std::vector<Scalar> connection_d_factor{};
104 std::vector<Scalar> connection_compaction_tmult{};
105 std::vector<int> satnum_id{};
106 std::vector<std::size_t> ecl_index{};
107
108 // The water_throughput, skin_pressure and water_velocity variables are
109 // only used for injectors to check the injectivity.
110 std::vector<Scalar> water_throughput{};
111 std::vector<Scalar> skin_pressure{};
112 std::vector<Scalar> water_velocity{};
113
114 ConnFiltrateData<Scalar> filtrate_data{};
115 std::vector<ConnFracStatistics<Scalar>> connFracStatistics{};
116};
117
118} // namespace Opm
119
120#endif // OPM_PERFDATA_HEADER_INCLUDED
Definition PerfData.hpp:34
void prepareInjectorContainers()
Make containers valid for injectors.
Definition PerfData.cpp:59
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
Definition ConnFiltrateData.hpp:29