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

helper.ipynb 78 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484
  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": 70,
  388. "metadata": {},
  389. "outputs": [
  390. {
  391. "ename": "ValueError",
  392. "evalue": "cannot prepare() more than once",
  393. "output_type": "error",
  394. "traceback": [
  395. "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
  396. "\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)",
  397. "\u001b[1;32mc:\\Projects\\VSIM\\SimulationCore2\\helper.ipynb Cell 3\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> <a href='vscode-notebook-cell:/c%3A/Projects/VSIM/SimulationCore2/helper.ipynb#X20sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m files \u001b[39m=\u001b[39m \u001b[39mtuple\u001b[39;49m(ts\u001b[39m.\u001b[39;49mstatic_order())\n\u001b[0;32m <a href='vscode-notebook-cell:/c%3A/Projects/VSIM/SimulationCore2/helper.ipynb#X20sZmlsZQ%3D%3D?line=1'>2</a>\u001b[0m \u001b[39mfor\u001b[39;00m file \u001b[39min\u001b[39;00m files:\n\u001b[0;32m <a href='vscode-notebook-cell:/c%3A/Projects/VSIM/SimulationCore2/helper.ipynb#X20sZmlsZQ%3D%3D?line=2'>3</a>\u001b[0m \u001b[39mprint\u001b[39m(file\u001b[39m.\u001b[39mreplace(\u001b[39m\"\u001b[39m\u001b[39m\\\\\u001b[39;00m\u001b[39m\"\u001b[39m,\u001b[39m\"\u001b[39m\u001b[39m/\u001b[39m\u001b[39m\"\u001b[39m)\u001b[39m+\u001b[39m\u001b[39m\"\u001b[39m\u001b[39m /\u001b[39m\u001b[39m\"\u001b[39m)\n",
  398. "File \u001b[1;32mc:\\Users\\Mahmood\\Anaconda3\\lib\\graphlib.py:242\u001b[0m, in \u001b[0;36mTopologicalSorter.static_order\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 233\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mstatic_order\u001b[39m(\u001b[39mself\u001b[39m):\n\u001b[0;32m 234\u001b[0m \u001b[39m\"\"\"Returns an iterable of nodes in a topological order.\u001b[39;00m\n\u001b[0;32m 235\u001b[0m \n\u001b[0;32m 236\u001b[0m \u001b[39m The particular order that is returned may depend on the specific\u001b[39;00m\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 240\u001b[0m \u001b[39m cycle is detected, :exc:`CycleError` will be raised.\u001b[39;00m\n\u001b[0;32m 241\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n\u001b[1;32m--> 242\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mprepare()\n\u001b[0;32m 243\u001b[0m \u001b[39mwhile\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mis_active():\n\u001b[0;32m 244\u001b[0m node_group \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mget_ready()\n",
  399. "File \u001b[1;32mc:\\Users\\Mahmood\\Anaconda3\\lib\\graphlib.py:93\u001b[0m, in \u001b[0;36mTopologicalSorter.prepare\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 85\u001b[0m \u001b[39m\"\"\"Mark the graph as finished and check for cycles in the graph.\u001b[39;00m\n\u001b[0;32m 86\u001b[0m \n\u001b[0;32m 87\u001b[0m \u001b[39mIf any cycle is detected, \"CycleError\" will be raised, but \"get_ready\" can\u001b[39;00m\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 90\u001b[0m \u001b[39mtherefore no more nodes can be added using \"add\".\u001b[39;00m\n\u001b[0;32m 91\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[0;32m 92\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_ready_nodes \u001b[39mis\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n\u001b[1;32m---> 93\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mValueError\u001b[39;00m(\u001b[39m\"\u001b[39m\u001b[39mcannot prepare() more than once\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[0;32m 95\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_ready_nodes \u001b[39m=\u001b[39m [\n\u001b[0;32m 96\u001b[0m i\u001b[39m.\u001b[39mnode \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_node2info\u001b[39m.\u001b[39mvalues() \u001b[39mif\u001b[39;00m i\u001b[39m.\u001b[39mnpredecessors \u001b[39m==\u001b[39m \u001b[39m0\u001b[39m\n\u001b[0;32m 97\u001b[0m ]\n\u001b[0;32m 98\u001b[0m \u001b[39m# ready_nodes is set before we look for cycles on purpose:\u001b[39;00m\n\u001b[0;32m 99\u001b[0m \u001b[39m# if the user wants to catch the CycleError, that's fine,\u001b[39;00m\n\u001b[0;32m 100\u001b[0m \u001b[39m# they can continue using the instance to grab as many\u001b[39;00m\n\u001b[0;32m 101\u001b[0m \u001b[39m# nodes as possible before cycles block more progress\u001b[39;00m\n",
  400. "\u001b[1;31mValueError\u001b[0m: cannot prepare() more than once"
  401. ]
  402. }
  403. ],
  404. "source": [
  405. "files = tuple(ts.static_order())\n"
  406. ]
  407. },
  408. {
  409. "cell_type": "code",
  410. "execution_count": 54,
  411. "metadata": {},
  412. "outputs": [
  413. {
  414. "data": {
  415. "text/plain": [
  416. "['FluidFlow\\\\Well_Pressure_Data_Transfer.f90',\n",
  417. " 'FluidFlow\\\\Well_Pressure_Data_Transfer.f90',\n",
  418. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  419. " 'CSharp\\\\BasicInputs\\\\MudProperties.f90',\n",
  420. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsole.f90',\n",
  421. " 'CSharp\\\\ErrorLog\\\\CLog1.f90',\n",
  422. " 'CSharp\\\\ErrorLog\\\\CError.f90',\n",
  423. " 'CSharp\\\\Warnings\\\\CWarnings.f90',\n",
  424. " 'CSharp\\\\OperationScenarios\\\\Unity\\\\CUnityOutputs.f90',\n",
  425. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumps.f90',\n",
  426. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CArrangement.f90',\n",
  427. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CStack.f90',\n",
  428. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CManifolds.f90',\n",
  429. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  430. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  431. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  432. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  433. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  434. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  435. " 'Rop\\\\sROP_Variables.f90',\n",
  436. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  437. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  438. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  439. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  440. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  441. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  442. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  443. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  444. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  445. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  446. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  447. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  448. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  449. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  450. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  451. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  452. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  453. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  454. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  455. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  456. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  457. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  458. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  459. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  460. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  461. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  462. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  463. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  464. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  465. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  466. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  467. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  468. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  469. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  470. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  471. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  472. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  473. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  474. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  475. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  476. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  477. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  478. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  479. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  480. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  481. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  482. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  483. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  484. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  485. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  486. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  487. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  488. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  489. " 'Simulation\\\\Constants.f90',\n",
  490. " 'Simulation\\\\SimulationVariables.f90',\n",
  491. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  492. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  493. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  494. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  495. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  496. " 'Equipments\\\\MudSystem\\\\MudSystem.f90',\n",
  497. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n",
  498. " 'FluidFlow\\\\kick\\\\Gas_Kick_Calculator.f90',\n",
  499. " 'FluidFlow\\\\Well_Pressure_Data_Transfer.f90',\n",
  500. " 'CSharp\\\\ErrorLog\\\\CError.f90',\n",
  501. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  502. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  503. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  504. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  505. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  506. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  507. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  508. " 'Rop\\\\sROP_Variables.f90',\n",
  509. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  510. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  511. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  512. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  513. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  514. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  515. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  516. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  517. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  518. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  519. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  520. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  521. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  522. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  523. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  524. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  525. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  526. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  527. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  528. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  529. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  530. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  531. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  532. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  533. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  534. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  535. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  536. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  537. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  538. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  539. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  540. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  541. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  542. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  543. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  544. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  545. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  546. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  547. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  548. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  549. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  550. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  551. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  552. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  553. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  554. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  555. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  556. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  557. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  558. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  559. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  560. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  561. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  562. " 'Simulation\\\\Constants.f90',\n",
  563. " 'Simulation\\\\SimulationVariables.f90',\n",
  564. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  565. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  566. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  567. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  568. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  569. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n",
  570. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  571. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  572. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  573. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  574. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  575. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  576. " 'Rop\\\\sROP_Variables.f90',\n",
  577. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  578. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n",
  579. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  580. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  581. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  582. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  583. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  584. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  585. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  586. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  587. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  588. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  589. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  590. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  591. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  592. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  593. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  594. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  595. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  596. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  597. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  598. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  599. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  600. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  601. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  602. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  603. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  604. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  605. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  606. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  607. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  608. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  609. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  610. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  611. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  612. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  613. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  614. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  615. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  616. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  617. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  618. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  619. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  620. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  621. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  622. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  623. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  624. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  625. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  626. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  627. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  628. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  629. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  630. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  631. " 'Simulation\\\\Constants.f90',\n",
  632. " 'Simulation\\\\SimulationVariables.f90',\n",
  633. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  634. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  635. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  636. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  637. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  638. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  639. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  640. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  641. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  642. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  643. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  644. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  645. " 'Rop\\\\sROP_Variables.f90',\n",
  646. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  647. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n",
  648. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  649. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  650. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  651. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  652. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  653. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  654. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  655. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  656. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  657. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  658. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  659. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  660. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  661. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  662. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  663. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  664. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  665. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  666. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  667. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  668. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  669. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  670. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  671. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  672. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  673. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  674. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  675. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  676. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  677. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  678. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  679. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  680. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  681. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  682. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  683. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  684. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  685. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  686. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  687. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  688. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  689. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  690. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  691. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  692. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  693. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  694. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  695. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  696. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  697. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  698. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  699. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  700. " 'Simulation\\\\Constants.f90',\n",
  701. " 'Simulation\\\\SimulationVariables.f90',\n",
  702. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  703. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  704. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  705. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  706. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  707. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  708. " 'CSharp\\\\ErrorLog\\\\CError.f90',\n",
  709. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  710. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  711. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  712. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  713. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  714. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  715. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  716. " 'Rop\\\\sROP_Variables.f90',\n",
  717. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  718. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  719. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  720. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  721. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  722. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  723. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  724. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  725. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  726. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  727. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  728. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  729. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  730. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  731. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  732. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  733. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  734. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  735. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  736. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  737. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  738. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  739. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  740. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  741. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  742. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  743. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  744. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  745. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  746. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  747. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  748. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  749. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  750. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  751. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  752. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  753. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  754. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  755. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  756. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  757. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  758. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  759. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  760. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  761. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  762. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  763. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  764. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  765. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  766. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  767. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  768. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  769. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  770. " 'Simulation\\\\Constants.f90',\n",
  771. " 'Simulation\\\\SimulationVariables.f90',\n",
  772. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  773. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  774. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  775. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  776. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  777. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90',\n",
  778. " 'FluidFlow\\\\kick\\\\Kick_VARIABLES.f90',\n",
  779. " 'CSharp\\\\BasicInputs\\\\MudProperties.f90',\n",
  780. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsole.f90',\n",
  781. " 'CSharp\\\\ErrorLog\\\\CLog1.f90',\n",
  782. " 'CSharp\\\\ErrorLog\\\\CError.f90',\n",
  783. " 'CSharp\\\\Warnings\\\\CWarnings.f90',\n",
  784. " 'CSharp\\\\OperationScenarios\\\\Unity\\\\CUnityOutputs.f90',\n",
  785. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumps.f90',\n",
  786. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CArrangement.f90',\n",
  787. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CStack.f90',\n",
  788. " 'CSharp\\\\Equipments\\\\MudPathFinding\\\\CManifolds.f90',\n",
  789. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellGeometry.f90',\n",
  790. " 'TorqueDrag\\\\TD_Modules\\\\TD_WellElements.f90',\n",
  791. " 'TorqueDrag\\\\TD_Modules\\\\TD_StringConnectionData.f90',\n",
  792. " 'TorqueDrag\\\\TD_Modules\\\\TD_GeneralData.f90',\n",
  793. " 'TorqueDrag\\\\TD_Modules\\\\TD_DrillStem.f90',\n",
  794. " 'TorqueDrag\\\\TD_Modules\\\\GeoElements_FluidModule.f90',\n",
  795. " 'Rop\\\\sROP_Variables.f90',\n",
  796. " 'Rop\\\\sROP_Other_Variables.f90',\n",
  797. " 'FluidFlow\\\\Pressure_Display_VARIABLES.f90',\n",
  798. " 'FluidFlow\\\\Flow_Startup_VARIABLES.f90',\n",
  799. " 'Equipments\\\\Drawworks\\\\Drawworks_VARIABLES.f90',\n",
  800. " 'Equipments\\\\ChokeControl\\\\CHOKE_VARIABLES.f90',\n",
  801. " 'Equipments\\\\TopDrive\\\\TopDrive_VARIABLES.f90',\n",
  802. " 'Equipments\\\\RotaryTable\\\\RTable_VARIABLES.f90',\n",
  803. " 'Equipments\\\\Pumps\\\\Pumps_VARIABLES.f90',\n",
  804. " 'Equipments\\\\BopStack\\\\VARIABLES.f90',\n",
  805. " 'CSharp\\\\Warnings\\\\CWarningsVariables.f90',\n",
  806. " 'CSharp\\\\StudentStation\\\\CStudentStationVariables.f90',\n",
  807. " 'CSharp\\\\Problems\\\\CRotaryProblemsVariables.f90',\n",
  808. " 'CSharp\\\\Problems\\\\CPumpProblemsVariables.f90',\n",
  809. " 'CSharp\\\\Problems\\\\COtherProblemsVariables.f90',\n",
  810. " 'CSharp\\\\Problems\\\\CMudTreatmentProblemsVariables.f90',\n",
  811. " 'CSharp\\\\Problems\\\\CLostProblemsVariables.f90',\n",
  812. " 'CSharp\\\\Problems\\\\CKickProblemsVariables.f90',\n",
  813. " 'CSharp\\\\Problems\\\\CHoistingProblemsVariables.f90',\n",
  814. " 'CSharp\\\\Problems\\\\CGaugesProblemsVariables.f90',\n",
  815. " 'CSharp\\\\Problems\\\\CDrillStemProblemsVariables.f90',\n",
  816. " 'CSharp\\\\Problems\\\\CChokeProblemsVariables.f90',\n",
  817. " 'CSharp\\\\Problems\\\\CBopProblemsVariables.f90',\n",
  818. " 'CSharp\\\\Problems\\\\CProblemDifinition.f90',\n",
  819. " 'CSharp\\\\Problems\\\\CBitProblemsVariables.f90',\n",
  820. " 'CSharp\\\\OperationScenarios\\\\SoftwareInputsVariables.f90',\n",
  821. " 'CSharp\\\\OperationScenarios\\\\UnitySignals\\\\UnitySignalsVariables.f90',\n",
  822. " 'CSharp\\\\OperationScenarios\\\\Permissions\\\\PermissionsVariables.f90',\n",
  823. " 'CSharp\\\\OperationScenarios\\\\Notifications\\\\NotificationVariables.f90',\n",
  824. " 'CSharp\\\\Equipments\\\\Tanks\\\\CTanksVariables.f90',\n",
  825. " 'CSharp\\\\Equipments\\\\DrillWatch\\\\CDrillWatchVariables.f90',\n",
  826. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CTopDrivePanelVariables.f90',\n",
  827. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CStandPipeManifoldVariables.f90',\n",
  828. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CHookVariables.f90',\n",
  829. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDrillingConsoleVariables.f90',\n",
  830. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CDataDisplayConsoleVariables.f90',\n",
  831. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeManifoldVariables.f90',\n",
  832. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CChokeControlPanelVariables.f90',\n",
  833. " 'CSharp\\\\Equipments\\\\ControlPanels\\\\CBopControlPanelVariables.f90',\n",
  834. " 'CSharp\\\\BasicInputs\\\\CMudPropertiesVariables.f90',\n",
  835. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CWellSurveyDataVariables.f90',\n",
  836. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CPathGenerationVariables.f90',\n",
  837. " 'CSharp\\\\BasicInputs\\\\WellProfile\\\\CCasingLinerChokeVariables.f90',\n",
  838. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CRigSizeVariables.f90',\n",
  839. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPumpsVariables.f90',\n",
  840. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CPowerVariables.f90',\n",
  841. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CHoistingVariables.f90',\n",
  842. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CBopStackVariables.f90',\n",
  843. " 'CSharp\\\\BasicInputs\\\\RigSpecifications\\\\CAccumulatorVariables.f90',\n",
  844. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CShoeVariables.f90',\n",
  845. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CReservoirVariables.f90',\n",
  846. " 'CSharp\\\\BasicInputs\\\\Geology\\\\CFormationVariables.f90',\n",
  847. " 'CSharp\\\\BasicInputs\\\\Bha\\\\CStringConfigurationVariables.f90',\n",
  848. " 'CSharp\\\\OperationScenarios\\\\Common\\\\COperationScenariosVariables.f90',\n",
  849. " 'Simulation\\\\Constants.f90',\n",
  850. " 'Simulation\\\\SimulationVariables.f90',\n",
  851. " 'CSharp\\\\Common\\\\CIActionReference.f90',\n",
  852. " 'CSharp\\\\ErrorLog\\\\CLog4.f90',\n",
  853. " 'CSharp\\\\DownHole\\\\CDownHoleTypes.f90',\n",
  854. " 'CSharp\\\\DownHole\\\\CDownHoleVariables.f90',\n",
  855. " 'Equipments\\\\MudSystem\\\\MudSystem_Variables.f90',\n",
  856. " 'Equipments\\\\MudSystem\\\\MudSystem.f90',\n",
  857. " 'FluidFlow\\\\Pressure_Distribution_VARIABLES.f90']"
  858. ]
  859. },
  860. "execution_count": 54,
  861. "metadata": {},
  862. "output_type": "execute_result"
  863. }
  864. ],
  865. "source": [
  866. "dependencies['FluidFlow\\\\Well_Pressure_Data_Transfer.f90']"
  867. ]
  868. },
  869. {
  870. "cell_type": "code",
  871. "execution_count": 51,
  872. "metadata": {},
  873. "outputs": [
  874. {
  875. "name": "stdout",
  876. "output_type": "stream",
  877. "text": [
  878. "1-(0, 1)\n",
  879. "1-(1, 3)\n",
  880. "1-(2, 3)\n",
  881. "1-(3, 5)\n",
  882. "2-(0, 1)\n",
  883. "2-(1, 3)\n",
  884. "2-(2, 3)\n",
  885. "2-(3, 5)\n"
  886. ]
  887. }
  888. ],
  889. "source": [
  890. "l = [1,3,3,5]\n",
  891. "for a in enumerate(l):\n",
  892. " print(f\"1-{a}\")\n",
  893. "for a in enumerate(l):\n",
  894. " print(f\"2-{a}\")"
  895. ]
  896. },
  897. {
  898. "attachments": {},
  899. "cell_type": "markdown",
  900. "metadata": {},
  901. "source": [
  902. "# ToJson"
  903. ]
  904. },
  905. {
  906. "cell_type": "code",
  907. "execution_count": 3,
  908. "metadata": {},
  909. "outputs": [
  910. {
  911. "name": "stdout",
  912. "output_type": "stream",
  913. "text": [
  914. "{\"Depth\":0,\n",
  915. "\"BitPosition\":0,\n",
  916. "\"HookLoad\":0,\n",
  917. "\"WeightOnBit\":0,\n",
  918. "\"RPM\":0,\n",
  919. "\"ROP\":0,\n",
  920. "\"Torque\":0,\n",
  921. "\"PumpPressure\":0,\n",
  922. "\"SPM1\":0,\n",
  923. "\"SPM2\":0,\n",
  924. "\"CasingPressure\":0,\n",
  925. "\"PercentFlow\":0,\n",
  926. "\"PitGainLose\":0,\n",
  927. "\"PitVolume\":0,\n",
  928. "\"KillMudVolume\":0,\n",
  929. "\"TripTankVolume\":0,\n",
  930. "\"MudWeightIn\":0,\n",
  931. "\"FillVolume\":0,\n",
  932. "\"MudWeightOut\":0,\n",
  933. "}\n"
  934. ]
  935. }
  936. ],
  937. "source": [
  938. "#Artifical JSon\n",
  939. "input = open(\"Text1.txt\")\n",
  940. "output = \"{\"\n",
  941. "lines = input.readlines()\n",
  942. "for line in lines:\n",
  943. " name = line.split(\"::\")[-1].strip()\n",
  944. " type = line.split(\"::\")[0].strip()\n",
  945. " output += f\"\\\"{name}\\\":0,\\n\" \n",
  946. " # name = line.split(\"%\")[-1][:-1]\n",
  947. " # print(name)\n",
  948. "print(output+\"}\")\n"
  949. ]
  950. },
  951. {
  952. "cell_type": "code",
  953. "execution_count": 1,
  954. "metadata": {},
  955. "outputs": [
  956. {
  957. "name": "stdout",
  958. "output_type": "stream",
  959. "text": [
  960. "call ProblemToJson(p,\"ElevatorConnection\",data%State%OperationScenarios%ElevatorConnection)\n",
  961. "call ProblemToJson(p,\"StringUpdate\",data%State%OperationScenarios%StringUpdate)\n",
  962. "call ProblemToJson(p,\"KellyConnection\",data%State%OperationScenarios%KellyConnection)\n"
  963. ]
  964. }
  965. ],
  966. "source": [
  967. "precode = \"\"\"call json%add(pform,\"TopDriveTdsPowerState\",data%EquipmentControl%DrillingWatch%\"\"\"\n",
  968. "input = open(\"Text1.txt\")\n",
  969. "lines = input.readlines()\n",
  970. "for line in lines:\n",
  971. " name = line.split(\"::\")[-1].strip()\n",
  972. " icoute = precode.index(\"\\\"\")+1\n",
  973. " # name = line.split(\"%\")[-1][:-1]\n",
  974. " # print(name)\n",
  975. " newline = precode[:icoute]+name+precode[icoute:]+name+\")\"\n",
  976. " print(newline)\n"
  977. ]
  978. },
  979. {
  980. "cell_type": "code",
  981. "execution_count": 2,
  982. "metadata": {},
  983. "outputs": [
  984. {
  985. "name": "stdout",
  986. "output_type": "stream",
  987. "text": [
  988. "call BopControlPanelToJson(p)\n",
  989. "call ChokeControlPanelToJson(p)\n",
  990. "call ChokeManifoldToJson(p)\n",
  991. "call DataDisplayConsoleToJson(p)\n",
  992. "call DrillingConsoleToJson(p)\n",
  993. "call HookToJson(p)\n",
  994. "call StandPipeManifoldToJson(p)\n",
  995. "call TopDrivePanelToJson(p)\n",
  996. "call ! Drill WatchToJson(p)\n",
  997. "call DrillingWatchToJson(p)\n",
  998. "call TankToJson(p)\n"
  999. ]
  1000. }
  1001. ],
  1002. "source": [
  1003. "precode = \"\"\"call \"\"\"\n",
  1004. "postcode = \"\"\"ToJson(p)\"\"\"\n",
  1005. "input = open(\"Text1.txt\")\n",
  1006. "lines = input.readlines()\n",
  1007. "for line in lines:\n",
  1008. " name = line.split(\"::\")[-1].strip()\n",
  1009. " # icoute = precode.index(\"\\\"\")+1\n",
  1010. " # name = line.split(\"::\")[-1][:-1].strip()\n",
  1011. " # print(name)\n",
  1012. " newline = precode+name+postcode\n",
  1013. " print(newline)\n"
  1014. ]
  1015. },
  1016. {
  1017. "cell_type": "code",
  1018. "execution_count": 3,
  1019. "metadata": {},
  1020. "outputs": [
  1021. {
  1022. "name": "stdout",
  1023. "output_type": "stream",
  1024. "text": [
  1025. "\tGeo/GeoMain.f90 \\\n",
  1026. "\n"
  1027. ]
  1028. }
  1029. ],
  1030. "source": [
  1031. "##Replace space with _ in filenames and list them for put them in makefile\n",
  1032. "import os\n",
  1033. "dir = 'Geo'\n",
  1034. "files = os.listdir(dir)\n",
  1035. "fstring = ''\n",
  1036. "for f in files:\n",
  1037. " if f.endswith('90'):\n",
  1038. " newf = f.replace(' ','_')\n",
  1039. " os.rename(os.path.join(dir,f),os.path.join(dir,newf))\n",
  1040. " if newf.lower().endswith('variables.f90'):\n",
  1041. " fstring = '\\t'+os.path.join(dir,newf).replace('\\\\','/') +' \\\\\\n' + fstring\n",
  1042. " else:\n",
  1043. " fstring = fstring + '\\t'+os.path.join(dir,newf).replace('\\\\','/') +' \\\\\\n'\n",
  1044. "\n",
  1045. "print(fstring)"
  1046. ]
  1047. },
  1048. {
  1049. "attachments": {},
  1050. "cell_type": "markdown",
  1051. "metadata": {},
  1052. "source": [
  1053. "## Extract variable names from definition lines"
  1054. ]
  1055. },
  1056. {
  1057. "cell_type": "code",
  1058. "execution_count": 1,
  1059. "metadata": {},
  1060. "outputs": [],
  1061. "source": [
  1062. "# %pwd\n",
  1063. "lines = input(\"Enter lines:\").split(\" \")\n",
  1064. "lines = [l.strip() for l in lines if len(l.strip())>0]\n",
  1065. "vars = []\n",
  1066. "for l in lines:\n",
  1067. " if '::' in l:\n",
  1068. " vars.append(l.split('::')[1].strip())"
  1069. ]
  1070. },
  1071. {
  1072. "cell_type": "code",
  1073. "execution_count": 8,
  1074. "metadata": {},
  1075. "outputs": [
  1076. {
  1077. "data": {
  1078. "text/plain": [
  1079. "'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'"
  1080. ]
  1081. },
  1082. "execution_count": 8,
  1083. "metadata": {},
  1084. "output_type": "execute_result"
  1085. }
  1086. ],
  1087. "source": [
  1088. "import string\n",
  1089. "string.ascii_letters"
  1090. ]
  1091. },
  1092. {
  1093. "cell_type": "code",
  1094. "execution_count": 9,
  1095. "metadata": {},
  1096. "outputs": [
  1097. {
  1098. "name": "stdout",
  1099. "output_type": "stream",
  1100. "text": [
  1101. "var: AnnularRegulatorSetControl\n",
  1102. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1103. "Char before: \n",
  1104. "Char after: \n",
  1105. "\n",
  1106. "var: AirMasterValve\n",
  1107. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1108. "Char before: \n",
  1109. "Char after: \n",
  1110. "\n",
  1111. "var: ByePassValve\n",
  1112. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1113. "Char before: \n",
  1114. "Char after: \n",
  1115. "\n",
  1116. "var: AnnularValve\n",
  1117. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1118. "Char before: \n",
  1119. "Char after: \n",
  1120. "\n",
  1121. "var: UpperRamsValve\n",
  1122. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1123. "Char before: \n",
  1124. "Char after: \n",
  1125. "\n",
  1126. "var: MiddleRamsValve\n",
  1127. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1128. "Char before: \n",
  1129. "Char after: \n",
  1130. "\n",
  1131. "var: KillLineValve\n",
  1132. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1133. "Char before: \n",
  1134. "Char after: \n",
  1135. "\n",
  1136. "var: ChokeLineValve\n",
  1137. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1138. "Char before: \n",
  1139. "Char after: \n",
  1140. "\n",
  1141. "var: LowerRamsValve\n",
  1142. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1143. "Char before: \n",
  1144. "Char after: \n",
  1145. "\n",
  1146. "var: ManifoldPressureGauge\n",
  1147. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1148. "Char before: \n",
  1149. "Char after: \n",
  1150. "\n",
  1151. "var: AirSupplyPressureGauge\n",
  1152. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1153. "Char before: \n",
  1154. "Char after: \n",
  1155. "\n",
  1156. "var: AccumulatorPressureGauge\n",
  1157. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1158. "Char before: \n",
  1159. "Char after: \n",
  1160. "\n",
  1161. "var: AnnularPressureGauge\n",
  1162. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1163. "Char before: \n",
  1164. "Char after: \n",
  1165. "\n",
  1166. "var: AnnularOpenLED\n",
  1167. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1168. "Char before: \n",
  1169. "Char after: \n",
  1170. "\n",
  1171. "var: AnnularCloseLED\n",
  1172. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1173. "Char before: \n",
  1174. "Char after: \n",
  1175. "\n",
  1176. "var: UpperRamsOpenLED\n",
  1177. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1178. "Char before: \n",
  1179. "Char after: \n",
  1180. "\n",
  1181. "var: UpperRamsCloseLED\n",
  1182. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1183. "Char before: \n",
  1184. "Char after: \n",
  1185. "\n",
  1186. "var: MiddleRamsOpenLED\n",
  1187. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1188. "Char before: \n",
  1189. "Char after: \n",
  1190. "\n",
  1191. "var: MiddleRamsCloseLED\n",
  1192. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1193. "Char before: \n",
  1194. "Char after: \n",
  1195. "\n",
  1196. "var: KillLineOpenLED\n",
  1197. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1198. "Char before: \n",
  1199. "Char after: \n",
  1200. "\n",
  1201. "var: KillLineCloseLED\n",
  1202. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1203. "Char before: \n",
  1204. "Char after: \n",
  1205. "\n",
  1206. "var: ChokeLineOpenLED\n",
  1207. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1208. "Char before: \n",
  1209. "Char after: \n",
  1210. "\n",
  1211. "var: ChokeLineCloseLED\n",
  1212. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1213. "Char before: \n",
  1214. "Char after: \n",
  1215. "\n",
  1216. "var: LowerRamsOpenLED\n",
  1217. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1218. "Char before: \n",
  1219. "Char after: \n",
  1220. "\n",
  1221. "var: LowerRamsCloseLED\n",
  1222. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1223. "Char before: \n",
  1224. "Char after: \n",
  1225. "\n",
  1226. "var: AnnularStatus\n",
  1227. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1228. "Char before: \n",
  1229. "Char after: \n",
  1230. "\n",
  1231. "var: UpperRamsStatus\n",
  1232. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1233. "Char before: \n",
  1234. "Char after: \n",
  1235. "\n",
  1236. "var: MiddleRamsStatus\n",
  1237. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1238. "Char before: \n",
  1239. "Char after: \n",
  1240. "\n",
  1241. "var: LowerRamsStatus\n",
  1242. "file = .\\CSharp\\Equipments\\ControlPanels\\CBopControlPanelVariables.f90\n",
  1243. "Char before: \n",
  1244. "Char after: \n",
  1245. "\n"
  1246. ]
  1247. }
  1248. ],
  1249. "source": [
  1250. "import os\n",
  1251. "import sys\n",
  1252. "import re\n",
  1253. "dir = '.'\n",
  1254. "varNameChars = string.ascii_letters + '_'\n",
  1255. "log = open(os.path.join(dir,'ReplaceVars.log',),'a')\n",
  1256. "end=False\n",
  1257. "for dir,subdirs,files in os.walk(dir):\n",
  1258. " for filename in files:\n",
  1259. " if filename.lower().endswith('.f90'):\n",
  1260. " # print(filename)\n",
  1261. " file = open(os.path.join(dir,filename))\n",
  1262. " code = file.read()\n",
  1263. " for var in vars:\n",
  1264. " if var not in code:\n",
  1265. " continue\n",
  1266. " occurs = [m.start() for m in re.finditer(var, code)]\n",
  1267. " for occurance in occurs:\n",
  1268. " if code[occurs[0]-1] in varNameChars or code[occurs[0]+len(var)] in varNameChars:\n",
  1269. " continue\n",
  1270. " print(f\"var: {var}\")\n",
  1271. " print(f\"file = {os.path.join(dir,filename)}\")\n",
  1272. " print(f\"Char before: {code[occurs[0]-1]}\")\n",
  1273. " print(f\"Char after: {code[occurs[0]+len(var)]}\")\n",
  1274. " end = True\n",
  1275. " if end:\n",
  1276. " break"
  1277. ]
  1278. },
  1279. {
  1280. "cell_type": "code",
  1281. "execution_count": 9,
  1282. "metadata": {},
  1283. "outputs": [
  1284. {
  1285. "name": "stdout",
  1286. "output_type": "stream",
  1287. "text": [
  1288. "State\n",
  1289. "Hoisting\n",
  1290. "OperationScenario\n",
  1291. "notifications\n",
  1292. "permissions\n",
  1293. "unitySignals\n",
  1294. "StudentStation\n",
  1295. "BopStackInput\n",
  1296. "BopStackAcc\n",
  1297. "RamLine\n",
  1298. "AnnularComputational\n",
  1299. "Annular\n",
  1300. "PipeRam1\n",
  1301. "ShearRam\n",
  1302. "PipeRam2\n",
  1303. "ChokeLine\n",
  1304. "KillLine\n",
  1305. "Pumps\n",
  1306. "RAM\n",
  1307. "RAMS\n",
  1308. "Choke\n",
  1309. "AirDrivenPump\n",
  1310. "AirPumpLine\n",
  1311. "CHOOKE\n",
  1312. "Drawworks\n",
  1313. "MudSystem\n",
  1314. "MUD\n",
  1315. "PUMP\n",
  1316. "RTable\n",
  1317. "TDS\n",
  1318. "GasType(3)\n",
  1319. "PressureDisplay\n",
  1320. "ObservationPoint(:)\n",
  1321. "FricPressDrop\n",
  1322. "ROP_Spec\n",
  1323. "ROP_Bit\n",
  1324. "TDGeo\n",
  1325. "F_String(:)\n",
  1326. "F_Counts\n",
  1327. "F_Interval(:)\n",
  1328. "OD_Annulus(4)\n",
  1329. "TD_DrillStem\n",
  1330. "TD_DrillStems\n",
  1331. "TD_String\n",
  1332. "TD_Count\n",
  1333. "G_StringElement\n",
  1334. "TD_Vol\n",
  1335. "TD_General\n",
  1336. "TD_BOP\n",
  1337. "TD_BOPElement(4)\n",
  1338. "TD_StConn\n",
  1339. "TD_Load\n",
  1340. "TD_WellEl\n",
  1341. "TD_Casing\n",
  1342. "data%State%TD_Liner\n",
  1343. "TD_OpenHole\n",
  1344. "TD_ROPHole\n",
  1345. "TD_WellGeneral\n",
  1346. "TD_WellGeo(:)\n",
  1347. "EquipmentControl\n",
  1348. "BopControlPanel\n",
  1349. "ChokeControlPanel\n",
  1350. "ChokeManifold\n",
  1351. "DataDisplayConsole\n",
  1352. "DrillingConsole\n",
  1353. "Hook\n",
  1354. "StandPipeManifold\n",
  1355. "TopDrivePanel\n",
  1356. "DrillingWatch\n",
  1357. "Tank\n",
  1358. "Configuration\n",
  1359. "StringConfiguration\n",
  1360. "Formation\n",
  1361. "Reservoir\n",
  1362. "Shoe\n",
  1363. "Accumulator\n",
  1364. "BopStackSpecification\n",
  1365. "Hoisting\n",
  1366. "Power\n",
  1367. "PumpsSpecification\n",
  1368. "RigSize\n",
  1369. "CasingLinerChoke\n",
  1370. "PathGeneration\n",
  1371. "WellSurveyData\n",
  1372. "MudProperties\n",
  1373. "problems\n",
  1374. "BitProblems\n",
  1375. "BopProblems\n",
  1376. "ChokeProblems\n",
  1377. "DrillStemProblems\n",
  1378. "GaugesProblems\n",
  1379. "HoistingProblems\n",
  1380. "KickProblems\n",
  1381. "LostProblems\n",
  1382. "MudTreatmentProblems\n",
  1383. "OtherProblems\n",
  1384. "PumpProblems\n",
  1385. "RotaryProblems\n"
  1386. ]
  1387. },
  1388. {
  1389. "ename": "IndexError",
  1390. "evalue": "list index out of range",
  1391. "output_type": "error",
  1392. "traceback": [
  1393. "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
  1394. "\u001b[1;31mIndexError\u001b[0m Traceback (most recent call last)",
  1395. "\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",
  1396. "\u001b[1;31mIndexError\u001b[0m: list index out of range"
  1397. ]
  1398. }
  1399. ],
  1400. "source": [
  1401. "f = open(\"hier.txt\")\n",
  1402. "lines = f.readlines()\n",
  1403. "for line in lines[1:]:\n",
  1404. " nsp=0\n",
  1405. " while line[nsp]==' ':\n",
  1406. " nsp+=1\n",
  1407. " splits = line.split(\"::\")\n",
  1408. " print(splits[1].strip())"
  1409. ]
  1410. },
  1411. {
  1412. "cell_type": "code",
  1413. "execution_count": 4,
  1414. "metadata": {},
  1415. "outputs": [
  1416. {
  1417. "data": {
  1418. "text/plain": [
  1419. "'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'"
  1420. ]
  1421. },
  1422. "execution_count": 4,
  1423. "metadata": {},
  1424. "output_type": "execute_result"
  1425. }
  1426. ],
  1427. "source": [
  1428. "line"
  1429. ]
  1430. },
  1431. {
  1432. "cell_type": "code",
  1433. "execution_count": null,
  1434. "metadata": {},
  1435. "outputs": [],
  1436. "source": [
  1437. "for fn in modules:\n",
  1438. " f = open(fn)\n",
  1439. " lines = f.readlines()\n",
  1440. " module_filenames = {}\n",
  1441. " used_modules = []\n",
  1442. " mod_count = 0\n",
  1443. " for l in lines:\n",
  1444. " l = l.strip().lower()\n",
  1445. " if l.startswith('module ') and not l.startswith('module procedure '):\n",
  1446. " mod_name = l.split(' ')[1]\n",
  1447. " module_filenames[mod_name] = fn\n",
  1448. " mod_count +=1\n",
  1449. " if l.startswith('use'):\n",
  1450. " used_modules.append(l.split(' ')[1])\n",
  1451. " if mod_count !=1:\n",
  1452. " print(f\"{fn} has {mod_count} modules\")\n",
  1453. " module_filenames,used_modules"
  1454. ]
  1455. }
  1456. ],
  1457. "metadata": {
  1458. "kernelspec": {
  1459. "display_name": "base",
  1460. "language": "python",
  1461. "name": "python3"
  1462. },
  1463. "language_info": {
  1464. "codemirror_mode": {
  1465. "name": "ipython",
  1466. "version": 3
  1467. },
  1468. "file_extension": ".py",
  1469. "mimetype": "text/x-python",
  1470. "name": "python",
  1471. "nbconvert_exporter": "python",
  1472. "pygments_lexer": "ipython3",
  1473. "version": "3.9.12"
  1474. },
  1475. "orig_nbformat": 4,
  1476. "vscode": {
  1477. "interpreter": {
  1478. "hash": "1ef4a26de7183d96d6da1045a38581e0a15b2215d0c1b98c7b273c6e514c6c7e"
  1479. }
  1480. }
  1481. },
  1482. "nbformat": 4,
  1483. "nbformat_minor": 2
  1484. }