mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-11 00:41:56 -06:00
WellInterface: move code using WellPolymerProperties to compile unit
This commit is contained in:
parent
97f76412ae
commit
f860490c9f
@ -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
|
||||
|
@ -199,6 +199,7 @@ protected:
|
||||
bool getAllowCrossFlow() const;
|
||||
|
||||
double wfoam_() const;
|
||||
double wpolymer_() const;
|
||||
double wsalt_() const;
|
||||
|
||||
// definition of the struct OperabilityStatus
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user