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.
 
 
 
 
 
 

156 lines
5.8 KiB

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