Simulation Core
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

118 行
3.9 KiB

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