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.
 
 
 
 
 
 

133 lines
4.9 KiB

  1. subroutine TD_WellElementsReadData
  2. Use CCasingLinerChokeVariables
  3. use CStringConfigurationVariables
  4. use ConfigurationVariables
  5. Use TD_WellElements
  6. Use TD_WellGeometry
  7. implicit none
  8. Integer :: i
  9. Real(8) :: TD_OpenHoleLength
  10. !====================================================
  11. ! Set Casing Data
  12. !====================================================
  13. TD_WellEl%CasingNumbs = 1
  14. if (Allocated(TD_Casing)) deAllocate (TD_Casing)
  15. Allocate (TD_Casing(TD_WellEl%CasingNumbs))
  16. Do i=1, TD_WellEl%CasingNumbs
  17. TD_Casing(i)%Length = CasingLinerChoke%CasingDepth ! unit: [ft]
  18. TD_Casing(i)%TopDepth = 0.d0
  19. TD_Casing(i)%DownDepth = TD_Casing(i)%Length
  20. TD_Casing(i)%Od = CasingLinerChoke%CasingOd/12.d0 ! unit: [ft]
  21. TD_Casing(i)%Id = CasingLinerChoke%CasingId/12.d0 ! unit: [ft]
  22. TD_Casing(i)%Weight = CasingLinerChoke%CasingWeight
  23. TD_Casing(i)%CollapsePressure = CasingLinerChoke%CasingCollapsePressure
  24. TD_Casing(i)%TensileStrength = CasingLinerChoke%CasingTensileStrength
  25. End Do
  26. !====================================================
  27. ! Set Liner Data
  28. !====================================================
  29. TD_WellEl%LinerNumbs = 0
  30. if(CasingLinerChoke%LinerLength > 0.d0) then
  31. TD_WellEl%LinerNumbs = 1
  32. !if (TD_WellEl%LinerNumbs>0) then
  33. if (Allocated(TD_Liner)) deAllocate (TD_Liner)
  34. Allocate (TD_Liner(TD_WellEl%LinerNumbs))
  35. Do i=1, TD_WellEl%LinerNumbs
  36. TD_Liner(i)%TopDepth = CasingLinerChoke%LinerTopDepth ! unit: [ft]
  37. if (TD_Liner(i)%TopDepth<TD_Casing(i)%DownDepth) then
  38. TD_Casing(TD_WellEl%CasingNumbs)%DownDepth = TD_Liner(i)%TopDepth
  39. end if
  40. TD_Liner(i)%Length = CasingLinerChoke%LinerLength ! unit: [ft]
  41. TD_Liner(i)%DownDepth = TD_Liner(i)%TopDepth+TD_Liner(i)%Length
  42. TD_Liner(i)%Od = CasingLinerChoke%LinerOd/12.d0 ! unit: [ft]
  43. TD_Liner(i)%Id = CasingLinerChoke%LinerId/12.d0 ! unit: [ft]
  44. TD_Liner(i)%Weight = CasingLinerChoke%LinerWeight
  45. TD_Liner(i)%CollapsePressure = CasingLinerChoke%LinerCollapsePressure
  46. TD_Liner(i)%TensileStrength = CasingLinerChoke%LinerTensileStrength
  47. End Do
  48. else
  49. if (Allocated(TD_Liner)) deAllocate (TD_Liner)
  50. Allocate (TD_Liner(1))
  51. TD_WellEl%LinerNumbs = 1
  52. TD_Liner%Length = 0.d0
  53. TD_Liner%TopDepth = TD_Casing(TD_WellEl%CasingNumbs)%DownDepth
  54. TD_Liner%DownDepth = TD_Liner%TopDepth
  55. end if
  56. !====================================================
  57. ! Set Open_Hole Data
  58. !====================================================
  59. TD_WellEl%OpenHoleNumbs = 0
  60. TD_OpenHoleLength=TD_WellGeneral%WellTotalLength-(TD_Liner(TD_WellEl%LinerNumbs)%DownDepth)
  61. if(TD_OpenHoleLength > 0.d0) TD_WellEl%OpenHoleNumbs=1
  62. if (TD_WellEl%OpenHoleNumbs>0) then
  63. if (Allocated(TD_OpenHole)) deAllocate (TD_OpenHole)
  64. Allocate (TD_OpenHole(TD_WellEl%OpenHoleNumbs)) !!!??????????????????check
  65. Do i = 1, TD_WellEl%OpenHoleNumbs
  66. TD_OpenHole(i)%TopDepth = TD_Liner(TD_WellEl%LinerNumbs)%DownDepth
  67. TD_OpenHole(i)%Length = TD_OpenHoleLength ! unit: [ft]
  68. TD_OpenHole(i)%DownDepth = TD_OpenHole(i)%TopDepth+TD_OpenHole(i)%Length
  69. TD_OpenHole(i)%Id = CasingLinerChoke%OpenHoleId/12.d0 ! unit: [ft]
  70. End Do
  71. else
  72. if (Allocated(TD_OpenHole)) deAllocate (TD_OpenHole)
  73. Allocate (TD_OpenHole(1))
  74. TD_WellEl%OpenHoleNumbs = 1
  75. TD_OpenHole%Length = 0.d0
  76. TD_OpenHole%TopDepth = TD_Liner(TD_WellEl%LinerNumbs)%DownDepth
  77. TD_OpenHole%DownDepth = TD_OpenHole%TopDepth
  78. end if
  79. !====================================================
  80. ! Set ROP_Hole Data
  81. !====================================================
  82. TD_WellEl%ROPHoleNumbs = 1
  83. if (Allocated(TD_ROPHole)) deAllocate (TD_ROPHole)
  84. Allocate (TD_ROPHole(TD_WellEl%ROPHoleNumbs))
  85. Do i = 1, TD_WellEl%ROPHoleNumbs
  86. TD_ROPHole(i)%TopDepth = TD_WellGeo(TD_WellGeneral%WellIntervalsCount)%TopDepth
  87. TD_ROPHole(i)%DownDepth = TD_WellGeo(TD_WellGeneral%WellIntervalsCount)%DownDepth
  88. TD_ROPHole(i)%Length = TD_WellGeo(TD_WellGeneral%WellIntervalsCount)%IntervalLength
  89. TD_ROPHole(i)%Id = Configuration%StringConfiguration%BitDefinition%BitSize/12.d0 ! unit: [ft]
  90. End Do
  91. end subroutine