mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4375 from akva2/wellpolymerproperties_hpp_include
add missing WellPolymerProperties.hpp includes
This commit is contained in:
commit
1f29b7cef0
@ -50,6 +50,7 @@
|
||||
#include <opm/input/eclipse/Schedule/Well/WListManager.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/WellBrineProperties.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/input/eclipse/Schedule/Well/WellTracerProperties.hpp>
|
||||
|
||||
|
@ -2056,7 +2056,7 @@ namespace Opm
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
if constexpr (Base::has_polymermw) {
|
||||
const int water_table_id = this->well_ecl_.getPolymerProperties().m_skprwattable;
|
||||
const int water_table_id = this->polymerWaterTable_();
|
||||
if (water_table_id <= 0) {
|
||||
OPM_DEFLOG_THROW(std::runtime_error,
|
||||
fmt::format("Unused SKPRWAT table id used for well {}", name()),
|
||||
@ -2094,7 +2094,7 @@ namespace Opm
|
||||
if (poly_inj_conc == 0.) {
|
||||
return sign * pskinwater(throughput, water_velocity_abs, deferred_logger);
|
||||
}
|
||||
const int polymer_table_id = this->well_ecl_.getPolymerProperties().m_skprpolytable;
|
||||
const int polymer_table_id = this->polymerTable_();
|
||||
if (polymer_table_id <= 0) {
|
||||
OPM_DEFLOG_THROW(std::runtime_error,
|
||||
fmt::format("Unavailable SKPRPOLY table id used for well {}", name()),
|
||||
@ -2133,7 +2133,7 @@ namespace Opm
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
if constexpr (Base::has_polymermw) {
|
||||
const int table_id = this->well_ecl_.getPolymerProperties().m_plymwinjtable;
|
||||
const int table_id = this->polymerInjTable_();
|
||||
const auto& table_func = PolymerModule::getPlymwinjTable(table_id);
|
||||
const EvalWell throughput_eval(this->primary_variables_.numWellEq() + Indices::numEq, throughput);
|
||||
EvalWell molecular_weight(this->primary_variables_.numWellEq() + Indices::numEq, 0.);
|
||||
|
@ -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,33 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
int WellInterfaceGeneric::polymerTable_() const
|
||||
{
|
||||
return this->well_ecl_.getPolymerProperties().m_skprpolytable;
|
||||
}
|
||||
|
||||
int WellInterfaceGeneric::polymerWaterTable_() const
|
||||
{
|
||||
return this->well_ecl_.getPolymerProperties().m_skprwattable;
|
||||
}
|
||||
|
||||
int WellInterfaceGeneric::polymerInjTable_() const
|
||||
{
|
||||
return this->well_ecl_.getPolymerProperties().m_plymwinjtable;
|
||||
}
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -199,8 +199,13 @@ protected:
|
||||
bool getAllowCrossFlow() const;
|
||||
|
||||
double wfoam_() const;
|
||||
double wpolymer_() const;
|
||||
double wsalt_() const;
|
||||
|
||||
int polymerTable_() const;
|
||||
int polymerInjTable_() const;
|
||||
int polymerWaterTable_() const;
|
||||
|
||||
// definition of the struct OperabilityStatus
|
||||
struct OperabilityStatus {
|
||||
bool isOperableAndSolvable() const {
|
||||
|
@ -96,16 +96,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