Simulation Core
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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