opm-simulators
Toggle main menu visibility
Loading...
Searching...
No Matches
BlackoilWellModelGuideRates.hpp
1
/*
2
Copyright 2016 SINTEF ICT, Applied Mathematics.
3
Copyright 2016 - 2017 Statoil ASA.
4
Copyright 2017 Dr. Blatt - HPC-Simulation-Software & Services
5
Copyright 2016 - 2018 IRIS AS
6
7
This file is part of the Open Porous Media project (OPM).
8
9
OPM is free software: you can redistribute it and/or modify
10
it under the terms of the GNU General Public License as published by
11
the Free Software Foundation, either version 3 of the License, or
12
(at your option) any later version.
13
14
OPM is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with OPM. If not, see <http://www.gnu.org/licenses/>.
21
*/
22
23
#ifndef OPM_BLACKOILWELLMODEL_GUIDE_RATES_HEADER_INCLUDED
24
#define OPM_BLACKOILWELLMODEL_GUIDE_RATES_HEADER_INCLUDED
25
26
#include <opm/input/eclipse/Schedule/Group/GuideRate.hpp>
27
28
#include <string>
29
#include <unordered_map>
30
31
namespace
Opm
{
32
33
template
<
typename
Scalar,
typename
IndexTraits>
class
BlackoilWellModelGeneric
;
34
namespace
data {
35
struct
GroupData;
36
struct
GroupGuideRates;
37
class
GuideRateValue;
38
class
Wells;
39
}
40
class
Group;
41
class
Well;
42
44
template
<
typename
Scalar,
typename
IndexTraits>
45
class
BlackoilWellModelGuideRates
46
{
47
public
:
49
explicit
BlackoilWellModelGuideRates
(
const
BlackoilWellModelGeneric<Scalar, IndexTraits>
& wellModel)
50
: wellModel_(wellModel)
51
{}
52
54
std::unordered_map<std::string, data::GuideRateValue>
55
calculateWellGuideRates
(
const
int
reportStepIdx)
const
;
56
58
void
assignWellGuideRates
(data::Wells& wsrpt,
59
const
int
reportStepIdx)
const
;
60
62
std::unordered_map<std::string, data::GroupGuideRates>
63
calculateAllGroupGuideRates
(
const
int
reportStepIdx)
const
;
64
66
void
assignGroupGuideRates
(
const
Group& group,
67
const
std::unordered_map<std::string, data::GroupGuideRates>& groupGuideRates,
68
data::GroupData& gdata)
const
;
69
71
bool
guideRateUpdateIsNeeded
(
const
int
reportStepIdx)
const
;
72
73
private
:
75
void
getGuideRateValues(
const
GuideRate::RateVector& qs,
76
const
bool
is_inj,
77
const
std::string& wgname,
78
data::GuideRateValue& grval)
const
;
79
81
data::GuideRateValue getGuideRateValues(
const
Well& well)
const
;
82
84
data::GuideRateValue getGuideRateValues(
const
Group& group)
const
;
85
87
data::GuideRateValue getGuideRateInjectionGroupValues(
const
Group& group)
const
;
88
89
const
BlackoilWellModelGeneric<Scalar, IndexTraits>
& wellModel_;
90
};
91
92
93
}
// namespace Opm
94
95
#endif
Opm::BlackoilWellModelGeneric
Class for handling the blackoil well model.
Definition
BlackoilWellModelGeneric.hpp:95
Opm::BlackoilWellModelGuideRates::BlackoilWellModelGuideRates
BlackoilWellModelGuideRates(const BlackoilWellModelGeneric< Scalar, IndexTraits > &wellModel)
Constructor initializes reference to the well model.
Definition
BlackoilWellModelGuideRates.hpp:49
Opm::BlackoilWellModelGuideRates::guideRateUpdateIsNeeded
bool guideRateUpdateIsNeeded(const int reportStepIdx) const
Check if a guide rate update is needed.
Definition
BlackoilWellModelGuideRates.cpp:591
Opm::BlackoilWellModelGuideRates::calculateWellGuideRates
std::unordered_map< std::string, data::GuideRateValue > calculateWellGuideRates(const int reportStepIdx) const
Calculate guide rate values for all wells.
Definition
BlackoilWellModelGuideRates.cpp:395
Opm::BlackoilWellModelGuideRates::assignGroupGuideRates
void assignGroupGuideRates(const Group &group, const std::unordered_map< std::string, data::GroupGuideRates > &groupGuideRates, data::GroupData &gdata) const
Assign group guide rates.
Definition
BlackoilWellModelGuideRates.cpp:563
Opm::BlackoilWellModelGuideRates::calculateAllGroupGuideRates
std::unordered_map< std::string, data::GroupGuideRates > calculateAllGroupGuideRates(const int reportStepIdx) const
Calculates guide rate for all groups.
Definition
BlackoilWellModelGuideRates.cpp:503
Opm::BlackoilWellModelGuideRates::assignWellGuideRates
void assignWellGuideRates(data::Wells &wsrpt, const int reportStepIdx) const
Assign well guide rates.
Definition
BlackoilWellModelGuideRates.cpp:481
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition
blackoilbioeffectsmodules.hh:43
opm
simulators
wells
BlackoilWellModelGuideRates.hpp
Generated by
1.17.0