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.
 
 
 
 
 
 

675 lines
23 KiB

  1. module Simulator
  2. use RedisInterface
  3. use Bop
  4. use PumpsMain
  5. use RopMain
  6. use RotaryTableMain
  7. use DrawworksMain
  8. use FluidFlowMain
  9. use TorqueDragMain
  10. use MudSystemMain
  11. use PipeRams1Main
  12. use PipeRams2Main
  13. use KillLineMain
  14. use ChokeLineMain
  15. use BlindRamsMain
  16. use AnnularMain
  17. use TopDriveMain
  18. use CManifolds
  19. use GeoMain
  20. use ChokeControlMain
  21. use COperationScenariosMain
  22. ! For Json read and write
  23. use CStringConfiguration
  24. use CFormation
  25. use CReservoir
  26. use CShoe
  27. use CAccumulator
  28. use CBopStack
  29. use CHoisting
  30. use CPower
  31. use CPumpsVariables
  32. use CRigSize
  33. use CCasingLinerChoke
  34. use CPathGeneration
  35. use CWellSurveyData
  36. use MudPropertiesModule
  37. use CBitProblems
  38. use CBopProblems
  39. use CChokeProblems
  40. use CDrillStemProblems
  41. use CGaugesProblems
  42. use CHoistingProblems
  43. use CKickProblems
  44. use CLostProblems
  45. use CMudTreatmentProblems
  46. use COtherProblems
  47. use CPumpProblems
  48. use CRotaryProblems
  49. use OperationScenariosModule
  50. use PermissionsModule
  51. use UnitySignalsModule
  52. use CBopControlPanel
  53. use CChokeControlPanel
  54. use CChokeManifold
  55. use CDataDisplayConsole
  56. use CDrillingConsole
  57. use CHook
  58. use CStandPipeManifold
  59. use CTopDrivePanel
  60. use DrillingWatchModule
  61. use CTanks
  62. use :: json_module, rk => json_rk
  63. implicit none
  64. type(json_file) :: jsonfile
  65. type(json_value),pointer :: jsonvalue
  66. type(json_core) :: jsoncore
  67. logical :: is_found
  68. character(len=:),allocatable::redisContent
  69. contains
  70. subroutine Simulate
  71. integer :: t
  72. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  73. t=0
  74. ! call initConnection()
  75. ! print *,"redis exmaple program"
  76. ! call jsoncore%create_object(jsonvalue,'')
  77. ! call ConfigurationToJson(jsonvalue)
  78. ! call WarningsToJson(jsonvalue)
  79. ! call ProblemsToJson(jsonvalue)
  80. ! print *,"write starts"
  81. ! call jsoncore%serialize(jsonvalue,redisContent)
  82. ! ! s = "Test redis write!"
  83. ! call setData(redisContent)
  84. ! print *,"write ends len=",len(redisContent)
  85. ! call getData(s2)
  86. ! print *,"len(read)=",len(s2)
  87. ! print *, s2(1:10),' .... ', s2(len(s2)-10:len(s2))
  88. ! call deallocateData()
  89. ! ! print *,"S2 = ",s2
  90. ! deallocate(s2)
  91. call jsoncore%create_object(jsonvalue,'')
  92. call initConnection()
  93. call write_variables()
  94. call read_variables()
  95. call jsoncore%print(jsonvalue,'test.json')
  96. call jsoncore%destroy(jsonvalue)
  97. ! print *,"s2=",redisContent
  98. ! call deallocateData()
  99. ! print *,"redisContent Deallocated!"
  100. ! print *,"s2=",redisContent
  101. ! call init_modules()
  102. ! call cpu_time(T1)
  103. ! do while (t<0)
  104. ! !!read variable from shared file
  105. ! call read_variables()
  106. ! exit
  107. ! !! Tarmigh, Now merged with TorqueDrag (FluidFlow)
  108. ! ! call Rop_Step()
  109. ! !! Rafiee, nothing changed
  110. ! call BopStack_Step()
  111. ! !! Tarmigh, now is rewritten
  112. ! call Pump1_Step()
  113. ! !call Pump2_Step()
  114. ! !! Rafiee
  115. ! call ChokeControl_Step()
  116. ! !! Location ./Equipment/Rotarytable
  117. ! !! Variables:
  118. ! !! Does not have step function
  119. ! !! Call RTable_StartUp in the start
  120. ! !! Again has a loop in each step
  121. ! !! Tarmigh, now is rewritten
  122. ! call RotaryTable_Step()
  123. ! !! Location ./Equipment/Drawworks
  124. ! !! Variables:
  125. ! !! Does not have step function
  126. ! !! Call ..._StartUp in the start
  127. ! !! Again has a loop in each step
  128. ! !! Tarmigh, now is rewritten
  129. ! call Drawworks_Step()
  130. ! !! Empty nothing called
  131. ! !! Merged in FluidFlow
  132. ! ! call TorqueDrag_Step()
  133. ! !! Location: ./Equipment/MudSystem
  134. ! !! Variables: MudSystem_variables.f90 and MudSystem.f90
  135. ! !! Step function simply calls LineupAndPath in MudSystem.f90
  136. ! !! had not startUp
  137. ! !! Rafiee
  138. ! call MudSystem_Step()
  139. ! !! Location ./Equipment/BopStack
  140. ! !! Variables: VARIABLES,CBopStackVariables,CBopControlPanelVariables,CEquipmentsConstants
  141. ! !! Step function added, only call PIPE_RAMS1 and 2 function
  142. ! !! BOP_StartUp commented
  143. ! !! Rafiee
  144. ! call PipeRams1_Step()
  145. ! call PipeRams2_Step()
  146. ! !! Location ./Equipment/BopStack
  147. ! !! Variables: VARIABLES,CBopStackVariables,CBopControlPanelVariables,CEquipmentsConstants,CAccumulatorVariables,CSimulationVariables
  148. ! !! Step function added, only call PIPE_RAMS1 and PIPE_RAMS2 function
  149. ! !! BOP_StartUp commented
  150. ! !! Rafiee
  151. ! call KillLine_Step()
  152. ! !! Probably like other bopstack equipments
  153. ! !! Rafiee
  154. ! call ChokeLine_Step()
  155. ! call BlindRams_Step()
  156. ! call Annular_Step()
  157. ! !!Tarmigh. Step must rewrittem
  158. ! call TopDrive_Step()
  159. ! !!Empty
  160. ! ! call Geo_Step()
  161. ! !!Ahmadi
  162. ! call PathFinding_Step()
  163. ! !! Sheikh
  164. ! call FluidFlow_Step()
  165. ! !! Ahmadi
  166. ! call OperationScenarios_Step()
  167. ! !! Write variables to shared files
  168. ! call write_variables()
  169. ! print *,"t=",t
  170. ! t = t + 1
  171. ! end do
  172. ! call jsoncore%destroy(jsonvalue)
  173. ! call cpu_time(T2)
  174. ! print *,"Total Execution Time =",t2-t1
  175. end subroutine Simulate
  176. subroutine write_variables()
  177. use CAccumulator
  178. use json_module
  179. implicit none
  180. ! character(len=:),allocatable::s
  181. call ConfigurationToJson(jsonvalue)
  182. call WarningsToJson(jsonvalue)
  183. call ProblemsToJson(jsonvalue)
  184. call EquipmentsToJson(jsonvalue)
  185. print *,"write starts"
  186. call jsoncore%serialize(jsonvalue,redisContent)
  187. ! s = "Test redis write!"
  188. call setData(redisContent)
  189. print *,"write ends"
  190. end subroutine
  191. subroutine read_variables()
  192. ! call getData(redisContent)
  193. ! call jsoncore%deserialize(jsonvalue,redisContent)
  194. call jsonfile%initialize()
  195. call jsonfile%load_file('data-witharray.json'); if (jsonfile%failed()) stop
  196. call jsonfile%json_file_get_root(jsonvalue)
  197. call ConfigurationFromJson(jsonvalue)
  198. ! call WarningsFromJson(jsonvalue)
  199. ! call ProblemsFromJson(jsonvalue)
  200. ! call EquipmentsToJson(jsonvalue)
  201. ! print *,"Read from Redix:",redisContent
  202. ! ! Load the file.
  203. ! call jsonfile%load_file('config.json'); if (jsonfile%failed()) stop
  204. ! print *,"read complete"
  205. ! call jsonfile%get('t0', a1, is_found); if (.not. is_found) return
  206. ! call jsonfile%get('dt', a2, is_found); if (.not. is_found) return
  207. ! call jsonfile%get('tf', a3, is_found); if (.not. is_found) return
  208. ! call jsonfile%get('mu', a4, is_found); if (.not. is_found) return
  209. ! call jsonfile%get('x0', x0, is_found); if (.not. is_found) return
  210. ! if (is_found) then
  211. ! print *, a1,a2,a3,a4
  212. ! print *, x0
  213. ! end if
  214. ! call jsonfile%destroy()
  215. end subroutine
  216. subroutine init_modules
  217. !Tarmigh
  218. call Pump1_Init()
  219. !call Pump2_Step()
  220. call RotaryTable_Init()
  221. call Drawworks_Init()
  222. call TopDrive_Init()
  223. !Nothing in init (and step)
  224. ! call Rop_Init()
  225. ! call TorqueDrag_Init()
  226. ! call Geo_Step()
  227. !! Rafiee
  228. call BopStack_Init()
  229. call ChokeControl_Init()
  230. call MudSystem_Init()
  231. !Again calls Bop_Startup
  232. ! call PipeRams1_Init()
  233. ! call PipeRams2_Step()
  234. ! call KillLine_Step()
  235. ! call ChokeLine_Step()
  236. ! call BlindRams_Step()
  237. ! call Annular_Step()
  238. !! Sheikh
  239. call FluidFlow_Init()
  240. !! Ahmadi
  241. call PathFinding_Init()
  242. ! Calls OSInitialization and that sub only subscribes some notif
  243. ! call OperationScenarios_Init()
  244. end subroutine init_modules
  245. subroutine EquipmentsToJson(parent)
  246. type(json_value),pointer :: parent
  247. type(json_core) :: json
  248. type(json_value),pointer :: p
  249. ! 1. create new node
  250. call json%create_object(p,'Equipments')
  251. ! 2. add member of data type to new node
  252. call BopControlPanelToJson(p)
  253. call ChokeControlPanelToJson(p)
  254. call ChokeManifoldToJson(p)
  255. call DataDisplayConsoleToJson(p)
  256. call DrillingConsoleToJson(p)
  257. call HookToJson(p)
  258. call StandPipeManifoldToJson(p)
  259. call TopDrivePanelToJson(p)
  260. call DrillingWatchToJson(p)
  261. call TankToJson(p)
  262. ! 3. add new node to parent
  263. call json%add(parent,p)
  264. end subroutine
  265. subroutine ConfigurationToJson(parent)
  266. type(json_value),pointer :: parent
  267. type(json_core) :: json
  268. type(json_value),pointer :: p
  269. ! 1. create new node
  270. call json%create_object(p,'Configuration')
  271. ! 2. add member of data type to new node
  272. call StringConfigurationToJson(p)
  273. call FormationToJson(p)
  274. call ReservoirToJson(p)
  275. call ShoeToJson(p)
  276. call AccumulatorToJson(p)
  277. call BopStackToJson(p)
  278. call HoistingToJson(p)
  279. call PowerToJson(p)
  280. call PumpsToJson(p)
  281. call RigSizeToJson(p)
  282. call CasingLinerChokeToJson(p)
  283. call PathGenerationToJson(p)
  284. ! call WellSurveyDataToJson(p)
  285. call MudPropertiesToJson(p)
  286. ! 3. add new node to parent
  287. call json%add(parent,p)
  288. end subroutine
  289. subroutine WarningsToJson(parent)
  290. type(json_value),pointer :: parent
  291. type(json_core) :: json
  292. type(json_value),pointer :: p
  293. ! 1. create new node
  294. call json%create_object(p,'Warnings')
  295. ! 2. add member of data type to new node
  296. call json%add(p,"PumpWithKellyDisconnected",data%Warnings%PumpWithKellyDisconnected)
  297. call json%add(p,"PumpWithTopdriveDisconnected",data%Warnings%PumpWithTopdriveDisconnected)
  298. call json%add(p,"Pump1PopOffValveBlown",data%Warnings%Pump1PopOffValveBlown)
  299. call json%add(p,"Pump1Failure",data%Warnings%Pump1Failure)
  300. call json%add(p,"Pump2PopOffValveBlown",data%Warnings%Pump2PopOffValveBlown)
  301. call json%add(p,"Pump2Failure",data%Warnings%Pump2Failure)
  302. call json%add(p,"Pump3PopOffValveBlown",data%Warnings%Pump3PopOffValveBlown)
  303. call json%add(p,"Pump3Failure",data%Warnings%Pump3Failure)
  304. call json%add(p,"DrawworksGearsAbuse",data%Warnings%DrawworksGearsAbuse)
  305. call json%add(p,"RotaryGearsAbuse",data%Warnings%RotaryGearsAbuse)
  306. call json%add(p,"HoistLineBreak",data%Warnings%HoistLineBreak)
  307. call json%add(p,"PartedDrillString",data%Warnings%PartedDrillString)
  308. call json%add(p,"ActiveTankOverflow",data%Warnings%ActiveTankOverflow)
  309. call json%add(p,"ActiveTankUnderVolume",data%Warnings%ActiveTankUnderVolume)
  310. call json%add(p,"TripTankOverflow",data%Warnings%TripTankOverflow)
  311. call json%add(p,"DrillPipeTwistOff",data%Warnings%DrillPipeTwistOff)
  312. call json%add(p,"DrillPipeParted",data%Warnings%DrillPipeParted)
  313. call json%add(p,"TripWithSlipsSet",data%Warnings%TripWithSlipsSet)
  314. call json%add(p,"Blowout",data%Warnings%Blowout)
  315. call json%add(p,"UndergroundBlowout",data%Warnings%UndergroundBlowout)
  316. call json%add(p,"MaximumWellDepthExceeded",data%Warnings%MaximumWellDepthExceeded)
  317. call json%add(p,"CrownCollision",data%Warnings%CrownCollision)
  318. call json%add(p,"FloorCollision",data%Warnings%FloorCollision)
  319. call json%add(p,"TopdriveRotaryTableConfilict",data%Warnings%TopdriveRotaryTableConfilict)
  320. ! 3. add new node to parent
  321. call json%add(parent,p)
  322. end subroutine
  323. subroutine ProblemsToJson(parent)
  324. type(json_value),pointer :: parent
  325. type(json_core) :: json
  326. type(json_value),pointer :: p
  327. ! 1. create new node
  328. call json%create_object(p,'Problems')
  329. ! 2. add member of data type to new node
  330. call BitProblemsToJson(p)
  331. call BopProblemsToJson(p)
  332. call ChokeProblemsToJson(p)
  333. call DrillStemProblemsToJson(p)
  334. call GaugesProblemsToJson(p)
  335. call HoistingProblemsToJson(p)
  336. call KickProblemsToJson(p)
  337. call LostProblemsToJson(p)
  338. call MudTreatmentProblemsToJson(p)
  339. call OtherProblemsToJson(p)
  340. call PumpProblemsToJson(p)
  341. call RotaryProblemsToJson(p)
  342. ! 3. add new node to parent
  343. call json%add(parent,p)
  344. end subroutine
  345. subroutine StateToJson(parent)
  346. type(json_value),pointer :: parent
  347. type(json_core) :: json
  348. type(json_value),pointer :: p
  349. ! 1. create new node
  350. call json%create_object(p,'State')
  351. ! call OperationScenarioToJson(p)
  352. call notificationsToJson(p)
  353. ! call permissionsToJson(p)
  354. ! call unitySignalsToJson(p)
  355. ! call StudentStationToJson(p)
  356. ! call BopStackInputToJson(p)
  357. ! call BopStackAccToJson(p)
  358. ! call RamLineToJson(p)
  359. ! call AnnularComputationalToJson(p)
  360. ! call AnnularToJson(p)
  361. ! call PipeRam1ToJson(p)
  362. ! call ShearRamToJson(p)
  363. ! call PipeRam2ToJson(p)
  364. ! call ChokeLineToJson(p)
  365. ! call KillLineToJson(p)
  366. ! call PumpsToJson(p)
  367. ! call RAMToJson(p)
  368. ! call RAMSToJson(p)
  369. ! call ChokeToJson(p)
  370. ! call AirDrivenPumpToJson(p)
  371. ! call AirPumpLineToJson(p)
  372. ! call CHOOKEToJson(p)
  373. ! call DrawworksToJson(p)
  374. ! call MudSystemToJson(p)
  375. ! call MUDToJson(p)
  376. ! call MPumpsToJson(p)
  377. ! call PUMPToJson(p)
  378. ! call RTableToJson(p)
  379. ! call TDSToJson(p)
  380. ! call GasType(3)ToJson(p)
  381. ! call PressureDisplayToJson(p)
  382. ! call FricPressDropToJson(p)
  383. ! call ROP_SpecToJson(p)
  384. ! call ROP_BitToJson(p)
  385. ! call TDGeoToJson(p)
  386. ! call F_String(:)ToJson(p)
  387. ! call F_CountsToJson(p)
  388. ! call F_Interval(:)ToJson(p)
  389. ! call OD_Annulus(4)ToJson(p)
  390. ! call TD_DrillStemToJson(p)
  391. ! call TD_DrillStemsToJson(p)
  392. ! call TD_StringToJson(p)
  393. ! call TD_CountToJson(p)
  394. ! call G_StringElementToJson(p)
  395. ! call TD_VolToJson(p)
  396. ! call TD_GeneralToJson(p)
  397. ! call TD_BOPToJson(p)
  398. ! call TD_BOPElement(4)ToJson(p)
  399. ! call TD_StConnToJson(p)
  400. ! call TD_LoadToJson(p)
  401. ! call TD_WellElToJson(p)
  402. ! call TD_CasingToJson(p)
  403. ! call TD_LinerToJson(p)
  404. ! call TD_OpenHoleToJson(p)
  405. ! call TD_ROPHoleToJson(p)
  406. ! call TD_WellGeneralToJson(p)
  407. ! call TD_WellGeo(:)ToJson(p)
  408. ! 2. add member of data type to new node
  409. ! 3. add new node to parent
  410. call json%add(parent,p)
  411. end subroutine
  412. !use this as a template
  413. subroutine notificationsToJson(parent)
  414. type(json_value),pointer :: parent
  415. type(json_core) :: json
  416. type(json_value),pointer :: p
  417. ! 1. create new node
  418. call json%create_object(p,'Notifications')
  419. ! 2. add member of data type to new node
  420. ! 3. add new node to parent
  421. call json%add(parent,p)
  422. end subroutine
  423. subroutine ConfigurationFromJson(parent)
  424. type(json_value),pointer :: parent
  425. type(json_core) :: json
  426. type(json_value),pointer :: p
  427. ! 1. get related root
  428. call jsonfile%get('Configuration',p,is_found)
  429. call StringConfigurationFromJson(p)
  430. ! call FormationFromJson(p)
  431. ! call ReservoirFromJson(p)
  432. ! call ShoeFromJson(p)
  433. ! call AccumulatorFromJson(p)
  434. ! call BopStackFromJson(p)
  435. ! call HoistingFromJson(p)
  436. ! call PowerFromJson(p)
  437. ! call PumpsFromJson(p)
  438. ! call RigSizeFromJson(p)
  439. ! call CasingLinerChokeFromJson(p)
  440. ! call PathGenerationFromJson(p)
  441. ! call MudPropertiesFromJson(p)
  442. ! 3. add new node to parent
  443. call json%add(parent,p)
  444. end subroutine
  445. subroutine WarningsFromJson(parent)
  446. type(json_value),pointer :: parent
  447. type(json_core) :: json
  448. type(json_value),pointer :: p
  449. ! 1. create new node
  450. ! call json%create_object(p,'Warnings')
  451. ! ! 2. add member of data type to new node
  452. ! call json%add(p,"PumpWithKellyDisconnected",data%Warnings%PumpWithKellyDisconnected)
  453. ! call json%add(p,"PumpWithTopdriveDisconnected",data%Warnings%PumpWithTopdriveDisconnected)
  454. ! call json%add(p,"Pump1PopOffValveBlown",data%Warnings%Pump1PopOffValveBlown)
  455. ! call json%add(p,"Pump1Failure",data%Warnings%Pump1Failure)
  456. ! call json%add(p,"Pump2PopOffValveBlown",data%Warnings%Pump2PopOffValveBlown)
  457. ! call json%add(p,"Pump2Failure",data%Warnings%Pump2Failure)
  458. ! call json%add(p,"Pump3PopOffValveBlown",data%Warnings%Pump3PopOffValveBlown)
  459. ! call json%add(p,"Pump3Failure",data%Warnings%Pump3Failure)
  460. ! call json%add(p,"DrawworksGearsAbuse",data%Warnings%DrawworksGearsAbuse)
  461. ! call json%add(p,"RotaryGearsAbuse",data%Warnings%RotaryGearsAbuse)
  462. ! call json%add(p,"HoistLineBreak",data%Warnings%HoistLineBreak)
  463. ! call json%add(p,"PartedDrillString",data%Warnings%PartedDrillString)
  464. ! call json%add(p,"ActiveTankOverflow",data%Warnings%ActiveTankOverflow)
  465. ! call json%add(p,"ActiveTankUnderVolume",data%Warnings%ActiveTankUnderVolume)
  466. ! call json%add(p,"TripTankOverflow",data%Warnings%TripTankOverflow)
  467. ! call json%add(p,"DrillPipeTwistOff",data%Warnings%DrillPipeTwistOff)
  468. ! call json%add(p,"DrillPipeParted",data%Warnings%DrillPipeParted)
  469. ! call json%add(p,"TripWithSlipsSet",data%Warnings%TripWithSlipsSet)
  470. ! call json%add(p,"Blowout",data%Warnings%Blowout)
  471. ! call json%add(p,"UndergroundBlowout",data%Warnings%UndergroundBlowout)
  472. ! call json%add(p,"MaximumWellDepthExceeded",data%Warnings%MaximumWellDepthExceeded)
  473. ! call json%add(p,"CrownCollision",data%Warnings%CrownCollision)
  474. ! call json%add(p,"FloorCollision",data%Warnings%FloorCollision)
  475. ! call json%add(p,"TopdriveRotaryTableConfilict",data%Warnings%TopdriveRotaryTableConfilict)
  476. ! ! 3. add new node to parent
  477. ! call json%add(parent,p)
  478. end subroutine
  479. subroutine ProblemsFromJson(parent)
  480. type(json_value),pointer :: parent
  481. type(json_core) :: json
  482. type(json_value),pointer :: p
  483. ! 1. create new node
  484. ! call json%create_object(p,'Problems')
  485. ! ! 2. add member of data type to new node
  486. ! call BitProblemsFromJson(p)
  487. ! call BopProblemsFromJson(p)
  488. ! call ChokeProblemsFromJson(p)
  489. ! call DrillStemProblemsFromJson(p)
  490. ! call GaugesProblemsFromJson(p)
  491. ! call HoistingProblemsFromJson(p)
  492. ! call KickProblemsFromJson(p)
  493. ! call LostProblemsFromJson(p)
  494. ! call MudTreatmentProblemsFromJson(p)
  495. ! call OtherProblemsFromJson(p)
  496. ! call PumpProblemsFromJson(p)
  497. ! call RotaryProblemsFromJson(p)
  498. ! ! 3. add new node to parent
  499. ! call json%add(parent,p)
  500. end subroutine
  501. subroutine StateFromJson(parent)
  502. type(json_value),pointer :: parent
  503. type(json_core) :: json
  504. type(json_value),pointer :: p
  505. ! 1. create new node
  506. ! call json%create_object(p,'State')
  507. ! ! call OperationScenarioFromJson(p)
  508. ! call notificationsFromJson(p)
  509. ! call permissionsFromJson(p)
  510. ! call unitySignalsFromJson(p)
  511. ! call StudentStationFromJson(p)
  512. ! call BopStackInputFromJson(p)
  513. ! call BopStackAccFromJson(p)
  514. ! call RamLineFromJson(p)
  515. ! call AnnularComputationalFromJson(p)
  516. ! call AnnularFromJson(p)
  517. ! call PipeRam1FromJson(p)
  518. ! call ShearRamFromJson(p)
  519. ! call PipeRam2FromJson(p)
  520. ! call ChokeLineFromJson(p)
  521. ! call KillLineFromJson(p)
  522. ! call PumpsFromJson(p)
  523. ! call RAMFromJson(p)
  524. ! call RAMSFromJson(p)
  525. ! call ChokeFromJson(p)
  526. ! call AirDrivenPumpFromJson(p)
  527. ! call AirPumpLineFromJson(p)
  528. ! call CHOOKEFromJson(p)
  529. ! call DrawworksFromJson(p)
  530. ! call MudSystemFromJson(p)
  531. ! call MUDFromJson(p)
  532. ! call MPumpsFromJson(p)
  533. ! call PUMPFromJson(p)
  534. ! call RTableFromJson(p)
  535. ! call TDSFromJson(p)
  536. ! call GasType(3)FromJson(p)
  537. ! call PressureDisplayFromJson(p)
  538. ! call FricPressDropFromJson(p)
  539. ! call ROP_SpecFromJson(p)
  540. ! call ROP_BitFromJson(p)
  541. ! call TDGeoFromJson(p)
  542. ! call F_String(:)FromJson(p)
  543. ! call F_CountsFromJson(p)
  544. ! call F_Interval(:)FromJson(p)
  545. ! call OD_Annulus(4)FromJson(p)
  546. ! call TD_DrillStemFromJson(p)
  547. ! call TD_DrillStemsFromJson(p)
  548. ! call TD_StringFromJson(p)
  549. ! call TD_CountFromJson(p)
  550. ! call G_StringElementFromJson(p)
  551. ! call TD_VolFromJson(p)
  552. ! call TD_GeneralFromJson(p)
  553. ! call TD_BOPFromJson(p)
  554. ! call TD_BOPElement(4)FromJson(p)
  555. ! call TD_StConnFromJson(p)
  556. ! call TD_LoadFromJson(p)
  557. ! call TD_WellElFromJson(p)
  558. ! call TD_CasingFromJson(p)
  559. ! call TD_LinerFromJson(p)
  560. ! call TD_OpenHoleFromJson(p)
  561. ! call TD_ROPHoleFromJson(p)
  562. ! call TD_WellGeneralFromJson(p)
  563. ! call TD_WellGeo(:)FromJson(p)
  564. ! 2. add member of data type to new node
  565. ! 3. add new node to parent
  566. call json%add(parent,p)
  567. end subroutine
  568. !use this as a template
  569. subroutine notificationsFromJson(parent)
  570. type(json_value),pointer :: parent
  571. ! type(json_core) :: json
  572. ! type(json_value),pointer :: p
  573. ! 1. create new node
  574. ! call json%create_object(p,'Notifications')
  575. ! ! 2. add member of data type to new node
  576. ! ! 3. add new node to parent
  577. ! call json%add(parent,p)
  578. end subroutine
  579. end module Simulator