Merge pull request #4371 from akva2/wellfoamproperties_hpp_include

add missing WellFoamProperties.hpp includes
This commit is contained in:
Bård Skaflestad 2023-01-13 11:12:56 +01:00 committed by GitHub
commit c29b41ef51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 9 deletions

View File

@ -48,6 +48,7 @@
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
#include <opm/input/eclipse/Schedule/Well/WList.hpp>
#include <opm/input/eclipse/Schedule/Well/WListManager.hpp>
#include <opm/input/eclipse/Schedule/Well/WellFoamProperties.hpp>
#include <opm/input/eclipse/Schedule/Well/WellTestState.hpp>
#include <ebos/eclmpiserializer.hh>

View File

@ -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

View File

@ -198,6 +198,8 @@ public:
protected:
bool getAllowCrossFlow() const;
double wfoam_() const;
// definition of the struct OperabilityStatus
struct OperabilityStatus {
bool isOperableAndSolvable() const {

View File

@ -121,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;