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.
 
 
 
 
 
 

1684 lines
96 KiB

  1. {
  2. "cells": [
  3. {
  4. "attachments": {},
  5. "cell_type": "markdown",
  6. "metadata": {},
  7. "source": [
  8. "# Make makefile"
  9. ]
  10. },
  11. {
  12. "cell_type": "code",
  13. "execution_count": 72,
  14. "metadata": {},
  15. "outputs": [
  16. {
  17. "name": "stdout",
  18. "output_type": "stream",
  19. "text": [
  20. "\tCSharp/OperationScenarios/Common/COperationScenariosVariables.f90 /\n",
  21. "\tTorqueDrag/TD_Modules/TD_WellGeometry.f90 /\n",
  22. "\tTorqueDrag/TD_Modules/TD_WellElements.f90 /\n",
  23. "\tTorqueDrag/TD_Modules/TD_StringConnectionData.f90 /\n",
  24. "\tTorqueDrag/TD_Modules/GeoElements_FluidModule.f90 /\n",
  25. "\tRop/sROP_Variables.f90 /\n",
  26. "\tRop/sROP_Other_Variables.f90 /\n",
  27. "\tFluidFlow/Flow_Startup_VARIABLES.f90 /\n",
  28. "\tCSharp/DownHole/CDownHoleTypes.f90 /\n",
  29. "\tEquipments/Drawworks/Drawworks_VARIABLES.f90 /\n",
  30. "\tEquipments/ChokeControl/CHOKE_VARIABLES.f90 /\n",
  31. "\tEquipments/TopDrive/TopDrive_VARIABLES.f90 /\n",
  32. "\tEquipments/RotaryTable/RTable_VARIABLES.f90 /\n",
  33. "\tEquipments/Pumps/Pumps_VARIABLES.f90 /\n",
  34. "\tCSharp/Warnings/CWarningsVariables.f90 /\n",
  35. "\tCSharp/StudentStation/CStudentStationVariables.f90 /\n",
  36. "\tCSharp/OperationScenarios/SoftwareInputsVariables.f90 /\n",
  37. "\tCSharp/OperationScenarios/UnitySignals/UnitySignalsVariables.f90 /\n",
  38. "\tCSharp/OperationScenarios/Permissions/PermissionsVariables.f90 /\n",
  39. "\tCSharp/OperationScenarios/Notifications/NotificationVariables.f90 /\n",
  40. "\tCSharp/Equipments/Tanks/CTanksVariables.f90 /\n",
  41. "\tCSharp/Equipments/DrillWatch/CDrillWatchVariables.f90 /\n",
  42. "\tCSharp/Equipments/ControlPanels/CTopDrivePanelVariables.f90 /\n",
  43. "\tCSharp/Equipments/ControlPanels/CStandPipeManifoldVariables.f90 /\n",
  44. "\tCSharp/Equipments/ControlPanels/CHookVariables.f90 /\n",
  45. "\tCSharp/Equipments/ControlPanels/CDrillingConsoleVariables.f90 /\n",
  46. "\tCSharp/Equipments/ControlPanels/CChokeManifoldVariables.f90 /\n",
  47. "\tCSharp/Equipments/ControlPanels/CChokeControlPanelVariables.f90 /\n",
  48. "\tCSharp/Equipments/ControlPanels/CBopControlPanelVariables.f90 /\n",
  49. "\tCSharp/BasicInputs/WellProfile/CWellSurveyDataVariables.f90 /\n",
  50. "\tCSharp/BasicInputs/WellProfile/CPathGenerationVariables.f90 /\n",
  51. "\tCSharp/BasicInputs/WellProfile/CCasingLinerChokeVariables.f90 /\n",
  52. "\tCSharp/BasicInputs/RigSpecifications/CRigSizeVariables.f90 /\n",
  53. "\tCSharp/Common/CIActionReference.f90 /\n",
  54. "\tCSharp/BasicInputs/RigSpecifications/CPowerVariables.f90 /\n",
  55. "\tCSharp/BasicInputs/RigSpecifications/CHoistingVariables.f90 /\n",
  56. "\tCSharp/BasicInputs/RigSpecifications/CBopStackVariables.f90 /\n",
  57. "\tCSharp/BasicInputs/RigSpecifications/CAccumulatorVariables.f90 /\n",
  58. "\tCSharp/BasicInputs/Geology/CShoeVariables.f90 /\n",
  59. "\tCSharp/BasicInputs/Geology/CReservoirVariables.f90 /\n",
  60. "\tCSharp/BasicInputs/Geology/CFormationVariables.f90 /\n",
  61. "\tCSharp/BasicInputs/Bha/CStringConfigurationVariables.f90 /\n",
  62. "\tSimulation/Constants.f90 /\n",
  63. "\tCSharp/Equipments/MudPathFinding/CArrangement.f90 /\n",
  64. "\tCSharp/OperationScenarios/Unity/CUnityInputs.f90 /\n",
  65. "\tCSharp/Common/CCommonVariables.f90 /\n",
  66. "\tCommon/DynamicIntegerArray.f90 /\n",
  67. "\tRop/RopMain.f90 /\n",
  68. "\tCSharp/Equipments/ControlPanels/CEquipmentsConstants.f90 /\n",
  69. "\tCommon/DynamicRealArray.f90 /\n",
  70. "\tCSharp/Common/CTimerLegacy.f90 /\n",
  71. "\tCommon/DynamicDoubleArray.f90 /\n",
  72. "\tCSharp/Equipments/MudPathFinding/CPathChangeEvents.f90 /\n",
  73. "\tCommon/DynamicLogicalArray.f90 /\n",
  74. "\tCSharp/Common/CScaleRange.f90 /\n",
  75. "\tCSharp/Common/CTimer.f90 /\n",
  76. "\tCSharp/Common/CQuery.f90 /\n",
  77. "\tFluidFlow/FluidFlowMain.f90 /\n",
  78. "\tTorqueDrag/TD_Modules/TD_GeneralData.f90 /\n",
  79. "\tCSharp/BasicInputs/WellProfile/CWellSurveyData.f90 /\n",
  80. "\tCSharp/Equipments/ControlPanels/CDataDisplayConsoleVariables.f90 /\n",
  81. "\tCSharp/ErrorLog/CLog4.f90 /\n",
  82. "\tCSharp/BasicInputs/RigSpecifications/CPumpsVariables.f90 /\n",
  83. "\tCSharp/ErrorLog/CLog1.f90 /\n",
  84. "\tCSharp/BasicInputs/CMudPropertiesVariables.f90 /\n",
  85. "\tCSharp/ErrorLog/CLog5.f90 /\n",
  86. "\tCSharp/ErrorLog/CError.f90 /\n",
  87. "\tCSharp/ErrorLog/CLog2.f90 /\n",
  88. "\tCSharp/ErrorLog/CLog3.f90 /\n",
  89. "\tSimulation/CSounds.f90 /\n",
  90. "\tCSharp/Common/CCommon.f90 /\n",
  91. "\tFluidFlow/Pressure_Display_VARIABLES.f90 /\n",
  92. "\tEquipments/BopStack/VARIABLES.f90 /\n",
  93. "\tFluidFlow/kick/Kick_VARIABLES.f90 /\n",
  94. "\tCSharp/OperationScenarios/Unity/CUnityOutputs.f90 /\n",
  95. "\tCSharp/DownHole/CDownHoleVariables.f90 /\n",
  96. "\tGeo/GeoMain.f90 /\n",
  97. "\tCSharp/Equipments/MudPathFinding/CPath.f90 /\n",
  98. "\tCSharp/Problems/CProblemDifinition.f90 /\n",
  99. "\tFluidFlow/Pressure_Distribution_VARIABLES.f90 /\n",
  100. "\tEquipments/MudSystem/MudSystem_Variables.f90 /\n",
  101. "\tTorqueDrag/TD_Modules/TD_DrillStem.f90 /\n",
  102. "\tCSharp/Equipments/MudPathFinding/CStack.f90 /\n",
  103. "\tCSharp/Problems/CDrillStemProblemsVariables.f90 /\n",
  104. "\tCSharp/Problems/COtherProblemsVariables.f90 /\n",
  105. "\tCSharp/Problems/CLostProblemsVariables.f90 /\n",
  106. "\tCSharp/Problems/CGaugesProblemsVariables.f90 /\n",
  107. "\tCSharp/Problems/CBitProblemsVariables.f90 /\n",
  108. "\tCSharp/Problems/CKickProblemsVariables.f90 /\n",
  109. "\tCSharp/Problems/CHoistingProblemsVariables.f90 /\n",
  110. "\tCSharp/Problems/CChokeProblemsVariables.f90 /\n",
  111. "\tCSharp/Problems/CPumpProblemsVariables.f90 /\n",
  112. "\tCSharp/Problems/CRotaryProblemsVariables.f90 /\n",
  113. "\tCSharp/Problems/CMudTreatmentProblemsVariables.f90 /\n",
  114. "\tCSharp/Problems/CBopProblemsVariables.f90 /\n",
  115. "\tSimulation/SimulationVariables.f90 /\n",
  116. "\tCSharp/Problems/CMudTreatmentProblems.f90 /\n",
  117. "\tCSharp/Problems/CChokeProblems.f90 /\n",
  118. "\tCSharp/Equipments/ControlPanels/CHook.f90 /\n",
  119. "\tCSharp/BasicInputs/RigSpecifications/CRigSize.f90 /\n",
  120. "\tEquipments/BopStack/PipeRams1Main.f90 /\n",
  121. "\tCSharp/Problems/COtherProblems.f90 /\n",
  122. "\tCSharp/BasicInputs/RigSpecifications/CAccumulator.f90 /\n",
  123. "\tCSharp/Problems/CRotaryProblems.f90 /\n",
  124. "\tCSharp/Problems/CDrillStemProblems.f90 /\n",
  125. "\tCSharp/BasicInputs/MudProperties.f90 /\n",
  126. "\tCSharp/BasicInputs/RigSpecifications/CPower.f90 /\n",
  127. "\tEquipments/RotaryTable/RotaryTableMain.f90 /\n",
  128. "\tCSharp/Equipments/MudPathFinding/CManifolds.f90 /\n",
  129. "\tCSharp/Problems/CBopProblems.f90 /\n",
  130. "\tCSharp/DownHole/DownHole.f90 /\n",
  131. "\tCSharp/Problems/CHoistingProblems.f90 /\n",
  132. "\tCSharp/BasicInputs/RigSpecifications/CHoisting.f90 /\n",
  133. "\tEquipments/Drawworks/DrawworksMain.f90 /\n",
  134. "\tCSharp/Problems/CLostProblems.f90 /\n",
  135. "\tCSharp/Problems/CBitProblems.f90 /\n",
  136. "\tCSharp/BasicInputs/RigSpecifications/CBopStack.f90 /\n",
  137. "\tEquipments/BopStack/ChokeLineMain.f90 /\n",
  138. "\tEquipments/Pumps/PumpsMain.f90 /\n",
  139. "\tEquipments/BopStack/AnnularMain.f90 /\n",
  140. "\tCSharp/BasicInputs/WellProfile/CPathGeneration.f90 /\n",
  141. "\tCSharp/BasicInputs/Geology/CReservoir.f90 /\n",
  142. "\tCSharp/BasicInputs/Bha/CStringConfiguration.f90 /\n",
  143. "\tEquipments/BopStack/PipeRams2Main.f90 /\n",
  144. "\tEquipments/BopStack/BlindRamsMain.f90 /\n",
  145. "\tCSharp/Problems/CKickProblems.f90 /\n",
  146. "\tCSharp/OperationScenarios/Permissions/Permissions.f90 /\n",
  147. "\tCSharp/BasicInputs/Geology/CFormation.f90 /\n",
  148. "\tEquipments/BopStack/KillLineMain.f90 /\n",
  149. "\tCSharp/Problems/CGaugesProblems.f90 /\n",
  150. "\tCSharp/BasicInputs/WellProfile/CCasingLinerChoke.f90 /\n",
  151. "\tCSharp/BasicInputs/Geology/CShoe.f90 /\n",
  152. "\tCSharp/Problems/CPumpProblems.f90 /\n",
  153. "\tCSharp/Equipments/ControlPanels/CDataDisplayConsole.f90 /\n",
  154. "\tCSharp/OperationScenarios/SoftwareInputs.f90 /\n",
  155. "\tTorqueDrag/TD_ReadDataSubroutines/TD_DrillStemReadData.f90 /\n",
  156. "\tEquipments/Pumps/Pump_OffMode_Solver.f90 /\n",
  157. "\tTorqueDrag/TD_Forces/TD_DropArea/TD_ForceDownDRot.f90 /\n",
  158. "\tTorqueDrag/TD_Forces/TD_DropArea/TD_ForceDownD.f90 /\n",
  159. "\tFluidFlow/kick/Formation_Information.f90 /\n",
  160. "\tTorqueDrag/TD_DrillingSubs/TD_WellElementsConfiguration.f90 /\n",
  161. "\tEquipments/MudSystem/Elements_Creation.f90 /\n",
  162. "\tEquipments/Drawworks/Drawworks_StartUp.f90 /\n",
  163. "\tTorqueDrag/TD_ReadDataSubroutines/TD_PipePropertiesReadData.f90 /\n",
  164. "\tTorqueDrag/TD_Forces/TD_CombinedMotionData.f90 /\n",
  165. "\tTorqueDrag/TD_DrillingSubs/TVD_Calculator.f90 /\n",
  166. "\tTorqueDrag/TD_Forces/TD_StraightArea/TD_ForceUpSRot.f90 /\n",
  167. "\tRop/Bit_Specification.f90 /\n",
  168. "\tEquipments/Pumps/Pump3_MainSolver.f90 /\n",
  169. "\tEquipments/MudSystem/Kick_Expansion_and_Contraction.f90 /\n",
  170. "\tTorqueDrag/TD_Forces/TD_ForceCalculation.f90 /\n",
  171. "\tTorqueDrag/TD_Forces/TD_BuildArea/TD_ForceDownB.f90 /\n",
  172. "\tEquipments/Pumps/Pumps_TotalSolver.f90 /\n",
  173. "\tTorqueDrag/TD_Forces/TD_StrainCalculation.f90 /\n",
  174. "\tFluidFlow/Flow_Startup.f90 /\n",
  175. "\tEquipments/DrillingConsole_ScrLEDs.f90 /\n",
  176. "\tTorqueDrag/TD_Forces/TD_ViscousDragForce/TD_ViscousDragForce.f90 /\n",
  177. "\tTorqueDrag/TD_Forces/TD_StraightArea/TD_ForceUpS.f90 /\n",
  178. "\tTorqueDrag/TD_Forces/TD_StraightArea/TD_ForceDownS.f90 /\n",
  179. "\tEquipments/RotaryTable/RTable_StartUp.f90 /\n",
  180. "\tEquipments/MudSystem/Utube2_and_Trip_In.f90 /\n",
  181. "\tEquipments/MudSystem/Kick_Migration.f90 /\n",
  182. "\tTorqueDrag/TD_ReadDataSubroutines/TD_ForceReadData.f90 /\n",
  183. "\tTorqueDrag/TD_Forces/TD_StaticHookLoadCalculation.f90 /\n",
  184. "\tEquipments/MudSystem/Pump_and_Trip_In.f90 /\n",
  185. "\tEquipments/MudSystem/Deallocate_Normal_Circulation.f90 /\n",
  186. "\tEquipments/RotaryTable/RTable_OnModeSolver.f90 /\n",
  187. "\tEquipments/Pumps/Pump_OnMode_Solver.f90 /\n",
  188. "\tTorqueDrag/TD_ReadDataSubroutines/TD_WellElementsReadData.f90 /\n",
  189. "\tTorqueDrag/TD_ReadDataSubroutines/TD_MudPropertiesReadData.f90 /\n",
  190. "\tTorqueDrag/TD_Forces/TD_DropArea/TD_ForceUpDRot.f90 /\n",
  191. "\tEquipments/TopDrive/TopDrive_StartUp.f90 /\n",
  192. "\tEquipments/MudSystem/FillingWell_By_BellNipple.f90 /\n",
  193. "\tTorqueDrag/TD_Forces/TD_BuildArea/TD_ForceUpBRot.f90 /\n",
  194. "\tTorqueDrag/TD_Forces/TD_TorqueCalculation.f90 /\n",
  195. "\tTorqueDrag/TD_Forces/TD_BuildArea/TD_ForceDownBRot.f90 /\n",
  196. "\tEquipments/Drawworks/Drawworks_MainSolver.f90 /\n",
  197. "\tTorqueDrag/TD_Forces/TD_DropArea/TD_ForceUpD.f90 /\n",
  198. "\tTorqueDrag/TD_Forces/TD_BuildArea/TD_ForceUpB.f90 /\n",
  199. "\tEquipments/RotaryTable/RTable_OffModeSolver.f90 /\n",
  200. "\tTorqueDrag/TD_StartUp/TD_DrillStemStartUp.f90 /\n",
  201. "\tTorqueDrag/TD_Forces/TD_StraightArea/TD_ForceDownSRot.f90 /\n",
  202. "\tRop/JetImpactForce.f90 /\n",
  203. "\tTorqueDrag/TD_ReadDataSubroutines/TD_WellReadData.f90 /\n",
  204. "\tTorqueDrag/TD_Forces/TD_BouyancyFactor.f90 /\n",
  205. "\tFluidFlow/Frictional_Press_Drop_Calc.f90 /\n",
  206. "\tEquipments/TopDrive/TopDrive_Outputs.f90 /\n",
  207. "\tEquipments/Drawworks/DWFixModeMotion.f90 /\n",
  208. "\tCSharp/Equipments/ControlPanels/CBopControlPanel.f90 /\n",
  209. "\tCSharp/OperationScenarios/UnitySignals/UnitySignals.f90 /\n",
  210. "\tCSharp/BasicInputs/RigSpecifications/CPumps.f90 /\n",
  211. "\tCSharp/Equipments/ControlPanels/CChokeManifold.f90 /\n",
  212. "\tCSharp/Equipments/Tanks/CTanks.f90 /\n",
  213. "\tCSharp/Warnings/CWarnings.f90 /\n",
  214. "\tTorqueDrag/TD_DrillingSubs/TD_BOPDiamCalculation.f90 /\n",
  215. "\tEquipments/Drawworks/Drawworks_Direction.f90 /\n",
  216. "\tEquipments/RotaryTable/RTable_Outputs.f90 /\n",
  217. "\tEquipments/Drawworks/DWMalfunction_MotorFailure.f90 /\n",
  218. "\tTorqueDrag/TD_Forces/TD_WeightOnBitCalculation.f90 /\n",
  219. "\tFluidFlow/String_Property_Calculator.f90 /\n",
  220. "\tFluidFlow/Annulus_Property_Calculator.f90 /\n",
  221. "\tEquipments/MudSystem/Trip_Out_andPump.f90 /\n",
  222. "\tEquipments/MudSystem/Utube1_and_Trip_In.f90 /\n",
  223. "\tEquipments/Pumps/Pump2_MainSolver.f90 /\n",
  224. "\tEquipments/Pumps/Pump1_MainSolver.f90 /\n",
  225. "\tFluidFlow/Utube.f90 /\n",
  226. "\tEquipments/BopStack/BOP.f90 /\n",
  227. "\tEquipments/BopStack/SHEAR_RAM.f90 /\n",
  228. "\tEquipments/BopStack/PIPE_RAM2.f90 /\n",
  229. "\tEquipments/BopStack/LOSS_INPUTS.f90 /\n",
  230. "\tEquipments/BopStack/ANNULAR.f90 /\n",
  231. "\tEquipments/BopStack/CHOKE_LINE.f90 /\n",
  232. "\tEquipments/BopStack/KILL_LINE.f90 /\n",
  233. "\tEquipments/BopStack/PIPE_RAM1.f90 /\n",
  234. "\tEquipments/BopStack/BOPstartup.f90 /\n",
  235. "\tCSharp/OperationScenarios/Notifications/Notofications.f90 /\n",
  236. "\tTorqueDrag/TD_StartUp/TD_StartUp.f90 /\n",
  237. "\tTorqueDrag/TD_Forces/TD_HookLoadCalculation.f90 /\n",
  238. "\tEquipments/TopDrive/TopDrive_Inputs.f90 /\n",
  239. "\tEquipments/TopDrive/TopDrive_Solver.f90 /\n",
  240. "\tCSharp/OperationScenarios/Notifications/Notifications.f90 /\n",
  241. "\tTorqueDrag/TorqueDragMain.f90 /\n",
  242. "\tTorqueDrag/TD_DrillingSubs/MeshGeneration_FluidModule.f90 /\n",
  243. "\tEquipments/Pumps/Pumps_StartUp.f90 /\n",
  244. "\tEquipments/ChokeControl/CHOKE.f90 /\n",
  245. "\tEquipments/ChokeControl/AirPump_Choke_Subs.f90 /\n",
  246. "\tEquipments/MudSystem/MudSystemStartup.f90 /\n",
  247. "\tEquipments/TopDrive/TopDriveMain.f90 /\n",
  248. "\tEquipments/MudSystem/MudSystem.f90 /\n",
  249. "\tRop/ROP_MainCalculation.f90 /\n",
  250. "\tEquipments/Drawworks/Drawworks_Outputs.f90 /\n",
  251. "\tEquipments/RotaryTable/RTable_Inputs.f90 /\n",
  252. "\tEquipments/TopDrive/TopDrive_OffMode.f90 /\n",
  253. "\tEquipments/TopDrive/TopDrive_MainSolver.f90 /\n",
  254. "\tCSharp/OperationScenarios/Common/OperationScenarios.f90 /\n",
  255. "\tEquipments/ChokeControl/ChokeControlMain.f90 /\n",
  256. "\tEquipments/ChokeControl/ChokeStartup.f90 /\n",
  257. "\tEquipments/MudSystem/MudSystemMain.f90 /\n",
  258. "\tEquipments/Pumps/Pumps_Inputs.f90 /\n",
  259. "\tEquipments/Pumps/Pumps_Outputs.f90 /\n",
  260. "\tFluidFlow/Annulus_and_Openhole_Pressure_Distribution.f90 /\n",
  261. "\tTorqueDrag/TD_DrillingSubs/TD_WellGeoConfiguration.f90 /\n",
  262. "\tEquipments/RotaryTable/RTable_MainSolver.f90 /\n",
  263. "\tCSharp/OperationScenarios/UnitySignals/CSlipsEnum.f90 /\n",
  264. "\tCSharp/OperationScenarios/Notifications/CUnlatchLedNotification.f90 /\n",
  265. "\tCSharp/OperationScenarios/Notifications/CTdsTorqueWrenchLedNotification.f90 /\n",
  266. "\tCSharp/OperationScenarios/Permissions/CInstallMudBucketPermission.f90 /\n",
  267. "\tCSharp/OperationScenarios/Permissions/CFillupHeadPermission.f90 /\n",
  268. "\tCSharp/OperationScenarios/Notifications/COpenKellyCockLedNotification.f90 /\n",
  269. "\tCSharp/OperationScenarios/Notifications/CTdsPowerLedNotification.f90 /\n",
  270. "\tCSharp/OperationScenarios/Notifications/CSwingLedNotification.f90 /\n",
  271. "\tCSharp/OperationScenarios/Enums/CTdsElevatorModesEnum.f90 /\n",
  272. "\tCSharp/OperationScenarios/UnitySignals/CTdsSpineEnum.f90 /\n",
  273. "\tCSharp/OperationScenarios/Permissions/CSwingTiltPermission.f90 /\n",
  274. "\tCSharp/OperationScenarios/Permissions/CIrSafetyValvePermission.f90 /\n",
  275. "\tCSharp/OperationScenarios/Permissions/CSwingOffPermission.f90 /\n",
  276. "\tCSharp/OperationScenarios/Notifications/CCloseSafetyValveLedNotification.f90 /\n",
  277. "\tCSharp/OperationScenarios/UnitySignals/CMouseHoleEnum.f90 /\n",
  278. "\tCSharp/OperationScenarios/UnitySignals/CFlowPipeDisconnectEnum.f90 /\n",
  279. "\tCSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotification.f90 /\n",
  280. "\tCSharp/OperationScenarios/Enums/CElevatorConnectionEnum.f90 /\n",
  281. "\tCSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotification.f90 /\n",
  282. "\tCSharp/OperationScenarios/UnitySignals/CFlowKellyDisconnectEnum.f90 /\n",
  283. "\tCSharp/OperationScenarios/Notifications/COpenSafetyValveLedNotification.f90 /\n",
  284. "\tCSharp/OperationScenarios/UnitySignals/CTdsBackupClamp.f90 /\n",
  285. "\tCSharp/OperationScenarios/UnitySignals/CTdsTongEnum.f90 /\n",
  286. "\tCSharp/OperationScenarios/UnitySignals/CElevatorEnum.f90 /\n",
  287. "\tCSharp/OperationScenarios/Notifications/CTongNotification.f90 /\n",
  288. "\tCSharp/OperationScenarios/UnitySignals/CSafetyValveEnum.f90 /\n",
  289. "\tCSharp/OperationScenarios/Permissions/CRemoveMudBucketPermission.f90 /\n",
  290. "\tCSharp/OperationScenarios/Permissions/CInstallFillupHeadPermission.f90 /\n",
  291. "\tCSharp/OperationScenarios/UnitySignals/CSwingEnum.f90 /\n",
  292. "\tCSharp/OperationScenarios/UnitySignals/CKellyEnum.f90 /\n",
  293. "\tCSharp/OperationScenarios/Permissions/CSwingDrillPermission.f90 /\n",
  294. "\tCSharp/OperationScenarios/Permissions/CIrIbopPermission.f90 /\n",
  295. "\tCSharp/OperationScenarios/Permissions/CRemoveFillupHeadPermission.f90 /\n",
  296. "\tCSharp/OperationScenarios/Common/COperationScenariosSettings.f90 /\n",
  297. "\tCSharp/OperationScenarios/UnitySignals/CTdsSwingEnum.f90 /\n",
  298. "\tCSharp/OperationScenarios/UnitySignals/CIbopEnum.f90 /\n",
  299. "\tCSharp/OperationScenarios/Notifications/CFillMouseHoleLedNotification.f90 /\n",
  300. "\tCSharp/OperationScenarios/UnitySignals/CTongEnum.f90 /\n",
  301. "\tCSharp/OperationScenarios/Notifications/CIrIBopLedNotification.f90 /\n",
  302. "\tCSharp/OperationScenarios/Notifications/CTdsIbopLedNotification.f90 /\n",
  303. "\tCSharp/OperationScenarios/Notifications/CLatchLedNotification.f90 /\n",
  304. "\tCSharp/OperationScenarios/Notifications/CSlipsNotification.f90 /\n",
  305. "\tTorqueDrag/TD_DrillingSubs/TD_DrillStemConfiguration.f90 /\n",
  306. "\tEquipments/MudSystem/Kick_Influx.f90 /\n",
  307. "\tEquipments/MudSystem/Disconnecting_Pipe.f90 /\n",
  308. "\tEquipments/Drawworks/Drawworks_Solver_OffMode.f90 /\n",
  309. "\tTorqueDrag/TD_DrillingSubs/TD_RemoveComponents.f90 /\n",
  310. "\tFluidFlow/Horizontal_and_String_Pressure_Distribution.f90 /\n",
  311. "\tEquipments/Drawworks/Drawworks_INPUTS.f90 /\n",
  312. "\tTorqueDrag/TD_DrillingSubs/TD_AddComponents.f90 /\n",
  313. "\tEquipments/Drawworks/Drawworks_Solver.f90 /\n",
  314. "\tEquipments/Pumps/Pumps_MainSolver.f90 /\n",
  315. "\tCSharp/OperationScenarios/Common/COperationScenariosMain.f90 /\n",
  316. "\tEquipments/MudSystem/Circulation_Code_Select.f90 /\n",
  317. "\tTorqueDrag/TD_DrillingSubs/TD_StringConnectionModes.f90 /\n",
  318. "\tFluidFlow/kick/Gas_Kick_Calculator.f90 /\n",
  319. "\tSimulator.f90 /\n",
  320. "\tTorqueDrag/TD_MainCalculations.f90 /\n",
  321. "\tFluidFlow/Well_Pressure_Data_Transfer.f90 /\n",
  322. "\tSimulationCore2.f90 /\n",
  323. "\tEquipments/MudSystem/Plot_Final_Mud_Elements.f90 /\n",
  324. "\tFluidFlow/Fluid_Flow_Solver.f90 /\n"
  325. ]
  326. }
  327. ],
  328. "source": [
  329. "import re\n",
  330. "current_dir = 'C:\\\\Projects\\\\VSIM\\\\SimulationCore2\\\\'\n",
  331. "target_dir = 'x64\\\\Debug\\\\'\n",
  332. "depfilename = 'x64\\Debug\\SimulationCore2.dep'\n",
  333. "depfile = open(depfilename,'r')\n",
  334. "content = depfile.read()\n",
  335. "deptexts = content.split('\\n\\n')\n",
  336. "dependencies = {}\n",
  337. "moddeps = {}\n",
  338. "external_deps = []\n",
  339. "deptexts = [dt for dt in deptexts if dt!='']\n",
  340. "\n",
  341. "for depno,dept in enumerate(deptexts):\n",
  342. " headt,tailt = dept.split(': \\\\')\n",
  343. " headt,tailt = headt.strip(),tailt.strip()\n",
  344. " if headt.endswith('.mod'):\n",
  345. " ffile = tailt.replace(current_dir,'')\n",
  346. " mfiles = re.split(r' | \\\\\\n',headt)\n",
  347. " for mfile in mfiles:\n",
  348. " moddeps[mfile.strip()] = ffile\n",
  349. "for depno,dept in enumerate(deptexts):\n",
  350. " headt,tailt = dept.split(': \\\\')\n",
  351. " headt,tailt = headt.strip(),tailt.strip()\n",
  352. " if headt.endswith('.obj'):\n",
  353. " tails = re.split(r' \\\\\\n| ',tailt)\n",
  354. " tails = [t for t in tails if t!='']\n",
  355. " head = tails[0].replace(current_dir,'')\n",
  356. " deps = []\n",
  357. " for t in tails[1:]:\n",
  358. " mfile = t.replace(target_dir,'')\n",
  359. " # if 'json_' in mfile:\n",
  360. " # continue\n",
  361. " if mfile.strip() == '':\n",
  362. " print(f\"!!! t = '{t}', \")\n",
  363. " \n",
  364. " if mfile in moddeps:\n",
  365. " deps.append(moddeps[mfile])\n",
  366. " else:\n",
  367. " external_deps.append(mfile)\n",
  368. " # print(f\"{mfile} is not located\")\n",
  369. " if head in deps:\n",
  370. " deps.remove(head)\n",
  371. " # print(f\"making deps for {head}\")\n",
  372. " dependencies[head]=deps\n",
  373. "\n",
  374. "f = open('dependencies.txt','w')\n",
  375. "f.write(str(dependencies))\n",
  376. "f.close()\n",
  377. "\n",
  378. "from graphlib import TopologicalSorter\n",
  379. "ts = TopologicalSorter(dependencies)\n",
  380. "files = tuple(ts.static_order())\n",
  381. "for file in files:\n",
  382. " print(\"\\t\"+file.replace(\"\\\\\",\"/\")+\" /\")"
  383. ]
  384. },
  385. {
  386. "cell_type": "code",
  387. "execution_count": 12,
  388. "metadata": {},
  389. "outputs": [
  390. {
  391. "name": "stdout",
  392. "output_type": "stream",
  393. "text": [
  394. "CSharp/Equipments/ControlPanels/CBopControlPanel.f90\n",
  395. "CSharp/Equipments/ControlPanels/CChokeControlPanel.f90\n",
  396. "CSharp/Equipments/ControlPanels/CChokeManifold.f90\n",
  397. "CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90\n",
  398. "CSharp/Equipments/ControlPanels/CDrillingConsole.f90\n",
  399. "CSharp/Equipments/ControlPanels/CEquipmentsConstants.f90\n",
  400. "CSharp/Equipments/ControlPanels/CHook.f90\n",
  401. "CSharp/Equipments/ControlPanels/CHookActions.f90\n",
  402. "CSharp/Equipments/ControlPanels/CStandPipeManifold.f90\n",
  403. "CSharp/Equipments/ControlPanels/CTopDrivePanel.f90\n"
  404. ]
  405. }
  406. ],
  407. "source": [
  408. "dir = 'CSharp/Equipments/ControlPanels'\n",
  409. "import os\n",
  410. "os.listdir(dir)\n",
  411. "for f in os.listdir(dir):\n",
  412. " if f.endswith('Variables.f90'):\n",
  413. " continue\n",
  414. " print(dir+'/'+f)"
  415. ]
  416. },
  417. {
  418. "cell_type": "code",
  419. "execution_count": 54,
  420. "metadata": {},
  421. "outputs": [
  422. {
  423. "data": {
  424. "text/plain": [
  425. "['FluidFlow\\\\Well_Pressure_Data_Transfer.f90',\n",
  426. " 'FluidFlow\\\\Well_Pressure_Data_Transfer.f90',\n",
  427. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  428. " 'CSharp\\\\BasicInputs\\\\MudProperties.f90',\n",
  429. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsole.f90',\n",
  430. " 'CSharp\\\\ErrorLog\\\\CLog1.f90',\n",
  431. " 'CSharp\\\\ErrorLog\\\\CError.f90',\n",
  432. " 'CSharp\\\\Warnings\\\\CWarnings.f90',\n",
  433. " 'CSharp\\\\OperationScenarios\\\\Unity\\\\CUnityOutputs.f90',\n",
  434. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumps.f90',\n",
  435. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CArrangement.f90',\n",
  436. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CStack.f90',\n",
  437. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CManifolds.f90',\n",
  438. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  439. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  440. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  441. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  442. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  443. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  444. " 'Rop\\\\sROP_Variables.f90',\n",
  445. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  446. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  447. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  448. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  449. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  450. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  451. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  452. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  453. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  454. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  455. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  456. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  457. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  458. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  459. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  460. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  461. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  462. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  463. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  464. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  465. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  466. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  467. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  468. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  469. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  470. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  471. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  472. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  473. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  474. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  475. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  476. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  477. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  478. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  479. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  480. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  481. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  482. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  483. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  484. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  485. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  486. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  487. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  488. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  489. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  490. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  491. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  492. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  493. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  494. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  495. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  496. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  497. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  498. " 'Simulation\\\\Constants.f90',\n",
  499. " 'Simulation\\\\SimulationVariables.f90',\n",
  500. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  501. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  502. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  503. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  504. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  505. " 'Equipments\\\\MudSystem\\\\MudSystem.f90',\n",
  506. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n",
  507. " 'FluidFlow\\\\kick\\\\Gas_Kick_Calculator.f90',\n",
  508. " 'FluidFlow\\\\Well_Pressure_Data_Transfer.f90',\n",
  509. " 'CSharp\\\\ErrorLog\\\\CError.f90',\n",
  510. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  511. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  512. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  513. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  514. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  515. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  516. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  517. " 'Rop\\\\sROP_Variables.f90',\n",
  518. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  519. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  520. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  521. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  522. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  523. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  524. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  525. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  526. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  527. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  528. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  529. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  530. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  531. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  532. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  533. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  534. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  535. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  536. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  537. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  538. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  539. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  540. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  541. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  542. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  543. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  544. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  545. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  546. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  547. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  548. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  549. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  550. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  551. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  552. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  553. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  554. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  555. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  556. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  557. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  558. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  559. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  560. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  561. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  562. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  563. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  564. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  565. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  566. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  567. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  568. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  569. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  570. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  571. " 'Simulation\\\\Constants.f90',\n",
  572. " 'Simulation\\\\SimulationVariables.f90',\n",
  573. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  574. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  575. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  576. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  577. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  578. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n",
  579. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  580. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  581. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  582. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  583. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  584. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  585. " 'Rop\\\\sROP_Variables.f90',\n",
  586. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  587. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n",
  588. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  589. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  590. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  591. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  592. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  593. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  594. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  595. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  596. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  597. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  598. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  599. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  600. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  601. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  602. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  603. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  604. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  605. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  606. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  607. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  608. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  609. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  610. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  611. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  612. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  613. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  614. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  615. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  616. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  617. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  618. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  619. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  620. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  621. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  622. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  623. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  624. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  625. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  626. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  627. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  628. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  629. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  630. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  631. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  632. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  633. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  634. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  635. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  636. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  637. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  638. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  639. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  640. " 'Simulation\\\\Constants.f90',\n",
  641. " 'Simulation\\\\SimulationVariables.f90',\n",
  642. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  643. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  644. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  645. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  646. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  647. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  648. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  649. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  650. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  651. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  652. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  653. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  654. " 'Rop\\\\sROP_Variables.f90',\n",
  655. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  656. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n",
  657. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  658. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  659. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  660. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  661. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  662. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  663. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  664. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  665. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  666. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  667. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  668. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  669. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  670. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  671. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  672. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  673. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  674. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  675. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  676. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  677. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  678. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  679. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  680. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  681. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  682. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  683. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  684. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  685. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  686. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  687. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  688. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  689. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  690. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  691. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  692. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  693. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  694. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  695. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  696. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  697. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  698. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  699. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  700. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  701. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  702. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  703. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  704. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  705. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  706. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  707. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  708. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  709. " 'Simulation\\\\Constants.f90',\n",
  710. " 'Simulation\\\\SimulationVariables.f90',\n",
  711. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  712. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  713. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  714. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  715. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  716. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  717. " 'CSharp\\\\ErrorLog\\\\CError.f90',\n",
  718. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  719. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  720. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  721. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  722. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  723. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  724. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  725. " 'Rop\\\\sROP_Variables.f90',\n",
  726. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  727. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  728. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  729. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  730. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  731. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  732. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  733. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  734. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  735. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  736. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  737. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  738. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  739. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  740. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  741. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  742. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  743. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  744. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  745. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  746. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  747. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  748. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  749. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  750. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  751. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  752. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  753. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  754. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  755. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  756. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  757. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  758. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  759. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  760. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  761. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  762. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  763. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  764. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  765. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  766. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  767. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  768. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  769. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  770. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  771. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  772. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  773. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  774. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  775. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  776. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  777. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  778. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  779. " 'Simulation\\\\Constants.f90',\n",
  780. " 'Simulation\\\\SimulationVariables.f90',\n",
  781. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  782. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  783. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  784. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  785. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  786. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n",
  787. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  788. " 'CSharp\\\\BasicInputs\\\\MudProperties.f90',\n",
  789. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsole.f90',\n",
  790. " 'CSharp\\\\ErrorLog\\\\CLog1.f90',\n",
  791. " 'CSharp\\\\ErrorLog\\\\CError.f90',\n",
  792. " 'CSharp\\\\Warnings\\\\CWarnings.f90',\n",
  793. " 'CSharp\\\\OperationScenarios\\\\Unity\\\\CUnityOutputs.f90',\n",
  794. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumps.f90',\n",
  795. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CArrangement.f90',\n",
  796. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CStack.f90',\n",
  797. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CManifolds.f90',\n",
  798. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  799. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  800. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  801. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  802. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  803. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  804. " 'Rop\\\\sROP_Variables.f90',\n",
  805. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  806. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  807. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  808. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  809. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  810. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  811. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  812. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  813. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  814. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  815. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  816. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  817. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  818. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  819. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  820. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  821. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  822. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  823. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  824. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  825. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  826. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  827. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  828. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  829. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  830. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  831. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  832. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  833. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  834. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  835. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  836. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  837. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  838. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  839. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  840. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  841. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  842. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  843. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  844. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  845. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  846. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  847. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  848. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  849. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  850. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  851. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  852. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  853. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  854. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  855. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  856. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  857. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  858. " 'Simulation\\\\Constants.f90',\n",
  859. " 'Simulation\\\\SimulationVariables.f90',\n",
  860. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  861. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  862. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  863. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  864. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  865. " 'Equipments\\\\MudSystem\\\\MudSystem.f90',\n",
  866. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90']"
  867. ]
  868. },
  869. "execution_count": 54,
  870. "metadata": {},
  871. "output_type": "execute_result"
  872. }
  873. ],
  874. "source": [
  875. "dependencies['FluidFlow\\\\Well_Pressure_Data_Transfer.f90']"
  876. ]
  877. },
  878. {
  879. "cell_type": "code",
  880. "execution_count": 12,
  881. "metadata": {},
  882. "outputs": [
  883. {
  884. "name": "stdout",
  885. "output_type": "stream",
  886. "text": [
  887. "assets={'USDT': {'Total': '5858.36917324', 'Free': 3879.35}, 'BUSD': {'Total': '-156.01984572', 'Free': 3877.23}}\n"
  888. ]
  889. }
  890. ],
  891. "source": []
  892. },
  893. {
  894. "attachments": {},
  895. "cell_type": "markdown",
  896. "metadata": {},
  897. "source": [
  898. "# FromJson"
  899. ]
  900. },
  901. {
  902. "cell_type": "code",
  903. "execution_count": 1,
  904. "metadata": {},
  905. "outputs": [
  906. {
  907. "name": "stdout",
  908. "output_type": "stream",
  909. "text": [
  910. " call jsonfile%get('UnityInputs.ElevatorConnectionPossible',data%Equipments%UnityInputs%ElevatorConnectionPossible,found)\n",
  911. " if ( .not. found ) call logg(4,\"Not found: UnityInputs%ElevatorConnectionPossible\")\n",
  912. " call jsonfile%get('UnityInputs.JointConnectionPossible',data%Equipments%UnityInputs%JointConnectionPossible,found)\n",
  913. " if ( .not. found ) call logg(4,\"Not found: UnityInputs%JointConnectionPossible\")\n",
  914. " call jsonfile%get('UnityInputs.IsKellyBushingSetInTable',data%Equipments%UnityInputs%IsKellyBushingSetInTable,found)\n",
  915. " if ( .not. found ) call logg(4,\"Not found: UnityInputs%IsKellyBushingSetInTable\")\n",
  916. " call jsonfile%get('UnityInputs.ElevatorPickup',data%Equipments%UnityInputs%ElevatorPickup,found)\n",
  917. " if ( .not. found ) call logg(4,\"Not found: UnityInputs%ElevatorPickup\")\n",
  918. " call jsonfile%get('UnityInputs.NearFloorPosition',data%Equipments%UnityInputs%NearFloorPosition,found)\n",
  919. " if ( .not. found ) call logg(4,\"Not found: UnityInputs%NearFloorPosition\")\n",
  920. " call jsonfile%get('UnityInputs.SingleSetInMouseHole',data%Equipments%UnityInputs%SingleSetInMouseHole,found)\n",
  921. " if ( .not. found ) call logg(4,\"Not found: UnityInputs%SingleSetInMouseHole\")\n",
  922. " call jsonfile%get('UnityInputs.TdsConnectionPossible',data%Equipments%UnityInputs%TdsConnectionPossible,found)\n",
  923. " if ( .not. found ) call logg(4,\"Not found: UnityInputs%TdsConnectionPossible\")\n",
  924. " call jsonfile%get('UnityInputs.TdsStemIn',data%Equipments%UnityInputs%TdsStemIn,found)\n",
  925. " if ( .not. found ) call logg(4,\"Not found: UnityInputs%TdsStemIn\")\n"
  926. ]
  927. }
  928. ],
  929. "source": [
  930. "# pattern=\"\"\"\t\tcall json%get(pitem,data%Configuration%Pumps%@@@)\n",
  931. "# call json%get(p,\"@@@\",pitem)\"\"\"\n",
  932. "\n",
  933. "# pattern=\"\"\"\t\tcall json%get('Equipments.Drilling.@@@',data%Equipments%DrillingConsole%@@@,found)\n",
  934. "# \t\tif ( .not. found ) print *,\"Not found: @@@\" \"\"\"\n",
  935. "pattern=\"\"\" call jsonfile%get('UnityInputs.@@@',data%Equipments%UnityInputs%@@@,found)\n",
  936. " if ( .not. found ) call logg(4,\"Not found: UnityInputs%@@@\")\"\"\"\n",
  937. "input = open(\"Text1.txt\")\n",
  938. "lines = input.readlines()\n",
  939. "for line in lines:\n",
  940. "\tif '::' not in line:\n",
  941. "\t\tcontinue\n",
  942. "\tparts = line.split(\"::\")\n",
  943. "\tif len(parts)!=2:\n",
  944. "\t\tcontinue\n",
  945. "\tname = parts[1].split(' ')[1].strip()\n",
  946. "\tnames = name.split(',')\n",
  947. "\tfor name in names:\n",
  948. "\t\tnewline = pattern.replace(\"@@@\",name)\n",
  949. "\t\tprint(newline)\n"
  950. ]
  951. },
  952. {
  953. "attachments": {},
  954. "cell_type": "markdown",
  955. "metadata": {},
  956. "source": [
  957. "# ToJson"
  958. ]
  959. },
  960. {
  961. "cell_type": "code",
  962. "execution_count": 2,
  963. "metadata": {},
  964. "outputs": [
  965. {
  966. "name": "stdout",
  967. "output_type": "stream",
  968. "text": [
  969. "{\"MudBucket\":0,\n",
  970. "\"Elevator\":0,\n",
  971. "\"FillupHead\":0,\n",
  972. "\"Ibop\":0,\n",
  973. "\"Kelly\":0,\n",
  974. "\"MouseHole\":0,\n",
  975. "\"OperationCondition\":0,\n",
  976. "\"SafetyValve\":0,\n",
  977. "\"operation\":0,\n",
  978. "\"Slips\":0,\n",
  979. "\"Slips_S\":0,\n",
  980. "\"Swing\":0,\n",
  981. "\"Swing_S\":0,\n",
  982. "\"TdsBackupClamp\":0,\n",
  983. "\"TdsSpine\":0,\n",
  984. "\"TdsSwing\":0,\n",
  985. "\"TdsTong\":0,\n",
  986. "\"Tong\":0,\n",
  987. "\"Tong_S\":0,\n",
  988. "\"TdsConnectionModes\":0,\n",
  989. "\"TdsElevatorModes\":0,\n",
  990. "}\n"
  991. ]
  992. }
  993. ],
  994. "source": [
  995. "#Artifical JSon\n",
  996. "input = open(\"Text1.txt\")\n",
  997. "output = \"{\"\n",
  998. "lines = input.readlines()\n",
  999. "for line in lines:\n",
  1000. " name = line.split(\"::\")[-1].strip()\n",
  1001. " name = name.split(' ')[0]\n",
  1002. " type = line.split(\"::\")[0].strip()\n",
  1003. " output += f\"\\\"{name}\\\":0,\\n\" \n",
  1004. " # name = line.split(\"%\")[-1][:-1]\n",
  1005. " # print(name)\n",
  1006. "print(output+\"}\")"
  1007. ]
  1008. },
  1009. {
  1010. "cell_type": "code",
  1011. "execution_count": 2,
  1012. "metadata": {},
  1013. "outputs": [
  1014. {
  1015. "name": "stdout",
  1016. "output_type": "stream",
  1017. "text": [
  1018. "call json%add(p,\"KellyHoseVibrationRate\",data%Equipments%UnityOutputs%KellyHoseVibrationRate)\n",
  1019. "call json%add(p,\"BlowoutFromStringPercent\",data%Equipments%UnityOutputs%BlowoutFromStringPercent)\n",
  1020. "call json%add(p,\"Pedal\",data%Equipments%UnityOutputs%Pedal)\n",
  1021. "call json%add(p,\"FlowRate\",data%Equipments%UnityOutputs%FlowRate)\n",
  1022. "call json%add(p,\"RotaryRpm\",data%Equipments%UnityOutputs%RotaryRpm)\n",
  1023. "call json%add(p,\"BlowoutFromString\",data%Equipments%UnityOutputs%BlowoutFromString)\n",
  1024. "call json%add(p,\"BlowoutFromAnnular\",data%Equipments%UnityOutputs%BlowoutFromAnnular)\n",
  1025. "call json%add(p,\"FlowFromReturnLine\",data%Equipments%UnityOutputs%FlowFromReturnLine)\n",
  1026. "call json%add(p,\"FlowFromKelly\",data%Equipments%UnityOutputs%FlowFromKelly)\n",
  1027. "call json%add(p,\"FlowFromFillupHead\",data%Equipments%UnityOutputs%FlowFromFillupHead)\n",
  1028. "call json%add(p,\"FlowKellyDisconnect\",data%Equipments%UnityOutputs%FlowKellyDisconnect)\n",
  1029. "call json%add(p,\"FlowPipeDisconnect\",data%Equipments%UnityOutputs%FlowPipeDisconnect)\n"
  1030. ]
  1031. }
  1032. ],
  1033. "source": [
  1034. "precode = \"\"\"call json%add(p,\"\",data%Equipments%UnityOutputs%\"\"\"\n",
  1035. "input = open(\"Text1.txt\")\n",
  1036. "lines = input.readlines()\n",
  1037. "for line in lines:\n",
  1038. " name = line.split(\"::\")[-1].strip()\n",
  1039. " name = name.split(' ')[0]\n",
  1040. " icoute = precode.index(\"\\\"\")+1\n",
  1041. " # name = line.split(\"%\")[-1][:-1]\n",
  1042. " # print(name)\n",
  1043. " newline = precode[:icoute]+name+precode[icoute:]+name+\")\"\n",
  1044. " print(newline)\n"
  1045. ]
  1046. },
  1047. {
  1048. "cell_type": "code",
  1049. "execution_count": 2,
  1050. "metadata": {},
  1051. "outputs": [
  1052. {
  1053. "name": "stdout",
  1054. "output_type": "stream",
  1055. "text": [
  1056. "call BopControlPanelToJson(p)\n",
  1057. "call ChokeControlPanelToJson(p)\n",
  1058. "call ChokeManifoldToJson(p)\n",
  1059. "call DataDisplayConsoleToJson(p)\n",
  1060. "call DrillingConsoleToJson(p)\n",
  1061. "call HookToJson(p)\n",
  1062. "call StandPipeManifoldToJson(p)\n",
  1063. "call TopDrivePanelToJson(p)\n",
  1064. "call ! Drill WatchToJson(p)\n",
  1065. "call DrillingWatchToJson(p)\n",
  1066. "call TankToJson(p)\n"
  1067. ]
  1068. }
  1069. ],
  1070. "source": [
  1071. "precode = \"\"\"call \"\"\"\n",
  1072. "postcode = \"\"\"ToJson(p)\"\"\"\n",
  1073. "input = open(\"Text1.txt\")\n",
  1074. "lines = input.readlines()\n",
  1075. "for line in lines:\n",
  1076. " name = line.split(\"::\")[-1].strip()\n",
  1077. " # icoute = precode.index(\"\\\"\")+1\n",
  1078. " # name = line.split(\"::\")[-1][:-1].strip()\n",
  1079. " # print(name)\n",
  1080. " newline = precode+name+postcode\n",
  1081. " print(newline)\n"
  1082. ]
  1083. },
  1084. {
  1085. "cell_type": "code",
  1086. "execution_count": 3,
  1087. "metadata": {},
  1088. "outputs": [
  1089. {
  1090. "name": "stdout",
  1091. "output_type": "stream",
  1092. "text": [
  1093. "\tGeo/GeoMain.f90 \\\n",
  1094. "\n"
  1095. ]
  1096. }
  1097. ],
  1098. "source": [
  1099. "##Replace space with _ in filenames and list them for put them in makefile\n",
  1100. "import os\n",
  1101. "dir = 'Geo'\n",
  1102. "files = os.listdir(dir)\n",
  1103. "fstring = ''\n",
  1104. "for f in files:\n",
  1105. " if f.endswith('90'):\n",
  1106. " newf = f.replace(' ','_')\n",
  1107. " os.rename(os.path.join(dir,f),os.path.join(dir,newf))\n",
  1108. " if newf.lower().endswith('variables.f90'):\n",
  1109. " fstring = '\\t'+os.path.join(dir,newf).replace('\\\\','/') +' \\\\\\n' + fstring\n",
  1110. " else:\n",
  1111. " fstring = fstring + '\\t'+os.path.join(dir,newf).replace('\\\\','/') +' \\\\\\n'\n",
  1112. "\n",
  1113. "print(fstring)"
  1114. ]
  1115. },
  1116. {
  1117. "attachments": {},
  1118. "cell_type": "markdown",
  1119. "metadata": {},
  1120. "source": [
  1121. "## Extract variable names from definition lines"
  1122. ]
  1123. },
  1124. {
  1125. "cell_type": "code",
  1126. "execution_count": 1,
  1127. "metadata": {},
  1128. "outputs": [],
  1129. "source": [
  1130. "# %pwd\n",
  1131. "lines = input(\"Enter lines:\").split(\" \")\n",
  1132. "lines = [l.strip() for l in lines if len(l.strip())>0]\n",
  1133. "vars = []\n",
  1134. "for l in lines:\n",
  1135. " if '::' in l:\n",
  1136. " vars.append(l.split('::')[1].strip())"
  1137. ]
  1138. },
  1139. {
  1140. "cell_type": "code",
  1141. "execution_count": 8,
  1142. "metadata": {},
  1143. "outputs": [
  1144. {
  1145. "data": {
  1146. "text/plain": [
  1147. "'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'"
  1148. ]
  1149. },
  1150. "execution_count": 8,
  1151. "metadata": {},
  1152. "output_type": "execute_result"
  1153. }
  1154. ],
  1155. "source": [
  1156. "import string\n",
  1157. "string.ascii_letters"
  1158. ]
  1159. },
  1160. {
  1161. "cell_type": "code",
  1162. "execution_count": 9,
  1163. "metadata": {},
  1164. "outputs": [
  1165. {
  1166. "name": "stdout",
  1167. "output_type": "stream",
  1168. "text": [
  1169. "var: AnnularRegulatorSetControl\n",
  1170. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1171. "Char before: \n",
  1172. "Char after: \n",
  1173. "\n",
  1174. "var: AirMasterValve\n",
  1175. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1176. "Char before: \n",
  1177. "Char after: \n",
  1178. "\n",
  1179. "var: ByePassValve\n",
  1180. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1181. "Char before: \n",
  1182. "Char after: \n",
  1183. "\n",
  1184. "var: AnnularValve\n",
  1185. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1186. "Char before: \n",
  1187. "Char after: \n",
  1188. "\n",
  1189. "var: UpperRamsValve\n",
  1190. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1191. "Char before: \n",
  1192. "Char after: \n",
  1193. "\n",
  1194. "var: MiddleRamsValve\n",
  1195. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1196. "Char before: \n",
  1197. "Char after: \n",
  1198. "\n",
  1199. "var: KillLineValve\n",
  1200. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1201. "Char before: \n",
  1202. "Char after: \n",
  1203. "\n",
  1204. "var: ChokeLineValve\n",
  1205. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1206. "Char before: \n",
  1207. "Char after: \n",
  1208. "\n",
  1209. "var: LowerRamsValve\n",
  1210. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1211. "Char before: \n",
  1212. "Char after: \n",
  1213. "\n",
  1214. "var: ManifoldPressureGauge\n",
  1215. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1216. "Char before: \n",
  1217. "Char after: \n",
  1218. "\n",
  1219. "var: AirSupplyPressureGauge\n",
  1220. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1221. "Char before: \n",
  1222. "Char after: \n",
  1223. "\n",
  1224. "var: AccumulatorPressureGauge\n",
  1225. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1226. "Char before: \n",
  1227. "Char after: \n",
  1228. "\n",
  1229. "var: AnnularPressureGauge\n",
  1230. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1231. "Char before: \n",
  1232. "Char after: \n",
  1233. "\n",
  1234. "var: AnnularOpenLED\n",
  1235. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1236. "Char before: \n",
  1237. "Char after: \n",
  1238. "\n",
  1239. "var: AnnularCloseLED\n",
  1240. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1241. "Char before: \n",
  1242. "Char after: \n",
  1243. "\n",
  1244. "var: UpperRamsOpenLED\n",
  1245. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1246. "Char before: \n",
  1247. "Char after: \n",
  1248. "\n",
  1249. "var: UpperRamsCloseLED\n",
  1250. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1251. "Char before: \n",
  1252. "Char after: \n",
  1253. "\n",
  1254. "var: MiddleRamsOpenLED\n",
  1255. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1256. "Char before: \n",
  1257. "Char after: \n",
  1258. "\n",
  1259. "var: MiddleRamsCloseLED\n",
  1260. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1261. "Char before: \n",
  1262. "Char after: \n",
  1263. "\n",
  1264. "var: KillLineOpenLED\n",
  1265. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1266. "Char before: \n",
  1267. "Char after: \n",
  1268. "\n",
  1269. "var: KillLineCloseLED\n",
  1270. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1271. "Char before: \n",
  1272. "Char after: \n",
  1273. "\n",
  1274. "var: ChokeLineOpenLED\n",
  1275. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1276. "Char before: \n",
  1277. "Char after: \n",
  1278. "\n",
  1279. "var: ChokeLineCloseLED\n",
  1280. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1281. "Char before: \n",
  1282. "Char after: \n",
  1283. "\n",
  1284. "var: LowerRamsOpenLED\n",
  1285. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1286. "Char before: \n",
  1287. "Char after: \n",
  1288. "\n",
  1289. "var: LowerRamsCloseLED\n",
  1290. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1291. "Char before: \n",
  1292. "Char after: \n",
  1293. "\n",
  1294. "var: AnnularStatus\n",
  1295. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1296. "Char before: \n",
  1297. "Char after: \n",
  1298. "\n",
  1299. "var: UpperRamsStatus\n",
  1300. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1301. "Char before: \n",
  1302. "Char after: \n",
  1303. "\n",
  1304. "var: MiddleRamsStatus\n",
  1305. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1306. "Char before: \n",
  1307. "Char after: \n",
  1308. "\n",
  1309. "var: LowerRamsStatus\n",
  1310. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1311. "Char before: \n",
  1312. "Char after: \n",
  1313. "\n"
  1314. ]
  1315. }
  1316. ],
  1317. "source": [
  1318. "import os\n",
  1319. "import sys\n",
  1320. "import re\n",
  1321. "dir = '.'\n",
  1322. "varNameChars = string.ascii_letters + '_'\n",
  1323. "log = open(os.path.join(dir,'ReplaceVars.log',),'a')\n",
  1324. "end=False\n",
  1325. "for dir,subdirs,files in os.walk(dir):\n",
  1326. " for filename in files:\n",
  1327. " if filename.lower().endswith('.f90'):\n",
  1328. " # print(filename)\n",
  1329. " file = open(os.path.join(dir,filename))\n",
  1330. " code = file.read()\n",
  1331. " for var in vars:\n",
  1332. " if var not in code:\n",
  1333. " continue\n",
  1334. " occurs = [m.start() for m in re.finditer(var, code)]\n",
  1335. " for occurance in occurs:\n",
  1336. " if code[occurs[0]-1] in varNameChars or code[occurs[0]+len(var)] in varNameChars:\n",
  1337. " continue\n",
  1338. " print(f\"var: {var}\")\n",
  1339. " print(f\"file = {os.path.join(dir,filename)}\")\n",
  1340. " print(f\"Char before: {code[occurs[0]-1]}\")\n",
  1341. " print(f\"Char after: {code[occurs[0]+len(var)]}\")\n",
  1342. " end = True\n",
  1343. " if end:\n",
  1344. " break"
  1345. ]
  1346. },
  1347. {
  1348. "cell_type": "code",
  1349. "execution_count": 9,
  1350. "metadata": {},
  1351. "outputs": [
  1352. {
  1353. "name": "stdout",
  1354. "output_type": "stream",
  1355. "text": [
  1356. "State\n",
  1357. "Hoisting\n",
  1358. "OperationScenario\n",
  1359. "notifications\n",
  1360. "permissions\n",
  1361. "unitySignals\n",
  1362. "StudentStation\n",
  1363. "BopStackInput\n",
  1364. "BopStackAcc\n",
  1365. "RamLine\n",
  1366. "AnnularComputational\n",
  1367. "Annular\n",
  1368. "PipeRam1\n",
  1369. "ShearRam\n",
  1370. "PipeRam2\n",
  1371. "ChokeLine\n",
  1372. "KillLine\n",
  1373. "Pumps\n",
  1374. "RAM\n",
  1375. "RAMS\n",
  1376. "Choke\n",
  1377. "AirDrivenPump\n",
  1378. "AirPumpLine\n",
  1379. "CHOOKE\n",
  1380. "Drawworks\n",
  1381. "MudSystem\n",
  1382. "MUD\n",
  1383. "PUMP\n",
  1384. "RTable\n",
  1385. "TDS\n",
  1386. "GasType(3)\n",
  1387. "PressureDisplay\n",
  1388. "ObservationPoint(:)\n",
  1389. "FricPressDrop\n",
  1390. "ROP_Spec\n",
  1391. "ROP_Bit\n",
  1392. "TDGeo\n",
  1393. "F_String(:)\n",
  1394. "F_Counts\n",
  1395. "F_Interval(:)\n",
  1396. "OD_Annulus(4)\n",
  1397. "TD_DrillStem\n",
  1398. "TD_DrillStems\n",
  1399. "TD_String\n",
  1400. "TD_Count\n",
  1401. "G_StringElement\n",
  1402. "TD_Vol\n",
  1403. "TD_General\n",
  1404. "TD_BOP\n",
  1405. "TD_BOPElement(4)\n",
  1406. "TD_StConn\n",
  1407. "TD_Load\n",
  1408. "TD_WellEl\n",
  1409. "TD_Casing\n",
  1410. "data%State%TD_Liner\n",
  1411. "TD_OpenHole\n",
  1412. "TD_ROPHole\n",
  1413. "TD_WellGeneral\n",
  1414. "TD_WellGeo(:)\n",
  1415. "EquipmentControl\n",
  1416. "BopControlPanel\n",
  1417. "ChokeControlPanel\n",
  1418. "ChokeManifold\n",
  1419. "DataDisplayConsole\n",
  1420. "DrillingConsole\n",
  1421. "Hook\n",
  1422. "StandPipeManifold\n",
  1423. "TopDrivePanel\n",
  1424. "DrillingWatch\n",
  1425. "Tank\n",
  1426. "Configuration\n",
  1427. "StringConfiguration\n",
  1428. "Formation\n",
  1429. "Reservoir\n",
  1430. "Shoe\n",
  1431. "Accumulator\n",
  1432. "BopStackSpecification\n",
  1433. "Hoisting\n",
  1434. "Power\n",
  1435. "PumpsSpecification\n",
  1436. "RigSize\n",
  1437. "CasingLinerChoke\n",
  1438. "PathGeneration\n",
  1439. "WellSurveyData\n",
  1440. "MudProperties\n",
  1441. "problems\n",
  1442. "BitProblems\n",
  1443. "BopProblems\n",
  1444. "ChokeProblems\n",
  1445. "DrillStemProblems\n",
  1446. "GaugesProblems\n",
  1447. "HoistingProblems\n",
  1448. "KickProblems\n",
  1449. "LostProblems\n",
  1450. "MudTreatmentProblems\n",
  1451. "OtherProblems\n",
  1452. "PumpProblems\n",
  1453. "RotaryProblems\n"
  1454. ]
  1455. },
  1456. {
  1457. "ename": "IndexError",
  1458. "evalue": "list index out of range",
  1459. "output_type": "error",
  1460. "traceback": [
  1461. "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
  1462. "\u001b[1;31mIndexError\u001b[0m Traceback (most recent call last)",
  1463. "\u001b[1;32mc:\\Projects\\VSIM\\SimulationCore2\\helper.ipynb Cell 6\u001b[0m in \u001b[0;36m<cell line: 3>\u001b[1;34m()\u001b[0m\n\u001b[0;32m <a href='vscode-notebook-cell:/c%3A/Projects/VSIM/SimulationCore2/helper.ipynb#W5sZmlsZQ%3D%3D?line=5'>6</a>\u001b[0m nsp\u001b[39m+\u001b[39m\u001b[39m=\u001b[39m\u001b[39m1\u001b[39m\n\u001b[0;32m <a href='vscode-notebook-cell:/c%3A/Projects/VSIM/SimulationCore2/helper.ipynb#W5sZmlsZQ%3D%3D?line=6'>7</a>\u001b[0m splits \u001b[39m=\u001b[39m line\u001b[39m.\u001b[39msplit(\u001b[39m\"\u001b[39m\u001b[39m::\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[1;32m----> <a href='vscode-notebook-cell:/c%3A/Projects/VSIM/SimulationCore2/helper.ipynb#W5sZmlsZQ%3D%3D?line=7'>8</a>\u001b[0m \u001b[39mprint\u001b[39m(splits[\u001b[39m1\u001b[39;49m]\u001b[39m.\u001b[39mstrip())\n",
  1464. "\u001b[1;31mIndexError\u001b[0m: list index out of range"
  1465. ]
  1466. }
  1467. ],
  1468. "source": [
  1469. "f = open(\"hier.txt\")\n",
  1470. "lines = f.readlines()\n",
  1471. "for line in lines[1:]:\n",
  1472. " nsp=0\n",
  1473. " while line[nsp]==' ':\n",
  1474. " nsp+=1\n",
  1475. " splits = line.split(\"::\")\n",
  1476. " print(splits[1].strip())"
  1477. ]
  1478. },
  1479. {
  1480. "cell_type": "code",
  1481. "execution_count": 4,
  1482. "metadata": {},
  1483. "outputs": [
  1484. {
  1485. "data": {
  1486. "text/plain": [
  1487. "'type SimulationDataType type(SimulationStateType)::State Type(HoistingType)::Hoisting type(OperationScenarioType)::OperationScenario type(NotificationType)::notifications type(PermissionsType):: permissions type(UnitySignalsType):: unitySignals type(StudentStationType)::StudentStation type(BopStackInputType)::BopStackInput type(BopStackAccType)::BopStackAcc type(RamLineType)::RamLine type(AnnularComputationalType)::AnnularComputational type(AnnularType)::Annular type(PipeRams1Type)::PipeRam1 type(ShearRamType)::ShearRam type(PipeRam2Type)::PipeRam2 type(ChokeLineType)::ChokeLine type(KillLineType)::KillLine type(PumpsType)::Pumps TYPE(BOP_TypeVars), DIMENSION(1:6) :: RAM TYPE(BOP_TypeVars2D) :: RAMS type(ChokeType)::Choke type(AirDrivenPumpType)::AirDrivenPump type(AirPumpLineType)::AirPumpLine TYPE(CHOKE_TypeVars), DIMENSION(1:2) :: CHOOKE TYPE(Drawworks_Var) :: Drawworks type(MudSystemType)::MudSystem TYPE(MUD_TypeVars), DIMENSION(1:10) :: MUD TYPE(Pump_Var), DIMENSION(1:3) :: PUMP TYPE(RTable_Var) :: RTable TYPE(TDS_Var) :: TDS TYPE(GasData) :: GasType(3) ! 1 = methane , 2 = Hydrogen sulfide , 3 = Carbon dioxid TYPE(PressureDisplayVARIABLESTYPE) :: PressureDisplay TYPE(ObservationAndGaugePointsInformations) , ALLOCATABLE :: ObservationPoint(:) TYPE(FricPressDropVarsTYPE) :: FricPressDrop TYPE(ROPSpecificationInfo) :: ROP_Spec TYPE(ROPInfo) :: ROP_Bit TYPE(Geo_Data) :: TDGeo TYPE(F_StringData) , Allocatable :: F_String(:) TYPE(F_IntervalsCountsData):: F_Counts TYPE(F_IntervalData) , Allocatable :: F_Interval(:) TYPE(OD_AnnulusData) :: OD_Annulus(4) TYPE(TD_DrillStemInfo), ALLOCATABLE, DIMENSION(:) :: TD_DrillStem TYPE(TD_SeparatedDrillStemInfo), ALLOCATABLE, DIMENSION(:) :: TD_DrillStems TYPE(TD_StringInfo) :: TD_String TYPE(TD_AddRemoveInfo) :: TD_Count TYPE(CStringComponents), ALLOCATABLE, DIMENSION(:) :: G_StringElement TYPE(TD_RemovedVolumeInfo) :: TD_Vol TYPE(TD_GeneralInfo) :: TD_General TYPE(TD_BOPInfo) :: TD_BOP TYPE(CBopElement) :: TD_BOPElement(4) TYPE(TD_StringconnectionInfo) :: TD_StConn TYPE(TD_LoadInfo) :: TD_Load TYPE(TD_WellElementsInfo) :: TD_WellEl TYPE(TD_CasingInfo), ALLOCATABLE, DIMENSION(:) :: TD_Casing TYPE(TD_LinerInfo), ALLOCATABLE, DIMENSION(:) :: data%State%TD_Liner TYPE(TD_OpenHoleInfo), ALLOCATABLE, DIMENSION(:) :: TD_OpenHole TYPE(TD_ROPHoleInfo), ALLOCATABLE, DIMENSION(:) :: TD_ROPHole TYPE(TD_WellGeneralInfo) :: TD_WellGeneral TYPE(TD_WellGeometryData), Allocatable :: TD_WellGeo(:) type(EquipmentControlType)::EquipmentControl type(BopControlPanelType) :: BopControlPanel Type(ChokeControlPanelType)::ChokeControlPanel Type(ChokeManifoldType)::ChokeManifold Type(DataDisplayConsoleType) :: DataDisplayConsole TYPE(DrillingConsoleType) :: DrillingConsole Type(HookType)::Hook type(StandPipeManifoldType)::StandPipeManifold Type(TopDrivePanelType)::TopDrivePanel Type(DrillingWatchType)::DrillingWatch Type(TankType)::Tank type(ConfigurationType)::Configuration Type(StringConfigurationType)::StringConfiguration Type(FormationType) :: Formation Type(ReservoirType)::Reservoir Type(ShoeType)::Shoe Type(AccumulatorType)::Accumulator Type(BopStackSpecificationType)::BopStackSpecification Type(HoistingType)::Hoisting Type(PowerType)::Power Type(PumpSpecificationType)::PumpsSpecification Type(RigSizeType)::RigSize Type(CasingLinerChokeType)::CasingLinerChoke Type(PathGenerationType)::PathGeneration Type(WellSurveyDataType)::WellSurveyData Type(MudPropertiesType)::MudProperties type(ProblemsType)::problems type(BitProblemsType)::BitProblems type(BopProblemsType)::BopProblems type(ChokeProblemsType)::ChokeProblems type(DrillStemProblemsType)::DrillStemProblems type(GaugesProblemsType)::GaugesProblems type(HoistingProblemsType):: HoistingProblems type(KickProblemsType)::KickProblems type(LostProblemsType)::LostProblems type(MudTreatmentProblemsType)::MudTreatmentProblems type(OtherProblemsType)::OtherProblems type(PumpProblemsType)::PumpProblems type(RotaryProblemsType)::RotaryProblems end type SimulationDataType'"
  1488. ]
  1489. },
  1490. "execution_count": 4,
  1491. "metadata": {},
  1492. "output_type": "execute_result"
  1493. }
  1494. ],
  1495. "source": [
  1496. "line"
  1497. ]
  1498. },
  1499. {
  1500. "cell_type": "code",
  1501. "execution_count": null,
  1502. "metadata": {},
  1503. "outputs": [],
  1504. "source": [
  1505. "for fn in modules:\n",
  1506. " f = open(fn)\n",
  1507. " lines = f.readlines()\n",
  1508. " module_filenames = {}\n",
  1509. " used_modules = []\n",
  1510. " mod_count = 0\n",
  1511. " for l in lines:\n",
  1512. " l = l.strip().lower()\n",
  1513. " if l.startswith('module ') and not l.startswith('module procedure '):\n",
  1514. " mod_name = l.split(' ')[1]\n",
  1515. " module_filenames[mod_name] = fn\n",
  1516. " mod_count +=1\n",
  1517. " if l.startswith('use'):\n",
  1518. " used_modules.append(l.split(' ')[1])\n",
  1519. " if mod_count !=1:\n",
  1520. " print(f\"{fn} has {mod_count} modules\")\n",
  1521. " module_filenames,used_modules"
  1522. ]
  1523. },
  1524. {
  1525. "cell_type": "markdown",
  1526. "metadata": {},
  1527. "source": [
  1528. "# Redis"
  1529. ]
  1530. },
  1531. {
  1532. "cell_type": "code",
  1533. "execution_count": 2,
  1534. "metadata": {},
  1535. "outputs": [
  1536. {
  1537. "ename": "KeyboardInterrupt",
  1538. "evalue": "",
  1539. "output_type": "error",
  1540. "traceback": [
  1541. "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
  1542. "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
  1543. "Cell \u001b[0;32mIn[2], line 17\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[1;32m 16\u001b[0m r\u001b[38;5;241m.\u001b[39mpublish(channelName, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtest\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m---> 17\u001b[0m \u001b[43mtime\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msleep\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 18\u001b[0m \u001b[38;5;66;03m# r.publish(channelName, \"Hello from Server 2!\") \u001b[39;00m\n\u001b[1;32m 19\u001b[0m \u001b[38;5;66;03m# r.publish(channelName, \"Hello from Server 3!\") \u001b[39;00m\n\u001b[1;32m 20\u001b[0m \u001b[38;5;66;03m# r.publish(channelName, \"Hello from Server 4!\")\u001b[39;00m\n",
  1544. "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
  1545. ]
  1546. }
  1547. ],
  1548. "source": [
  1549. "import redis \n",
  1550. "import time \n",
  1551. " \n",
  1552. "# Define the connection parameters \n",
  1553. "redis_host = \"127.0.0.1\"\n",
  1554. "redis_port = 6379 \n",
  1555. "redis_password = \"1qazxsw2$$\" \n",
  1556. "channelName = \"f7e58e26-f9c0-44e7-8954-08dc093dd85d.ch\" \n",
  1557. "streamKey = \"sampleStream\" \n",
  1558. " \n",
  1559. "# Connect to the Redis server \n",
  1560. "r = redis.Redis(host=redis_host, port=redis_port, password=redis_password) \n",
  1561. " \n",
  1562. "# Publish messages to the channel\n",
  1563. "while True:\n",
  1564. " r.publish(channelName, \"test\")\n",
  1565. " time.sleep(1)\n",
  1566. "# r.publish(channelName, \"Hello from Server 2!\") \n",
  1567. "# r.publish(channelName, \"Hello from Server 3!\") \n",
  1568. "# r.publish(channelName, \"Hello from Server 4!\")"
  1569. ]
  1570. },
  1571. {
  1572. "cell_type": "code",
  1573. "execution_count": 2,
  1574. "metadata": {},
  1575. "outputs": [
  1576. {
  1577. "name": "stdout",
  1578. "output_type": "stream",
  1579. "text": [
  1580. "Received: 1\n",
  1581. "Received: b'Hello from FORTRAN!'\n",
  1582. "Received: b'Hello from FORTRAN!'\n",
  1583. "Received: b'Hello from FORTRAN!'\n",
  1584. "Received: b'Hello from FORTRAN!'\n",
  1585. "Received: b'Hello from FORTRAN!'\n",
  1586. "Received: b'Hello from FORTRAN!'\n",
  1587. "Received: b'Hello from FORTRAN!'\n",
  1588. "Received: b'Hello from FORTRAN!'\n",
  1589. "Received: b'Hello from FORTRAN!'\n",
  1590. "Received: b'Hello from FORTRAN!'\n",
  1591. "Received: b'Hello from FORTRAN!'\n",
  1592. "Received: b'Hello from FORTRAN!'\n",
  1593. "Received: b'Hello from FORTRAN!'\n",
  1594. "Received: b'Hello from FORTRAN!'\n",
  1595. "Received: b'Hello from FORTRAN!'\n",
  1596. "Received: b'Hello from FORTRAN!'\n",
  1597. "Received: b'Hello from FORTRAN!'\n",
  1598. "Received: b'Hello from FORTRAN!'\n",
  1599. "Received: b'Hello from FORTRAN!'\n",
  1600. "Received: b'Hello from FORTRAN!'\n",
  1601. "Received: b'Hello from FORTRAN!'\n",
  1602. "Received: b'Hello from FORTRAN!'\n",
  1603. "Received: b'Hello from FORTRAN!'\n",
  1604. "Received: b'Hello from FORTRAN!'\n",
  1605. "Received: b'Hello from FORTRAN!'\n",
  1606. "Received: b'Hello from FORTRAN!'\n",
  1607. "Received: b'Hello from FORTRAN!'\n",
  1608. "Received: b'Hello from FORTRAN!'\n",
  1609. "Received: b'Hello from FORTRAN!'\n",
  1610. "Received: b'Hello from FORTRAN!'\n",
  1611. "Received: b'Hello from FORTRAN!'\n",
  1612. "Received: b'Hello from FORTRAN!'\n"
  1613. ]
  1614. },
  1615. {
  1616. "ename": "KeyboardInterrupt",
  1617. "evalue": "",
  1618. "output_type": "error",
  1619. "traceback": [
  1620. "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
  1621. "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
  1622. "Cell \u001b[0;32mIn[2], line 13\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[38;5;66;03m# Listen for messages\u001b[39;00m\n\u001b[1;32m 12\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[0;32m---> 13\u001b[0m message \u001b[38;5;241m=\u001b[39m \u001b[43mp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_message\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 14\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m message:\n\u001b[1;32m 15\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mReceived: \u001b[39m\u001b[38;5;124m'\u001b[39m, message[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mdata\u001b[39m\u001b[38;5;124m'\u001b[39m])\n",
  1623. "File \u001b[0;32m~/.local/lib/python3.8/site-packages/redis/client.py:1013\u001b[0m, in \u001b[0;36mPubSub.get_message\u001b[0;34m(self, ignore_subscribe_messages, timeout)\u001b[0m\n\u001b[1;32m 1008\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1009\u001b[0m \u001b[38;5;66;03m# The connection isn't subscribed to any channels or patterns,\u001b[39;00m\n\u001b[1;32m 1010\u001b[0m \u001b[38;5;66;03m# so no messages are available\u001b[39;00m\n\u001b[1;32m 1011\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m-> 1013\u001b[0m response \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mparse_response\u001b[49m\u001b[43m(\u001b[49m\u001b[43mblock\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mtimeout\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mis\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtimeout\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtimeout\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1014\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m response:\n\u001b[1;32m 1015\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandle_message(response, ignore_subscribe_messages)\n",
  1624. "File \u001b[0;32m~/.local/lib/python3.8/site-packages/redis/client.py:824\u001b[0m, in \u001b[0;36mPubSub.parse_response\u001b[0;34m(self, block, timeout)\u001b[0m\n\u001b[1;32m 821\u001b[0m conn\u001b[38;5;241m.\u001b[39mconnect()\n\u001b[1;32m 822\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m conn\u001b[38;5;241m.\u001b[39mread_response(disconnect_on_error\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m, push_request\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[0;32m--> 824\u001b[0m response \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_execute\u001b[49m\u001b[43m(\u001b[49m\u001b[43mconn\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtry_read\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 826\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mis_health_check_response(response):\n\u001b[1;32m 827\u001b[0m \u001b[38;5;66;03m# ignore the health check message as user might not expect it\u001b[39;00m\n\u001b[1;32m 828\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhealth_check_response_counter \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n",
  1625. "File \u001b[0;32m~/.local/lib/python3.8/site-packages/redis/client.py:800\u001b[0m, in \u001b[0;36mPubSub._execute\u001b[0;34m(self, conn, command, *args, **kwargs)\u001b[0m\n\u001b[1;32m 792\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_execute\u001b[39m(\u001b[38;5;28mself\u001b[39m, conn, command, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[1;32m 793\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 794\u001b[0m \u001b[38;5;124;03m Connect manually upon disconnection. If the Redis server is down,\u001b[39;00m\n\u001b[1;32m 795\u001b[0m \u001b[38;5;124;03m this will fail and raise a ConnectionError as desired.\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 798\u001b[0m \u001b[38;5;124;03m patterns we were previously listening to\u001b[39;00m\n\u001b[1;32m 799\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 800\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mconn\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretry\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcall_with_retry\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 801\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43;01mlambda\u001b[39;49;00m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mcommand\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 802\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43;01mlambda\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43merror\u001b[49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_disconnect_raise_connect\u001b[49m\u001b[43m(\u001b[49m\u001b[43mconn\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43merror\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 803\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n",
  1626. "File \u001b[0;32m~/.local/lib/python3.8/site-packages/redis/retry.py:46\u001b[0m, in \u001b[0;36mRetry.call_with_retry\u001b[0;34m(self, do, fail)\u001b[0m\n\u001b[1;32m 44\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[1;32m 45\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m---> 46\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mdo\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 47\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_supported_errors \u001b[38;5;28;01mas\u001b[39;00m error:\n\u001b[1;32m 48\u001b[0m failures \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n",
  1627. "File \u001b[0;32m~/.local/lib/python3.8/site-packages/redis/client.py:801\u001b[0m, in \u001b[0;36mPubSub._execute.<locals>.<lambda>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 792\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_execute\u001b[39m(\u001b[38;5;28mself\u001b[39m, conn, command, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[1;32m 793\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 794\u001b[0m \u001b[38;5;124;03m Connect manually upon disconnection. If the Redis server is down,\u001b[39;00m\n\u001b[1;32m 795\u001b[0m \u001b[38;5;124;03m this will fail and raise a ConnectionError as desired.\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 798\u001b[0m \u001b[38;5;124;03m patterns we were previously listening to\u001b[39;00m\n\u001b[1;32m 799\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m 800\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m conn\u001b[38;5;241m.\u001b[39mretry\u001b[38;5;241m.\u001b[39mcall_with_retry(\n\u001b[0;32m--> 801\u001b[0m \u001b[38;5;28;01mlambda\u001b[39;00m: \u001b[43mcommand\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m,\n\u001b[1;32m 802\u001b[0m \u001b[38;5;28;01mlambda\u001b[39;00m error: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_disconnect_raise_connect(conn, error),\n\u001b[1;32m 803\u001b[0m )\n",
  1628. "File \u001b[0;32m~/.local/lib/python3.8/site-packages/redis/client.py:818\u001b[0m, in \u001b[0;36mPubSub.parse_response.<locals>.try_read\u001b[0;34m()\u001b[0m\n\u001b[1;32m 816\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mtry_read\u001b[39m():\n\u001b[1;32m 817\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m block:\n\u001b[0;32m--> 818\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[43mconn\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcan_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mtimeout\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtimeout\u001b[49m\u001b[43m)\u001b[49m:\n\u001b[1;32m 819\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 820\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n",
  1629. "File \u001b[0;32m~/.local/lib/python3.8/site-packages/redis/connection.py:478\u001b[0m, in \u001b[0;36mAbstractConnection.can_read\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 475\u001b[0m host_error \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_host_error()\n\u001b[1;32m 477\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 478\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_parser\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcan_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mtimeout\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 479\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mOSError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 480\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdisconnect()\n",
  1630. "File \u001b[0;32m~/.local/lib/python3.8/site-packages/redis/_parsers/base.py:128\u001b[0m, in \u001b[0;36m_RESPBase.can_read\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 127\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcan_read\u001b[39m(\u001b[38;5;28mself\u001b[39m, timeout):\n\u001b[0;32m--> 128\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_buffer \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_buffer\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcan_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mtimeout\u001b[49m\u001b[43m)\u001b[49m\n",
  1631. "File \u001b[0;32m~/.local/lib/python3.8/site-packages/redis/_parsers/socket.py:95\u001b[0m, in \u001b[0;36mSocketBuffer.can_read\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 94\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcan_read\u001b[39m(\u001b[38;5;28mself\u001b[39m, timeout: \u001b[38;5;28mfloat\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28mbool\u001b[39m:\n\u001b[0;32m---> 95\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mbool\u001b[39m(\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43munread_bytes\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m) \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_read_from_socket(\n\u001b[1;32m 96\u001b[0m timeout\u001b[38;5;241m=\u001b[39mtimeout, raise_on_timeout\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m\n\u001b[1;32m 97\u001b[0m )\n",
  1632. "File \u001b[0;32m~/.local/lib/python3.8/site-packages/redis/_parsers/socket.py:42\u001b[0m, in \u001b[0;36mSocketBuffer.unread_bytes\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 38\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21munread_bytes\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28mint\u001b[39m:\n\u001b[1;32m 39\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 40\u001b[0m \u001b[38;5;124;03m Remaining unread length of buffer\u001b[39;00m\n\u001b[1;32m 41\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m---> 42\u001b[0m pos \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_buffer\u001b[49m\u001b[38;5;241m.\u001b[39mtell()\n\u001b[1;32m 43\u001b[0m end \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_buffer\u001b[38;5;241m.\u001b[39mseek(\u001b[38;5;241m0\u001b[39m, SEEK_END)\n\u001b[1;32m 44\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_buffer\u001b[38;5;241m.\u001b[39mseek(pos)\n",
  1633. "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
  1634. ]
  1635. }
  1636. ],
  1637. "source": [
  1638. "import redis\n",
  1639. "\n",
  1640. "r = redis.Redis(host='localhost', port=6379,password='1qazxsw2$$')\n",
  1641. "\n",
  1642. "# Create a pubsub instance\n",
  1643. "p = r.pubsub()\n",
  1644. "\n",
  1645. "# Subscribe to a channel\n",
  1646. "p.subscribe('37364875-c9cf-43a3-de45-08dc0c6103c9.ch_out')\n",
  1647. "\n",
  1648. "# Listen for messages\n",
  1649. "while True:\n",
  1650. " message = p.get_message()\n",
  1651. " if message:\n",
  1652. " print('Received: ', message['data'])"
  1653. ]
  1654. }
  1655. ],
  1656. "metadata": {
  1657. "kernelspec": {
  1658. "display_name": "base",
  1659. "language": "python",
  1660. "name": "python3"
  1661. },
  1662. "language_info": {
  1663. "codemirror_mode": {
  1664. "name": "ipython",
  1665. "version": 3
  1666. },
  1667. "file_extension": ".py",
  1668. "mimetype": "text/x-python",
  1669. "name": "python",
  1670. "nbconvert_exporter": "python",
  1671. "pygments_lexer": "ipython3",
  1672. "version": "3.8.10"
  1673. },
  1674. "orig_nbformat": 4,
  1675. "vscode": {
  1676. "interpreter": {
  1677. "hash": "1ef4a26de7183d96d6da1045a38581e0a15b2215d0c1b98c7b273c6e514c6c7e"
  1678. }
  1679. }
  1680. },
  1681. "nbformat": 4,
  1682. "nbformat_minor": 2
  1683. }