WellInterface: move code using WellPolymerProperties to compile unit

This commit is contained in:
Arne Morten Kvarving 2023-01-12 15:15:42 +01:00
parent 97f76412ae
commit f860490c9f
3 changed files with 17 additions and 10 deletions

View File

@ -25,6 +25,7 @@
#include <opm/input/eclipse/Schedule/Well/WellBrineProperties.hpp>
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
#include <opm/input/eclipse/Schedule/Well/WellFoamProperties.hpp>
#include <opm/input/eclipse/Schedule/Well/WellPolymerProperties.hpp>
#include <opm/input/eclipse/Schedule/Well/WellTestState.hpp>
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
#include <opm/simulators/wells/PerforationData.hpp>
@ -467,4 +468,18 @@ double WellInterfaceGeneric::wsalt_() const
}
}
double WellInterfaceGeneric::wpolymer_() const
{
auto injectorType = this->well_ecl_.injectorType();
if (injectorType == InjectorType::WATER) {
WellPolymerProperties polymer = this->well_ecl_.getPolymerProperties();
const double polymer_injection_concentration = polymer.m_polymerConcentration;
return polymer_injection_concentration;
} else {
// Not a water injection well => no polymer.
return 0.0;
}
}
} // namespace Opm

View File

@ -199,6 +199,7 @@ protected:
bool getAllowCrossFlow() const;
double wfoam_() const;
double wpolymer_() const;
double wsalt_() const;
// definition of the struct OperabilityStatus

View File

@ -97,16 +97,7 @@ namespace Opm
wpolymer() const
{
if constexpr (has_polymer) {
auto injectorType = this->well_ecl_.injectorType();
if (injectorType == InjectorType::WATER) {
WellPolymerProperties polymer = this->well_ecl_.getPolymerProperties();
const double polymer_injection_concentration = polymer.m_polymerConcentration;
return polymer_injection_concentration;
} else {
// Not a water injection well => no polymer.
return 0.0;
}
return this->wpolymer_();
}
return 0.0;