opm-simulators
StandardWellAssemble.hpp
1 /*
2  Copyright 2017 SINTEF Digital, Mathematics and Cybernetics.
3  Copyright 2017 Statoil ASA.
4  Copyright 2016 - 2017 IRIS AS.
5 
6  This file is part of the Open Porous Media project (OPM).
7 
8  OPM is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  OPM is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with OPM. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 
23 #ifndef OPM_STANDARDWELL_ASSEMBLE_HEADER_INCLUDED
24 #define OPM_STANDARDWELL_ASSEMBLE_HEADER_INCLUDED
25 
26 #include <opm/input/eclipse/Schedule/Well/Well.hpp>
27 
28 namespace Opm
29 {
30 
31 class DeferredLogger;
32 template<class Scalar> class GroupState;
33 class Schedule;
34 template<typename Scalar, typename IndexTraits, int numEq> class StandardWellEquations;
35 template<class FluidSystem, class Indices> class StandardWellPrimaryVariables;
36 class SummaryState;
37 template<class FluidSystem> class WellInterfaceFluidSystem;
38 template<typename Scalar, typename IndexTraits> class WellState;
39 template<typename Scalar, typename IndexTraits> class GroupStateHelper;
40 
42 template<class FluidSystem, class Indices>
44 {
45 public:
46  using Scalar = typename FluidSystem::Scalar;
48  using EvalWell = typename PrimaryVariables::EvalWell;
49  using IndexTraits = typename FluidSystem::IndexTraitsType;
52 
55  : well_(well)
56  {}
57 
59  void assembleControlEq(const GroupStateHelperType& groupStateHelper,
60  const Well::InjectionControls& inj_controls,
61  const Well::ProductionControls& prod_controls,
62  const PrimaryVariables& primary_variables,
63  const Scalar rho,
64  StandardWellEquationsType& eqns,
65  const bool stopped_or_zero_target) const;
66 
68  void assembleInjectivityEq(const EvalWell& eq_pskin,
69  const EvalWell& eq_wat_vel,
70  const int pskin_index,
71  const int wat_vel_index,
72  const int cell_idx,
73  const int numWellEq,
74  StandardWellEquationsType& eqns) const;
75 
77  void assemblePerforationEq(const EvalWell& cq_s_effective,
78  const int componentIdx,
79  const int cell_idx,
80  const int numWellEq,
81  StandardWellEquationsType& eqns) const;
82 
84  void assembleZFracEq(const EvalWell& cq_s_zfrac_effective,
85  const int cell_idx,
86  const int numWellEq,
87  StandardWellEquationsType& eqns) const;
88 
90  void assembleSourceEq(const EvalWell& resWell_loc,
91  const int componentIdx,
92  const int numWellEq,
93  StandardWellEquationsType& eqns) const;
94 
95 private:
97 };
98 
99 }
100 
101 #endif // OPM_STANDARDWELL_ASSEMBLE_HEADER_INCLUDED
Class handling assemble of the equation system for StandardWell.
Definition: StandardWellAssemble.hpp:43
Class holding primary variables for StandardWell.
Definition: StandardWellAssemble.hpp:35
void assembleZFracEq(const EvalWell &cq_s_zfrac_effective, const int cell_idx, const int numWellEq, StandardWellEquationsType &eqns) const
Assemble equation for Z fraction.
Definition: StandardWellAssemble.cpp:241
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
Definition: BlackoilWellModelConstraints.hpp:37
Definition: StandardWellAssemble.hpp:34
Definition: StandardWellAssemble.hpp:37
void assembleInjectivityEq(const EvalWell &eq_pskin, const EvalWell &eq_wat_vel, const int pskin_index, const int wat_vel_index, const int cell_idx, const int numWellEq, StandardWellEquationsType &eqns) const
Assemble injectivity equation.
Definition: StandardWellAssemble.cpp:178
void assembleControlEq(const GroupStateHelperType &groupStateHelper, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, const PrimaryVariables &primary_variables, const Scalar rho, StandardWellEquationsType &eqns, const bool stopped_or_zero_target) const
Assemble control equation.
Definition: StandardWellAssemble.cpp:87
DenseAd::DynamicEvaluation< Scalar, numStaticWellEq+Indices::numEq+1 > EvalWell
Evaluation for the well equations.
Definition: StandardWellPrimaryVariables.hpp:89
void assemblePerforationEq(const EvalWell &cq_s_effective, const int componentIdx, const int cell_idx, const int numWellEq, StandardWellEquationsType &eqns) const
Assemble equation for a perforation.
Definition: StandardWellAssemble.cpp:202
void assembleSourceEq(const EvalWell &resWell_loc, const int componentIdx, const int numWellEq, StandardWellEquationsType &eqns) const
Assemble a source term.
Definition: StandardWellAssemble.cpp:227
StandardWellAssemble(const WellInterfaceFluidSystem< FluidSystem > &well)
Constructor initializes reference to well.
Definition: StandardWellAssemble.hpp:54
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition: TemperatureModel.hpp:61