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.8 KiB

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