Simulation Core
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

223 lignes
18 KiB

  1. module CChokeProblems
  2. use SimulationVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine ProcessChokeProblemsDueTime(time)
  7. implicit none
  8. integer :: time
  9. if(data%problems%ChokeProblems%HydraulicChoke1Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, time)
  10. if(data%problems%ChokeProblems%HydraulicChoke1Fail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, time)
  11. if(data%problems%ChokeProblems%HydraulicChoke1Washout%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, time)
  12. if(data%problems%ChokeProblems%HydraulicChoke2Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, time)
  13. if(data%problems%ChokeProblems%HydraulicChoke2Fail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, time)
  14. if(data%problems%ChokeProblems%HydraulicChoke2Washout%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, time)
  15. if(data%problems%ChokeProblems%ManualChoke1Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, time)
  16. if(data%problems%ChokeProblems%ManualChoke1Fail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, time)
  17. if(data%problems%ChokeProblems%ManualChoke1Washout%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, time)
  18. if(data%problems%ChokeProblems%ManualChoke2Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, time)
  19. if(data%problems%ChokeProblems%ManualChoke2Fail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, time)
  20. if(data%problems%ChokeProblems%ManualChoke2Washout%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, time)
  21. if(data%problems%ChokeProblems%ChokePanelAirFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, time)
  22. end subroutine
  23. subroutine ProcessChokeProblemsDuePumpStrokes(strokes)
  24. implicit none
  25. integer :: strokes
  26. if(data%problems%ChokeProblems%HydraulicChoke1Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, strokes)
  27. if(data%problems%ChokeProblems%HydraulicChoke1Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, strokes)
  28. if(data%problems%ChokeProblems%HydraulicChoke1Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, strokes)
  29. if(data%problems%ChokeProblems%HydraulicChoke2Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, strokes)
  30. if(data%problems%ChokeProblems%HydraulicChoke2Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, strokes)
  31. if(data%problems%ChokeProblems%HydraulicChoke2Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, strokes)
  32. if(data%problems%ChokeProblems%ManualChoke1Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, strokes)
  33. if(data%problems%ChokeProblems%ManualChoke1Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, strokes)
  34. if(data%problems%ChokeProblems%ManualChoke1Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, strokes)
  35. if(data%problems%ChokeProblems%ManualChoke2Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, strokes)
  36. if(data%problems%ChokeProblems%ManualChoke2Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, strokes)
  37. if(data%problems%ChokeProblems%ManualChoke2Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, strokes)
  38. if(data%problems%ChokeProblems%ChokePanelAirFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, strokes)
  39. end subroutine
  40. subroutine ProcessChokeProblemsDueVolumePumped(volume)
  41. implicit none
  42. real(8) :: volume
  43. if(data%problems%ChokeProblems%HydraulicChoke1Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, volume)
  44. if(data%problems%ChokeProblems%HydraulicChoke1Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, volume)
  45. if(data%problems%ChokeProblems%HydraulicChoke1Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, volume)
  46. if(data%problems%ChokeProblems%HydraulicChoke2Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, volume)
  47. if(data%problems%ChokeProblems%HydraulicChoke2Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, volume)
  48. if(data%problems%ChokeProblems%HydraulicChoke2Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, volume)
  49. if(data%problems%ChokeProblems%ManualChoke1Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, volume)
  50. if(data%problems%ChokeProblems%ManualChoke1Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, volume)
  51. if(data%problems%ChokeProblems%ManualChoke1Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, volume)
  52. if(data%problems%ChokeProblems%ManualChoke2Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, volume)
  53. if(data%problems%ChokeProblems%ManualChoke2Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, volume)
  54. if(data%problems%ChokeProblems%ManualChoke2Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, volume)
  55. if(data%problems%ChokeProblems%ChokePanelAirFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, volume)
  56. end subroutine
  57. subroutine ProcessChokeProblemsDueDistanceDrilled(distance)
  58. implicit none
  59. real(8) :: distance
  60. if(data%problems%ChokeProblems%HydraulicChoke1Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, distance)
  61. if(data%problems%ChokeProblems%HydraulicChoke1Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, distance)
  62. if(data%problems%ChokeProblems%HydraulicChoke1Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, distance)
  63. if(data%problems%ChokeProblems%HydraulicChoke2Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, distance)
  64. if(data%problems%ChokeProblems%HydraulicChoke2Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, distance)
  65. if(data%problems%ChokeProblems%HydraulicChoke2Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, distance)
  66. if(data%problems%ChokeProblems%ManualChoke1Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, distance)
  67. if(data%problems%ChokeProblems%ManualChoke1Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, distance)
  68. if(data%problems%ChokeProblems%ManualChoke1Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, distance)
  69. if(data%problems%ChokeProblems%ManualChoke2Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, distance)
  70. if(data%problems%ChokeProblems%ManualChoke2Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, distance)
  71. if(data%problems%ChokeProblems%ManualChoke2Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, distance)
  72. if(data%problems%ChokeProblems%ChokePanelAirFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, distance)
  73. end subroutine
  74. subroutine ChangeHydraulicChoke1Plugged(status)
  75. USE CHOKEVARIABLES
  76. use SimulationVariables !@
  77. implicit none
  78. integer, intent (in) :: status
  79. ! if(associated(HydraulicChoke1PluggedPtr)) call HydraulicChoke1PluggedPtr(status)
  80. if(status == Clear_StatusType) data%State%CHOOKE(1)%PlugMalf = 0
  81. if(status == Executed_StatusType) data%State%CHOOKE(1)%PlugMalf = 1
  82. endsubroutine
  83. subroutine ChangeHydraulicChoke1Fail(status)
  84. USE CHOKEVARIABLES
  85. use SimulationVariables !@
  86. implicit none
  87. integer, intent (in) :: status
  88. ! if(associated(HydraulicChoke1FailPtr)) call HydraulicChoke1FailPtr(status)
  89. if(status == Clear_StatusType) data%State%CHOOKE(1)%FailMalf = 0
  90. if(status == Executed_StatusType) data%State%CHOOKE(1)%FailMalf = 1
  91. endsubroutine
  92. subroutine ChangeHydraulicChoke1Washout(status)
  93. USE CHOKEVARIABLES
  94. use SimulationVariables !@
  95. use CChokeManifoldVariables
  96. use SimulationVariables
  97. implicit none
  98. integer, intent (in) :: status
  99. ! if(associated(HydraulicChoke1WashoutPtr)) call HydraulicChoke1WashoutPtr(status)
  100. if(status == Clear_StatusType) data%State%CHOOKE(1)%WashoutMalf = 0
  101. if(status == Executed_StatusType) data%State%CHOOKE(1)%WashoutMalf = 1
  102. if(status == Clear_StatusType) data%EquipmentControl%ChokeManifold%HyChock1OnProblem = .false.
  103. if(status == Executed_StatusType) data%EquipmentControl%ChokeManifold%HyChock1OnProblem = .true.
  104. endsubroutine
  105. subroutine ChangeHydraulicChoke2Plugged(status)
  106. USE CHOKEVARIABLES
  107. use SimulationVariables !@
  108. implicit none
  109. integer, intent (in) :: status
  110. ! if(associated(HydraulicChoke2PluggedPtr)) call HydraulicChoke2PluggedPtr(status)
  111. if(status == Clear_StatusType) data%State%CHOOKE(2)%PlugMalf = 0
  112. if(status == Executed_StatusType) data%State%CHOOKE(2)%PlugMalf = 1
  113. endsubroutine
  114. subroutine ChangeHydraulicChoke2Fail(status)
  115. USE CHOKEVARIABLES
  116. use SimulationVariables !@
  117. implicit none
  118. integer, intent (in) :: status
  119. ! if(associated(HydraulicChoke2FailPtr)) call HydraulicChoke2FailPtr(status)
  120. if(status == Clear_StatusType) data%State%CHOOKE(2)%FailMalf = 0
  121. if(status == Executed_StatusType) data%State%CHOOKE(2)%FailMalf = 1
  122. endsubroutine
  123. subroutine ChangeHydraulicChoke2Washout(status)
  124. USE CHOKEVARIABLES
  125. use SimulationVariables !@
  126. use CChokeManifoldVariables
  127. use SimulationVariables
  128. implicit none
  129. integer, intent (in) :: status
  130. ! if(associated(HydraulicChoke2WashoutPtr)) call HydraulicChoke2WashoutPtr(status)
  131. if(status == Clear_StatusType) data%State%CHOOKE(2)%WashoutMalf = 0
  132. if(status == Executed_StatusType) data%State%CHOOKE(2)%WashoutMalf = 1
  133. if(status == Clear_StatusType) data%EquipmentControl%ChokeManifold%HyChock2OnProblem = .false.
  134. if(status == Executed_StatusType) data%EquipmentControl%ChokeManifold%HyChock2OnProblem = .true.
  135. endsubroutine
  136. subroutine ChangeManualChoke1Plugged(status)
  137. USE FricPressDropVarsModule
  138. implicit none
  139. integer, intent (in) :: status
  140. ! if(associated(ManualChoke1PluggedPtr)) call ManualChoke1PluggedPtr(status)
  141. if(status == Clear_StatusType) data%State%FricPressDrop%ManChoke1Plug = 0
  142. if(status == Executed_StatusType) data%State%FricPressDrop%ManChoke1Plug = 1
  143. endsubroutine
  144. subroutine ChangeManualChoke1Fail(status)
  145. implicit none
  146. integer, intent (in) :: status
  147. ! if(associated(ManualChoke1FailPtr)) call ManualChoke1FailPtr(status)
  148. !if(status == Clear_StatusType) print*,'On_ManualChoke1Fail_Clear'
  149. !if(status == Executed_StatusType) print*,'On_ManualChoke1Fail_Execute'
  150. endsubroutine
  151. subroutine ChangeManualChoke1Washout(status)
  152. USE FricPressDropVarsModule
  153. use CChokeManifoldVariables
  154. use SimulationVariables
  155. implicit none
  156. integer, intent (in) :: status
  157. ! if(associated(ManualChoke1WashoutPtr)) call ManualChoke1WashoutPtr(status)
  158. if(status == Clear_StatusType) data%State%FricPressDrop%ManChoke1Washout = 0
  159. if(status == Executed_StatusType) data%State%FricPressDrop%ManChoke1Washout = 1
  160. if(status == Clear_StatusType) data%EquipmentControl%ChokeManifold%LeftManChokeOnProblem = .false.
  161. if(status == Executed_StatusType) data%EquipmentControl%ChokeManifold%LeftManChokeOnProblem = .true.
  162. endsubroutine
  163. subroutine ChangeManualChoke2Plugged(status)
  164. USE FricPressDropVarsModule
  165. implicit none
  166. integer, intent (in) :: status
  167. ! if(associated(ManualChoke2PluggedPtr)) call ManualChoke2PluggedPtr(status)
  168. if(status == Clear_StatusType) data%State%FricPressDrop%ManChoke2Plug = 0
  169. if(status == Executed_StatusType) data%State%FricPressDrop%ManChoke2Plug = 1
  170. endsubroutine
  171. subroutine ChangeManualChoke2Fail(status)
  172. implicit none
  173. integer, intent (in) :: status
  174. ! if(associated(ManualChoke2FailPtr)) call ManualChoke2FailPtr(status)
  175. !if(status == Clear_StatusType) print*,'On_ManualChoke2Fail_Clear'
  176. !if(status == Executed_StatusType) print*,'On_ManualChoke2Fail_Execute'
  177. endsubroutine
  178. subroutine ChangeManualChoke2Washout(status)
  179. USE FricPressDropVarsModule
  180. use CChokeManifoldVariables
  181. use SimulationVariables
  182. implicit none
  183. integer, intent (in) :: status
  184. ! if(associated(ManualChoke2WashoutPtr)) call ManualChoke2WashoutPtr(status)
  185. if(status == Clear_StatusType) data%State%FricPressDrop%ManChoke2Washout = 0
  186. if(status == Executed_StatusType) data%State%FricPressDrop%ManChoke2Washout = 1
  187. if(status == Clear_StatusType) data%EquipmentControl%ChokeManifold%RightManChokeOnProblem = .false.
  188. if(status == Executed_StatusType) data%EquipmentControl%ChokeManifold%RightManChokeOnProblem = .true.
  189. endsubroutine
  190. subroutine ChangeChokePanelAirFail(status)
  191. USE CHOKEVARIABLES
  192. use SimulationVariables !@
  193. implicit none
  194. integer, intent (in) :: status
  195. ! if(associated(ChokePanelAirFailPtr)) call ChokePanelAirFailPtr(status)
  196. if(status == Clear_StatusType) data%State%AirDrivenPump%ChokeAirFail = 0
  197. if(status == Executed_StatusType) data%State%AirDrivenPump%ChokeAirFail = 1
  198. endsubroutine
  199. end module CChokeProblems