Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Flow_Startup.f90 3.9 KiB

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