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.

Rtable_MainSolver.f90 2.2 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. subroutine RTable_MainSolver
  2. Use RTable_VARIABLES
  3. IMPLICIT NONE
  4. Call RTable_Inputs
  5. if (RTable%Throttle<=0.d0) then
  6. RTable%K_throttle = 1
  7. end if
  8. if ( (any(RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (RTable%Switch==-1) ) then
  9. RTable%SoundBlower = .true.
  10. RTable%BLWR = 1
  11. !======================= Rotary Table Rate_limit =======================
  12. if (((RTable%N_new-RTable%N_old)/RTable%time_step)>RTable%RateChange) then
  13. RTable%N_ref = (RTable%RateChange*RTable%time_step)+RTable%N_old
  14. else if (((RTable%N_old-RTable%N_new)/RTable%time_step)>RTable%RateChange) then
  15. RTable%N_ref = (-RTable%RateChange*RTable%time_step)+RTable%N_old
  16. else
  17. RTable%N_ref = RTable%N_new
  18. end if
  19. !=======================================================================
  20. CALL RTable_OnModeSolver
  21. else if ( (any(RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (RTable%Switch==1) .and. (RTable%K_throttle==1) ) then
  22. RTable%SoundBlower = .true.
  23. RTable%BLWR = 1
  24. !======================= Rotary Table Rate_limit =======================
  25. if (((RTable%N_new-RTable%N_old)/RTable%time_step)>RTable%RateChange) then
  26. RTable%N_ref = (RTable%RateChange*RTable%time_step)+RTable%N_old
  27. else if (((RTable%N_old-RTable%N_new)/RTable%time_step)>RTable%RateChange) then
  28. RTable%N_ref = (-RTable%RateChange*RTable%time_step)+RTable%N_old
  29. else
  30. RTable%N_ref = RTable%N_new
  31. end if
  32. !=======================================================================
  33. CALL RTable_OnModeSolver
  34. else
  35. if((any(RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (RTable%Switch/=0)) then
  36. RTable%SoundBlower = .true.
  37. RTable%BLWR = 1
  38. else
  39. RTable%SoundBlower = .false.
  40. RTable%BLWR = 0
  41. end if
  42. Call RTable_OffMode
  43. RTable%K_throttle = 0
  44. end if
  45. Call RTable_Outputs
  46. RTable%N_old = RTable%N_ref
  47. end subroutine RTable_MainSolver