2016-06-20 07:13:29 -05:00
|
|
|
/*
|
|
|
|
Copyright 2016 The Open Porous Media project.
|
|
|
|
|
|
|
|
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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdexcept>
|
2013-04-10 05:56:14 -05:00
|
|
|
#include "config.h"
|
2012-06-05 08:42:49 -05:00
|
|
|
#include <opm/core/wells/InjectionSpecification.hpp>
|
|
|
|
|
2012-03-28 08:49:39 -05:00
|
|
|
namespace Opm
|
|
|
|
{
|
2012-03-27 09:57:01 -05:00
|
|
|
|
2012-03-28 08:49:39 -05:00
|
|
|
InjectionSpecification::InjectionSpecification()
|
2012-04-16 12:27:34 -05:00
|
|
|
: injector_type_(WATER),
|
|
|
|
control_mode_(NONE),
|
2012-05-02 02:25:52 -05:00
|
|
|
surface_flow_max_rate_(-1e100),
|
|
|
|
reservoir_flow_max_rate_(-1e100),
|
|
|
|
BHP_limit_(-1e100),
|
2012-05-09 08:54:25 -05:00
|
|
|
reinjection_fraction_target_(1),
|
|
|
|
voidage_replacment_fraction_(1),
|
2012-05-02 02:25:52 -05:00
|
|
|
guide_rate_(1.0),
|
|
|
|
guide_rate_type_(NONE_GRT)
|
2012-03-28 08:49:39 -05:00
|
|
|
{
|
2012-03-27 09:57:01 -05:00
|
|
|
|
2012-03-28 08:49:39 -05:00
|
|
|
}
|
2012-03-27 09:57:01 -05:00
|
|
|
|
2016-05-22 21:48:51 -05:00
|
|
|
std::string
|
|
|
|
InjectionSpecification::toString(const ControlMode& mode)
|
2016-05-20 03:13:37 -05:00
|
|
|
{
|
|
|
|
switch(mode) {
|
2016-05-22 21:48:51 -05:00
|
|
|
case ControlMode::NONE: return "NONE";
|
|
|
|
case ControlMode::RATE: return "RATE";
|
|
|
|
case ControlMode::RESV: return "RESV";
|
|
|
|
case ControlMode::BHP : return "BHP" ;
|
|
|
|
case ControlMode::THP : return "THP" ;
|
|
|
|
case ControlMode::REIN: return "REIN";
|
|
|
|
case ControlMode::VREP: return "VREP";
|
|
|
|
case ControlMode::GRUP: return "GRUP";
|
|
|
|
case ControlMode::FLD : return "FLD" ;
|
2016-05-20 03:13:37 -05:00
|
|
|
}
|
2016-06-20 07:13:29 -05:00
|
|
|
throw new std::domain_error("Unknown control mode");
|
2016-05-20 03:13:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-05-22 21:48:51 -05:00
|
|
|
std::string
|
|
|
|
InjectionSpecification::toString(const InjectorType& type)
|
2016-05-20 03:13:37 -05:00
|
|
|
{
|
|
|
|
switch(type) {
|
2016-05-22 21:48:51 -05:00
|
|
|
case InjectorType::WATER: return "WATER";
|
|
|
|
case InjectorType::OIL : return "OIL" ;
|
|
|
|
case InjectorType::GAS : return "GAS" ;
|
2016-05-20 03:13:37 -05:00
|
|
|
}
|
2016-06-20 07:13:29 -05:00
|
|
|
throw new std::domain_error("Unknown injector type");
|
2016-05-20 03:13:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-05-22 21:48:51 -05:00
|
|
|
std::string
|
|
|
|
InjectionSpecification::toString(const GuideRateType& type)
|
2016-05-20 03:13:37 -05:00
|
|
|
{
|
|
|
|
switch(type) {
|
2016-05-22 21:48:51 -05:00
|
|
|
case GuideRateType::RAT : return "RAT" ;
|
|
|
|
case GuideRateType::NONE_GRT: return "NONE_GRT";
|
2016-05-20 03:13:37 -05:00
|
|
|
}
|
2016-06-20 07:13:29 -05:00
|
|
|
throw new std::domain_error("Unknown guide rate type");
|
2016-05-20 03:13:37 -05:00
|
|
|
}
|
2012-04-16 12:27:34 -05:00
|
|
|
} // namespace Opm
|