module CDownHoleVariables
    use CDownHoleTypes
    ! use CStringConfigurationVariables
    ! use CDownHoleActions
    use CLog4
    implicit none    
    public
    !!!!!!!!!!!!!!!!!!!!!
    ! Outputs to user interface
    !!!!!!!!!!!!!!!!!!!!!
    type :: DownHoleType
        ! Input
        logical :: AnnDrillMud
        logical :: AnnCirculateMud
        
        ! Output
        integer :: AnnalusFluidsCount = 0
        integer :: StringFluidsCount = 0
        type(CFluid), allocatable :: AnnalusFluids(:) !, target
        type(CFluid), allocatable :: StringFluids(:)
        integer :: StringCount = 0
        type(CStringComponent), allocatable :: String(:)
        type(CBopElement), allocatable :: BopElements(:)
        real(8) :: DrillPipePressure
        real(8) :: CasingPressure
        real(8) :: ShoePressure
        real(8) :: BottomHolePressure
        real(8) :: FormationPressure
        real :: InfluxRate
        real :: KickVolume
        real :: SecondKickVolume
        real :: PermeabilityExposedHeight
        
        ! Not used (only density printed)
        ! real(8) :: Density
        ! real(8) :: Pressure
        ! real(8) :: Temperature
        ! real(8) :: Height
        ! real(8) :: Volume
    end type DownHoleType
    contains         
end module CDownHoleVariables