|
- subroutine TD_WellElementsReadData
-
- Use CCasingLinerChokeVariables
- use CStringConfigurationVariables
- Use TD_WellElements
- Use TD_WellGeometry
-
- implicit none
-
-
- Integer :: i
- Real(8) :: TD_OpenHoleLength
-
-
-
-
- !====================================================
- ! Set Casing Data
- !====================================================
- TD_CasingNumbs = 1
-
- if (Allocated(TD_Casing)) deAllocate (TD_Casing)
- Allocate (TD_Casing(TD_CasingNumbs))
-
- Do i=1, TD_CasingNumbs
- TD_Casing(i)%Length = CasingDepth ! unit: [ft]
- TD_Casing(i)%TopDepth = 0.d0
- TD_Casing(i)%DownDepth = TD_Casing(i)%Length
- TD_Casing(i)%Od = CasingOd/12.d0 ! unit: [ft]
- TD_Casing(i)%Id = CasingId/12.d0 ! unit: [ft]
- TD_Casing(i)%Weight = CasingWeight
- TD_Casing(i)%CollapsePressure = CasingCollapsePressure
- TD_Casing(i)%TensileStrength = CasingTensileStrength
- End Do
-
-
-
-
-
- !====================================================
- ! Set Liner Data
- !====================================================
- TD_LinerNumbs = 0
- if(LinerLength > 0.d0) then
- TD_LinerNumbs = 1
-
- !if (TD_LinerNumbs>0) then
- if (Allocated(TD_Liner)) deAllocate (TD_Liner)
- Allocate (TD_Liner(TD_LinerNumbs))
-
- Do i=1, TD_LinerNumbs
- TD_Liner(i)%TopDepth = LinerTopDepth ! unit: [ft]
- if (TD_Liner(i)%TopDepth<TD_Casing(i)%DownDepth) then
- TD_Casing(TD_CasingNumbs)%DownDepth = TD_Liner(i)%TopDepth
- end if
- TD_Liner(i)%Length = LinerLength ! unit: [ft]
- TD_Liner(i)%DownDepth = TD_Liner(i)%TopDepth+TD_Liner(i)%Length
- TD_Liner(i)%Od = LinerOd/12.d0 ! unit: [ft]
- TD_Liner(i)%Id = LinerId/12.d0 ! unit: [ft]
- TD_Liner(i)%Weight = LinerWeight
- TD_Liner(i)%CollapsePressure = LinerCollapsePressure
- TD_Liner(i)%TensileStrength = LinerTensileStrength
- End Do
-
- else
-
- if (Allocated(TD_Liner)) deAllocate (TD_Liner)
- Allocate (TD_Liner(1))
- TD_LinerNumbs = 1
- TD_Liner%Length = 0.d0
- TD_Liner%TopDepth = TD_Casing(TD_CasingNumbs)%DownDepth
- TD_Liner%DownDepth = TD_Liner%TopDepth
-
- end if
-
-
-
-
-
- !====================================================
- ! Set Open_Hole Data
- !====================================================
- TD_OpenHoleNumbs = 0
-
- TD_OpenHoleLength=TD_WellTotalLength-(TD_Liner(TD_LinerNumbs)%DownDepth)
- if(TD_OpenHoleLength > 0.d0) TD_OpenHoleNumbs=1
-
- if (TD_OpenHoleNumbs>0) then
- if (Allocated(TD_OpenHole)) deAllocate (TD_OpenHole)
- Allocate (TD_OpenHole(TD_OpenHoleNumbs)) !!!??????????????????check
-
- Do i = 1, TD_OpenHoleNumbs
- TD_OpenHole(i)%TopDepth = TD_Liner(TD_LinerNumbs)%DownDepth
- TD_OpenHole(i)%Length = TD_OpenHoleLength ! unit: [ft]
- TD_OpenHole(i)%DownDepth = TD_OpenHole(i)%TopDepth+TD_OpenHole(i)%Length
- TD_OpenHole(i)%Id = OpenHoleId/12.d0 ! unit: [ft]
- End Do
-
- else
- if (Allocated(TD_OpenHole)) deAllocate (TD_OpenHole)
- Allocate (TD_OpenHole(1))
- TD_OpenHoleNumbs = 1
- TD_OpenHole%Length = 0.d0
- TD_OpenHole%TopDepth = TD_Liner(TD_LinerNumbs)%DownDepth
- TD_OpenHole%DownDepth = TD_OpenHole%TopDepth
-
- end if
-
-
-
-
- !====================================================
- ! Set ROP_Hole Data
- !====================================================
-
- TD_ROPHoleNumbs = 1
- if (Allocated(TD_ROPHole)) deAllocate (TD_ROPHole)
- Allocate (TD_ROPHole(TD_ROPHoleNumbs))
-
- Do i = 1, TD_ROPHoleNumbs
- TD_ROPHole(i)%TopDepth = TD_WellGeo(TD_WellIntervalsCount)%TopDepth
- TD_ROPHole(i)%DownDepth = TD_WellGeo(TD_WellIntervalsCount)%DownDepth
- TD_ROPHole(i)%Length = TD_WellGeo(TD_WellIntervalsCount)%IntervalLength
- TD_ROPHole(i)%Id = BitDefinition%BitSize/12.d0 ! unit: [ft]
- End Do
-
-
-
-
-
-
- end subroutine
|