|
- subroutine TD_MainCalculations
-
- Use CCasingLinerChokeVariables
- Use CStringConfigurationVariables
- ! Use CSimulationVariables
- Use TD_DrillStemComponents
- Use TD_WellElements
- Use TD_WellGeometry
- Use TD_GeneralData
- Use TD_StringConnectionData
- USE FricPressDropVarsModule
- Use MudSystemVARIABLES
-
-
- implicit none
-
- Integer :: i
- !Integer :: TD_SolDuration
- !integer,dimension(8) :: TD_StartTime , TD_EndTime
-
-
-
- TD_General%TimeStep = 0.1d0 ! Unit: [s]
- !Call TD_StartUp
- !Call TD_WellReadData
- !Call TD_WellElementsReadData
- !Call TD_DrillStemReadData
- !Call TD_PipePropertiesReadData
- !!Call TD_WellGeoConfiguration
- !!Call TD_WellElementsConfiguration
- !!Call TD_StringConnectionModes
- !!Call TD_DrillStemConfiguration
-
-
-
-
- !loop1: do
-
-
-
- Call TD_WellGeoConfiguration
- Call TD_WellElementsConfiguration
- Call TD_StringConnectionModes
- Call TD_DrillStemConfiguration
- Call TD_ForceReadData
-
-
- !===> Mud properties Read_Data from Fluid Module
- !!TD_StringNoHorizontalMudElements = TDNoHorizontalMudElements
- !!TD_String%NoStringMudElements = TDNoStringMudElements
- !!TD_String%NoCasingMudElements = TDNoCasingMudElements
- !!
- !!if (allocated(TDDensity_MudElementArray) .and. (TD_StringNoHorizontalMudElements+TD_String%NoStringMudElements+TD_String%NoCasingMudElements)/=0) then
- !! if (Allocated(TD_String%FluidMudDensity)) Deallocate(TD_String%FluidMudDensity)
- !! Allocate(TD_String%FluidMudDensity(TD_StringNoHorizontalMudElements+TD_String%NoStringMudElements+TD_String%NoCasingMudElements))
- !! TD_String%FluidMudDensity(:) = TDDensity_MudElementArray(:)
- !!end if
- !!
- !!if (allocated(TDXend_MudElementArray)) then
- !! if (Allocated(TD_String%FluidMudEndX)) Deallocate(TD_String%FluidMudEndX)
- !! Allocate(TD_String%FluidMudEndX(TD_StringNoHorizontalMudElements+TD_String%NoStringMudElements+TD_String%NoCasingMudElements))
- !! TD_String%FluidMudEndX(:) = TDXend_MudElementArray(:)
- !!end if
- !!
- !!if (allocated(TDXstart_MudElementArray)) then
- !! if (Allocated(TD_String%FluidMudStartX)) Deallocate(TD_String%FluidMudStartX)
- !! Allocate(TD_String%FluidMudStartX(TD_StringNoHorizontalMudElements+TD_String%NoStringMudElements+TD_String%NoCasingMudElements))
- !! TD_String%FluidMudStartX(:) = TDXstart_MudElementArray(:)
- !!end if
-
- if (TD_DrillStem(1)%ComponentType==0) then
- Do i = 2 , TD_String%DrillStemComponentsNumbs
- Call TD_MudPropertiesReadData(i)
- Call TD_BouyancyFactor(i)
- Call TD_CombinedMotionData(i)
- End Do
- TD_DrillStems(1)%MudDensityIn = TD_DrillStems(2)%MudDensityIn !(1): bit mud properties
- TD_DrillStems(1)%MudDensityOut = TD_DrillStems(2)%MudDensityOut
- TD_DrillStems(1)%MudWeight = TD_DrillStems(2)%MudWeight
- TD_DrillStems(1)%MudPlasticVis = 5.d0+(5.d0*(TD_DrillStems(1)%MudWeight-8.3d0))
- TD_DrillStems(1)%MudViscosity = 0.2d0 !TD_DrillStems(i)%MudPlasticVis
- TD_DrillStems(1)%MudYieldPoint = 10.d0+(TD_DrillStems(1)%MudWeight-8.3d0)
- Call TD_BouyancyFactor(1)
- Call TD_CombinedMotionData(1)
- else
- Do i = 1 , TD_String%DrillStemComponentsNumbs
- Call TD_MudPropertiesReadData(i)
- Call TD_BouyancyFactor(i)
- Call TD_CombinedMotionData(i)
- End Do
- end if
- !================================================
-
-
-
- Call TD_BOPDiamCalculation
-
-
- Call TD_StaticHookLoadCalculation
- Call TD_WeightOnBitCalculation
- if (abs(TD_String%DrillStemAxialVelocity)>3.2808d0) then !1[m/s]=3.2808[ft/s]
- Call TD_ViscousDragForce
- else
- TD_DrillStems%Drag = 0.d0
- TD_String%DrillStemForceType = 5
- end if
- Call TD_ForceCalculation
- Call TD_HookLoadCalculation
-
-
-
-
-
- TD_StConn%HookHeightOld = TD_StConn%HookHeight
-
-
-
-
-
- end subroutine TD_MainCalculations
|