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

154 рядки
5.4 KiB

  1. module CMudTreatmentProblemsVariables
  2. use CProblemDifinition
  3. implicit none
  4. public
  5. ! Input vars
  6. type(CProblem) :: Degasser
  7. type(CProblem) :: ShaleShaker
  8. type(CProblem) :: Desander
  9. type(CProblem) :: Desilter
  10. procedure (ActionInteger), pointer :: DegasserPtr
  11. procedure (ActionInteger), pointer :: ShaleShakerPtr
  12. procedure (ActionInteger), pointer :: DesanderPtr
  13. procedure (ActionInteger), pointer :: DesilterPtr
  14. contains
  15. subroutine ProcessMudTreatmentProblemsDueTime(time)
  16. implicit none
  17. integer :: time
  18. if(Degasser%ProblemType == Time_ProblemType) call ProcessDueTime(Degasser, ChangeDegasser, time)
  19. if(ShaleShaker%ProblemType == Time_ProblemType) call ProcessDueTime(ShaleShaker, ChangeShaleShaker, time)
  20. if(Desander%ProblemType == Time_ProblemType) call ProcessDueTime(Desander, ChangeDesander, time)
  21. if(Desilter%ProblemType == Time_ProblemType) call ProcessDueTime(Desilter, ChangeDesilter, time)
  22. end subroutine
  23. subroutine ProcessMudTreatmentProblemsDuePumpStrokes(strokes)
  24. implicit none
  25. integer :: strokes
  26. if(Degasser%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Degasser, ChangeDegasser, strokes)
  27. if(ShaleShaker%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ShaleShaker, ChangeShaleShaker, strokes)
  28. if(Desander%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Desander, ChangeDesander, strokes)
  29. if(Desilter%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Desilter, ChangeDesilter, strokes)
  30. end subroutine
  31. subroutine ProcessMudTreatmentProblemsDueVolumePumped(volume)
  32. implicit none
  33. real(8) :: volume
  34. if(Degasser%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Degasser, ChangeDegasser, volume)
  35. if(ShaleShaker%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ShaleShaker, ChangeShaleShaker, volume)
  36. if(Desander%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Desander, ChangeDesander, volume)
  37. if(Desilter%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Desilter, ChangeDesilter, volume)
  38. end subroutine
  39. subroutine ProcessMudTreatmentProblemsDueDistanceDrilled(distance)
  40. implicit none
  41. real(8) :: distance
  42. if(Degasser%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Degasser, ChangeDegasser, distance)
  43. if(ShaleShaker%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ShaleShaker, ChangeShaleShaker, distance)
  44. if(Desander%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Desander, ChangeDesander, distance)
  45. if(Desilter%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Desilter, ChangeDesilter, distance)
  46. end subroutine
  47. subroutine ChangeDegasser(status)
  48. implicit none
  49. integer, intent (in) :: status
  50. if(associated(DegasserPtr)) call DegasserPtr(status)
  51. !if(status == Clear_StatusType) print*,'On_Degasser_Clear'
  52. !if(status == Executed_StatusType) print*,'On_Degasser_Execute'
  53. endsubroutine
  54. subroutine ChangeShaleShaker(status)
  55. implicit none
  56. integer, intent (in) :: status
  57. if(associated(ShaleShakerPtr)) call ShaleShakerPtr(status)
  58. !if(status == Clear_StatusType) print*,'On_ShaleShaker_Clear'
  59. !if(status == Executed_StatusType) print*,'On_ShaleShaker_Execute'
  60. endsubroutine
  61. subroutine ChangeDesander(status)
  62. implicit none
  63. integer, intent (in) :: status
  64. if(associated(DesanderPtr)) call DesanderPtr(status)
  65. !if(status == Clear_StatusType) print*,'On_Desander_Clear'
  66. !if(status == Executed_StatusType) print*,'On_Desander_Execute'
  67. endsubroutine
  68. subroutine ChangeDesilter(status)
  69. implicit none
  70. integer, intent (in) :: status
  71. if(associated(DesilterPtr)) call DesilterPtr(status)
  72. !if(status == Clear_StatusType) print*,'On_Desilter_Clear'
  73. !if(status == Executed_StatusType) print*,'On_Desilter_Execute'
  74. endsubroutine
  75. subroutine SubscribeDegasser(v)
  76. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDegasser
  77. !DEC$ ATTRIBUTES ALIAS: 'SubscribeDegasser' :: SubscribeDegasser
  78. implicit none
  79. procedure (ActionInteger) :: v
  80. DegasserPtr => v
  81. end subroutine
  82. subroutine SubscribeShaleShaker(v)
  83. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeShaleShaker
  84. !DEC$ ATTRIBUTES ALIAS: 'SubscribeShaleShaker' :: SubscribeShaleShaker
  85. implicit none
  86. procedure (ActionInteger) :: v
  87. ShaleShakerPtr => v
  88. end subroutine
  89. subroutine SubscribeDesander(v)
  90. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDesander
  91. !DEC$ ATTRIBUTES ALIAS: 'SubscribeDesander' :: SubscribeDesander
  92. implicit none
  93. procedure (ActionInteger) :: v
  94. DesanderPtr => v
  95. end subroutine
  96. subroutine SubscribeDesilter(v)
  97. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDesilter
  98. !DEC$ ATTRIBUTES ALIAS: 'SubscribeDesilter' :: SubscribeDesilter
  99. implicit none
  100. procedure (ActionInteger) :: v
  101. DesilterPtr => v
  102. end subroutine
  103. end module CMudTreatmentProblemsVariables