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.
 
 
 
 
 
 

57 lines
1.7 KiB

  1. subroutine Pump2_MainSolver
  2. Use Pumps_VARIABLES
  3. Implicit none
  4. if (PUMP(2)%Throttle<=0.d0) then
  5. PUMP(2)%K_throttle = 1
  6. end if
  7. if((any(PUMP(2)%AssignmentSwitchh==(/1,2,3,4,5,7,8,11/))) .and. (PUMP(2)%Switch==-1) .and. (PUMP(2)%K_throttle==1) .and. (PUMP(2)%PowerFailMalf==0) .and. (PUMP(2)%Failure==0)) then
  8. PUMP(2)%SoundBlower = .true.
  9. PUMP(2)%BLWR = 1
  10. !========================== Pump 2 Rate limit ==========================
  11. if (((PUMP(2)%N_new-PUMP(2)%N_old)/PUMP(2)%time_step)>PUMP(2)%RateChange) then
  12. PUMP(2)%Speed =(PUMP(2)%RateChange*PUMP(2)%time_step)+PUMP(2)%N_old
  13. else if (((PUMP(2)%N_old-PUMP(2)%N_new)/PUMP(2)%time_step)>PUMP(2)%RateChange) then
  14. PUMP(2)%Speed = (-PUMP(2)%RateChange*PUMP(2)%time_step)+PUMP(2)%N_old
  15. else
  16. PUMP(2)%Speed = PUMP(2)%N_new
  17. end if
  18. !=======================================================================
  19. Call Pump_OnMode_Solver(2)
  20. else
  21. if ((any(PUMP(2)%AssignmentSwitchh==(/1,2,3,4,5,7,8,11/))) .and. (PUMP(2)%Switch==-1)) then
  22. PUMP(2)%SoundBlower = .true.
  23. else
  24. PUMP(2)%SoundBlower = .false.
  25. end if
  26. if ((any(PUMP(2)%AssignmentSwitchh==(/1,2,3,4,5,7,8,11/))) .and. (PUMP(2)%Switch==-1) .and. (PUMP(2)%PowerFailMalf==0) .and. (PUMP(2)%Failure==0)) then
  27. PUMP(2)%BLWR = 1
  28. else
  29. PUMP(2)%BLWR = 0
  30. end if
  31. Call Pump_OffMode_Solver(2)
  32. PUMP(2)%K_throttle = 0
  33. end if
  34. PUMP(2)%N_old = PUMP(2)%Speed
  35. end subroutine Pump2_MainSolver