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.
 
 
 
 
 
 

234 lines
18 KiB

  1. module CBopProblems
  2. use SimulationVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine ProcessBopProblemsDueTime(time)
  7. implicit none
  8. integer :: time
  9. if(data%problems%BopProblems%AnnularWash%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%AnnularWash, ChangeAnnularWash, time)
  10. if(data%problems%BopProblems%AnnularFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%AnnularFail, ChangeAnnularFail, time)
  11. if(data%problems%BopProblems%AnnularLeak%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%AnnularLeak, ChangeAnnularLeak, time)
  12. if(data%problems%BopProblems%UpperRamWash%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%UpperRamWash, ChangeUpperRamWash, time)
  13. if(data%problems%BopProblems%UpperRamFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%UpperRamFail, ChangeUpperRamFail, time)
  14. if(data%problems%BopProblems%UpperRamLeak%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%UpperRamLeak, ChangeUpperRamLeak, time)
  15. if(data%problems%BopProblems%MiddleRamWash%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%MiddleRamWash, ChangeMiddleRamWash, time)
  16. if(data%problems%BopProblems%MiddleRamFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%MiddleRamFail, ChangeMiddleRamFail, time)
  17. if(data%problems%BopProblems%MiddleRamLeak%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%MiddleRamLeak, ChangeMiddleRamLeak, time)
  18. if(data%problems%BopProblems%LowerRamWash%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%LowerRamWash, ChangeLowerRamWash, time)
  19. if(data%problems%BopProblems%LowerRamFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%LowerRamFail, ChangeLowerRamFail, time)
  20. if(data%problems%BopProblems%LowerRamLeak%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%LowerRamLeak, ChangeLowerRamLeak, time)
  21. if(data%problems%BopProblems%AccumulatorPumpFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%AccumulatorPumpFail, ChangeAccumulatorPumpFail, time)
  22. if(data%problems%BopProblems%AccumulatorPumpLeak%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, time)
  23. if(data%problems%BopProblems%AccumulatorSystemFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%AccumulatorSystemFail, ChangeAccumulatorSystemFail, time)
  24. if(data%problems%BopProblems%AccumulatorSystemLeak%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%BopProblems%AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, time)
  25. end subroutine
  26. subroutine ProcessBopProblemsDuePumpStrokes(strokes)
  27. implicit none
  28. integer :: strokes
  29. if(data%problems%BopProblems%AnnularWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%AnnularWash, ChangeAnnularWash, strokes)
  30. if(data%problems%BopProblems%AnnularFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%AnnularFail, ChangeAnnularFail, strokes)
  31. if(data%problems%BopProblems%AnnularLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%AnnularLeak, ChangeAnnularLeak, strokes)
  32. if(data%problems%BopProblems%UpperRamWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%UpperRamWash, ChangeUpperRamWash, strokes)
  33. if(data%problems%BopProblems%UpperRamFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%UpperRamFail, ChangeUpperRamFail, strokes)
  34. if(data%problems%BopProblems%UpperRamLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%UpperRamLeak, ChangeUpperRamLeak, strokes)
  35. if(data%problems%BopProblems%MiddleRamWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%MiddleRamWash, ChangeMiddleRamWash, strokes)
  36. if(data%problems%BopProblems%MiddleRamFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%MiddleRamFail, ChangeMiddleRamFail, strokes)
  37. if(data%problems%BopProblems%MiddleRamLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%MiddleRamLeak, ChangeMiddleRamLeak, strokes)
  38. if(data%problems%BopProblems%LowerRamWash%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%LowerRamWash, ChangeLowerRamWash, strokes)
  39. if(data%problems%BopProblems%LowerRamFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%LowerRamFail, ChangeLowerRamFail, strokes)
  40. if(data%problems%BopProblems%LowerRamLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%LowerRamLeak, ChangeLowerRamLeak, strokes)
  41. if(data%problems%BopProblems%AccumulatorPumpFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%AccumulatorPumpFail, ChangeAccumulatorPumpFail, strokes)
  42. if(data%problems%BopProblems%AccumulatorPumpLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, strokes)
  43. if(data%problems%BopProblems%AccumulatorSystemFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%AccumulatorSystemFail, ChangeAccumulatorSystemFail, strokes)
  44. if(data%problems%BopProblems%AccumulatorSystemLeak%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%BopProblems%AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, strokes)
  45. end subroutine
  46. subroutine ProcessBopProblemsDueVolumePumped(volume)
  47. implicit none
  48. real(8) :: volume
  49. if(data%problems%BopProblems%AnnularWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%AnnularWash, ChangeAnnularWash, volume)
  50. if(data%problems%BopProblems%AnnularFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%AnnularFail, ChangeAnnularFail, volume)
  51. if(data%problems%BopProblems%AnnularLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%AnnularLeak, ChangeAnnularLeak, volume)
  52. if(data%problems%BopProblems%UpperRamWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%UpperRamWash, ChangeUpperRamWash, volume)
  53. if(data%problems%BopProblems%UpperRamFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%UpperRamFail, ChangeUpperRamFail, volume)
  54. if(data%problems%BopProblems%UpperRamLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%UpperRamLeak, ChangeUpperRamLeak, volume)
  55. if(data%problems%BopProblems%MiddleRamWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%MiddleRamWash, ChangeMiddleRamWash, volume)
  56. if(data%problems%BopProblems%MiddleRamFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%MiddleRamFail, ChangeMiddleRamFail, volume)
  57. if(data%problems%BopProblems%MiddleRamLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%MiddleRamLeak, ChangeMiddleRamLeak, volume)
  58. if(data%problems%BopProblems%LowerRamWash%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%LowerRamWash, ChangeLowerRamWash, volume)
  59. if(data%problems%BopProblems%LowerRamFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%LowerRamFail, ChangeLowerRamFail, volume)
  60. if(data%problems%BopProblems%LowerRamLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%LowerRamLeak, ChangeLowerRamLeak, volume)
  61. if(data%problems%BopProblems%AccumulatorPumpFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%AccumulatorPumpFail, ChangeAccumulatorPumpFail, volume)
  62. if(data%problems%BopProblems%AccumulatorPumpLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, volume)
  63. if(data%problems%BopProblems%AccumulatorSystemFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%AccumulatorSystemFail, ChangeAccumulatorSystemFail,volume)
  64. if(data%problems%BopProblems%AccumulatorSystemLeak%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%BopProblems%AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, volume)
  65. end subroutine
  66. subroutine ProcessBopProblemsDueDistanceDrilled(distance)
  67. implicit none
  68. real(8) :: distance
  69. if(data%problems%BopProblems%AnnularWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%AnnularWash, ChangeAnnularWash, distance)
  70. if(data%problems%BopProblems%AnnularFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%AnnularFail, ChangeAnnularFail, distance)
  71. if(data%problems%BopProblems%AnnularLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%AnnularLeak, ChangeAnnularLeak, distance)
  72. if(data%problems%BopProblems%UpperRamWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%UpperRamWash, ChangeUpperRamWash, distance)
  73. if(data%problems%BopProblems%UpperRamFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%UpperRamFail, ChangeUpperRamFail, distance)
  74. if(data%problems%BopProblems%UpperRamLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%UpperRamLeak, ChangeUpperRamLeak, distance)
  75. if(data%problems%BopProblems%MiddleRamWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%MiddleRamWash, ChangeMiddleRamWash, distance)
  76. if(data%problems%BopProblems%MiddleRamFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%MiddleRamFail, ChangeMiddleRamFail, distance)
  77. if(data%problems%BopProblems%MiddleRamLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%MiddleRamLeak, ChangeMiddleRamLeak, distance)
  78. if(data%problems%BopProblems%LowerRamWash%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%LowerRamWash, ChangeLowerRamWash, distance)
  79. if(data%problems%BopProblems%LowerRamFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%LowerRamFail, ChangeLowerRamFail, distance)
  80. if(data%problems%BopProblems%LowerRamLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%LowerRamLeak, ChangeLowerRamLeak, distance)
  81. if(data%problems%BopProblems%AccumulatorPumpFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%AccumulatorPumpFail, ChangeAccumulatorPumpFail, distance)
  82. if(data%problems%BopProblems%AccumulatorPumpLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%AccumulatorPumpLeak, ChangeAccumulatorPumpLeak, distance)
  83. if(data%problems%BopProblems%AccumulatorSystemFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%AccumulatorSystemFail, ChangeAccumulatorSystemFail, distance)
  84. if(data%problems%BopProblems%AccumulatorSystemLeak%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%BopProblems%AccumulatorSystemLeak, ChangeAccumulatorSystemLeak, distance)
  85. end subroutine
  86. subroutine ChangeAnnularWash(status)
  87. implicit none
  88. integer, intent (in) :: status
  89. ! ! if(associated(AnnularWashPtr)) call AnnularWashPtr(status)
  90. !if(status == Clear_StatusType) print*,'On_AnnularWash_Clear'
  91. !if(status == Executed_StatusType) print*,'On_AnnularWash_Execute'
  92. endsubroutine
  93. subroutine ChangeAnnularFail(status)
  94. use SimulationVariables
  95. implicit none
  96. integer, intent (in) :: status
  97. ! ! if(associated(AnnularFailPtr)) call AnnularFailPtr(status)
  98. if(status == Clear_StatusType) data%State%Annular%AnnularFailureMalf = 0
  99. if(status == Executed_StatusType) data%State%Annular%AnnularFailureMalf = 1
  100. endsubroutine
  101. subroutine ChangeAnnularLeak(status)
  102. use SimulationVariables
  103. implicit none
  104. integer, intent (in) :: status
  105. ! ! if(associated(AnnularLeakPtr)) call AnnularLeakPtr(status)
  106. if(status == Clear_StatusType) data%State%Annular%AnnularLeakMalf = 0
  107. if(status == Executed_StatusType) data%State%Annular%AnnularLeakMalf = 1
  108. endsubroutine
  109. subroutine ChangeUpperRamWash(status)
  110. implicit none
  111. integer, intent (in) :: status
  112. ! ! if(associated(UpperRamWashPtr)) call UpperRamWashPtr(status)
  113. !if(status == Clear_StatusType) print*,'On_UpperRamWash_Clear'
  114. !if(status == Executed_StatusType) print*,'On_UpperRamWash_Execute'
  115. endsubroutine
  116. subroutine ChangeUpperRamFail(status)
  117. use SimulationVariables
  118. implicit none
  119. integer, intent (in) :: status
  120. ! ! if(associated(UpperRamFailPtr)) call UpperRamFailPtr(status)
  121. if(status == Clear_StatusType) data%State%PipeRam1%UpperRamsFailureMalf = 0
  122. if(status == Executed_StatusType) data%State%PipeRam1%UpperRamsFailureMalf = 1
  123. endsubroutine
  124. subroutine ChangeUpperRamLeak(status)
  125. use SimulationVariables
  126. implicit none
  127. integer, intent (in) :: status
  128. ! ! if(associated(UpperRamLeakPtr)) call UpperRamLeakPtr(status)
  129. if(status == Clear_StatusType) data%State%PipeRam1%UpperRamsLeakMalf = 0
  130. if(status == Executed_StatusType) data%State%PipeRam1%UpperRamsLeakMalf = 1
  131. endsubroutine
  132. subroutine ChangeMiddleRamWash(status)
  133. implicit none
  134. integer, intent (in) :: status
  135. ! ! if(associated(MiddleRamWashPtr)) call MiddleRamWashPtr(status)
  136. !if(status == Clear_StatusType) print*,'On_MiddleRamWash_Clear'
  137. !if(status == Executed_StatusType) print*,'On_MiddleRamWash_Execute'
  138. endsubroutine
  139. subroutine ChangeMiddleRamFail(status)
  140. use SimulationVariables
  141. implicit none
  142. integer, intent (in) :: status
  143. ! if(associated(MiddleRamFailPtr)) call MiddleRamFailPtr(status)
  144. if(status == Clear_StatusType) data%State%ShearRAM%MiddleRamsFailureMalf = 0
  145. if(status == Executed_StatusType) data%State%ShearRAM%MiddleRamsFailureMalf = 1
  146. endsubroutine
  147. subroutine ChangeMiddleRamLeak(status)
  148. use SimulationVariables
  149. implicit none
  150. integer, intent (in) :: status
  151. ! ! if(associated(MiddleRamLeakPtr)) call MiddleRamLeakPtr(status)
  152. if(status == Clear_StatusType) data%State%ShearRAM%MiddleRamsLeakMalf = 0
  153. if(status == Executed_StatusType) data%State%ShearRAM%MiddleRamsLeakMalf = 1
  154. endsubroutine
  155. subroutine ChangeLowerRamWash(status)
  156. implicit none
  157. integer, intent (in) :: status
  158. ! ! if(associated(LowerRamWashPtr)) call LowerRamWashPtr(status)
  159. !if(status == Clear_StatusType) print*,'On_LowerRamWash_Clear'
  160. !if(status == Executed_StatusType) print*,'On_LowerRamWash_Execute'
  161. endsubroutine
  162. subroutine ChangeLowerRamFail(status)
  163. use SimulationVariables
  164. implicit none
  165. integer, intent (in) :: status
  166. ! ! if(associated(LowerRamFailPtr)) call LowerRamFailPtr(status)
  167. if(status == Clear_StatusType) data%State%PipeRam2%LowerRamsFailureMalf = 0
  168. if(status == Executed_StatusType) data%State%PipeRam2%LowerRamsFailureMalf = 1
  169. endsubroutine
  170. subroutine ChangeLowerRamLeak(status)
  171. use SimulationVariables
  172. implicit none
  173. integer, intent (in) :: status
  174. ! if(associated(LowerRamLeakPtr)) call LowerRamLeakPtr(status)
  175. if(status == Clear_StatusType) data%State%PipeRam2%LowerRamsLeakMalf = 0
  176. if(status == Executed_StatusType) data%State%PipeRam2%LowerRamsLeakMalf = 1
  177. endsubroutine
  178. subroutine ChangeAccumulatorPumpFail(status)
  179. use SimulationVariables
  180. implicit none
  181. integer, intent (in) :: status
  182. ! if(associated(AccumulatorPumpFailPtr)) call AccumulatorPumpFailPtr(status)
  183. if(status == Clear_StatusType) data%State%BopStackAcc%AccPupmsFailMalf = 0
  184. if(status == Executed_StatusType) data%State%BopStackAcc%AccPupmsFailMalf = 1
  185. endsubroutine
  186. subroutine ChangeAccumulatorPumpLeak(status)
  187. implicit none
  188. integer, intent (in) :: status
  189. ! if(associated(AccumulatorPumpLeakPtr)) call AccumulatorPumpLeakPtr(status)
  190. !if(status == Clear_StatusType) print*,'On_AccumulatorPumpLeak_Clear'
  191. !if(status == Executed_StatusType) print*,'On_AccumulatorPumpLeak_Execute'
  192. endsubroutine
  193. subroutine ChangeAccumulatorSystemFail(status)
  194. implicit none
  195. integer, intent (in) :: status
  196. ! if(associated(AccumulatorSystemFailPtr)) call AccumulatorSystemFailPtr(status)
  197. !if(status == Clear_StatusType) print*,'On_AccumulatorSystemFail_Clear'
  198. !if(status == Executed_StatusType) print*,'On_AccumulatorSystemFail_Execute'
  199. endsubroutine
  200. subroutine ChangeAccumulatorSystemLeak(status)
  201. implicit none
  202. integer, intent (in) :: status
  203. ! if(associated(AccumulatorSystemLeakPtr)) call AccumulatorSystemLeakPtr(status)
  204. !if(status == Clear_StatusType) print*,'On_AccumulatorSystemLeak_Clear'
  205. !if(status == Executed_StatusType) print*,'On_AccumulatorSystemLeak_Execute'
  206. endsubroutine
  207. end module CBopProblems