ECLWellSolution.hpp
Go to the documentation of this file.
1/*
2 Copyright 2016 SINTEF ICT, Applied Mathematics.
3 Copyright 2016, 2017 Statoil ASA.
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_ECLWELLSOLUTION_HEADER_INCLUDED
22#define OPM_ECLWELLSOLUTION_HEADER_INCLUDED
23
24#include <array>
25#include <string>
26#include <utility>
27#include <vector>
28
29namespace Opm
30{
31
32 class ECLRestartData;
33
35 {
36 public:
40 explicit ECLWellSolution(const double rate_threshold = 1e-14,
41 const bool disallow_crossflow = true);
42
44 struct WellData
45 {
48
49 double qOs; // Well oil surface volume rate.
50 double qWs; // Well water surface volume rate.
51 double qGs; // Well gas surface volume rate.
52 double lrat; // Well liquid (oil + water) surface volume rate.
53 double bhp; // Well bottom hole pressure.
54 double qr; // Well total reservoir volume rate.
55
57 {
58 std::string gridName; // Empty for main grid, otherwise LGR grid.
59 std::array<int, 3> ijk; // Cartesian location in grid.
60 double reservoir_inflow_rate; // Total reservoir volume fluid rate in SI (m^3/s).
61 double qOs; // Completion oil surface volute rate.
62 double qWs; // Completion water surface volute rate.
63 double qGs; // Completion gas surface volute rate.
64
65 };
66 std::vector<Completion> completions;
67 };
68
73 std::vector<WellData> solution(const ECLRestartData& restart,
74 const std::vector<std::string>& grids) const;
75
76 private:
77 // Data members.
78 double rate_threshold_;
79 bool disallow_crossflow_;
80
81 // Methods.
82 std::vector<WellData> readWellData(const ECLRestartData& restart,
83 const std::string& gridName) const;
84 };
85
86
87} // namespace Opm
88
89#endif // OPM_ECLWELLSOLUTION_HEADER_INCLUDED
const char *const string
Definition: cJSON.h:170
Definition: ECLResultData.hpp:57
Definition: ECLWellSolution.hpp:35
std::vector< WellData > solution(const ECLRestartData &restart, const std::vector< std::string > &grids) const
ECLWellSolution(const double rate_threshold=1e-14, const bool disallow_crossflow=true)
Definition: A.hpp:4
static const double e
Definition: exprtk.hpp:758
Definition: ECLWellSolution.hpp:57
std::array< int, 3 > ijk
Definition: ECLWellSolution.hpp:59
double reservoir_inflow_rate
Definition: ECLWellSolution.hpp:60
double qOs
Definition: ECLWellSolution.hpp:61
double qWs
Definition: ECLWellSolution.hpp:62
std::string gridName
Definition: ECLWellSolution.hpp:58
double qGs
Definition: ECLWellSolution.hpp:63
Contains the well data extracted from the restart file.
Definition: ECLWellSolution.hpp:45
double lrat
Definition: ECLWellSolution.hpp:52
std::vector< Completion > completions
Definition: ECLWellSolution.hpp:66
std::string name
Definition: ECLWellSolution.hpp:46
double qGs
Definition: ECLWellSolution.hpp:51
bool is_injector_well
Definition: ECLWellSolution.hpp:47
double qWs
Definition: ECLWellSolution.hpp:50
double qr
Definition: ECLWellSolution.hpp:54
double qOs
Definition: ECLWellSolution.hpp:49
double bhp
Definition: ECLWellSolution.hpp:53