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.
 
 
 
 
 
 

59 lines
2.3 KiB

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