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.
 
 
 
 
 
 

165 lines
9.7 KiB

  1. subroutine Drawworks_Direction
  2. use CDrillingConsoleVariables
  3. use SimulationVariables
  4. use SimulationVariables
  5. use CDataDisplayConsole
  6. use SimulationVariables
  7. use SimulationVariables !@
  8. IMPLICIT NONE
  9. ! ! if (data%State%Drawworks%Switch==1) then !Up
  10. ! if (data%State%Drawworks%Throttle >= 0.d0) then !Up
  11. ! data%State%Drawworks%motion = +1
  12. ! data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ?
  13. ! data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s]
  14. ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height+(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m]
  15. ! ! else if (data%State%Drawworks%Switch==-1) then !Down
  16. ! else if (data%State%Drawworks%Throttle < 0.d0) then !Down
  17. ! data%State%Drawworks%motion = -1
  18. ! data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ?
  19. ! data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s]
  20. ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height-(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m]
  21. ! !else if (data%State%Drawworks%Switch==0) then !Off
  22. ! ! data%State%Drawworks%motion = 0
  23. ! ! data%State%Drawworks%w_old_drum = 0.d0
  24. ! ! data%State%Drawworks%w_drum = 0.d0
  25. ! ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
  26. ! end if
  27. if ((data%State%Drawworks%Throttle>0.d0) .or. (data%State%Drawworks%Throttle==0.d0 .and. data%State%Drawworks%Speed/=0.d0 .and. data%State%Drawworks%motion==+1)) then !Up
  28. data%State%Drawworks%motion = +1
  29. data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ?
  30. data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s]
  31. data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height+(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m]
  32. else if ((data%State%Drawworks%Throttle<0.d0) .or. (data%State%Drawworks%Throttle==0.d0 .and. data%State%Drawworks%Speed/=0.d0 .and. data%State%Drawworks%motion==-1)) then !Down
  33. data%State%Drawworks%motion = -1
  34. data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ?
  35. data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s]
  36. data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height-(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m]
  37. else !fixed
  38. data%State%Drawworks%motion = 0
  39. data%State%Drawworks%w_old_drum = 0.d0
  40. data%State%Drawworks%w_drum = 0.d0
  41. data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
  42. end if
  43. !if (data%State%Drawworks%Conv_Ratio==1.d0) then
  44. !
  45. !
  46. ! IF (data%State%Drawworks%motion==+1) THEN
  47. ! Call Drawworks_Free_Traction_motor_Dir
  48. ! if (data%State%Drawworks%w_drum_Dir<=0.) then
  49. ! data%State%Drawworks%motion = 0
  50. ! else
  51. ! data%State%Drawworks%motion = +1
  52. ! Call Drawworks_Free_Traction_motor
  53. ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
  54. ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
  55. ! end if
  56. ! ELSE
  57. ! if (((data%State%Drawworks%F_fastline*(data%State%Drawworks%Diameter/2.0d0))-(((data%State%Drawworks%Diameter/2.0d0)*data%State%Drawworks%BreakLoad)*(data%State%Drawworks%ManualBreak/100.0d0)))<=0.) then
  58. ! data%State%Drawworks%motion = 0
  59. ! data%State%Drawworks%w_drum = 0.0d0
  60. ! data%State%Drawworks%w_old_drum = 0.0d0
  61. ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
  62. ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
  63. ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
  64. !
  65. ! data%State%Drawworks%ia = 0.
  66. ! data%State%Drawworks%ia_old = 0.
  67. ! data%State%Drawworks%x = 0.
  68. ! data%State%Drawworks%x_old = 0.
  69. ! data%State%Drawworks%y = 0.
  70. ! data%State%Drawworks%y_old = 0.
  71. ! else
  72. ! data%State%Drawworks%motion = -1
  73. ! Call Drawworks_Free_Traction_motor_dawn_motion
  74. ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
  75. ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
  76. ! end if
  77. !
  78. ! END IF
  79. !
  80. !
  81. !else
  82. !
  83. ! IF (data%State%Drawworks%motion==-1) THEN
  84. ! data%State%Drawworks%w = -data%State%Drawworks%w
  85. ! data%State%Drawworks%w_old = -data%State%Drawworks%w_old
  86. ! data%State%Drawworks%w_drum = -data%State%Drawworks%w_drum
  87. ! data%State%Drawworks%w_old_drum = -data%State%Drawworks%w_old_drum
  88. ! END IF
  89. ! Call Drawworks_Traction_motor_ClutchMode_Dir
  90. ! IF (data%State%Drawworks%w_Dir>0.d0) then
  91. !
  92. ! data%State%Drawworks%motion = +1
  93. ! Call Drawworks_Traction_motor_ClutchMode
  94. ! data%State%Drawworks%w_drum = data%State%Drawworks%w/data%State%Drawworks%Conv_Ratio
  95. ! data%State%Drawworks%w_old_drum = data%State%Drawworks%w_old/data%State%Drawworks%Conv_Ratio
  96. ! ELSE
  97. ! data%State%Drawworks%EddyTorque = (1.039d5*exp(4.343d-4*(30.0d0*(data%State%Drawworks%w/data%State%Drawworks%Conv_Ratio)/pi)))+(-1.036d5*exp(-.047920d0*(30.0d0*(data%State%Drawworks%w/data%State%Drawworks%Conv_Ratio)/pi))) !Lbf.ft
  98. ! if (data%State%Drawworks%EddyTorque>115000.) then
  99. ! data%State%Drawworks%EddyTorque = 115000.0d0
  100. ! end if
  101. ! data%State%Drawworks%EddyTorque = 1.355817948*data%State%Drawworks%EddyTorque ![N.m]
  102. ! if ((data%State%Drawworks%F_fastline*(data%State%Drawworks%Diameter/2.0d0))>((((data%State%Drawworks%Diameter/2.0d0)*data%State%Drawworks%BreakLoad)*(data%State%Drawworks%ManualBreak/100.0d0))+(data%State%Drawworks%EddyTorque*(data%State%Drawworks%EddyBreak/100.0d0)))) then
  103. ! data%State%Drawworks%motion = -1
  104. !
  105. ! IF (data%State%Drawworks%w_drum<0.) THEN
  106. ! data%State%Drawworks%w = -data%State%Drawworks%w
  107. ! data%State%Drawworks%w_old = -data%State%Drawworks%w_old
  108. ! !data%State%Drawworks%w = 0. !???????????????
  109. ! !data%State%Drawworks%w_old = 0. !???????????????
  110. ! data%State%Drawworks%w_drum = -data%State%Drawworks%w_drum
  111. ! data%State%Drawworks%w_old_drum = -data%State%Drawworks%w_old_drum
  112. ! END IF
  113. !
  114. ! data%State%Drawworks%Conv_Ratio = 1.
  115. ! Call Drawworks_Free_Traction_motor_dawn_motion
  116. ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
  117. ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
  118. ! !data%State%Drawworks%w_drum = data%State%Drawworks%w/data%State%Drawworks%Conv_Ratio
  119. ! !data%State%Drawworks%w_old_drum = data%State%Drawworks%w_old/data%State%Drawworks%Conv_Ratio
  120. ! else
  121. ! data%State%Drawworks%motion = 0
  122. ! data%State%Drawworks%w_drum = 0.0d0
  123. ! data%State%Drawworks%w_old_drum = 0.0d0
  124. ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
  125. ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
  126. ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
  127. !
  128. ! data%State%Drawworks%ia = 0.
  129. ! data%State%Drawworks%ia_old = 0.
  130. ! data%State%Drawworks%x = 0.
  131. ! data%State%Drawworks%x_old = 0.
  132. ! data%State%Drawworks%y = 0.
  133. ! data%State%Drawworks%y_old = 0.
  134. ! end if
  135. !
  136. ! END IF
  137. !
  138. !end if
  139. !Call DWBrakeSound
  140. end subroutine Drawworks_Direction