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.
 
 
 
 
 
 

119 lines
4.8 KiB

  1. subroutine Drawworks_Direction
  2. Use CDrillingConsoleVariables
  3. Use CDataDisplayConsoleVariables
  4. Use Drawworks_VARIABLES
  5. IMPLICIT NONE
  6. if (Drawworks%Conv_Ratio==1.d0) then
  7. IF (Drawworks%motion==+1) THEN
  8. Call Drawworks_Free_Traction_motor_Dir
  9. if (Drawworks%w_drum_Dir<=0.) then
  10. Drawworks%motion = 0
  11. else
  12. Drawworks%motion = +1
  13. Call Drawworks_Free_Traction_motor
  14. Drawworks%w = Drawworks%w_drum*Drawworks%Conv_Ratio
  15. Drawworks%w_old = Drawworks%w_old_drum*Drawworks%Conv_Ratio
  16. end if
  17. ELSE
  18. if (((Drawworks%F_fastline*(Drawworks%Diameter/2.0d0))-(((Drawworks%Diameter/2.0d0)*Drawworks%BreakLoad)*(Drawworks%ManualBreak/100.0d0)))<=0.) then
  19. Drawworks%motion = 0
  20. Drawworks%w_drum = 0.0d0
  21. Drawworks%w_old_drum = 0.0d0
  22. Drawworks%w = Drawworks%w_drum*Drawworks%Conv_Ratio
  23. Drawworks%w_old = Drawworks%w_old_drum*Drawworks%Conv_Ratio
  24. Drawworks%Hook_Height = Drawworks%Hook_Height
  25. Drawworks%ia = 0.
  26. Drawworks%ia_old = 0.
  27. Drawworks%x = 0.
  28. Drawworks%x_old = 0.
  29. Drawworks%y = 0.
  30. Drawworks%y_old = 0.
  31. else
  32. Drawworks%motion = -1
  33. Call Drawworks_Free_Traction_motor_dawn_motion
  34. Drawworks%w = Drawworks%w_drum*Drawworks%Conv_Ratio
  35. Drawworks%w_old = Drawworks%w_old_drum*Drawworks%Conv_Ratio
  36. end if
  37. END IF
  38. else
  39. IF (Drawworks%motion==-1) THEN
  40. Drawworks%w = -Drawworks%w
  41. Drawworks%w_old = -Drawworks%w_old
  42. Drawworks%w_drum = -Drawworks%w_drum
  43. Drawworks%w_old_drum = -Drawworks%w_old_drum
  44. END IF
  45. Call Drawworks_Traction_motor_ClutchMode_Dir
  46. IF (Drawworks%w_Dir>0.) then
  47. Drawworks%motion = +1
  48. Call Drawworks_Traction_motor_ClutchMode
  49. Drawworks%w_drum = Drawworks%w/Drawworks%Conv_Ratio
  50. Drawworks%w_old_drum = Drawworks%w_old/Drawworks%Conv_Ratio
  51. ELSE
  52. Drawworks%EddyTorque = (1.039d5*exp(4.343d-4*(30.0d0*(Drawworks%w/Drawworks%Conv_Ratio)/pi)))+(-1.036d5*exp(-.047920d0*(30.0d0*(Drawworks%w/Drawworks%Conv_Ratio)/pi))) !Lbf.ft
  53. if (Drawworks%EddyTorque>115000.) then
  54. Drawworks%EddyTorque = 115000.0d0
  55. end if
  56. Drawworks%EddyTorque = 1.355817948*Drawworks%EddyTorque ![N.m]
  57. if ((Drawworks%F_fastline*(Drawworks%Diameter/2.0d0))>((((Drawworks%Diameter/2.0d0)*Drawworks%BreakLoad)*(Drawworks%ManualBreak/100.0d0))+(Drawworks%EddyTorque*(Drawworks%EddyBreak/100.0d0)))) then
  58. Drawworks%motion = -1
  59. IF (Drawworks%w_drum<0.) THEN
  60. Drawworks%w = -Drawworks%w
  61. Drawworks%w_old = -Drawworks%w_old
  62. !Drawworks%w = 0. !???????????????
  63. !Drawworks%w_old = 0. !???????????????
  64. Drawworks%w_drum = -Drawworks%w_drum
  65. Drawworks%w_old_drum = -Drawworks%w_old_drum
  66. END IF
  67. Drawworks%Conv_Ratio = 1.
  68. Call Drawworks_Free_Traction_motor_dawn_motion
  69. Drawworks%w = Drawworks%w_drum*Drawworks%Conv_Ratio
  70. Drawworks%w_old = Drawworks%w_old_drum*Drawworks%Conv_Ratio
  71. !Drawworks%w_drum = Drawworks%w/Drawworks%Conv_Ratio
  72. !Drawworks%w_old_drum = Drawworks%w_old/Drawworks%Conv_Ratio
  73. else
  74. Drawworks%motion = 0
  75. Drawworks%w_drum = 0.0d0
  76. Drawworks%w_old_drum = 0.0d0
  77. Drawworks%w = Drawworks%w_drum*Drawworks%Conv_Ratio
  78. Drawworks%w_old = Drawworks%w_old_drum*Drawworks%Conv_Ratio
  79. Drawworks%Hook_Height = Drawworks%Hook_Height
  80. Drawworks%ia = 0.
  81. Drawworks%ia_old = 0.
  82. Drawworks%x = 0.
  83. Drawworks%x_old = 0.
  84. Drawworks%y = 0.
  85. Drawworks%y_old = 0.
  86. end if
  87. END IF
  88. end if
  89. Call DWBrakeSound
  90. !print* , 'Drawworks%ia_new=' , Drawworks%ia_new
  91. !print* , 'Drawworks%ia_ref=' , Drawworks%ia_ref
  92. !print* , 'Drawworks%Vt=' , Drawworks%Vt
  93. !print* , 'Drawworks%w_new=' , Drawworks%w_new
  94. end subroutine Drawworks_Direction