2012-03-27 09:57:01 -05:00
|
|
|
#ifndef OPM_WELLSGROUP_HPP
|
|
|
|
#define OPM_WELLSGROUP_HPP
|
2012-03-28 08:49:39 -05:00
|
|
|
|
2012-03-27 09:57:01 -05:00
|
|
|
#include <opm/core/InjectionSpecification.hpp>
|
|
|
|
#include <opm/core/ProductionSpecification.hpp>
|
2012-03-29 11:34:51 -05:00
|
|
|
#include <opm/core/eclipse/EclipseGridParser.hpp>
|
2012-03-28 08:49:39 -05:00
|
|
|
#include <string>
|
|
|
|
|
2012-03-29 11:34:51 -05:00
|
|
|
|
2012-03-28 08:49:39 -05:00
|
|
|
namespace Opm
|
|
|
|
{
|
|
|
|
|
|
|
|
class WellsGroupInterface
|
|
|
|
{
|
|
|
|
public:
|
2012-04-11 03:52:45 -05:00
|
|
|
WellsGroupInterface(const std::string& name,
|
|
|
|
ProductionSpecification prod_spec,
|
|
|
|
InjectionSpecification inj_spec);
|
2012-03-28 08:49:39 -05:00
|
|
|
virtual ~WellsGroupInterface();
|
|
|
|
|
2012-03-30 03:51:31 -05:00
|
|
|
/// The unique identifier for the well or well group.
|
2012-03-28 08:49:39 -05:00
|
|
|
const std::string& name();
|
2012-03-30 03:51:31 -05:00
|
|
|
|
|
|
|
/// Production specifications for the well or well group.
|
2012-03-28 08:49:39 -05:00
|
|
|
const ProductionSpecification& prodSpec() const;
|
2012-03-30 03:51:31 -05:00
|
|
|
|
|
|
|
/// Injection specifications for the well or well group.
|
2012-03-28 08:49:39 -05:00
|
|
|
const InjectionSpecification& injSpec() const;
|
2012-03-30 03:51:31 -05:00
|
|
|
|
|
|
|
/// \returns true if the object is a leaf node (WellNode), false otherwise.
|
|
|
|
virtual bool isLeafNode() const;
|
2012-03-28 08:49:39 -05:00
|
|
|
|
2012-03-29 11:34:51 -05:00
|
|
|
/// \returns the pointer to the WellsGroupInterface with the given name. NULL if
|
|
|
|
/// the name is not found.a
|
|
|
|
virtual WellsGroupInterface* findGroup(std::string name_of_node) = 0;
|
2012-03-28 08:49:39 -05:00
|
|
|
private:
|
|
|
|
std::string name_;
|
|
|
|
ProductionSpecification production_specification_;
|
|
|
|
InjectionSpecification injection_specification_;
|
|
|
|
};
|
2012-03-27 09:57:01 -05:00
|
|
|
|
2012-04-11 03:52:45 -05:00
|
|
|
|
|
|
|
|
2012-03-28 08:49:39 -05:00
|
|
|
class WellsGroup : public WellsGroupInterface
|
|
|
|
{
|
2012-03-29 11:34:51 -05:00
|
|
|
public:
|
2012-04-11 03:52:45 -05:00
|
|
|
WellsGroup(const std::string& name,
|
|
|
|
ProductionSpecification prod_spec,
|
|
|
|
InjectionSpecification inj_spec);
|
2012-03-29 11:34:51 -05:00
|
|
|
|
|
|
|
virtual WellsGroupInterface* findGroup(std::string name_of_node);
|
|
|
|
|
|
|
|
void addChild(std::tr1::shared_ptr<WellsGroupInterface> child);
|
|
|
|
private:
|
|
|
|
std::vector<std::tr1::shared_ptr<WellsGroupInterface> > children_;
|
2012-03-28 08:49:39 -05:00
|
|
|
};
|
2012-03-27 09:57:01 -05:00
|
|
|
|
2012-04-11 03:52:45 -05:00
|
|
|
|
|
|
|
|
2012-03-29 11:34:51 -05:00
|
|
|
class WellNode : public WellsGroupInterface
|
|
|
|
{
|
|
|
|
public:
|
2012-04-11 03:52:45 -05:00
|
|
|
WellNode(const std::string& name,
|
|
|
|
ProductionSpecification prod_spec,
|
2012-03-29 11:34:51 -05:00
|
|
|
InjectionSpecification inj_spec);
|
|
|
|
|
|
|
|
virtual WellsGroupInterface* findGroup(std::string name_of_node);
|
2012-03-30 03:51:31 -05:00
|
|
|
|
|
|
|
virtual bool isLeafNode() const;
|
2012-03-29 11:34:51 -05:00
|
|
|
};
|
|
|
|
|
2012-04-11 03:52:45 -05:00
|
|
|
/// Doc me!
|
2012-03-29 11:34:51 -05:00
|
|
|
std::tr1::shared_ptr<WellsGroupInterface> createWellsGroup(std::string name,
|
2012-04-11 03:52:45 -05:00
|
|
|
const EclipseGridParser& deck);
|
2012-03-29 11:34:51 -05:00
|
|
|
|
|
|
|
|
2012-03-27 09:57:01 -05:00
|
|
|
}
|
|
|
|
#endif /* OPM_WELLSGROUP_HPP */
|
|
|
|
|