diff --git a/opm/core/wells/InjectionSpecification.cpp b/opm/core/wells/InjectionSpecification.cpp index 34201246..12a3cf06 100644 --- a/opm/core/wells/InjectionSpecification.cpp +++ b/opm/core/wells/InjectionSpecification.cpp @@ -18,4 +18,80 @@ namespace Opm } + const std::string + InjectionSpecification::ControlMode2String(const ControlMode& mode) + { + std::string stringValue; + + switch(mode) { + case ControlMode::NONE: + stringValue = "NONE"; + break; + case ControlMode::RATE: + stringValue = "RATE"; + break; + case ControlMode::RESV: + stringValue = "RESV"; + break; + case ControlMode::BHP: + stringValue = "BHP"; + break; + case ControlMode::THP: + stringValue = "THP"; + break; + case ControlMode::REIN: + stringValue = "REIN"; + break; + case ControlMode::VREP: + stringValue = "VREP"; + break; + case ControlMode::GRUP: + stringValue = "GRUP"; + break; + case ControlMode::FLD: + stringValue = "FLD"; + break; + } + + return stringValue; + } + + + const std::string + InjectionSpecification::InjectorType2String(const InjectorType& type) + { + std::string stringValue; + + switch(type) { + case InjectorType::WATER: + stringValue = "WATER"; + break; + case InjectorType::OIL: + stringValue = "OIL"; + break; + case InjectorType::GAS: + stringValue = "GAS"; + break; + } + + return stringValue; + } + + + const std::string + InjectionSpecification::GuideRateType2String(const GuideRateType& type) + { + std::string stringValue; + + switch(type) { + case GuideRateType::RAT: + stringValue = "RAT"; + break; + case GuideRateType::NONE_GRT: + stringValue = "NONE_GRT"; + break; + } + + return stringValue; + } } // namespace Opm diff --git a/opm/core/wells/InjectionSpecification.hpp b/opm/core/wells/InjectionSpecification.hpp index 74d20f6a..db324233 100644 --- a/opm/core/wells/InjectionSpecification.hpp +++ b/opm/core/wells/InjectionSpecification.hpp @@ -2,6 +2,7 @@ #define OPM_INJECTORSPECIFICATION_HPP #include +#include namespace Opm { @@ -25,7 +26,9 @@ namespace Opm }; InjectionSpecification(); - + const std::string ControlMode2String(const ControlMode& mode); + const std::string InjectorType2String(const InjectorType& type); + const std::string GuideRateType2String(const GuideRateType& type); InjectorType injector_type_; ControlMode control_mode_; double surface_flow_max_rate_; diff --git a/opm/core/wells/ProductionSpecification.cpp b/opm/core/wells/ProductionSpecification.cpp index 1c6d443a..2cccd545 100644 --- a/opm/core/wells/ProductionSpecification.cpp +++ b/opm/core/wells/ProductionSpecification.cpp @@ -19,4 +19,98 @@ namespace Opm { } + + const std::string + ProductionSpecification::ControlMode2String(const ControlMode& mode) + { + std::string stringValue; + + switch(mode) { + case ControlMode::NONE: + stringValue = "NONE"; + break; + case ControlMode::ORAT: + stringValue = "ORAT"; + break; + case ControlMode::WRAT: + stringValue = "WRAT"; + break; + case ControlMode::GRAT: + stringValue = "GRAT"; + break; + case ControlMode::LRAT: + stringValue = "LRAT"; + break; + case ControlMode::CRAT: + stringValue = "CRAT"; + break; + case ControlMode::RESV: + stringValue = "RESV"; + break; + case ControlMode::PRBL: + stringValue = "RPBL"; + break; + case ControlMode::BHP: + stringValue = "BHP"; + break; + case ControlMode::THP: + stringValue = "THP"; + break; + case ControlMode::GRUP: + stringValue = "GRUP"; + break; + case ControlMode::FLD: + stringValue = "FLD"; + break; + } + + return stringValue; + } + + + const std::string + ProductionSpecification::Procedure2String(const Procedure& type) + { + std::string stringValue; + + switch(type) { + case Procedure::NONE_P: + stringValue = "NONE_P"; + break; + case Procedure::RATE: + stringValue = "RATE"; + break; + case Procedure::WELL: + stringValue = "WELL"; + break; + } + + return stringValue; + } + + + const std::string + ProductionSpecification::GuideRateType2String(const GuideRateType& type) + { + std::string stringValue; + + switch(type) { + case GuideRateType::OIL: + stringValue = "OIL"; + break; + case GuideRateType::GAS: + stringValue = "GAS"; + break; + case GuideRateType::WATER: + stringValue = "WATER"; + break; + case GuideRateType::NONE_GRT: + stringValue = "NONE_GRT"; + break; + } + + return stringValue; + } + + } diff --git a/opm/core/wells/ProductionSpecification.hpp b/opm/core/wells/ProductionSpecification.hpp index 6d064a2f..5d644301 100644 --- a/opm/core/wells/ProductionSpecification.hpp +++ b/opm/core/wells/ProductionSpecification.hpp @@ -2,6 +2,7 @@ #define OPM_PRODUCTIONSPECIFICATION_HPP #include +#include namespace Opm { @@ -25,6 +26,9 @@ namespace Opm }; ProductionSpecification(); + const std::string ControlMode2String(const ControlMode& mode); + const std::string Procedure2String(const Procedure& type); + const std::string GuideRateType2String(const GuideRateType& type); ControlMode control_mode_; Procedure procedure_;