Simulation Core
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

180 linhas
7.0 KiB

  1. subroutine TD_BOPDiamCalculation
  2. Use TD_DrillStemComponents
  3. Use TD_WellElements
  4. Use TD_WellGeometry
  5. Use TD_GeneralData
  6. Use TD_StringConnectionData
  7. Use CBopStackVariables
  8. Use VARIABLES
  9. Integer :: i , j , n , m , TD_Numbs
  10. Real(8) :: TD_LimitUp , TD_LimitDown , TD_OldFillingValue , TD_AnnTjDiff , TD_AnnularFilling
  11. Real(8) :: TD_ElToolJoints(2,2)
  12. !TD_String%ToolJointRange = 0.4005d0*3.28 ! [ft]
  13. !====================================================
  14. ! Read BOP Data
  15. !====================================================
  16. TD_BOP%BOPHeight(5) = BopStackSpecification%AboveAnnularHeight
  17. TD_BOP%BOPHeight(1) = BopStackSpecification%AnnularPreventerHeight
  18. TD_BOP%BOPHeight(2) = BopStackSpecification%UpperRamHeight
  19. TD_BOP%BOPHeight(3) = BopStackSpecification%BlindRamHeight
  20. TD_BOP%BOPHeight(6) = BopStackSpecification%KillHeight
  21. TD_BOP%BOPHeight(4) = BopStackSpecification%LowerRamHeight
  22. TD_BOP%BOPRamDiam(1) = ShearRam%IDAnnularfinal
  23. TD_BOP%BOPRamDiam(2) = ShearRam%IDPipeRam1final
  24. TD_BOP%BOPRamDiam(3) = ShearRam%IDshearBopfinal
  25. TD_BOP%BOPRamDiam(4) = ShearRam%IDPipeRam2final
  26. !====================================================
  27. ! Element Counts in BOPStack Domain
  28. !====================================================
  29. !if (TD_String%DrillStemComponentsNumbs>5) then
  30. TD_Numbs = TD_String%DrillStemComponentsNumbs-7 ! 7 Elements from the Top of DrillStem
  31. !else
  32. ! TD_Numbs = 1
  33. !end if
  34. !====================================================
  35. ! Determination of Elements Diameter in BOPStack Domain
  36. !====================================================
  37. TD_BOP%BOPDiam = 0.d0
  38. TD_OldFillingValue = 0.d0
  39. Do i = TD_String%DrillStemComponentsNumbs,TD_Numbs,-1
  40. TD_LimitUp = TD_DrillStems(i)%TopDepth+TD_DrillStems(i)%ToolJointRange
  41. TD_LimitDown = TD_DrillStems(i)%DownDepth-TD_DrillStems(i)%ToolJointRange
  42. TD_ElToolJoints(1,1) = TD_DrillStems(i)%TopDepth ! TD_ElToolJoints(i,j) , i=top & down tooljoints of element , j=top & down tooljoints Depth
  43. TD_ElToolJoints(1,2) = TD_LimitUp
  44. TD_ElToolJoints(2,1) = TD_LimitDown
  45. TD_ElToolJoints(2,2) = TD_DrillStems(i)%DownDepth
  46. !===> che meghdar az fazaye annular ba tooljoint por mishavad (for BOP Module)
  47. Do m = 1,2
  48. TD_AnnTjDiff = min(TD_ElToolJoints(m,2),(TD_BOP%BOPHeight(1)+TD_BOP%BOPThickness))-max(TD_ElToolJoints(m,1),(TD_BOP%BOPHeight(1)-TD_BOP%BOPThickness))
  49. if (TD_AnnTjDiff<0.) then ! tooljoint is not in the annular range
  50. TD_AnnTjDiff = 0.d0
  51. end if
  52. TD_AnnularFilling = TD_OldFillingValue+(TD_AnnTjDiff/(TD_BOP%BOPThickness*2.d0)) ! 0=<TD_AnnularFilling<=1
  53. TD_OldFillingValue = TD_AnnularFilling
  54. End Do
  55. do j = 1,6
  56. if ( (TD_BOP%BOPHeight(j)-TD_BOP%BOPThickness)>TD_LimitUp .and. (TD_BOP%BOPHeight(j)+TD_BOP%BOPThickness)<TD_LimitDown ) then
  57. TD_BOP%BOPDiam(j) = TD_DrillStems(i)%Od
  58. TD_BOP%BOPElementNo(j) = i
  59. if ( TD_DrillStems(i)%ComponentType==3 .and. j/=1 .and. TD_String%DrillStemRotVelocity==0. ) then
  60. TD_BOP%BOPConnectionPossibility(j) = 1
  61. else if ( j==1 ) then
  62. TD_BOP%BOPConnectionPossibility(j) = 1
  63. else
  64. TD_BOP%BOPConnectionPossibility(j) = 0
  65. end if
  66. !print* , 'T.DP. , B.DP. 1=' , TD_DrillStems(i)%TopDepth , TD_DrillStems(i)%DownDepth
  67. !print* , 'T.R. , B.R. , LimitUp , LimitDown 1=' , (TD_BOP%BOPHeight(j)-TD_BOP%BOPThickness) , (TD_BOP%BOPHeight(j)+TD_BOP%BOPThickness) , TD_LimitUp , TD_LimitDown
  68. !print* , 'stringNo , ramsNo , Possibility , BOPDiam 1=' , i , j , TD_BOP%BOPConnectionPossibility(j) , TD_BOP%BOPDiam(j)
  69. else if ( (TD_BOP%BOPHeight(j)+TD_BOP%BOPThickness)>=TD_DrillStems(i)%TopDepth .and. (TD_BOP%BOPHeight(j)-TD_BOP%BOPThickness)<=TD_DrillStems(i)%DownDepth ) then
  70. TD_BOP%BOPDiam(j) = TD_DrillStems(i)%RtoolJoint*2.d0
  71. TD_BOP%BOPElementNo(j) = i
  72. if ( j==1 ) then
  73. TD_BOP%BOPConnectionPossibility(j) = 1
  74. else
  75. TD_BOP%BOPConnectionPossibility(j) = 0
  76. end if
  77. !print* , 'T.DP. , B.DP. 2=' , TD_DrillStems(i)%TopDepth , TD_DrillStems(i)%DownDepth
  78. !print* , 'T.R. , B.R. , LimitUp , LimitDown 2=' , (TD_BOP%BOPHeight(j)-TD_BOP%BOPThickness) , (TD_BOP%BOPHeight(j)+TD_BOP%BOPThickness) , TD_LimitUp , TD_LimitDown
  79. !print* , 'stringNo , ramsNo , Possibility , BOPDiam 2=' , i , j , TD_BOP%BOPConnectionPossibility(j) , TD_BOP%BOPDiam(j)
  80. end if
  81. end do
  82. End Do
  83. TD_BOP%AnnularFillingFinal = TD_AnnularFilling
  84. TD_BOP%AboveAnnularDiam = TD_BOP%BOPDiam(5)
  85. TD_BOP%AnnularPreventerDiam = TD_BOP%BOPDiam(1)
  86. TD_BOP%UpperRamDiam = TD_BOP%BOPDiam(2)
  87. TD_BOP%BlindRamDiam = TD_BOP%BOPDiam(3)
  88. TD_BOP%KillDiam = TD_BOP%BOPDiam(6)
  89. TD_BOP%LowerRamDiam = TD_BOP%BOPDiam(4)
  90. !print* , 'TD_BOP%BOPElementNo=' , TD_BOP%BOPElementNo
  91. !print* , 'TD_BOP%BOPConnectionPossibility=' , TD_BOP%BOPConnectionPossibility
  92. !print* , 'TD_BOP%BOPDiam=' , TD_BOP%BOPDiam
  93. !!===> BOP RAMs Condition *** TD_BOP%BOPCondition: 0=open , 1=close
  94. !do j = 1,4
  95. ! if ( TD_BOP%BOPDiam(j)>=TD_BOP%BOPRamDiam(j) ) then
  96. ! TD_BOP%BOPCondition(j) = 1
  97. ! else
  98. ! TD_BOP%BOPCondition(j) = 0
  99. ! end if
  100. !end do
  101. !====================================================
  102. ! String Elements Configuration in BOPStack Domain
  103. !====================================================
  104. !if ( allocated(TD_BOPElement) ) deallocate (TD_BOPElement)
  105. !allocate(TD_BOPElement())
  106. n = 0
  107. TD_BOPElement%ElementType = 0.d0
  108. TD_BOPElement%ElementStart = 0.d0
  109. TD_BOPElement%ElementEnd = 0.d0
  110. do k = TD_String%DrillStemComponentsNumbs,TD_Numbs,-1
  111. if( ((TD_DrillStems(k)%TopDepth>=TD_BOP%BOPHeight(5)).and.(TD_DrillStems(k)%TopDepth<=TD_BOP%BOPHeight(4))) .or. ((TD_DrillStems(k)%DownDepth>=TD_BOP%BOPHeight(5)).and.(TD_DrillStems(k)%DownDepth<=TD_BOP%BOPHeight(4))) ) then
  112. n = n+1
  113. TD_BOPElement(n)%ElementType = TD_DrillStems(k)%ComponentType
  114. TD_BOPElement(n)%ElementStart = TD_DrillStems(k)%TopDepth
  115. TD_BOPElement(n)%ElementEnd = TD_DrillStems(k)%DownDepth
  116. else if ( TD_DrillStems(k)%TopDepth<=TD_BOP%BOPHeight(5) .and. TD_DrillStems(k)%DownDepth>=TD_BOP%BOPHeight(4) ) then
  117. n = n+1
  118. TD_BOPElement(n)%ElementType = TD_DrillStems(k)%ComponentType
  119. TD_BOPElement(n)%ElementStart = TD_DrillStems(k)%TopDepth
  120. TD_BOPElement(n)%ElementEnd = TD_DrillStems(k)%DownDepth
  121. end if
  122. end do
  123. Call SetBopElements(TD_BOPElement)
  124. end subroutine