WellAssemble.hpp
Go to the documentation of this file.
1/*
2 Copyright 2017 SINTEF Digital, Mathematics and Cybernetics.
3 Copyright 2017 Statoil ASA.
4 Copyright 2017 IRIS
5 Copyright 2019 Norce
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
24#ifndef OPM_WELL_ASSEMBLE_HEADER_INCLUDED
25#define OPM_WELL_ASSEMBLE_HEADER_INCLUDED
26
28
29#include <opm/input/eclipse/Schedule/ScheduleTypes.hpp>
30#include <opm/input/eclipse/Schedule/Well/WellEnums.hpp>
31
32#include <functional>
33
34namespace Opm
35{
36
37class DeferredLogger;
38class Group;
39template<class Scalar> class GroupState;
40class Schedule;
41class SummaryState;
42template<class FluidSystem> class WellInterfaceFluidSystem;
43template<class Scalar> class WellState;
44struct WellInjectionControls;
45struct WellProductionControls;
46
47template<class FluidSystem>
49 static constexpr int Water = BlackoilPhases::Aqua;
50 static constexpr int Oil = BlackoilPhases::Liquid;
51 static constexpr int Gas = BlackoilPhases::Vapour;
52 using Scalar = typename FluidSystem::Scalar;
53
54public:
56
57 template<class EvalWell>
59 const GroupState<Scalar>& group_state,
60 const Schedule& schedule,
61 const SummaryState& summaryState,
62 const WellProductionControls& controls,
63 const EvalWell& bhp,
64 const std::vector<EvalWell>& rates, // Always 3 canonical rates.
65 const std::function<EvalWell()>& bhp_from_thp,
66 EvalWell& control_eq,
67 DeferredLogger& deferred_logger) const;
68
69 template<class EvalWell>
71 const GroupState<Scalar>& group_state,
72 const Schedule& schedule,
73 const SummaryState& summaryState,
74 const WellInjectionControls& controls,
75 const EvalWell& bhp,
76 const EvalWell& injection_rate,
77 const std::function<EvalWell()>& bhp_from_thp,
78 EvalWell& control_eq,
79 DeferredLogger& deferred_logger) const;
80
81private:
83};
84
85
86
87}
88
89#endif // OPM_WELL_ASSEMBLE_HEADER_INCLUDED
@ Liquid
Definition: BlackoilPhases.hpp:42
@ Aqua
Definition: BlackoilPhases.hpp:42
@ Vapour
Definition: BlackoilPhases.hpp:42
Definition: DeferredLogger.hpp:57
Definition: GroupState.hpp:35
Definition: WellAssemble.hpp:48
WellAssemble(const WellInterfaceFluidSystem< FluidSystem > &well)
void assembleControlEqProd(const WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, const WellProductionControls &controls, const EvalWell &bhp, const std::vector< EvalWell > &rates, const std::function< EvalWell()> &bhp_from_thp, EvalWell &control_eq, DeferredLogger &deferred_logger) const
void assembleControlEqInj(const WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, const WellInjectionControls &controls, const EvalWell &bhp, const EvalWell &injection_rate, const std::function< EvalWell()> &bhp_from_thp, EvalWell &control_eq, DeferredLogger &deferred_logger) const
Definition: WellInterfaceFluidSystem.hpp:47
Definition: WellState.hpp:62
VFPEvaluation bhp(const VFPProdTable &table, const double aqua, const double liquid, const double vapour, const double thp, const double alq, const double explicit_wfr, const double explicit_gfr, const bool use_vfpexplicit)
Definition: BlackoilPhases.hpp:27