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.
 
 
 
 
 
 

132 lines
4.6 KiB

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