Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
2.1 KiB

  1. subroutine Pump_OnMode_Solver(Pump_No)
  2. use Pumps_VARIABLES
  3. !use CPumpsVariables
  4. !use CDrillingConsoleVariables
  5. !use CDataDisplayConsoleVariables
  6. !use CSimulationVariables
  7. !use CDrillWatchVariables
  8. !use equipments_PowerLimit
  9. !use CSounds
  10. !use CWarningsVariables
  11. IMPLICIT NONE
  12. INTEGER :: Pump_No
  13. PUMP(Pump_No)%Flow_Rate = PUMP(1)%FlowRatePerSTK*4118.e0*0.01e0*(PUMP(Pump_No)%Speed/PUMP(Pump_No)%Trans_Ratio) ![gpm]
  14. PUMP(Pump_No)%Max_FlowRate = PUMP(1)%FlowRatePerSTK*4118.e0*0.01e0*PUMP(1)%MaxSPM ![gpm]
  15. 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]
  16. if ( PUMP(Pump_No)%StandPipe_Pressure>=PUMP(Pump_No)%Max_Pressure ) then ! in shart check shavad
  17. !print*, 'pumps critical'
  18. PUMP(Pump_No)%Flow_Rate = (1714.e0*PUMP(Pump_No)%Hydraulic_HorsePower)/PUMP(Pump_No)%Max_Pressure ![gpm]
  19. PUMP(Pump_No)%Speed = ( PUMP(Pump_No)%Flow_Rate/(PUMP(1)%FlowRatePerSTK*4118.e0*0.01e0) )*PUMP(Pump_No)%Trans_Ratio ![rpm]
  20. end if
  21. total_pumps%Total_Pump_GPM = PUMP(1)%Flow_Rate+PUMP(2)%Flow_Rate+PUMP(3)%Flow_Rate
  22. 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)
  23. !Call Set_MP1SPMGauge( sngl(1-PUMP(1)%SPMGaugeMalf)*real((PUMP(1)%Speed/PUMP(1)%Trans_Ratio),8) )
  24. !SPM1 = MP1SPMGauge
  25. !PUMP(1)%SoundSPM = INT(PUMP(1)%Speed/PUMP(1)%Trans_Ratio)
  26. !Call SetSoundMP1( PUMP(1)%SoundSPM )
  27. !
  28. !
  29. !
  30. !IF (PUMP(1)%Flow_Rate>0.) Then
  31. ! Call OpenPump1()
  32. !Else
  33. ! Call ClosePump1()
  34. !End if
  35. !IF (PUMP(2)%Flow_Rate>0.) Then
  36. ! Call OpenPump2()
  37. !Else
  38. ! Call ClosePump2()
  39. !End if
  40. end subroutine Pump_OnMode_Solver