Group.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2013 Statoil ASA.
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 
21 #ifndef GROUP_HPP_
22 #define GROUP_HPP_
23 
29 
30 #include <memory>
31 #include <string>
32 
33 namespace Opm {
34 
35  namespace GroupInjection {
36  struct InjectionData;
37  }
38 
39 
40  namespace GroupProduction {
41  struct ProductionData;
42  }
43 
44  class Group {
45  public:
46  Group(const std::string& name, TimeMapConstPtr timeMap , size_t creationTimeStep);
47  bool hasBeenDefined(size_t timeStep) const;
48  const std::string& name() const;
49  bool isProductionGroup(size_t timeStep) const;
50  bool isInjectionGroup(size_t timeStep) const;
51  void setProductionGroup(size_t timeStep, bool isProductionGroup);
52 
53  /******************************************************************/
54  void setInjectionPhase(size_t time_step , Phase::PhaseEnum phase);
55  Phase::PhaseEnum getInjectionPhase(size_t time_step) const;
56 
57  void setInjectionControlMode(size_t time_step , GroupInjection::ControlEnum ControlMode);
59 
60  void setInjectionRate(size_t time_step , double rate);
61  double getInjectionRate( size_t time_step) const;
62 
63  void setSurfaceMaxRate( size_t time_step , double rate);
64  double getSurfaceMaxRate( size_t time_step ) const;
65 
66  void setReservoirMaxRate( size_t time_step , double rate);
67  double getReservoirMaxRate( size_t time_step ) const;
68 
69  void setTargetReinjectFraction( size_t time_step , double rate);
70  double getTargetReinjectFraction( size_t time_step ) const;
71 
72  void setTargetVoidReplacementFraction( size_t time_step , double rate);
73  double getTargetVoidReplacementFraction( size_t time_step ) const;
74 
75  /******************************************************************/
76 
77  void setProductionControlMode( size_t time_step , GroupProduction::ControlEnum controlMode);
79 
82 
83  void setOilTargetRate(size_t time_step , double oilTargetRate);
84  double getOilTargetRate(size_t time_step) const;
85  void setGasTargetRate(size_t time_step , double gasTargetRate);
86  double getGasTargetRate(size_t time_step) const;
87  void setWaterTargetRate(size_t time_step , double waterTargetRate);
88  double getWaterTargetRate(size_t time_step) const;
89  void setLiquidTargetRate(size_t time_step , double liquidTargetRate);
90  double getLiquidTargetRate(size_t time_step) const;
91  void setReservoirVolumeTargetRate(size_t time_step , double reservoirVolumeTargetRate);
92  double getReservoirVolumeTargetRate(size_t time_step) const;
93 
94  /*****************************************************************/
95 
96  bool hasWell(const std::string& wellName , size_t time_step) const;
97  WellConstPtr getWell(const std::string& wellName , size_t time_step) const;
98  size_t numWells(size_t time_step) const;
99  void addWell(size_t time_step , WellPtr well);
100  void delWell(size_t time_step, const std::string& wellName );
101  private:
102  WellSetConstPtr wellMap(size_t time_step) const;
103 
104  size_t m_creationTimeStep;
105  std::string m_name;
106  std::shared_ptr<GroupInjection::InjectionData> m_injection;
107  std::shared_ptr<GroupProduction::ProductionData> m_production;
108  std::shared_ptr<DynamicState<WellSetConstPtr> > m_wells;
109  std::shared_ptr<DynamicState<bool> > m_isProductionGroup;
110  };
111  typedef std::shared_ptr<Group> GroupPtr;
112  typedef std::shared_ptr<const Group> GroupConstPtr;
113 }
114 
115 
116 
117 #endif /* WELL_HPP_ */
GroupInjection::ControlEnum getInjectionControlMode(size_t time_step) const
void setTargetVoidReplacementFraction(size_t time_step, double rate)
double getWaterTargetRate(size_t time_step) const
void setReservoirMaxRate(size_t time_step, double rate)
void delWell(size_t time_step, const std::string &wellName)
std::shared_ptr< const TimeMap > TimeMapConstPtr
Definition: TimeMap.hpp:77
void setLiquidTargetRate(size_t time_step, double liquidTargetRate)
Definition: Deck.hpp:29
bool hasBeenDefined(size_t timeStep) const
size_t numWells(size_t time_step) const
void setOilTargetRate(size_t time_step, double oilTargetRate)
std::shared_ptr< const Group > GroupConstPtr
Definition: Group.hpp:112
double getReservoirMaxRate(size_t time_step) const
std::shared_ptr< Group > GroupPtr
Definition: Group.hpp:111
std::shared_ptr< Well > WellPtr
Definition: Well.hpp:148
void setInjectionPhase(size_t time_step, Phase::PhaseEnum phase)
double getLiquidTargetRate(size_t time_step) const
double getOilTargetRate(size_t time_step) const
std::shared_ptr< const WellSet > WellSetConstPtr
Definition: WellSet.hpp:47
double getTargetVoidReplacementFraction(size_t time_step) const
void setSurfaceMaxRate(size_t time_step, double rate)
ActionEnum
Definition: ScheduleEnums.hpp:169
bool isProductionGroup(size_t timeStep) const
PhaseEnum
Definition: ScheduleEnums.hpp:75
ControlEnum
Definition: ScheduleEnums.hpp:186
void setInjectionControlMode(size_t time_step, GroupInjection::ControlEnum ControlMode)
Phase::PhaseEnum getInjectionPhase(size_t time_step) const
void setProductionControlMode(size_t time_step, GroupProduction::ControlEnum controlMode)
void addWell(size_t time_step, WellPtr well)
Group(const std::string &name, TimeMapConstPtr timeMap, size_t creationTimeStep)
bool isInjectionGroup(size_t timeStep) const
void setReservoirVolumeTargetRate(size_t time_step, double reservoirVolumeTargetRate)
GroupProduction::ControlEnum getProductionControlMode(size_t time_step) const
double getTargetReinjectFraction(size_t time_step) const
bool hasWell(const std::string &wellName, size_t time_step) const
ControlEnum
Definition: ScheduleEnums.hpp:154
double getSurfaceMaxRate(size_t time_step) const
GroupProductionExceedLimit::ActionEnum getProductionExceedLimitAction(size_t time_step) const
WellConstPtr getWell(const std::string &wellName, size_t time_step) const
void setProductionGroup(size_t timeStep, bool isProductionGroup)
double getReservoirVolumeTargetRate(size_t time_step) const
const std::string & name() const
void setProductionExceedLimitAction(size_t time_step, GroupProductionExceedLimit::ActionEnum action)
double getInjectionRate(size_t time_step) const
void setWaterTargetRate(size_t time_step, double waterTargetRate)
Definition: Group.hpp:44
void setTargetReinjectFraction(size_t time_step, double rate)
void setGasTargetRate(size_t time_step, double gasTargetRate)
double getGasTargetRate(size_t time_step) const
void setInjectionRate(size_t time_step, double rate)
std::shared_ptr< const Well > WellConstPtr
Definition: Well.hpp:149