subroutine Pump1_MainSolver use Pumps_VARIABLES implicit none !Call DrillingConsole_ScrLEDs Call Pumps_Inputs if (PUMP(1)%Throttle<=0.e0) then PUMP(1)%K_throttle = 1 end if if((any(PUMP(1)%AssignmentSwitchh==(/1,2,3,4,9,10/))) .and. (PUMP(1)%Switch==-1) .and. (PUMP(1)%K_throttle==1) .and. (PUMP(1)%PowerFailMalf==0) .and. (PUMP(1)%Failure==0) .and. (Pumps_IsStopped == .false.)) then !!print*, 'pumps on' PUMP(1)%SoundBlower = .true. !Call SetSoundBlowerMP1(PUMP(1)%SoundBlower) !MP1BLWR = 1 !========================== Pump 1 Rate limit ========================== if (((PUMP(1)%N_new-PUMP(1)%N_old)/PUMP(1)%time_step)>PUMP(1)%RateChange) then PUMP(1)%Speed =(PUMP(1)%RateChange*PUMP(1)%time_step)+PUMP(1)%N_old else if (((PUMP(1)%N_old-PUMP(1)%N_new)/PUMP(1)%time_step)>PUMP(1)%RateChange) then PUMP(1)%Speed = (-PUMP(1)%RateChange*PUMP(1)%time_step)+PUMP(1)%N_old else PUMP(1)%Speed = PUMP(1)%N_new end if !======================================================================= Call Pump_OnMode_Solver(1) else if ((any(PUMP(1)%AssignmentSwitchh==(/1,2,3,4,9,10/))) .and. (PUMP(1)%Switch==-1) .and. (Pumps_IsStopped == .false.)) then PUMP(1)%SoundBlower = .true. !Call SetSoundBlowerMP1(PUMP(1)%SoundBlower) else PUMP(1)%SoundBlower = .false. !Call SetSoundBlowerMP1(PUMP(1)%SoundBlower) end if if ((any(PUMP(1)%AssignmentSwitchh==(/1,2,3,4,9,10/))) .and. (PUMP(1)%Switch==-1) .and. (Pumps_IsStopped == .false.) .and. (PUMP(1)%PowerFailMalf==0) .and. (PUMP(1)%Failure==0)) then !MP1BLWR = 1 else !MP1BLWR = 0 end if Call Pump_OffMode_Solver(1) !Call ClosePump1() PUMP(1)%K_throttle = 0 end if PUMP(1)%N_old = PUMP(1)%Speed print*, 'Q , P , Hp , N=' print*, PUMP(1)%Flow_Rate , PUMP(1)%StandPipe_Pressure , PUMP(1)%Hydraulic_HorsePower , PUMP(1)%Speed pause end subroutine Pump1_MainSolver