mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 02:00:59 -06:00
adding function underPredictionMode() to WellInterface
to indicate whether a well is under prediction mode.
This commit is contained in:
parent
9bfa39224f
commit
01efbc639c
@ -312,6 +312,8 @@ namespace Opm
|
||||
bool checkRateEconLimits(const WellEconProductionLimits& econ_production_limits,
|
||||
const WellState& well_state) const;
|
||||
|
||||
bool underPredictionMode() const;
|
||||
|
||||
bool wellHasTHPConstraints() const;
|
||||
|
||||
// Component fractions for each phase for the well
|
||||
|
@ -446,6 +446,31 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
bool
|
||||
WellInterface<TypeTag>::
|
||||
underPredictionMode() const
|
||||
{
|
||||
bool under_prediction_mode = false;
|
||||
|
||||
switch( well_type_ ) {
|
||||
case PRODUCER:
|
||||
under_prediction_mode = well_ecl_->getProductionProperties(current_step_).predictionMode;
|
||||
break;
|
||||
case INJECTOR:
|
||||
under_prediction_mode = well_ecl_->getInjectionProperties(current_step_).predictionMode;
|
||||
break;
|
||||
default:
|
||||
OPM_THROW(std::logic_error, "Expected PRODUCER or INJECTOR type for well " << name());
|
||||
}
|
||||
|
||||
return under_prediction_mode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
bool
|
||||
WellInterface<TypeTag>::
|
||||
|
Loading…
Reference in New Issue
Block a user