MODULE Drawworks_VARIABLES
    
    IMPLICIT NONE
    PUBLIC
    
    
    
    ! REAL, PARAMETER :: pi=3.14159265
    
    
    
!**************************************************************************************************
!**************** Define Drawworks Array ****************************************************
    TYPE, PUBLIC :: Drawworks_Var
!*****  Drawworks_VARIABLES  **********************
    
    logical :: CrownCollision, FloorCollision
    INTEGER :: AssignmentSwitch , K_Throttle , Switch
    INTEGER :: MotorFaileMalf , ClutchEngageMalf , ClutchDisengageMalf
    INTEGER :: motion, DriveType, ShearBopSituation, TDDrillStemComponentsNumbs
    INTEGER :: DrillModeCond, StringIsBottomOfWell
    INTEGER , Dimension(6) :: TDBOPElementNo

    REAL :: Throttle, RateChange
    REAL :: Diameter
    REAL :: Hook_Height, Hook_Height_ini, Hook_Height_inim, Hook_Height_ini_graph_output, Hook_Height_final, max_Hook_Height, min_Hook_Height, HookHeight_graph_output
    REAL :: N_Throtle, Conv_Ratio, NumberOfLine, Speed, N_new, N_old      ! N[RPM]
    REAL :: w_drum, w_old_drum                                            ! w[rad/s]
    REAL , Dimension(6) :: TDBOPHeight
    REAL , Dimension(4) :: TDBOPRamDiam
    REAL :: TDBOPThickness, TDDrillStemBottom, TDWellTotalLength, TDDlMax
    REAL , Allocatable, DIMENSION(:) :: TDDrillStemsDownDepth
    REAL , Allocatable, DIMENSION(:) :: TDDrillStemsTopDepth
    REAL , Allocatable, DIMENSION(:) :: TDDrillStemsToolJointRange
    REAL , Allocatable, DIMENSION(:) :: TDDrillStemsRtoolJoint
    REAL    :: TDHookHeight
    
    REAL    :: time_step
    
    INTEGER :: BLWR  ! 1=On , 0=Off
    
!*************  Sound_VARIABLES  **********************
    INTEGER :: SoundFw , SoundRev
    Logical :: SoundBlower
    Logical :: SoundFloorCollision , SoundCrownCollision
    
    END TYPE Drawworks_Var
!***********************************************************************************************
!****************************************************************************************************    
    
    
    
    
    
END MODULE Drawworks_VARIABLES