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.
 
 
 
 
 
 

41 lines
1.5 KiB

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