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.4 KiB

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