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.
 
 
 
 
 
 

76 lines
2.7 KiB

  1. subroutine Pump2_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. if (MP2Throttle<=0.e0) then
  13. PUMP(2)%K_throttle = 1
  14. end if
  15. if (IsPortable) then
  16. PUMP(2)%AssignmentSwitchh = 1
  17. else
  18. PUMP(2)%AssignmentSwitchh = AssignmentSwitch
  19. end if
  20. if((any(PUMP(2)%AssignmentSwitchh==(/1,2,3,4,5,7,8,11/))) .and. (MP2Switch==1) .and. (PUMP(2)%K_throttle==1) .and. (PUMP(2)%PowerFailMalf==0) .and. (Pump2Failure==0) .and. (IsStopped == .false.)) then
  21. PUMP(2)%SoundBlower = .true.
  22. Call SetSoundBlowerMP2(PUMP(2)%SoundBlower)
  23. MP2BLWR = 1
  24. PUMP(2)%N_new = MP2Throttle
  25. if (((PUMP(2)%N_new-PUMP(2)%N_old)/PUMP(2)%time_step)>193.) then
  26. PUMP(2)%N_ref = (193.*PUMP(2)%time_step)+PUMP(2)%N_old
  27. else if (((PUMP(2)%N_old-PUMP(2)%N_new)/PUMP(2)%time_step)>193.) then
  28. PUMP(2)%N_ref = (-193.*PUMP(2)%time_step)+PUMP(2)%N_old
  29. else
  30. PUMP(2)%N_ref = PUMP(2)%N_new
  31. end if
  32. Call Pump2_OnMode_Solver(2)
  33. !IF (PUMP(2)%Flow_Rate>0.) Then
  34. ! Call OpenPump2()
  35. !Else
  36. ! Call ClosePump2()
  37. !End if
  38. PUMP(2)%N_old=PUMP(2)%N_ref
  39. else
  40. if((any(PUMP(2)%AssignmentSwitchh==(/1,2,3,4,5,7,8,11/))) .and. (MP2Switch==1) .and. (IsStopped == .false.)) then
  41. PUMP(2)%SoundBlower = .true.
  42. Call SetSoundBlowerMP2(PUMP(2)%SoundBlower)
  43. MP2BLWR = 1
  44. else
  45. PUMP(2)%SoundBlower = .false.
  46. Call SetSoundBlowerMP2(PUMP(2)%SoundBlower)
  47. MP2BLWR = 0
  48. end if
  49. !PUMP(2)%N_ref = MP2Throttle
  50. Call Pump2_OffMode_Solver(2)
  51. Call ClosePump2()
  52. PUMP(2)%K_throttle = 0
  53. end if
  54. end subroutine Pump2_MainSolver