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.

CPumpProblems.f90 7.9 KiB

1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. module CPumpProblems
  2. use SimulationVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine ProcessPumpProblemsDueTime(time)
  7. implicit none
  8. integer :: time
  9. if(data%problems%PumpProblems%Pump1PowerFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%PumpProblems%Pump1PowerFail, ChangePump1PowerFail, time)
  10. if(data%problems%PumpProblems%Pump1BlowPopOffValve%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%PumpProblems%Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, time)
  11. if(data%problems%PumpProblems%Pump2PowerFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%PumpProblems%Pump2PowerFail, ChangePump2PowerFail, time)
  12. if(data%problems%PumpProblems%Pump2BlowPopOffValve%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%PumpProblems%Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, time)
  13. if(data%problems%PumpProblems%CementPumpPowerFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%PumpProblems%CementPumpPowerFail, ChangeCementPumpPowerFail, time)
  14. if(data%problems%PumpProblems%CementPumpBlowPopOffValve%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%PumpProblems%CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, time)
  15. end subroutine
  16. subroutine ProcessPumpProblemsDuePumpStrokes(strokes)
  17. implicit none
  18. integer :: strokes
  19. if(data%problems%PumpProblems%Pump1PowerFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%PumpProblems%Pump1PowerFail, ChangePump1PowerFail, strokes)
  20. if(data%problems%PumpProblems%Pump1BlowPopOffValve%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%PumpProblems%Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, strokes)
  21. if(data%problems%PumpProblems%Pump2PowerFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%PumpProblems%Pump2PowerFail, ChangePump2PowerFail, strokes)
  22. if(data%problems%PumpProblems%Pump2BlowPopOffValve%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%PumpProblems%Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, strokes)
  23. if(data%problems%PumpProblems%CementPumpPowerFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%PumpProblems%CementPumpPowerFail, ChangeCementPumpPowerFail, strokes)
  24. if(data%problems%PumpProblems%CementPumpBlowPopOffValve%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%PumpProblems%CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, strokes)
  25. end subroutine
  26. subroutine ProcessPumpProblemsDueVolumePumped(volume)
  27. implicit none
  28. real(8) :: volume
  29. if(data%problems%PumpProblems%Pump1PowerFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%PumpProblems%Pump1PowerFail, ChangePump1PowerFail, volume)
  30. if(data%problems%PumpProblems%Pump1BlowPopOffValve%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%PumpProblems%Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, volume)
  31. if(data%problems%PumpProblems%Pump2PowerFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%PumpProblems%Pump2PowerFail, ChangePump2PowerFail, volume)
  32. if(data%problems%PumpProblems%Pump2BlowPopOffValve%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%PumpProblems%Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, volume)
  33. if(data%problems%PumpProblems%CementPumpPowerFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%PumpProblems%CementPumpPowerFail, ChangeCementPumpPowerFail, volume)
  34. if(data%problems%PumpProblems%CementPumpBlowPopOffValve%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%PumpProblems%CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, volume)
  35. end subroutine
  36. subroutine ProcessPumpProblemsDueDistanceDrilled(distance)
  37. implicit none
  38. real(8) :: distance
  39. if(data%problems%PumpProblems%Pump1PowerFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%PumpProblems%Pump1PowerFail, ChangePump1PowerFail, distance)
  40. if(data%problems%PumpProblems%Pump1BlowPopOffValve%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%PumpProblems%Pump1BlowPopOffValve, ChangePump1BlowPopOffValve, distance)
  41. if(data%problems%PumpProblems%Pump2PowerFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%PumpProblems%Pump2PowerFail, ChangePump2PowerFail, distance)
  42. if(data%problems%PumpProblems%Pump2BlowPopOffValve%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%PumpProblems%Pump2BlowPopOffValve, ChangePump2BlowPopOffValve, distance)
  43. if(data%problems%PumpProblems%CementPumpPowerFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%PumpProblems%CementPumpPowerFail, ChangeCementPumpPowerFail, distance)
  44. if(data%problems%PumpProblems%CementPumpBlowPopOffValve%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%PumpProblems%CementPumpBlowPopOffValve, ChangeCementPumpBlowPopOffValve, distance)
  45. end subroutine
  46. subroutine ChangePump1PowerFail(status)
  47. use SimulationVariables
  48. implicit none
  49. integer, intent (in) :: status
  50. !if(associated(Pump1PowerFailPtr)) call Pump1PowerFailPtr(status)
  51. if(status == Clear_StatusType) data%State%Pump(1)%PowerFailMalf=0
  52. if(status == Executed_StatusType) data%State%Pump(1)%PowerFailMalf=1
  53. endsubroutine
  54. subroutine ChangePump1BlowPopOffValve(status)
  55. use SimulationVariables
  56. implicit none
  57. integer, intent (in) :: status
  58. !if(associated(Pump1BlowPopOffValvePtr)) call Pump1BlowPopOffValvePtr(status)
  59. if(status == Clear_StatusType) data%State%Pump(1)%BlowPopOffMalf=0
  60. if(status == Executed_StatusType) data%State%Pump(1)%BlowPopOffMalf=1
  61. endsubroutine
  62. subroutine ChangePump2PowerFail(status)
  63. use SimulationVariables
  64. implicit none
  65. integer, intent (in) :: status
  66. !if(associated(Pump2PowerFailPtr)) call Pump2PowerFailPtr(status)
  67. if(status == Clear_StatusType) data%State%Pump(2)%PowerFailMalf=0
  68. if(status == Executed_StatusType) data%State%Pump(2)%PowerFailMalf=1
  69. endsubroutine
  70. subroutine ChangePump2BlowPopOffValve(status)
  71. use SimulationVariables
  72. implicit none
  73. integer, intent (in) :: status
  74. !if(associated(Pump2BlowPopOffValvePtr)) call Pump2BlowPopOffValvePtr(status)
  75. if(status == Clear_StatusType) data%State%Pump(2)%BlowPopOffMalf=0
  76. if(status == Executed_StatusType) data%State%Pump(2)%BlowPopOffMalf=1
  77. endsubroutine
  78. subroutine ChangeCementPumpPowerFail(status)
  79. use SimulationVariables
  80. implicit none
  81. integer, intent (in) :: status
  82. !if(associated(CementPumpPowerFailPtr)) call CementPumpPowerFailPtr(status)
  83. if(status == Clear_StatusType) data%State%Pump(3)%PowerFailMalf=0
  84. if(status == Executed_StatusType) data%State%Pump(3)%PowerFailMalf=1
  85. endsubroutine
  86. subroutine ChangeCementPumpBlowPopOffValve(status)
  87. use SimulationVariables
  88. implicit none
  89. integer, intent (in) :: status
  90. !if(associated(CementPumpBlowPopOffValvePtr)) call CementPumpBlowPopOffValvePtr(status)
  91. if(status == Clear_StatusType) data%State%Pump(3)%BlowPopOffMalf=0
  92. if(status == Executed_StatusType) data%State%Pump(3)%BlowPopOffMalf=1
  93. endsubroutine
  94. end module CPumpProblems