Simulation Core
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

374 rader
30 KiB

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