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.

преди 1 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. subroutine Pump1_MainSolver
  2. use Pump_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. Call DrillingConsole_ScrLEDs
  13. Call Pump_Total_Counts
  14. if (MP1Throttle<=0.e0) then
  15. PUMP(1)%K_throttle = 1
  16. end if
  17. if (IsPortable) then
  18. PUMP(1)%AssignmentSwitchh = 1
  19. else
  20. PUMP(1)%AssignmentSwitchh = AssignmentSwitch
  21. end if
  22. if((any(PUMP(1)%AssignmentSwitchh==(/1,2,3,4,9,10/))) .and. (MP1CPSwitch==-1) .and. (PUMP(1)%K_throttle==1) .and. (PUMP(1)%PowerFailMalf==0) .and. (Pump1Failure==0) .and. (IsStopped == .false.)) then
  23. PUMP(1)%SoundBlower = .true.
  24. Call SetSoundBlowerMP1(PUMP(1)%SoundBlower)
  25. MP1BLWR = 1
  26. !Call DrillingConsole_ScrLEDs
  27. !Call Pump_Total_Counts
  28. PUMP(1)%N_new = MP1Throttle
  29. if (((PUMP(1)%N_new-PUMP(1)%N_old)/PUMP(1)%time_step)>193.) then
  30. PUMP(1)%N_ref =(193.*PUMP(1)%time_step)+PUMP(1)%N_old
  31. else if (((PUMP(1)%N_old-PUMP(1)%N_new)/PUMP(1)%time_step)>193.) then
  32. PUMP(1)%N_ref = (-193.*PUMP(1)%time_step)+PUMP(1)%N_old
  33. else
  34. PUMP(1)%N_ref = PUMP(1)%N_new
  35. end if
  36. Call Pump1_OnMode_Solver(1)
  37. !IF (PUMP(1)%Flow_Rate>0.) Then
  38. ! Call OpenPump1()
  39. !Else
  40. ! Call ClosePump1()
  41. !End if
  42. PUMP(1)%N_old = PUMP(1)%N_ref
  43. else if( (MP1CPSwitch==1) .and. (PUMP(1)%K_throttle==1) .and. (PUMP(3)%PowerFailMalf==0) .and. (Pump3Failure==0) .and. (IsStopped == .false.)) then
  44. PUMP(3)%N_new = MP1Throttle
  45. if (((PUMP(3)%N_new-PUMP(3)%N_old)/PUMP(3)%time_step)>193.) then
  46. PUMP(3)%N_ref =(193.*PUMP(3)%time_step)+PUMP(3)%N_old
  47. else if (((PUMP(3)%N_old-PUMP(3)%N_new)/PUMP(3)%time_step)>193.) then
  48. PUMP(3)%N_ref = (-193.*PUMP(3)%time_step)+PUMP(3)%N_old
  49. else
  50. PUMP(3)%N_ref = PUMP(3)%N_new
  51. end if
  52. Call Pump3_OnMode_Solver
  53. IF (PUMP(3)%Flow_Rate>0.) Then
  54. Call OpenCementPump()
  55. Else
  56. Call CloseCementPump()
  57. End if
  58. PUMP(3)%N_old = PUMP(3)%N_ref
  59. else
  60. if ((any(PUMP(1)%AssignmentSwitchh==(/1,2,3,4,9,10/))) .and. (MP1CPSwitch==-1) .and. (IsStopped == .false.)) then
  61. PUMP(1)%SoundBlower = .true.
  62. Call SetSoundBlowerMP1(PUMP(1)%SoundBlower)
  63. MP1BLWR = 1
  64. else
  65. PUMP(1)%SoundBlower = .false.
  66. Call SetSoundBlowerMP1(PUMP(1)%SoundBlower)
  67. MP1BLWR = 0
  68. end if
  69. Call Pump1_OffMode_Solver(1)
  70. Call ClosePump1()
  71. Call Pump3_OffMode_Solver
  72. Call CloseCementPump()
  73. PUMP(1)%K_throttle = 0
  74. end if
  75. end subroutine Pump1_MainSolver