# 1 "/home/admin/SimulationCore2/FluidFlow/Flow_Startup.f90" SUBROUTINE FlowStartup USE Fluid_Flow_Startup_Vars USE CStringConfigurationVariables USE CMudPropertiesVariables USE FricPressDropVarsModule use KickVARIABLESModule USE MudSystemVARIABLES use SimulationVariables !@@@ use PressureDisplayVARIABLESModule USE CShoeVariables USE TD_DrillStemComponents use SimulationVariables !@, pi3 => pi use SimulationVariables !@ USE CWellSurveyDataVariables USE CHOKEVARIABLES use SimulationVariables !@, pi4 => pi use SimulationVariables IMPLICIT NONE INTEGER :: i data%State%PressureDisplay%PressureGauges(:) = 0.0 Theta300Refrence = 37.2 Theta600Refrence = 60.2 KickSinglePocket = Reservoir%MakeKickSinglePacket IF (KickSinglePocket) THEN MaxGasPocket = 1 ELSE MaxGasPocket = 4 END IF MaxChokeDensityChange = 25.0 ! [ppg/min] ChokeMinDensity = 2.0 ChokeDensity = data%Configuration%Mud%ActiveDensity MinKickVol = 0.5 ! USGal SecondaryKickVol = 0.0 SecondaryKickWeight = 0.0 NoGasPocket = 0 ! No Kick WellHeadOpen = .TRUE. WellHeadWasOpen = .TRUE. data%State%FricPressDrop%BackPressure = 0.0 GasKickPumpFlowRate = 0.0 data%Equipments%DownHole%KickVolume = 0.0 data%Equipments%DownHole%InfluxRate = 0.0 ExitMass = 0.0 MinAllowableKickVol = 1.0 * (42.0 / Convft3toUSgal) ! 1 bbl * 42 gal/bbl / 7.48 gal/ft^3 = ... ft^3 data%State%FricPressDrop%StCompressedMudVol = 0.0 data%State%FricPressDrop%AnnCompressedMudVol = 0.0 KickFlux = .FALSE. KickOffBottom = .FALSE. KickWasExitingThroughChoke = .FALSE. data%State%FricPressDrop%FloatValveOpen = .TRUE. data%State%Choke%ChokeAreaFullyOpen = 123.0 / 64.0 ! fully open area is 123/64 in^2 = 0.01334635 ft^2 data%State%FricPressDrop%ChokeBypassArea = PI / 4.0 * data%Configuration%BopStack%ChokeLineId**2 data%State%FricPressDrop%BHPSafetyMargin = 150.0 data%State%FricPressDrop%AChBHPTol = 15.0 data%State%FricPressDrop%ManChoke1Plug = 0 data%State%FricPressDrop%ManChoke2Plug = 0 data%State%FricPressDrop%ManChoke1Washout = 0 data%State%FricPressDrop%ManChoke2Washout = 0 data%State%FricPressDrop%BitJetsPlugged = 0 data%State%FricPressDrop%BitJetsWashedOut = 0 data%State%FricPressDrop%CasingPressure_DataDisplayMalF = 0 SoundSpeed = 1530.0 / Convfttom data%State%PressureDisplay%PressureTimeStepDelay(1) = INT(2.0 * SUM(data%Configuration%StringConfiguration%StringConfigurations(2:)%ComponentLength) / SoundSpeed / dt) data%State%PressureDisplay%PressureTimeStepDelay(2) = INT(data%Configuration%Path%Items(SIZE(data%Configuration%Path%Items))%MeasuredDepth / SoundSpeed / dt) data%State%PressureDisplay%PressureTimeStepDelay(3) = INT(data%Configuration%Shoe%ShoeDepth / SoundSpeed / dt) !WRITE (*,*) SUM(StringConfigurations(2:)%ComponentLength), PathGenerations(SIZE(PathGenerations))%TotalVerticalDepth!, WellSurveyData(SIZE(WellSurveyData))%TotalVerticalDepth !WRITE (*,*) PathGenerations(SIZE(PathGenerations))%MeasuredDepth!, WellSurveyData(SIZE(WellSurveyData))%MeasuredDepth WRITE (*,*) 'time step delay', data%State%PressureDisplay%PressureTimeStepDelay DO i = 1 , data%State%PressureDisplay%PressureTimeStepDelay(1) CALL PumpPressureDelay%AddToFirst(0.0) END DO DO i = 1 , data%State%PressureDisplay%PressureTimeStepDelay(2) CALL BottomHolePressureDelay%AddToFirst(REAL(0.052 * data%Configuration%Mud%ActiveDensity * data%Configuration%Path%Items(SIZE(data%Configuration%Path%Items))%TotalVerticalDepth)) END DO DO i = 1 , data%State%PressureDisplay%PressureTimeStepDelay(3) CALL ShoePressureDelay%AddToFirst(REAL(0.052 * data%Configuration%Mud%ActiveDensity * data%Configuration%Shoe%ShoeDepth)) END DO !!!!!!! Methane Information data%State%GasType(1)%CritPress = 673.0 data%State%GasType(1)%CritTemp = 344.0 data%State%GasType(1)%MolarWt = 16.04 data%State%GasType(1)%StDensity = 0.04238 data%State%GasType(1)%GasConstant = RUniversal / data%State%GasType(1)%MolarWt !!!!!!!! H2S Information data%State%GasType(2)%CritPress = 1306.0 data%State%GasType(2)%CritTemp = 673.0 data%State%GasType(2)%MolarWt = 34.08 data%State%GasType(2)%StDensity = 0.09087 data%State%GasType(2)%GasConstant = RUniversal / data%State%GasType(2)%MolarWt !!!!!!!! CO2 Information data%State%GasType(3)%CritPress = 1072.0 data%State%GasType(3)%CritTemp = 548.0 data%State%GasType(3)%MolarWt = 44.01 !data%State%GasType(3)%StDensity = 00 data%State%GasType(3)%GasConstant = RUniversal / data%State%GasType(2)%MolarWt !!!!!!!! Mud density and viscosity ! Theta600Refrence = data%Configuration%Mud%ActiveThetaSixHundred ! Theta300Refrence = data%Configuration%Mud%ActiveThetaThreeHundred DensityRefrence = data%Configuration%Mud%ActiveDensity END SUBROUTINE