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.

Pump1_OffMode_Solver.f90 1.9 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. subroutine Pump1_OffMode_Solver(Pump_No)
  2. use Pump_VARIABLES
  3. use CPumpsVariables
  4. use CDrillingConsoleVariables
  5. use CDataDisplayConsoleVariables
  6. use CSimulationVariables
  7. use CDrillWatchVariables
  8. use CSounds
  9. IMPLICIT NONE
  10. INTEGER :: Pump_No
  11. CALL Pump_INPUTS
  12. !==================================================================
  13. ! Rate limit for off Mode
  14. if (((PUMP(Pump_No)%N_old-0.0d0)/PUMP(Pump_No)%time_step)>386.0d0) then
  15. PUMP(Pump_No)%N_ref = (-386.0d0*PUMP(Pump_No)%time_step)+PUMP(Pump_No)%N_old
  16. !else
  17. ! PUMP(1)%N_ref=0.0d0
  18. !end if
  19. Call Pump1_OnMode_Solver(Pump_No)
  20. PUMP(Pump_No)%N_old = PUMP(Pump_No)%N_ref
  21. !==================================================================
  22. else
  23. PUMP(Pump_No)%Speed = 0.0d0
  24. PUMP(Pump_No)%w = 0.0d0
  25. PUMP(Pump_No)%w_old = 0.0d0
  26. PUMP(Pump_No)%w_new = 0.0d0
  27. PUMP(Pump_No)%ia = 0.0d0
  28. PUMP(Pump_No)%ia_old = 0.0d0
  29. PUMP(Pump_No)%ia_new = 0.0d0
  30. PUMP(Pump_No)%x = 0.0d0
  31. PUMP(Pump_No)%x_old = 0.0d0
  32. PUMP(Pump_No)%x_new = 0.0d0
  33. Call Pump_Solver(Pump_No)
  34. Call Pump_Total_Counts
  35. Call Set_MP1SPMGauge( sngl(1-PUMP(1)%SPMGaugeMalf)*real((PUMP(1)%Speed/PUMP(1)%Trans_Ratio),8) )
  36. SPM1 = MP1SPMGauge
  37. PUMP(1)%SoundSPM = INT(PUMP(1)%Speed/PUMP(1)%Trans_Ratio)
  38. Call SetSoundMP1( PUMP(1)%SoundSPM )
  39. !Call Set_MP2SPMGauge( real((PUMP(2)%Speed/PUMP(2)%Trans_Ratio),8) )
  40. !SPM2 = MP2SPMGauge
  41. End if
  42. end subroutine Pump1_OffMode_Solver