bool Well::canOpen(size_t currentStep) const { bool canOpen = true; if (!getAllowCrossFlow()) { if ( isInjector(currentStep) ) { if (getInjectionProperties(currentStep).surfaceInjectionRate == 0) {; canOpen = false; } } else { if ( (getProductionProperties(currentStep).WaterRate + getProductionProperties(currentStep).OilRate + getProductionProperties(currentStep).GasRate) == 0) { canOpen = false; } } } return canOpen; }
bool Well::canOpen(size_t currentStep) const { if( getAllowCrossFlow() ) return true; if( isInjector( currentStep ) ) return getInjectionProperties( currentStep ).surfaceInjectionRate != 0; const auto& prod = getProductionProperties( currentStep ); return (prod.WaterRate + prod.OilRate + prod.GasRate) != 0; }