diff --git a/opm/simulators/wells/WellInterfaceGeneric.cpp b/opm/simulators/wells/WellInterfaceGeneric.cpp index 5ac1302e2..15b2d1732 100644 --- a/opm/simulators/wells/WellInterfaceGeneric.cpp +++ b/opm/simulators/wells/WellInterfaceGeneric.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -453,4 +454,17 @@ double WellInterfaceGeneric::wfoam_() const } } +double WellInterfaceGeneric::wsalt_() const +{ + auto injectorType = this->well_ecl_.injectorType(); + + if (injectorType == InjectorType::WATER) { + WellBrineProperties fprop = this->well_ecl_.getBrineProperties(); + return fprop.m_saltConcentration; + } else { + // Not a water injection well => no salt (?). + return 0.0; + } +} + } // namespace Opm diff --git a/opm/simulators/wells/WellInterfaceGeneric.hpp b/opm/simulators/wells/WellInterfaceGeneric.hpp index 8db620684..5b096bba3 100644 --- a/opm/simulators/wells/WellInterfaceGeneric.hpp +++ b/opm/simulators/wells/WellInterfaceGeneric.hpp @@ -199,6 +199,7 @@ protected: bool getAllowCrossFlow() const; double wfoam_() const; + double wsalt_() const; // definition of the struct OperabilityStatus struct OperabilityStatus { diff --git a/opm/simulators/wells/WellInterface_impl.hpp b/opm/simulators/wells/WellInterface_impl.hpp index 40c027ba8..ccea224ea 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 @@ -136,15 +135,7 @@ namespace Opm wsalt() const { if constexpr (has_brine) { - auto injectorType = this->well_ecl_.injectorType(); - - if (injectorType == InjectorType::WATER) { - WellBrineProperties fprop = this->well_ecl_.getBrineProperties(); - return fprop.m_saltConcentration; - } else { - // Not a water injection well => no salt (?). - return 0.0; - } + return this->wsalt_(); } return 0.0;