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.f90 7.2 KiB

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