My Project
Loading...
Searching...
No Matches
EclipseIO.hpp
1/*
2 Copyright (c) 2013 Andreas Lauser
3 Copyright (c) 2013 Uni Research AS
4 Copyright (c) 2014 IRIS AS
5
6 This file is part of the Open Porous Media project (OPM).
7
8 OPM is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 OPM is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with OPM. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#ifndef OPM_ECLIPSE_WRITER_HPP
23#define OPM_ECLIPSE_WRITER_HPP
24
25#include <opm/input/eclipse/EclipseState/Grid/NNC.hpp>
26
27#include <opm/output/data/Solution.hpp>
28#include <opm/output/eclipse/RestartValue.hpp>
29
30#include <map>
31#include <memory>
32#include <optional>
33#include <string>
34#include <vector>
35
36namespace Opm {
37
38class EclipseGrid;
39class EclipseState;
40class RestartKey;
41class Schedule;
42class SummaryConfig;
43class SummaryState;
44class UDQState;
45class WellTestState;
46
47} // namespace Opm
48
49namespace Opm { namespace Action {
50 class State;
51}} // namespace Opm::Action
52
53namespace Opm { namespace out {
54 class Summary;
55}} // namespace Opm::out
56
57namespace Opm {
61{
62public:
65 EclipseIO(const EclipseState& es,
66 EclipseGrid grid,
67 const Schedule& schedule,
68 const SummaryConfig& summary_config,
69 const std::string& basename = "",
70 const bool writeEsmry = false);
71
72 EclipseIO(const EclipseIO&) = delete;
73
74 ~EclipseIO();
75
115 std::map<std::string, std::vector<int>> int_data = {},
116 const std::vector<NNCdata>& nnc = {});
117
125 void overwriteInitialOIP(const data::Solution& simProps);
126
143 void writeTimeStep(const Action::State& action_state,
144 const WellTestState& wtest_state,
145 const SummaryState& st,
146 const UDQState& udq_state,
147 int report_step,
148 bool isSubstep,
149 double seconds_elapsed,
150 RestartValue value,
151 const bool write_double = false,
152 std::optional<int> time_step = std::nullopt);
153
185 SummaryState& summary_state,
186 const std::vector<RestartKey>& solution_keys,
187 const std::vector<RestartKey>& extra_keys = {}) const;
188
209 data::Solution loadRestartSolution(const std::vector<RestartKey>& solution_keys,
210 const int report_step) const;
211
212 const out::Summary& summary() const;
213 const SummaryConfig& finalSummaryConfig() const;
214
215private:
216 class Impl;
217 std::unique_ptr<Impl> impl;
218};
219
220} // namespace Opm
221
222
223#endif // OPM_ECLIPSE_WRITER_HPP
Management information about the current run's ACTION system, especially concerning the number of tim...
Definition State.hpp:51
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition EclipseGrid.hpp:62
A class to write reservoir and well states of a blackoil simulation to disk.
Definition EclipseIO.hpp:61
RestartValue loadRestart(Action::State &action_state, SummaryState &summary_state, const std::vector< RestartKey > &solution_keys, const std::vector< RestartKey > &extra_keys={}) const
Will load solution data and wellstate from the restart file.
Definition EclipseIO.cpp:579
void overwriteInitialOIP(const data::Solution &simProps)
Overwrite the initial OIP values.
void writeInitial(data::Solution simProps=data::Solution(), std::map< std::string, std::vector< int > > int_data={}, const std::vector< NNCdata > &nnc={})
Output static properties in EGRID and INIT file.
Definition EclipseIO.cpp:515
data::Solution loadRestartSolution(const std::vector< RestartKey > &solution_keys, const int report_step) const
Will load solution data from the restart file.
Definition EclipseIO.cpp:589
void writeTimeStep(const Action::State &action_state, const WellTestState &wtest_state, const SummaryState &st, const UDQState &udq_state, int report_step, bool isSubstep, double seconds_elapsed, RestartValue value, const bool write_double=false, std::optional< int > time_step=std::nullopt)
Write a reservoir state and summary information to disk.
Definition EclipseIO.cpp:526
Definition EclipseState.hpp:63
Definition RestartValue.hpp:72
Definition Schedule.hpp:101
Definition SummaryConfig.hpp:133
Definition SummaryState.hpp:72
Definition UDQState.hpp:40
Definition WellTestState.hpp:65
Definition Solution.hpp:35
Definition Summary.hpp:52
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30