|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- subroutine TD_DrillStemReadData
- use ConfigurationVariables
- Use CStringConfigurationVariables
- Use TD_DrillStemComponents
- Use TD_WellElements
- Use TD_WellGeometry
- Use TD_StringConnectionData
- Use Drawworks_VARIABLES, only: Drawworks
-
-
- implicit none
-
-
-
-
- Integer :: i
- Integer :: TD_FirstIndex , TD_LastIndex
-
-
-
-
- !====================================================
- ! Set Drill Stem Components Data
- !====================================================
- TD_String%StringConfigurationCount = Configuration%StringConfiguration%StringConfigurationCount
- TD_String%DrillStemComponentsNumbs = 0
-
-
- !########## TD_DrillStem%ComponentType ::
- !#Bit_ComponentType = 0
- !#Stabilizer_ComponentType = 1
- !#Collar_ComponentType = 2
- !#DrillPipe_ComponentType = 3
- !#Heavyweight_ComponentType = 4
- !#IBOP = 5
- !#Kelly & SafetyValve (DrillMode) = 6
- !#SafetyValve (TripMode) = 7
-
-
- if (Allocated(TD_DrillStem)) deAllocate (TD_DrillStem)
- Allocate (TD_DrillStem(TD_String%StringConfigurationCount+100))
-
-
- Do i=1, TD_String%StringConfigurationCount
- TD_DrillStem(i)%ComponentType = Configuration%StringConfiguration%StringConfigurations(i)%ComponentType
- TD_DrillStem(i)%Numbs = Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint
- TD_DrillStem(i)%Id = Configuration%StringConfiguration%StringConfigurations(i)%NominalId/12.d0 ![ft]
- TD_DrillStem(i)%Od = Configuration%StringConfiguration%StringConfigurations(i)%NominalOd/12.d0 ![ft]
- TD_DrillStem(i)%Length = Configuration%StringConfiguration%StringConfigurations(i)%LengthPerJoint ![ft]
- TD_DrillStem(i)%WeightperLength = Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength ![lb/ft]
- TD_DrillStem(i)%TotalLength = Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength
- TD_DrillStem(i)%TotalWeight = TD_DrillStem(i)%TotalLength*TD_DrillStem(i)%WeightperLength
-
- TD_String%DrillStemComponentsNumbs = TD_String%DrillStemComponentsNumbs+Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint
-
- !!=========> Set Separated Drill Stem Components Data
- ! TD_LastIndex = TD_LastIndex+StringConfigurations(i)%NumberOfJoint
- !
- ! TD_DrillStems(TD_FirstIndex:TD_LastIndex)%ComponentType = TD_DrillStem(i)%ComponentType
- ! TD_DrillStems(TD_FirstIndex:TD_LastIndex)%Id = TD_DrillStem(i)%Id
- ! TD_DrillStems(TD_FirstIndex:TD_LastIndex)%Od = TD_DrillStem(i)%Od
- ! TD_DrillStems(TD_FirstIndex:TD_LastIndex)%Length = TD_DrillStem(i)%Length
- ! TD_DrillStems(TD_FirstIndex:TD_LastIndex)%Weight = TD_DrillStem(i)%Weight
- !
- ! TD_FirstIndex = TD_LastIndex+1
- End Do
-
-
-
-
-
-
- !===> Initial Values of Removed-Volume Variables
- if (TD_DrillStem(1)%ComponentType==0) then
- TD_Vol%PreCount = TD_String%StringConfigurationCount-1
- else
- TD_Vol%PreCount = TD_String%StringConfigurationCount
- end if
- TD_Vol%PreElementVolume = TD_DrillStem(TD_String%StringConfigurationCount)%TotalLength*(((pi*((TD_DrillStem(TD_String%StringConfigurationCount)%Id)**2))/4.d0)) ![ft^3]
- TD_Vol%PreElementLength = TD_DrillStem(TD_String%StringConfigurationCount)%TotalLength
-
-
-
-
-
-
-
- !====================================================
- ! Set Separated Drill Stem Components Data
- !====================================================
-
- TD_FirstIndex = 1
- TD_LastIndex = 0
- if (Allocated(TD_DrillStems)) deAllocate (TD_DrillStems)
- Allocate (TD_DrillStems(TD_String%DrillStemComponentsNumbs+300)) ! +300: because of: Add or Remove DrillStem Components
- Call TD_DrillStemStartUp
-
-
- Do i=1, TD_String%StringConfigurationCount
-
- TD_LastIndex = TD_LastIndex+Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint
-
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%ComponentType = TD_DrillStem(i)%ComponentType
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%Id = TD_DrillStem(i)%Id
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%Od = TD_DrillStem(i)%Od
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%Area = (pi*((TD_DrillStem(i)%Od**2)-(TD_DrillStem(i)%Id**2)))/4.0d0
-
- if (TD_DrillStem(i)%ComponentType == 3 .or. TD_DrillStem(i)%ComponentType == 4) then
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%RtoolJoint = TD_DrillStem(i)%Od*1.30d0/2.0d0
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%ToolJointRange = TD_String%ToolJointRange
- else if (TD_DrillStem(i)%ComponentType == 1 .or. TD_DrillStem(i)%ComponentType == 2) then
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%RtoolJoint = TD_DrillStem(i)%Od/2.0d0
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%ToolJointRange = TD_String%ToolJointRange
- else if (TD_DrillStem(i)%ComponentType == 0) then
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%RtoolJoint = TD_DrillStem(i)%Od
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%ToolJointRange = 0.0d0
- end if
-
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%Length = TD_DrillStem(i)%Length
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%LengthIni = TD_DrillStem(i)%Length
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%WeightperLength= TD_DrillStem(i)%WeightperLength
- TD_DrillStems(TD_FirstIndex:TD_LastIndex)%Weight = TD_DrillStem(i)%WeightperLength*TD_DrillStem(i)%Length
-
- TD_FirstIndex = TD_LastIndex+1
-
- End Do
-
-
-
-
-
-
-
- !====================================================
- ! Set Hook Height Data
- !====================================================
- TD_StConn%HookHeightOld = Drawworks%Hook_Height_ini
- TD_StConn%HookHeight = TD_StConn%HookHeightOld
-
-
-
-
-
-
- end subroutine
|