Example #1
0
    bool Well::setProductionProperties(size_t timeStep , const WellProductionProperties newProperties) {
        if (isInjector(timeStep))
            switchToProducer( timeStep );

        m_isProducer->update(timeStep , true);
        return m_productionProperties->update(timeStep, newProperties);
    }
Example #2
0
    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;
    }
Example #3
0
    bool Well::setProductionProperties(size_t timeStep , const WellProductionProperties& newProperties) {
        if (isInjector(timeStep))
            switchToProducer( timeStep );

        m_isProducer.update(timeStep , true);
        bool update = m_productionProperties.update(timeStep, newProperties);
        if (update)
            addEvent( ScheduleEvents::PRODUCTION_UPDATE, timeStep );

        return update;
    }
Example #4
0
 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;
 }