Simulation Core
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

57 lines
2.2 KiB

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