subroutine Pump_OnMode_Solver(Pump_No) use Pumps_VARIABLES !use CPumpsVariables !use CDrillingConsoleVariables !use CDataDisplayConsoleVariables !use CSimulationVariables !use CDrillWatchVariables !use equipments_PowerLimit !use CSounds !use CWarningsVariables IMPLICIT NONE INTEGER :: Pump_No PUMP(Pump_No)%Flow_Rate = PUMP(1)%FlowRatePerSTK*4118.e0*0.01e0*(PUMP(Pump_No)%Speed/PUMP(Pump_No)%Trans_Ratio) ![gpm] PUMP(Pump_No)%Max_FlowRate = PUMP(1)%FlowRatePerSTK*4118.e0*0.01e0*PUMP(1)%MaxSPM ![gpm] PUMP(Pump_No)%Hydraulic_HorsePower = ( (PUMP(Pump_No)%Flow_Rate/0.01e0)*PUMP(Pump_No)%Max_Pressure)/(168067.e0*PUMP(Pump_No)%Mech_Efficiency) ![HHP] if ( PUMP(Pump_No)%StandPipe_Pressure>=PUMP(Pump_No)%Max_Pressure ) then ! in shart check shavad !print*, 'pumps critical' PUMP(Pump_No)%Flow_Rate = (1714.e0*PUMP(Pump_No)%Hydraulic_HorsePower)/PUMP(Pump_No)%Max_Pressure ![gpm] PUMP(Pump_No)%Speed = ( PUMP(Pump_No)%Flow_Rate/(PUMP(1)%FlowRatePerSTK*4118.e0*0.01e0) )*PUMP(Pump_No)%Trans_Ratio ![rpm] end if total_pumps%Total_Pump_GPM = PUMP(1)%Flow_Rate+PUMP(2)%Flow_Rate+PUMP(3)%Flow_Rate total_pumps%Total_Pump_SPM = (PUMP(1)%Speed/PUMP(1)%Trans_Ratio)+(PUMP(2)%Speed/PUMP(2)%Trans_Ratio)+(PUMP(3)%Speed/PUMP(3)%Trans_Ratio) !Call Set_MP1SPMGauge( sngl(1-PUMP(1)%SPMGaugeMalf)*real((PUMP(1)%Speed/PUMP(1)%Trans_Ratio),8) ) !SPM1 = MP1SPMGauge !PUMP(1)%SoundSPM = INT(PUMP(1)%Speed/PUMP(1)%Trans_Ratio) !Call SetSoundMP1( PUMP(1)%SoundSPM ) ! ! ! !IF (PUMP(1)%Flow_Rate>0.) Then ! Call OpenPump1() !Else ! Call ClosePump1() !End if !IF (PUMP(2)%Flow_Rate>0.) Then ! Call OpenPump2() !Else ! Call ClosePump2() !End if end subroutine Pump_OnMode_Solver