opm-simulators/opm/core/WellsManager.hpp

90 lines
2.9 KiB
C++
Raw Normal View History

2012-03-06 06:59:51 -06:00
/*
Copyright 2012 SINTEF ICT, Applied Mathematics.
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 OPM_WELLSMANAGER_HEADER_INCLUDED
#define OPM_WELLSMANAGER_HEADER_INCLUDED
2012-03-30 03:51:31 -05:00
#include <opm/core/WellCollection.hpp>
#include <opm/core/WellsGroup.hpp>
2012-03-06 06:59:51 -06:00
struct Wells;
struct UnstructuredGrid;
namespace Opm
{
class EclipseGridParser;
2012-03-07 02:15:34 -06:00
/// This class manages a Wells struct in the sense that it
2012-03-06 06:59:51 -06:00
/// encapsulates creation and destruction of the wells
/// data structure.
/// The resulting Wells is available through the c_wells() method.
class WellsManager
{
public:
2012-03-09 07:25:52 -06:00
/// Default constructor -- no wells.
WellsManager();
2012-03-06 06:59:51 -06:00
/// Construct from input deck and grid.
/// The permeability argument may be zero if the input contain
/// well productivity indices, otherwise it must be given in
/// order to approximate these by the Peaceman formula.
WellsManager(const Opm::EclipseGridParser& deck,
const UnstructuredGrid& grid,
const double* permeability);
/// Destructor.
~WellsManager();
/// Apply control results
/// \param[in] result The result of a run to conditionsMet on WellCollection
void applyControl(const WellControlResult& result);
2012-03-06 06:59:51 -06:00
/// Access the managed Wells.
/// The method is named similarly to c_str() in std::string,
/// to make it clear that we are returning a C-compatible struct.
const Wells* c_wells() const;
/// Access the well group hierarchy.
const WellCollection& wellCollection() const;
2012-03-06 06:59:51 -06:00
private:
// Disable copying and assignment.
WellsManager(const WellsManager& other);
WellsManager& operator=(const WellsManager& other);
2012-03-06 06:59:51 -06:00
// The managed Wells.
Wells* w_;
2012-03-30 03:51:31 -05:00
WellCollection well_collection_;
2012-03-27 03:56:32 -05:00
/// Apply control results for a specific target (OIL, WATER, etc)
/// \param[in] exceed_info will for each group name contain all the
/// exceed informations for the given mode.
/// \param[in] well_collection The associated well_collection.
/// \param[in] mode The ControlMode to which the violations apply.
void applyControl(const std::map<std::string, std::vector<ExceedInformation> >& exceed_info,
ProductionSpecification::ControlMode mode);
2012-03-06 06:59:51 -06:00
};
} // namespace Opm
#endif // OPM_WELLSMANAGER_HEADER_INCLUDED