subroutine TD_BOPDiamCalculation Use TD_DrillStemComponents Use TD_WellElements Use TD_WellGeometry Use TD_GeneralData Use TD_StringConnectionData Use CBopStackVariables Use VARIABLES Integer :: i , j , n , m , TD_Numbs Real(8) :: TD_LimitUp , TD_LimitDown , TD_OldFillingValue , TD_AnnTjDiff , TD_AnnularFilling Real(8) :: TD_ElToolJoints(2,2) !TD_ToolJointRange = 0.4005d0*3.28 ! [ft] !==================================================== ! Read BOP Data !==================================================== TD_BOPHeight(5) = BopStackSpecification%AboveAnnularHeight TD_BOPHeight(1) = BopStackSpecification%AnnularPreventerHeight TD_BOPHeight(2) = BopStackSpecification%UpperRamHeight TD_BOPHeight(3) = BopStackSpecification%BlindRamHeight TD_BOPHeight(6) = BopStackSpecification%KillHeight TD_BOPHeight(4) = BopStackSpecification%LowerRamHeight TD_BOPRamDiam(1) = ShearRam%IDAnnularFinal TD_BOPRamDiam(2) = ShearRam%IDPipeRam1Final TD_BOPRamDiam(3) = ShearRam%IDshearBopFinal TD_BOPRamDiam(4) = ShearRam%IDPipeRam2Final !==================================================== ! Element Counts in BOPStack Domain !==================================================== !if (TD_DrillStemComponentsNumbs>5) then TD_Numbs = TD_DrillStemComponentsNumbs-7 ! 7 Elements from the Top of DrillStem !else ! TD_Numbs = 1 !end if !==================================================== ! Determination of Elements Diameter in BOPStack Domain !==================================================== TD_BOPDiam = 0.d0 TD_OldFillingValue = 0.d0 Do i = TD_DrillStemComponentsNumbs,TD_Numbs,-1 TD_LimitUp = TD_DrillStems(i)%TopDepth+TD_DrillStems(i)%ToolJointRange TD_LimitDown = TD_DrillStems(i)%DownDepth-TD_DrillStems(i)%ToolJointRange TD_ElToolJoints(1,1) = TD_DrillStems(i)%TopDepth ! TD_ElToolJoints(i,j) , i=top & down tooljoints of element , j=top & down tooljoints Depth TD_ElToolJoints(1,2) = TD_LimitUp TD_ElToolJoints(2,1) = TD_LimitDown TD_ElToolJoints(2,2) = TD_DrillStems(i)%DownDepth !===> che meghdar az fazaye annular ba tooljoint por mishavad (for BOP Module) Do m = 1,2 TD_AnnTjDiff = min(TD_ElToolJoints(m,2),(TD_BOPHeight(1)+TD_BOPThickness))-max(TD_ElToolJoints(m,1),(TD_BOPHeight(1)-TD_BOPThickness)) if (TD_AnnTjDiff<0.) then ! tooljoint is not in the annular range TD_AnnTjDiff = 0.d0 end if TD_AnnularFilling = TD_OldFillingValue+(TD_AnnTjDiff/(TD_BOPThickness*2.d0)) ! 0=TD_LimitUp .and. (TD_BOPHeight(j)+TD_BOPThickness)