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.

TD_StartUp.i90 7.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. # 1 "/home/admin/SimulationCore2/TorqueDrag/TD_StartUp/TD_StartUp.f90"
  2. subroutine TD_StartUp
  3. Use CCasingLinerChokeVariables
  4. Use CStringConfigurationVariables
  5. ! use CSimulationVariables
  6. use UnitySignalVariables
  7. use UnitySignalsModule
  8. ! use UnitySignalsModuleVariables
  9. use CHoistingVariables
  10. use SimulationVariables
  11. use SimulationVariables !@
  12. Use TD_DrillStemComponents
  13. use SimulationVariables !@
  14. use SimulationVariables !@
  15. use SimulationVariables !@
  16. Use TD_StringConnectionData
  17. use SimulationVariables !@!, only: Drawworks
  18. Use sROP_Variables
  19. Use sROP_Other_Variables
  20. implicit none
  21. !!====================================================
  22. !! Allocate Modules
  23. !!====================================================
  24. ! !=====> Set WellGeo Dimension
  25. ! data%State%TD_WellGeneral%WellIntervalsCount = data%Configuration%Path%ItemCount + 1 ! +1 is belong to ROP hole
  26. ! Allocate (data%State%TD_WellGeo(data%State%TD_WellGeneral%WellIntervalsCount))
  27. !
  28. ! !=====> Set WellGeo Dimension
  29. !=====> Set ROP StartUp
  30. data%State%ROP_Bit%BitWearing = 0.d0
  31. data%State%ROP_Bit%RateOfPenetration = 0.d0
  32. data%State%ROP_Bit%BearingWear = 0.d0
  33. data%State%ROP_Spec%FormationNumber = 0
  34. data%State%ROP_Bit%OldROPDepth = data%Configuration%Path%Items(data%Configuration%Path%ItemCount)%MeasuredDepth
  35. data%State%ROP_Bit%OldROPValue = 0.d0
  36. data%State%ROP_Bit%SetROPGauge = 0.d0
  37. !=====> Set BOP StartUp
  38. data%State%TD_BOP%BOPCondition = 0
  39. data%State%TD_BOP%BOPThickness = (0.13477d0/2.d0)*3.28d0 ![m]*3.28=[ft] , Total Thickness (RAM)= 134.77mm
  40. data%State%TD_BOP%AnnularFillingFinal = 0.d0
  41. data%State%Drawworks%Hook_Height_ini = 75.d0 ![ft]
  42. !data%State%Drawworks%Hook_Height_final = 75.d0 ![ft]
  43. data%State%Drawworks%HookLinearVelocity_final = 0.d0 ![ft/s]
  44. data%State%Drawworks%TDHookHeight = data%State%Drawworks%Hook_Height_final ![ft]
  45. !=====> String Connection Mode
  46. if ( Get_OperationCondition()==OPERATION_TRIP ) then
  47. data%State%TD_StConn%OldOperationCondition = 1
  48. else
  49. data%State%TD_StConn%OldOperationCondition = 0
  50. end if
  51. data%State%TD_StConn%KellyDriveTypeMode = 0 !Kelly Mode
  52. data%State%TD_StConn%FluidStringConnectionMode = 0
  53. data%State%TD_StConn%ConnectionHeight = 3.48d0 ![ft]
  54. data%State%TD_StConn%RigidConnectionHeight = 3.48d0 ![ft]
  55. data%State%TD_StConn%GRigidConnectionHeight = 3.48d0 ![ft]
  56. data%State%TD_String%TopJointHeight = 3.48d0 ![ft]
  57. !data%State%TD_StConn%TouchConnectionHeight =
  58. data%State%TD_StConn%StringVelocity = 0.0d0
  59. data%State%TD_StConn%HookHeightOld = 75.d0 ![ft]
  60. data%State%TD_StConn%HookHeight = 75.d0 ![ft]
  61. data%State%TD_StConn%HookVelocity = 0.0d0
  62. !=====> Element Specification
  63. data%State%TD_StConn%HookHeight = data%State%Drawworks%TDHookHeight ! unit: [ft]
  64. data%State%TD_StConn%ElevatorConst = 17.985 ! [ft] Elevator Length(14.84) ????????????????? adad ha daghigh shavand
  65. data%State%TD_StConn%ElevatorECG = 2.217 ! [ft]
  66. data%State%TD_StConn%KellyConst = 63.280d0 ! [ft] Kelly Length(61.74) + Safety Valve Length(1.54)
  67. data%State%TD_StConn%KellyElementConst = 41.840d0 ! [ft] Kelly Element Length(40.3) + Safety Valve Length(1.54)
  68. data%State%TD_StConn%TDSLength = 24.08d0 !??????????????????? ! [ft]
  69. data%State%TD_StConn%TDSToolJointLength = 0.77d0 !??????????????????? ! [ft]
  70. data%State%TD_StConn%TDSElevatorLength = 26.837d0 !?????? ! TDS with Elevator Length [ft]
  71. data%State%TD_StConn%TDSElevatorToolLength= 0.859d0 !??????????????????? ! [ft]
  72. data%State%TD_StConn%TDSElevatorECG = 2.454 ! [ft]
  73. data%State%TD_Load%NumOfCables = data%Configuration%Hoisting%NumberOfLine
  74. data%State%TD_Load%WeightTB = data%Configuration%Hoisting%TravelingBlockWeight ! [lb]
  75. data%State%TD_Load%WeightTD = data%Configuration%Hoisting%TopDriveWeight ! [lb]
  76. data%State%TD_Load%KellyWeight = data%Configuration%Hoisting%KellyWeight ! [lb]
  77. data%State%TD_StConn%SafetyValveLength = 1.54d0 ! [ft]
  78. data%State%TD_StConn%IBOPLength = 1.54d0 ! [ft]
  79. data%State%TD_StConn%KellyElementID = 3.0d0/12.d0 ! [ft]
  80. data%State%TD_StConn%KellyElementOD = 5.90d0/12.d0 ! [ft]
  81. data%State%TD_Load%DrawworksLoadInput = data%Configuration%Hoisting%TravelingBlockWeight/data%Configuration%Hoisting%NumberOfLine
  82. data%State%TD_Count%IBOPNewAdd = 0
  83. data%State%TD_Count%IBOPOldAdd = 0 !Remove
  84. data%State%TD_Count%SafetyValveNewAdd = 0
  85. data%State%TD_Count%SafetyValveOldAdd = 1 !Install
  86. data%State%TD_Count%KellyNewAdd = 0
  87. data%State%TD_Count%KellyOldAdd = 0
  88. data%State%TD_Count%IBOPNewRemove = 0
  89. data%State%TD_Count%IBOPOldRemove = 1 !Remove
  90. data%State%TD_Count%SafetyValveNewRemove = 0
  91. data%State%TD_Count%SafetyValveOldRemove = 0 !Install
  92. data%State%TD_Count%KellyNewRemove = 0
  93. data%State%TD_Count%KellyOldRemove = 1
  94. data%State%TD_Count%KellyOldStatus(1) = 0
  95. data%State%TD_Count%KellyNewStatus(1) = 0
  96. data%State%TD_Count%KellyOldStatus(2) = 1 ! Kelly Connected Nothing
  97. data%State%TD_Count%KellyNewStatus(2) = 1 ! Kelly Connected Nothing
  98. data%State%TD_Count%KellyOldStatus(3) = 0
  99. data%State%TD_Count%KellyNewStatus(3) = 0
  100. data%State%TD_Count%KellyOldStatus(4) = 0
  101. data%State%TD_Count%KellyNewStatus(4) = 0
  102. data%State%TD_Count%KellyOldStatus(5) = 0
  103. data%State%TD_Count%KellyNewStatus(5) = 0
  104. data%State%TD_Count%KellyOldStatus(6) = 0
  105. data%State%TD_Count%KellyNewStatus(6) = 0
  106. data%State%TD_Count%KellyOldStatus(7) = 0
  107. data%State%TD_Count%KellyNewStatus(7) = 0
  108. data%State%TD_Count%KellyOldStatus(8) = 0
  109. data%State%TD_Count%KellyNewStatus(8) = 0
  110. data%State%TD_Count%KellyOldStatus(18) = 0
  111. data%State%TD_Count%KellyNewStatus(18) = 0
  112. data%State%TD_Count%KellyOldStatus(19) = 0
  113. data%State%TD_Count%KellyNewStatus(19) = 0
  114. data%State%TD_Count%KellyOldStatus(9) = 0
  115. data%State%TD_Count%KellyNewStatus(9) = 0
  116. data%State%TD_Count%KellyOldStatus(10) = 0
  117. data%State%TD_Count%KellyNewStatus(10) = 0
  118. data%State%TD_Count%KellyOldStatus(11) = 0
  119. data%State%TD_Count%KellyNewStatus(11) = 0
  120. data%State%TD_Count%KellyOldStatus(12) = 0
  121. data%State%TD_Count%KellyNewStatus(12) = 0
  122. data%State%TD_Count%KellyOldStatus(13) = 1
  123. data%State%TD_Count%KellyNewStatus(13) = 1
  124. data%State%TD_Count%KellyOldStatus(14) = 0
  125. data%State%TD_Count%KellyNewStatus(14) = 0
  126. data%State%TD_Count%KellyOldStatus(15) = 0
  127. data%State%TD_Count%KellyNewStatus(15) = 0
  128. data%State%TD_Count%KellyOldStatus(16) = 0
  129. data%State%TD_Count%KellyNewStatus(16) = 0
  130. data%State%TD_Count%KellyOldStatus(17) = 0
  131. data%State%TD_Count%KellyNewStatus(17) = 0
  132. !=====> Problems
  133. data%State%TD_General%WeightIndicatorMalf = 0
  134. end subroutine