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.
 
 
 
 
 
 

585 lines
30 KiB

  1. module CGaugesProblemsVariables
  2. use CProblemDifinition
  3. implicit none
  4. public
  5. type(CProblem) :: WeightIndicator
  6. type(CProblem) :: RotaryRpm
  7. type(CProblem) :: RotaryTorque
  8. type(CProblem) :: StandPipePressure
  9. type(CProblem) :: CasingPressure
  10. type(CProblem) :: Pump1Strokes
  11. type(CProblem) :: Pump2Strokes
  12. type(CProblem) :: ReturnLineTemperature
  13. type(CProblem) :: TripTank
  14. type(CProblem) :: PitGainLoss
  15. type(CProblem) :: MudTankVolume
  16. type(CProblem) :: ReturnMudFlow
  17. type(CProblem) :: TorqueLimit
  18. type(CProblem) :: PowerLimit
  19. type(CProblem) :: AccumulatorPressure
  20. type(CProblem) :: ManifoldPressure
  21. type(CProblem) :: AnnularPressure
  22. type(CProblem) :: RigAirPressure
  23. type(CProblem) :: StandPipe1
  24. type(CProblem) :: StandPipe2
  25. type(CProblem) :: DrillPipePressure
  26. type(CProblem) :: ChokePosition
  27. type(CProblem) :: CasingPressure2
  28. procedure (ActionInteger), pointer :: WeightIndicatorPtr
  29. procedure (ActionInteger), pointer :: RotaryRpmPtr
  30. procedure (ActionInteger), pointer :: RotaryTorquePtr
  31. procedure (ActionInteger), pointer :: StandPipePressurePtr
  32. procedure (ActionInteger), pointer :: CasingPressurePtr
  33. procedure (ActionInteger), pointer :: Pump1StrokesPtr
  34. procedure (ActionInteger), pointer :: Pump2StrokesPtr
  35. procedure (ActionInteger), pointer :: ReturnLineTemperaturePtr
  36. procedure (ActionInteger), pointer :: TripTankPtr
  37. procedure (ActionInteger), pointer :: PitGainLossPtr
  38. procedure (ActionInteger), pointer :: MudTankVolumePtr
  39. procedure (ActionInteger), pointer :: ReturnMudFlowPtr
  40. procedure (ActionInteger), pointer :: TorqueLimitPtr
  41. procedure (ActionInteger), pointer :: PowerLimitPtr
  42. procedure (ActionInteger), pointer :: AccumulatorPressurePtr
  43. procedure (ActionInteger), pointer :: ManifoldPressurePtr
  44. procedure (ActionInteger), pointer :: AnnularPressurePtr
  45. procedure (ActionInteger), pointer :: RigAirPressurePtr
  46. procedure (ActionInteger), pointer :: StandPipe1Ptr
  47. procedure (ActionInteger), pointer :: StandPipe2Ptr
  48. procedure (ActionInteger), pointer :: DrillPipePressurePtr
  49. procedure (ActionInteger), pointer :: ChokePositionPtr
  50. procedure (ActionInteger), pointer :: CasingPressure2Ptr
  51. contains
  52. subroutine ProcessGaugesProblemsDueTime(time)
  53. implicit none
  54. integer :: time
  55. if(WeightIndicator%ProblemType == Time_ProblemType) call ProcessDueTime(WeightIndicator, ChangeWeightIndicator, time)
  56. if(RotaryRpm%ProblemType == Time_ProblemType) call ProcessDueTime(RotaryRpm, ChangeRotaryRpm, time)
  57. if(RotaryTorque%ProblemType == Time_ProblemType) call ProcessDueTime(RotaryTorque, ChangeRotaryTorque, time)
  58. if(StandPipePressure%ProblemType == Time_ProblemType) call ProcessDueTime(StandPipePressure, ChangeStandPipePressure, time)
  59. if(CasingPressure%ProblemType == Time_ProblemType) call ProcessDueTime(CasingPressure, ChangeCasingPressure, time)
  60. if(Pump1Strokes%ProblemType == Time_ProblemType) call ProcessDueTime(Pump1Strokes, ChangePump1Strokes, time)
  61. if(Pump2Strokes%ProblemType == Time_ProblemType) call ProcessDueTime(Pump2Strokes, ChangePump2Strokes, time)
  62. if(ReturnLineTemperature%ProblemType == Time_ProblemType) call ProcessDueTime(ReturnLineTemperature, ChangeReturnLineTemperature, time)
  63. if(TripTank%ProblemType == Time_ProblemType) call ProcessDueTime(TripTank, ChangeTripTank, time)
  64. if(PitGainLoss%ProblemType == Time_ProblemType) call ProcessDueTime(PitGainLoss, ChangePitGainLoss, time)
  65. if(MudTankVolume%ProblemType == Time_ProblemType) call ProcessDueTime(MudTankVolume, ChangeMudTankVolume, time)
  66. if(ReturnMudFlow%ProblemType == Time_ProblemType) call ProcessDueTime(ReturnMudFlow, ChangeReturnMudFlow, time)
  67. if(TorqueLimit%ProblemType == Time_ProblemType) call ProcessDueTime(TorqueLimit, ChangeTorqueLimit, time)
  68. if(PowerLimit%ProblemType == Time_ProblemType) call ProcessDueTime(PowerLimit, ChangePowerLimit, time)
  69. if(AccumulatorPressure%ProblemType == Time_ProblemType) call ProcessDueTime(AccumulatorPressure, ChangeAccumulatorPressure, time)
  70. if(ManifoldPressure%ProblemType == Time_ProblemType) call ProcessDueTime(ManifoldPressure, ChangeManifoldPressure, time)
  71. if(AnnularPressure%ProblemType == Time_ProblemType) call ProcessDueTime(AnnularPressure, ChangeAnnularPressure, time)
  72. if(RigAirPressure%ProblemType == Time_ProblemType) call ProcessDueTime(RigAirPressure, ChangeRigAirPressure, time)
  73. if(StandPipe1%ProblemType == Time_ProblemType) call ProcessDueTime(StandPipe1, ChangeStandPipe1, time)
  74. if(StandPipe2%ProblemType == Time_ProblemType) call ProcessDueTime(StandPipe2, ChangeStandPipe2, time)
  75. if(DrillPipePressure%ProblemType == Time_ProblemType) call ProcessDueTime(DrillPipePressure, ChangeDrillPipePressure, time)
  76. if(ChokePosition%ProblemType == Time_ProblemType) call ProcessDueTime(ChokePosition, ChangeChokePosition, time)
  77. if(CasingPressure2%ProblemType == Time_ProblemType) call ProcessDueTime(CasingPressure2, ChangeCasingPressure2, time)
  78. end subroutine
  79. subroutine ProcessGaugesProblemsDuePumpStrokes(strokes)
  80. implicit none
  81. integer :: strokes
  82. if(WeightIndicator%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(WeightIndicator, ChangeWeightIndicator, strokes)
  83. if(RotaryRpm%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RotaryRpm, ChangeRotaryRpm, strokes)
  84. if(RotaryTorque%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RotaryTorque, ChangeRotaryTorque, strokes)
  85. if(StandPipePressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(StandPipePressure, ChangeStandPipePressure, strokes)
  86. if(CasingPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(CasingPressure, ChangeCasingPressure, strokes)
  87. if(Pump1Strokes%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Pump1Strokes, ChangePump1Strokes, strokes)
  88. if(Pump2Strokes%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(Pump2Strokes, ChangePump2Strokes, strokes)
  89. if(ReturnLineTemperature%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ReturnLineTemperature, ChangeReturnLineTemperature, strokes)
  90. if(TripTank%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(TripTank, ChangeTripTank, strokes)
  91. if(PitGainLoss%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PitGainLoss, ChangePitGainLoss, strokes)
  92. if(MudTankVolume%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(MudTankVolume, ChangeMudTankVolume, strokes)
  93. if(ReturnMudFlow%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ReturnMudFlow, ChangeReturnMudFlow, strokes)
  94. if(TorqueLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(TorqueLimit, ChangeTorqueLimit, strokes)
  95. if(PowerLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PowerLimit, ChangePowerLimit, strokes)
  96. if(AccumulatorPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AccumulatorPressure, ChangeAccumulatorPressure, strokes)
  97. if(ManifoldPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ManifoldPressure, ChangeManifoldPressure, strokes)
  98. if(AnnularPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(AnnularPressure, ChangeAnnularPressure, strokes)
  99. if(RigAirPressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(RigAirPressure, ChangeRigAirPressure, strokes)
  100. if(StandPipe1%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(StandPipe1, ChangeStandPipe1, strokes)
  101. if(StandPipe2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(StandPipe2, ChangeStandPipe2, strokes)
  102. if(DrillPipePressure%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(DrillPipePressure, ChangeDrillPipePressure, strokes)
  103. if(ChokePosition%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(ChokePosition, ChangeChokePosition, strokes)
  104. if(CasingPressure2%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(CasingPressure2, ChangeCasingPressure2, strokes)
  105. end subroutine
  106. subroutine ProcessGaugesProblemsDueVolumePumped(volume)
  107. implicit none
  108. real(8) :: volume
  109. if(WeightIndicator%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(WeightIndicator, ChangeWeightIndicator, volume)
  110. if(RotaryRpm%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RotaryRpm, ChangeRotaryRpm, volume)
  111. if(RotaryTorque%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RotaryTorque, ChangeRotaryTorque, volume)
  112. if(StandPipePressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(StandPipePressure, ChangeStandPipePressure, volume)
  113. if(CasingPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(CasingPressure, ChangeCasingPressure, volume)
  114. if(Pump1Strokes%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Pump1Strokes, ChangePump1Strokes, volume)
  115. if(Pump2Strokes%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(Pump2Strokes, ChangePump2Strokes, volume)
  116. if(ReturnLineTemperature%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ReturnLineTemperature, ChangeReturnLineTemperature, volume)
  117. if(TripTank%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(TripTank, ChangeTripTank, volume)
  118. if(PitGainLoss%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PitGainLoss, ChangePitGainLoss, volume)
  119. if(MudTankVolume%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(MudTankVolume, ChangeMudTankVolume, volume)
  120. if(ReturnMudFlow%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ReturnMudFlow, ChangeReturnMudFlow, volume)
  121. if(TorqueLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(TorqueLimit, ChangeTorqueLimit, volume)
  122. if(PowerLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PowerLimit, ChangePowerLimit, volume)
  123. if(AccumulatorPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AccumulatorPressure, ChangeAccumulatorPressure, volume)
  124. if(ManifoldPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ManifoldPressure, ChangeManifoldPressure, volume)
  125. if(AnnularPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(AnnularPressure, ChangeAnnularPressure, volume)
  126. if(RigAirPressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(RigAirPressure, ChangeRigAirPressure, volume)
  127. if(StandPipe1%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(StandPipe1, ChangeStandPipe1, volume)
  128. if(StandPipe2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(StandPipe2, ChangeStandPipe2, volume)
  129. if(DrillPipePressure%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(DrillPipePressure, ChangeDrillPipePressure, volume)
  130. if(ChokePosition%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(ChokePosition, ChangeChokePosition, volume)
  131. if(CasingPressure2%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(CasingPressure2, ChangeCasingPressure2, volume)
  132. end subroutine
  133. subroutine ProcessGaugesProblemsDueDistanceDrilled(distance)
  134. implicit none
  135. real(8) :: distance
  136. if(WeightIndicator%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(WeightIndicator, ChangeWeightIndicator, distance)
  137. if(RotaryRpm%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RotaryRpm, ChangeRotaryRpm, distance)
  138. if(RotaryTorque%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RotaryTorque, ChangeRotaryTorque, distance)
  139. if(StandPipePressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(StandPipePressure, ChangeStandPipePressure, distance)
  140. if(CasingPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(CasingPressure, ChangeCasingPressure, distance)
  141. if(Pump1Strokes%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Pump1Strokes, ChangePump1Strokes, distance)
  142. if(Pump2Strokes%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(Pump2Strokes, ChangePump2Strokes, distance)
  143. if(ReturnLineTemperature%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ReturnLineTemperature, ChangeReturnLineTemperature, distance)
  144. if(TripTank%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(TripTank, ChangeTripTank, distance)
  145. if(PitGainLoss%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PitGainLoss, ChangePitGainLoss, distance)
  146. if(MudTankVolume%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(MudTankVolume, ChangeMudTankVolume, distance)
  147. if(ReturnMudFlow%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ReturnMudFlow, ChangeReturnMudFlow, distance)
  148. if(TorqueLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(TorqueLimit, ChangeTorqueLimit, distance)
  149. if(PowerLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PowerLimit, ChangePowerLimit, distance)
  150. if(AccumulatorPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AccumulatorPressure, ChangeAccumulatorPressure, distance)
  151. if(ManifoldPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ManifoldPressure, ChangeManifoldPressure, distance)
  152. if(AnnularPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(AnnularPressure, ChangeAnnularPressure, distance)
  153. if(RigAirPressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(RigAirPressure, ChangeRigAirPressure, distance)
  154. if(StandPipe1%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(StandPipe1, ChangeStandPipe1, distance)
  155. if(StandPipe2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(StandPipe2, ChangeStandPipe2, distance)
  156. if(DrillPipePressure%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(DrillPipePressure, ChangeDrillPipePressure, distance)
  157. if(ChokePosition%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(ChokePosition, ChangeChokePosition, distance)
  158. if(CasingPressure2%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(CasingPressure2, ChangeCasingPressure2, distance)
  159. end subroutine
  160. subroutine ChangeWeightIndicator(status)
  161. use TD_GeneralData
  162. implicit none
  163. integer, intent (in) :: status
  164. if(associated(WeightIndicatorPtr)) call WeightIndicatorPtr(status)
  165. if(status == Clear_StatusType) TD_WeightIndicatorMalf = 0
  166. if(status == Executed_StatusType) TD_WeightIndicatorMalf = 1
  167. endsubroutine
  168. subroutine ChangeRotaryRpm(status)
  169. use RTable_VARIABLES
  170. implicit none
  171. integer, intent (in) :: status
  172. if(associated(RotaryRpmPtr)) call RotaryRpmPtr(status)
  173. if(status == Clear_StatusType) RTable%RpmGaugeMalf = 0
  174. if(status == Executed_StatusType) RTable%RpmGaugeMalf = 1
  175. endsubroutine
  176. subroutine ChangeRotaryTorque(status)
  177. use RTable_VARIABLES
  178. implicit none
  179. integer, intent (in) :: status
  180. if(associated(RotaryTorquePtr)) call RotaryTorquePtr(status)
  181. if(status == Clear_StatusType) RTable%TorqueGaugeMalf = 0
  182. if(status == Executed_StatusType) RTable%TorqueGaugeMalf = 1
  183. endsubroutine
  184. subroutine ChangeStandPipePressure(status)
  185. use MudSystemVARIABLES
  186. implicit none
  187. integer, intent (in) :: status
  188. if(associated(StandPipePressurePtr)) call StandPipePressurePtr(status)
  189. if(status == Clear_StatusType) StandPipePressure_DataDisplayMalf = 0
  190. if(status == Executed_StatusType) StandPipePressure_DataDisplayMalf = 1
  191. endsubroutine
  192. subroutine ChangeCasingPressure(status)
  193. USE FricPressDropVars
  194. implicit none
  195. integer, intent (in) :: status
  196. if(associated(CasingPressurePtr)) call CasingPressurePtr(status)
  197. if(status == Clear_StatusType) CasingPressure_DataDisplayMalF = 0
  198. if(status == Executed_StatusType) CasingPressure_DataDisplayMalF = 1
  199. endsubroutine
  200. subroutine ChangePump1Strokes(status)
  201. use Pumps_VARIABLES
  202. implicit none
  203. integer, intent (in) :: status
  204. if(associated(Pump1StrokesPtr)) call Pump1StrokesPtr(status)
  205. if(status == Clear_StatusType) PUMP(1)%SPMGaugeMalf = 0
  206. if(status == Executed_StatusType) PUMP(1)%SPMGaugeMalf = 1
  207. endsubroutine
  208. subroutine ChangePump2Strokes(status)
  209. use Pumps_VARIABLES
  210. implicit none
  211. integer, intent (in) :: status
  212. if(associated(Pump2StrokesPtr)) call Pump2StrokesPtr(status)
  213. if(status == Clear_StatusType) PUMP(2)%SPMGaugeMalf = 0
  214. if(status == Executed_StatusType) PUMP(2)%SPMGaugeMalf = 1
  215. endsubroutine
  216. subroutine ChangeReturnLineTemperature(status)
  217. implicit none
  218. integer, intent (in) :: status
  219. if(associated(ReturnLineTemperaturePtr)) call ReturnLineTemperaturePtr(status)
  220. !if(status == Clear_StatusType) print*,'On_ReturnLineTemperature_Clear'
  221. !if(status == Executed_StatusType) print*,'On_ReturnLineTemperature_Execute'
  222. endsubroutine
  223. subroutine ChangeTripTank(status)
  224. USE MudSystemVARIABLES
  225. implicit none
  226. integer, intent (in) :: status
  227. if(associated(TripTankPtr)) call TripTankPtr(status)
  228. if(status == Clear_StatusType) TripTankPressure_DataDisplayMalf = 0
  229. if(status == Executed_StatusType) TripTankPressure_DataDisplayMalf = 1
  230. endsubroutine
  231. subroutine ChangePitGainLoss(status)
  232. USE MudSystemVARIABLES
  233. implicit none
  234. integer, intent (in) :: status
  235. if(associated(PitGainLossPtr)) call PitGainLossPtr(status)
  236. if(status == Clear_StatusType) PitGainLossGaugeMalf = 0
  237. if(status == Executed_StatusType) PitGainLossGaugeMalf = 1
  238. endsubroutine
  239. subroutine ChangeMudTankVolume(status)
  240. implicit none
  241. integer, intent (in) :: status
  242. if(associated(MudTankVolumePtr)) call MudTankVolumePtr(status)
  243. !if(status == Clear_StatusType) print*,'On_MudTankVolume_Clear'
  244. !if(status == Executed_StatusType) print*,'On_MudTankVolume_Execute'
  245. endsubroutine
  246. subroutine ChangeReturnMudFlow(status)
  247. implicit none
  248. integer, intent (in) :: status
  249. if(associated(ReturnMudFlowPtr)) call ReturnMudFlowPtr(status)
  250. !if(status == Clear_StatusType) print*,'On_ReturnMudFlow_Clear'
  251. !if(status == Executed_StatusType) print*,'On_ReturnMudFlow_Execute'
  252. endsubroutine
  253. subroutine ChangeTorqueLimit(status)
  254. use RTable_VARIABLES
  255. implicit none
  256. integer, intent (in) :: status
  257. if(associated(TorqueLimitPtr)) call TorqueLimitPtr(status)
  258. if(status == Clear_StatusType) RTable%TorqueLimitGaugeMalf = 0
  259. if(status == Executed_StatusType) RTable%TorqueLimitGaugeMalf = 1
  260. endsubroutine
  261. subroutine ChangePowerLimit(status)
  262. implicit none
  263. integer, intent (in) :: status
  264. if(associated(PowerLimitPtr)) call PowerLimitPtr(status)
  265. !if(status == Clear_StatusType) print*,'On_PowerLimit_Clear'
  266. !if(status == Executed_StatusType) print*,'On_PowerLimit_Execute'
  267. endsubroutine
  268. subroutine ChangeAccumulatorPressure(status)
  269. USE VARIABLES
  270. implicit none
  271. integer, intent (in) :: status
  272. if(associated(AccumulatorPressurePtr)) call AccumulatorPressurePtr(status)
  273. if(status == Clear_StatusType) AccumulatorPressureGaugeMalf = 0
  274. if(status == Executed_StatusType) AccumulatorPressureGaugeMalf = 1
  275. endsubroutine
  276. subroutine ChangeManifoldPressure(status)
  277. USE VARIABLES
  278. implicit none
  279. integer, intent (in) :: status
  280. if(associated(ManifoldPressurePtr)) call ManifoldPressurePtr(status)
  281. if(status == Clear_StatusType) ManifoldPressureGaugeMalf = 0
  282. if(status == Executed_StatusType) ManifoldPressureGaugeMalf = 1
  283. endsubroutine
  284. subroutine ChangeAnnularPressure(status)
  285. USE VARIABLES
  286. implicit none
  287. integer, intent (in) :: status
  288. if(associated(AnnularPressurePtr)) call AnnularPressurePtr(status)
  289. if(status == Clear_StatusType) AnnularPressureGaugeMalf = 0
  290. if(status == Executed_StatusType) AnnularPressureGaugeMalf = 1
  291. endsubroutine
  292. subroutine ChangeRigAirPressure(status)
  293. USE VARIABLES
  294. implicit none
  295. integer, intent (in) :: status
  296. if(associated(RigAirPressurePtr)) call RigAirPressurePtr(status)
  297. if(status == Clear_StatusType) AirSupplyPressureGaugeMalf = 0
  298. if(status == Executed_StatusType) AirSupplyPressureGaugeMalf = 1
  299. endsubroutine
  300. subroutine ChangeStandPipe1(status)
  301. use MudSystemVARIABLES
  302. implicit none
  303. integer, intent (in) :: status
  304. if(associated(StandPipe1Ptr)) call StandPipe1Ptr(status)
  305. if(status == Clear_StatusType) StandPipeGauge1Malf = 0
  306. if(status == Executed_StatusType) StandPipeGauge1Malf = 1
  307. endsubroutine
  308. subroutine ChangeStandPipe2(status)
  309. use MudSystemVARIABLES
  310. implicit none
  311. integer, intent (in) :: status
  312. if(associated(StandPipe2Ptr)) call StandPipe2Ptr(status)
  313. if(status == Clear_StatusType) StandPipeGauge2Malf = 0
  314. if(status == Executed_StatusType) StandPipeGauge2Malf = 1
  315. endsubroutine
  316. subroutine ChangeDrillPipePressure(status)
  317. use MudSystemVARIABLES
  318. implicit none
  319. integer, intent (in) :: status
  320. if(associated(DrillPipePressurePtr)) call DrillPipePressurePtr(status)
  321. if(status == Clear_StatusType) DrillPipePressureMalf = 0
  322. if(status == Executed_StatusType) DrillPipePressureMalf = 1
  323. endsubroutine
  324. subroutine ChangeChokePosition(status)
  325. USE CHOKEVARIABLES
  326. implicit none
  327. integer, intent (in) :: status
  328. if(associated(ChokePositionPtr)) call ChokePositionPtr(status)
  329. if(status == Clear_StatusType) GaugeChokePositionMailf = 0
  330. if(status == Executed_StatusType) GaugeChokePositionMailf = 1
  331. endsubroutine
  332. subroutine ChangeCasingPressure2(status)
  333. use FricPressDropVars
  334. implicit none
  335. integer, intent (in) :: status
  336. if(associated(CasingPressure2Ptr)) call CasingPressure2Ptr(status)
  337. if(status == Clear_StatusType) CasingPressure_ChokeMalF = 0
  338. if(status == Executed_StatusType) CasingPressure_ChokeMalF = 1
  339. endsubroutine
  340. subroutine SubscribeWeightIndicator(v)
  341. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeWeightIndicator
  342. !DEC$ ATTRIBUTES ALIAS: 'SubscribeWeightIndicator' :: SubscribeWeightIndicator
  343. implicit none
  344. procedure (ActionInteger) :: v
  345. WeightIndicatorPtr => v
  346. end subroutine
  347. subroutine SubscribeRotaryRpm(v)
  348. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRotaryRpm
  349. !DEC$ ATTRIBUTES ALIAS: 'SubscribeRotaryRpm' :: SubscribeRotaryRpm
  350. implicit none
  351. procedure (ActionInteger) :: v
  352. RotaryRpmPtr => v
  353. end subroutine
  354. subroutine SubscribeRotaryTorque(v)
  355. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRotaryTorque
  356. !DEC$ ATTRIBUTES ALIAS: 'SubscribeRotaryTorque' :: SubscribeRotaryTorque
  357. implicit none
  358. procedure (ActionInteger) :: v
  359. RotaryTorquePtr => v
  360. end subroutine
  361. subroutine SubscribeStandPipePressure(v)
  362. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStandPipePressure
  363. !DEC$ ATTRIBUTES ALIAS: 'SubscribeStandPipePressure' :: SubscribeStandPipePressure
  364. implicit none
  365. procedure (ActionInteger) :: v
  366. StandPipePressurePtr => v
  367. end subroutine
  368. subroutine SubscribeCasingPressure(v)
  369. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeCasingPressure
  370. !DEC$ ATTRIBUTES ALIAS: 'SubscribeCasingPressure' :: SubscribeCasingPressure
  371. implicit none
  372. procedure (ActionInteger) :: v
  373. CasingPressurePtr => v
  374. end subroutine
  375. subroutine SubscribePump1Strokes(v)
  376. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePump1Strokes
  377. !DEC$ ATTRIBUTES ALIAS: 'SubscribePump1Strokes' :: SubscribePump1Strokes
  378. implicit none
  379. procedure (ActionInteger) :: v
  380. Pump1StrokesPtr => v
  381. end subroutine
  382. subroutine SubscribePump2Strokes(v)
  383. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePump2Strokes
  384. !DEC$ ATTRIBUTES ALIAS: 'SubscribePump2Strokes' :: SubscribePump2Strokes
  385. implicit none
  386. procedure (ActionInteger) :: v
  387. Pump2StrokesPtr => v
  388. end subroutine
  389. subroutine SubscribeReturnLineTemperature(v)
  390. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReturnLineTemperature
  391. !DEC$ ATTRIBUTES ALIAS: 'SubscribeReturnLineTemperature' :: SubscribeReturnLineTemperature
  392. implicit none
  393. procedure (ActionInteger) :: v
  394. ReturnLineTemperaturePtr => v
  395. end subroutine
  396. subroutine SubscribeTripTank(v)
  397. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeTripTank
  398. !DEC$ ATTRIBUTES ALIAS: 'SubscribeTripTank' :: SubscribeTripTank
  399. implicit none
  400. procedure (ActionInteger) :: v
  401. TripTankPtr => v
  402. end subroutine
  403. subroutine SubscribePitGainLoss(v)
  404. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePitGainLoss
  405. !DEC$ ATTRIBUTES ALIAS: 'SubscribePitGainLoss' :: SubscribePitGainLoss
  406. implicit none
  407. procedure (ActionInteger) :: v
  408. PitGainLossPtr => v
  409. end subroutine
  410. subroutine SubscribeMudTankVolume(v)
  411. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMudTankVolume
  412. !DEC$ ATTRIBUTES ALIAS: 'SubscribeMudTankVolume' :: SubscribeMudTankVolume
  413. implicit none
  414. procedure (ActionInteger) :: v
  415. MudTankVolumePtr => v
  416. end subroutine
  417. subroutine SubscribeReturnMudFlow(v)
  418. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReturnMudFlow
  419. !DEC$ ATTRIBUTES ALIAS: 'SubscribeReturnMudFlow' :: SubscribeReturnMudFlow
  420. implicit none
  421. procedure (ActionInteger) :: v
  422. ReturnMudFlowPtr => v
  423. end subroutine
  424. subroutine SubscribeTorqueLimit(v)
  425. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeTorqueLimit
  426. !DEC$ ATTRIBUTES ALIAS: 'SubscribeTorqueLimit' :: SubscribeTorqueLimit
  427. implicit none
  428. procedure (ActionInteger) :: v
  429. TorqueLimitPtr => v
  430. end subroutine
  431. subroutine SubscribePowerLimit(v)
  432. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePowerLimit
  433. !DEC$ ATTRIBUTES ALIAS: 'SubscribePowerLimit' :: SubscribePowerLimit
  434. implicit none
  435. procedure (ActionInteger) :: v
  436. PowerLimitPtr => v
  437. end subroutine
  438. subroutine SubscribeAccumulatorPressure(v)
  439. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAccumulatorPressure
  440. !DEC$ ATTRIBUTES ALIAS: 'SubscribeAccumulatorPressure' :: SubscribeAccumulatorPressure
  441. implicit none
  442. procedure (ActionInteger) :: v
  443. AccumulatorPressurePtr => v
  444. end subroutine
  445. subroutine SubscribeManifoldPressure(v)
  446. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeManifoldPressure
  447. !DEC$ ATTRIBUTES ALIAS: 'SubscribeManifoldPressure' :: SubscribeManifoldPressure
  448. implicit none
  449. procedure (ActionInteger) :: v
  450. ManifoldPressurePtr => v
  451. end subroutine
  452. subroutine SubscribeAnnularPressure(v)
  453. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeAnnularPressure
  454. !DEC$ ATTRIBUTES ALIAS: 'SubscribeAnnularPressure' :: SubscribeAnnularPressure
  455. implicit none
  456. procedure (ActionInteger) :: v
  457. AnnularPressurePtr => v
  458. end subroutine
  459. subroutine SubscribeRigAirPressure(v)
  460. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeRigAirPressure
  461. !DEC$ ATTRIBUTES ALIAS: 'SubscribeRigAirPressure' :: SubscribeRigAirPressure
  462. implicit none
  463. procedure (ActionInteger) :: v
  464. RigAirPressurePtr => v
  465. end subroutine
  466. subroutine SubscribeStandPipe1(v)
  467. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStandPipe1
  468. !DEC$ ATTRIBUTES ALIAS: 'SubscribeStandPipe1' :: SubscribeStandPipe1
  469. implicit none
  470. procedure (ActionInteger) :: v
  471. StandPipe1Ptr => v
  472. end subroutine
  473. subroutine SubscribeStandPipe2(v)
  474. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeStandPipe2
  475. !DEC$ ATTRIBUTES ALIAS: 'SubscribeStandPipe2' :: SubscribeStandPipe2
  476. implicit none
  477. procedure (ActionInteger) :: v
  478. StandPipe2Ptr => v
  479. end subroutine
  480. subroutine SubscribeDrillPipePressure(v)
  481. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeDrillPipePressure
  482. !DEC$ ATTRIBUTES ALIAS: 'SubscribeDrillPipePressure' :: SubscribeDrillPipePressure
  483. implicit none
  484. procedure (ActionInteger) :: v
  485. DrillPipePressurePtr => v
  486. end subroutine
  487. subroutine SubscribeChokePosition(v)
  488. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeChokePosition
  489. !DEC$ ATTRIBUTES ALIAS: 'SubscribeChokePosition' :: SubscribeChokePosition
  490. implicit none
  491. procedure (ActionInteger) :: v
  492. ChokePositionPtr => v
  493. end subroutine
  494. subroutine SubscribeCasingPressure2(v)
  495. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeCasingPressure2
  496. !DEC$ ATTRIBUTES ALIAS: 'SubscribeCasingPressure2' :: SubscribeCasingPressure2
  497. implicit none
  498. procedure (ActionInteger) :: v
  499. CasingPressure2Ptr => v
  500. end subroutine
  501. end module CGaugesProblemsVariables