2013-11-06 18:45:41 +01:00
|
|
|
/*
|
|
|
|
|
Copyright 2013 Statoil ASA.
|
|
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef COMPLETION_HPP_
|
|
|
|
|
#define COMPLETION_HPP_
|
|
|
|
|
|
2013-12-02 13:07:01 +01:00
|
|
|
#include <memory>
|
2014-08-29 15:08:13 +02:00
|
|
|
#include <string>
|
2013-11-06 18:45:41 +01:00
|
|
|
#include <boost/date_time.hpp>
|
|
|
|
|
|
|
|
|
|
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
|
2014-09-04 21:12:36 +02:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Util/Value.hpp>
|
2013-11-06 18:45:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Opm {
|
|
|
|
|
|
|
|
|
|
class Completion {
|
|
|
|
|
public:
|
2015-01-12 10:58:30 +01:00
|
|
|
Completion(int i, int j , int k , WellCompletion::StateEnum state ,
|
2014-09-06 12:35:43 +02:00
|
|
|
const Value<double>& connectionTransmissibilityFactor,
|
2014-12-08 16:34:28 +01:00
|
|
|
const Value<double>& diameter,
|
|
|
|
|
const Value<double>& skinFactor,
|
2015-01-12 10:58:30 +01:00
|
|
|
const WellCompletion::DirectionEnum direction = WellCompletion::DirectionEnum::Z);
|
2014-09-04 21:12:36 +02:00
|
|
|
|
2015-01-14 11:40:28 +01:00
|
|
|
Completion(std::shared_ptr<const Completion> oldCompletion, WellCompletion::StateEnum newStatus);
|
2015-06-02 13:26:37 +02:00
|
|
|
Completion(std::shared_ptr<const Completion> oldCompletion, double wellPi);
|
2015-01-14 11:40:28 +01:00
|
|
|
|
2013-11-07 15:01:14 +01:00
|
|
|
bool sameCoordinate(const Completion& other) const;
|
2013-11-06 18:45:41 +01:00
|
|
|
int getI() const;
|
|
|
|
|
int getJ() const;
|
|
|
|
|
int getK() const;
|
2015-01-12 10:58:30 +01:00
|
|
|
WellCompletion::StateEnum getState() const;
|
2014-09-06 12:35:43 +02:00
|
|
|
double getConnectionTransmissibilityFactor() const;
|
2015-06-02 13:26:37 +02:00
|
|
|
double getWellPi() const;
|
2015-02-03 13:01:26 +01:00
|
|
|
const Value<double>& getConnectionTransmissibilityFactorAsValueObject() const;
|
2014-01-27 19:31:04 +01:00
|
|
|
double getDiameter() const;
|
|
|
|
|
double getSkinFactor() const;
|
2014-03-27 15:41:19 +01:00
|
|
|
void fixDefaultIJ(int wellHeadI , int wellHeadJ);
|
2013-11-06 18:45:41 +01:00
|
|
|
|
2015-01-12 10:58:30 +01:00
|
|
|
WellCompletion::DirectionEnum getDirection() const;
|
2014-08-29 15:08:13 +02:00
|
|
|
|
2014-03-27 15:41:19 +01:00
|
|
|
static std::map<std::string , std::vector<std::shared_ptr<Completion> > > completionsFromCOMPDATKeyword( DeckKeywordConstPtr compdatKeyword );
|
|
|
|
|
static std::pair<std::string , std::vector<std::shared_ptr<Completion> > > completionsFromCOMPDATRecord( DeckRecordConstPtr compdatRecord );
|
2014-12-08 16:34:28 +01:00
|
|
|
|
2013-11-06 18:45:41 +01:00
|
|
|
private:
|
|
|
|
|
int m_i, m_j, m_k;
|
2014-09-04 21:12:36 +02:00
|
|
|
Value<double> m_diameter;
|
2014-09-06 12:35:43 +02:00
|
|
|
Value<double> m_connectionTransmissibilityFactor;
|
2015-06-10 07:50:43 +02:00
|
|
|
double m_wellPi;
|
2014-09-04 21:12:36 +02:00
|
|
|
Value<double> m_skinFactor;
|
2015-01-12 10:58:30 +01:00
|
|
|
WellCompletion::StateEnum m_state;
|
|
|
|
|
WellCompletion::DirectionEnum m_direction;
|
2015-01-14 11:40:28 +01:00
|
|
|
Value<double> getDiameterAsValueObject() const;
|
|
|
|
|
Value<double> getSkinFactorAsValueObject() const;
|
|
|
|
|
|
2013-11-06 18:45:41 +01:00
|
|
|
};
|
|
|
|
|
|
2013-12-02 13:07:01 +01:00
|
|
|
typedef std::shared_ptr<Completion> CompletionPtr;
|
|
|
|
|
typedef std::shared_ptr<const Completion> CompletionConstPtr;
|
2013-11-06 18:45:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-17 15:35:23 +01:00
|
|
|
#endif /* COMPLETION_HPP_ */
|