PolymerInflow.hpp
Go to the documentation of this file.
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:
95  PolymerInflowFromDeck(Opm::DeckConstPtr deck,
96  const Wells& wells,
97  const int num_cells);
98 
104  PolymerInflowFromDeck(Opm::DeckConstPtr deck,
105  Opm::EclipseStateConstPtr eclipseState,
106  const Wells& wells,
107  const int num_cells,
108  size_t currentStep);
109 
115  virtual void getInflowValues(const double /*step_start*/,
116  const double /*step_end*/,
117  std::vector<double>& poly_inflow_c) const;
118  private:
119  SparseVector<double> sparse_inflow_;
120 
121  std::unordered_map<std::string, double> wellPolymerRate_;
122  void setInflowValues(Opm::DeckConstPtr deck,
123  Opm::EclipseStateConstPtr eclipseState,
124  size_t currentStep);
125  };
126 
127 
128 } // namespace Opm
129 
130 
131 #endif // OPM_POLYMERINFLOW_HEADER_INCLUDED
Definition: CompressibleTpfaPolymer.hpp:32
virtual void getInflowValues(const double step_start, const double step_end, std::vector< double > &poly_inflow_c) const
virtual void getInflowValues(const double step_start, const double step_end, std::vector< double > &poly_inflow_c) const =0
PolymerInflowBasic(const double starttime, const double endtime, const double amount)
Basic polymer injection behaviour class. This class gives all injectors the same polymer concentratio...
Definition: PolymerInflow.hpp:59
virtual void getInflowValues(const double, const double, std::vector< double > &poly_inflow_c) const
virtual ~PolymerInflowInterface()
Virtual destructor for subclassing.
Definition: PolymerInflow.hpp:42
Polymer injection behaviour class using deck WPOLYMER. This class reads the accumulated WPOLYMER line...
Definition: PolymerInflow.hpp:88
PolymerInflowFromDeck(Opm::DeckConstPtr deck, const Wells &wells, const int num_cells)
Interface for classes encapsulating polymer inflow information.
Definition: PolymerInflow.hpp:38