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.
 
 
 
 
 
 

287 lines
22 KiB

  1. module CChokeProblems
  2. use SimulationVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine ChokeProblemsFromJson(parent)
  7. type(json_value),pointer :: parent
  8. type(json_core) :: json
  9. type(json_value),pointer :: p,pval
  10. call json%get(parent,'ChokeProblems',p)
  11. call ProblemFromJson(p,"HydraulicChoke1Plugged",data%problems%ChokeProblems%HydraulicChoke1Plugged)
  12. call ProblemFromJson(p,"HydraulicChoke1Fail",data%problems%ChokeProblems%HydraulicChoke1Fail)
  13. call ProblemFromJson(p,"HydraulicChoke1Washout",data%problems%ChokeProblems%HydraulicChoke1Washout)
  14. call ProblemFromJson(p,"HydraulicChoke2Plugged",data%problems%ChokeProblems%HydraulicChoke2Plugged)
  15. call ProblemFromJson(p,"HydraulicChoke2Fail",data%problems%ChokeProblems%HydraulicChoke2Fail)
  16. call ProblemFromJson(p,"HydraulicChoke2Washout",data%problems%ChokeProblems%HydraulicChoke2Washout)
  17. call ProblemFromJson(p,"ManualChoke1Plugged",data%problems%ChokeProblems%ManualChoke1Plugged)
  18. call ProblemFromJson(p,"ManualChoke1Fail",data%problems%ChokeProblems%ManualChoke1Fail)
  19. call ProblemFromJson(p,"ManualChoke1Washout",data%problems%ChokeProblems%ManualChoke1Washout)
  20. call ProblemFromJson(p,"ManualChoke2Plugged",data%problems%ChokeProblems%ManualChoke2Plugged)
  21. call ProblemFromJson(p,"ManualChoke2Fail",data%problems%ChokeProblems%ManualChoke2Fail)
  22. call ProblemFromJson(p,"ManualChoke2Washout",data%problems%ChokeProblems%ManualChoke2Washout)
  23. call ProblemFromJson(p,"ChokePanelAirFail",data%problems%ChokeProblems%ChokePanelAirFail)
  24. call json%get(p,'ManualChoke1PluggedPercent',pval)
  25. call json%get(pval,data%problems%ChokeProblems%ManualChoke1PluggedPercent)
  26. call json%get(p,'HydraulicChoke2PluggedPercent',pval)
  27. call json%get(pval,data%problems%ChokeProblems%HydraulicChoke2PluggedPercent)
  28. call json%get(p,'HydraulicChoke1PluggedPercent',pval)
  29. call json%get(pval,data%problems%ChokeProblems%HydraulicChoke1PluggedPercent)
  30. call json%get(p,'ManualChoke2PluggedPercent',pval)
  31. call json%get(pval,data%problems%ChokeProblems%ManualChoke2PluggedPercent)
  32. end subroutine
  33. subroutine ChokeProblemsToJson(parent)
  34. type(json_value),pointer :: parent
  35. type(json_core) :: json
  36. type(json_value),pointer :: p
  37. ! 1. create new node
  38. call json%create_object(p,'ChokeProblems')
  39. ! 2. add member of data type to new node
  40. call ProblemToJson(p,"HydraulicChoke1Plugged",data%problems%ChokeProblems%HydraulicChoke1Plugged)
  41. call ProblemToJson(p,"HydraulicChoke1Fail",data%problems%ChokeProblems%HydraulicChoke1Fail)
  42. call ProblemToJson(p,"HydraulicChoke1Washout",data%problems%ChokeProblems%HydraulicChoke1Washout)
  43. call ProblemToJson(p,"HydraulicChoke2Plugged",data%problems%ChokeProblems%HydraulicChoke2Plugged)
  44. call ProblemToJson(p,"HydraulicChoke2Fail",data%problems%ChokeProblems%HydraulicChoke2Fail)
  45. call ProblemToJson(p,"HydraulicChoke2Washout",data%problems%ChokeProblems%HydraulicChoke2Washout)
  46. call ProblemToJson(p,"ManualChoke1Plugged",data%problems%ChokeProblems%ManualChoke1Plugged)
  47. call ProblemToJson(p,"ManualChoke1Fail",data%problems%ChokeProblems%ManualChoke1Fail)
  48. call ProblemToJson(p,"ManualChoke1Washout",data%problems%ChokeProblems%ManualChoke1Washout)
  49. call ProblemToJson(p,"ManualChoke2Plugged",data%problems%ChokeProblems%ManualChoke2Plugged)
  50. call ProblemToJson(p,"ManualChoke2Fail",data%problems%ChokeProblems%ManualChoke2Fail)
  51. call ProblemToJson(p,"ManualChoke2Washout",data%problems%ChokeProblems%ManualChoke2Washout)
  52. call ProblemToJson(p,"ChokePanelAirFail",data%problems%ChokeProblems%ChokePanelAirFail)
  53. call json%add(p,"ManualChoke1PluggedPercent",data%problems%ChokeProblems%ManualChoke1PluggedPercent)
  54. call json%add(p,"HydraulicChoke2PluggedPercent",data%problems%ChokeProblems%HydraulicChoke2PluggedPercent)
  55. call json%add(p,"HydraulicChoke1PluggedPercent",data%problems%ChokeProblems%HydraulicChoke1PluggedPercent)
  56. call json%add(p,"ManualChoke2PluggedPercent",data%problems%ChokeProblems%ManualChoke2PluggedPercent)
  57. ! 3. add new node to parent
  58. call json%add(parent,p)
  59. end subroutine
  60. subroutine ProcessChokeProblemsDueTime(time)
  61. implicit none
  62. integer :: time
  63. if(data%problems%ChokeProblems%HydraulicChoke1Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, time)
  64. if(data%problems%ChokeProblems%HydraulicChoke1Fail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, time)
  65. if(data%problems%ChokeProblems%HydraulicChoke1Washout%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, time)
  66. if(data%problems%ChokeProblems%HydraulicChoke2Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, time)
  67. if(data%problems%ChokeProblems%HydraulicChoke2Fail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, time)
  68. if(data%problems%ChokeProblems%HydraulicChoke2Washout%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, time)
  69. if(data%problems%ChokeProblems%ManualChoke1Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, time)
  70. if(data%problems%ChokeProblems%ManualChoke1Fail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, time)
  71. if(data%problems%ChokeProblems%ManualChoke1Washout%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, time)
  72. if(data%problems%ChokeProblems%ManualChoke2Plugged%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, time)
  73. if(data%problems%ChokeProblems%ManualChoke2Fail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, time)
  74. if(data%problems%ChokeProblems%ManualChoke2Washout%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, time)
  75. if(data%problems%ChokeProblems%ChokePanelAirFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, time)
  76. end subroutine
  77. subroutine ProcessChokeProblemsDuePumpStrokes(strokes)
  78. implicit none
  79. integer :: strokes
  80. if(data%problems%ChokeProblems%HydraulicChoke1Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, strokes)
  81. if(data%problems%ChokeProblems%HydraulicChoke1Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, strokes)
  82. if(data%problems%ChokeProblems%HydraulicChoke1Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, strokes)
  83. if(data%problems%ChokeProblems%HydraulicChoke2Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, strokes)
  84. if(data%problems%ChokeProblems%HydraulicChoke2Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, strokes)
  85. if(data%problems%ChokeProblems%HydraulicChoke2Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, strokes)
  86. if(data%problems%ChokeProblems%ManualChoke1Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, strokes)
  87. if(data%problems%ChokeProblems%ManualChoke1Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, strokes)
  88. if(data%problems%ChokeProblems%ManualChoke1Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, strokes)
  89. if(data%problems%ChokeProblems%ManualChoke2Plugged%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, strokes)
  90. if(data%problems%ChokeProblems%ManualChoke2Fail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, strokes)
  91. if(data%problems%ChokeProblems%ManualChoke2Washout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, strokes)
  92. if(data%problems%ChokeProblems%ChokePanelAirFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, strokes)
  93. end subroutine
  94. subroutine ProcessChokeProblemsDueVolumePumped(volume)
  95. implicit none
  96. real(8) :: volume
  97. if(data%problems%ChokeProblems%HydraulicChoke1Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, volume)
  98. if(data%problems%ChokeProblems%HydraulicChoke1Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, volume)
  99. if(data%problems%ChokeProblems%HydraulicChoke1Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, volume)
  100. if(data%problems%ChokeProblems%HydraulicChoke2Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, volume)
  101. if(data%problems%ChokeProblems%HydraulicChoke2Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, volume)
  102. if(data%problems%ChokeProblems%HydraulicChoke2Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, volume)
  103. if(data%problems%ChokeProblems%ManualChoke1Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, volume)
  104. if(data%problems%ChokeProblems%ManualChoke1Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, volume)
  105. if(data%problems%ChokeProblems%ManualChoke1Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, volume)
  106. if(data%problems%ChokeProblems%ManualChoke2Plugged%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, volume)
  107. if(data%problems%ChokeProblems%ManualChoke2Fail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, volume)
  108. if(data%problems%ChokeProblems%ManualChoke2Washout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, volume)
  109. if(data%problems%ChokeProblems%ChokePanelAirFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, volume)
  110. end subroutine
  111. subroutine ProcessChokeProblemsDueDistanceDrilled(distance)
  112. implicit none
  113. real(8) :: distance
  114. if(data%problems%ChokeProblems%HydraulicChoke1Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke1Plugged, ChangeHydraulicChoke1Plugged, distance)
  115. if(data%problems%ChokeProblems%HydraulicChoke1Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke1Fail, ChangeHydraulicChoke1Fail, distance)
  116. if(data%problems%ChokeProblems%HydraulicChoke1Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke1Washout, ChangeHydraulicChoke1Washout, distance)
  117. if(data%problems%ChokeProblems%HydraulicChoke2Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke2Plugged, ChangeHydraulicChoke2Plugged, distance)
  118. if(data%problems%ChokeProblems%HydraulicChoke2Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke2Fail, ChangeHydraulicChoke2Fail, distance)
  119. if(data%problems%ChokeProblems%HydraulicChoke2Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%HydraulicChoke2Washout, ChangeHydraulicChoke2Washout, distance)
  120. if(data%problems%ChokeProblems%ManualChoke1Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke1Plugged, ChangeManualChoke1Plugged, distance)
  121. if(data%problems%ChokeProblems%ManualChoke1Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke1Fail, ChangeManualChoke1Fail, distance)
  122. if(data%problems%ChokeProblems%ManualChoke1Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke1Washout, ChangeManualChoke1Washout, distance)
  123. if(data%problems%ChokeProblems%ManualChoke2Plugged%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke2Plugged, ChangeManualChoke2Plugged, distance)
  124. if(data%problems%ChokeProblems%ManualChoke2Fail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke2Fail, ChangeManualChoke2Fail, distance)
  125. if(data%problems%ChokeProblems%ManualChoke2Washout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ManualChoke2Washout, ChangeManualChoke2Washout, distance)
  126. if(data%problems%ChokeProblems%ChokePanelAirFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%ChokeProblems%ChokePanelAirFail, ChangeChokePanelAirFail, distance)
  127. end subroutine
  128. subroutine ChangeHydraulicChoke1Plugged(status)
  129. USE CHOKEVARIABLES
  130. use SimulationVariables !@
  131. implicit none
  132. integer, intent (in) :: status
  133. ! if(associated(HydraulicChoke1PluggedPtr)) call HydraulicChoke1PluggedPtr(status)
  134. if(status == Clear_StatusType) data%State%CHOOKE(1)%PlugMalf = 0
  135. if(status == Executed_StatusType) data%State%CHOOKE(1)%PlugMalf = 1
  136. endsubroutine
  137. subroutine ChangeHydraulicChoke1Fail(status)
  138. USE CHOKEVARIABLES
  139. use SimulationVariables !@
  140. implicit none
  141. integer, intent (in) :: status
  142. ! if(associated(HydraulicChoke1FailPtr)) call HydraulicChoke1FailPtr(status)
  143. if(status == Clear_StatusType) data%State%CHOOKE(1)%FailMalf = 0
  144. if(status == Executed_StatusType) data%State%CHOOKE(1)%FailMalf = 1
  145. endsubroutine
  146. subroutine ChangeHydraulicChoke1Washout(status)
  147. USE CHOKEVARIABLES
  148. use SimulationVariables !@
  149. use CChokeManifoldVariables
  150. use SimulationVariables
  151. implicit none
  152. integer, intent (in) :: status
  153. ! if(associated(HydraulicChoke1WashoutPtr)) call HydraulicChoke1WashoutPtr(status)
  154. if(status == Clear_StatusType) data%State%CHOOKE(1)%WashoutMalf = 0
  155. if(status == Executed_StatusType) data%State%CHOOKE(1)%WashoutMalf = 1
  156. if(status == Clear_StatusType) data%Equipments%ChokeManifold%HyChock1OnProblem = .false.
  157. if(status == Executed_StatusType) data%Equipments%ChokeManifold%HyChock1OnProblem = .true.
  158. endsubroutine
  159. subroutine ChangeHydraulicChoke2Plugged(status)
  160. USE CHOKEVARIABLES
  161. use SimulationVariables !@
  162. implicit none
  163. integer, intent (in) :: status
  164. ! if(associated(HydraulicChoke2PluggedPtr)) call HydraulicChoke2PluggedPtr(status)
  165. if(status == Clear_StatusType) data%State%CHOOKE(2)%PlugMalf = 0
  166. if(status == Executed_StatusType) data%State%CHOOKE(2)%PlugMalf = 1
  167. endsubroutine
  168. subroutine ChangeHydraulicChoke2Fail(status)
  169. USE CHOKEVARIABLES
  170. use SimulationVariables !@
  171. implicit none
  172. integer, intent (in) :: status
  173. ! if(associated(HydraulicChoke2FailPtr)) call HydraulicChoke2FailPtr(status)
  174. if(status == Clear_StatusType) data%State%CHOOKE(2)%FailMalf = 0
  175. if(status == Executed_StatusType) data%State%CHOOKE(2)%FailMalf = 1
  176. endsubroutine
  177. subroutine ChangeHydraulicChoke2Washout(status)
  178. USE CHOKEVARIABLES
  179. use SimulationVariables !@
  180. use CChokeManifoldVariables
  181. use SimulationVariables
  182. implicit none
  183. integer, intent (in) :: status
  184. ! if(associated(HydraulicChoke2WashoutPtr)) call HydraulicChoke2WashoutPtr(status)
  185. if(status == Clear_StatusType) data%State%CHOOKE(2)%WashoutMalf = 0
  186. if(status == Executed_StatusType) data%State%CHOOKE(2)%WashoutMalf = 1
  187. if(status == Clear_StatusType) data%Equipments%ChokeManifold%HyChock2OnProblem = .false.
  188. if(status == Executed_StatusType) data%Equipments%ChokeManifold%HyChock2OnProblem = .true.
  189. endsubroutine
  190. subroutine ChangeManualChoke1Plugged(status)
  191. USE FricPressDropVarsModule
  192. implicit none
  193. integer, intent (in) :: status
  194. ! if(associated(ManualChoke1PluggedPtr)) call ManualChoke1PluggedPtr(status)
  195. if(status == Clear_StatusType) data%State%FricPressDrop%ManChoke1Plug = 0
  196. if(status == Executed_StatusType) data%State%FricPressDrop%ManChoke1Plug = 1
  197. endsubroutine
  198. subroutine ChangeManualChoke1Fail(status)
  199. implicit none
  200. integer, intent (in) :: status
  201. ! if(associated(ManualChoke1FailPtr)) call ManualChoke1FailPtr(status)
  202. !if(status == Clear_StatusType) if(print_log) print*,'On_ManualChoke1Fail_Clear'
  203. !if(status == Executed_StatusType) if(print_log) print*,'On_ManualChoke1Fail_Execute'
  204. endsubroutine
  205. subroutine ChangeManualChoke1Washout(status)
  206. USE FricPressDropVarsModule
  207. use CChokeManifoldVariables
  208. use SimulationVariables
  209. implicit none
  210. integer, intent (in) :: status
  211. ! if(associated(ManualChoke1WashoutPtr)) call ManualChoke1WashoutPtr(status)
  212. if(status == Clear_StatusType) data%State%FricPressDrop%ManChoke1Washout = 0
  213. if(status == Executed_StatusType) data%State%FricPressDrop%ManChoke1Washout = 1
  214. if(status == Clear_StatusType) data%Equipments%ChokeManifold%LeftManChokeOnProblem = .false.
  215. if(status == Executed_StatusType) data%Equipments%ChokeManifold%LeftManChokeOnProblem = .true.
  216. endsubroutine
  217. subroutine ChangeManualChoke2Plugged(status)
  218. USE FricPressDropVarsModule
  219. implicit none
  220. integer, intent (in) :: status
  221. ! if(associated(ManualChoke2PluggedPtr)) call ManualChoke2PluggedPtr(status)
  222. if(status == Clear_StatusType) data%State%FricPressDrop%ManChoke2Plug = 0
  223. if(status == Executed_StatusType) data%State%FricPressDrop%ManChoke2Plug = 1
  224. endsubroutine
  225. subroutine ChangeManualChoke2Fail(status)
  226. implicit none
  227. integer, intent (in) :: status
  228. ! if(associated(ManualChoke2FailPtr)) call ManualChoke2FailPtr(status)
  229. !if(status == Clear_StatusType) if(print_log) print*,'On_ManualChoke2Fail_Clear'
  230. !if(status == Executed_StatusType) if(print_log) print*,'On_ManualChoke2Fail_Execute'
  231. endsubroutine
  232. subroutine ChangeManualChoke2Washout(status)
  233. USE FricPressDropVarsModule
  234. use CChokeManifoldVariables
  235. use SimulationVariables
  236. implicit none
  237. integer, intent (in) :: status
  238. ! if(associated(ManualChoke2WashoutPtr)) call ManualChoke2WashoutPtr(status)
  239. if(status == Clear_StatusType) data%State%FricPressDrop%ManChoke2Washout = 0
  240. if(status == Executed_StatusType) data%State%FricPressDrop%ManChoke2Washout = 1
  241. if(status == Clear_StatusType) data%Equipments%ChokeManifold%RightManChokeOnProblem = .false.
  242. if(status == Executed_StatusType) data%Equipments%ChokeManifold%RightManChokeOnProblem = .true.
  243. endsubroutine
  244. subroutine ChangeChokePanelAirFail(status)
  245. USE CHOKEVARIABLES
  246. use SimulationVariables !@
  247. implicit none
  248. integer, intent (in) :: status
  249. ! if(associated(ChokePanelAirFailPtr)) call ChokePanelAirFailPtr(status)
  250. if(status == Clear_StatusType) data%State%AirDrivenPump%ChokeAirFail = 0
  251. if(status == Executed_StatusType) data%State%AirDrivenPump%ChokeAirFail = 1
  252. endsubroutine
  253. end module CChokeProblems