BlackoilWellModelGuideRates.hpp
Go to the documentation of this file.
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
31namespace Opm {
32
33template<class Scalar> class BlackoilWellModelGeneric;
34namespace data {
35struct GroupData;
36struct GroupGuideRates;
37class GuideRateValue;
38class Wells;
39}
40class Group;
41class Well;
42
44template<class Scalar>
46{
47public:
50 : wellModel_(wellModel)
51 {}
52
54 void assignWellGuideRates(data::Wells& wsrpt,
55 const int reportStepIdx) const;
56
58 std::unordered_map<std::string, data::GroupGuideRates>
59 calculateAllGroupGuideRates(const int reportStepIdx) const;
60
62 void assignGroupGuideRates(const Group& group,
63 const std::unordered_map<std::string, data::GroupGuideRates>& groupGuideRates,
64 data::GroupData& gdata) const;
65
67 bool guideRateUpdateIsNeeded(const int reportStepIdx) const;
68
69private:
71 void getGuideRateValues(const GuideRate::RateVector& qs,
72 const bool is_inj,
73 const std::string& wgname,
74 data::GuideRateValue& grval) const;
75
77 data::GuideRateValue getGuideRateValues(const Well& well) const;
78
80 data::GuideRateValue getGuideRateValues(const Group& group) const;
81
83 data::GuideRateValue getGuideRateInjectionGroupValues(const Group& group) const;
84
85 const BlackoilWellModelGeneric<Scalar>& wellModel_;
86};
87
88
89} // namespace Opm
90
91#endif
Class for handling the blackoil well model.
Definition: BlackoilWellModelGeneric.hpp:83
Class for handling the guide rates in the blackoil well model.
Definition: BlackoilWellModelGuideRates.hpp:46
bool guideRateUpdateIsNeeded(const int reportStepIdx) const
Check if a guide rate update is needed.
std::unordered_map< std::string, data::GroupGuideRates > calculateAllGroupGuideRates(const int reportStepIdx) const
Calculates guide rate for all groups.
void assignWellGuideRates(data::Wells &wsrpt, const int reportStepIdx) const
Assign well guide rates.
void assignGroupGuideRates(const Group &group, const std::unordered_map< std::string, data::GroupGuideRates > &groupGuideRates, data::GroupData &gdata) const
Assign group guide rates.
BlackoilWellModelGuideRates(const BlackoilWellModelGeneric< Scalar > &wellModel)
Constructor initializes reference to the well model.
Definition: BlackoilWellModelGuideRates.hpp:49
Definition: BlackoilPhases.hpp:27