Simulation Core
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

BOPstartup.f90 9.9 KiB

před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. SUBROUTINE BOP_StartUp()
  2. USE VARIABLES
  3. USE CAccumulatorVariables
  4. USE CBopStackVariables
  5. USE CBopControlPanelVariables
  6. USE CEquipmentsConstants
  7. implicit none
  8. integer i
  9. !UpperRamsFailureMalf=0
  10. !AnnularFailureMalf=0
  11. !LowerRamsFailureMalf=0
  12. !MiddleRamsFailureMalf=0
  13. !UpperRamsLeakMalf=0
  14. !LowerRamsLeakMalf=0
  15. !MiddleRamsLeakMalf=0
  16. !AnnularLeakMalf=0
  17. !AccPupmsFailMalf=0
  18. !AirSupplyPressureGauge=0
  19. !======================= SETTING VARIABLES
  20. BopStackInput%BOP_timeCounter= 0
  21. !============== FOR MANIFOLD VALVES CODE=====================
  22. CALL OpenAnnular
  23. CALL OpenUpperRams
  24. CALL OpenMiddleRams
  25. CALL CloseKillLine
  26. CALL CloseChokeLine
  27. CALL OpenLowerRams
  28. Annular%Annular_Situation_forTD= 0 ! open - for TD code
  29. RamLine%ShearBop_Situation_forTD= 0 ! open - for TD code
  30. PipeRam1%Situation_forTD= 0 ! open - for TD code
  31. PipeRam2%Situation_forTD= 0 ! open - for TD code
  32. !======================================================================
  33. CALL LOSS_INPUTS()
  34. !
  35. !OPEN(50,FILE='AIRPUMP_OUTPUTS.DAT')
  36. !OPEN(60,FILE='RAMS_OUTPUTS.DAT')
  37. !======================================================================
  38. ! GET INPUTS
  39. !======================================================================
  40. RAM%SuccessionCounter = 0
  41. RAM%SuccessionCounterOld = 0
  42. RAM%First_CloseTimecheck= 0
  43. RAM%First_OpenTimecheck= 0
  44. BopStackAcc%Cumulative_AirVolume= 0.0
  45. BopStackAcc%BOTTLE_CAPACITY=10 !(GALON)
  46. BopStackAcc%NOBOTTLES=Accumulator%NumberOfBottels
  47. !fvr_tot=40 !(GALON) IN CHARGED POSITION
  48. BopStackAcc%PRAMS_REGSET=1500 !RamsReglatorSet !=1500 DEFAULT regulator set pressure (PSI)
  49. BopStackAcc%acc_ChargedPressure=3000 !charged(PSI)
  50. BopStackAcc%acc_MinPressure=Accumulator%AccumulatorMinimumOperatingPressure !1200 !discharged(PSI)
  51. !acc_precharge=1000
  52. BopStackAcc%FVR_TOT=(-2451*(BopStackAcc%acc_ChargedPressure**(-0.8202))+8.435)*BopStackAcc%NOBOTTLES ! IT IS WRRITEN FOR PRECHARGE 1000 PSI FROM ITS CURVE
  53. !write(*,*) 'fvr_tot=',fvr_tot
  54. !ELECTRIC_PUMPON=2800
  55. Pumps%ELECTRIC_ON=Accumulator%StartPressure
  56. !ELECTRIC_PUMPOFF=acc_ChargedPressure !=3000 psi
  57. Pumps%ELECTRIC_OFF=Accumulator%StopPressure
  58. !QELECTRIC_PUMP=12 !(gpm)
  59. Pumps%QELECTRIC=Accumulator%ElectricPumpOutput
  60. !AIR_PUMPON=2600
  61. Pumps%AIR_ON=Accumulator%StartPressure2
  62. !AIR_PUMPOFF=2900
  63. Pumps%AIR_OFF=Accumulator%StopPressure2
  64. RAM%tol=0.0037 !%=(2700-2600)/2700
  65. RAM%tolzero=RAM%tol
  66. Annular%tolAnnular=0.0018 !=(2900-2895)/2900
  67. Annular%tolzeroAnnular=Annular%tolAnnular
  68. !======================OTHER INPUTS(CONSTANTS)===========================
  69. ShearRam%PA=300 !(PSI)
  70. ShearRam%P_SHEAR=1200 !(PSI)
  71. !p_shear=2423.1 !(PSI)
  72. ShearRam%PB=ShearRam%P_SHEAR-ShearRam%PA
  73. AnnularComputational%pa_annular=100 !(psi)
  74. Annular%IDAnnularBase=13.625 !(inch)
  75. Annular%IDAnnular=Annular%IDAnnularBase
  76. Annular%ODDrillpipe_inAnnularBase=5. ! so 18 gal is for complete closing of annular
  77. Annular%ODDrillpipe_inAnnular=5. ! initial
  78. AnnularComputational%AnnularMovingPressure=360. !(psi)
  79. ShearRam%IDAnnularFinal= Annular%IDAnnular
  80. ShearRam%IDshearBopBase=13.625 !(inch)
  81. ShearRam%IDshearBop=ShearRam%IDshearBopBase
  82. ShearRam%ODDrillpipe_inShearRamBase=5 !initial
  83. ShearRam%ODDrillpipe_inShearRam=5 !initial
  84. ShearRam%IDshearBopFinal= ShearRam%IDshearBop
  85. PipeRam1%IDBase=13.625 !(inch)
  86. PipeRam1%ID=PipeRam1%IDBase
  87. PipeRam1%ODDrillpipe_inBase=5 !initial
  88. PipeRam1%ODDrillpipe_in=5 !initial
  89. ShearRam%IDPipeRam1Final= PipeRam1%ID
  90. PipeRam2%ID=PipeRam1%IDBase !(inch)
  91. PipeRam2%ODDrillpipe_inBase=5 !initial
  92. PipeRam2%ODDrillpipe_in=5 !initial
  93. ShearRam%IDPipeRam2Final= PipeRam2%ID
  94. ChokeLine%IDBase=8.6 !(inch)
  95. ChokeLine%ID=ChokeLine%IDBase
  96. ChokeLine%ODDrillpipe_inBase=5
  97. ChokeLine%ODDrillpipe_in=5
  98. KillLine%IDBase=8.6 !(inch)
  99. KillLine%ID=KillLine%IDBase
  100. KillLine%ODDrillpipe_inBase=5
  101. KillLine%ODDrillpipe_in=5
  102. !va=4 !(liter)
  103. !vb=8 !(liter)
  104. !cv=2; !flow coefficinet of regulator
  105. ShearRam%RAM_COURSE=320.2 !milimeter
  106. ShearRam%H_REGRAM=0 !(m)<<<<<<<<<<<<<<<<<<<<<<<<
  107. ShearRam%H_ShearRamBop=(BopStackSpecification%GroundLevel-BopStackSpecification%BlindRamHeight)*0.3048 ! foot to meter
  108. PipeRam1%H=(BopStackSpecification%GroundLevel-BopStackSpecification%UpperRamHeight)*0.3048 ! foot to meter
  109. PipeRam2%H_Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%LowerRamHeight)*0.3048 ! foot to meter
  110. Annular%H_AnnularBop=(BopStackSpecification%GroundLevel-BopStackSpecification%AnnularPreventerHeight)*0.3048 ! foot to meter
  111. ChokeLine%H_Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%KillHeight)*0.3048 ! foot to meter
  112. KillLine%H_Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%KillHeight)*0.3048 ! foot to meter
  113. RamLine%P_ACC=BopStackAcc%acc_ChargedPressure
  114. RAM%vdis_bottles=0 !initial discharged volume
  115. RamLine%FVR=BopStackAcc%FVR_TOT
  116. RAMS%minloss=0.
  117. !======================AIRPUMP INPUTS(CONSTANTS)===========================
  118. RAM%FVR_AIR=0
  119. Pumps%P_AIRP=0
  120. RamLine%BA1=1003; RamLine%BA2=.03375; RamLine%BA3=4.014; RamLine%BA4=.2458
  121. RamLine%BBA1 =31.8; RamLine%BBA2 =-725.7 ; RamLine%BBA3 =4154
  122. Pumps%Qiter=7 !(gpm)
  123. ! Q=0.0003585; true
  124. RamLine%DeltaT_BOP=0.1 !second
  125. Pumps%TOL_AIR=.08
  126. Pumps%alpha_Qair=0
  127. Pumps%alpha_timeair=0
  128. Pumps%alpha_paccair=RamLine%P_ACC
  129. Pumps%alpha_pairp=RamLine%P_ACC
  130. Pumps%alpha_diffpair=0
  131. Pumps%alpha_lossesair=0
  132. Pumps%alpha_fvrair=0
  133. RamLine%counter_airp=1
  134. !======================BOP INPUTS(CONSTANTS)===========================
  135. if (Accumulator%PrechargePressure == 1400.) then
  136. RamLine%B1=1396; RamLine%B2=0.17; RamLine%B3=3.873; RamLine%B4=1.101
  137. elseif (Accumulator%PrechargePressure == 2000.) then
  138. RamLine%B1=1980; RamLine%B2=0.1237; RamLine%B3=15.69; RamLine%B4=1.029
  139. elseif (Accumulator%PrechargePressure == 600.) then
  140. RamLine%B1=591.9; RamLine%B2=0.1968; RamLine%B3=2.887; RamLine%B4=0.9757
  141. else !(PrechargePressure == 1000.) then ! this is for precharge=1000 psi
  142. RamLine%B1=993.7; RamLine%B2=0.164; RamLine%B3=5.492; RamLine%B4=0.9796
  143. endif
  144. BopStackAcc%ByPassOld= 1.0
  145. RAM%p_bop=ShearRam%PA
  146. AnnularComputational%p_annular=AnnularComputational%pa_annular
  147. !Q=0.0055; !initial flow rate (m^3/s)
  148. RAM%flow=60 !(gpm) initial value
  149. RAM%Qzero=70 !for DP code, increasing Q after shear
  150. RAM%vdis_tot=0
  151. RamLine%AIRP_SWITCH=0 !off position
  152. RamLine%ELECP_SWITCH=0 !off position
  153. RamLine%ShearBop_closed=1
  154. PipeRam1%closed=1
  155. PipeRam2%closed=1
  156. ChokeLine%closed=1
  157. KillLine%closed=1
  158. Annular%Annular_closed=1
  159. RamLine%FINISHED_shear=0
  160. PipeRam1%finished=0
  161. PipeRam2%finished=0
  162. ChokeLine%finished=0
  163. KillLine%finished=0
  164. Annular%finished_Annular=0
  165. Pumps%DELTAV_ELECP=0
  166. RAM%vdis_elecp=0
  167. !==================================================================
  168. RAM%timecounter_ram=0
  169. RAM%Q=0
  170. BopStackAcc%pram_reg=BopStackAcc%PRAMS_REGSET !psi !RamsReglatorSet
  171. Annular%Pannular_reg=min(BopControlPanel%AnnularRegulatorSetControl,1700.)
  172. BopControlPanel%MiddleRamsStatus= ShearRam%IDshearBop
  173. BopControlPanel%UpperRamsStatus= PipeRam1%ID
  174. BopControlPanel%LowerRamsStatus= PipeRam2%ID
  175. BopControlPanel%AnnularStatus = Annular%IDAnnular
  176. BopControlPanel%AccumulatorPressureGauge = RamLine%P_ACC
  177. RAM%time=0
  178. ! WRITE(60,10) ' Overal Time','Q Ram Line','Vdis Ram Line','P Accumulator','Preg Ram Line','Preg Annular',' P BOP','ID Shear Ram', &
  179. ! 'ID Pipe Ram1','ID Pipe Ram2','ID Annular'
  180. !10 FORMAT(11(A18))
  181. !
  182. !
  183. !
  184. ! WRITE(60,60) RAM(2)%time,RAM(2)%Q,RAM(2)%vdis_tot,p_acc, &
  185. ! pram_reg,Pannular_reg,RAM(2)%p_bop,IDshearBop, &
  186. ! IDPipeRam1,IDPipeRam2,IDAnnular
  187. !60 FORMAT(11(f18.5))
  188. BopControlPanel%MiddleRamsOpenLED = LedOn
  189. BopStackInput%MiddleRamsOpenLEDMine = LedOn
  190. BopControlPanel%MiddleRamsCloseLED = LedOff
  191. BopStackInput%MiddleRamsCloseLEDMine = LedOff
  192. RamLine%ShearRamIsOpening = .false.
  193. RamLine%ShearRamIsClosing = .false.
  194. BopControlPanel%UpperRamsOpenLED = LedOn
  195. BopStackInput%UpperRamsOpenLEDMine = LedOn
  196. BopControlPanel%UpperRamsCloseLED = LedOff
  197. BopStackInput%UpperRamsCloseLEDMine = LedOff
  198. PipeRam1%IsOpening = .false.
  199. PipeRam1%IsClosing = .false.
  200. BopControlPanel%LowerRamsOpenLED = LedOn
  201. BopStackInput%LowerRamsOpenLEDMine = LedOn
  202. BopControlPanel%LowerRamsCloseLED = LedOff
  203. BopStackInput%LowerRamsCloseLEDMine = LedOff
  204. PipeRam2%IsOpening = .false.
  205. PipeRam2%IsClosing = .false.
  206. BopControlPanel%ChokeLineOpenLED = LedOff
  207. BopStackInput%ChokeLineOpenLEDMine = LedOff
  208. BopControlPanel%ChokeLineCloseLED = LedOn
  209. BopStackInput%ChokeLineCloseLEDMine = LedOn
  210. ChokeLine%IsOpening = .false.
  211. ChokeLine%IsClosing = .false.
  212. BopControlPanel%KillLineOpenLED = LedOff
  213. BopStackInput%KillLineOpenLedMine = LedOff
  214. BopControlPanel%KillLineCloseLED = LedOn
  215. BopStackInput%KillLineCloseLedMine = LedOn
  216. KillLine%IsOpening = .false.
  217. KillLine%IsClosing = .false.
  218. BopControlPanel%AnnularOpenLED = LedOn
  219. BopStackInput%AnnularOpenLedMine = LedOn
  220. BopControlPanel%AnnularCloseLED = LedOff
  221. BopStackInput%AnnularCloseLedMine = LedOff
  222. Annular%AnnularIsOpening = .false.
  223. Annular%AnnularIsClosing = .false.
  224. Annular%FirstSet=1
  225. AnnularComputational%RamsFirstSet=1
  226. BopControlPanel%ManifoldPressureGauge=BopStackAcc%PRAMS_REGSET !RamsReglatorSet
  227. BopControlPanel%AnnularPressureGauge= (1 - Annular%AnnularPressureGaugeMalf) * min(BopControlPanel%AnnularRegulatorSetControl,1700.)
  228. AnnularComputational%PannularTimeStepDelay = int(1./RamLine%DeltaT_BOP) ! 1/0.1 : for 1 sec delay in AnnRegulator shot time
  229. DO i = 1 , AnnularComputational%PannularTimeStepDelay
  230. CALL AnnularComputational%Pannular_regDelay%AddToFirst(BopControlPanel%AnnularPressureGauge)
  231. END DO
  232. end