mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
WellInterface: move code using WellBrineProperties to compile unit
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <opm/simulators/wells/WellInterfaceGeneric.hpp>
|
#include <opm/simulators/wells/WellInterfaceGeneric.hpp>
|
||||||
|
|
||||||
|
#include <opm/input/eclipse/Schedule/Well/WellBrineProperties.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
|
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Well/WellFoamProperties.hpp>
|
#include <opm/input/eclipse/Schedule/Well/WellFoamProperties.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Well/WellTestState.hpp>
|
#include <opm/input/eclipse/Schedule/Well/WellTestState.hpp>
|
||||||
@@ -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
|
} // namespace Opm
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ protected:
|
|||||||
bool getAllowCrossFlow() const;
|
bool getAllowCrossFlow() const;
|
||||||
|
|
||||||
double wfoam_() const;
|
double wfoam_() const;
|
||||||
|
double wsalt_() const;
|
||||||
|
|
||||||
// definition of the struct OperabilityStatus
|
// definition of the struct OperabilityStatus
|
||||||
struct OperabilityStatus {
|
struct OperabilityStatus {
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
#include <opm/common/Exceptions.hpp>
|
#include <opm/common/Exceptions.hpp>
|
||||||
|
|
||||||
#include <opm/input/eclipse/Schedule/ScheduleTypes.hpp>
|
#include <opm/input/eclipse/Schedule/ScheduleTypes.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Well/WellBrineProperties.hpp>
|
|
||||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||||
#include <opm/simulators/wells/GroupState.hpp>
|
#include <opm/simulators/wells/GroupState.hpp>
|
||||||
#include <opm/simulators/wells/TargetCalculator.hpp>
|
#include <opm/simulators/wells/TargetCalculator.hpp>
|
||||||
@@ -136,15 +135,7 @@ namespace Opm
|
|||||||
wsalt() const
|
wsalt() const
|
||||||
{
|
{
|
||||||
if constexpr (has_brine) {
|
if constexpr (has_brine) {
|
||||||
auto injectorType = this->well_ecl_.injectorType();
|
return this->wsalt_();
|
||||||
|
|
||||||
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 0.0;
|
return 0.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user