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
27#include <opm/input/eclipse/Schedule/ScheduleTypes.hpp>
28#include <opm/input/eclipse/Schedule/Well/WellEnums.hpp>
29
30#include <functional>
31
32namespace Opm
33{
34
35class DeferredLogger;
36class Group;
37template<class Scalar> class GroupState;
38class Schedule;
39class SummaryState;
40template<typename FluidSystem> class WellInterfaceFluidSystem;
41template<typename Scalar, typename IndexTraits> class WellState;
42template<typename Scalar, typename IndexTraits> class GroupStateHelper;
43struct WellInjectionControls;
44struct WellProductionControls;
45
46template<typename FluidSystem>
48 static constexpr int Water = FluidSystem::waterPhaseIdx;
49 static constexpr int Oil = FluidSystem::oilPhaseIdx;
50 static constexpr int Gas = FluidSystem::gasPhaseIdx;
51 using Scalar = typename FluidSystem::Scalar;
52 using IndexTraits = typename FluidSystem::IndexTraitsType;
54
55public:
57
58 template<class EvalWell>
59 void assembleControlEqProd(const GroupStateHelperType& groupStateHelper,
60 const WellProductionControls& controls,
61 const EvalWell& bhp,
62 const std::vector<EvalWell>& rates, // Always 3 canonical rates.
63 const std::function<EvalWell()>& bhp_from_thp,
64 EvalWell& control_eq,
65 DeferredLogger& deferred_logger) const;
66
67 template<class EvalWell>
68 void assembleControlEqInj(const GroupStateHelperType& groupStateHelper,
69 const WellInjectionControls& controls,
70 const EvalWell& bhp,
71 const EvalWell& injection_rate,
72 const std::function<EvalWell()>& bhp_from_thp,
73 EvalWell& control_eq,
74 DeferredLogger& deferred_logger) const;
75
76private:
78};
79
80
81
82}
83
84#endif // OPM_WELL_ASSEMBLE_HEADER_INCLUDED
Definition: DeferredLogger.hpp:57
Definition: GroupStateHelper.hpp:53
Definition: WellAssemble.hpp:47
WellAssemble(const WellInterfaceFluidSystem< FluidSystem > &well)
void assembleControlEqInj(const GroupStateHelperType &groupStateHelper, const WellInjectionControls &controls, const EvalWell &bhp, const EvalWell &injection_rate, const std::function< EvalWell()> &bhp_from_thp, EvalWell &control_eq, DeferredLogger &deferred_logger) const
void assembleControlEqProd(const GroupStateHelperType &groupStateHelper, 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
Definition: WellInterfaceFluidSystem.hpp:50
Definition: blackoilbioeffectsmodules.hh:43