Simulation Core
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

123 linhas
5.2 KiB

  1. SUBROUTINE FlowStartup
  2. USE Fluid_Flow_Startup_Vars
  3. USE CStringConfigurationVariables
  4. USE CMudPropertiesVariables
  5. USE FricPressDropVarsModule
  6. use KickVARIABLESModule
  7. USE MudSystemVARIABLES
  8. use SimulationVariables !@@@
  9. use PressureDisplayVARIABLESModule
  10. USE CShoeVariables
  11. USE TD_DrillStemComponents
  12. use SimulationVariables !@, pi3 => pi
  13. use SimulationVariables !@
  14. USE CWellSurveyDataVariables
  15. USE CHOKEVARIABLES
  16. use SimulationVariables !@, pi4 => pi
  17. use SimulationVariables
  18. IMPLICIT NONE
  19. INTEGER :: i
  20. data%State%PressureDisplay%PressureGauges(:) = 0.0
  21. Theta300Refrence = 37.2
  22. Theta600Refrence = 60.2
  23. KickVARIABLES%KickSinglePocket = Reservoir%MakeKickSinglePacket
  24. IF (KickVARIABLES%KickSinglePocket) THEN
  25. KickVARIABLES%MaxGasPocket = 1
  26. ELSE
  27. KickVARIABLES%MaxGasPocket = 4
  28. END IF
  29. KickVARIABLES%MaxChokeDensityChange = 25.0 ! [ppg/min]
  30. KickVARIABLES%ChokeMinDensity = 2.0
  31. KickVARIABLES%ChokeDensity = data%Configuration%Mud%ActiveDensity
  32. KickVARIABLES%MinKickVol = 0.5 ! USGal
  33. KickVARIABLES%SecondaryKickVol = 0.0
  34. KickVARIABLES%SecondaryKickWeight = 0.0
  35. KickVARIABLES%NoGasPocket = 0 ! No Kick
  36. KickVARIABLES%WellHeadOpen = .TRUE.
  37. KickVARIABLES%WellHeadWasOpen = .TRUE.
  38. data%State%FricPressDrop%BackPressure = 0.0
  39. KickVARIABLES%GasKickPumpFlowRate = 0.0
  40. data%Equipments%DownHole%KickVolume = 0.0
  41. data%Equipments%DownHole%InfluxRate = 0.0
  42. KickVARIABLES%ExitMass = 0.0
  43. KickVARIABLES%MinAllowableKickVol = 1.0 * (42.0 / Convft3toUSgal) ! 1 bbl * 42 gal/bbl / 7.48 gal/ft^3 = ... ft^3
  44. data%State%FricPressDrop%StCompressedMudVol = 0.0
  45. data%State%FricPressDrop%AnnCompressedMudVol = 0.0
  46. KickVARIABLES%KickFlux = .FALSE.
  47. KickVARIABLES%KickOffBottom = .FALSE.
  48. KickVARIABLES%KickWasExitingThroughChoke = .FALSE.
  49. data%State%FricPressDrop%FloatValveOpen = .TRUE.
  50. data%State%Choke%ChokeAreaFullyOpen = 123.0 / 64.0 ! fully open area is 123/64 in^2 = 0.01334635 ft^2
  51. data%State%FricPressDrop%ChokeBypassArea = PI / 4.0 * data%Configuration%BopStack%ChokeLineId**2
  52. data%State%FricPressDrop%BHPSafetyMargin = 150.0
  53. data%State%FricPressDrop%AChBHPTol = 15.0
  54. data%State%FricPressDrop%ManChoke1Plug = 0
  55. data%State%FricPressDrop%ManChoke2Plug = 0
  56. data%State%FricPressDrop%ManChoke1Washout = 0
  57. data%State%FricPressDrop%ManChoke2Washout = 0
  58. data%State%FricPressDrop%BitJetsPlugged = 0
  59. data%State%FricPressDrop%BitJetsWashedOut = 0
  60. data%State%FricPressDrop%CasingPressure_DataDisplayMalF = 0
  61. SoundSpeed = 1530.0 / Convfttom
  62. data%State%PressureDisplay%PressureTimeStepDelay(1) = INT(2.0 * SUM(data%Configuration%StringConfiguration%StringConfigurations(2:)%ComponentLength) / SoundSpeed / dt)
  63. data%State%PressureDisplay%PressureTimeStepDelay(2) = INT(data%Configuration%Path%Items(SIZE(data%Configuration%Path%Items))%MeasuredDepth / SoundSpeed / dt)
  64. data%State%PressureDisplay%PressureTimeStepDelay(3) = INT(data%Configuration%Shoe%ShoeDepth / SoundSpeed / dt)
  65. !WRITE (*,*) SUM(StringConfigurations(2:)%ComponentLength), PathGenerations(SIZE(PathGenerations))%TotalVerticalDepth!, WellSurveyData(SIZE(WellSurveyData))%TotalVerticalDepth
  66. !WRITE (*,*) PathGenerations(SIZE(PathGenerations))%MeasuredDepth!, WellSurveyData(SIZE(WellSurveyData))%MeasuredDepth
  67. WRITE (*,*) 'time step delay', data%State%PressureDisplay%PressureTimeStepDelay
  68. DO i = 1 , data%State%PressureDisplay%PressureTimeStepDelay(1)
  69. CALL PumpPressureDelay%AddToFirst(0.0)
  70. END DO
  71. DO i = 1 , data%State%PressureDisplay%PressureTimeStepDelay(2)
  72. CALL BottomHolePressureDelay%AddToFirst(REAL(0.052 * data%Configuration%Mud%ActiveDensity * data%Configuration%Path%Items(SIZE(data%Configuration%Path%Items))%TotalVerticalDepth))
  73. END DO
  74. DO i = 1 , data%State%PressureDisplay%PressureTimeStepDelay(3)
  75. CALL ShoePressureDelay%AddToFirst(REAL(0.052 * data%Configuration%Mud%ActiveDensity * data%Configuration%Shoe%ShoeDepth))
  76. END DO
  77. !!!!!!! Methane Information
  78. data%State%GasType(1)%CritPress = 673.0
  79. data%State%GasType(1)%CritTemp = 344.0
  80. data%State%GasType(1)%MolarWt = 16.04
  81. data%State%GasType(1)%StDensity = 0.04238
  82. data%State%GasType(1)%GasConstant = RUniversal / data%State%GasType(1)%MolarWt
  83. !!!!!!!! H2S Information
  84. data%State%GasType(2)%CritPress = 1306.0
  85. data%State%GasType(2)%CritTemp = 673.0
  86. data%State%GasType(2)%MolarWt = 34.08
  87. data%State%GasType(2)%StDensity = 0.09087
  88. data%State%GasType(2)%GasConstant = RUniversal / data%State%GasType(2)%MolarWt
  89. !!!!!!!! CO2 Information
  90. data%State%GasType(3)%CritPress = 1072.0
  91. data%State%GasType(3)%CritTemp = 548.0
  92. data%State%GasType(3)%MolarWt = 44.01
  93. !data%State%GasType(3)%StDensity = 00
  94. data%State%GasType(3)%GasConstant = RUniversal / data%State%GasType(2)%MolarWt
  95. !!!!!!!! Mud density and viscosity
  96. ! Theta600Refrence = data%Configuration%Mud%ActiveThetaSixHundred
  97. ! Theta300Refrence = data%Configuration%Mud%ActiveThetaThreeHundred
  98. DensityRefrence = data%Configuration%Mud%ActiveDensity
  99. END SUBROUTINE