Simulation Core
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

BOPstartup.f90 8.7 KiB

1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
1 yıl önce
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. 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_Situation_forTD= 0 ! open - for TD code
  29. 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. Cumulative_AirVolume= 0.0
  45. bottle_capacity=10 !(GALON)
  46. nobottles=Accumulator%NumberOfBottels
  47. !fvr_tot=40 !(GALON) IN CHARGED POSITION
  48. prams_regset=1500 !RamsReglatorSet !=1500 DEFAULT regulator set pressure (PSI)
  49. acc_ChargedPressure=3000 !charged(PSI)
  50. acc_MinPressure=Accumulator%AccumulatorMinimumOperatingPressure !1200 !discharged(PSI)
  51. !acc_precharge=1000
  52. fvr_tot=(-2451*(acc_ChargedPressure**(-0.8202))+8.435)*nobottles ! IT IS WRRITEN FOR PRECHARGE 1000 PSI FROM ITS CURVE
  53. !write(*,*) 'fvr_tot=',fvr_tot
  54. !ELECTRIC_PUMPON=2800
  55. ELECTRIC_PUMPON=Accumulator%StartPressure
  56. !ELECTRIC_PUMPOFF=acc_ChargedPressure !=3000 psi
  57. ELECTRIC_PUMPOFF=Accumulator%StopPressure
  58. !QELECTRIC_PUMP=12 !(gpm)
  59. QELECTRIC_PUMP=Accumulator%ElectricPumpOutput
  60. !AIR_PUMPON=2600
  61. AIR_PUMPON=Accumulator%StartPressure2
  62. !AIR_PUMPOFF=2900
  63. AIR_PUMPOFF=Accumulator%StopPressure2
  64. RAM%tol=0.0037 !%=(2700-2600)/2700
  65. RAM%tolzero=RAM%tol
  66. tolAnnular=0.0018 !=(2900-2895)/2900
  67. tolzeroAnnular=tolAnnular
  68. !======================OTHER INPUTS(CONSTANTS)===========================
  69. pa=300 !(PSI)
  70. p_shear=1200 !(PSI)
  71. !p_shear=2423.1 !(PSI)
  72. pb=p_shear-pa
  73. pa_annular=100 !(psi)
  74. IDAnnularBase=13.625 !(inch)
  75. IDAnnular=IDAnnularBase
  76. ODDrillpipe_inAnnularBase=5. ! so 18 gal is for complete closing of annular
  77. ODDrillpipe_inAnnular=5. ! initial
  78. AnnularMovingPressure=360. !(psi)
  79. IDAnnularFinal= IDAnnular
  80. IDshearBopBase=13.625 !(inch)
  81. IDshearBop=IDshearBopBase
  82. ODDrillpipe_inShearRamBase=5 !initial
  83. ODDrillpipe_inShearRam=5 !initial
  84. IDshearBopFinal= IDshearBop
  85. IDPipeRamBase=13.625 !(inch)
  86. IDPipeRam1=IDPipeRamBase
  87. ODDrillpipe_inPipeRam1Base=5 !initial
  88. ODDrillpipe_inPipeRam1=5 !initial
  89. IDPipeRam1Final= IDPipeRam1
  90. IDPipeRam2=IDPipeRamBase !(inch)
  91. ODDrillpipe_inPipeRam2Base=5 !initial
  92. ODDrillpipe_inPipeRam2=5 !initial
  93. IDPipeRam2Final= IDPipeRam2
  94. IDChokeLineBase=8.6 !(inch)
  95. IDChokeLine=IDChokeLineBase
  96. ODDrillpipe_inChokeLineBase=5
  97. ODDrillpipe_inChokeLine=5
  98. IDKillLineBase=8.6 !(inch)
  99. IDKillLine=IDKillLineBase
  100. ODDrillpipe_inKillLineBase=5
  101. ODDrillpipe_inKillLine=5
  102. !va=4 !(liter)
  103. !vb=8 !(liter)
  104. !cv=2; !flow coefficinet of regulator
  105. RAM_COURSE=320.2 !milimeter
  106. H_REGRAM=0 !(m)<<<<<<<<<<<<<<<<<<<<<<<<
  107. H_ShearRamBop=(BopStackSpecification%GroundLevel-BopStackSpecification%BlindRamHeight)*0.3048 ! foot to meter
  108. H_PipeRam1Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%UpperRamHeight)*0.3048 ! foot to meter
  109. H_PipeRam2Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%LowerRamHeight)*0.3048 ! foot to meter
  110. H_AnnularBop=(BopStackSpecification%GroundLevel-BopStackSpecification%AnnularPreventerHeight)*0.3048 ! foot to meter
  111. H_ChokeLineBop=(BopStackSpecification%GroundLevel-BopStackSpecification%KillHeight)*0.3048 ! foot to meter
  112. H_KillLineBop=(BopStackSpecification%GroundLevel-BopStackSpecification%KillHeight)*0.3048 ! foot to meter
  113. p_acc=acc_ChargedPressure
  114. RAM%vdis_bottles=0 !initial discharged volume
  115. fvr=fvr_tot
  116. RAMS%minloss=0.
  117. !======================AIRPUMP INPUTS(CONSTANTS)===========================
  118. RAM%FVR_AIR=0
  119. P_AIRP=0
  120. ba1=1003; ba2=.03375; ba3=4.014; ba4=.2458
  121. bba1 =31.8; bba2 =-725.7 ; bba3 =4154
  122. Qiter=7 !(gpm)
  123. ! Q=0.0003585; true
  124. DeltaT_BOP=0.1 !second
  125. tol_air=.08
  126. alpha_Qair=0
  127. alpha_timeair=0
  128. alpha_paccair=p_acc
  129. alpha_pairp=p_acc
  130. alpha_diffpair=0
  131. alpha_lossesair=0
  132. alpha_fvrair=0
  133. counter_airp=1
  134. !======================BOP INPUTS(CONSTANTS)===========================
  135. if (Accumulator%PrechargePressure == 1400.) then
  136. b1=1396; b2=0.17; b3=3.873; b4=1.101
  137. elseif (Accumulator%PrechargePressure == 2000.) then
  138. b1=1980; b2=0.1237; b3=15.69; b4=1.029
  139. elseif (Accumulator%PrechargePressure == 600.) then
  140. b1=591.9; b2=0.1968; b3=2.887; b4=0.9757
  141. else !(PrechargePressure == 1000.) then ! this is for precharge=1000 psi
  142. b1=993.7; b2=0.164; b3=5.492; b4=0.9796
  143. endif
  144. ByPassOld= 1.0
  145. RAM%p_bop=pa
  146. p_annular=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. airp_switch=0 !off position
  152. elecp_switch=0 !off position
  153. ShearBop_closed=1
  154. PipeRam1_closed=1
  155. PipeRam2_closed=1
  156. ChokeLine_closed=1
  157. KillLine_closed=1
  158. Annular_closed=1
  159. finished_Shear=0
  160. finished_pipe1=0
  161. finished_pipe2=0
  162. finished_ChokeLine=0
  163. finished_KillLine=0
  164. finished_Annular=0
  165. deltav_elecp=0
  166. RAM%vdis_elecp=0
  167. !==================================================================
  168. RAM%timecounter_ram=0
  169. RAM%Q=0
  170. pram_reg=prams_regset !psi !RamsReglatorSet
  171. Pannular_reg=min(BopControlPanel%AnnularRegulatorSetControl,1700.)
  172. BopControlPanel%MiddleRamsStatus= IDshearBop
  173. BopControlPanel%UpperRamsStatus= IDPipeRam1
  174. BopControlPanel%LowerRamsStatus= IDPipeRam2
  175. BopControlPanel%AnnularStatus = IDAnnular
  176. BopControlPanel%AccumulatorPressureGauge = 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. MiddleRamsOpenLEDMine = LedOn
  190. BopControlPanel%MiddleRamsCloseLED = LedOff
  191. MiddleRamsCloseLEDMine = LedOff
  192. ShearRamIsOpening = .false.
  193. ShearRamIsClosing = .false.
  194. BopControlPanel%UpperRamsOpenLED = LedOn
  195. UpperRamsOpenLEDMine = LedOn
  196. BopControlPanel%UpperRamsCloseLED = LedOff
  197. UpperRamsCloseLEDMine = LedOff
  198. PipeRam1IsOpening = .false.
  199. PipeRam1IsClosing = .false.
  200. BopControlPanel%LowerRamsOpenLED = LedOn
  201. LowerRamsOpenLEDMine = LedOn
  202. BopControlPanel%LowerRamsCloseLED = LedOff
  203. LowerRamsCloseLEDMine = LedOff
  204. PipeRam2IsOpening = .false.
  205. PipeRam2IsClosing = .false.
  206. BopControlPanel%ChokeLineOpenLED = LedOff
  207. ChokeLineOpenLEDMine = LedOff
  208. BopControlPanel%ChokeLineCloseLED = LedOn
  209. ChokeLineCloseLEDMine = LedOn
  210. ChokeLineIsOpening = .false.
  211. ChokeLineIsClosing = .false.
  212. BopControlPanel%KillLineOpenLED = LedOff
  213. KillLineOpenLedMine = LedOff
  214. BopControlPanel%KillLineCloseLED = LedOn
  215. KillLineCloseLedMine = LedOn
  216. KillLineIsOpening = .false.
  217. KillLineIsClosing = .false.
  218. BopControlPanel%AnnularOpenLED = LedOn
  219. AnnularOpenLedMine = LedOn
  220. BopControlPanel%AnnularCloseLED = LedOff
  221. AnnularCloseLedMine = LedOff
  222. AnnularIsOpening = .false.
  223. AnnularIsClosing = .false.
  224. FirstSet=1
  225. RamsFirstSet=1
  226. BopControlPanel%ManifoldPressureGauge=prams_regset !RamsReglatorSet
  227. BopControlPanel%AnnularPressureGauge= (1 - AnnularPressureGaugeMalf) * min(BopControlPanel%AnnularRegulatorSetControl,1700.)
  228. PannularTimeStepDelay = int(1./DeltaT_BOP) ! 1/0.1 : for 1 sec delay in AnnRegulator shot time
  229. DO i = 1 , PannularTimeStepDelay
  230. CALL Pannular_regDelay%AddToFirst(BopControlPanel%AnnularPressureGauge)
  231. END DO
  232. end