SUBROUTINE BOP_StartUp() USE VARIABLES USE CAccumulatorVariables USE CBopStackVariables USE CBopControlPanelVariables USE CEquipmentsConstants implicit none integer i !UpperRamsFailureMalf=0 !AnnularFailureMalf=0 !LowerRamsFailureMalf=0 !MiddleRamsFailureMalf=0 !UpperRamsLeakMalf=0 !LowerRamsLeakMalf=0 !MiddleRamsLeakMalf=0 !AnnularLeakMalf=0 !AccPupmsFailMalf=0 !AirSupplyPressureGauge=0 !======================= SETTING VARIABLES BopStackInput%BOP_timeCounter= 0 !============== FOR MANIFOLD VALVES CODE===================== CALL OpenAnnular CALL OpenUpperRams CALL OpenMiddleRams CALL CloseKillLine CALL CloseChokeLine CALL OpenLowerRams Annular%Annular_Situation_forTD= 0 ! open - for TD code RamLine%ShearBop_Situation_forTD= 0 ! open - for TD code PipeRam1%Situation_forTD= 0 ! open - for TD code PipeRam2%Situation_forTD= 0 ! open - for TD code !====================================================================== CALL LOSS_INPUTS() ! !OPEN(50,FILE='AIRPUMP_OUTPUTS.DAT') !OPEN(60,FILE='RAMS_OUTPUTS.DAT') !====================================================================== ! GET INPUTS !====================================================================== RAM%SuccessionCounter = 0 RAM%SuccessionCounterOld = 0 RAM%First_CloseTimecheck= 0 RAM%First_OpenTimecheck= 0 BopStackAcc%Cumulative_AirVolume= 0.0 BopStackAcc%BOTTLE_CAPACITY=10 !(GALON) BopStackAcc%NOBOTTLES=Accumulator%NumberOfBottels !fvr_tot=40 !(GALON) IN CHARGED POSITION BopStackAcc%PRAMS_REGSET=1500 !RamsReglatorSet !=1500 DEFAULT regulator set pressure (PSI) BopStackAcc%acc_ChargedPressure=3000 !charged(PSI) BopStackAcc%acc_MinPressure=Accumulator%AccumulatorMinimumOperatingPressure !1200 !discharged(PSI) !acc_precharge=1000 BopStackAcc%FVR_TOT=(-2451*(BopStackAcc%acc_ChargedPressure**(-0.8202))+8.435)*BopStackAcc%NOBOTTLES ! IT IS WRRITEN FOR PRECHARGE 1000 PSI FROM ITS CURVE !write(*,*) 'fvr_tot=',fvr_tot !ELECTRIC_PUMPON=2800 Pumps%ELECTRIC_ON=Accumulator%StartPressure !ELECTRIC_PUMPOFF=acc_ChargedPressure !=3000 psi Pumps%ELECTRIC_OFF=Accumulator%StopPressure !QELECTRIC_PUMP=12 !(gpm) Pumps%QELECTRIC=Accumulator%ElectricPumpOutput !AIR_PUMPON=2600 Pumps%AIR_ON=Accumulator%StartPressure2 !AIR_PUMPOFF=2900 Pumps%AIR_OFF=Accumulator%StopPressure2 RAM%tol=0.0037 !%=(2700-2600)/2700 RAM%tolzero=RAM%tol Annular%tolAnnular=0.0018 !=(2900-2895)/2900 Annular%tolzeroAnnular=Annular%tolAnnular !======================OTHER INPUTS(CONSTANTS)=========================== ShearRam%PA=300 !(PSI) ShearRam%P_SHEAR=1200 !(PSI) !p_shear=2423.1 !(PSI) ShearRam%PB=ShearRam%P_SHEAR-ShearRam%PA AnnularComputational%pa_annular=100 !(psi) Annular%IDAnnularBase=13.625 !(inch) Annular%IDAnnular=Annular%IDAnnularBase Annular%ODDrillpipe_inAnnularBase=5. ! so 18 gal is for complete closing of annular Annular%ODDrillpipe_inAnnular=5. ! initial AnnularComputational%AnnularMovingPressure=360. !(psi) ShearRam%IDAnnularFinal= Annular%IDAnnular ShearRam%IDshearBopBase=13.625 !(inch) ShearRam%IDshearBop=ShearRam%IDshearBopBase ShearRam%ODDrillpipe_inShearRamBase=5 !initial ShearRam%ODDrillpipe_inShearRam=5 !initial ShearRam%IDshearBopFinal= ShearRam%IDshearBop PipeRam1%IDBase=13.625 !(inch) PipeRam1%ID=PipeRam1%IDBase PipeRam1%ODDrillpipe_inBase=5 !initial PipeRam1%ODDrillpipe_in=5 !initial ShearRam%IDPipeRam1Final= PipeRam1%ID PipeRam2%ID=PipeRam1%IDBase !(inch) PipeRam2%ODDrillpipe_inBase=5 !initial PipeRam2%ODDrillpipe_in=5 !initial ShearRam%IDPipeRam2Final= PipeRam2%ID ChokeLine%IDBase=8.6 !(inch) ChokeLine%ID=ChokeLine%IDBase ChokeLine%ODDrillpipe_inBase=5 ChokeLine%ODDrillpipe_in=5 KillLine%IDBase=8.6 !(inch) KillLine%ID=KillLine%IDBase KillLine%ODDrillpipe_inBase=5 KillLine%ODDrillpipe_in=5 !va=4 !(liter) !vb=8 !(liter) !cv=2; !flow coefficinet of regulator ShearRam%RAM_COURSE=320.2 !milimeter ShearRam%H_REGRAM=0 !(m)<<<<<<<<<<<<<<<<<<<<<<<< ShearRam%H_ShearRamBop=(BopStackSpecification%GroundLevel-BopStackSpecification%BlindRamHeight)*0.3048 ! foot to meter PipeRam1%H=(BopStackSpecification%GroundLevel-BopStackSpecification%UpperRamHeight)*0.3048 ! foot to meter PipeRam2%H_Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%LowerRamHeight)*0.3048 ! foot to meter Annular%H_AnnularBop=(BopStackSpecification%GroundLevel-BopStackSpecification%AnnularPreventerHeight)*0.3048 ! foot to meter ChokeLine%H_Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%KillHeight)*0.3048 ! foot to meter KillLine%H_Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%KillHeight)*0.3048 ! foot to meter RamLine%P_ACC=BopStackAcc%acc_ChargedPressure RAM%vdis_bottles=0 !initial discharged volume RamLine%FVR=BopStackAcc%FVR_TOT RAMS%minloss=0. !======================AIRPUMP INPUTS(CONSTANTS)=========================== RAM%FVR_AIR=0 Pumps%P_AIRP=0 RamLine%BA1=1003; RamLine%BA2=.03375; RamLine%BA3=4.014; RamLine%BA4=.2458 RamLine%BBA1 =31.8; RamLine%BBA2 =-725.7 ; RamLine%BBA3 =4154 Pumps%Qiter=7 !(gpm) ! Q=0.0003585; true RamLine%DeltaT_BOP=0.1 !second Pumps%TOL_AIR=.08 Pumps%alpha_Qair=0 Pumps%alpha_timeair=0 Pumps%alpha_paccair=RamLine%P_ACC Pumps%alpha_pairp=RamLine%P_ACC Pumps%alpha_diffpair=0 Pumps%alpha_lossesair=0 Pumps%alpha_fvrair=0 RamLine%counter_airp=1 !======================BOP INPUTS(CONSTANTS)=========================== if (Accumulator%PrechargePressure == 1400.) then RamLine%B1=1396; RamLine%B2=0.17; RamLine%B3=3.873; RamLine%B4=1.101 elseif (Accumulator%PrechargePressure == 2000.) then RamLine%B1=1980; RamLine%B2=0.1237; RamLine%B3=15.69; RamLine%B4=1.029 elseif (Accumulator%PrechargePressure == 600.) then RamLine%B1=591.9; RamLine%B2=0.1968; RamLine%B3=2.887; RamLine%B4=0.9757 else !(PrechargePressure == 1000.) then ! this is for precharge=1000 psi RamLine%B1=993.7; RamLine%B2=0.164; RamLine%B3=5.492; RamLine%B4=0.9796 endif BopStackAcc%ByPassOld= 1.0 RAM%p_bop=ShearRam%PA AnnularComputational%p_annular=AnnularComputational%pa_annular !Q=0.0055; !initial flow rate (m^3/s) RAM%flow=60 !(gpm) initial value RAM%Qzero=70 !for DP code, increasing Q after shear RAM%vdis_tot=0 RamLine%AIRP_SWITCH=0 !off position RamLine%ELECP_SWITCH=0 !off position RamLine%ShearBop_closed=1 PipeRam1%closed=1 PipeRam2%closed=1 ChokeLine%closed=1 KillLine%closed=1 Annular%Annular_closed=1 RamLine%FINISHED_shear=0 PipeRam1%finished=0 PipeRam2%finished=0 ChokeLine%finished=0 KillLine%finished=0 Annular%finished_Annular=0 Pumps%DELTAV_ELECP=0 RAM%vdis_elecp=0 !================================================================== RAM%timecounter_ram=0 RAM%Q=0 BopStackAcc%pram_reg=BopStackAcc%PRAMS_REGSET !psi !RamsReglatorSet Annular%Pannular_reg=min(BopControlPanel%AnnularRegulatorSetControl,1700.) BopControlPanel%MiddleRamsStatus= ShearRam%IDshearBop BopControlPanel%UpperRamsStatus= PipeRam1%ID BopControlPanel%LowerRamsStatus= PipeRam2%ID BopControlPanel%AnnularStatus = Annular%IDAnnular BopControlPanel%AccumulatorPressureGauge = RamLine%P_ACC RAM%time=0 ! WRITE(60,10) ' Overal Time','Q Ram Line','Vdis Ram Line','P Accumulator','Preg Ram Line','Preg Annular',' P BOP','ID Shear Ram', & ! 'ID Pipe Ram1','ID Pipe Ram2','ID Annular' !10 FORMAT(11(A18)) ! ! ! ! WRITE(60,60) RAM(2)%time,RAM(2)%Q,RAM(2)%vdis_tot,p_acc, & ! pram_reg,Pannular_reg,RAM(2)%p_bop,IDshearBop, & ! IDPipeRam1,IDPipeRam2,IDAnnular !60 FORMAT(11(f18.5)) BopControlPanel%MiddleRamsOpenLED = LedOn BopStackInput%MiddleRamsOpenLEDMine = LedOn BopControlPanel%MiddleRamsCloseLED = LedOff BopStackInput%MiddleRamsCloseLEDMine = LedOff RamLine%ShearRamIsOpening = .false. RamLine%ShearRamIsClosing = .false. BopControlPanel%UpperRamsOpenLED = LedOn BopStackInput%UpperRamsOpenLEDMine = LedOn BopControlPanel%UpperRamsCloseLED = LedOff BopStackInput%UpperRamsCloseLEDMine = LedOff PipeRam1%IsOpening = .false. PipeRam1%IsClosing = .false. BopControlPanel%LowerRamsOpenLED = LedOn BopStackInput%LowerRamsOpenLEDMine = LedOn BopControlPanel%LowerRamsCloseLED = LedOff BopStackInput%LowerRamsCloseLEDMine = LedOff PipeRam2%IsOpening = .false. PipeRam2%IsClosing = .false. BopControlPanel%ChokeLineOpenLED = LedOff BopStackInput%ChokeLineOpenLEDMine = LedOff BopControlPanel%ChokeLineCloseLED = LedOn BopStackInput%ChokeLineCloseLEDMine = LedOn ChokeLine%IsOpening = .false. ChokeLine%IsClosing = .false. BopControlPanel%KillLineOpenLED = LedOff BopStackInput%KillLineOpenLedMine = LedOff BopControlPanel%KillLineCloseLED = LedOn BopStackInput%KillLineCloseLedMine = LedOn KillLine%IsOpening = .false. KillLine%IsClosing = .false. BopControlPanel%AnnularOpenLED = LedOn BopStackInput%AnnularOpenLedMine = LedOn BopControlPanel%AnnularCloseLED = LedOff BopStackInput%AnnularCloseLedMine = LedOff Annular%AnnularIsOpening = .false. Annular%AnnularIsClosing = .false. Annular%FirstSet=1 AnnularComputational%RamsFirstSet=1 BopControlPanel%ManifoldPressureGauge=BopStackAcc%PRAMS_REGSET !RamsReglatorSet BopControlPanel%AnnularPressureGauge= (1 - Annular%AnnularPressureGaugeMalf) * min(BopControlPanel%AnnularRegulatorSetControl,1700.) AnnularComputational%PannularTimeStepDelay = int(1./RamLine%DeltaT_BOP) ! 1/0.1 : for 1 sec delay in AnnRegulator shot time DO i = 1 , AnnularComputational%PannularTimeStepDelay CALL AnnularComputational%Pannular_regDelay%AddToFirst(BopControlPanel%AnnularPressureGauge) END DO end