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.
 
 
 
 
 
 

156 lines
6.3 KiB

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