diff --git a/opm/simulators/wells/WellInterfaceGeneric.cpp b/opm/simulators/wells/WellInterfaceGeneric.cpp index 67e69417c..491747c85 100644 --- a/opm/simulators/wells/WellInterfaceGeneric.cpp +++ b/opm/simulators/wells/WellInterfaceGeneric.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -442,6 +443,20 @@ bool WellInterfaceGeneric::isPressureControlled(const WellState& well_state) con } } +double WellInterfaceGeneric::wmicrobes_() const +{ + auto injectorType = this->well_ecl_.injectorType(); + + if (injectorType == InjectorType::WATER) { + WellMICPProperties microbes = this->well_ecl_.getMICPProperties(); + const double microbial_injection_concentration = microbes.m_microbialConcentration; + return microbial_injection_concentration; + } else { + // Not a water injection well => no microbes. + return 0.0; + } +} + double WellInterfaceGeneric::wfoam_() const { auto injectorType = this->well_ecl_.injectorType(); @@ -468,6 +483,20 @@ double WellInterfaceGeneric::wsalt_() const } } +double WellInterfaceGeneric::woxygen_() const +{ + auto injectorType = this->well_ecl_.injectorType(); + + if (injectorType == InjectorType::WATER) { + WellMICPProperties oxygen = this->well_ecl_.getMICPProperties(); + const double oxygen_injection_concentration = oxygen.m_oxygenConcentration; + return oxygen_injection_concentration; + } else { + // Not a water injection well => no oxygen. + return 0.0; + } +} + double WellInterfaceGeneric::wpolymer_() const { auto injectorType = this->well_ecl_.injectorType(); @@ -482,6 +511,20 @@ double WellInterfaceGeneric::wpolymer_() const } } +double WellInterfaceGeneric::wurea_() const +{ + auto injectorType = this->well_ecl_.injectorType(); + + if (injectorType == InjectorType::WATER) { + WellMICPProperties urea = this->well_ecl_.getMICPProperties(); + const double urea_injection_concentration = urea.m_ureaConcentration / 10.; //Dividing by scaling factor 10 + return urea_injection_concentration; + } else { + // Not a water injection well => no urea. + return 0.0; + } +} + int WellInterfaceGeneric::polymerTable_() const { return this->well_ecl_.getPolymerProperties().m_skprpolytable; diff --git a/opm/simulators/wells/WellInterfaceGeneric.hpp b/opm/simulators/wells/WellInterfaceGeneric.hpp index 96cd7e1bf..9cc735355 100644 --- a/opm/simulators/wells/WellInterfaceGeneric.hpp +++ b/opm/simulators/wells/WellInterfaceGeneric.hpp @@ -198,9 +198,12 @@ public: protected: bool getAllowCrossFlow() const; + double wmicrobes_() const; double wfoam_() const; + double woxygen_() const; double wpolymer_() const; double wsalt_() const; + double wurea_() const; int polymerTable_() const; int polymerInjTable_() const; diff --git a/opm/simulators/wells/WellInterface_impl.hpp b/opm/simulators/wells/WellInterface_impl.hpp index 56ff513ea..5419b2322 100644 --- a/opm/simulators/wells/WellInterface_impl.hpp +++ b/opm/simulators/wells/WellInterface_impl.hpp @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -139,16 +138,7 @@ namespace Opm wmicrobes() const { if constexpr (has_micp) { - auto injectorType = this->well_ecl_.injectorType(); - - if (injectorType == InjectorType::WATER) { - WellMICPProperties microbes = this->well_ecl_.getMICPProperties(); - const double microbial_injection_concentration = microbes.m_microbialConcentration; - return microbial_injection_concentration; - } else { - // Not a water injection well => no microbes. - return 0.0; - } + return this->wmicrobes_(); } return 0.0; @@ -160,16 +150,7 @@ namespace Opm woxygen() const { if constexpr (has_micp) { - auto injectorType = this->well_ecl_.injectorType(); - - if (injectorType == InjectorType::WATER) { - WellMICPProperties oxygen = this->well_ecl_.getMICPProperties(); - const double oxygen_injection_concentration = oxygen.m_oxygenConcentration; - return oxygen_injection_concentration; - } else { - // Not a water injection well => no oxygen. - return 0.0; - } + return this->woxygen_(); } return 0.0; @@ -187,16 +168,7 @@ namespace Opm wurea() const { if constexpr (has_micp) { - auto injectorType = this->well_ecl_.injectorType(); - - if (injectorType == InjectorType::WATER) { - WellMICPProperties urea = this->well_ecl_.getMICPProperties(); - const double urea_injection_concentration = urea.m_ureaConcentration / 10.; //Dividing by scaling factor 10 - return urea_injection_concentration; - } else { - // Not a water injection well => no urea. - return 0.0; - } + return this->wurea_(); } return 0.0;