All Classes Namespaces Files Functions Variables Typedefs Enumerator Pages
PolymerInflow.hpp
1 /*
2  Copyright 2012 SINTEF ICT, Applied Mathematics.
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 #ifndef OPM_POLYMERINFLOW_HEADER_INCLUDED
21 #define OPM_POLYMERINFLOW_HEADER_INCLUDED
22 
23 #include <opm/core/utility/SparseVector.hpp>
24 #include <opm/parser/eclipse/Deck/Deck.hpp>
25 #include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
26 #include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
27 #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
28 #include <opm/parser/eclipse/EclipseState/Schedule/WellPolymerProperties.hpp>
29 #include <vector>
30 #include <string>
31 #include <unordered_map>
32 
33 struct Wells;
34 
35 namespace Opm
36 {
39  {
40  public:
43 
49  virtual void getInflowValues(const double step_start,
50  const double step_end,
51  std::vector<double>& poly_inflow_c) const = 0;
52  };
53 
54 
55 
60  {
61  public:
66  PolymerInflowBasic(const double starttime,
67  const double endtime,
68  const double amount);
69 
75  virtual void getInflowValues(const double step_start,
76  const double step_end,
77  std::vector<double>& poly_inflow_c) const;
78  private:
79  double stime_;
80  double etime_;
81  double amount_;
82  };
83 
84 
89  {
90  public:
96  PolymerInflowFromDeck(const Opm::EclipseState& eclipseState,
97  const Wells& wells,
98  const int num_cells,
99  size_t currentStep);
100 
106  virtual void getInflowValues(const double /*step_start*/,
107  const double /*step_end*/,
108  std::vector<double>& poly_inflow_c) const;
109  private:
110  SparseVector<double> sparse_inflow_;
111 
112  std::unordered_map<std::string, double> wellPolymerRate_;
113  void setInflowValues(const Opm::EclipseState& eclipseState,
114  size_t currentStep);
115  };
116 
117 
118 } // namespace Opm
119 
120 
121 #endif // OPM_POLYMERINFLOW_HEADER_INCLUDED
Basic polymer injection behaviour class.
Definition: PolymerInflow.hpp:59
Polymer injection behaviour class using deck WPOLYMER.
Definition: PolymerInflow.hpp:88
PolymerInflowFromDeck(const Opm::EclipseState &eclipseState, const Wells &wells, const int num_cells, size_t currentStep)
Constructor.
Definition: PolymerInflow.cpp:102
virtual void getInflowValues(const double step_start, const double step_end, std::vector< double > &poly_inflow_c) const
Get inflow concentrations for all cells.
Definition: PolymerInflow.cpp:51
Interface for classes encapsulating polymer inflow information.
Definition: PolymerInflow.hpp:38
virtual ~PolymerInflowInterface()
Virtual destructor for subclassing.
Definition: PolymerInflow.hpp:42
PolymerInflowBasic(const double starttime, const double endtime, const double amount)
Constructor.
Definition: PolymerInflow.cpp:44
virtual void getInflowValues(const double, const double, std::vector< double > &poly_inflow_c) const
Get inflow concentrations for all cells.
Definition: PolymerInflow.cpp:142
virtual void getInflowValues(const double step_start, const double step_end, std::vector< double > &poly_inflow_c) const =0
Get inflow concentrations for all cells.