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.

Pump3_MainSolver.f90 1.2 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. subroutine Pump3_MainSolver
  2. Use Pumps_VARIABLES
  3. Implicit none
  4. if (PUMP(3)%Throttle<=0.d0) then
  5. PUMP(3)%K_throttle = 1
  6. end if
  7. if((PUMP(3)%Switch==1) .and. (PUMP(3)%K_throttle==1) .and. (PUMP(3)%PowerFailMalf==0) .and. (PUMP(3)%Failure==0)) then
  8. !========================== Pump 3 Rate limit ==========================
  9. if (((PUMP(3)%N_new-PUMP(3)%N_old)/PUMP(3)%time_step)>PUMP(3)%RateChange) then
  10. PUMP(3)%Speed =(PUMP(3)%RateChange*PUMP(3)%time_step)+PUMP(3)%N_old ![RPM]
  11. else if (((PUMP(3)%N_old-PUMP(3)%N_new)/PUMP(3)%time_step)>PUMP(3)%RateChange) then
  12. PUMP(3)%Speed = (-PUMP(3)%RateChange*PUMP(3)%time_step)+PUMP(3)%N_old
  13. else
  14. PUMP(3)%Speed = PUMP(3)%N_new
  15. end if
  16. !=======================================================================
  17. Call Pump_OnMode_Solver(3)
  18. else
  19. Call Pump_OffMode_Solver(3)
  20. PUMP(3)%K_throttle = 0
  21. end if
  22. PUMP(3)%N_old = PUMP(3)%Speed
  23. end subroutine Pump3_MainSolver