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.
 
 
 
 
 
 

115 lines
5.6 KiB

  1. module CDrillStemProblemsVariables
  2. use CProblemDifinition
  3. implicit none
  4. public
  5. ! Input vars
  6. type:: DrillStemProblemsType
  7. type(CProblem) :: StringDragIncrease
  8. type(CProblem) :: StringTorqueIncrease
  9. type(CProblem) :: StringTorqueFluctuation
  10. real(8) :: StringDragIncreaseTime
  11. real(8) :: StringTorqueIncreaseTime
  12. end type DrillStemProblemsType
  13. type(DrillStemProblemsType)::DrillStemProblems
  14. ! procedure (ActionInteger), pointer :: StringDragIncreasePtr
  15. ! procedure (ActionInteger), pointer :: StringTorqueIncreasePtr
  16. ! procedure (ActionInteger), pointer :: StringTorqueFluctuationPtr
  17. contains
  18. subroutine ProcessDrillStemProblemsDueTime(time)
  19. implicit none
  20. integer :: time
  21. if(DrillStemProblems%StringDragIncrease%ProblemType == Time_ProblemType) call ProcessDueTime(DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, time)
  22. if(DrillStemProblems%StringTorqueIncrease%ProblemType == Time_ProblemType) call ProcessDueTime(DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, time)
  23. if(DrillStemProblems%StringTorqueFluctuation%ProblemType == Time_ProblemType) call ProcessDueTime(DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, time)
  24. end subroutine
  25. subroutine ProcessDrillStemProblemsDuePumpStrokes(strokes)
  26. implicit none
  27. integer :: strokes
  28. if(DrillStemProblems%StringDragIncrease%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, strokes)
  29. if(DrillStemProblems%StringTorqueIncrease%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, strokes)
  30. if(DrillStemProblems%StringTorqueFluctuation%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, strokes)
  31. end subroutine
  32. subroutine ProcessDrillStemProblemsDueVolumePumped(volume)
  33. implicit none
  34. real(8) :: volume
  35. if(DrillStemProblems%StringDragIncrease%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, volume)
  36. if(DrillStemProblems%StringTorqueIncrease%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, volume)
  37. if(DrillStemProblems%StringTorqueFluctuation%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, volume)
  38. end subroutine
  39. subroutine ProcessDrillStemProblemsDueDistanceDrilled(distance)
  40. implicit none
  41. real(8) :: distance
  42. if(DrillStemProblems%StringDragIncrease%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, distance)
  43. if(DrillStemProblems%StringTorqueIncrease%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, distance)
  44. if(DrillStemProblems%StringTorqueFluctuation%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, distance)
  45. end subroutine
  46. subroutine ChangeStringDragIncrease(status)
  47. implicit none
  48. integer, intent (in) :: status
  49. ! if(associated(StringDragIncreasePtr)) call StringDragIncreasePtr(status)
  50. !if(status == Clear_StatusType) print*,'On_StringDragIncrease_Clear'
  51. !if(status == Executed_StatusType) print*,'On_StringDragIncrease_Execute'
  52. endsubroutine
  53. subroutine ChangeStringTorqueIncrease(status)
  54. implicit none
  55. integer, intent (in) :: status
  56. ! if(associated(StringTorqueIncreasePtr)) call StringTorqueIncreasePtr(status)
  57. !if(status == Clear_StatusType) print*,'On_StringTorqueIncrease_Clear'
  58. !if(status == Executed_StatusType) print*,'On_StringTorqueIncrease_Execute'
  59. endsubroutine
  60. subroutine ChangeStringTorqueFluctuation(status)
  61. implicit none
  62. integer, intent (in) :: status
  63. ! if(associated(StringTorqueFluctuationPtr)) call StringTorqueFluctuationPtr(status)
  64. !if(status == Clear_StatusType) print*,'On_StringTorqueFluctuation_Clear'
  65. !if(status == Executed_StatusType) print*,'On_StringTorqueFluctuation_Execute'
  66. endsubroutine
  67. ! subroutine SubscribeStringDragIncrease(v)
  68. ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStringDragIncrease
  69. ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeStringDragIncrease' :: SubscribeStringDragIncrease
  70. ! implicit none
  71. ! procedure (ActionInteger) :: v
  72. ! StringDragIncreasePtr => v
  73. ! end subroutine
  74. ! subroutine SubscribeStringTorqueIncrease(v)
  75. ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStringTorqueIncrease
  76. ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeStringTorqueIncrease' :: SubscribeStringTorqueIncrease
  77. ! implicit none
  78. ! procedure (ActionInteger) :: v
  79. ! StringTorqueIncreasePtr => v
  80. ! end subroutine
  81. ! subroutine SubscribeStringTorqueFluctuation(v)
  82. ! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStringTorqueFluctuation
  83. ! !DEC$ ATTRIBUTES ALIAS: 'SubscribeStringTorqueFluctuation' :: SubscribeStringTorqueFluctuation
  84. ! implicit none
  85. ! procedure (ActionInteger) :: v
  86. ! StringTorqueFluctuationPtr => v
  87. ! end subroutine
  88. end module CDrillStemProblemsVariables