My Project
Loading...
Searching...
No Matches
state.hpp
1/*
2 Copyright 2020 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 it under the
7 terms of the GNU General Public License as published by the Free Software
8 Foundation, either version 3 of the License, or (at your option) any later
9 version.
10
11 OPM is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 details.
15
16 You should have received a copy of the GNU General Public License along
17 with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef RST_STATE
21#define RST_STATE
22
23#include <opm/io/eclipse/rst/action.hpp>
24#include <opm/io/eclipse/rst/aquifer.hpp>
25#include <opm/io/eclipse/rst/group.hpp>
26#include <opm/io/eclipse/rst/header.hpp>
27#include <opm/io/eclipse/rst/netbalan.hpp>
28#include <opm/io/eclipse/rst/network.hpp>
29#include <opm/io/eclipse/rst/udq.hpp>
30#include <opm/io/eclipse/rst/well.hpp>
31
32#include <opm/input/eclipse/Schedule/OilVaporizationProperties.hpp>
33#include <opm/input/eclipse/Schedule/Tuning.hpp>
34
35#include <opm/input/eclipse/Units/UnitSystem.hpp>
36
37#include <memory>
38#include <string>
39#include <unordered_map>
40#include <vector>
41
42namespace Opm {
43 class EclipseGrid;
44 class Parser;
45 class Runspec;
46} // namespace Opm
47
48namespace Opm { namespace EclIO {
49 class RestartFileView;
50}} // namespace Opm::EclIO
51
52namespace Opm { namespace RestartIO {
53
55{
56 RstState(std::shared_ptr<EclIO::RestartFileView> rstView,
57 const Runspec& runspec,
58 const ::Opm::EclipseGrid* grid);
59
60 static RstState load(std::shared_ptr<EclIO::RestartFileView> rstView,
61 const Runspec& runspec,
62 const Parser& parser,
63 const ::Opm::EclipseGrid* grid = nullptr);
64
65 const RstWell& get_well(const std::string& wname) const;
66
67 ::Opm::UnitSystem unit_system;
68 RstHeader header;
69 RstAquifer aquifers;
70 RstNetbalan netbalan;
71 RstNetwork network;
72 std::vector<RstWell> wells;
73 std::vector<RstGroup> groups;
74 std::vector<RstUDQ> udqs;
75 RstUDQActive udq_active;
76 std::vector<RstAction> actions;
77 Tuning tuning;
79 std::unordered_map<std::string, std::vector<std::string>> wlists;
80
81private:
82 void load_oil_vaporization(const std::vector<int>& intehead,
83 const std::vector<double>& doubhead);
84
85 void load_tuning(const std::vector<int>& intehead,
86 const std::vector<double>& doubhead);
87
88 void add_groups(const std::vector<std::string>& zgrp,
89 const std::vector<int>& igrp,
90 const std::vector<float>& sgrp,
91 const std::vector<double>& xgrp);
92
93 void add_wells(const std::vector<std::string>& zwel,
94 const std::vector<int>& iwel,
95 const std::vector<float>& swel,
96 const std::vector<double>& xwel,
97 const std::vector<int>& icon,
98 const std::vector<float>& scon,
99 const std::vector<double>& xcon);
100
101 void add_msw(const std::vector<std::string>& zwel,
102 const std::vector<int>& iwel,
103 const std::vector<float>& swel,
104 const std::vector<double>& xwel,
105 const std::vector<int>& icon,
106 const std::vector<float>& scon,
107 const std::vector<double>& xcon,
108 const std::vector<int>& iseg,
109 const std::vector<double>& rseg);
110
111 void add_udqs(const std::vector<int>& iudq,
112 const std::vector<std::string>& zudn,
113 const std::vector<std::string>& zudl,
114 const std::vector<double>& dudw,
115 const std::vector<double>& dudg,
116 const std::vector<double>& dudf);
117
118 void add_actions(const Parser& parser,
119 const Runspec& runspec,
120 std::time_t sim_time,
121 const std::vector<std::string>& zact,
122 const std::vector<int>& iact,
123 const std::vector<float>& sact,
124 const std::vector<std::string>& zacn,
125 const std::vector<int>& iacn,
126 const std::vector<double>& sacn,
127 const std::vector<std::string>& zlact);
128
129 void add_wlist(const std::vector<std::string>& zwls,
130 const std::vector<int>& iwls);
131
132};
133
134}} // namespace Opm::RestartIO
135
136#endif
Definition OilVaporizationProperties.hpp:34
The hub of the parsing process.
Definition Parser.hpp:60
Definition aquifer.hpp:45
Definition netbalan.hpp:35
Definition network.hpp:39
Definition udq.hpp:88
Definition Runspec.hpp:480
Definition UnitSystem.hpp:34
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Definition header.hpp:33
Definition state.hpp:55
Definition well.hpp:43
Definition Tuning.hpp:48