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

Flow_Startup.f90 5.1 KiB

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