diff --git a/opm/input/eclipse/Schedule/Well/Well.hpp b/opm/input/eclipse/Schedule/Well/Well.hpp index b436792bb..868e60bf1 100644 --- a/opm/input/eclipse/Schedule/Well/Well.hpp +++ b/opm/input/eclipse/Schedule/Well/Well.hpp @@ -231,6 +231,7 @@ public: double temperature; int vfp_table_number; bool prediction_mode; + double rs_rv_inj; bool hasControl(InjectorCMode cmode_arg) const { return (this->controls & static_cast(cmode_arg)) != 0; @@ -261,6 +262,8 @@ public: InjectorType injectorType; InjectorCMode controlMode; + double rsRvInj; + bool operator==(const WellInjectionProperties& other) const; bool operator!=(const WellInjectionProperties& other) const; @@ -320,6 +323,7 @@ public: serializer(injectionControls); serializer(injectorType); serializer(controlMode); + serializer(rsRvInj); } }; diff --git a/src/opm/input/eclipse/Schedule/Well/WellInjectionProperties.cpp b/src/opm/input/eclipse/Schedule/Well/WellInjectionProperties.cpp index df498ddfa..90c7b78bd 100644 --- a/src/opm/input/eclipse/Schedule/Well/WellInjectionProperties.cpp +++ b/src/opm/input/eclipse/Schedule/Well/WellInjectionProperties.cpp @@ -55,7 +55,8 @@ namespace Opm { predictionMode(true), injectionControls(0), injectorType(InjectorType::WATER), - controlMode(InjectorCMode::CMODE_UNDEFINED) + controlMode(InjectorCMode::CMODE_UNDEFINED), + rsRvInj(0.0) { } @@ -77,6 +78,7 @@ namespace Opm { result.injectionControls = 10; result.injectorType = InjectorType::OIL; result.controlMode = InjectorCMode::BHP; + result.rsRvInj = 11; return result; } @@ -130,6 +132,12 @@ namespace Opm { throw std::invalid_argument("Tried to set invalid control: " + cmodeString + " for well: " + well_name); } } + this->rsRvInj = record.getItem("VAPOIL_C").getSIDouble(0); + if (this->injectorType == InjectorType::OIL && this->rsRvInj > 0) { + double factor = record.getItem("VAPOIL_C").getSIDouble(0) / record.getItem("VAPOIL_C").get(0); + // for oil injectors the rsRvInj is Rs and the inverse of the si-conversion factor should be used + this->rsRvInj = record.getItem("VAPOIL_C").get(0) / factor; + } } @@ -220,6 +228,12 @@ namespace Opm { if (VFPTableNumberArg > 0) { this->VFPTableNumber = VFPTableNumberArg; } + this->rsRvInj = record.getItem("VAPOIL_C").getSIDouble(0); + if (this->injectorType == InjectorType::OIL && this->rsRvInj > 0) { + double factor = record.getItem("VAPOIL_C").getSIDouble(0) / record.getItem("VAPOIL_C").get(0); + // for oil injectors the rsRvInj is Rs and the inverse of the si-conversion factor should be used + this->rsRvInj = record.getItem("VAPOIL_C").get(0) / factor; + } } bool Well::WellInjectionProperties::operator==(const Well::WellInjectionProperties& other) const { @@ -236,7 +250,8 @@ namespace Opm { (predictionMode == other.predictionMode) && (injectionControls == other.injectionControls) && (injectorType == other.injectorType) && - (controlMode == other.controlMode)) + (controlMode == other.controlMode) && + (rsRvInj == other.rsRvInj)) return true; else return false; @@ -275,7 +290,8 @@ namespace Opm { << "prediction mode: " << wp.predictionMode << ", " << "injection ctrl: " << wp.injectionControls << ", " << "injector type: " << InjectorType2String(wp.injectorType) << ", " - << "control mode: " << Well::InjectorCMode2String(wp.controlMode) << " }"; + << "control mode: " << Well::InjectorCMode2String(wp.controlMode) << " , " + << "rs/rv concentration: " << wp.rsRvInj << " }"; } @@ -296,6 +312,7 @@ namespace Opm { controls.cmode = this->controlMode; controls.vfp_table_number = this->VFPTableNumber; controls.injector_type = this->injectorType; + controls.rs_rv_inj = this->rsRvInj; return controls; } diff --git a/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WCONINJE b/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WCONINJE index 01f8b38ee..69117b0e5 100644 --- a/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WCONINJE +++ b/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WCONINJE @@ -60,6 +60,7 @@ "name": "VAPOIL_C", "value_type": "DOUBLE", "default": 0, + "dimension": "OilDissolutionFactor", "comment": "Not supported" }, { diff --git a/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WCONINJH b/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WCONINJH index e5a10c402..0c221842c 100644 --- a/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WCONINJH +++ b/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WCONINJH @@ -49,6 +49,7 @@ "name": "VAPOIL_C", "value_type": "DOUBLE", "default": 0, + "dimension": "OilDissolutionFactor", "comment": "Not supported" }, {