My Project
Loading...
Searching...
No Matches
SegmentState.hpp
1/*
2 Copyright Equinor ASA 2021, 2022.
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_SEGMENTSTATE_HEADER_INCLUDED
21#define OPM_SEGMENTSTATE_HEADER_INCLUDED
22
23#include <cstddef>
24#include <vector>
25
26namespace Opm
27{
28class WellSegments;
29} // namespace Opm
30
31namespace Opm
32{
33
35{
36public:
37 SegmentState() = default;
38 SegmentState(int num_phases, const WellSegments& segments);
39
40 static SegmentState serializationTestObject();
41
42 double pressure_drop(std::size_t index) const;
43 bool empty() const;
44 void scale_pressure(double bhp);
45
46 const std::vector<int>& segment_number() const;
47 std::size_t size() const;
48
49 template<class Serializer>
50 void serializeOp(Serializer& serializer)
51 {
52 serializer(rates);
53 serializer(dissolved_gas_rate);
54 serializer(vaporized_oil_rate);
60 serializer(pressure);
61 serializer(pressure_drop_friction);
62 serializer(pressure_drop_hydrostatic);
63 serializer(pressure_drop_accel);
64 serializer(m_segment_number);
65 }
66
67 bool operator==(const SegmentState&) const;
68
69 std::vector<double> rates;
70 std::vector<double> dissolved_gas_rate;
71 std::vector<double> vaporized_oil_rate;
72
74 std::vector<double> phase_resv_rates;
75
77 std::vector<double> phase_velocity;
78
80 std::vector<double> phase_holdup;
81
83 std::vector<double> phase_viscosity;
84
101 std::vector<double> phase_density;
102
103 std::vector<double> pressure;
104 std::vector<double> pressure_drop_friction;
105 std::vector<double> pressure_drop_hydrostatic;
106 std::vector<double> pressure_drop_accel;
107
108private:
109 std::vector<int> m_segment_number;
110};
111
112} // namepace Opm
113
114#endif // OPM_SEGMENTSTATE_HEADER_INCLUDED
Definition AquiferInterface.hpp:35
Definition SegmentState.hpp:35
std::vector< double > phase_holdup
Segment condition holdup fractions through segment (per phase)
Definition SegmentState.hpp:80
std::vector< double > phase_density
Segment condition phase densities.
Definition SegmentState.hpp:101
std::vector< double > phase_velocity
Segment condition flow velocity through segment (per phase)
Definition SegmentState.hpp:77
std::vector< double > phase_resv_rates
Segment condition volume flow rates through segment (per phase)
Definition SegmentState.hpp:74
std::vector< double > phase_viscosity
Segment condition phase viscosities.
Definition SegmentState.hpp:83
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27