module CMudPropertiesVariables
    use CIActionReference
    !**use CDoubleEventHandlerCollection
    implicit none   
    public        
    !constants
    integer, parameter :: WaterBase_MudType = 0
    integer, parameter :: OilBase_MudType = 1    
    integer, parameter :: PowerLaw_RheologyModel = 0
    integer, parameter :: Bingham_RheologyModel = 1
    integer, parameter :: Newtonian_RheologyModel = 2
    INTEGER, PARAMETER :: Herschel_Bulkley_RheologyModel = 3
    
    ! variables
    Type::MudPropertiesType
        integer :: ActiveMudType
        integer :: ActiveRheologyModel
        real(8) :: ActiveMudVolume
        real(8) :: ActiveMudVolumeGal
        real(8) :: ActiveDensity
        real(8) :: ActivePlasticViscosity
        real(8) :: ActiveYieldPoint
        real(8) :: ActiveThetaThreeHundred
        real(8) :: ActiveThetaSixHundred
        
        integer :: ReserveMudType
        real(8) :: ReserveMudVolume
        real(8) :: ReserveMudVolumeGal
        real(8) :: ReserveDensity
        real(8) :: ReservePlasticViscosity
        real(8) :: ReserveYieldPoint
        real(8) :: ReserveThetaThreeHundred
        real(8) :: ReserveThetaSixHundred
        
        real(8) :: ActiveTotalTankCapacity
        real(8) :: ActiveTotalTankCapacityGal
        real(8) :: ActiveSettledContents
        real(8) :: ActiveSettledContentsGal
        real(8) :: ActiveTotalContents
        real(8) :: ActiveTotalContentsGal
        logical :: ActiveAutoDensity
        real(8) :: InitialTripTankMudVolume
        real(8) :: InitialTripTankMudVolumeGal
        real(8) :: PedalFlowMeter
    End type MudPropertiesType
!     Type(MudPropertiesType)::MudProperties
    
    
    
    ! subroutine SubscribeActiveMudVolume(a)
    ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeActiveMudVolume
    ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeActiveMudVolume' :: SubscribeActiveMudVolume
    !     implicit none
    !     procedure (ActionDouble) :: a
    !     ActiveMudVolumePtr => a
    ! end subroutine
        
    ! subroutine SubscribeActiveDensity(a)
    ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeActiveDensity
    ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeActiveDensity' :: SubscribeActiveDensity
    !     implicit none
    !     procedure (ActionDouble) :: a
    !     ActiveDensityPtr => a
    ! end subroutine
    
    ! subroutine SubscribeReserveMudVolume(a)
    ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReserveMudVolume
    ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeReserveMudVolume' :: SubscribeReserveMudVolume
    !     implicit none
    !     procedure (ActionDouble) :: a
    !     ReserveMudVolumePtr => a
    ! end subroutine
        
    ! subroutine SubscribeReserveDensity(a)
    ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReserveDensity
    ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeReserveDensity' :: SubscribeReserveDensity
    !     implicit none
    !     procedure (ActionDouble) :: a
    !     ReserveDensityPtr => a
    ! end subroutine
        
end module CMudPropertiesVariables