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_MainSolver.f90 2.3 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. subroutine Pump1_MainSolver
  2. use Pumps_VARIABLES
  3. implicit none
  4. !Call DrillingConsole_ScrLEDs
  5. Call Pumps_Inputs
  6. if (PUMP(1)%Throttle<=0.e0) then
  7. PUMP(1)%K_throttle = 1
  8. end if
  9. if((any(PUMP(1)%AssignmentSwitchh==(/1,2,3,4,9,10/))) .and. (PUMP(1)%Switch==-1) .and. (PUMP(1)%K_throttle==1) .and. (PUMP(1)%PowerFailMalf==0) .and. (PUMP(1)%Failure==0) .and. (Pumps_IsStopped == .false.)) then
  10. !!print*, 'pumps on'
  11. PUMP(1)%SoundBlower = .true.
  12. !Call SetSoundBlowerMP1(PUMP(1)%SoundBlower)
  13. !MP1BLWR = 1
  14. !========================== Pump 1 Rate limit ==========================
  15. if (((PUMP(1)%N_new-PUMP(1)%N_old)/PUMP(1)%time_step)>PUMP(1)%RateChange) then
  16. PUMP(1)%Speed =(PUMP(1)%RateChange*PUMP(1)%time_step)+PUMP(1)%N_old
  17. else if (((PUMP(1)%N_old-PUMP(1)%N_new)/PUMP(1)%time_step)>PUMP(1)%RateChange) then
  18. PUMP(1)%Speed = (-PUMP(1)%RateChange*PUMP(1)%time_step)+PUMP(1)%N_old
  19. else
  20. PUMP(1)%Speed = PUMP(1)%N_new
  21. end if
  22. !=======================================================================
  23. Call Pump_OnMode_Solver(1)
  24. else
  25. if ((any(PUMP(1)%AssignmentSwitchh==(/1,2,3,4,9,10/))) .and. (PUMP(1)%Switch==-1) .and. (Pumps_IsStopped == .false.)) then
  26. PUMP(1)%SoundBlower = .true.
  27. !Call SetSoundBlowerMP1(PUMP(1)%SoundBlower)
  28. else
  29. PUMP(1)%SoundBlower = .false.
  30. !Call SetSoundBlowerMP1(PUMP(1)%SoundBlower)
  31. end if
  32. if ((any(PUMP(1)%AssignmentSwitchh==(/1,2,3,4,9,10/))) .and. (PUMP(1)%Switch==-1) .and. (Pumps_IsStopped == .false.) .and. (PUMP(1)%PowerFailMalf==0) .and. (PUMP(1)%Failure==0)) then
  33. !MP1BLWR = 1
  34. else
  35. !MP1BLWR = 0
  36. end if
  37. Call Pump_OffMode_Solver(1)
  38. !Call ClosePump1()
  39. PUMP(1)%K_throttle = 0
  40. end if
  41. PUMP(1)%N_old = PUMP(1)%Speed
  42. print*, 'Q , P , Hp , N='
  43. print*, PUMP(1)%Flow_Rate , PUMP(1)%StandPipe_Pressure , PUMP(1)%Hydraulic_HorsePower , PUMP(1)%Speed
  44. pause
  45. end subroutine Pump1_MainSolver