Completion.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 COMPLETION_HPP_
22 #define COMPLETION_HPP_
23 
24 #include <memory>
25 #include <string>
26 #include <boost/date_time.hpp>
27 
32 
33 
34 namespace Opm {
35 
36  class Completion {
37  public:
38  Completion(int i, int j , int k , WellCompletion::StateEnum state ,
39  const Value<double>& connectionTransmissibilityFactor,
40  const Value<double>& diameter,
41  const Value<double>& skinFactor,
43 
44  Completion(std::shared_ptr<const Completion> oldCompletion, WellCompletion::StateEnum newStatus);
45  Completion(std::shared_ptr<const Completion> oldCompletion, double wellPi);
46 
47  bool sameCoordinate(const Completion& other) const;
48  int getI() const;
49  int getJ() const;
50  int getK() const;
53  double getWellPi() const;
55  double getDiameter() const;
56  double getSkinFactor() const;
57  void fixDefaultIJ(int wellHeadI , int wellHeadJ);
58 
60 
61  static std::map<std::string , std::vector<std::shared_ptr<Completion> > > completionsFromCOMPDATKeyword( DeckKeywordConstPtr compdatKeyword );
62  static std::pair<std::string , std::vector<std::shared_ptr<Completion> > > completionsFromCOMPDATRecord( DeckRecordConstPtr compdatRecord );
63 
64  private:
65  int m_i, m_j, m_k;
66  Value<double> m_diameter;
67  Value<double> m_connectionTransmissibilityFactor;
68  double m_wellPi;
69  Value<double> m_skinFactor;
72  Value<double> getDiameterAsValueObject() const;
73  Value<double> getSkinFactorAsValueObject() const;
74 
75  };
76 
77  typedef std::shared_ptr<Completion> CompletionPtr;
78  typedef std::shared_ptr<const Completion> CompletionConstPtr;
79 }
80 
81 
82 
83 #endif /* COMPLETION_HPP_ */
Definition: Deck.hpp:29
const Value< double > & getConnectionTransmissibilityFactorAsValueObject() const
WellCompletion::StateEnum getState() const
static std::map< std::string, std::vector< std::shared_ptr< Completion > > > completionsFromCOMPDATKeyword(DeckKeywordConstPtr compdatKeyword)
std::shared_ptr< const DeckKeyword > DeckKeywordConstPtr
Definition: DeckKeyword.hpp:71
std::shared_ptr< Completion > CompletionPtr
Definition: Completion.hpp:77
Definition: ScheduleEnums.hpp:52
Definition: Completion.hpp:36
double getConnectionTransmissibilityFactor() const
int getK() const
std::shared_ptr< const Completion > CompletionConstPtr
Definition: Completion.hpp:78
static std::pair< std::string, std::vector< std::shared_ptr< Completion > > > completionsFromCOMPDATRecord(DeckRecordConstPtr compdatRecord)
WellCompletion::DirectionEnum getDirection() const
DirectionEnum
Definition: ScheduleEnums.hpp:49
double getDiameter() const
StateEnum
Definition: ScheduleEnums.hpp:42
double getSkinFactor() const
int getI() const
std::shared_ptr< const DeckRecord > DeckRecordConstPtr
Definition: DeckRecord.hpp:54
Completion(int i, int j, int k, WellCompletion::StateEnum state, const Value< double > &connectionTransmissibilityFactor, const Value< double > &diameter, const Value< double > &skinFactor, const WellCompletion::DirectionEnum direction=WellCompletion::DirectionEnum::Z)
void fixDefaultIJ(int wellHeadI, int wellHeadJ)
double getWellPi() const
int getJ() const
bool sameCoordinate(const Completion &other) const