    SUBROUTINE Choke_StartUp()
    
    USE CHOKEVARIABLES
use SimulationVariables !@
    USE CChokeProblemsVariables
    implicit none 
    
  CALL LOSS_INPUTS_CHOKE()
    
    !OPEN(150,FILE='CHOKE_AIRPUMP_OUTPUTS.DAT')
    
    
    !data%State%CHOOKE(1)%WashoutMalf=1
    !data%State%CHOOKE(1)%PlugMalf=0
    !data%State%CHOOKE(1)%FailMalf=0
    !
    !data%State%CHOOKE(2)%WashoutMalf=1
    !data%State%CHOOKE(2)%PlugMalf=0
    !data%State%CHOOKE(2)%FailMalf=0 
    !
    !
    !ChokeAirFail=0
    !
    !GaugeChokePositionMailf=0

    
    
    
    
    
    
    data%State%Choke%kRatio=1.4
data%State%Choke%Cp=0.24
data%State%Choke%CL=0.8

data%State%Choke%x1=0.5  
 
data%State%Choke%LiquidPPG=9.
data%State%Choke%LiquidDensity=data%State%Choke%LiquidPPG*7.48 !lbm/ft**3

data%State%Choke%VL=1.0/data%State%Choke%LiquidDensity   !SpecificVolume of Liquid

data%State%Choke%Cv=data%State%Choke%Cp/data%State%Choke%kRatio

data%State%Choke%nPolytripic=1+(data%State%Choke%x1*(data%State%Choke%Cp-data%State%Choke%Cv)/(data%State%Choke%x1*data%State%Choke%Cv+(1-data%State%Choke%x1)*data%State%Choke%CL))
    
data%State%Choke%VG1=1./0.748    !lbm/ft**3 Specific Volume of Air, Upstream

data%State%Choke%Cdrag=0.8
data%State%Choke%Pwh=1400. !psi


data%State%Choke%Patm=14.7
data%State%Choke%MixDens2=data%State%Choke%x1*data%State%Choke%VG1 !lbm/ft**3



data%State%Choke%epsilon_abs= 1e-5
data%State%Choke%epsilon_step= 1e-5


!ChokeDiameter= 32/64.  !in

data%State%CHOOKE%PercentClose= 0.0
       !AreaChoke=0.01334635

  ! data%State%CHOOKE(1)%AreaChoke=0.01334635
!ChokeAreaFullyOpen = 123.d0 / 64.d0     ! fully open area is 123/64 in^2 = 0.01334635 ft^2

data%State%AirPumpLine%DeltaT_Choke=0.1
!TotalStrokes1=0.
!TotalStrokes2=0.

data%State%Choke%HydraulicChoke1WashoutCoef= 0.0
data%State%Choke%HydraulicChoke2WashoutCoef= 0.0



data%State%Choke%ChokePlugTimeDelay = int(180./data%State%AirPumpLine%DeltaT_Choke)       ! =1800 = 180/0.1 : for 3 min delay

data%State%Choke%Present_HydraulicChoke1Plug = REAL(data%problems%ChokeProblems%HydraulicChoke1PluggedPercent)/100.
data%State%Choke%HydraulicChoke1PluggedPercent_Old= data%problems%ChokeProblems%HydraulicChoke1PluggedPercent
data%State%Choke%Plug1TimeCounter= 0
data%State%Choke%DeltaPlug1Percent = 0.0

data%State%Choke%Present_HydraulicChoke2Plug = REAL(data%problems%ChokeProblems%HydraulicChoke2PluggedPercent)/100.
data%State%Choke%HydraulicChoke2PluggedPercent_Old= data%problems%ChokeProblems%HydraulicChoke2PluggedPercent
data%State%Choke%Plug2TimeCounter= 0
data%State%Choke%DeltaPlug2Percent = 0.0




    

!======================AIRPUMP INPUTS(CONSTANTS)===========================
    data%State%AirPumpLine%CourseBase= 24. !cm
    data%State%CHOOKE%PassedCourse= 0.
    data%EquipmentControl%ChokeControlPanel%ChokePosition=0.

    data%State%AirPumpLine%Acylinder= PI*(8.**2)/4.        !  (CM^2),  8=DIAMETER,   24=course ,  3785.412: cm^3 to galon


    data%State%CHOOKE%ChokeIsOpening = .false.
    data%State%CHOOKE%ChokeIsClosing = .false. 
         
         
    data%State%AirPumpLine%P_AIRP=0

    data%State%AirDrivenPump%cc1 =  0.1354; data%State%AirDrivenPump%cc2 = -2.066; data%State%AirDrivenPump%cc3 = -21.09; data%State%AirDrivenPump%cc4 = -51.36; data%State%AirDrivenPump%cc5 = 5935           ! FOR OUTPUT IN GPM
    ! cc1 = 4.754e-07; cc2 = -0.0001676; cc3 = -0.03953; cc4 = -2.223; cc5 = 5935         FOR OUTPUT IN IN^3/MIN


data%State%AirPumpLine%Pdownstrem= 4950 !+0.01*Pchoke   (psi)       <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
data%State%AirPumpLine%QITER=5.  !(gpm)

! Q=0.0003585; true
data%State%AirPumpLine%TIME=0
data%State%AirPumpLine%TOL_AIR=0.05

data%State%AirPumpLine%alpha_Qair=0
data%State%AirPumpLine%alpha_timeair=0
data%State%AirPumpLine%alpha_Pdownstrem=data%State%AirPumpLine%Pdownstrem
data%State%AirPumpLine%alpha_diffpair=0
data%State%AirPumpLine%alpha_lossesair=0

    end