mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
WellInterface: move code using WellFoamProperties to compile unit
This commit is contained in:
parent
a0f85c8a93
commit
a29d5f81b6
@ -23,6 +23,7 @@
|
||||
#include <opm/simulators/wells/WellInterfaceGeneric.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/WellFoamProperties.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/WellTestState.hpp>
|
||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||
#include <opm/simulators/wells/PerforationData.hpp>
|
||||
@ -439,4 +440,17 @@ bool WellInterfaceGeneric::isPressureControlled(const WellState& well_state) con
|
||||
}
|
||||
}
|
||||
|
||||
double WellInterfaceGeneric::wfoam_() const
|
||||
{
|
||||
auto injectorType = this->well_ecl_.injectorType();
|
||||
|
||||
if (injectorType == InjectorType::GAS) {
|
||||
WellFoamProperties fprop = this->well_ecl_.getFoamProperties();
|
||||
return fprop.m_foamConcentration;
|
||||
} else {
|
||||
// Not a gas injection well => no foam.
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -198,6 +198,8 @@ public:
|
||||
protected:
|
||||
bool getAllowCrossFlow() const;
|
||||
|
||||
double wfoam_() const;
|
||||
|
||||
// definition of the struct OperabilityStatus
|
||||
struct OperabilityStatus {
|
||||
bool isOperableAndSolvable() const {
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <opm/common/Exceptions.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Schedule/ScheduleTypes.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/WellFoamProperties.hpp>
|
||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||
#include <opm/simulators/wells/GroupState.hpp>
|
||||
#include <opm/simulators/wells/TargetCalculator.hpp>
|
||||
@ -122,15 +121,7 @@ namespace Opm
|
||||
wfoam() const
|
||||
{
|
||||
if constexpr (has_foam) {
|
||||
auto injectorType = this->well_ecl_.injectorType();
|
||||
|
||||
if (injectorType == InjectorType::GAS) {
|
||||
WellFoamProperties fprop = this->well_ecl_.getFoamProperties();
|
||||
return fprop.m_foamConcentration;
|
||||
} else {
|
||||
// Not a gas injection well => no foam.
|
||||
return 0.0;
|
||||
}
|
||||
return this->wfoam_();
|
||||
}
|
||||
|
||||
return 0.0;
|
||||
|
Loading…
Reference in New Issue
Block a user