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.
 
 
 
 
 
 

152 rivejä
7.8 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. data%State%Drawworks%motion = +1
  11. data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ?
  12. data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s]
  13. 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]
  14. else if (data%State%Drawworks%Switch==-1) then !Down
  15. data%State%Drawworks%motion = -1
  16. data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ?
  17. data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s]
  18. 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]
  19. !else if (data%State%Drawworks%Switch==0) then !Off
  20. ! data%State%Drawworks%motion = 0
  21. ! data%State%Drawworks%w_old_drum = 0.d0
  22. ! data%State%Drawworks%w_drum = 0.d0
  23. ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
  24. end if
  25. !if (data%State%Drawworks%Conv_Ratio==1.d0) then
  26. !
  27. !
  28. ! IF (data%State%Drawworks%motion==+1) THEN
  29. ! Call Drawworks_Free_Traction_motor_Dir
  30. ! if (data%State%Drawworks%w_drum_Dir<=0.) then
  31. ! data%State%Drawworks%motion = 0
  32. ! else
  33. ! data%State%Drawworks%motion = +1
  34. ! Call Drawworks_Free_Traction_motor
  35. ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
  36. ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
  37. ! end if
  38. ! ELSE
  39. ! 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
  40. ! data%State%Drawworks%motion = 0
  41. ! data%State%Drawworks%w_drum = 0.0d0
  42. ! data%State%Drawworks%w_old_drum = 0.0d0
  43. ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
  44. ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
  45. ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
  46. !
  47. ! data%State%Drawworks%ia = 0.
  48. ! data%State%Drawworks%ia_old = 0.
  49. ! data%State%Drawworks%x = 0.
  50. ! data%State%Drawworks%x_old = 0.
  51. ! data%State%Drawworks%y = 0.
  52. ! data%State%Drawworks%y_old = 0.
  53. ! else
  54. ! data%State%Drawworks%motion = -1
  55. ! Call Drawworks_Free_Traction_motor_dawn_motion
  56. ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
  57. ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
  58. ! end if
  59. !
  60. ! END IF
  61. !
  62. !
  63. !else
  64. !
  65. ! IF (data%State%Drawworks%motion==-1) THEN
  66. ! data%State%Drawworks%w = -data%State%Drawworks%w
  67. ! data%State%Drawworks%w_old = -data%State%Drawworks%w_old
  68. ! data%State%Drawworks%w_drum = -data%State%Drawworks%w_drum
  69. ! data%State%Drawworks%w_old_drum = -data%State%Drawworks%w_old_drum
  70. ! END IF
  71. ! Call Drawworks_Traction_motor_ClutchMode_Dir
  72. ! IF (data%State%Drawworks%w_Dir>0.d0) then
  73. !
  74. ! data%State%Drawworks%motion = +1
  75. ! Call Drawworks_Traction_motor_ClutchMode
  76. ! data%State%Drawworks%w_drum = data%State%Drawworks%w/data%State%Drawworks%Conv_Ratio
  77. ! data%State%Drawworks%w_old_drum = data%State%Drawworks%w_old/data%State%Drawworks%Conv_Ratio
  78. ! ELSE
  79. ! 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
  80. ! if (data%State%Drawworks%EddyTorque>115000.) then
  81. ! data%State%Drawworks%EddyTorque = 115000.0d0
  82. ! end if
  83. ! data%State%Drawworks%EddyTorque = 1.355817948*data%State%Drawworks%EddyTorque ![N.m]
  84. ! 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
  85. ! data%State%Drawworks%motion = -1
  86. !
  87. ! IF (data%State%Drawworks%w_drum<0.) THEN
  88. ! data%State%Drawworks%w = -data%State%Drawworks%w
  89. ! data%State%Drawworks%w_old = -data%State%Drawworks%w_old
  90. ! !data%State%Drawworks%w = 0. !???????????????
  91. ! !data%State%Drawworks%w_old = 0. !???????????????
  92. ! data%State%Drawworks%w_drum = -data%State%Drawworks%w_drum
  93. ! data%State%Drawworks%w_old_drum = -data%State%Drawworks%w_old_drum
  94. ! END IF
  95. !
  96. ! data%State%Drawworks%Conv_Ratio = 1.
  97. ! Call Drawworks_Free_Traction_motor_dawn_motion
  98. ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
  99. ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
  100. ! !data%State%Drawworks%w_drum = data%State%Drawworks%w/data%State%Drawworks%Conv_Ratio
  101. ! !data%State%Drawworks%w_old_drum = data%State%Drawworks%w_old/data%State%Drawworks%Conv_Ratio
  102. ! else
  103. ! data%State%Drawworks%motion = 0
  104. ! data%State%Drawworks%w_drum = 0.0d0
  105. ! data%State%Drawworks%w_old_drum = 0.0d0
  106. ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
  107. ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
  108. ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
  109. !
  110. ! data%State%Drawworks%ia = 0.
  111. ! data%State%Drawworks%ia_old = 0.
  112. ! data%State%Drawworks%x = 0.
  113. ! data%State%Drawworks%x_old = 0.
  114. ! data%State%Drawworks%y = 0.
  115. ! data%State%Drawworks%y_old = 0.
  116. ! end if
  117. !
  118. ! END IF
  119. !
  120. !end if
  121. !Call DWBrakeSound
  122. end subroutine Drawworks_Direction