opm-common
Toggle main menu visibility
Loading...
Searching...
No Matches
network.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 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_NETWORK_HPP
21
#define RST_NETWORK_HPP
22
23
#include <memory>
24
#include <optional>
25
#include <string>
26
#include <vector>
27
28
namespace
Opm
{
29
class
UnitSystem
;
30
}
// namespace Opm
31
32
namespace
Opm
{
namespace
EclIO {
33
class
RestartFileView
;
34
}}
// namespace Opm::EclIO
35
36
namespace
Opm
{
namespace
RestartIO {
37
38
class
RstNetwork
39
{
40
public
:
42
struct
Branch
43
{
45
int
down
{-1};
46
48
int
up
{-1};
49
51
int
vfp
{-1};
52
};
53
55
struct
Node
56
{
58
std::string
name
{};
59
61
std::optional<double>
terminal_pressure
{};
62
66
std::optional<std::string>
as_choke
{};
67
69
double
pressure
{};
70
};
71
72
explicit
RstNetwork
(std::shared_ptr<EclIO::RestartFileView> rstView,
73
const
UnitSystem
& usys);
74
75
bool
isActive()
const
;
76
77
const
std::vector<Branch>& branches()
const
78
{
79
return
this->branches_;
80
}
81
82
const
std::vector<Node>& nodes()
const
83
{
84
return
this->nodes_;
85
}
86
87
private
:
88
std::vector<Branch> branches_{};
89
std::vector<Node> nodes_{};
90
};
91
92
}}
// namespace Opm::RestartIO
93
94
#endif
// RST_NETWORK_HPP
Opm::EclIO::RestartFileView
Definition
RestartFileView.hpp:35
Opm::RestartIO::RstNetwork
Definition
network.hpp:39
Opm::UnitSystem
Definition
UnitSystem.hpp:34
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition
Exceptions.hpp:30
Opm::RestartIO::RstNetwork::Branch
Single branch in extended network model.
Definition
network.hpp:43
Opm::RestartIO::RstNetwork::Branch::down
int down
Downtree node. Index into 'nodes' array.
Definition
network.hpp:45
Opm::RestartIO::RstNetwork::Branch::up
int up
Uptree node. Index into 'nodes' array.
Definition
network.hpp:48
Opm::RestartIO::RstNetwork::Branch::vfp
int vfp
One-based VFP table ID.
Definition
network.hpp:51
Opm::RestartIO::RstNetwork::Node
Single node in extended network model.
Definition
network.hpp:56
Opm::RestartIO::RstNetwork::Node::pressure
double pressure
Node pressure.
Definition
network.hpp:69
Opm::RestartIO::RstNetwork::Node::as_choke
std::optional< std::string > as_choke
Group whose rate target the choking mechanism attempts to match.
Definition
network.hpp:66
Opm::RestartIO::RstNetwork::Node::terminal_pressure
std::optional< double > terminal_pressure
Fixed pressure for terminal node. Nullopt if not terminal.
Definition
network.hpp:61
Opm::RestartIO::RstNetwork::Node::name
std::string name
Name of network node.
Definition
network.hpp:58
opm
io
eclipse
rst
network.hpp
Generated by
1.17.0