Simulation Core
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

123 wiersze
4.7 KiB

  1. # 1 "/home/admin/SimulationCore2/TorqueDrag/TD_MainCalculations.f90"
  2. subroutine TD_MainCalculations
  3. Use CCasingLinerChokeVariables
  4. Use CStringConfigurationVariables
  5. ! Use CSimulationVariables
  6. Use TD_DrillStemComponents
  7. use SimulationVariables !@
  8. use SimulationVariables !@
  9. use SimulationVariables !@
  10. Use TD_StringConnectionData
  11. USE FricPressDropVarsModule
  12. USE MudSystemVARIABLES
  13. use SimulationVariables !@@@
  14. implicit none
  15. Integer :: i
  16. !Integer :: TD_SolDuration
  17. !integer,dimension(8) :: TD_StartTime , TD_EndTime
  18. data%State%TD_General%TimeStep = 0.1d0 ! Unit: [s]
  19. !Call TD_StartUp
  20. !Call TD_WellReadData
  21. !Call TD_WellElementsReadData
  22. !Call TD_DrillStemReadData
  23. !Call TD_PipePropertiesReadData
  24. !!Call TD_WellGeoConfiguration
  25. !!Call TD_WellElementsConfiguration
  26. !!Call TD_StringConnectionModes
  27. !!Call TD_DrillStemConfiguration
  28. !loop1: do
  29. Call TD_WellGeoConfiguration
  30. Call TD_WellElementsConfiguration
  31. Call TD_StringConnectionModes
  32. Call TD_DrillStemConfiguration
  33. Call TD_ForceReadData
  34. !===> Mud properties Read_Data from Fluid Module
  35. !!TD_StringNoHorizontalMudElements = TDNoHorizontalMudElements
  36. !!data%State%TD_String%NoStringMudElements = TDNoStringMudElements
  37. !!data%State%TD_String%NoCasingMudElements = TDNoCasingMudElements
  38. !!
  39. !!if (allocated(TDDensity_MudElementArray) .and. (TD_StringNoHorizontalMudElements+data%State%TD_String%NoStringMudElements+data%State%TD_String%NoCasingMudElements)/=0) then
  40. !! if (Allocated(data%State%TD_String%FluidMudDensity)) Deallocate(data%State%TD_String%FluidMudDensity)
  41. !! Allocate(data%State%TD_String%FluidMudDensity(TD_StringNoHorizontalMudElements+data%State%TD_String%NoStringMudElements+data%State%TD_String%NoCasingMudElements))
  42. !! data%State%TD_String%FluidMudDensity(:) = TDDensity_MudElementArray(:)
  43. !!end if
  44. !!
  45. !!if (allocated(TDXend_MudElementArray)) then
  46. !! if (Allocated(data%State%TD_String%FluidMudEndX)) Deallocate(data%State%TD_String%FluidMudEndX)
  47. !! Allocate(data%State%TD_String%FluidMudEndX(TD_StringNoHorizontalMudElements+data%State%TD_String%NoStringMudElements+data%State%TD_String%NoCasingMudElements))
  48. !! data%State%TD_String%FluidMudEndX(:) = TDXend_MudElementArray(:)
  49. !!end if
  50. !!
  51. !!if (allocated(TDXstart_MudElementArray)) then
  52. !! if (Allocated(data%State%TD_String%FluidMudStartX)) Deallocate(data%State%TD_String%FluidMudStartX)
  53. !! Allocate(data%State%TD_String%FluidMudStartX(TD_StringNoHorizontalMudElements+data%State%TD_String%NoStringMudElements+data%State%TD_String%NoCasingMudElements))
  54. !! data%State%TD_String%FluidMudStartX(:) = TDXstart_MudElementArray(:)
  55. !!end if
  56. if (data%State%TD_DrillStem(1)%ComponentType==0) then
  57. Do i = 2 , data%State%TD_String%DrillStemComponentsNumbs
  58. Call TD_MudPropertiesReadData(i)
  59. Call TD_BouyancyFactor(i)
  60. Call TD_CombinedMotionData(i)
  61. End Do
  62. data%State%TD_DrillStems(1)%MudDensityIn = data%State%TD_DrillStems(2)%MudDensityIn !(1): bit mud properties
  63. data%State%TD_DrillStems(1)%MudDensityOut = data%State%TD_DrillStems(2)%MudDensityOut
  64. data%State%TD_DrillStems(1)%MudWeight = data%State%TD_DrillStems(2)%MudWeight
  65. data%State%TD_DrillStems(1)%MudPlasticVis = 5.d0+(5.d0*(data%State%TD_DrillStems(1)%MudWeight-8.3d0))
  66. data%State%TD_DrillStems(1)%MudViscosity = 0.2d0 !data%State%TD_DrillStems(i)%MudPlasticVis
  67. data%State%TD_DrillStems(1)%MudYieldPoint = 10.d0+(data%State%TD_DrillStems(1)%MudWeight-8.3d0)
  68. Call TD_BouyancyFactor(1)
  69. Call TD_CombinedMotionData(1)
  70. else
  71. Do i = 1 , data%State%TD_String%DrillStemComponentsNumbs
  72. Call TD_MudPropertiesReadData(i)
  73. Call TD_BouyancyFactor(i)
  74. Call TD_CombinedMotionData(i)
  75. End Do
  76. end if
  77. !================================================
  78. Call TD_BOPDiamCalculation
  79. Call TD_StaticHookLoadCalculation
  80. Call TD_WeightOnBitCalculation
  81. if (abs(data%State%TD_String%DrillStemAxialVelocity)>3.2808d0) then !1[m/s]=3.2808[ft/s]
  82. Call TD_ViscousDragForce
  83. else
  84. data%State%TD_DrillStems%Drag = 0.d0
  85. data%State%TD_String%DrillStemForceType = 5
  86. end if
  87. Call TD_ForceCalculation
  88. Call TD_HookLoadCalculation
  89. data%State%TD_StConn%HookHeightOld = data%State%TD_StConn%HookHeight
  90. end subroutine TD_MainCalculations