Simulation Core
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

337 wiersze
27 KiB

  1. module CGaugesProblems
  2. use SimulationVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine ProcessGaugesProblemsDueTime(time)
  7. implicit none
  8. integer :: time
  9. if(data%problems%GaugesProblems%WeightIndicator%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%WeightIndicator, ChangeWeightIndicator, time)
  10. if(data%problems%GaugesProblems%RotaryRpm%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%RotaryRpm, ChangeRotaryRpm, time)
  11. if(data%problems%GaugesProblems%RotaryTorque%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%RotaryTorque, ChangeRotaryTorque, time)
  12. if(data%problems%GaugesProblems%StandPipePressure%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%StandPipePressure, ChangeStandPipePressure, time)
  13. if(data%problems%GaugesProblems%CasingPressure%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%CasingPressure, ChangeCasingPressure, time)
  14. if(data%problems%GaugesProblems%Pump1Strokes%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%Pump1Strokes, ChangePump1Strokes, time)
  15. if(data%problems%GaugesProblems%Pump2Strokes%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%Pump2Strokes, ChangePump2Strokes, time)
  16. if(data%problems%GaugesProblems%ReturnLineTemperature%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%ReturnLineTemperature, ChangeReturnLineTemperature, time)
  17. if(data%problems%GaugesProblems%TripTank%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%TripTank, ChangeTripTank, time)
  18. if(data%problems%GaugesProblems%PitGainLoss%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%PitGainLoss, ChangePitGainLoss, time)
  19. if(data%problems%GaugesProblems%MudTankVolume%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%MudTankVolume, ChangeMudTankVolume, time)
  20. if(data%problems%GaugesProblems%ReturnMudFlow%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%ReturnMudFlow, ChangeReturnMudFlow, time)
  21. if(data%problems%GaugesProblems%TorqueLimit%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%TorqueLimit, ChangeTorqueLimit, time)
  22. if(data%problems%GaugesProblems%PowerLimit%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%PowerLimit, ChangePowerLimit, time)
  23. if(data%problems%GaugesProblems%AccumulatorPressure%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%AccumulatorPressure, ChangeAccumulatorPressure, time)
  24. if(data%problems%GaugesProblems%ManifoldPressure%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%ManifoldPressure, ChangeManifoldPressure, time)
  25. if(data%problems%GaugesProblems%AnnularPressure%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%AnnularPressure, ChangeAnnularPressure, time)
  26. if(data%problems%GaugesProblems%RigAirPressure%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%RigAirPressure, ChangeRigAirPressure, time)
  27. if(data%problems%GaugesProblems%StandPipe1%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%StandPipe1, ChangeStandPipe1, time)
  28. if(data%problems%GaugesProblems%StandPipe2%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%StandPipe2, ChangeStandPipe2, time)
  29. if(data%problems%GaugesProblems%DrillPipePressure%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%DrillPipePressure, ChangeDrillPipePressure, time)
  30. if(data%problems%GaugesProblems%ChokePosition%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%ChokePosition, ChangeChokePosition, time)
  31. if(data%problems%GaugesProblems%CasingPressure2%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%GaugesProblems%CasingPressure2, ChangeCasingPressure2, time)
  32. end subroutine
  33. subroutine ProcessGaugesProblemsDuePumpStrokes(strokes)
  34. implicit none
  35. integer :: strokes
  36. if(data%problems%GaugesProblems%WeightIndicator%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%WeightIndicator, ChangeWeightIndicator, strokes)
  37. if(data%problems%GaugesProblems%RotaryRpm%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%RotaryRpm, ChangeRotaryRpm, strokes)
  38. if(data%problems%GaugesProblems%RotaryTorque%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%RotaryTorque, ChangeRotaryTorque, strokes)
  39. if(data%problems%GaugesProblems%StandPipePressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%StandPipePressure, ChangeStandPipePressure, strokes)
  40. if(data%problems%GaugesProblems%CasingPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%CasingPressure, ChangeCasingPressure, strokes)
  41. if(data%problems%GaugesProblems%Pump1Strokes%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%Pump1Strokes, ChangePump1Strokes, strokes)
  42. if(data%problems%GaugesProblems%Pump2Strokes%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%Pump2Strokes, ChangePump2Strokes, strokes)
  43. if(data%problems%GaugesProblems%ReturnLineTemperature%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%ReturnLineTemperature, ChangeReturnLineTemperature, strokes)
  44. if(data%problems%GaugesProblems%TripTank%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%TripTank, ChangeTripTank, strokes)
  45. if(data%problems%GaugesProblems%PitGainLoss%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%PitGainLoss, ChangePitGainLoss, strokes)
  46. if(data%problems%GaugesProblems%MudTankVolume%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%MudTankVolume, ChangeMudTankVolume, strokes)
  47. if(data%problems%GaugesProblems%ReturnMudFlow%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%ReturnMudFlow, ChangeReturnMudFlow, strokes)
  48. if(data%problems%GaugesProblems%TorqueLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%TorqueLimit, ChangeTorqueLimit, strokes)
  49. if(data%problems%GaugesProblems%PowerLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%PowerLimit, ChangePowerLimit, strokes)
  50. if(data%problems%GaugesProblems%AccumulatorPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%AccumulatorPressure, ChangeAccumulatorPressure, strokes)
  51. if(data%problems%GaugesProblems%ManifoldPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%ManifoldPressure, ChangeManifoldPressure, strokes)
  52. if(data%problems%GaugesProblems%AnnularPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%AnnularPressure, ChangeAnnularPressure, strokes)
  53. if(data%problems%GaugesProblems%RigAirPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%RigAirPressure, ChangeRigAirPressure, strokes)
  54. if(data%problems%GaugesProblems%StandPipe1%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%StandPipe1, ChangeStandPipe1, strokes)
  55. if(data%problems%GaugesProblems%StandPipe2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%StandPipe2, ChangeStandPipe2, strokes)
  56. if(data%problems%GaugesProblems%DrillPipePressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%DrillPipePressure, ChangeDrillPipePressure, strokes)
  57. if(data%problems%GaugesProblems%ChokePosition%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%ChokePosition, ChangeChokePosition, strokes)
  58. if(data%problems%GaugesProblems%CasingPressure2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%GaugesProblems%CasingPressure2, ChangeCasingPressure2, strokes)
  59. end subroutine
  60. subroutine ProcessGaugesProblemsDueVolumePumped(volume)
  61. implicit none
  62. real(8) :: volume
  63. if(data%problems%GaugesProblems%WeightIndicator%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%WeightIndicator, ChangeWeightIndicator, volume)
  64. if(data%problems%GaugesProblems%RotaryRpm%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%RotaryRpm, ChangeRotaryRpm, volume)
  65. if(data%problems%GaugesProblems%RotaryTorque%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%RotaryTorque, ChangeRotaryTorque, volume)
  66. if(data%problems%GaugesProblems%StandPipePressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%StandPipePressure, ChangeStandPipePressure, volume)
  67. if(data%problems%GaugesProblems%CasingPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%CasingPressure, ChangeCasingPressure, volume)
  68. if(data%problems%GaugesProblems%Pump1Strokes%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%Pump1Strokes, ChangePump1Strokes, volume)
  69. if(data%problems%GaugesProblems%Pump2Strokes%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%Pump2Strokes, ChangePump2Strokes, volume)
  70. if(data%problems%GaugesProblems%ReturnLineTemperature%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%ReturnLineTemperature, ChangeReturnLineTemperature, volume)
  71. if(data%problems%GaugesProblems%TripTank%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%TripTank, ChangeTripTank, volume)
  72. if(data%problems%GaugesProblems%PitGainLoss%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%PitGainLoss, ChangePitGainLoss, volume)
  73. if(data%problems%GaugesProblems%MudTankVolume%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%MudTankVolume, ChangeMudTankVolume, volume)
  74. if(data%problems%GaugesProblems%ReturnMudFlow%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%ReturnMudFlow, ChangeReturnMudFlow, volume)
  75. if(data%problems%GaugesProblems%TorqueLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%TorqueLimit, ChangeTorqueLimit, volume)
  76. if(data%problems%GaugesProblems%PowerLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%PowerLimit, ChangePowerLimit, volume)
  77. if(data%problems%GaugesProblems%AccumulatorPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%AccumulatorPressure, ChangeAccumulatorPressure, volume)
  78. if(data%problems%GaugesProblems%ManifoldPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%ManifoldPressure, ChangeManifoldPressure, volume)
  79. if(data%problems%GaugesProblems%AnnularPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%AnnularPressure, ChangeAnnularPressure, volume)
  80. if(data%problems%GaugesProblems%RigAirPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%RigAirPressure, ChangeRigAirPressure, volume)
  81. if(data%problems%GaugesProblems%StandPipe1%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%StandPipe1, ChangeStandPipe1, volume)
  82. if(data%problems%GaugesProblems%StandPipe2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%StandPipe2, ChangeStandPipe2, volume)
  83. if(data%problems%GaugesProblems%DrillPipePressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%DrillPipePressure, ChangeDrillPipePressure, volume)
  84. if(data%problems%GaugesProblems%ChokePosition%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%ChokePosition, ChangeChokePosition, volume)
  85. if(data%problems%GaugesProblems%CasingPressure2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%GaugesProblems%CasingPressure2, ChangeCasingPressure2, volume)
  86. end subroutine
  87. subroutine ProcessGaugesProblemsDueDistanceDrilled(distance)
  88. implicit none
  89. real(8) :: distance
  90. if(data%problems%GaugesProblems%WeightIndicator%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%WeightIndicator, ChangeWeightIndicator, distance)
  91. if(data%problems%GaugesProblems%RotaryRpm%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%RotaryRpm, ChangeRotaryRpm, distance)
  92. if(data%problems%GaugesProblems%RotaryTorque%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%RotaryTorque, ChangeRotaryTorque, distance)
  93. if(data%problems%GaugesProblems%StandPipePressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%StandPipePressure, ChangeStandPipePressure, distance)
  94. if(data%problems%GaugesProblems%CasingPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%CasingPressure, ChangeCasingPressure, distance)
  95. if(data%problems%GaugesProblems%Pump1Strokes%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%Pump1Strokes, ChangePump1Strokes, distance)
  96. if(data%problems%GaugesProblems%Pump2Strokes%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%Pump2Strokes, ChangePump2Strokes, distance)
  97. if(data%problems%GaugesProblems%ReturnLineTemperature%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%ReturnLineTemperature, ChangeReturnLineTemperature, distance)
  98. if(data%problems%GaugesProblems%TripTank%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%TripTank, ChangeTripTank, distance)
  99. if(data%problems%GaugesProblems%PitGainLoss%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%PitGainLoss, ChangePitGainLoss, distance)
  100. if(data%problems%GaugesProblems%MudTankVolume%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%MudTankVolume, ChangeMudTankVolume, distance)
  101. if(data%problems%GaugesProblems%ReturnMudFlow%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%ReturnMudFlow, ChangeReturnMudFlow, distance)
  102. if(data%problems%GaugesProblems%TorqueLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%TorqueLimit, ChangeTorqueLimit, distance)
  103. if(data%problems%GaugesProblems%PowerLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%PowerLimit, ChangePowerLimit, distance)
  104. if(data%problems%GaugesProblems%AccumulatorPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%AccumulatorPressure, ChangeAccumulatorPressure, distance)
  105. if(data%problems%GaugesProblems%ManifoldPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%ManifoldPressure, ChangeManifoldPressure, distance)
  106. if(data%problems%GaugesProblems%AnnularPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%AnnularPressure, ChangeAnnularPressure, distance)
  107. if(data%problems%GaugesProblems%RigAirPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%RigAirPressure, ChangeRigAirPressure, distance)
  108. if(data%problems%GaugesProblems%StandPipe1%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%StandPipe1, ChangeStandPipe1, distance)
  109. if(data%problems%GaugesProblems%StandPipe2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%StandPipe2, ChangeStandPipe2, distance)
  110. if(data%problems%GaugesProblems%DrillPipePressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%DrillPipePressure, ChangeDrillPipePressure, distance)
  111. if(data%problems%GaugesProblems%ChokePosition%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%ChokePosition, ChangeChokePosition, distance)
  112. if(data%problems%GaugesProblems%CasingPressure2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%GaugesProblems%CasingPressure2, ChangeCasingPressure2, distance)
  113. end subroutine
  114. subroutine ChangeWeightIndicator(status)
  115. use SimulationVariables !@
  116. implicit none
  117. integer, intent (in) :: status
  118. ! if(associated(WeightIndicatorPtr)) call WeightIndicatorPtr(status)
  119. if(status == Clear_StatusType) data%State%TD_General%WeightIndicatorMalf = 0
  120. if(status == Executed_StatusType) data%State%TD_General%WeightIndicatorMalf = 1
  121. endsubroutine
  122. subroutine ChangeRotaryRpm(status)
  123. use SimulationVariables !@
  124. implicit none
  125. integer, intent (in) :: status
  126. ! if(associated(RotaryRpmPtr)) call RotaryRpmPtr(status)
  127. if(status == Clear_StatusType) data%State%RTable%RpmGaugeMalf = 0
  128. if(status == Executed_StatusType) data%State%RTable%RpmGaugeMalf = 1
  129. endsubroutine
  130. subroutine ChangeRotaryTorque(status)
  131. use SimulationVariables !@
  132. implicit none
  133. integer, intent (in) :: status
  134. ! if(associated(RotaryTorquePtr)) call RotaryTorquePtr(status)
  135. if(status == Clear_StatusType) data%State%RTable%TorqueGaugeMalf = 0
  136. if(status == Executed_StatusType) data%State%RTable%TorqueGaugeMalf = 1
  137. endsubroutine
  138. subroutine ChangeStandPipePressure(status)
  139. USE MudSystemVARIABLES
  140. use SimulationVariables !@@@
  141. implicit none
  142. integer, intent (in) :: status
  143. ! if(associated(StandPipePressurePtr)) call StandPipePressurePtr(status)
  144. if(status == Clear_StatusType) data%State%MudSystem%StandPipePressure_DataDisplayMalf = 0
  145. if(status == Executed_StatusType) data%State%MudSystem%StandPipePressure_DataDisplayMalf = 1
  146. endsubroutine
  147. subroutine ChangeCasingPressure(status)
  148. USE FricPressDropVarsModule
  149. implicit none
  150. integer, intent (in) :: status
  151. ! if(associated(CasingPressurePtr)) call CasingPressurePtr(status)
  152. if(status == Clear_StatusType) data%State%FricPressDrop%CasingPressure_DataDisplayMalF = 0
  153. if(status == Executed_StatusType) data%State%FricPressDrop%CasingPressure_DataDisplayMalF = 1
  154. endsubroutine
  155. subroutine ChangePump1Strokes(status)
  156. use SimulationVariables
  157. implicit none
  158. integer, intent (in) :: status
  159. ! if(associated(Pump1StrokesPtr)) call Pump1StrokesPtr(status)
  160. if(status == Clear_StatusType) data%State%Pump(1)%SPMGaugeMalf = 0
  161. if(status == Executed_StatusType) data%State%Pump(1)%SPMGaugeMalf = 1
  162. endsubroutine
  163. subroutine ChangePump2Strokes(status)
  164. use SimulationVariables
  165. implicit none
  166. integer, intent (in) :: status
  167. ! if(associated(Pump2StrokesPtr)) call Pump2StrokesPtr(status)
  168. if(status == Clear_StatusType) data%State%Pump(2)%SPMGaugeMalf = 0
  169. if(status == Executed_StatusType) data%State%Pump(2)%SPMGaugeMalf = 1
  170. endsubroutine
  171. subroutine ChangeReturnLineTemperature(status)
  172. implicit none
  173. integer, intent (in) :: status
  174. ! if(associated(ReturnLineTemperaturePtr)) call ReturnLineTemperaturePtr(status)
  175. !if(status == Clear_StatusType) print*,'On_ReturnLineTemperature_Clear'
  176. !if(status == Executed_StatusType) print*,'On_ReturnLineTemperature_Execute'
  177. endsubroutine
  178. subroutine ChangeTripTank(status)
  179. USE MudSystemVARIABLES
  180. use SimulationVariables !@@@
  181. implicit none
  182. integer, intent (in) :: status
  183. ! if(associated(TripTankPtr)) call TripTankPtr(status)
  184. if(status == Clear_StatusType) data%State%MudSystem%TripTankPressure_DataDisplayMalf = 0
  185. if(status == Executed_StatusType) data%State%MudSystem%TripTankPressure_DataDisplayMalf = 1
  186. endsubroutine
  187. subroutine ChangePitGainLoss(status)
  188. USE MudSystemVARIABLES
  189. use SimulationVariables !@@@
  190. implicit none
  191. integer, intent (in) :: status
  192. ! if(associated(PitGainLossPtr)) call PitGainLossPtr(status)
  193. if(status == Clear_StatusType) data%State%MudSystem%PitGainLossGaugeMalf = 0
  194. if(status == Executed_StatusType) data%State%MudSystem%PitGainLossGaugeMalf = 1
  195. endsubroutine
  196. subroutine ChangeMudTankVolume(status)
  197. implicit none
  198. integer, intent (in) :: status
  199. ! if(associated(MudTankVolumePtr)) call MudTankVolumePtr(status)
  200. !if(status == Clear_StatusType) print*,'On_MudTankVolume_Clear'
  201. !if(status == Executed_StatusType) print*,'On_MudTankVolume_Execute'
  202. endsubroutine
  203. subroutine ChangeReturnMudFlow(status)
  204. implicit none
  205. integer, intent (in) :: status
  206. ! if(associated(ReturnMudFlowPtr)) call ReturnMudFlowPtr(status)
  207. !if(status == Clear_StatusType) print*,'On_ReturnMudFlow_Clear'
  208. !if(status == Executed_StatusType) print*,'On_ReturnMudFlow_Execute'
  209. endsubroutine
  210. subroutine ChangeTorqueLimit(status)
  211. use SimulationVariables !@
  212. implicit none
  213. integer, intent (in) :: status
  214. ! if(associated(TorqueLimitPtr)) call TorqueLimitPtr(status)
  215. if(status == Clear_StatusType) data%State%RTable%TorqueLimitGaugeMalf = 0
  216. if(status == Executed_StatusType) data%State%RTable%TorqueLimitGaugeMalf = 1
  217. endsubroutine
  218. subroutine ChangePowerLimit(status)
  219. implicit none
  220. integer, intent (in) :: status
  221. ! if(associated(PowerLimitPtr)) call PowerLimitPtr(status)
  222. !if(status == Clear_StatusType) print*,'On_PowerLimit_Clear'
  223. !if(status == Executed_StatusType) print*,'On_PowerLimit_Execute'
  224. endsubroutine
  225. subroutine ChangeAccumulatorPressure(status)
  226. use SimulationVariables
  227. implicit none
  228. integer, intent (in) :: status
  229. ! if(associated(AccumulatorPressurePtr)) call AccumulatorPressurePtr(status)
  230. if(status == Clear_StatusType) data%State%BopStackAcc%AccumulatorPressureGaugeMalf = 0
  231. if(status == Executed_StatusType) data%State%BopStackAcc%AccumulatorPressureGaugeMalf = 1
  232. endsubroutine
  233. subroutine ChangeManifoldPressure(status)
  234. use SimulationVariables
  235. implicit none
  236. integer, intent (in) :: status
  237. ! if(associated(ManifoldPressurePtr)) call ManifoldPressurePtr(status)
  238. if(status == Clear_StatusType) data%State%BopStackAcc%ManifoldPressureGaugeMalf = 0
  239. if(status == Executed_StatusType) data%State%BopStackAcc%ManifoldPressureGaugeMalf = 1
  240. endsubroutine
  241. subroutine ChangeAnnularPressure(status)
  242. use SimulationVariables
  243. implicit none
  244. integer, intent (in) :: status
  245. ! if(associated(AnnularPressurePtr)) call AnnularPressurePtr(status)
  246. if(status == Clear_StatusType) data%State%Annular%AnnularPressureGaugeMalf = 0
  247. if(status == Executed_StatusType) data%State%Annular%AnnularPressureGaugeMalf = 1
  248. endsubroutine
  249. subroutine ChangeRigAirPressure(status)
  250. use SimulationVariables
  251. implicit none
  252. integer, intent (in) :: status
  253. ! if(associated(RigAirPressurePtr)) call RigAirPressurePtr(status)
  254. if(status == Clear_StatusType) data%State%BopStackAcc%AirSupplyPressureGaugeMalf = 0
  255. if(status == Executed_StatusType) data%State%BopStackAcc%AirSupplyPressureGaugeMalf = 1
  256. endsubroutine
  257. subroutine ChangeStandPipe1(status)
  258. USE MudSystemVARIABLES
  259. use SimulationVariables !@@@
  260. implicit none
  261. integer, intent (in) :: status
  262. ! if(associated(StandPipe1Ptr)) call StandPipe1Ptr(status)
  263. if(status == Clear_StatusType) data%State%MudSystem%StandPipeGauge1Malf = 0
  264. if(status == Executed_StatusType) data%State%MudSystem%StandPipeGauge1Malf = 1
  265. endsubroutine
  266. subroutine ChangeStandPipe2(status)
  267. USE MudSystemVARIABLES
  268. use SimulationVariables !@@@
  269. implicit none
  270. integer, intent (in) :: status
  271. ! if(associated(StandPipe2Ptr)) call StandPipe2Ptr(status)
  272. if(status == Clear_StatusType) data%State%MudSystem%StandPipeGauge2Malf = 0
  273. if(status == Executed_StatusType) data%State%MudSystem%StandPipeGauge2Malf = 1
  274. endsubroutine
  275. subroutine ChangeDrillPipePressure(status)
  276. USE MudSystemVARIABLES
  277. use SimulationVariables !@@@
  278. implicit none
  279. integer, intent (in) :: status
  280. ! if(associated(DrillPipePressurePtr)) call DrillPipePressurePtr(status)
  281. if(status == Clear_StatusType) data%State%MudSystem%DrillPipePressureMalf = 0
  282. if(status == Executed_StatusType) data%State%MudSystem%DrillPipePressureMalf = 1
  283. endsubroutine
  284. subroutine ChangeChokePosition(status)
  285. USE CHOKEVARIABLES
  286. use SimulationVariables !@
  287. implicit none
  288. integer, intent (in) :: status
  289. ! if(associated(ChokePositionPtr)) call ChokePositionPtr(status)
  290. if(status == Clear_StatusType) data%State%Choke%GaugeChokePositionMailf = 0
  291. if(status == Executed_StatusType) data%State%Choke%GaugeChokePositionMailf = 1
  292. endsubroutine
  293. subroutine ChangeCasingPressure2(status)
  294. USE FricPressDropVarsModule
  295. implicit none
  296. integer, intent (in) :: status
  297. ! if(associated(CasingPressure2Ptr)) call CasingPressure2Ptr(status)
  298. if(status == Clear_StatusType) data%State%FricPressDrop%CasingPressure_ChokeMalF = 0
  299. if(status == Executed_StatusType) data%State%FricPressDrop%CasingPressure_ChokeMalF = 1
  300. endsubroutine
  301. end module CGaugesProblems