Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

87 lines
2.4 KiB

  1. module CIrSafetyValvePermission
  2. use COperationScenariosVariables
  3. implicit none
  4. contains
  5. subroutine Evaluate_IrSafetyValvePermission()
  6. use TD_DrillStemComponents
  7. use CStudentStationVariables, only: FillupHeadInstallation
  8. implicit none
  9. if (DriveType == TopDrive_DriveType) then
  10. #ifdef OST
  11. print*, 'Evaluate_IrSafetyValvePermission=TopDrive'
  12. #endif
  13. !TOPDRIVE-CODE=55
  14. if (GetRotaryRpm() == 0.0d0 .and.&
  15. (Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 10.0) .and.&
  16. Get_JointConnectionPossible() == .false. .and.&
  17. Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.&
  18. FillupHeadInstallation == .false.) then
  19. call Set_IrSafetyValvePermission(.true.)
  20. return
  21. end if
  22. endif
  23. if (DriveType == Kelly_DriveType) then
  24. #ifdef OST
  25. print*, 'Evaluate_IrSafetyValvePermission=Kelly'
  26. #endif
  27. !OPERATION-CODE=57
  28. if (Get_OperationCondition() == OPERATION_TRIP .and.&
  29. GetRotaryRpm() == 0.0d0 .and.&
  30. !(Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .or. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) .and.&
  31. !Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 10.0 .and.&
  32. TD_TopJointHeight >= 3.0 .and. TD_TopJointHeight <= 10.0 .and.&
  33. !Get_SafetyValveHeight() >= 22.0 .and. Get_SafetyValveHeight() <= 35.0 .and.&
  34. Get_JointConnectionPossible() == .false. .and.&
  35. Get_FillupHead() == FILLUP_HEAD_REMOVE .and.&
  36. Get_Swing() == SWING_WELL_END) then
  37. call Set_IrSafetyValvePermission(.true.)
  38. return
  39. end if
  40. call Set_IrSafetyValvePermission(.false.)
  41. endif
  42. end subroutine
  43. subroutine Subscribe_IrSafetyValvePermission()
  44. implicit none
  45. ! imp me...
  46. end subroutine
  47. end module CIrSafetyValvePermission