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.
 
 
 
 
 
 

149 lines
7.2 KiB

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