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.

TopDrive_OffMode.f90 1.1 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839
  1. subroutine TopDrive_OffMode
  2. Use TopDrive_VARIABLES
  3. IMPLICIT NONE
  4. TDS%N_new = 0.d0
  5. !==================================================================
  6. ! Rate limit for off Mode
  7. if (((TDS%N_old-TDS%N_new)/TDS%time_step)>(2.d0*TDS%RateChange)) then ! baraye 0 shodan RateChange ro *2 karde ???
  8. TDS%N_ref = (-(2.d0*TDS%RateChange)*TDS%time_step)+TDS%N_old
  9. Call TopDrive_Solver
  10. !==================================================================
  11. else
  12. TDS%N_ref = 0.d0
  13. TDS%N_new = 0.d0
  14. TDS%N_old = 0.d0
  15. TDS%Speed = 0.d0
  16. TDS%TDS_wOld = 0.d0
  17. TDS%OperationFaultLed = 0
  18. TDS%Speed = 0.d0 !Speed [RPM]
  19. TDS%RpmGaugeOutput = TDS%Speed
  20. TDS%RPMUnityOutput = -TDS%RpmGaugeOutput
  21. TDS%SoundRPM = 0
  22. TDS%Torque = 0.d0 ![ft.lbf]
  23. TDS%TorqueGaugeOutput = 0.d0 ![ft.lbf]
  24. TDS%OldPowerMode = 1
  25. TDS%OldPowerMode = 0
  26. End if
  27. end subroutine