My Project
Loading...
Searching...
No Matches
FractionCalculator.hpp
1/*
2 Copyright 2019 Norce.
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
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20
21#ifndef OPM_FRACTION_CALCULATOR_HEADER_INCLUDED
22#define OPM_FRACTION_CALCULATOR_HEADER_INCLUDED
23
24#include <opm/input/eclipse/Schedule/Group/GuideRate.hpp>
25
26#include <string>
27
28namespace Opm {
29class GroupState;
30struct PhaseUsage;
31class Schedule;
32class WellState;
33}
34
35namespace Opm::WellGroupHelpers {
36
38{
39public:
40 FractionCalculator(const Schedule& schedule,
41 const WellState& well_state,
42 const GroupState& group_state,
43 const int report_step,
44 const GuideRate* guide_rate,
45 const GuideRateModel::Target target,
46 const PhaseUsage& pu,
47 const bool is_producer,
48 const Phase injection_phase);
49 double fraction(const std::string& name,
50 const std::string& control_group_name,
51 const bool always_include_this);
52 double localFraction(const std::string& name,
53 const std::string& always_included_child);
54
55private:
56 std::string parent(const std::string& name);
57 double guideRateSum(const Group& group,
58 const std::string& always_included_child);
59 double guideRate(const std::string& name,
60 const std::string& always_included_child);
61 int groupControlledWells(const std::string& group_name,
62 const std::string& always_included_child);
63 GuideRate::RateVector getGroupRateVector(const std::string& group_name);
64 const Schedule& schedule_;
65 const WellState& well_state_;
66 const GroupState& group_state_;
67 int report_step_;
68 const GuideRate* guide_rate_;
69 GuideRateModel::Target target_;
70 const PhaseUsage& pu_;
71 bool is_producer_;
72 Phase injection_phase_;
73};
74
75} // namespace Opm::WellGroupHelpers
76
77#endif // OPM_FRACTION_CALCULATOR_HEADER_INCLUDED
Definition GroupState.hpp:34
Definition FractionCalculator.hpp:38
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition WellState.hpp:61
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27
Definition BlackoilPhases.hpp:46