Mahmood Farokhian преди 1 година
родител
ревизия
95ad7885e9
променени са 100 файла, в които са добавени 770 реда и са изтрити 1519 реда
  1. +14
    -2
      .vscode/launch.json
  2. +8
    -8
      CSharp/BasicInputs/Bha/CStringConfiguration.f90
  3. +9
    -9
      CSharp/BasicInputs/Bha/CStringConfiguration.i90
  4. +2
    -2
      CSharp/BasicInputs/Bha/CStringConfigurationVariables.f90
  5. +3
    -3
      CSharp/BasicInputs/Bha/CStringConfigurationVariables.i90
  6. +1
    -1
      CSharp/BasicInputs/CMudPropertiesVariables.i90
  7. +1
    -0
      CSharp/BasicInputs/Geology/CFormation.f90
  8. +2
    -1
      CSharp/BasicInputs/Geology/CFormation.i90
  9. +36
    -36
      CSharp/BasicInputs/Geology/CReservoir.f90
  10. +37
    -37
      CSharp/BasicInputs/Geology/CReservoir.i90
  11. +5
    -5
      CSharp/BasicInputs/Geology/CReservoirVariables.f90
  12. +6
    -6
      CSharp/BasicInputs/Geology/CReservoirVariables.i90
  13. +1
    -1
      CSharp/BasicInputs/Geology/CShoeVariables.i90
  14. +1
    -1
      CSharp/BasicInputs/MudProperties.i90
  15. +1
    -1
      CSharp/BasicInputs/RigSpecifications/CBopStack.i90
  16. +1
    -1
      CSharp/BasicInputs/RigSpecifications/CBopStackVariables.i90
  17. +3
    -0
      CSharp/BasicInputs/RigSpecifications/CHoisting.f90
  18. +1
    -1
      CSharp/BasicInputs/RigSpecifications/CHoistingVariables.i90
  19. +1
    -1
      CSharp/BasicInputs/RigSpecifications/CPower.i90
  20. +51
    -51
      CSharp/BasicInputs/RigSpecifications/CPumps.f90
  21. +52
    -52
      CSharp/BasicInputs/RigSpecifications/CPumps.i90
  22. +9
    -9
      CSharp/BasicInputs/RigSpecifications/CPumpsVariables.f90
  23. +10
    -10
      CSharp/BasicInputs/RigSpecifications/CPumpsVariables.i90
  24. +1
    -1
      CSharp/BasicInputs/WellProfile/CCasingLinerChoke.i90
  25. +1
    -1
      CSharp/BasicInputs/WellProfile/CCasingLinerChokeVariables.i90
  26. +1
    -1
      CSharp/BasicInputs/WellProfile/CPathGeneration.f90
  27. +2
    -2
      CSharp/BasicInputs/WellProfile/CPathGeneration.i90
  28. +1
    -1
      CSharp/BasicInputs/WellProfile/CPathGenerationVariables.i90
  29. +1
    -1
      CSharp/Equipments/ControlPanels/CBopControlPanel.i90
  30. +2
    -2
      CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90
  31. +3
    -3
      CSharp/Equipments/ControlPanels/CDataDisplayConsole.i90
  32. +1
    -1
      CSharp/Equipments/ControlPanels/CDataDisplayConsoleVariables.i90
  33. +115
    -226
      CSharp/Equipments/ControlPanels/CDrillingConsole.f90
  34. +116
    -227
      CSharp/Equipments/ControlPanels/CDrillingConsole.i90
  35. +1
    -1
      CSharp/Equipments/ControlPanels/CDrillingConsoleVariables.i90
  36. +2
    -11
      CSharp/Equipments/ControlPanels/CHook.f90
  37. +3
    -12
      CSharp/Equipments/ControlPanels/CHook.i90
  38. +0
    -1
      CSharp/Equipments/ControlPanels/CStandPipeManifold.f90
  39. +1
    -2
      CSharp/Equipments/ControlPanels/CStandPipeManifold.i90
  40. +1
    -1
      CSharp/Equipments/ControlPanels/CTopDrivePanel.i90
  41. +2
    -2
      CSharp/Equipments/DrillWatch/DrillWatch.f90
  42. +3
    -3
      CSharp/Equipments/DrillWatch/DrillWatch.i90
  43. +0
    -3
      CSharp/Equipments/MudPathFinding/CManifolds.f90
  44. +33
    -36
      CSharp/Equipments/MudPathFinding/CManifolds.i90
  45. +1
    -1
      CSharp/OperationScenarios/Unity/UnityModule.f90
  46. +2
    -2
      CSharp/OperationScenarios/Unity/UnityModule.i90
  47. +31
    -31
      Common/json-fortran/json_value_module.i90
  48. +1
    -1
      Equipments/ChokeControl/ChokeControlMain.i90
  49. +1
    -1
      Equipments/Drawworks/Drawworks_INPUTS.i90
  50. +1
    -1
      Equipments/Drawworks/Drawworks_MainSolver.i90
  51. +1
    -1
      Equipments/Drawworks/Drawworks_Outputs.i90
  52. +1
    -1
      Equipments/MudSystem/Elements_Creation.i90
  53. +1
    -1
      Equipments/MudSystem/Kick_Influx.i90
  54. +1
    -1
      Equipments/MudSystem/MudSystem.i90
  55. +1
    -1
      Equipments/MudSystem/MudSystemStartup.i90
  56. +1
    -1
      Equipments/MudSystem/MudSystem_Variables.i90
  57. +1
    -12
      Equipments/MudSystem/Plot_Final_Mud_Elements.f90
  58. +1
    -12
      Equipments/MudSystem/Plot_Final_Mud_Elements.i90
  59. +1
    -1
      Equipments/MudSystem/Pump_and_Trip_In.i90
  60. +1
    -1
      Equipments/MudSystem/Trip_Out_andPump.i90
  61. +1
    -1
      Equipments/Pumps/PumpsMain.i90
  62. +1
    -1
      Equipments/Pumps/Pumps_Inputs.i90
  63. +1
    -1
      Equipments/Pumps/Pumps_Outputs.i90
  64. +1
    -1
      Equipments/Pumps/Pumps_StartUp.i90
  65. +1
    -1
      Equipments/Pumps/Pumps_VARIABLES.i90
  66. +0
    -77
      Equipments/RotaryTable/RTable_INPUTS.f90
  67. +1
    -1
      Equipments/RotaryTable/RTable_Inputs.i90
  68. +1
    -1
      Equipments/RotaryTable/RTable_Outputs.i90
  69. +0
    -67
      Equipments/RotaryTable/Rtable_MainSolver.f90
  70. +0
    -45
      Equipments/TopDrive/TopDrive_INPUTS.f90
  71. +1
    -1
      Equipments/TopDrive/TopDrive_Inputs.i90
  72. +1
    -1
      FluidFlow/Flow_Startup.i90
  73. +1
    -1
      FluidFlow/FluidFlowMain.i90
  74. +1
    -1
      FluidFlow/Horizontal_and_String_Pressure_Distribution.i90
  75. +2
    -1
      Makefile
  76. +2
    -2
      Redis/Redis_Interface.f90
  77. +3
    -3
      Redis/Redis_Interface.i90
  78. +1
    -0
      Redis/redis_io.c
  79. +0
    -15
      Rop/Bit_Database.txt
  80. +1
    -1
      Rop/ROP_MainCalculation.i90
  81. +1
    -1
      Simulation/SimulationVariables.f90
  82. +2
    -2
      Simulation/SimulationVariables.i90
  83. Двоични данни
     
  84. Двоични данни
     
  85. +3
    -2
      SimulationCore2.f90
  86. +4
    -3
      SimulationCore2.i90
  87. Двоични данни
     
  88. +70
    -81
      Simulator.f90
  89. +70
    -81
      Simulator.i90
  90. +1
    -1
      Test/write_vars.i90
  91. Двоични данни
     
  92. +1
    -1
      TorqueDrag/TD_DrillingSubs/MeshGeneration_FluidModule.i90
  93. +1
    -1
      TorqueDrag/TD_DrillingSubs/TD_DrillStemConfiguration.i90
  94. +1
    -1
      TorqueDrag/TD_DrillingSubs/TD_WellGeoConfiguration.i90
  95. +1
    -1
      TorqueDrag/TD_Modules/TD_DrillStem.i90
  96. +1
    -1
      TorqueDrag/TD_ReadDataSubroutines/TD_WellReadData.i90
  97. +0
    -273
      UpgradeLog.htm
  98. Двоични данни
     
  99. Двоични данни
     
  100. +2
    -3
      config-asiatech.json

+ 14
- 2
.vscode/launch.json Целия файл

@@ -26,11 +26,23 @@
]
},
{
"name": "Debug SimulationCore2",
"name": "Debug (Liara)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/SimulationCore2",
"args": ["aberama.iran.liara.ir","32815","4YKFnubfFFjfh4yTK7b0Rg9X","60f8144a-c1b7-4d1a-5d99-08db9e4e35f5","5","1000"],
"args": ["aberama.iran.liara.ir", "32815", "4YKFnubfFFjfh4yTK7b0Rg9X", "de972886-410b-440e-f8cc-08dba274a00f", "4", "1000"],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"externalConsole": false,
"MIMode": "gdb",
"preLaunchTask": "make",
},
{
"name": "Debug (Asiatech)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/SimulationCore2",
"args": ["85.198.9.229", "6379", "'1qazxsw2$$'", "72a84eb3-eee5-4104-8363-08dba3c9a113", "4", "1000"],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"externalConsole": false,


+ 8
- 8
CSharp/BasicInputs/Bha/CStringConfiguration.f90 Целия файл

@@ -29,7 +29,7 @@ module CStringConfiguration
ALLOCATE(data%Configuration%StringConfiguration%StringConfigurations(n_children))
endif
data%Configuration%StringConfiguration%StringConfigurationCount = n_children
do i=1,n_children
call json%get_child(pitems, i, pitem, found=is_found)
@@ -47,11 +47,11 @@ module CStringConfiguration
call json%get(pval,data%Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength)
call json%get(pitem,"ComponentLength",pval)
call json%get(pval,data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength)
call json%get(pitem,"NominalToolJointOd",pval)
call json%get(pval,data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd)
call json%get(pitem,"Grade",pval)
call json%get(pval,val)
data%Configuration%StringConfiguration%StringConfigurations(i)%Grade = val
! call json%get(pitem,"NominalToolJointOd",pval)
! call json%get(pval,data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd)
! call json%get(pitem,"Grade",pval)
! call json%get(pval,val)
! data%Configuration%StringConfiguration%StringConfigurations(i)%Grade = val
end do
call json%get(p,'BitDefenition',pbit)
call json%get(pbit,'BitType',pval)
@@ -92,11 +92,11 @@ module CStringConfiguration
call json%create_object(pitem,'')
call json%add(pitem,"ComponentLength",data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength)
call json%add(pitem,"ComponentType",data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentType)
call json%add(pitem,"Grade",data%Configuration%StringConfiguration%StringConfigurations(i)%Grade)
! call json%add(pitem,"Grade",data%Configuration%StringConfiguration%StringConfigurations(i)%Grade)
call json%add(pitem,"LengthPerJoint",data%Configuration%StringConfiguration%StringConfigurations(i)%LengthPerJoint)
call json%add(pitem,"NominalId",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalId)
call json%add(pitem,"NominalOd",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalOd)
call json%add(pitem,"NominalToolJointOd",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd)
! call json%add(pitem,"NominalToolJointOd",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd)
call json%add(pitem,"NumberOfJoint",data%Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint)
call json%add(pitem,"WeightPerLength",data%Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength)
call json%add(pitems,pitem)


+ 9
- 9
CSharp/BasicInputs/Bha/CStringConfiguration.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/Bha/CStringConfiguration.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/Bha/CStringConfiguration.f90"
module CStringConfiguration
use CStringConfigurationVariables
use SimulationVariables
@@ -30,7 +30,7 @@ module CStringConfiguration
ALLOCATE(data%Configuration%StringConfiguration%StringConfigurations(n_children))
endif

data%Configuration%StringConfiguration%StringConfigurationCount = n_children
do i=1,n_children
call json%get_child(pitems, i, pitem, found=is_found)
@@ -48,11 +48,11 @@ module CStringConfiguration
call json%get(pval,data%Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength)
call json%get(pitem,"ComponentLength",pval)
call json%get(pval,data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength)
call json%get(pitem,"NominalToolJointOd",pval)
call json%get(pval,data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd)
call json%get(pitem,"Grade",pval)
call json%get(pval,val)
data%Configuration%StringConfiguration%StringConfigurations(i)%Grade = val
! call json%get(pitem,"NominalToolJointOd",pval)
! call json%get(pval,data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd)
! call json%get(pitem,"Grade",pval)
! call json%get(pval,val)
! data%Configuration%StringConfiguration%StringConfigurations(i)%Grade = val
end do
call json%get(p,'BitDefenition',pbit)
call json%get(pbit,'BitType',pval)
@@ -93,11 +93,11 @@ module CStringConfiguration
call json%create_object(pitem,'')
call json%add(pitem,"ComponentLength",data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength)
call json%add(pitem,"ComponentType",data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentType)
call json%add(pitem,"Grade",data%Configuration%StringConfiguration%StringConfigurations(i)%Grade)
! call json%add(pitem,"Grade",data%Configuration%StringConfiguration%StringConfigurations(i)%Grade)
call json%add(pitem,"LengthPerJoint",data%Configuration%StringConfiguration%StringConfigurations(i)%LengthPerJoint)
call json%add(pitem,"NominalId",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalId)
call json%add(pitem,"NominalOd",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalOd)
call json%add(pitem,"NominalToolJointOd",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd)
! call json%add(pitem,"NominalToolJointOd",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd)
call json%add(pitem,"NumberOfJoint",data%Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint)
call json%add(pitem,"WeightPerLength",data%Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength)
call json%add(pitems,pitem)


+ 2
- 2
CSharp/BasicInputs/Bha/CStringConfigurationVariables.f90 Целия файл

@@ -20,8 +20,8 @@ module CStringConfigurationVariables
real(8) :: NominalId
real(8) :: WeightPerLength
real(8) :: ComponentLength
real(8) :: NominalToolJointOd
character(1) :: Grade
! real(8) :: NominalToolJointOd
! character(1) :: Grade
end type CStringItem
type, bind(c), public :: CBitInfo


+ 3
- 3
CSharp/BasicInputs/Bha/CStringConfigurationVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/Bha/CStringConfigurationVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/Bha/CStringConfigurationVariables.f90"
module CStringConfigurationVariables
implicit none
public
@@ -21,8 +21,8 @@ module CStringConfigurationVariables
real(8) :: NominalId
real(8) :: WeightPerLength
real(8) :: ComponentLength
real(8) :: NominalToolJointOd
character(1) :: Grade
! real(8) :: NominalToolJointOd
! character(1) :: Grade
end type CStringItem
type, bind(c), public :: CBitInfo


+ 1
- 1
CSharp/BasicInputs/CMudPropertiesVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/CMudPropertiesVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/CMudPropertiesVariables.f90"
module CMudPropertiesVariables
use CIActionReference
!**use CDoubleEventHandlerCollection


+ 1
- 0
CSharp/BasicInputs/Geology/CFormation.f90 Целия файл

@@ -23,6 +23,7 @@ module CFormation
if (.not. allocated(data%Configuration%Formation%Formations) .or. size(data%Configuration%Formation%Formations)/=n_children) then
ALLOCATE(data%Configuration%Formation%Formations(n_children))
endif
data%Configuration%Formation%Count = n_children
do i=1,n_children
call json%get_child(p, i, pitem, found=is_found)


+ 2
- 1
CSharp/BasicInputs/Geology/CFormation.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/Geology/CFormation.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/Geology/CFormation.f90"
module CFormation
use CFormationVariables
use SimulationVariables
@@ -24,6 +24,7 @@ module CFormation
if (.not. allocated(data%Configuration%Formation%Formations) .or. size(data%Configuration%Formation%Formations)/=n_children) then
ALLOCATE(data%Configuration%Formation%Formations(n_children))
endif
data%Configuration%Formation%Count = n_children
do i=1,n_children
call json%get_child(p, i, pitem, found=is_found)


+ 36
- 36
CSharp/BasicInputs/Geology/CReservoir.f90 Целия файл

@@ -17,20 +17,20 @@ module CReservoir
call json%get(pval,data%Configuration%Reservoir%FormationNo)
call json%get(p,'FormationTop',pval)
call json%get(pval,data%Configuration%Reservoir%FormationTop)
call json%get(p,'PressureGradient',pval)
call json%get(pval,data%Configuration%Reservoir%PressureGradient)
! call json%get(p,'PressureGradient',pval)
! call json%get(pval,data%Configuration%Reservoir%PressureGradient)
call json%get(p,'FormationPermeability',pval)
call json%get(pval,data%Configuration%Reservoir%FormationPermeability)
call json%get(p,'GeothermalGradient',pval)
call json%get(pval,data%Configuration%Reservoir%GeothermalGradient)
call json%get(p,'FluidType',pval)
call json%get(pval,data%Configuration%Reservoir%FluidType)
call json%get(p,'FluidGradient',pval)
call json%get(pval,data%Configuration%Reservoir%FluidGradient)
call json%get(p,'FluidViscosity',pval)
call json%get(pval,data%Configuration%Reservoir%FluidViscosity)
call json%get(p,'InactiveInflux',pval)
call json%get(pval,data%Configuration%Reservoir%InactiveInflux)
! call json%get(p,'GeothermalGradient',pval)
! call json%get(pval,data%Configuration%Reservoir%GeothermalGradient)
! call json%get(p,'FluidType',pval)
! call json%get(pval,data%Configuration%Reservoir%FluidType)
! call json%get(p,'FluidGradient',pval)
! call json%get(pval,data%Configuration%Reservoir%FluidGradient)
! call json%get(p,'FluidViscosity',pval)
! call json%get(pval,data%Configuration%Reservoir%FluidViscosity)
! call json%get(p,'InactiveInflux',pval)
! call json%get(pval,data%Configuration%Reservoir%InactiveInflux)
call json%get(p,'IsAutoMigrationRateSelected',pval)
call json%get(pval,data%Configuration%Reservoir%IsAutoMigrationRateSelected)
call json%get(p,'AutoMigrationRate',pval)
@@ -39,32 +39,32 @@ module CReservoir
call json%get(pval,data%Configuration%Reservoir%MakeKickSinglePacket)
end subroutine
subroutine ReservoirToJson(parent)
! subroutine ReservoirToJson(parent)
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p
! type(json_value),pointer :: parent
! type(json_core) :: json
! type(json_value),pointer :: p
! 1. create new node
call json%create_object(p,'Reservoir')
! ! 1. create new node
! call json%create_object(p,'Reservoir')
! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
call json%add(p,"AutoMigrationRate",data%Configuration%Reservoir%AutoMigrationRate)
call json%add(p,"FluidGradient",data%Configuration%Reservoir%FluidGradient)
call json%add(p,"FluidType",data%Configuration%Reservoir%FluidType)
call json%add(p,"FluidViscosity",data%Configuration%Reservoir%FluidViscosity)
call json%add(p,"FormationNo",data%Configuration%Reservoir%FormationNo)
call json%add(p,"FormationPermeability",data%Configuration%Reservoir%FormationPermeability)
call json%add(p,"FormationTop",data%Configuration%Reservoir%FormationTop)
call json%add(p,"GeothermalGradient",data%Configuration%Reservoir%GeothermalGradient)
call json%add(p,"InactiveInflux",data%Configuration%Reservoir%InactiveInflux)
call json%add(p,"IsAutoMigrationRateSelected",data%Configuration%Reservoir%IsAutoMigrationRateSelected)
call json%add(p,"MakeKickSinglePacket",data%Configuration%Reservoir%MakeKickSinglePacket)
call json%add(p,"PressureGradient",data%Configuration%Reservoir%PressureGradient)
! ! 2. add member of data type to new node
! ! call StringConfigurationToJson(p)
! ! call FormationToJson(p)
! call json%add(p,"AutoMigrationRate",data%Configuration%Reservoir%AutoMigrationRate)
! ! call json%add(p,"FluidGradient",data%Configuration%Reservoir%FluidGradient)
! ! call json%add(p,"FluidType",data%Configuration%Reservoir%FluidType)
! ! call json%add(p,"FluidViscosity",data%Configuration%Reservoir%FluidViscosity)
! call json%add(p,"FormationNo",data%Configuration%Reservoir%FormationNo)
! call json%add(p,"FormationPermeability",data%Configuration%Reservoir%FormationPermeability)
! call json%add(p,"FormationTop",data%Configuration%Reservoir%FormationTop)
! call json%add(p,"GeothermalGradient",data%Configuration%Reservoir%GeothermalGradient)
! call json%add(p,"InactiveInflux",data%Configuration%Reservoir%InactiveInflux)
! call json%add(p,"IsAutoMigrationRateSelected",data%Configuration%Reservoir%IsAutoMigrationRateSelected)
! call json%add(p,"MakeKickSinglePacket",data%Configuration%Reservoir%MakeKickSinglePacket)
! call json%add(p,"PressureGradient",data%Configuration%Reservoir%PressureGradient)
! 3. add new node to parent
call json%add(parent,p)
end subroutine
! ! 3. add new node to parent
! call json%add(parent,p)
! end subroutine
end module CReservoir

+ 37
- 37
CSharp/BasicInputs/Geology/CReservoir.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/Geology/CReservoir.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/Geology/CReservoir.f90"
module CReservoir
use SimulationVariables
use json_module
@@ -18,20 +18,20 @@ module CReservoir
call json%get(pval,data%Configuration%Reservoir%FormationNo)
call json%get(p,'FormationTop',pval)
call json%get(pval,data%Configuration%Reservoir%FormationTop)
call json%get(p,'PressureGradient',pval)
call json%get(pval,data%Configuration%Reservoir%PressureGradient)
! call json%get(p,'PressureGradient',pval)
! call json%get(pval,data%Configuration%Reservoir%PressureGradient)
call json%get(p,'FormationPermeability',pval)
call json%get(pval,data%Configuration%Reservoir%FormationPermeability)
call json%get(p,'GeothermalGradient',pval)
call json%get(pval,data%Configuration%Reservoir%GeothermalGradient)
call json%get(p,'FluidType',pval)
call json%get(pval,data%Configuration%Reservoir%FluidType)
call json%get(p,'FluidGradient',pval)
call json%get(pval,data%Configuration%Reservoir%FluidGradient)
call json%get(p,'FluidViscosity',pval)
call json%get(pval,data%Configuration%Reservoir%FluidViscosity)
call json%get(p,'InactiveInflux',pval)
call json%get(pval,data%Configuration%Reservoir%InactiveInflux)
! call json%get(p,'GeothermalGradient',pval)
! call json%get(pval,data%Configuration%Reservoir%GeothermalGradient)
! call json%get(p,'FluidType',pval)
! call json%get(pval,data%Configuration%Reservoir%FluidType)
! call json%get(p,'FluidGradient',pval)
! call json%get(pval,data%Configuration%Reservoir%FluidGradient)
! call json%get(p,'FluidViscosity',pval)
! call json%get(pval,data%Configuration%Reservoir%FluidViscosity)
! call json%get(p,'InactiveInflux',pval)
! call json%get(pval,data%Configuration%Reservoir%InactiveInflux)
call json%get(p,'IsAutoMigrationRateSelected',pval)
call json%get(pval,data%Configuration%Reservoir%IsAutoMigrationRateSelected)
call json%get(p,'AutoMigrationRate',pval)
@@ -40,32 +40,32 @@ module CReservoir
call json%get(pval,data%Configuration%Reservoir%MakeKickSinglePacket)
end subroutine

subroutine ReservoirToJson(parent)
! subroutine ReservoirToJson(parent)

type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p
! type(json_value),pointer :: parent
! type(json_core) :: json
! type(json_value),pointer :: p

! 1. create new node
call json%create_object(p,'Reservoir')
! ! 1. create new node
! call json%create_object(p,'Reservoir')
! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
call json%add(p,"AutoMigrationRate",data%Configuration%Reservoir%AutoMigrationRate)
call json%add(p,"FluidGradient",data%Configuration%Reservoir%FluidGradient)
call json%add(p,"FluidType",data%Configuration%Reservoir%FluidType)
call json%add(p,"FluidViscosity",data%Configuration%Reservoir%FluidViscosity)
call json%add(p,"FormationNo",data%Configuration%Reservoir%FormationNo)
call json%add(p,"FormationPermeability",data%Configuration%Reservoir%FormationPermeability)
call json%add(p,"FormationTop",data%Configuration%Reservoir%FormationTop)
call json%add(p,"GeothermalGradient",data%Configuration%Reservoir%GeothermalGradient)
call json%add(p,"InactiveInflux",data%Configuration%Reservoir%InactiveInflux)
call json%add(p,"IsAutoMigrationRateSelected",data%Configuration%Reservoir%IsAutoMigrationRateSelected)
call json%add(p,"MakeKickSinglePacket",data%Configuration%Reservoir%MakeKickSinglePacket)
call json%add(p,"PressureGradient",data%Configuration%Reservoir%PressureGradient)
! ! 2. add member of data type to new node
! ! call StringConfigurationToJson(p)
! ! call FormationToJson(p)
! call json%add(p,"AutoMigrationRate",data%Configuration%Reservoir%AutoMigrationRate)
! ! call json%add(p,"FluidGradient",data%Configuration%Reservoir%FluidGradient)
! ! call json%add(p,"FluidType",data%Configuration%Reservoir%FluidType)
! ! call json%add(p,"FluidViscosity",data%Configuration%Reservoir%FluidViscosity)
! call json%add(p,"FormationNo",data%Configuration%Reservoir%FormationNo)
! call json%add(p,"FormationPermeability",data%Configuration%Reservoir%FormationPermeability)
! call json%add(p,"FormationTop",data%Configuration%Reservoir%FormationTop)
! call json%add(p,"GeothermalGradient",data%Configuration%Reservoir%GeothermalGradient)
! call json%add(p,"InactiveInflux",data%Configuration%Reservoir%InactiveInflux)
! call json%add(p,"IsAutoMigrationRateSelected",data%Configuration%Reservoir%IsAutoMigrationRateSelected)
! call json%add(p,"MakeKickSinglePacket",data%Configuration%Reservoir%MakeKickSinglePacket)
! call json%add(p,"PressureGradient",data%Configuration%Reservoir%PressureGradient)

! 3. add new node to parent
call json%add(parent,p)
end subroutine
! ! 3. add new node to parent
! call json%add(parent,p)
! end subroutine
end module CReservoir

+ 5
- 5
CSharp/BasicInputs/Geology/CReservoirVariables.f90 Целия файл

@@ -10,12 +10,12 @@ module CReservoirVariables
! variables
integer :: FormationNo
real(8) :: FormationTop
real(8) :: PressureGradient
! real(8) :: PressureGradient
real(8) :: FormationPermeability
real(8) :: GeothermalGradient
integer :: FluidType
real(8) :: FluidGradient
real(8) :: FluidViscosity
! real(8) :: GeothermalGradient
! integer :: FluidType
! real(8) :: FluidGradient
! real(8) :: FluidViscosity
logical :: InactiveInflux
logical :: IsAutoMigrationRateSelected
real(8) :: AutoMigrationRate


+ 6
- 6
CSharp/BasicInputs/Geology/CReservoirVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/Geology/CReservoirVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/Geology/CReservoirVariables.f90"
module CReservoirVariables
implicit none
public
@@ -11,12 +11,12 @@ module CReservoirVariables
! variables
integer :: FormationNo
real(8) :: FormationTop
real(8) :: PressureGradient
! real(8) :: PressureGradient
real(8) :: FormationPermeability
real(8) :: GeothermalGradient
integer :: FluidType
real(8) :: FluidGradient
real(8) :: FluidViscosity
! real(8) :: GeothermalGradient
! integer :: FluidType
! real(8) :: FluidGradient
! real(8) :: FluidViscosity
logical :: InactiveInflux
logical :: IsAutoMigrationRateSelected
real(8) :: AutoMigrationRate


+ 1
- 1
CSharp/BasicInputs/Geology/CShoeVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/Geology/CShoeVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/Geology/CShoeVariables.f90"
module CShoeVariables
implicit none
public


+ 1
- 1
CSharp/BasicInputs/MudProperties.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/MudProperties.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/MudProperties.f90"
module MudPropertiesModule
use SimulationVariables
use json_module


+ 1
- 1
CSharp/BasicInputs/RigSpecifications/CBopStack.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CBopStack.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CBopStack.f90"
module CBopStack
use SimulationVariables
use json_module


+ 1
- 1
CSharp/BasicInputs/RigSpecifications/CBopStackVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CBopStackVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CBopStackVariables.f90"
module CBopStackVariables
implicit none
public


+ 3
- 0
CSharp/BasicInputs/RigSpecifications/CHoisting.f90 Целия файл

@@ -28,6 +28,9 @@ module CHoisting
call json%get(pval,data%Configuration%Hoisting%NumberOfLine)
call json%get(p,'DrillingLineBreakingLoad',pval)
call json%get(pval,data%Configuration%Hoisting%DrillingLineBreakingLoad)
!@@@
data%Configuration%Hoisting%NumberOfLine = 10
end subroutine
subroutine HoistingToJson(parent)


+ 1
- 1
CSharp/BasicInputs/RigSpecifications/CHoistingVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CHoistingVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CHoistingVariables.f90"
module CHoistingVariables
implicit none
public


+ 1
- 1
CSharp/BasicInputs/RigSpecifications/CPower.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CPower.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CPower.f90"
module CPower
use SimulationVariables
use json_module


+ 51
- 51
CSharp/BasicInputs/RigSpecifications/CPumps.f90 Целия файл

@@ -5,55 +5,55 @@ module CPumps
public
contains
subroutine PumpsToJson(parent)
! subroutine PumpsToJson(parent)
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p
! type(json_value),pointer :: parent
! type(json_core) :: json
! type(json_value),pointer :: p
! 1. create new node
call json%create_object(p,'Pumps')
! ! 1. create new node
! call json%create_object(p,'Pumps')
! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
call json%add(p,"MudPump1LinerDiameter",data%Configuration%Pumps%MudPump1LinerDiameter)
call json%add(p,"MudPump1Stroke",data%Configuration%Pumps%MudPump1Stroke)
call json%add(p,"MudPump1MechanicalEfficiency",data%Configuration%Pumps%MudPump1MechanicalEfficiency)
call json%add(p,"MudPump1VolumetricEfficiency",data%Configuration%Pumps%MudPump1VolumetricEfficiency)
call json%add(p,"MudPump1Output",data%Configuration%Pumps%MudPump1Output)
call json%add(p,"MudPump1OutputBblStroke",data%Configuration%Pumps%MudPump1OutputBblStroke)
call json%add(p,"MudPump1Maximum",data%Configuration%Pumps%MudPump1Maximum)
call json%add(p,"MudPump1ReliefValvePressure",data%Configuration%Pumps%MudPump1ReliefValvePressure)
call json%add(p,"MudPump2LinerDiameter",data%Configuration%Pumps%MudPump2LinerDiameter)
call json%add(p,"MudPump2Stroke",data%Configuration%Pumps%MudPump2Stroke)
call json%add(p,"MudPump2MechanicalEfficiency",data%Configuration%Pumps%MudPump2MechanicalEfficiency)
call json%add(p,"MudPump2VolumetricEfficiency",data%Configuration%Pumps%MudPump2VolumetricEfficiency)
call json%add(p,"MudPump2Output",data%Configuration%Pumps%MudPump2Output)
call json%add(p,"MudPump2OutputBblStroke",data%Configuration%Pumps%MudPump2OutputBblStroke)
call json%add(p,"MudPump2Maximum",data%Configuration%Pumps%MudPump2Maximum)
call json%add(p,"MudPump2ReliefValvePressure",data%Configuration%Pumps%MudPump2ReliefValvePressure)
call json%add(p,"CementPumpLinerDiameter",data%Configuration%Pumps%CementPumpLinerDiameter)
call json%add(p,"CementPumpStroke",data%Configuration%Pumps%CementPumpStroke)
call json%add(p,"CementPumpMechanicalEfficiency",data%Configuration%Pumps%CementPumpMechanicalEfficiency)
call json%add(p,"CementPumpVolumetricEfficiency",data%Configuration%Pumps%CementPumpVolumetricEfficiency)
call json%add(p,"CementPumpOutput",data%Configuration%Pumps%CementPumpOutput)
call json%add(p,"CementPumpOutputBblStroke",data%Configuration%Pumps%CementPumpOutputBblStroke)
call json%add(p,"CementPumpMaximum",data%Configuration%Pumps%CementPumpMaximum)
call json%add(p,"CementPumpReliefValvePressure ",data%Configuration%Pumps%CementPumpReliefValvePressure )
call json%add(p,"MudPump1ReliefValveIsSet",data%Configuration%Pumps%MudPump1ReliefValveIsSet)
call json%add(p,"MudPump2ReliefValveIsSet",data%Configuration%Pumps%MudPump2ReliefValveIsSet)
call json%add(p,"CementPumpReliefValveIsSet",data%Configuration%Pumps%CementPumpReliefValveIsSet)
! call json%add(p,"ManualPumpPower",data%Configuration%Pumps%ManualPumpPower)
! call json%add(p,"Valve1",data%Configuration%Pumps%Valve1)
! call json%add(p,"Valve2",data%Configuration%Pumps%Valve2)
! call json%add(p,"Valve3",data%Configuration%Pumps%Valve3)
! call json%add(p,"Valve4",data%Configuration%Pumps%Valve4)
! call json%add(p,"Valve5",data%Configuration%Pumps%Valve5)
! ! 2. add member of data type to new node
! ! call StringConfigurationToJson(p)
! ! call FormationToJson(p)
! call json%add(p,"MudPump1LinerDiameter",data%Configuration%Pumps%MudPump1LinerDiameter)
! call json%add(p,"MudPump1Stroke",data%Configuration%Pumps%MudPump1Stroke)
! call json%add(p,"MudPump1MechanicalEfficiency",data%Configuration%Pumps%MudPump1MechanicalEfficiency)
! call json%add(p,"MudPump1VolumetricEfficiency",data%Configuration%Pumps%MudPump1VolumetricEfficiency)
! call json%add(p,"MudPump1Output",data%Configuration%Pumps%MudPump1Output)
! call json%add(p,"MudPump1OutputBblStroke",data%Configuration%Pumps%MudPump1OutputBblStroke)
! call json%add(p,"MudPump1Maximum",data%Configuration%Pumps%MudPump1Maximum)
! call json%add(p,"MudPump1ReliefValvePressure",data%Configuration%Pumps%MudPump1ReliefValvePressure)
! call json%add(p,"MudPump2LinerDiameter",data%Configuration%Pumps%MudPump2LinerDiameter)
! call json%add(p,"MudPump2Stroke",data%Configuration%Pumps%MudPump2Stroke)
! call json%add(p,"MudPump2MechanicalEfficiency",data%Configuration%Pumps%MudPump2MechanicalEfficiency)
! ! call json%add(p,"MudPump2VolumetricEfficiency",data%Configuration%Pumps%MudPump2VolumetricEfficiency)
! call json%add(p,"MudPump2Output",data%Configuration%Pumps%MudPump2Output)
! call json%add(p,"MudPump2OutputBblStroke",data%Configuration%Pumps%MudPump2OutputBblStroke)
! call json%add(p,"MudPump2Maximum",data%Configuration%Pumps%MudPump2Maximum)
! call json%add(p,"MudPump2ReliefValvePressure",data%Configuration%Pumps%MudPump2ReliefValvePressure)
! call json%add(p,"CementPumpLinerDiameter",data%Configuration%Pumps%CementPumpLinerDiameter)
! call json%add(p,"CementPumpStroke",data%Configuration%Pumps%CementPumpStroke)
! call json%add(p,"CementPumpMechanicalEfficiency",data%Configuration%Pumps%CementPumpMechanicalEfficiency)
! ! call json%add(p,"CementPumpVolumetricEfficiency",data%Configuration%Pumps%CementPumpVolumetricEfficiency)
! call json%add(p,"CementPumpOutput",data%Configuration%Pumps%CementPumpOutput)
! call json%add(p,"CementPumpOutputBblStroke",data%Configuration%Pumps%CementPumpOutputBblStroke)
! call json%add(p,"CementPumpMaximum",data%Configuration%Pumps%CementPumpMaximum)
! call json%add(p,"CementPumpReliefValvePressure ",data%Configuration%Pumps%CementPumpReliefValvePressure )
! call json%add(p,"MudPump1ReliefValveIsSet",data%Configuration%Pumps%MudPump1ReliefValveIsSet)
! call json%add(p,"MudPump2ReliefValveIsSet",data%Configuration%Pumps%MudPump2ReliefValveIsSet)
! call json%add(p,"CementPumpReliefValveIsSet",data%Configuration%Pumps%CementPumpReliefValveIsSet)
! ! call json%add(p,"ManualPumpPower",data%Configuration%Pumps%ManualPumpPower)
! ! call json%add(p,"Valve1",data%Configuration%Pumps%Valve1)
! ! call json%add(p,"Valve2",data%Configuration%Pumps%Valve2)
! ! call json%add(p,"Valve3",data%Configuration%Pumps%Valve3)
! ! call json%add(p,"Valve4",data%Configuration%Pumps%Valve4)
! ! call json%add(p,"Valve5",data%Configuration%Pumps%Valve5)
! 3. add new node to parent
call json%add(parent,p)
end subroutine
! ! 3. add new node to parent
! call json%add(parent,p)
! end subroutine
subroutine PumpsFromJson(parent)
use json_module,IK =>json_ik
@@ -69,8 +69,8 @@ module CPumps
call json%get(pitem,data%Configuration%Pumps%MudPump1Stroke)
call json%get(p,"MudPump1MechanicalEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1MechanicalEfficiency)
call json%get(p,"MudPump1VolumetricEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricEfficiency)
! call json%get(p,"MudPump1VolumetricEfficiency",pitem)
! call json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricEfficiency)
call json%get(p,"MudPump1Output",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1Output)
call json%get(p,"MudPump1OutputBblStroke",pitem)
@@ -85,8 +85,8 @@ module CPumps
call json%get(pitem,data%Configuration%Pumps%MudPump2Stroke)
call json%get(p,"MudPump2MechanicalEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2MechanicalEfficiency)
call json%get(p,"MudPump2VolumetricEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricEfficiency)
! call json%get(p,"MudPump2VolumetricEfficiency",pitem)
! call json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricEfficiency)
call json%get(p,"MudPump2Output",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2Output)
call json%get(p,"MudPump2OutputBblStroke",pitem)
@@ -101,8 +101,8 @@ module CPumps
call json%get(pitem,data%Configuration%Pumps%CementPumpStroke)
call json%get(p,"CementPumpMechanicalEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpMechanicalEfficiency)
call json%get(p,"CementPumpVolumetricEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricEfficiency)
! call json%get(p,"CementPumpVolumetricEfficiency",pitem)
! call json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricEfficiency)
call json%get(p,"CementPumpOutput",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpOutput)
call json%get(p,"CementPumpOutputBblStroke",pitem)


+ 52
- 52
CSharp/BasicInputs/RigSpecifications/CPumps.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CPumps.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CPumps.f90"
module CPumps
use SimulationVariables
use json_module
@@ -6,55 +6,55 @@ module CPumps
public
contains

subroutine PumpsToJson(parent)
! subroutine PumpsToJson(parent)

type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p
! type(json_value),pointer :: parent
! type(json_core) :: json
! type(json_value),pointer :: p

! 1. create new node
call json%create_object(p,'Pumps')
! ! 1. create new node
! call json%create_object(p,'Pumps')
! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
call json%add(p,"MudPump1LinerDiameter",data%Configuration%Pumps%MudPump1LinerDiameter)
call json%add(p,"MudPump1Stroke",data%Configuration%Pumps%MudPump1Stroke)
call json%add(p,"MudPump1MechanicalEfficiency",data%Configuration%Pumps%MudPump1MechanicalEfficiency)
call json%add(p,"MudPump1VolumetricEfficiency",data%Configuration%Pumps%MudPump1VolumetricEfficiency)
call json%add(p,"MudPump1Output",data%Configuration%Pumps%MudPump1Output)
call json%add(p,"MudPump1OutputBblStroke",data%Configuration%Pumps%MudPump1OutputBblStroke)
call json%add(p,"MudPump1Maximum",data%Configuration%Pumps%MudPump1Maximum)
call json%add(p,"MudPump1ReliefValvePressure",data%Configuration%Pumps%MudPump1ReliefValvePressure)
call json%add(p,"MudPump2LinerDiameter",data%Configuration%Pumps%MudPump2LinerDiameter)
call json%add(p,"MudPump2Stroke",data%Configuration%Pumps%MudPump2Stroke)
call json%add(p,"MudPump2MechanicalEfficiency",data%Configuration%Pumps%MudPump2MechanicalEfficiency)
call json%add(p,"MudPump2VolumetricEfficiency",data%Configuration%Pumps%MudPump2VolumetricEfficiency)
call json%add(p,"MudPump2Output",data%Configuration%Pumps%MudPump2Output)
call json%add(p,"MudPump2OutputBblStroke",data%Configuration%Pumps%MudPump2OutputBblStroke)
call json%add(p,"MudPump2Maximum",data%Configuration%Pumps%MudPump2Maximum)
call json%add(p,"MudPump2ReliefValvePressure",data%Configuration%Pumps%MudPump2ReliefValvePressure)
call json%add(p,"CementPumpLinerDiameter",data%Configuration%Pumps%CementPumpLinerDiameter)
call json%add(p,"CementPumpStroke",data%Configuration%Pumps%CementPumpStroke)
call json%add(p,"CementPumpMechanicalEfficiency",data%Configuration%Pumps%CementPumpMechanicalEfficiency)
call json%add(p,"CementPumpVolumetricEfficiency",data%Configuration%Pumps%CementPumpVolumetricEfficiency)
call json%add(p,"CementPumpOutput",data%Configuration%Pumps%CementPumpOutput)
call json%add(p,"CementPumpOutputBblStroke",data%Configuration%Pumps%CementPumpOutputBblStroke)
call json%add(p,"CementPumpMaximum",data%Configuration%Pumps%CementPumpMaximum)
call json%add(p,"CementPumpReliefValvePressure ",data%Configuration%Pumps%CementPumpReliefValvePressure )
call json%add(p,"MudPump1ReliefValveIsSet",data%Configuration%Pumps%MudPump1ReliefValveIsSet)
call json%add(p,"MudPump2ReliefValveIsSet",data%Configuration%Pumps%MudPump2ReliefValveIsSet)
call json%add(p,"CementPumpReliefValveIsSet",data%Configuration%Pumps%CementPumpReliefValveIsSet)
! call json%add(p,"ManualPumpPower",data%Configuration%Pumps%ManualPumpPower)
! call json%add(p,"Valve1",data%Configuration%Pumps%Valve1)
! call json%add(p,"Valve2",data%Configuration%Pumps%Valve2)
! call json%add(p,"Valve3",data%Configuration%Pumps%Valve3)
! call json%add(p,"Valve4",data%Configuration%Pumps%Valve4)
! call json%add(p,"Valve5",data%Configuration%Pumps%Valve5)
! ! 2. add member of data type to new node
! ! call StringConfigurationToJson(p)
! ! call FormationToJson(p)
! call json%add(p,"MudPump1LinerDiameter",data%Configuration%Pumps%MudPump1LinerDiameter)
! call json%add(p,"MudPump1Stroke",data%Configuration%Pumps%MudPump1Stroke)
! call json%add(p,"MudPump1MechanicalEfficiency",data%Configuration%Pumps%MudPump1MechanicalEfficiency)
! call json%add(p,"MudPump1VolumetricEfficiency",data%Configuration%Pumps%MudPump1VolumetricEfficiency)
! call json%add(p,"MudPump1Output",data%Configuration%Pumps%MudPump1Output)
! call json%add(p,"MudPump1OutputBblStroke",data%Configuration%Pumps%MudPump1OutputBblStroke)
! call json%add(p,"MudPump1Maximum",data%Configuration%Pumps%MudPump1Maximum)
! call json%add(p,"MudPump1ReliefValvePressure",data%Configuration%Pumps%MudPump1ReliefValvePressure)
! call json%add(p,"MudPump2LinerDiameter",data%Configuration%Pumps%MudPump2LinerDiameter)
! call json%add(p,"MudPump2Stroke",data%Configuration%Pumps%MudPump2Stroke)
! call json%add(p,"MudPump2MechanicalEfficiency",data%Configuration%Pumps%MudPump2MechanicalEfficiency)
! ! call json%add(p,"MudPump2VolumetricEfficiency",data%Configuration%Pumps%MudPump2VolumetricEfficiency)
! call json%add(p,"MudPump2Output",data%Configuration%Pumps%MudPump2Output)
! call json%add(p,"MudPump2OutputBblStroke",data%Configuration%Pumps%MudPump2OutputBblStroke)
! call json%add(p,"MudPump2Maximum",data%Configuration%Pumps%MudPump2Maximum)
! call json%add(p,"MudPump2ReliefValvePressure",data%Configuration%Pumps%MudPump2ReliefValvePressure)
! call json%add(p,"CementPumpLinerDiameter",data%Configuration%Pumps%CementPumpLinerDiameter)
! call json%add(p,"CementPumpStroke",data%Configuration%Pumps%CementPumpStroke)
! call json%add(p,"CementPumpMechanicalEfficiency",data%Configuration%Pumps%CementPumpMechanicalEfficiency)
! ! call json%add(p,"CementPumpVolumetricEfficiency",data%Configuration%Pumps%CementPumpVolumetricEfficiency)
! call json%add(p,"CementPumpOutput",data%Configuration%Pumps%CementPumpOutput)
! call json%add(p,"CementPumpOutputBblStroke",data%Configuration%Pumps%CementPumpOutputBblStroke)
! call json%add(p,"CementPumpMaximum",data%Configuration%Pumps%CementPumpMaximum)
! call json%add(p,"CementPumpReliefValvePressure ",data%Configuration%Pumps%CementPumpReliefValvePressure )
! call json%add(p,"MudPump1ReliefValveIsSet",data%Configuration%Pumps%MudPump1ReliefValveIsSet)
! call json%add(p,"MudPump2ReliefValveIsSet",data%Configuration%Pumps%MudPump2ReliefValveIsSet)
! call json%add(p,"CementPumpReliefValveIsSet",data%Configuration%Pumps%CementPumpReliefValveIsSet)
! ! call json%add(p,"ManualPumpPower",data%Configuration%Pumps%ManualPumpPower)
! ! call json%add(p,"Valve1",data%Configuration%Pumps%Valve1)
! ! call json%add(p,"Valve2",data%Configuration%Pumps%Valve2)
! ! call json%add(p,"Valve3",data%Configuration%Pumps%Valve3)
! ! call json%add(p,"Valve4",data%Configuration%Pumps%Valve4)
! ! call json%add(p,"Valve5",data%Configuration%Pumps%Valve5)
! 3. add new node to parent
call json%add(parent,p)
end subroutine
! ! 3. add new node to parent
! call json%add(parent,p)
! end subroutine

subroutine PumpsFromJson(parent)
use json_module,IK =>json_ik
@@ -70,8 +70,8 @@ module CPumps
call json%get(pitem,data%Configuration%Pumps%MudPump1Stroke)
call json%get(p,"MudPump1MechanicalEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1MechanicalEfficiency)
call json%get(p,"MudPump1VolumetricEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricEfficiency)
! call json%get(p,"MudPump1VolumetricEfficiency",pitem)
! call json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricEfficiency)
call json%get(p,"MudPump1Output",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1Output)
call json%get(p,"MudPump1OutputBblStroke",pitem)
@@ -86,8 +86,8 @@ module CPumps
call json%get(pitem,data%Configuration%Pumps%MudPump2Stroke)
call json%get(p,"MudPump2MechanicalEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2MechanicalEfficiency)
call json%get(p,"MudPump2VolumetricEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricEfficiency)
! call json%get(p,"MudPump2VolumetricEfficiency",pitem)
! call json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricEfficiency)
call json%get(p,"MudPump2Output",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2Output)
call json%get(p,"MudPump2OutputBblStroke",pitem)
@@ -102,8 +102,8 @@ module CPumps
call json%get(pitem,data%Configuration%Pumps%CementPumpStroke)
call json%get(p,"CementPumpMechanicalEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpMechanicalEfficiency)
call json%get(p,"CementPumpVolumetricEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricEfficiency)
! call json%get(p,"CementPumpVolumetricEfficiency",pitem)
! call json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricEfficiency)
call json%get(p,"CementPumpOutput",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpOutput)
call json%get(p,"CementPumpOutputBblStroke",pitem)


+ 9
- 9
CSharp/BasicInputs/RigSpecifications/CPumpsVariables.f90 Целия файл

@@ -9,7 +9,7 @@ module CPumpsVariables
real(8) :: MudPump1LinerDiameter
real(8) :: MudPump1Stroke
real(8) :: MudPump1MechanicalEfficiency
real(8) :: MudPump1VolumetricEfficiency
! real(8) :: MudPump1VolumetricEfficiency
real(8) :: MudPump1Output
real(8) :: MudPump1OutputBblStroke
real(8) :: MudPump1Maximum
@@ -18,7 +18,7 @@ module CPumpsVariables
real(8) :: MudPump2LinerDiameter
real(8) :: MudPump2Stroke
real(8) :: MudPump2MechanicalEfficiency
real(8) :: MudPump2VolumetricEfficiency
! real(8) :: MudPump2VolumetricEfficiency
real(8) :: MudPump2Output
real(8) :: MudPump2OutputBblStroke
real(8) :: MudPump2Maximum
@@ -27,7 +27,7 @@ module CPumpsVariables
real(8) :: CementPumpLinerDiameter
real(8) :: CementPumpStroke
real(8) :: CementPumpMechanicalEfficiency
real(8) :: CementPumpVolumetricEfficiency
! real(8) :: CementPumpVolumetricEfficiency
real(8) :: CementPumpOutput
real(8) :: CementPumpOutputBblStroke
real(8) :: CementPumpMaximum
@@ -37,12 +37,12 @@ module CPumpsVariables
logical :: MudPump2ReliefValveIsSet
logical :: CementPumpReliefValveIsSet
! logical :: ManualPumpPower
! logical :: Valve1
! logical :: Valve2
! logical :: Valve3
! logical :: Valve4
! logical :: Valve5
real(8) :: MudPump1VolumetricOutput
! Newly added
Real(8) :: MudPump1MaximumPressure,MudPump1PumpRateChange,MudPump1SurfaceLineLength,MudPump1DelayToShutdown
Real(8) :: MudPump2MaximumPressure,MudPump2PumpRateChange,MudPump2SurfaceLineLength,MudPump2DelayToShutdown
Real(8) :: CementPumpMaximumPressure,CementPumpPumpRateChange,CementPumpSurfaceLineLength,CementPumpDelayToShutdown
End type PumpSpecificationType
! Type(PumpSpecificationType)::PumpsSpecification


+ 10
- 10
CSharp/BasicInputs/RigSpecifications/CPumpsVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CPumpsVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CPumpsVariables.f90"
module CPumpsVariables
use CIActionReference
implicit none
@@ -10,7 +10,7 @@ module CPumpsVariables
real(8) :: MudPump1LinerDiameter
real(8) :: MudPump1Stroke
real(8) :: MudPump1MechanicalEfficiency
real(8) :: MudPump1VolumetricEfficiency
! real(8) :: MudPump1VolumetricEfficiency
real(8) :: MudPump1Output
real(8) :: MudPump1OutputBblStroke
real(8) :: MudPump1Maximum
@@ -19,7 +19,7 @@ module CPumpsVariables
real(8) :: MudPump2LinerDiameter
real(8) :: MudPump2Stroke
real(8) :: MudPump2MechanicalEfficiency
real(8) :: MudPump2VolumetricEfficiency
! real(8) :: MudPump2VolumetricEfficiency
real(8) :: MudPump2Output
real(8) :: MudPump2OutputBblStroke
real(8) :: MudPump2Maximum
@@ -28,7 +28,7 @@ module CPumpsVariables
real(8) :: CementPumpLinerDiameter
real(8) :: CementPumpStroke
real(8) :: CementPumpMechanicalEfficiency
real(8) :: CementPumpVolumetricEfficiency
! real(8) :: CementPumpVolumetricEfficiency
real(8) :: CementPumpOutput
real(8) :: CementPumpOutputBblStroke
real(8) :: CementPumpMaximum
@@ -38,12 +38,12 @@ module CPumpsVariables
logical :: MudPump2ReliefValveIsSet
logical :: CementPumpReliefValveIsSet
! logical :: ManualPumpPower
! logical :: Valve1
! logical :: Valve2
! logical :: Valve3
! logical :: Valve4
! logical :: Valve5
real(8) :: MudPump1VolumetricOutput
! Newly added
Real(8) :: MudPump1MaximumPressure,MudPump1PumpRateChange,MudPump1SurfaceLineLength,MudPump1DelayToShutdown
Real(8) :: MudPump2MaximumPressure,MudPump2PumpRateChange,MudPump2SurfaceLineLength,MudPump2DelayToShutdown
Real(8) :: CementPumpMaximumPressure,CementPumpPumpRateChange,CementPumpSurfaceLineLength,CementPumpDelayToShutdown
End type PumpSpecificationType
! Type(PumpSpecificationType)::PumpsSpecification


+ 1
- 1
CSharp/BasicInputs/WellProfile/CCasingLinerChoke.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/WellProfile/CCasingLinerChoke.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/WellProfile/CCasingLinerChoke.f90"
module CCasingLinerChoke
use SimulationVariables
use json_module


+ 1
- 1
CSharp/BasicInputs/WellProfile/CCasingLinerChokeVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/WellProfile/CCasingLinerChokeVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/WellProfile/CCasingLinerChokeVariables.f90"
module CCasingLinerChokeVariables
implicit none
public


+ 1
- 1
CSharp/BasicInputs/WellProfile/CPathGeneration.f90 Целия файл

@@ -62,7 +62,7 @@ module CPathGeneration
DEALLOCATE(data%Configuration%Path%Items)
ALLOCATE(data%Configuration%Path%Items(n_children))
endif
data%Configuration%Path%ItemCount = n_children
do i=1,n_children
call json%get_child(pitems, i, pitem, found=is_found)
call json%get(pitem,"HoleType",pval)


+ 2
- 2
CSharp/BasicInputs/WellProfile/CPathGeneration.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/WellProfile/CPathGeneration.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/WellProfile/CPathGeneration.f90"
module CPathGeneration
use SimulationVariables !@
use json_module
@@ -63,7 +63,7 @@ module CPathGeneration
DEALLOCATE(data%Configuration%Path%Items)
ALLOCATE(data%Configuration%Path%Items(n_children))
endif
data%Configuration%Path%ItemCount = n_children
do i=1,n_children
call json%get_child(pitems, i, pitem, found=is_found)
call json%get(pitem,"HoleType",pval)


+ 1
- 1
CSharp/BasicInputs/WellProfile/CPathGenerationVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/WellProfile/CPathGenerationVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/WellProfile/CPathGenerationVariables.f90"
module CPathGenerationVariables
implicit none
public


+ 1
- 1
CSharp/Equipments/ControlPanels/CBopControlPanel.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CBopControlPanel.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CBopControlPanel.f90"
module CBopControlPanel
! use CBopControlPanel
use SimulationVariables


+ 2
- 2
CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90 Целия файл

@@ -282,8 +282,8 @@ module CDataDisplayConsole
implicit none
real(8), intent(in) :: v
! print *,"total depth = ",v
data%Equipments%DataDisplayConsole%TotalWellDepth = 1000
data%Equipments%DrillingWatch%Depth = 1000
data%Equipments%DataDisplayConsole%TotalWellDepth = v
data%Equipments%DrillingWatch%Depth = v
! call SetDistanceDrilled(v)
end subroutine


+ 3
- 3
CSharp/Equipments/ControlPanels/CDataDisplayConsole.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90"
module CDataDisplayConsole
! use CDataDisplayConsole
use SimulationVariables
@@ -283,8 +283,8 @@ module CDataDisplayConsole
implicit none
real(8), intent(in) :: v
! print *,"total depth = ",v
data%Equipments%DataDisplayConsole%TotalWellDepth = 1000
data%Equipments%DrillingWatch%Depth = 1000
data%Equipments%DataDisplayConsole%TotalWellDepth = v
data%Equipments%DrillingWatch%Depth = v
! call SetDistanceDrilled(v)
end subroutine


+ 1
- 1
CSharp/Equipments/ControlPanels/CDataDisplayConsoleVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CDataDisplayConsoleVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CDataDisplayConsoleVariables.f90"
module CDataDisplayConsoleVariables
use CIActionReference
! !**use CDoubleEventHandlerCollection


+ 115
- 226
CSharp/Equipments/ControlPanels/CDrillingConsole.f90 Целия файл

@@ -10,182 +10,125 @@ module CDrillingConsole
contains


subroutine DrillingConsoleFromJson(parent)
subroutine DrillingConsoleFromJson(jsonfile)
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pval
type(json_file)::jsonfile
logical::found

! 1. get related root
call json%get(parent,'Drilling',p)
! 2. get member of data type from node
call json%get(p,'AssignmentSwitch',pval)
call json%get(pval,data%Equipments%DrillingConsole%AssignmentSwitch)
call json%get(p,'EmergencySwitch',pval)
call json%get(pval,data%Equipments%DrillingConsole%EmergencySwitch)
call json%get(p,'RTTorqueLimitKnob',pval)
call json%get(pval,data%Equipments%DrillingConsole%RTTorqueLimitKnob)
call json%get(p,'MP1CPSwitchI',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP1CPSwitchI)
call json%get(p,'MP1CPSwitchT',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP1CPSwitchT)
call json%get(p,'MP1CPSwitch',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP1CPSwitch)
call json%get(p,'MP1ThrottleUpdate',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP1ThrottleUpdate)
call json%get(p,'MP1Throttle',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP1Throttle)
call json%get(p,'MP2SwitchI',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP2SwitchI)
call json%get(p,'MP2SwitchT',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP2SwitchT)
call json%get(p,'MP2Switch',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP2Switch)
call json%get(p,'MP2ThrottleUpdate',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP2ThrottleUpdate)
call json%get(p,'MP2Throttle',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP2Throttle)
call json%get(p,'DWSwitch',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWSwitch)
call json%get(p,'DWThrottle',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWThrottle)
call json%get(p,'RTSwitch',pval)
call json%get(pval,data%Equipments%DrillingConsole%RTSwitch)
call json%get(p,'RTThrottle',pval)
call json%get(pval,data%Equipments%DrillingConsole%RTThrottle)
call json%get(p,'DWBreak',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWBreak)
call json%get(p,'PreviousDWBreak',pval)
call json%get(pval,data%Equipments%DrillingConsole%PreviousDWBreak)
call json%get(p,'ForceBreak',pval)
call json%get(pval,data%Equipments%DrillingConsole%ForceBreak)
call json%get(p,'DWAcceleretor',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWAcceleretor)
call json%get(p,'DWTransmisionLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWTransmisionLever)
call json%get(p,'DWPowerLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWPowerLever)
call json%get(p,'TongLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%TongLever)
call json%get(p,'RTTransmissionLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%RTTransmissionLever)
call json%get(p,'DWClutchLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWClutchLever)
call json%get(p,'EddyBreakLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%EddyBreakLever)
call json%get(p,'AutoDW',pval)
call json%get(pval,data%Equipments%DrillingConsole%AutoDW)
call json%get(p,'GEN1',pval)
call json%get(pval,data%Equipments%DrillingConsole%GEN1)
call json%get(p,'GEN2',pval)
call json%get(pval,data%Equipments%DrillingConsole%GEN2)
call json%get(p,'GEN3',pval)
call json%get(pval,data%Equipments%DrillingConsole%GEN3)
call json%get(p,'GEN4',pval)
call json%get(pval,data%Equipments%DrillingConsole%GEN4)
call json%get(p,'Permission_OpenKellyCock',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_OpenKellyCock)
call json%get(p,'OpenKellyCock',pval)
call json%get(pval,data%Equipments%DrillingConsole%OpenKellyCock)
call json%get(p,'Permission_CloseKellyCock',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_CloseKellyCock)
call json%get(p,'CloseKellyCock',pval)
call json%get(pval,data%Equipments%DrillingConsole%CloseKellyCock)
call json%get(p,'Permission_OpenSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_OpenSafetyValve)
call json%get(p,'OpenSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%OpenSafetyValve)
call json%get(p,'Permission_CloseSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_CloseSafetyValve)
call json%get(p,'CloseSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%CloseSafetyValve)
call json%get(p,'Permission_IRSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_IRSafetyValve)
call json%get(p,'IRSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%IRSafetyValve)
call json%get(p,'Permission_IRIBop',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_IRIBop)
call json%get(p,'IRIBop',pval)
call json%get(pval,data%Equipments%DrillingConsole%IRIBop)
call json%get(p,'LatchPipe',pval)
call json%get(pval,data%Equipments%DrillingConsole%LatchPipe)
call json%get(p,'UnlatchPipe',pval)
call json%get(pval,data%Equipments%DrillingConsole%UnlatchPipe)
call json%get(p,'Swing',pval)
call json%get(pval,data%Equipments%DrillingConsole%Swing)
call json%get(p,'FillMouseHole',pval)
call json%get(pval,data%Equipments%DrillingConsole%FillMouseHole)
call json%get(p,'Slips',pval)
call json%get(pval,data%Equipments%DrillingConsole%Slips)
call json%get(p,'BrakeLeverCoefficient',pval)
call json%get(pval,data%Equipments%DrillingConsole%BrakeLeverCoefficient)
call json%get(p,'HideDrillingBrake',pval)
call json%get(pval,data%Equipments%DrillingConsole%HideDrillingBrake)
call json%get(p,'ParkingBrakeBtn',pval)
call json%get(pval,data%Equipments%DrillingConsole%ParkingBrakeBtn)
call jsonfile%get('Equipments.Drilling.AssignmentSwitch',data%Equipments%DrillingConsole%AssignmentSwitch,found)
if ( .not. found ) call logg(4,"Not found: AssignmentSwitch")
call jsonfile%get('Equipments.Drilling.EmergencySwitch',data%Equipments%DrillingConsole%EmergencySwitch,found)
if ( .not. found ) call logg(4,"Not found: EmergencySwitch")
call jsonfile%get('Equipments.Drilling.RTTorqueLimitKnob',data%Equipments%DrillingConsole%RTTorqueLimitKnob,found)
if ( .not. found ) call logg(4,"Not found: RTTorqueLimitKnob")
call jsonfile%get('Equipments.Drilling.MP1CPSwitchI',data%Equipments%DrillingConsole%MP1CPSwitchI,found)
if ( .not. found ) call logg(4,"Not found: MP1CPSwitchI")
call jsonfile%get('Equipments.Drilling.MP1CPSwitchT',data%Equipments%DrillingConsole%MP1CPSwitchT,found)
if ( .not. found ) call logg(4,"Not found: MP1CPSwitchT")
call jsonfile%get('Equipments.Drilling.MP1CPSwitch',data%Equipments%DrillingConsole%MP1CPSwitch,found)
if ( .not. found ) call logg(4,"Not found: MP1CPSwitch")
call jsonfile%get('Equipments.Drilling.MP1ThrottleUpdate',data%Equipments%DrillingConsole%MP1ThrottleUpdate,found)
if ( .not. found ) call logg(4,"Not found: MP1ThrottleUpdate")
call jsonfile%get('Equipments.Drilling.MP1Throttle',data%Equipments%DrillingConsole%MP1Throttle,found)
if ( .not. found ) then
call logg(4,"Not found: MP1Throttle")
endif
call jsonfile%get('Equipments.Drilling.MP2SwitchI',data%Equipments%DrillingConsole%MP2SwitchI,found)
if ( .not. found ) call logg(4,"Not found: MP2SwitchI")
call jsonfile%get('Equipments.Drilling.MP2SwitchT',data%Equipments%DrillingConsole%MP2SwitchT,found)
if ( .not. found ) call logg(4,"Not found: MP2SwitchT")
call jsonfile%get('Equipments.Drilling.MP2Switch',data%Equipments%DrillingConsole%MP2Switch,found)
if ( .not. found ) call logg(4,"Not found: MP2Switch")
call jsonfile%get('Equipments.Drilling.MP2ThrottleUpdate',data%Equipments%DrillingConsole%MP2ThrottleUpdate,found)
if ( .not. found ) call logg(4,"Not found: MP2ThrottleUpdate")
call jsonfile%get('Equipments.Drilling.MP2Throttle',data%Equipments%DrillingConsole%MP2Throttle,found)
if ( .not. found ) call logg(4,"Not found: MP2Throttle")
! call jsonfile%get('Equipments.Drilling.DWSwitch',data%Equipments%DrillingConsole%DWSwitch,found)
! if ( .not. found ) call logg(4,"Not found: DWSwitch")
call jsonfile%get('Equipments.Drilling.DWThrottle',data%Equipments%DrillingConsole%DWThrottle,found)
if ( .not. found ) call logg(4,"Not found: DWThrottle")
call jsonfile%get('Equipments.Drilling.RTSwitch',data%Equipments%DrillingConsole%RTSwitch,found)
if ( .not. found ) call logg(4,"Not found: RTSwitch")
call jsonfile%get('Equipments.Drilling.RTThrottle',data%Equipments%DrillingConsole%RTThrottle,found)
if ( .not. found ) call logg(4,"Not found: RTThrottle")
call jsonfile%get('Equipments.Drilling.DWBreak',data%Equipments%DrillingConsole%DWBreak,found)
if ( .not. found ) call logg(4,"Not found: DWBreak")
call jsonfile%get('Equipments.Drilling.PreviousDWBreak',data%Equipments%DrillingConsole%PreviousDWBreak,found)
if ( .not. found ) call logg(4,"Not found: PreviousDWBreak")
call jsonfile%get('Equipments.Drilling.ForceBreak',data%Equipments%DrillingConsole%ForceBreak,found)
if ( .not. found ) call logg(4,"Not found: ForceBreak")
call jsonfile%get('Equipments.Drilling.DWAcceleretor',data%Equipments%DrillingConsole%DWAcceleretor,found)
if ( .not. found ) call logg(4,"Not found: DWAcceleretor")
call jsonfile%get('Equipments.Drilling.DWTransmisionLever',data%Equipments%DrillingConsole%DWTransmisionLever,found)
if ( .not. found ) call logg(4,"Not found: DWTransmisionLever")
call jsonfile%get('Equipments.Drilling.DWPowerLever',data%Equipments%DrillingConsole%DWPowerLever,found)
if ( .not. found ) call logg(4,"Not found: DWPowerLever")
call jsonfile%get('Equipments.Drilling.TongLever',data%Equipments%DrillingConsole%TongLever,found)
if ( .not. found ) call logg(4,"Not found: TongLever")
call jsonfile%get('Equipments.Drilling.RTTransmissionLever',data%Equipments%DrillingConsole%RTTransmissionLever,found)
if ( .not. found ) call logg(4,"Not found: RTTransmissionLever")
call jsonfile%get('Equipments.Drilling.DWClutchLever',data%Equipments%DrillingConsole%DWClutchLever,found)
if ( .not. found ) call logg(4,"Not found: DWClutchLever")
call jsonfile%get('Equipments.Drilling.EddyBreakLever',data%Equipments%DrillingConsole%EddyBreakLever,found)
if ( .not. found ) call logg(4,"Not found: EddyBreakLever")
call jsonfile%get('Equipments.Drilling.AutoDW',data%Equipments%DrillingConsole%AutoDW,found)
if ( .not. found ) call logg(4,"Not found: AutoDW")
call jsonfile%get('Equipments.Drilling.GEN1',data%Equipments%DrillingConsole%GEN1,found)
if ( .not. found ) call logg(4,"Not found: GEN1")
call jsonfile%get('Equipments.Drilling.GEN2',data%Equipments%DrillingConsole%GEN2,found)
if ( .not. found ) call logg(4,"Not found: GEN2")
call jsonfile%get('Equipments.Drilling.GEN3',data%Equipments%DrillingConsole%GEN3,found)
if ( .not. found ) call logg(4,"Not found: GEN3")
call jsonfile%get('Equipments.Drilling.GEN4',data%Equipments%DrillingConsole%GEN4,found)
if ( .not. found ) call logg(4,"Not found: GEN4")
call jsonfile%get('Equipments.Drilling.Permission_OpenKellyCock',data%Equipments%DrillingConsole%Permission_OpenKellyCock,found)
if ( .not. found ) call logg(4,"Not found: Permission_OpenKellyCock")
call jsonfile%get('Equipments.Drilling.OpenKellyCock',data%Equipments%DrillingConsole%OpenKellyCock,found)
if ( .not. found ) call logg(4,"Not found: OpenKellyCock")
call jsonfile%get('Equipments.Drilling.Permission_CloseKellyCock',data%Equipments%DrillingConsole%Permission_CloseKellyCock,found)
if ( .not. found ) call logg(4,"Not found: Permission_CloseKellyCock")
call jsonfile%get('Equipments.Drilling.CloseKellyCock',data%Equipments%DrillingConsole%CloseKellyCock,found)
if ( .not. found ) call logg(4,"Not found: CloseKellyCock")
call jsonfile%get('Equipments.Drilling.Permission_OpenSafetyValve',data%Equipments%DrillingConsole%Permission_OpenSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: Permission_OpenSafetyValve")
call jsonfile%get('Equipments.Drilling.OpenSafetyValve',data%Equipments%DrillingConsole%OpenSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: OpenSafetyValve")
call jsonfile%get('Equipments.Drilling.Permission_CloseSafetyValve',data%Equipments%DrillingConsole%Permission_CloseSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: Permission_CloseSafetyValve")
call jsonfile%get('Equipments.Drilling.CloseSafetyValve',data%Equipments%DrillingConsole%CloseSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: CloseSafetyValve")
call jsonfile%get('Equipments.Drilling.Permission_IRSafetyValve',data%Equipments%DrillingConsole%Permission_IRSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: Permission_IRSafetyValve")
call jsonfile%get('Equipments.Drilling.IRSafetyValve',data%Equipments%DrillingConsole%IRSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: IRSafetyValve")
call jsonfile%get('Equipments.Drilling.Permission_IRIBop',data%Equipments%DrillingConsole%Permission_IRIBop,found)
if ( .not. found ) call logg(4,"Not found: Permission_IRIBop")
call jsonfile%get('Equipments.Drilling.IRIBop',data%Equipments%DrillingConsole%IRIBop,found)
if ( .not. found ) call logg(4,"Not found: IRIBop")
call jsonfile%get('Equipments.Drilling.LatchPipe',data%Equipments%DrillingConsole%LatchPipe,found)
if ( .not. found ) call logg(4,"Not found: LatchPipe")
call jsonfile%get('Equipments.Drilling.UnlatchPipe',data%Equipments%DrillingConsole%UnlatchPipe,found)
if ( .not. found ) call logg(4,"Not found: UnlatchPipe")
call jsonfile%get('Equipments.Drilling.Swing',data%Equipments%DrillingConsole%Swing,found)
if ( .not. found ) call logg(4,"Not found: Swing")
call jsonfile%get('Equipments.Drilling.FillMouseHole',data%Equipments%DrillingConsole%FillMouseHole,found)
if ( .not. found ) call logg(4,"Not found: FillMouseHole")
call jsonfile%get('Equipments.Drilling.Slips',data%Equipments%DrillingConsole%Slips,found)
if ( .not. found ) call logg(4,"Not found: Slips")
call jsonfile%get('Equipments.Drilling.BrakeLeverCoefficient',data%Equipments%DrillingConsole%BrakeLeverCoefficient,found)
if ( .not. found ) call logg(4,"Not found: BrakeLeverCoefficient")
call jsonfile%get('Equipments.Drilling.HideDrillingBrake',data%Equipments%DrillingConsole%HideDrillingBrake,found)
if ( .not. found ) call logg(4,"Not found: HideDrillingBrake")
call jsonfile%get('Equipments.Drilling.ParkingBrakeBtn',data%Equipments%DrillingConsole%ParkingBrakeBtn,found)
if ( .not. found ) call logg(4,"Not found: ParkingBrakeBtn")

! call json%get(p,'ParkingBrakeLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%ParkingBrakeLed)
! call json%get(p,'GEN1LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN1LED)
! call json%get(p,'GEN2LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN2LED)
! call json%get(p,'GEN3LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN3LED)
! call json%get(p,'GEN4LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN4LED)
! call json%get(p,'SCR1LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%SCR1LED)
! call json%get(p,'SCR2LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%SCR2LED)
! call json%get(p,'SCR3LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%SCR3LED)
! call json%get(p,'SCR4LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%SCR4LED)
! call json%get(p,'MP1BLWR',pval)
! call json%get(pval,data%Equipments%DrillingConsole%MP1BLWR)
! call json%get(p,'MP2BLWR',pval)
! call json%get(pval,data%Equipments%DrillingConsole%MP2BLWR)
! call json%get(p,'DWBLWR',pval)
! call json%get(pval,data%Equipments%DrillingConsole%DWBLWR)
! call json%get(p,'RTBLWR',pval)
! call json%get(pval,data%Equipments%DrillingConsole%RTBLWR)
! call json%get(p,'PWRLIM',pval)
! call json%get(pval,data%Equipments%DrillingConsole%PWRLIM)
! call json%get(p,'PWRLIMMTR',pval)
! call json%get(pval,data%Equipments%DrillingConsole%PWRLIMMTR)
! call json%get(p,'RTTorqueLimitGauge',pval)
! call json%get(pval,data%Equipments%DrillingConsole%RTTorqueLimitGauge)
! call json%get(p,'AutoDWLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%AutoDWLED)
! call json%get(p,'GEN1BTNLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN1BTNLED)
! call json%get(p,'GEN2BTNLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN2BTNLED)
! call json%get(p,'GEN3BTNLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN3BTNLED)
! call json%get(p,'GEN4BTNLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN4BTNLED)
! call json%get(p,'OpenKellyCockLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%OpenKellyCockLed)
! call json%get(p,'CloseKellyCockLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%CloseKellyCockLed)
! call json%get(p,'OpenSafetyValveLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%OpenSafetyValveLed)
! call json%get(p,'CloseSafetyValveLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%CloseSafetyValveLed)
! call json%get(p,'IRSafetyValveLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%IRSafetyValveLed)
! call json%get(p,'IRIBopLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%IRIBopLed)
! call json%get(p,'LatchPipeLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%LatchPipeLED)
! call json%get(p,'UnlatchPipeLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%UnlatchPipeLED)
! call json%get(p,'SwingLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%SwingLed)
! call json%get(p,'FillMouseHoleLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%FillMouseHoleLed)
data%Equipments%DrillingConsole%DWSwitch = -1
data%Equipments%DrillingConsole%AssignmentSwitch = 1
data%Equipments%DrillingConsole%MP1CPSwitch = -1
data%Equipments%DrillingConsole%MP2Switch = -1
data%Equipments%DrillingConsole%RTSwitch = -1
end subroutine

subroutine DrillingConsoleToJson(parent)
@@ -196,61 +139,7 @@ module CDrillingConsole

! 1. create new node
call json%create_object(p,'Drilling')
! call json%add(p,"AssignmentSwitch",data%Equipments%DrillingConsole%AssignmentSwitch)
! call json%add(p,"EmergencySwitch",data%Equipments%DrillingConsole%EmergencySwitch)
! call json%add(p,"RTTorqueLimitKnob",data%Equipments%DrillingConsole%RTTorqueLimitKnob)
! call json%add(p,"MP1CPSwitchI",data%Equipments%DrillingConsole%MP1CPSwitchI)
! call json%add(p,"MP1CPSwitchT",data%Equipments%DrillingConsole%MP1CPSwitchT)
! call json%add(p,"MP1CPSwitch",data%Equipments%DrillingConsole%MP1CPSwitch)
! call json%add(p,"MP1ThrottleUpdate",data%Equipments%DrillingConsole%MP1ThrottleUpdate)
! call json%add(p,"MP1Throttle",data%Equipments%DrillingConsole%MP1Throttle)
! call json%add(p,"MP2SwitchI",data%Equipments%DrillingConsole%MP2SwitchI)
! call json%add(p,"MP2SwitchT",data%Equipments%DrillingConsole%MP2SwitchT)
! call json%add(p,"MP2Switch",data%Equipments%DrillingConsole%MP2Switch)
! call json%add(p,"MP2ThrottleUpdate",data%Equipments%DrillingConsole%MP2ThrottleUpdate)
! call json%add(p,"MP2Throttle",data%Equipments%DrillingConsole%MP2Throttle)
! call json%add(p,"DWSwitch",data%Equipments%DrillingConsole%DWSwitch)
! call json%add(p,"DWThrottle",data%Equipments%DrillingConsole%DWThrottle)
! call json%add(p,"RTSwitch",data%Equipments%DrillingConsole%RTSwitch)
! call json%add(p,"RTThrottle",data%Equipments%DrillingConsole%RTThrottle)
! call json%add(p,"DWBreak",data%Equipments%DrillingConsole%DWBreak)
! call json%add(p,"PreviousDWBreak",data%Equipments%DrillingConsole%PreviousDWBreak)
! call json%add(p,"ForceBreak",data%Equipments%DrillingConsole%ForceBreak)
! call json%add(p,"DWAcceleretor",data%Equipments%DrillingConsole%DWAcceleretor)
! call json%add(p,"DWTransmisionLever",data%Equipments%DrillingConsole%DWTransmisionLever)
! call json%add(p,"DWPowerLever",data%Equipments%DrillingConsole%DWPowerLever)
! call json%add(p,"TongLever",data%Equipments%DrillingConsole%TongLever)
! call json%add(p,"RTTransmissionLever",data%Equipments%DrillingConsole%RTTransmissionLever)
! call json%add(p,"DWClutchLever",data%Equipments%DrillingConsole%DWClutchLever)
! call json%add(p,"EddyBreakLever",data%Equipments%DrillingConsole%EddyBreakLever)
! call json%add(p,"AutoDW",data%Equipments%DrillingConsole%AutoDW)
! call json%add(p,"GEN1",data%Equipments%DrillingConsole%GEN1)
! call json%add(p,"GEN2",data%Equipments%DrillingConsole%GEN2)
! call json%add(p,"GEN3",data%Equipments%DrillingConsole%GEN3)
! call json%add(p,"GEN4",data%Equipments%DrillingConsole%GEN4)
! call json%add(p,"Permission_OpenKellyCock",data%Equipments%DrillingConsole%Permission_OpenKellyCock)
! call json%add(p,"OpenKellyCock",data%Equipments%DrillingConsole%OpenKellyCock)
! call json%add(p,"Permission_CloseKellyCock",data%Equipments%DrillingConsole%Permission_CloseKellyCock)
! call json%add(p,"CloseKellyCock",data%Equipments%DrillingConsole%CloseKellyCock)
! call json%add(p,"Permission_OpenSafetyValve",data%Equipments%DrillingConsole%Permission_OpenSafetyValve)
! call json%add(p,"OpenSafetyValve",data%Equipments%DrillingConsole%OpenSafetyValve)
! call json%add(p,"Permission_CloseSafetyValve",data%Equipments%DrillingConsole%Permission_CloseSafetyValve)
! call json%add(p,"CloseSafetyValve",data%Equipments%DrillingConsole%CloseSafetyValve)
! call json%add(p,"Permission_IRSafetyValve",data%Equipments%DrillingConsole%Permission_IRSafetyValve)
! call json%add(p,"IRSafetyValve",data%Equipments%DrillingConsole%IRSafetyValve)
! call json%add(p,"Permission_IRIBop",data%Equipments%DrillingConsole%Permission_IRIBop)
! call json%add(p,"IRIBop",data%Equipments%DrillingConsole%IRIBop)
! call json%add(p,"LatchPipe",data%Equipments%DrillingConsole%LatchPipe)
! call json%add(p,"UnlatchPipe",data%Equipments%DrillingConsole%UnlatchPipe)
! call json%add(p,"Swing",data%Equipments%DrillingConsole%Swing)
! call json%add(p,"FillMouseHole",data%Equipments%DrillingConsole%FillMouseHole)
! call json%add(p,"Slips",data%Equipments%DrillingConsole%Slips)
! call json%add(p,"BrakeLeverCoefficient",data%Equipments%DrillingConsole%BrakeLeverCoefficient)
! call json%add(p,"HideDrillingBrake",data%Equipments%DrillingConsole%HideDrillingBrake)
! call json%add(p,"ParkingBrakeBtn",data%Equipments%DrillingConsole%ParkingBrakeBtn)



call json%add(p,"ParkingBrakeLed",data%Equipments%DrillingConsole%ParkingBrakeLed)
call json%add(p,"GEN1LED",data%Equipments%DrillingConsole%GEN1LED)
call json%add(p,"GEN2LED",data%Equipments%DrillingConsole%GEN2LED)


+ 116
- 227
CSharp/Equipments/ControlPanels/CDrillingConsole.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CDrillingConsole.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CDrillingConsole.f90"
module CDrillingConsole
use CDrillingConsoleVariables
use SimulationVariables
@@ -11,182 +11,125 @@ module CDrillingConsole
contains


subroutine DrillingConsoleFromJson(parent)
subroutine DrillingConsoleFromJson(jsonfile)
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pval
type(json_file)::jsonfile
logical::found

! 1. get related root
call json%get(parent,'Drilling',p)
! 2. get member of data type from node
call json%get(p,'AssignmentSwitch',pval)
call json%get(pval,data%Equipments%DrillingConsole%AssignmentSwitch)
call json%get(p,'EmergencySwitch',pval)
call json%get(pval,data%Equipments%DrillingConsole%EmergencySwitch)
call json%get(p,'RTTorqueLimitKnob',pval)
call json%get(pval,data%Equipments%DrillingConsole%RTTorqueLimitKnob)
call json%get(p,'MP1CPSwitchI',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP1CPSwitchI)
call json%get(p,'MP1CPSwitchT',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP1CPSwitchT)
call json%get(p,'MP1CPSwitch',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP1CPSwitch)
call json%get(p,'MP1ThrottleUpdate',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP1ThrottleUpdate)
call json%get(p,'MP1Throttle',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP1Throttle)
call json%get(p,'MP2SwitchI',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP2SwitchI)
call json%get(p,'MP2SwitchT',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP2SwitchT)
call json%get(p,'MP2Switch',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP2Switch)
call json%get(p,'MP2ThrottleUpdate',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP2ThrottleUpdate)
call json%get(p,'MP2Throttle',pval)
call json%get(pval,data%Equipments%DrillingConsole%MP2Throttle)
call json%get(p,'DWSwitch',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWSwitch)
call json%get(p,'DWThrottle',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWThrottle)
call json%get(p,'RTSwitch',pval)
call json%get(pval,data%Equipments%DrillingConsole%RTSwitch)
call json%get(p,'RTThrottle',pval)
call json%get(pval,data%Equipments%DrillingConsole%RTThrottle)
call json%get(p,'DWBreak',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWBreak)
call json%get(p,'PreviousDWBreak',pval)
call json%get(pval,data%Equipments%DrillingConsole%PreviousDWBreak)
call json%get(p,'ForceBreak',pval)
call json%get(pval,data%Equipments%DrillingConsole%ForceBreak)
call json%get(p,'DWAcceleretor',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWAcceleretor)
call json%get(p,'DWTransmisionLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWTransmisionLever)
call json%get(p,'DWPowerLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWPowerLever)
call json%get(p,'TongLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%TongLever)
call json%get(p,'RTTransmissionLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%RTTransmissionLever)
call json%get(p,'DWClutchLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%DWClutchLever)
call json%get(p,'EddyBreakLever',pval)
call json%get(pval,data%Equipments%DrillingConsole%EddyBreakLever)
call json%get(p,'AutoDW',pval)
call json%get(pval,data%Equipments%DrillingConsole%AutoDW)
call json%get(p,'GEN1',pval)
call json%get(pval,data%Equipments%DrillingConsole%GEN1)
call json%get(p,'GEN2',pval)
call json%get(pval,data%Equipments%DrillingConsole%GEN2)
call json%get(p,'GEN3',pval)
call json%get(pval,data%Equipments%DrillingConsole%GEN3)
call json%get(p,'GEN4',pval)
call json%get(pval,data%Equipments%DrillingConsole%GEN4)
call json%get(p,'Permission_OpenKellyCock',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_OpenKellyCock)
call json%get(p,'OpenKellyCock',pval)
call json%get(pval,data%Equipments%DrillingConsole%OpenKellyCock)
call json%get(p,'Permission_CloseKellyCock',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_CloseKellyCock)
call json%get(p,'CloseKellyCock',pval)
call json%get(pval,data%Equipments%DrillingConsole%CloseKellyCock)
call json%get(p,'Permission_OpenSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_OpenSafetyValve)
call json%get(p,'OpenSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%OpenSafetyValve)
call json%get(p,'Permission_CloseSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_CloseSafetyValve)
call json%get(p,'CloseSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%CloseSafetyValve)
call json%get(p,'Permission_IRSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_IRSafetyValve)
call json%get(p,'IRSafetyValve',pval)
call json%get(pval,data%Equipments%DrillingConsole%IRSafetyValve)
call json%get(p,'Permission_IRIBop',pval)
call json%get(pval,data%Equipments%DrillingConsole%Permission_IRIBop)
call json%get(p,'IRIBop',pval)
call json%get(pval,data%Equipments%DrillingConsole%IRIBop)
call json%get(p,'LatchPipe',pval)
call json%get(pval,data%Equipments%DrillingConsole%LatchPipe)
call json%get(p,'UnlatchPipe',pval)
call json%get(pval,data%Equipments%DrillingConsole%UnlatchPipe)
call json%get(p,'Swing',pval)
call json%get(pval,data%Equipments%DrillingConsole%Swing)
call json%get(p,'FillMouseHole',pval)
call json%get(pval,data%Equipments%DrillingConsole%FillMouseHole)
call json%get(p,'Slips',pval)
call json%get(pval,data%Equipments%DrillingConsole%Slips)
call json%get(p,'BrakeLeverCoefficient',pval)
call json%get(pval,data%Equipments%DrillingConsole%BrakeLeverCoefficient)
call json%get(p,'HideDrillingBrake',pval)
call json%get(pval,data%Equipments%DrillingConsole%HideDrillingBrake)
call json%get(p,'ParkingBrakeBtn',pval)
call json%get(pval,data%Equipments%DrillingConsole%ParkingBrakeBtn)
call jsonfile%get('Equipments.Drilling.AssignmentSwitch',data%Equipments%DrillingConsole%AssignmentSwitch,found)
if ( .not. found ) call logg(4,"Not found: AssignmentSwitch")
call jsonfile%get('Equipments.Drilling.EmergencySwitch',data%Equipments%DrillingConsole%EmergencySwitch,found)
if ( .not. found ) call logg(4,"Not found: EmergencySwitch")
call jsonfile%get('Equipments.Drilling.RTTorqueLimitKnob',data%Equipments%DrillingConsole%RTTorqueLimitKnob,found)
if ( .not. found ) call logg(4,"Not found: RTTorqueLimitKnob")
call jsonfile%get('Equipments.Drilling.MP1CPSwitchI',data%Equipments%DrillingConsole%MP1CPSwitchI,found)
if ( .not. found ) call logg(4,"Not found: MP1CPSwitchI")
call jsonfile%get('Equipments.Drilling.MP1CPSwitchT',data%Equipments%DrillingConsole%MP1CPSwitchT,found)
if ( .not. found ) call logg(4,"Not found: MP1CPSwitchT")
call jsonfile%get('Equipments.Drilling.MP1CPSwitch',data%Equipments%DrillingConsole%MP1CPSwitch,found)
if ( .not. found ) call logg(4,"Not found: MP1CPSwitch")
call jsonfile%get('Equipments.Drilling.MP1ThrottleUpdate',data%Equipments%DrillingConsole%MP1ThrottleUpdate,found)
if ( .not. found ) call logg(4,"Not found: MP1ThrottleUpdate")
call jsonfile%get('Equipments.Drilling.MP1Throttle',data%Equipments%DrillingConsole%MP1Throttle,found)
if ( .not. found ) then
call logg(4,"Not found: MP1Throttle")
endif
call jsonfile%get('Equipments.Drilling.MP2SwitchI',data%Equipments%DrillingConsole%MP2SwitchI,found)
if ( .not. found ) call logg(4,"Not found: MP2SwitchI")
call jsonfile%get('Equipments.Drilling.MP2SwitchT',data%Equipments%DrillingConsole%MP2SwitchT,found)
if ( .not. found ) call logg(4,"Not found: MP2SwitchT")
call jsonfile%get('Equipments.Drilling.MP2Switch',data%Equipments%DrillingConsole%MP2Switch,found)
if ( .not. found ) call logg(4,"Not found: MP2Switch")
call jsonfile%get('Equipments.Drilling.MP2ThrottleUpdate',data%Equipments%DrillingConsole%MP2ThrottleUpdate,found)
if ( .not. found ) call logg(4,"Not found: MP2ThrottleUpdate")
call jsonfile%get('Equipments.Drilling.MP2Throttle',data%Equipments%DrillingConsole%MP2Throttle,found)
if ( .not. found ) call logg(4,"Not found: MP2Throttle")
! call jsonfile%get('Equipments.Drilling.DWSwitch',data%Equipments%DrillingConsole%DWSwitch,found)
! if ( .not. found ) call logg(4,"Not found: DWSwitch")
call jsonfile%get('Equipments.Drilling.DWThrottle',data%Equipments%DrillingConsole%DWThrottle,found)
if ( .not. found ) call logg(4,"Not found: DWThrottle")
call jsonfile%get('Equipments.Drilling.RTSwitch',data%Equipments%DrillingConsole%RTSwitch,found)
if ( .not. found ) call logg(4,"Not found: RTSwitch")
call jsonfile%get('Equipments.Drilling.RTThrottle',data%Equipments%DrillingConsole%RTThrottle,found)
if ( .not. found ) call logg(4,"Not found: RTThrottle")
call jsonfile%get('Equipments.Drilling.DWBreak',data%Equipments%DrillingConsole%DWBreak,found)
if ( .not. found ) call logg(4,"Not found: DWBreak")
call jsonfile%get('Equipments.Drilling.PreviousDWBreak',data%Equipments%DrillingConsole%PreviousDWBreak,found)
if ( .not. found ) call logg(4,"Not found: PreviousDWBreak")
call jsonfile%get('Equipments.Drilling.ForceBreak',data%Equipments%DrillingConsole%ForceBreak,found)
if ( .not. found ) call logg(4,"Not found: ForceBreak")
call jsonfile%get('Equipments.Drilling.DWAcceleretor',data%Equipments%DrillingConsole%DWAcceleretor,found)
if ( .not. found ) call logg(4,"Not found: DWAcceleretor")
call jsonfile%get('Equipments.Drilling.DWTransmisionLever',data%Equipments%DrillingConsole%DWTransmisionLever,found)
if ( .not. found ) call logg(4,"Not found: DWTransmisionLever")
call jsonfile%get('Equipments.Drilling.DWPowerLever',data%Equipments%DrillingConsole%DWPowerLever,found)
if ( .not. found ) call logg(4,"Not found: DWPowerLever")
call jsonfile%get('Equipments.Drilling.TongLever',data%Equipments%DrillingConsole%TongLever,found)
if ( .not. found ) call logg(4,"Not found: TongLever")
call jsonfile%get('Equipments.Drilling.RTTransmissionLever',data%Equipments%DrillingConsole%RTTransmissionLever,found)
if ( .not. found ) call logg(4,"Not found: RTTransmissionLever")
call jsonfile%get('Equipments.Drilling.DWClutchLever',data%Equipments%DrillingConsole%DWClutchLever,found)
if ( .not. found ) call logg(4,"Not found: DWClutchLever")
call jsonfile%get('Equipments.Drilling.EddyBreakLever',data%Equipments%DrillingConsole%EddyBreakLever,found)
if ( .not. found ) call logg(4,"Not found: EddyBreakLever")
call jsonfile%get('Equipments.Drilling.AutoDW',data%Equipments%DrillingConsole%AutoDW,found)
if ( .not. found ) call logg(4,"Not found: AutoDW")
call jsonfile%get('Equipments.Drilling.GEN1',data%Equipments%DrillingConsole%GEN1,found)
if ( .not. found ) call logg(4,"Not found: GEN1")
call jsonfile%get('Equipments.Drilling.GEN2',data%Equipments%DrillingConsole%GEN2,found)
if ( .not. found ) call logg(4,"Not found: GEN2")
call jsonfile%get('Equipments.Drilling.GEN3',data%Equipments%DrillingConsole%GEN3,found)
if ( .not. found ) call logg(4,"Not found: GEN3")
call jsonfile%get('Equipments.Drilling.GEN4',data%Equipments%DrillingConsole%GEN4,found)
if ( .not. found ) call logg(4,"Not found: GEN4")
call jsonfile%get('Equipments.Drilling.Permission_OpenKellyCock',data%Equipments%DrillingConsole%Permission_OpenKellyCock,found)
if ( .not. found ) call logg(4,"Not found: Permission_OpenKellyCock")
call jsonfile%get('Equipments.Drilling.OpenKellyCock',data%Equipments%DrillingConsole%OpenKellyCock,found)
if ( .not. found ) call logg(4,"Not found: OpenKellyCock")
call jsonfile%get('Equipments.Drilling.Permission_CloseKellyCock',data%Equipments%DrillingConsole%Permission_CloseKellyCock,found)
if ( .not. found ) call logg(4,"Not found: Permission_CloseKellyCock")
call jsonfile%get('Equipments.Drilling.CloseKellyCock',data%Equipments%DrillingConsole%CloseKellyCock,found)
if ( .not. found ) call logg(4,"Not found: CloseKellyCock")
call jsonfile%get('Equipments.Drilling.Permission_OpenSafetyValve',data%Equipments%DrillingConsole%Permission_OpenSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: Permission_OpenSafetyValve")
call jsonfile%get('Equipments.Drilling.OpenSafetyValve',data%Equipments%DrillingConsole%OpenSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: OpenSafetyValve")
call jsonfile%get('Equipments.Drilling.Permission_CloseSafetyValve',data%Equipments%DrillingConsole%Permission_CloseSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: Permission_CloseSafetyValve")
call jsonfile%get('Equipments.Drilling.CloseSafetyValve',data%Equipments%DrillingConsole%CloseSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: CloseSafetyValve")
call jsonfile%get('Equipments.Drilling.Permission_IRSafetyValve',data%Equipments%DrillingConsole%Permission_IRSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: Permission_IRSafetyValve")
call jsonfile%get('Equipments.Drilling.IRSafetyValve',data%Equipments%DrillingConsole%IRSafetyValve,found)
if ( .not. found ) call logg(4,"Not found: IRSafetyValve")
call jsonfile%get('Equipments.Drilling.Permission_IRIBop',data%Equipments%DrillingConsole%Permission_IRIBop,found)
if ( .not. found ) call logg(4,"Not found: Permission_IRIBop")
call jsonfile%get('Equipments.Drilling.IRIBop',data%Equipments%DrillingConsole%IRIBop,found)
if ( .not. found ) call logg(4,"Not found: IRIBop")
call jsonfile%get('Equipments.Drilling.LatchPipe',data%Equipments%DrillingConsole%LatchPipe,found)
if ( .not. found ) call logg(4,"Not found: LatchPipe")
call jsonfile%get('Equipments.Drilling.UnlatchPipe',data%Equipments%DrillingConsole%UnlatchPipe,found)
if ( .not. found ) call logg(4,"Not found: UnlatchPipe")
call jsonfile%get('Equipments.Drilling.Swing',data%Equipments%DrillingConsole%Swing,found)
if ( .not. found ) call logg(4,"Not found: Swing")
call jsonfile%get('Equipments.Drilling.FillMouseHole',data%Equipments%DrillingConsole%FillMouseHole,found)
if ( .not. found ) call logg(4,"Not found: FillMouseHole")
call jsonfile%get('Equipments.Drilling.Slips',data%Equipments%DrillingConsole%Slips,found)
if ( .not. found ) call logg(4,"Not found: Slips")
call jsonfile%get('Equipments.Drilling.BrakeLeverCoefficient',data%Equipments%DrillingConsole%BrakeLeverCoefficient,found)
if ( .not. found ) call logg(4,"Not found: BrakeLeverCoefficient")
call jsonfile%get('Equipments.Drilling.HideDrillingBrake',data%Equipments%DrillingConsole%HideDrillingBrake,found)
if ( .not. found ) call logg(4,"Not found: HideDrillingBrake")
call jsonfile%get('Equipments.Drilling.ParkingBrakeBtn',data%Equipments%DrillingConsole%ParkingBrakeBtn,found)
if ( .not. found ) call logg(4,"Not found: ParkingBrakeBtn")

! call json%get(p,'ParkingBrakeLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%ParkingBrakeLed)
! call json%get(p,'GEN1LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN1LED)
! call json%get(p,'GEN2LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN2LED)
! call json%get(p,'GEN3LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN3LED)
! call json%get(p,'GEN4LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN4LED)
! call json%get(p,'SCR1LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%SCR1LED)
! call json%get(p,'SCR2LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%SCR2LED)
! call json%get(p,'SCR3LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%SCR3LED)
! call json%get(p,'SCR4LED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%SCR4LED)
! call json%get(p,'MP1BLWR',pval)
! call json%get(pval,data%Equipments%DrillingConsole%MP1BLWR)
! call json%get(p,'MP2BLWR',pval)
! call json%get(pval,data%Equipments%DrillingConsole%MP2BLWR)
! call json%get(p,'DWBLWR',pval)
! call json%get(pval,data%Equipments%DrillingConsole%DWBLWR)
! call json%get(p,'RTBLWR',pval)
! call json%get(pval,data%Equipments%DrillingConsole%RTBLWR)
! call json%get(p,'PWRLIM',pval)
! call json%get(pval,data%Equipments%DrillingConsole%PWRLIM)
! call json%get(p,'PWRLIMMTR',pval)
! call json%get(pval,data%Equipments%DrillingConsole%PWRLIMMTR)
! call json%get(p,'RTTorqueLimitGauge',pval)
! call json%get(pval,data%Equipments%DrillingConsole%RTTorqueLimitGauge)
! call json%get(p,'AutoDWLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%AutoDWLED)
! call json%get(p,'GEN1BTNLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN1BTNLED)
! call json%get(p,'GEN2BTNLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN2BTNLED)
! call json%get(p,'GEN3BTNLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN3BTNLED)
! call json%get(p,'GEN4BTNLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%GEN4BTNLED)
! call json%get(p,'OpenKellyCockLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%OpenKellyCockLed)
! call json%get(p,'CloseKellyCockLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%CloseKellyCockLed)
! call json%get(p,'OpenSafetyValveLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%OpenSafetyValveLed)
! call json%get(p,'CloseSafetyValveLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%CloseSafetyValveLed)
! call json%get(p,'IRSafetyValveLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%IRSafetyValveLed)
! call json%get(p,'IRIBopLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%IRIBopLed)
! call json%get(p,'LatchPipeLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%LatchPipeLED)
! call json%get(p,'UnlatchPipeLED',pval)
! call json%get(pval,data%Equipments%DrillingConsole%UnlatchPipeLED)
! call json%get(p,'SwingLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%SwingLed)
! call json%get(p,'FillMouseHoleLed',pval)
! call json%get(pval,data%Equipments%DrillingConsole%FillMouseHoleLed)
data%Equipments%DrillingConsole%DWSwitch = -1
data%Equipments%DrillingConsole%AssignmentSwitch = 1
data%Equipments%DrillingConsole%MP1CPSwitch = -1
data%Equipments%DrillingConsole%MP2Switch = -1
data%Equipments%DrillingConsole%RTSwitch = -1
end subroutine

subroutine DrillingConsoleToJson(parent)
@@ -197,61 +140,7 @@ module CDrillingConsole

! 1. create new node
call json%create_object(p,'Drilling')
! call json%add(p,"AssignmentSwitch",data%Equipments%DrillingConsole%AssignmentSwitch)
! call json%add(p,"EmergencySwitch",data%Equipments%DrillingConsole%EmergencySwitch)
! call json%add(p,"RTTorqueLimitKnob",data%Equipments%DrillingConsole%RTTorqueLimitKnob)
! call json%add(p,"MP1CPSwitchI",data%Equipments%DrillingConsole%MP1CPSwitchI)
! call json%add(p,"MP1CPSwitchT",data%Equipments%DrillingConsole%MP1CPSwitchT)
! call json%add(p,"MP1CPSwitch",data%Equipments%DrillingConsole%MP1CPSwitch)
! call json%add(p,"MP1ThrottleUpdate",data%Equipments%DrillingConsole%MP1ThrottleUpdate)
! call json%add(p,"MP1Throttle",data%Equipments%DrillingConsole%MP1Throttle)
! call json%add(p,"MP2SwitchI",data%Equipments%DrillingConsole%MP2SwitchI)
! call json%add(p,"MP2SwitchT",data%Equipments%DrillingConsole%MP2SwitchT)
! call json%add(p,"MP2Switch",data%Equipments%DrillingConsole%MP2Switch)
! call json%add(p,"MP2ThrottleUpdate",data%Equipments%DrillingConsole%MP2ThrottleUpdate)
! call json%add(p,"MP2Throttle",data%Equipments%DrillingConsole%MP2Throttle)
! call json%add(p,"DWSwitch",data%Equipments%DrillingConsole%DWSwitch)
! call json%add(p,"DWThrottle",data%Equipments%DrillingConsole%DWThrottle)
! call json%add(p,"RTSwitch",data%Equipments%DrillingConsole%RTSwitch)
! call json%add(p,"RTThrottle",data%Equipments%DrillingConsole%RTThrottle)
! call json%add(p,"DWBreak",data%Equipments%DrillingConsole%DWBreak)
! call json%add(p,"PreviousDWBreak",data%Equipments%DrillingConsole%PreviousDWBreak)
! call json%add(p,"ForceBreak",data%Equipments%DrillingConsole%ForceBreak)
! call json%add(p,"DWAcceleretor",data%Equipments%DrillingConsole%DWAcceleretor)
! call json%add(p,"DWTransmisionLever",data%Equipments%DrillingConsole%DWTransmisionLever)
! call json%add(p,"DWPowerLever",data%Equipments%DrillingConsole%DWPowerLever)
! call json%add(p,"TongLever",data%Equipments%DrillingConsole%TongLever)
! call json%add(p,"RTTransmissionLever",data%Equipments%DrillingConsole%RTTransmissionLever)
! call json%add(p,"DWClutchLever",data%Equipments%DrillingConsole%DWClutchLever)
! call json%add(p,"EddyBreakLever",data%Equipments%DrillingConsole%EddyBreakLever)
! call json%add(p,"AutoDW",data%Equipments%DrillingConsole%AutoDW)
! call json%add(p,"GEN1",data%Equipments%DrillingConsole%GEN1)
! call json%add(p,"GEN2",data%Equipments%DrillingConsole%GEN2)
! call json%add(p,"GEN3",data%Equipments%DrillingConsole%GEN3)
! call json%add(p,"GEN4",data%Equipments%DrillingConsole%GEN4)
! call json%add(p,"Permission_OpenKellyCock",data%Equipments%DrillingConsole%Permission_OpenKellyCock)
! call json%add(p,"OpenKellyCock",data%Equipments%DrillingConsole%OpenKellyCock)
! call json%add(p,"Permission_CloseKellyCock",data%Equipments%DrillingConsole%Permission_CloseKellyCock)
! call json%add(p,"CloseKellyCock",data%Equipments%DrillingConsole%CloseKellyCock)
! call json%add(p,"Permission_OpenSafetyValve",data%Equipments%DrillingConsole%Permission_OpenSafetyValve)
! call json%add(p,"OpenSafetyValve",data%Equipments%DrillingConsole%OpenSafetyValve)
! call json%add(p,"Permission_CloseSafetyValve",data%Equipments%DrillingConsole%Permission_CloseSafetyValve)
! call json%add(p,"CloseSafetyValve",data%Equipments%DrillingConsole%CloseSafetyValve)
! call json%add(p,"Permission_IRSafetyValve",data%Equipments%DrillingConsole%Permission_IRSafetyValve)
! call json%add(p,"IRSafetyValve",data%Equipments%DrillingConsole%IRSafetyValve)
! call json%add(p,"Permission_IRIBop",data%Equipments%DrillingConsole%Permission_IRIBop)
! call json%add(p,"IRIBop",data%Equipments%DrillingConsole%IRIBop)
! call json%add(p,"LatchPipe",data%Equipments%DrillingConsole%LatchPipe)
! call json%add(p,"UnlatchPipe",data%Equipments%DrillingConsole%UnlatchPipe)
! call json%add(p,"Swing",data%Equipments%DrillingConsole%Swing)
! call json%add(p,"FillMouseHole",data%Equipments%DrillingConsole%FillMouseHole)
! call json%add(p,"Slips",data%Equipments%DrillingConsole%Slips)
! call json%add(p,"BrakeLeverCoefficient",data%Equipments%DrillingConsole%BrakeLeverCoefficient)
! call json%add(p,"HideDrillingBrake",data%Equipments%DrillingConsole%HideDrillingBrake)
! call json%add(p,"ParkingBrakeBtn",data%Equipments%DrillingConsole%ParkingBrakeBtn)



call json%add(p,"ParkingBrakeLed",data%Equipments%DrillingConsole%ParkingBrakeLed)
call json%add(p,"GEN1LED",data%Equipments%DrillingConsole%GEN1LED)
call json%add(p,"GEN2LED",data%Equipments%DrillingConsole%GEN2LED)


+ 1
- 1
CSharp/Equipments/ControlPanels/CDrillingConsoleVariables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CDrillingConsoleVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CDrillingConsoleVariables.f90"
module CDrillingConsoleVariables

! use CVoidEventHandlerCollection


+ 2
- 11
CSharp/Equipments/ControlPanels/CHook.f90 Целия файл

@@ -39,21 +39,12 @@ module CHook
use SimulationVariables
implicit none
real , intent(in) :: v
#ifdef ExcludeExtraChanges
if(data%Equipments%Hook%HookHeight == v) return
#endif

data%Equipments%Hook%HookHeight = 100
data%Equipments%Hook%HookHeight = v
! if(associated(HookHeightPtr)) then
! call HookHeightPtr(data%Equipments%Hook%HookHeight)
! end if
#ifdef deb
print*, 'HookHeight=', data%Equipments%Hook%HookHeight
#endif
!**call data%Equipments%Hook%OnHookHeightChange%RunAll(data%Equipments%Hook%HookHeight)
end subroutine


+ 3
- 12
CSharp/Equipments/ControlPanels/CHook.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CHook.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CHook.f90"
module CHook
use CHookVariables
use SimulationVariables
@@ -40,21 +40,12 @@ module CHook
use SimulationVariables
implicit none
real , intent(in) :: v
#ifdef ExcludeExtraChanges
if(data%Equipments%Hook%HookHeight == v) return
#endif

data%Equipments%Hook%HookHeight = 100
data%Equipments%Hook%HookHeight = v
! if(associated(HookHeightPtr)) then
! call HookHeightPtr(data%Equipments%Hook%HookHeight)
! end if
#ifdef deb
print*, 'HookHeight=', data%Equipments%Hook%HookHeight
#endif
!**call data%Equipments%Hook%OnHookHeightChange%RunAll(data%Equipments%Hook%HookHeight)
end subroutine


+ 0
- 1
CSharp/Equipments/ControlPanels/CStandPipeManifold.f90 Целия файл

@@ -1,7 +1,6 @@
module CStandPipeManifold
use CStandPipeManifoldVariables
use SimulationVariables
use CManifolds
implicit none
public
contains


+ 1
- 2
CSharp/Equipments/ControlPanels/CStandPipeManifold.i90 Целия файл

@@ -1,8 +1,7 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CStandPipeManifold.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CStandPipeManifold.f90"
module CStandPipeManifold
use CStandPipeManifoldVariables
use SimulationVariables
use CManifolds
implicit none
public
contains


+ 1
- 1
CSharp/Equipments/ControlPanels/CTopDrivePanel.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CTopDrivePanel.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CTopDrivePanel.f90"
module CTopDrivePanel
use CTopDrivePanelVariables
use SimulationVariables


+ 2
- 2
CSharp/Equipments/DrillWatch/DrillWatch.f90 Целия файл

@@ -71,8 +71,8 @@ module DrillingWatchModule
call json%add(p,"SPM1",data%Equipments%DrillingWatch%SPM1)
call json%add(p,"SPM2",data%Equipments%DrillingWatch%SPM2)
call json%add(p,"CasingPressure",data%Equipments%DrillingWatch%CasingPressure)
call json%add(p,"PercentFlow",50)
! call json%add(p,"PercentFlow",data%Equipments%DrillingWatch%PercentFlow)
! call json%add(p,"PercentFlow",50)
call json%add(p,"PercentFlow",data%Equipments%DrillingWatch%PercentFlow)
call json%add(p,"PitGainLose",data%Equipments%DrillingWatch%PitGainLose)
call json%add(p,"PitVolume",data%Equipments%DrillingWatch%PitVolume)
call json%add(p,"KillMudVolume",data%Equipments%DrillingWatch%KillMudVolume)


+ 3
- 3
CSharp/Equipments/DrillWatch/DrillWatch.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/DrillWatch/DrillWatch.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/DrillWatch/DrillWatch.f90"
module DrillingWatchModule
use SimulationVariables
contains
@@ -72,8 +72,8 @@ module DrillingWatchModule
call json%add(p,"SPM1",data%Equipments%DrillingWatch%SPM1)
call json%add(p,"SPM2",data%Equipments%DrillingWatch%SPM2)
call json%add(p,"CasingPressure",data%Equipments%DrillingWatch%CasingPressure)
call json%add(p,"PercentFlow",50)
! call json%add(p,"PercentFlow",data%Equipments%DrillingWatch%PercentFlow)
! call json%add(p,"PercentFlow",50)
call json%add(p,"PercentFlow",data%Equipments%DrillingWatch%PercentFlow)
call json%add(p,"PitGainLose",data%Equipments%DrillingWatch%PitGainLose)
call json%add(p,"PitVolume",data%Equipments%DrillingWatch%PitVolume)
call json%add(p,"KillMudVolume",data%Equipments%DrillingWatch%KillMudVolume)


+ 0
- 3
CSharp/Equipments/MudPathFinding/CManifolds.f90 Целия файл

@@ -1,10 +1,7 @@
module CManifolds
use CStack
use CArrangement
! use CPathChangeEvents
! use CDrillingConsoleVariables
use SimulationVariables
! use ConfigurationVariables, only: EquipmentControl
implicit none


+ 33
- 36
CSharp/Equipments/MudPathFinding/CManifolds.i90 Целия файл

@@ -1,11 +1,8 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/MudPathFinding/CManifolds.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/MudPathFinding/CManifolds.f90"
module CManifolds
use CStack
use CArrangement
! use CPathChangeEvents
! use CDrillingConsoleVariables
use SimulationVariables
! use ConfigurationVariables, only: EquipmentControl
implicit none
@@ -108,7 +105,7 @@ end subroutine PathFinding_Step
Manifold%IsTraverse = .true.
!TODO: clean up
# 118
# 115

endsubroutine
@@ -699,7 +696,7 @@ end subroutine PathFinding_Step
call Manifold%Valve(127)%AdjacentTo(103)
call Manifold%Valve(103)%AdjacentTo(127)
# 711
# 708

Manifold%IsPathsDirty = .true.
end subroutine
@@ -713,7 +710,7 @@ end subroutine PathFinding_Step
call Manifold%Valve(127)%AdjacentTo(78)
# 727
# 724


Manifold%IsPathsDirty = .true.
@@ -756,7 +753,7 @@ end subroutine PathFinding_Step
call Manifold%Valve(127)%AdjacentTo(56)
# 771
# 768

data%Equipments%DrillingConsole%IRSafetyValveLed = 1
@@ -781,7 +778,7 @@ end subroutine PathFinding_Step
data%Equipments%DrillingConsole%OpenSafetyValveLed = 0
data%Equipments%DrillingConsole%CloseSafetyValveLed = 0
# 797
# 794

end subroutine
@@ -794,7 +791,7 @@ end subroutine PathFinding_Step
Manifold%SafetyValve = .true.
call ChangeValve(56, Manifold%SafetyValve)
# 811
# 808

end subroutine
@@ -807,7 +804,7 @@ end subroutine PathFinding_Step
Manifold%SafetyValve = .false.
call ChangeValve(56, Manifold%SafetyValve)
# 825
# 822

end subroutine
@@ -847,7 +844,7 @@ end subroutine PathFinding_Step
data%Equipments%DrillingConsole%IRSafetyValveLed = 1
call OpenSafetyValve_TripMode()
# 866
# 863

end subroutine
@@ -870,7 +867,7 @@ end subroutine PathFinding_Step
data%Equipments%DrillingConsole%OpenSafetyValveLed = 0
data%Equipments%DrillingConsole%CloseSafetyValveLed = 0
# 890
# 887

end subroutine
@@ -883,7 +880,7 @@ end subroutine PathFinding_Step
Manifold%SafetyValve = .true.
call ChangeValve(54, Manifold%SafetyValve)
# 904
# 901

end subroutine
@@ -896,7 +893,7 @@ end subroutine PathFinding_Step
Manifold%SafetyValve = .false.
call ChangeValve(54, Manifold%SafetyValve)
# 918
# 915

end subroutine
@@ -930,7 +927,7 @@ end subroutine PathFinding_Step
data%Equipments%DrillingConsole%IRSafetyValveLed = 1
call OpenSafetyValve_TopDrive()
# 953
# 950

end subroutine
@@ -953,7 +950,7 @@ end subroutine PathFinding_Step
data%Equipments%DrillingConsole%OpenSafetyValveLed = 0
data%Equipments%DrillingConsole%CloseSafetyValveLed = 0
# 977
# 974

end subroutine
@@ -965,7 +962,7 @@ end subroutine PathFinding_Step
data%Equipments%DrillingConsole%CloseSafetyValveLed = 0
Manifold%SafetyValve = .true.
# 990
# 987

call ChangeValve(54, Manifold%SafetyValve)
@@ -978,7 +975,7 @@ end subroutine PathFinding_Step
data%Equipments%DrillingConsole%OpenSafetyValveLed = 0
Manifold%SafetyValve = .false.
# 1004
# 1001

call ChangeValve(54, Manifold%SafetyValve)
@@ -1005,7 +1002,7 @@ end subroutine PathFinding_Step
call Manifold%Valve(103)%AdjacentTo(55)
call Manifold%Valve(124)%AdjacentTo(55)
# 1032
# 1029

data%Equipments%DrillingConsole%IRIBopLed = 1
@@ -1025,7 +1022,7 @@ end subroutine PathFinding_Step
call Manifold%Valve(103)%AdjacentTo(124)
call Manifold%Valve(124)%AdjacentTo(103)
# 1053
# 1050

data%Equipments%DrillingConsole%IRIBopLed = 0
@@ -1038,7 +1035,7 @@ end subroutine PathFinding_Step
if(.not.Manifold%IsIBopInstalled) return
Manifold%IBop = .true.
# 1067
# 1064

call ChangeValve(55, Manifold%IBop)
@@ -1049,7 +1046,7 @@ end subroutine PathFinding_Step
if(.not.Manifold%IsIBopInstalled) return
Manifold%IBop = .false.
# 1079
# 1076

call ChangeValve(55, Manifold%IBop)
@@ -1074,7 +1071,7 @@ end subroutine PathFinding_Step
call Manifold%Valve(126)%AdjacentTo(68)
# 1105
# 1102

call OpenKellyCock()
@@ -1098,7 +1095,7 @@ end subroutine PathFinding_Step
data%Equipments%DrillingConsole%CloseKellyCockLed = 0
data%Equipments%DrillingConsole%OpenKellyCockLed = 0
# 1130
# 1127

end subroutine
@@ -1110,7 +1107,7 @@ end subroutine PathFinding_Step
data%Equipments%DrillingConsole%CloseKellyCockLed = 0
Manifold%KellyCock = .true.
# 1143
# 1140

call ChangeValve(68, Manifold%KellyCock)
@@ -1123,7 +1120,7 @@ end subroutine PathFinding_Step
data%Equipments%DrillingConsole%OpenKellyCockLed = 0
Manifold%KellyCock = .false.

# 1157
# 1154

call ChangeValve(68, Manifold%KellyCock)
@@ -1150,7 +1147,7 @@ end subroutine PathFinding_Step
call Manifold%Valve(128)%AdjacentTo(70)
call Manifold%Valve(70)%AdjacentTo(128)
# 1185
# 1182

call OpenTopDriveIBop()
end subroutine
@@ -1168,7 +1165,7 @@ end subroutine PathFinding_Step
call Manifold%Valve(126)%AdjacentTo(128)
call Manifold%Valve(128)%AdjacentTo(126)
# 1204
# 1201

Manifold%TopDriveIBop = .false.
call ChangeValve(70, Manifold%TopDriveIBop)
@@ -1179,7 +1176,7 @@ end subroutine PathFinding_Step
if(.not.Manifold%IsTopDriveIBopInstalled) return
Manifold%TopDriveIBop = .true.
call ChangeValve(70, Manifold%TopDriveIBop)
# 1216
# 1213

end subroutine
@@ -1188,7 +1185,7 @@ end subroutine PathFinding_Step
if(.not.Manifold%IsTopDriveIBopInstalled) return
Manifold%TopDriveIBop = .false.
call ChangeValve(70, Manifold%TopDriveIBop)
# 1226
# 1223

end subroutine
@@ -1212,7 +1209,7 @@ end subroutine PathFinding_Step
call Manifold%Valve(69)%AdjacentTo(48)
call Manifold%Valve(79)%AdjacentTo(48)
# 1251
# 1248

call OpenFloatValve()
end subroutine
@@ -1229,7 +1226,7 @@ end subroutine PathFinding_Step
call Manifold%Valve(69)%AdjacentTo(79)
call Manifold%Valve(79)%AdjacentTo(69)
# 1269
# 1266

Manifold%FloatValve = .false.
call ChangeValve(48, Manifold%FloatValve)
@@ -1239,7 +1236,7 @@ end subroutine PathFinding_Step
implicit none
if(.not.Manifold%IsFloatValveInstalled) return
Manifold%FloatValve = .true.
# 1280
# 1277

call ChangeValve(48, Manifold%FloatValve)
end subroutine
@@ -1248,7 +1245,7 @@ end subroutine PathFinding_Step
implicit none
if(.not.Manifold%IsFloatValveInstalled) return
Manifold%FloatValve = .false.
# 1290
# 1287

call ChangeValve(48, Manifold%FloatValve)
end subroutine
@@ -1324,7 +1321,7 @@ end subroutine PathFinding_Step
Manifold%Valve(60)%Status = .false.
endif
endif
# 1367
# 1364

!call Traverse()
Manifold%IsPathsDirty = .true.


+ 1
- 1
CSharp/OperationScenarios/Unity/UnityModule.f90 Целия файл

@@ -79,7 +79,7 @@ subroutine Set_NearFloorPosition(v)
! #endif
data%Equipments%UnityInputs%NearFloorPosition = v
!**call data%Equipments%UnityInputs%OnNearFloorPositionChange%RunAll()
if(logging>4) then
if(log_level>4) then
print*, 'NearFloorPosition =', data%Equipments%UnityInputs%NearFloorPosition
endif
end subroutine


+ 2
- 2
CSharp/OperationScenarios/Unity/UnityModule.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Unity/UnityModule.f90"
# 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Unity/UnityModule.f90"
module UnityModule
use SimulationVariables
implicit none
@@ -80,7 +80,7 @@ subroutine Set_NearFloorPosition(v)
! #endif
data%Equipments%UnityInputs%NearFloorPosition = v
!**call data%Equipments%UnityInputs%OnNearFloorPositionChange%RunAll()
if(logging>4) then
if(log_level>4) then
print*, 'NearFloorPosition =', data%Equipments%UnityInputs%NearFloorPosition
endif
end subroutine


+ 31
- 31
Common/json-fortran/json_value_module.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90"
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90"
!*****************************************************************************************
!> author: Jacob Williams
! license: BSD
@@ -25,7 +25,7 @@

private

# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_macros.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_macros.inc" 1
! JSON-Fortran preprocessor macros.
!
! License
@@ -63,7 +63,7 @@


!*********************************************************
# 28 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 28 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

!*********************************************************
!>
@@ -972,7 +972,7 @@
! all have a similar interface.

function initialize_json_core(&
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_initialize_dummy_arguments.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_initialize_dummy_arguments.inc" 1
! The dummy argument list for the various `initialize` subroutines.
!
! See also: json_initialize_argument.inc
@@ -998,13 +998,13 @@ null_to_real_mode,&
non_normal_mode,&
use_quiet_nan, &
strict_integer_type_checking &
# 983 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 983 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
) result(json_core_object)

implicit none

type(json_core) :: json_core_object
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_initialize_arguments.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_initialize_arguments.inc" 1
! The argument list for the various `initialize` subroutines.
!
! See also: json_initialize_dummy_arguments.inc
@@ -1119,10 +1119,10 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
!! value cannot be read.
!!
!! (default is true)
# 989 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 989 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

call json_core_object%initialize(&
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_initialize_dummy_arguments.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_initialize_dummy_arguments.inc" 1
! The dummy argument list for the various `initialize` subroutines.
!
! See also: json_initialize_argument.inc
@@ -1148,7 +1148,7 @@ null_to_real_mode,&
non_normal_mode,&
use_quiet_nan, &
strict_integer_type_checking &
# 992 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 992 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
)

end function initialize_json_core
@@ -1174,7 +1174,7 @@ strict_integer_type_checking &
! all have a similar interface.

subroutine json_initialize(me,&
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_initialize_dummy_arguments.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_initialize_dummy_arguments.inc" 1
! The dummy argument list for the various `initialize` subroutines.
!
! See also: json_initialize_argument.inc
@@ -1200,13 +1200,13 @@ null_to_real_mode,&
non_normal_mode,&
use_quiet_nan, &
strict_integer_type_checking &
# 1018 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 1018 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
)

implicit none

class(json_core),intent(inout) :: me
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_initialize_arguments.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_initialize_arguments.inc" 1
! The argument list for the various `initialize` subroutines.
!
! See also: json_initialize_dummy_arguments.inc
@@ -1321,7 +1321,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
!! value cannot be read.
!!
!! (default is true)
# 1024 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 1024 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

character(kind=CDK,len=10) :: w !! max string length
character(kind=CDK,len=10) :: d !! real precision digits
@@ -8262,7 +8262,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
integer(IK),parameter :: default_if_not_specified = 0_IK
character(kind=CK,len=*),parameter :: routine = CK_'json_get_integer_by_path'

# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_get_scalar_by_path.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_get_scalar_by_path.inc" 1
type(json_value),pointer :: p

if (present(default)) then
@@ -8295,7 +8295,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
else
if ( present(found) ) found = .true.
end if
# 8210 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 8210 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

end subroutine json_get_integer_by_path
!*****************************************************************************************
@@ -8413,7 +8413,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking

character(kind=CK,len=*),parameter :: routine = CK_'json_get_integer_vec_by_path'

# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_get_vec_by_path.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_get_vec_by_path.inc" 1
type(json_value),pointer :: p

if ( json%exception_thrown ) then
@@ -8441,7 +8441,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
else
if ( present(found) ) found = .true.
end if
# 8328 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 8328 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

end subroutine json_get_integer_vec_by_path
!*****************************************************************************************
@@ -8573,7 +8573,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
real(RK),parameter :: default_if_not_specified = 0.0_RK
character(kind=CK,len=*),parameter :: routine = CK_'json_get_real_by_path'

# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_get_scalar_by_path.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_get_scalar_by_path.inc" 1
type(json_value),pointer :: p

if (present(default)) then
@@ -8606,7 +8606,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
else
if ( present(found) ) found = .true.
end if
# 8460 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 8460 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

end subroutine json_get_real_by_path
!*****************************************************************************************
@@ -8709,7 +8709,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking

character(kind=CK,len=*),parameter :: routine = CK_'json_get_real_vec_by_path'

# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_get_vec_by_path.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_get_vec_by_path.inc" 1
type(json_value),pointer :: p

if ( json%exception_thrown ) then
@@ -8737,7 +8737,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
else
if ( present(found) ) found = .true.
end if
# 8563 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 8563 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

end subroutine json_get_real_vec_by_path
!*****************************************************************************************
@@ -8984,7 +8984,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
logical(LK),parameter :: default_if_not_specified = .false.
character(kind=CK,len=*),parameter :: routine = CK_'json_get_logical_by_path'

# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_get_scalar_by_path.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_get_scalar_by_path.inc" 1
type(json_value),pointer :: p

if (present(default)) then
@@ -9017,7 +9017,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
else
if ( present(found) ) found = .true.
end if
# 8935 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 8935 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

end subroutine json_get_logical_by_path
!*****************************************************************************************
@@ -9120,7 +9120,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking

character(kind=CK,len=*),parameter :: routine = CK_'json_get_logical_vec_by_path'

# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_get_vec_by_path.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_get_vec_by_path.inc" 1
type(json_value),pointer :: p

if ( json%exception_thrown ) then
@@ -9148,7 +9148,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
else
if ( present(found) ) found = .true.
end if
# 9038 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 9038 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

end subroutine json_get_logical_vec_by_path
!*****************************************************************************************
@@ -9295,7 +9295,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
character(kind=CK,len=*),parameter :: default_if_not_specified = CK_''
character(kind=CK,len=*),parameter :: routine = CK_'json_get_string_by_path'

# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_get_scalar_by_path.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_get_scalar_by_path.inc" 1
type(json_value),pointer :: p

if (present(default)) then
@@ -9328,7 +9328,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
else
if ( present(found) ) found = .true.
end if
# 9185 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 9185 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

end subroutine json_get_string_by_path
!*****************************************************************************************
@@ -9439,7 +9439,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking

character(kind=CK,len=*),parameter :: routine = CK_'json_get_string_vec_by_path'

# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_get_vec_by_path.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_get_vec_by_path.inc" 1
type(json_value),pointer :: p

if ( json%exception_thrown ) then
@@ -9467,7 +9467,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
else
if ( present(found) ) found = .true.
end if
# 9296 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 9296 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

end subroutine json_get_string_vec_by_path
!*****************************************************************************************
@@ -9622,7 +9622,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking

character(kind=CK,len=*),parameter :: routine = CK_'json_get_alloc_string_vec_by_path'

# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_get_vec_by_path_alloc.inc" 1
# 1 "/home/admin/SimulationCore2/Common/json-fortran/json_get_vec_by_path_alloc.inc" 1
type(json_value),pointer :: p

if ( json%exception_thrown ) then
@@ -9666,7 +9666,7 @@ logical(LK),intent(in),optional :: strict_integer_type_checking
else
if ( present(found) ) found = .true.
end if
# 9451 "/mnt/c/Projects/VSIM/SimulationCore2/Common/json-fortran/json_value_module.F90" 2
# 9451 "/home/admin/SimulationCore2/Common/json-fortran/json_value_module.F90" 2

end subroutine json_get_alloc_string_vec_by_path
!*****************************************************************************************


+ 1
- 1
Equipments/ChokeControl/ChokeControlMain.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/ChokeControl/ChokeControlMain.f90"
# 1 "/home/admin/SimulationCore2/Equipments/ChokeControl/ChokeControlMain.f90"
module ChokeControlMain
USE CHOKEVARIABLES
use SimulationVariables !@


+ 1
- 1
Equipments/Drawworks/Drawworks_INPUTS.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/Drawworks/Drawworks_INPUTS.f90"
# 1 "/home/admin/SimulationCore2/Equipments/Drawworks/Drawworks_INPUTS.f90"
subroutine Drawworks_Inputs

use CDrillingConsoleVariables


+ 1
- 1
Equipments/Drawworks/Drawworks_MainSolver.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/Drawworks/Drawworks_MainSolver.f90"
# 1 "/home/admin/SimulationCore2/Equipments/Drawworks/Drawworks_MainSolver.f90"
subroutine Drawworks_MainSolver
use SimulationVariables !@


+ 1
- 1
Equipments/Drawworks/Drawworks_Outputs.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/Drawworks/Drawworks_Outputs.f90"
# 1 "/home/admin/SimulationCore2/Equipments/Drawworks/Drawworks_Outputs.f90"
subroutine Drawworks_Outputs
Use CSounds


+ 1
- 1
Equipments/MudSystem/Elements_Creation.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/MudSystem/Elements_Creation.f90"
# 1 "/home/admin/SimulationCore2/Equipments/MudSystem/Elements_Creation.f90"
subroutine ElementsCreation ! is called in subroutine Fluid_Flow_Solver
Use GeoElements_FluidModule


+ 1
- 1
Equipments/MudSystem/Kick_Influx.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/MudSystem/Kick_Influx.f90"
# 1 "/home/admin/SimulationCore2/Equipments/MudSystem/Kick_Influx.f90"
subroutine Kick_Influx ! is called in subroutine CirculationCodeSelect
Use GeoElements_FluidModule


+ 1
- 1
Equipments/MudSystem/MudSystem.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/MudSystem/MudSystem.f90"
# 1 "/home/admin/SimulationCore2/Equipments/MudSystem/MudSystem.f90"
module MudSystemModule
USE MudSystemVARIABLES


+ 1
- 1
Equipments/MudSystem/MudSystemStartup.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/MudSystem/MudSystemStartup.f90"
# 1 "/home/admin/SimulationCore2/Equipments/MudSystem/MudSystemStartup.f90"
SUBROUTINE NormalCirculation_StartUp() ! is called in module FluidFlowMain
USE MudSystemVARIABLES


+ 1
- 1
Equipments/MudSystem/MudSystem_Variables.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/MudSystem/MudSystem_Variables.f90"
# 1 "/home/admin/SimulationCore2/Equipments/MudSystem/MudSystem_Variables.f90"
MODULE MudSystemVARIABLES

use DynamicDoubleArray, only:DynamicDoubleArrayType


+ 1
- 12
Equipments/MudSystem/Plot_Final_Mud_Elements.f90 Целия файл

@@ -3,19 +3,9 @@ subroutine PlotFinalMudElements ! is called in subroutine CirculationCodeSel
Use GeoElements_FluidModule
USE CMudPropertiesVariables
USE MudSystemVARIABLES
use SimulationVariables !@@@
use SimulationVariables
Use TD_StringConnectionData
USE CHOKEVARIABLES
!use ConfigurationVariables !@
!use CDataDisplayConsole
!@ use ConfigurationVariables , StandPipePressureDataDisplay=>StandPipePressure
!use CManifolds
use SimulationVariables !@
USE CHOKEVARIABLES
!use ConfigurationVariables !@
!use CChokeManifoldVariables
use SimulationVariables
!use CTanks
!@use ConfigurationVariables, TripTankVolume2 => data%Equipments%DrillingWatch%TripTankVolume, TripTankDensity2 => TripTankDensity
USE sROP_Other_Variables
@@ -271,8 +261,7 @@ endif
data%State%MudSystem%icasing=0
data%State%MudSystem%BitMudDensity= data%State%MudSystem%Density_MudElement%Array(data%State%MudSystem%NoHorizontalMudElements+data%State%MudSystem%NoStringMudElements) ! (for ROP module)
!================================================================
!================================================================
!============================ UTUBE =============================
!IF (UtubePossibility== .true. .and. Get_KellyConnection() /= KELLY_CONNECTION_STRING .and. WellHeadIsOpen) THEN


+ 1
- 12
Equipments/MudSystem/Plot_Final_Mud_Elements.i90 Целия файл

@@ -1,22 +1,12 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/MudSystem/Plot_Final_Mud_Elements.f90"
# 1 "/home/admin/SimulationCore2/Equipments/MudSystem/Plot_Final_Mud_Elements.f90"
subroutine PlotFinalMudElements ! is called in subroutine CirculationCodeSelect
Use GeoElements_FluidModule
USE CMudPropertiesVariables
USE MudSystemVARIABLES
use SimulationVariables !@@@
use SimulationVariables
Use TD_StringConnectionData
USE CHOKEVARIABLES
!use ConfigurationVariables !@
!use CDataDisplayConsole
!@ use ConfigurationVariables , StandPipePressureDataDisplay=>StandPipePressure
!use CManifolds
use SimulationVariables !@
USE CHOKEVARIABLES
!use ConfigurationVariables !@
!use CChokeManifoldVariables
use SimulationVariables
!use CTanks
!@use ConfigurationVariables, TripTankVolume2 => data%Equipments%DrillingWatch%TripTankVolume, TripTankDensity2 => TripTankDensity
USE sROP_Other_Variables
@@ -273,7 +263,6 @@ endif
data%State%MudSystem%BitMudDensity= data%State%MudSystem%Density_MudElement%Array(data%State%MudSystem%NoHorizontalMudElements+data%State%MudSystem%NoStringMudElements) ! (for ROP module)
!================================================================
!============================ UTUBE =============================
!IF (UtubePossibility== .true. .and. Get_KellyConnection() /= KELLY_CONNECTION_STRING .and. WellHeadIsOpen) THEN


+ 1
- 1
Equipments/MudSystem/Pump_and_Trip_In.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/MudSystem/Pump_and_Trip_In.f90"
# 1 "/home/admin/SimulationCore2/Equipments/MudSystem/Pump_and_Trip_In.f90"
subroutine Pump_and_TripIn ! is called in subroutine CirculationCodeSelect
Use GeoElements_FluidModule


+ 1
- 1
Equipments/MudSystem/Trip_Out_andPump.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/MudSystem/Trip_Out_andPump.f90"
# 1 "/home/admin/SimulationCore2/Equipments/MudSystem/Trip_Out_andPump.f90"
subroutine TripOut_and_Pump ! is called in subroutine CirculationCodeSelect
Use GeoElements_FluidModule


+ 1
- 1
Equipments/Pumps/PumpsMain.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/Pumps/PumpsMain.f90"
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/PumpsMain.f90"
module PumpsMain
use SimulationVariables
implicit none


+ 1
- 1
Equipments/Pumps/Pumps_Inputs.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/Pumps/Pumps_Inputs.f90"
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_Inputs.f90"
subroutine Pumps_Inputs
use CDrillingConsoleVariables


+ 1
- 1
Equipments/Pumps/Pumps_Outputs.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/Pumps/Pumps_Outputs.f90"
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_Outputs.f90"
subroutine Pumps_Outputs
use CDataDisplayConsole


+ 1
- 1
Equipments/Pumps/Pumps_StartUp.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/Pumps/Pumps_StartUp.f90"
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_StartUp.f90"
subroutine Pumps_StartUp
use CPumpsVariables
use CPumps


+ 1
- 1
Equipments/Pumps/Pumps_VARIABLES.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/Pumps/Pumps_VARIABLES.f90"
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_VARIABLES.f90"
MODULE Pumps_VARIABLES
IMPLICIT NONE


+ 0
- 77
Equipments/RotaryTable/RTable_INPUTS.f90 Целия файл

@@ -1,77 +0,0 @@
subroutine RTable_INPUTS
use CDrillingConsoleVariables
use SimulationVariables
! use CSimulationVariables
use UnitySignalsModule
! use CTdsElevatorModesEnumVariables
use CHoistingVariables
use TD_DrillStemComponents
use UnityModule
use CWarnings
use UnitySignalVariables
use UnitySignalsModule
IMPLICIT NONE
integer :: i
data%State%RTable%AssignmentSwitch = data%Equipments%DrillingConsole%AssignmentSwitch
data%State%RTable%Switch = data%Equipments%DrillingConsole%RTSwitch
!data%State%RTable%GearsAbuse = RotaryGearsAbuse
data%State%RTable%Throttle = data%Equipments%DrillingConsole%RTThrottle ![RPM]
data%State%RTable%String_Torque = data%State%TD_String%StringTorque*12.d0 ![lb.ft]*12 ---> [lb.in] ?????????
!data%State%RTable%RpmGaugeMalf !:dar module haye C meghdardehi mishe
data%State%RTable%N_new = data%State%RTable%Throttle
if ( data%State%RTable%MotorFaileMalf==1 ) then
data%State%RTable%N_new = 0.d0
end if
data%State%RTable%String_Torque = 0.112984d0*data%State%RTable%String_Torque ![N.m]
!===> String_JCoef Calculation
if ( data%Configuration%Hoisting%DriveType==0 ) then
if ( Get_TdsConnectionModes()==TDS_CONNECTION_NOTHING .and. Get_TdsElevatorModes()==TDS_ELEVATOR_CONNECTION_NOTHING ) then
data%State%RTable%RotaryMode = 1
data%State%RTable%String_JCoef = 0.d0
Do i = 1,data%State%TD_String%StringConfigurationCount
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef+( (data%State%TD_DrillStem(i)%TotalWeight*((data%State%TD_DrillStem(i)%Id**2.d0)+(data%State%TD_DrillStem(i)%Od**2.d0)))/8.d0 ) ![lb.ft^2] , Jz=(1/2)*m*(r1^2+r2^2)
End Do
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef*0.0421401d0 ![kg.m^2]
else if ( Get_Slips() /= SLIPS_SET_END ) then
data%State%RTable%RotaryMode = 2
data%State%RTable%String_JCoef = 0.d0
data%State%RTable%String_Torque = 0.d0
else
data%State%RTable%RotaryMode = 3
data%State%RTable%String_JCoef = 0.d0
data%State%RTable%String_Torque = 0.d0
end if
else if ( data%Configuration%Hoisting%DriveType==1 ) then
if ( Get_IsKellyBushingSetInTable() .or. Get_Slips() == SLIPS_SET_END ) then !if rotary connected to string
data%State%RTable%RotaryMode = 4
data%State%RTable%String_JCoef = 0.d0
Do i = 1,data%State%TD_String%StringConfigurationCount
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef+( (data%State%TD_DrillStem(i)%TotalWeight*((data%State%TD_DrillStem(i)%Id**2.d0)+(data%State%TD_DrillStem(i)%Od**2.d0)))/8.d0 ) ![lb.ft^2] , Jz=(1/2)*m*(r1^2+r2^2)
End Do
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef*0.0421401e0 ![kg.m^2]
else
data%State%RTable%RotaryMode = 5
data%State%RTable%String_JCoef = 0.d0
data%State%RTable%String_Torque = 0.d0
end if
end if
!===> Transmission Mode
data%State%RTable%Conv_Ratio = data%State%RTable%High_Conv_Ratio
end subroutine RTable_INPUTS

+ 1
- 1
Equipments/RotaryTable/RTable_Inputs.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/RotaryTable/RTable_Inputs.f90"
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_Inputs.f90"
subroutine RTable_INPUTS
use CDrillingConsoleVariables


+ 1
- 1
Equipments/RotaryTable/RTable_Outputs.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/RotaryTable/RTable_Outputs.f90"
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_Outputs.f90"
subroutine RTable_Outputs
use CDrillingConsoleVariables


+ 0
- 67
Equipments/RotaryTable/Rtable_MainSolver.f90 Целия файл

@@ -1,67 +0,0 @@
subroutine RTable_MainSolver
use SimulationVariables !@
IMPLICIT NONE
Call RTable_Inputs
if (data%State%RTable%Throttle<=0.d0) then
data%State%RTable%K_throttle = 1
end if
if ( (any(data%State%RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (data%State%RTable%Switch==-1) ) then
data%State%RTable%SoundBlower = .true.
data%State%RTable%BLWR = 1
!======================= Rotary Table Rate_limit =======================
if (((data%State%RTable%N_new-data%State%RTable%N_old)/data%State%RTable%time_step)>data%State%RTable%RateChange) then
data%State%RTable%N_ref = (data%State%RTable%RateChange*data%State%RTable%time_step)+data%State%RTable%N_old
else if (((data%State%RTable%N_old-data%State%RTable%N_new)/data%State%RTable%time_step)>data%State%RTable%RateChange) then
data%State%RTable%N_ref = (-data%State%RTable%RateChange*data%State%RTable%time_step)+data%State%RTable%N_old
else
data%State%RTable%N_ref = data%State%RTable%N_new
end if
!=======================================================================
CALL RTable_OnModeSolver
else if ( (any(data%State%RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (data%State%RTable%Switch==1) .and. (data%State%RTable%K_throttle==1) ) then
data%State%RTable%SoundBlower = .true.
data%State%RTable%BLWR = 1
!======================= Rotary Table Rate_limit =======================
if (((data%State%RTable%N_new-data%State%RTable%N_old)/data%State%RTable%time_step)>data%State%RTable%RateChange) then
data%State%RTable%N_ref = (data%State%RTable%RateChange*data%State%RTable%time_step)+data%State%RTable%N_old
else if (((data%State%RTable%N_old-data%State%RTable%N_new)/data%State%RTable%time_step)>data%State%RTable%RateChange) then
data%State%RTable%N_ref = (-data%State%RTable%RateChange*data%State%RTable%time_step)+data%State%RTable%N_old
else
data%State%RTable%N_ref = data%State%RTable%N_new
end if
!=======================================================================
CALL RTable_OnModeSolver
else
if((any(data%State%RTable%AssignmentSwitch==(/1,2,3,4,5,8,9,10,11/))) .and. (data%State%RTable%Switch/=0)) then
data%State%RTable%SoundBlower = .true.
data%State%RTable%BLWR = 1
else
data%State%RTable%SoundBlower = .false.
data%State%RTable%BLWR = 0
end if
Call RTable_OffMode
data%State%RTable%K_throttle = 0
end if
Call RTable_Outputs
data%State%RTable%N_old = data%State%RTable%N_ref
end subroutine RTable_MainSolver

+ 0
- 45
Equipments/TopDrive/TopDrive_INPUTS.f90 Целия файл

@@ -1,45 +0,0 @@
subroutine TopDrive_Inputs
! Use CSimulationVariables
use CTopDrivePanelVariables
use SimulationVariables
use UnitySignalsModule
use SimulationVariables
Use TD_DrillStemComponents
IMPLICIT NONE
integer :: i
data%State%TDS%String_Torque = data%State%TD_String%StringTorque*12.d0 ![lb.ft]*12 ---> [lb.in] ?????????
!data%State%TDS%String_Torque = 20000.
data%State%TDS%String_Torque = 0.112984829d0*data%State%TDS%String_Torque ![N.m]
data%State%TDS%PowerState = data%Equipments%TopDrivePanel%TopDriveTdsPowerState
data%State%TDS%RpmKnob = data%Equipments%TopDrivePanel%RpmKnob
!data%State%TDS%MotorFaileMalf ! jayi meghdardehi nashode ??????????????????
data%State%TDS%RateChange = 193.d0 ![RPM/s] motaghayere voroudi ???
data%State%TDS%DrillTorqueState = data%Equipments%TopDrivePanel%TopDriveDrillTorqueState
data%State%TDS%TorqueLimitKnob = data%Equipments%TopDrivePanel%TopDriveTorqueLimitKnob ! bayad hazf shavad??????????????/
!===> data%State%TDS%String_JCoef Calculation
if ( (data%State%TDS%DrillTorqueState==-1) .and. ((Get_TdsConnectionModes()==TDS_CONNECTION_STRING).or.(Get_TdsConnectionModes()==TDS_CONNECTION_SPINE)) ) then !if TopDrive connected to string
data%State%TDS%String_JCoef = 0.d0
Do i = 1,data%State%TD_String%StringConfigurationCount
data%State%TDS%String_JCoef = data%State%TDS%String_JCoef+( (data%State%TD_DrillStem(i)%TotalWeight*((data%State%TD_DrillStem(i)%Id**2.d0)+(data%State%TD_DrillStem(i)%Od**2.d0)))/8.d0 ) ![lb.ft^2] , Jz=(1/2)*m*(r1^2+r2^2)
End Do
data%State%TDS%String_JCoef = data%State%TDS%String_JCoef*0.0421401d0 ![kg.m^2]
else
data%State%TDS%String_JCoef = 0.d0
data%State%TDS%String_Torque = 0.d0
end if
data%State%TDS%String_JCoef = data%State%TDS%String_JCoef/10.d0 !???????? /10: bi dalil, check it
end subroutine

+ 1
- 1
Equipments/TopDrive/TopDrive_Inputs.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/TopDrive/TopDrive_Inputs.f90"
# 1 "/home/admin/SimulationCore2/Equipments/TopDrive/TopDrive_Inputs.f90"
subroutine TopDrive_Inputs
! Use CSimulationVariables


+ 1
- 1
FluidFlow/Flow_Startup.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/FluidFlow/Flow_Startup.f90"
# 1 "/home/admin/SimulationCore2/FluidFlow/Flow_Startup.f90"
SUBROUTINE FlowStartup
USE Fluid_Flow_Startup_Vars


+ 1
- 1
FluidFlow/FluidFlowMain.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/FluidFlow/FluidFlowMain.f90"
# 1 "/home/admin/SimulationCore2/FluidFlow/FluidFlowMain.f90"
module FluidFlowMain
implicit none
public


+ 1
- 1
FluidFlow/Horizontal_and_String_Pressure_Distribution.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/FluidFlow/Horizontal_and_String_Pressure_Distribution.f90"
# 1 "/home/admin/SimulationCore2/FluidFlow/Horizontal_and_String_Pressure_Distribution.f90"
SUBROUTINE PressureHorizAndStringDistribution


+ 2
- 1
Makefile Целия файл

@@ -66,11 +66,12 @@ OBJ_DIR = $(TOP_DIR)/obj
# FCFLAGS = -g -J$(MOD_DIR) -fimplicit-none -Wall -cpp -ffree-line-length-256
# FCFLAGS = /module:$(MOD_DIR) /fpp
FCFLAGS = -module $(MOD_DIR) -fpp -debug all -g -traceback -D IFORT
FCFLAGS = -module $(MOD_DIR) -Ilib -fpp -debug all -g -traceback -D IFORT
TARGET = SimulationCore2
SRCS_F =\
Simulation/logging.f90 \
CSharp/OperationScenarios/Common/COperationScenariosVariables.f90 \
TorqueDrag/TD_Modules/TD_WellGeometry.f90 \
TorqueDrag/TD_Modules/TD_WellElements.f90 \


+ 2
- 2
Redis/Redis_Interface.f90 Целия файл

@@ -73,7 +73,7 @@ Module RedisInterface
character(len=4)::part
part = "out"//c_null_char
c_str = str//c_null_char
if(logging>4) print *,"setting Data: ",len_trim(str)
if(log_level>4) print *,"setting Data: ",len_trim(str)
call setData_C(part,c_str)
END SUBROUTINE setData
@@ -85,7 +85,7 @@ Module RedisInterface
character(len=4)::part
part = "in"//c_null_char
c_str = str//c_null_char
if(logging>4) print *,"setting Data: ",len_trim(str)
if(log_level>4) print *,"setting Data: ",len_trim(str)
call setData_C(part,c_str)
END SUBROUTINE setInput


+ 3
- 3
Redis/Redis_Interface.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Redis/Redis_Interface.f90"
# 1 "/home/admin/SimulationCore2/Redis/Redis_Interface.f90"
Module RedisInterface
! use iso_c_binding, only: c_char
Interface
@@ -74,7 +74,7 @@ Module RedisInterface
character(len=4)::part
part = "out"//c_null_char
c_str = str//c_null_char
if(logging>4) print *,"setting Data: ",len_trim(str)
if(log_level>4) print *,"setting Data: ",len_trim(str)
call setData_C(part,c_str)
END SUBROUTINE setData

@@ -86,7 +86,7 @@ Module RedisInterface
character(len=4)::part
part = "in"//c_null_char
c_str = str//c_null_char
if(logging>4) print *,"setting Data: ",len_trim(str)
if(log_level>4) print *,"setting Data: ",len_trim(str)
call setData_C(part,c_str)
END SUBROUTINE setInput



+ 1
- 0
Redis/redis_io.c Целия файл

@@ -28,6 +28,7 @@ void initConnection(char *address, int *port,char * password,char *datakey,int *
printf("Connection Stablished to %s\n",address);
if(strlen(password)>0)
{
// printf("Authenticating with password %s (len={%zu})",password,strlen(password));
redisReply *reply= redisCommand(context, "AUTH %s", password);
if (reply->type == REDIS_REPLY_ERROR) {
printf("Authentication failed.\n");


+ 0
- 15
Rop/Bit_Database.txt Целия файл

@@ -1,15 +0,0 @@
Bit Class H1 H2 H3 (w/d)max
11 , 1.9 , 7. , 1. , 7.
12 , 1.9 , 7. , 1. , 7.
13 , 1.84 , 6. , 0.8 , 8.
14 , 1.84 , 6. , 0.8 , 8.
21 , 1.8 , 5. , 0.6 , 8.5
22 , 1.8 , 5. , 0.6 , 8.5
23 , 1.76 , 4. , 0.48 , 9.
24 , 1.76 , 4. , 0.48 , 9.
31 , 1.7 , 3. , 0.36 , 10.
32 , 1.65 , 2. , 0.26 , 10.
33 , 1.6 , 2. , 0.2 , 10.
34 , 1.6 , 2. , 0.2 , 10.
41 , 1.5 , 2. , 0.18 , 10.
10 , 1.5 , 1. , 0.02 , 10.

+ 1
- 1
Rop/ROP_MainCalculation.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Rop/ROP_MainCalculation.f90"
# 1 "/home/admin/SimulationCore2/Rop/ROP_MainCalculation.f90"
subroutine ROP_MainCalculation
use SimulationVariables
use sROP_Other_Variables


+ 1
- 1
Simulation/SimulationVariables.f90 Целия файл

@@ -1,5 +1,6 @@
module SimulationVariables
use Constants
use logging
use json_module
use CUnityInputs
@@ -214,7 +215,6 @@ module SimulationVariables
end type SimulationDataType
type(SimulationDataType)::data
integer::logging=0
contains
end module SimulationVariables

+ 2
- 2
Simulation/SimulationVariables.i90 Целия файл

@@ -1,6 +1,7 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Simulation/SimulationVariables.f90"
# 1 "/home/admin/SimulationCore2/Simulation/SimulationVariables.f90"
module SimulationVariables
use Constants
use logging
use json_module
use CUnityInputs
@@ -215,7 +216,6 @@ module SimulationVariables
end type SimulationDataType

type(SimulationDataType)::data
integer::logging=0
contains
end module SimulationVariables

Двоични данни
Целия файл


Двоични данни
Целия файл


+ 3
- 2
SimulationCore2.f90 Целия файл

@@ -15,10 +15,11 @@ program SimulationCore2
use Simulator
use RedisInterface
use logging
!use testRedisModule
implicit none
character(len=100) :: redis_host,redis_password, sim_id, temp
integer :: redis_port, log_level, status,stepTime
integer :: redis_port, status,stepTime
! Variables

! Body of SimulationCore2
@@ -38,6 +39,6 @@ program SimulationCore2
call get_command_argument(6, temp)
read(temp,*,iostat=status) stepTime

call simulate(trim(redis_host),redis_port,trim(redis_password), trim(sim_id),log_level,stepTime)
call simulate(trim(redis_host),redis_port,trim(redis_password), trim(sim_id),stepTime)
end program SimulationCore2


+ 4
- 3
SimulationCore2.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/SimulationCore2.f90"
# 1 "/home/admin/SimulationCore2/SimulationCore2.f90"
! SimulationCore2.f90
!
! FUNCTIONS:
@@ -16,10 +16,11 @@ program SimulationCore2
use Simulator
use RedisInterface
use logging
!use testRedisModule
implicit none
character(len=100) :: redis_host,redis_password, sim_id, temp
integer :: redis_port, log_level, status,stepTime
integer :: redis_port, status,stepTime
! Variables

! Body of SimulationCore2
@@ -39,6 +40,6 @@ program SimulationCore2
call get_command_argument(6, temp)
read(temp,*,iostat=status) stepTime

call simulate(trim(redis_host),redis_port,trim(redis_password), trim(sim_id),log_level,stepTime)
call simulate(trim(redis_host),redis_port,trim(redis_password), trim(sim_id),stepTime)
end program SimulationCore2


Двоични данни
Целия файл


+ 70
- 81
Simulator.f90 Целия файл

@@ -85,16 +85,15 @@ module Simulator
RETURN
END FUNCTION
subroutine Simulate(redis_host,redis_port,redis_password, sim_id,log_level,stepTime)
subroutine Simulate(redis_host,redis_port,redis_password, sim_id,stepTime)
character(len=*) :: redis_host,redis_password, sim_id
integer::t0,t1,t2,t3,t_read=0,t_write=0,t_exec=0,i,status,redis_port,log_level,stepTime
integer::t0,t1,t2,t3,t_read=0,t_write=0,t_exec=0,i,status,redis_port,stepTime
integer(8),dimension(12)::t,t_modules
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
do i=1,size(t_modules)
t_modules(i)=0
end do
logging = log_level
! call initSimulation(configFilename)
call initConnection(redis_host,redis_port,redis_password, sim_id,status)
if (status<0) then
@@ -116,19 +115,21 @@ module Simulator
if(simulationStatus==PLAY_TO_DETERMINED_TIME .and. simulationStep>simulationEnd) exit
if(simulationStatus==STOP) exit
if(simulationStatus==PAUSE) then
print *, "paused"
print *, "paused"
call sleepqq(stepTime)
go to 211
endif
if(logging>4) print *,"end reading"
call logg(4,"end reading")
t1 = time_ms()
t_read = t_read+t1-t0
if(logging>4) print *,"read completed"
call logg(4,"read completed")
!! Rafiee, nothing changed
call BopStack_Step()
t(1) = time_ms()
t_modules(1) = t_modules(1)+t(1)-t1
!! Tarmigh, now is rewritten
call Pump1_Step()
call Pumps_MainSolver()
t(2) = time_ms()
t_modules(2) = t_modules(2)+t(2)-t(1)
!call Pump2_Step()
@@ -183,10 +184,10 @@ module Simulator
t(11) = time_ms()
t_modules(11) = t_modules(11)+t(11)-t(10)
!! Sheikh
call FluidFlow_Step()
!! Ahmadi
call OperationScenarios_Step()
!! Sheikh
call FluidFlow_Step()
!! Write variables to shared files
t2 = time_ms()
! stepTime = t2-t1
@@ -194,7 +195,7 @@ module Simulator
t_exec = t_exec+t2-t1
! call date_and_time(values=timearray)
! t0 = time_ms()
! t0 = time_ms()
call write_variables()
t3 = time_ms()
if(t3-t0 < stepTime) then
@@ -240,8 +241,8 @@ module Simulator
! endif
! ! print *,"file read"
! call jsonfile%json_file_get_root(jsonvalue)
! call jsoncore%get(jsonvalue,'logging',logging)
! print *,"logging=",logging
! call jsoncore%get(jsonvalue,'log_level',log_level)
! print *,"log_level=",log_level
! end subroutine
subroutine write_variables()
@@ -249,6 +250,8 @@ module Simulator
use json_module
implicit none
type(json_value),pointer :: jsonroot
character(len=10)::str
call jsoncore%initialize()
call jsoncore%create_object(jsonroot,'')
! print *,"status=",simulationStatus
@@ -263,10 +266,11 @@ module Simulator
call EquipmentsToJson(jsonroot)
call jsoncore%print_to_string(jsonroot,redisInput)
if(logging>4) then
print *,"Writing to redis:",len(redisInput)
call jsoncore%print(jsonroot,'data_out.json')
if(log_level>4) then
write(str, '(I0)') len(redisInput)
print *,"Writing to redis:"//trim(str)
endif
call setData(redisInput)
! nullify(redisContent)
! deallocate(redisContent)
@@ -287,7 +291,6 @@ module Simulator
call jsonfile%initialize()
call jsonfile%get_core(json)
! call jsonfile%load_file('redisContent.json'); if (jsonfile%failed()) stop
call jsonfile%deserialize(redisOutput)
call jsonfile%json_file_get_root(jsonroot)
! call json%info(jsonvalue, n_children=n_children)
@@ -301,67 +304,48 @@ module Simulator
call json%get(jsonroot,'endstep',pval)
call json%get(pval,simulationEnd)
call ConfigurationFromJson(jsonfile)
! nullify(jsonroot)
! print *,"jsonroot freed"
! nullify(pval)
! print *,"pval freed"
! call WarningsFromJson(jsonroot)
! call ProblemsFromJson(jsonvalue)
! call EquipmentsFromJson(jsonroot)
! deallocate(redisContent)
! call json%destroy(pval)
call jsonfile%destroy()
print *,"jsonfile destroyed"
! call json%destroy(pval)
! call json%destroy(jsonroot)
! nullify(jsonroot)
end subroutine
subroutine read_variables()
type(json_value),pointer :: jsonroot,pval
type(json_file) :: jsonfile
type(json_core)::json
integer::stat
call getData(redisOutput)
! print *,len(redisOutput)," bytes read from redis"
! open(1,file="redisContent.json",status="REPLACE")
! write(1,"(A)") redisContent
! close(1)
call jsoncore%initialize()
call jsonfile%initialize(jsoncore)
print *,len(redisOutput)," bytes read from redis"
open(1,file="redisContent.json",status="REPLACE")
write(1,"(A)") redisOutput
close(1)
call jsonfile%initialize()
call jsonfile%get_core(json)
call jsonfile%deserialize(redisOutput)
call jsonfile%json_file_get_root(jsonroot)
! call json%info(jsonvalue, n_children=n_children)
! print *,"n_children =",n_children
call jsoncore%get(jsonroot,'status',pval)
call jsoncore%get(pval,stat)
call json%get(jsonroot,'status',pval)
call json%get(pval,stat)
if (stat==0) then
return
endif
simulationStatus = stat
call jsoncore%get(jsonroot,'speed',pval)
call jsoncore%get(pval,simulationSpeed)
call json%get(jsonroot,'speed',pval)
call json%get(pval,simulationSpeed)
if(simulationSpeed==0) simulationSpeed = 1
msPerStep = 100/simulationSpeed
call jsoncore%get(jsonroot,'endstep',pval)
call jsoncore%get(pval,simulationEnd)
call json%get(jsonroot,'endstep',pval)
call json%get(pval,simulationEnd)
print *,simulationStep,"/",simulationEnd
! call ConfigurationFromJson(jsonroot)
! call WarningsFromJson(jsonroot)
call ProblemsFromJson(jsonfile)
! call ProblemsFromJson(jsonfile)
call EquipmentsFromJson(jsonfile)
! deallocate(redisContent)
! call json%destroy(pval)
! call jsoncore%destroy(pval)
! call jsoncore%destroy(jsonroot)
! call jsonfile%destroy()
! nullify(jsonroot)
call jsonfile%destroy()
end subroutine
subroutine init_modules
print *,"initializing modules"
!Tarmigh
call Pump1_Init()
call Pumps_StartUp()
print *,"pump1 initialized"
!call Pump2_Init()
call RotaryTable_Init()
@@ -402,18 +386,23 @@ module Simulator
type(json_value),pointer :: parent
type(json_value),pointer :: p
type(json_file)::jsonfile
integer::n_children
logical::is_found
! 1. get related root
call jsonfile%json_file_get_root(parent)
call jsoncore%get(parent,"Equipments",p)
! call jsonfile%json_file_get_root(parent)
! call jsoncore%get(parent,"Equipments",p)
call jsonfile%get("Equipments",p,is_found)
! call jsoncore%info(p, n_children=n_children)
! print *,"number of Equipments =",n_children
! 2. add member of data type to new node
call BopControlPanelFromJson(p)
call ChokeControlPanelFromJson(p)
call ChokeManifoldFromJson(p)
call DataDisplayConsoleFromJson(p)
call DrillingConsoleFromJson(p)
call DrillingConsoleFromJson(jsonfile)
! call HookFromJson(p)
call StandPipeManifoldFromJson(p)
call TopDrivePanelFromJson(p)
@@ -446,37 +435,37 @@ module Simulator
call jsoncore%add(parent,p)
end subroutine
subroutine ConfigurationToJson(parent)
type(json_value),pointer :: parent
type(json_value),pointer :: p
! subroutine ConfigurationToJson(parent)
! type(json_value),pointer :: parent
! type(json_value),pointer :: p
! 1. create new node
call jsoncore%create_object(p,'Configuration')
! ! 1. create new node
! call jsoncore%create_object(p,'Configuration')
! 2. add member of data type to new node
call StringConfigurationToJson(p)
call FormationToJson(p)
call ReservoirToJson(p)
call ShoeToJson(p)
call AccumulatorToJson(p)
call BopStackToJson(p)
call HoistingToJson(p)
call PowerToJson(p)
call PumpsToJson(p)
call RigSizeToJson(p)
call CasingLinerChokeToJson(p)
call PathGenerationToJson(p)
! call WellSurveyDataToJson(p)
call MudPropertiesToJson(p)
call UnityOutputsToJson(p)
! 3. add new node to parent
call jsoncore%add(parent,p)
end subroutine
! ! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
! call ReservoirToJson(p)
! call ShoeToJson(p)
! call AccumulatorToJson(p)
! call BopStackToJson(p)
! call HoistingToJson(p)
! call PowerToJson(p)
! call PumpsToJson(p)
! call RigSizeToJson(p)
! call CasingLinerChokeToJson(p)
! call PathGenerationToJson(p)
! ! call WellSurveyDataToJson(p)
! call MudPropertiesToJson(p)
! call UnityOutputsToJson(p)
! ! 3. add new node to parent
! call jsoncore%add(parent,p)
! end subroutine
subroutine WarningsToJson(parent)
type(json_value),pointer :: parent
type(json_value),pointer :: parent
type(json_value),pointer :: p
! 1. create new node


+ 70
- 81
Simulator.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Simulator.f90"
# 1 "/home/admin/SimulationCore2/Simulator.f90"
module Simulator
use IFPORT
use RedisInterface
@@ -86,16 +86,15 @@ module Simulator
RETURN
END FUNCTION

subroutine Simulate(redis_host,redis_port,redis_password, sim_id,log_level,stepTime)
subroutine Simulate(redis_host,redis_port,redis_password, sim_id,stepTime)
character(len=*) :: redis_host,redis_password, sim_id
integer::t0,t1,t2,t3,t_read=0,t_write=0,t_exec=0,i,status,redis_port,log_level,stepTime
integer::t0,t1,t2,t3,t_read=0,t_write=0,t_exec=0,i,status,redis_port,stepTime
integer(8),dimension(12)::t,t_modules
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

do i=1,size(t_modules)
t_modules(i)=0
end do
logging = log_level
! call initSimulation(configFilename)
call initConnection(redis_host,redis_port,redis_password, sim_id,status)
if (status<0) then
@@ -117,19 +116,21 @@ module Simulator
if(simulationStatus==PLAY_TO_DETERMINED_TIME .and. simulationStep>simulationEnd) exit
if(simulationStatus==STOP) exit
if(simulationStatus==PAUSE) then
print *, "paused"
print *, "paused"
call sleepqq(stepTime)
go to 211
endif
if(logging>4) print *,"end reading"
call logg(4,"end reading")
t1 = time_ms()
t_read = t_read+t1-t0
if(logging>4) print *,"read completed"
call logg(4,"read completed")
!! Rafiee, nothing changed
call BopStack_Step()
t(1) = time_ms()
t_modules(1) = t_modules(1)+t(1)-t1
!! Tarmigh, now is rewritten
call Pump1_Step()
call Pumps_MainSolver()
t(2) = time_ms()
t_modules(2) = t_modules(2)+t(2)-t(1)
!call Pump2_Step()
@@ -184,10 +185,10 @@ module Simulator
t(11) = time_ms()
t_modules(11) = t_modules(11)+t(11)-t(10)

!! Sheikh
call FluidFlow_Step()
!! Ahmadi
call OperationScenarios_Step()
!! Sheikh
call FluidFlow_Step()
!! Write variables to shared files
t2 = time_ms()
! stepTime = t2-t1
@@ -241,8 +242,8 @@ module Simulator
! endif
! ! print *,"file read"
! call jsonfile%json_file_get_root(jsonvalue)
! call jsoncore%get(jsonvalue,'logging',logging)
! print *,"logging=",logging
! call jsoncore%get(jsonvalue,'log_level',log_level)
! print *,"log_level=",log_level
! end subroutine

subroutine write_variables()
@@ -250,6 +251,8 @@ module Simulator
use json_module
implicit none
type(json_value),pointer :: jsonroot
character(len=10)::str

call jsoncore%initialize()
call jsoncore%create_object(jsonroot,'')
! print *,"status=",simulationStatus
@@ -264,10 +267,11 @@ module Simulator
call EquipmentsToJson(jsonroot)

call jsoncore%print_to_string(jsonroot,redisInput)
if(logging>4) then
print *,"Writing to redis:",len(redisInput)
call jsoncore%print(jsonroot,'data_out.json')
if(log_level>4) then
write(str, '(I0)') len(redisInput)
print *,"Writing to redis:"//trim(str)
endif

call setData(redisInput)
! nullify(redisContent)
! deallocate(redisContent)
@@ -288,7 +292,6 @@ module Simulator

call jsonfile%initialize()
call jsonfile%get_core(json)
! call jsonfile%load_file('redisContent.json'); if (jsonfile%failed()) stop
call jsonfile%deserialize(redisOutput)
call jsonfile%json_file_get_root(jsonroot)
! call json%info(jsonvalue, n_children=n_children)
@@ -302,67 +305,48 @@ module Simulator
call json%get(jsonroot,'endstep',pval)
call json%get(pval,simulationEnd)
call ConfigurationFromJson(jsonfile)
! nullify(jsonroot)
! print *,"jsonroot freed"
! nullify(pval)
! print *,"pval freed"
! call WarningsFromJson(jsonroot)
! call ProblemsFromJson(jsonvalue)
! call EquipmentsFromJson(jsonroot)
! deallocate(redisContent)
! call json%destroy(pval)
call jsonfile%destroy()
print *,"jsonfile destroyed"
! call json%destroy(pval)
! call json%destroy(jsonroot)
! nullify(jsonroot)
end subroutine

subroutine read_variables()
type(json_value),pointer :: jsonroot,pval
type(json_file) :: jsonfile
type(json_core)::json
integer::stat
call getData(redisOutput)

! print *,len(redisOutput)," bytes read from redis"
! open(1,file="redisContent.json",status="REPLACE")
! write(1,"(A)") redisContent
! close(1)
call jsoncore%initialize()
call jsonfile%initialize(jsoncore)
print *,len(redisOutput)," bytes read from redis"
open(1,file="redisContent.json",status="REPLACE")
write(1,"(A)") redisOutput
close(1)
call jsonfile%initialize()
call jsonfile%get_core(json)
call jsonfile%deserialize(redisOutput)
call jsonfile%json_file_get_root(jsonroot)
! call json%info(jsonvalue, n_children=n_children)
! print *,"n_children =",n_children
call jsoncore%get(jsonroot,'status',pval)
call jsoncore%get(pval,stat)
call json%get(jsonroot,'status',pval)
call json%get(pval,stat)
if (stat==0) then
return
endif
simulationStatus = stat
call jsoncore%get(jsonroot,'speed',pval)
call jsoncore%get(pval,simulationSpeed)
call json%get(jsonroot,'speed',pval)
call json%get(pval,simulationSpeed)
if(simulationSpeed==0) simulationSpeed = 1
msPerStep = 100/simulationSpeed
call jsoncore%get(jsonroot,'endstep',pval)
call jsoncore%get(pval,simulationEnd)
call json%get(jsonroot,'endstep',pval)
call json%get(pval,simulationEnd)
print *,simulationStep,"/",simulationEnd
! call ConfigurationFromJson(jsonroot)
! call WarningsFromJson(jsonroot)
call ProblemsFromJson(jsonfile)
! call ProblemsFromJson(jsonfile)
call EquipmentsFromJson(jsonfile)
! deallocate(redisContent)
! call json%destroy(pval)
! call jsoncore%destroy(pval)
! call jsoncore%destroy(jsonroot)
! call jsonfile%destroy()
! nullify(jsonroot)
call jsonfile%destroy()
end subroutine

subroutine init_modules
print *,"initializing modules"
!Tarmigh
call Pump1_Init()
call Pumps_StartUp()
print *,"pump1 initialized"
!call Pump2_Init()
call RotaryTable_Init()
@@ -403,18 +387,23 @@ module Simulator
type(json_value),pointer :: parent
type(json_value),pointer :: p
type(json_file)::jsonfile

integer::n_children
logical::is_found

! 1. get related root
call jsonfile%json_file_get_root(parent)
call jsoncore%get(parent,"Equipments",p)
! call jsonfile%json_file_get_root(parent)
! call jsoncore%get(parent,"Equipments",p)
call jsonfile%get("Equipments",p,is_found)
! call jsoncore%info(p, n_children=n_children)
! print *,"number of Equipments =",n_children

! 2. add member of data type to new node
call BopControlPanelFromJson(p)
call ChokeControlPanelFromJson(p)
call ChokeManifoldFromJson(p)
call DataDisplayConsoleFromJson(p)
call DrillingConsoleFromJson(p)
call DrillingConsoleFromJson(jsonfile)
! call HookFromJson(p)
call StandPipeManifoldFromJson(p)
call TopDrivePanelFromJson(p)
@@ -447,37 +436,37 @@ module Simulator
call jsoncore%add(parent,p)
end subroutine

subroutine ConfigurationToJson(parent)
type(json_value),pointer :: parent
type(json_value),pointer :: p
! subroutine ConfigurationToJson(parent)
! type(json_value),pointer :: parent
! type(json_value),pointer :: p

! 1. create new node
call jsoncore%create_object(p,'Configuration')
! ! 1. create new node
! call jsoncore%create_object(p,'Configuration')
! 2. add member of data type to new node
call StringConfigurationToJson(p)
call FormationToJson(p)
call ReservoirToJson(p)
call ShoeToJson(p)
call AccumulatorToJson(p)
call BopStackToJson(p)
call HoistingToJson(p)
call PowerToJson(p)
call PumpsToJson(p)
call RigSizeToJson(p)
call CasingLinerChokeToJson(p)
call PathGenerationToJson(p)
! call WellSurveyDataToJson(p)
call MudPropertiesToJson(p)
call UnityOutputsToJson(p)

! 3. add new node to parent
call jsoncore%add(parent,p)
end subroutine
! ! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
! call ReservoirToJson(p)
! call ShoeToJson(p)
! call AccumulatorToJson(p)
! call BopStackToJson(p)
! call HoistingToJson(p)
! call PowerToJson(p)
! call PumpsToJson(p)
! call RigSizeToJson(p)
! call CasingLinerChokeToJson(p)
! call PathGenerationToJson(p)
! ! call WellSurveyDataToJson(p)
! call MudPropertiesToJson(p)
! call UnityOutputsToJson(p)

! ! 3. add new node to parent
! call jsoncore%add(parent,p)
! end subroutine

subroutine WarningsToJson(parent)
type(json_value),pointer :: parent
type(json_value),pointer :: parent
type(json_value),pointer :: p

! 1. create new node


+ 1
- 1
Test/write_vars.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Test/write_vars.f90"
# 1 "/home/admin/SimulationCore2/Test/write_vars.f90"
module writevarsmodule
use Simulator
use RedisInterface


Двоични данни
Целия файл


+ 1
- 1
TorqueDrag/TD_DrillingSubs/MeshGeneration_FluidModule.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/TorqueDrag/TD_DrillingSubs/MeshGeneration_FluidModule.f90"
# 1 "/home/admin/SimulationCore2/TorqueDrag/TD_DrillingSubs/MeshGeneration_FluidModule.f90"
subroutine MeshGeneration_FluidModule

Use TD_DrillStemComponents


+ 1
- 1
TorqueDrag/TD_DrillingSubs/TD_DrillStemConfiguration.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/TorqueDrag/TD_DrillingSubs/TD_DrillStemConfiguration.f90"
# 1 "/home/admin/SimulationCore2/TorqueDrag/TD_DrillingSubs/TD_DrillStemConfiguration.f90"
subroutine TD_DrillStemConfiguration

Use CStringConfigurationVariables


+ 1
- 1
TorqueDrag/TD_DrillingSubs/TD_WellGeoConfiguration.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/TorqueDrag/TD_DrillingSubs/TD_WellGeoConfiguration.f90"
# 1 "/home/admin/SimulationCore2/TorqueDrag/TD_DrillingSubs/TD_WellGeoConfiguration.f90"
subroutine TD_WellGeoConfiguration
Use TD_DrillStemComponents


+ 1
- 1
TorqueDrag/TD_Modules/TD_DrillStem.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/TorqueDrag/TD_Modules/TD_DrillStem.f90"
# 1 "/home/admin/SimulationCore2/TorqueDrag/TD_Modules/TD_DrillStem.f90"
MODULE TD_DrillStemComponents
Use CDownHoleVariables


+ 1
- 1
TorqueDrag/TD_ReadDataSubroutines/TD_WellReadData.i90 Целия файл

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/TorqueDrag/TD_ReadDataSubroutines/TD_WellReadData.f90"
# 1 "/home/admin/SimulationCore2/TorqueDrag/TD_ReadDataSubroutines/TD_WellReadData.f90"
subroutine TD_WellReadData

use SimulationVariables !@


+ 0
- 273
UpgradeLog.htm Целия файл

@@ -1,273 +0,0 @@
<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-16" http-equiv="Content-Type" /><title _locID="ConversionReport0">
Migration Report
</title><style>
/* Body style, for the entire document */
body
{
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
padding: 0;
margin: 0;
}

/* Header1 style, used for the main title */
h1
{
padding: 10px 0px 10px 10px;
font-size: 21pt;
background-color: #E2E2E2;
border-bottom: 1px #C1C1C2 solid;
color: #201F20;
margin: 0;
font-weight: normal;
}

/* Header2 style, used for "Overview" and other sections */
h2
{
font-size: 18pt;
font-weight: normal;
padding: 15px 0 5px 0;
margin: 0;
}

/* Header3 style, used for sub-sections, such as project name */
h3
{
font-weight: normal;
font-size: 15pt;
margin: 0;
padding: 15px 0 5px 0;
background-color: transparent;
}

/* Color all hyperlinks one color */
a
{
color: #1382CE;
}

/* Table styles */
table
{
border-spacing: 0 0;
border-collapse: collapse;
font-size: 10pt;
}

table th
{
background: #E7E7E8;
text-align: left;
text-decoration: none;
font-weight: normal;
padding: 3px 6px 3px 6px;
}

table td
{
vertical-align: top;
padding: 3px 6px 5px 5px;
margin: 0px;
border: 1px solid #E7E7E8;
background: #F7F7F8;
}

/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
.localLink
{
color: #1E1E1F;
background: #EEEEED;
text-decoration: none;
}

.localLink:hover
{
color: #1382CE;
background: #FFFF99;
text-decoration: none;
}

/* Center text, used in the over views cells that contain message level counts */
.textCentered
{
text-align: center;
}

/* The message cells in message tables should take up all avaliable space */
.messageCell
{
width: 100%;
}

/* Padding around the content after the h1 */
#content
{
padding: 0px 12px 12px 12px;
}

/* The overview table expands to width, with a max width of 97% */
#overview table
{
width: auto;
max-width: 75%;
}

/* The messages tables are always 97% width */
#messages table
{
width: 97%;
}

/* All Icons */
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded
{
min-width:18px;
min-height:18px;
background-repeat:no-repeat;
background-position:center;
}

/* Success icon encoded */
.IconSuccessEncoded
{
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABcElEQVR4Xq2TsUsCURzHv15g8ZJcBWlyiYYgCIWcb9DFRRwMW5TA2c0/QEFwFkxxUQdxVlBwCYWOi6IhWgQhBLHJUCkhLr/BW8S7gvrAg+N+v8/v+x68Z8MGy+XSCyABQAXgBgHGALoASkIIDWSLeLBetdHryMjd5IxQPWT4rn1c/P7+xxp72Cs9m5SZ0Bq2vPnbPFafK2zDvmNHypdC0BPkLlQhxJsCAhQoZwdZU5mwxh720qGo8MzTxTTKZDPCx2HoVzp6lz0Q9tKhyx0kGs8Ny+TkWRKk8lCROwEduhyg9l/6lunOPSfmH3NUH6uQ0KHLAe7JYvJjevm+DAMGJHToKtigE+vwvIidxLamb8IBY9e+C5LiXREkfho3TSd06HJA13/oh6T51MTsfQbHrsMynQ5dDihFjiK8JJAU9AKIWTp76dCVN7HWHrajmUEGvyF9nkbAE6gLIS7kTUyuf2gscLoJrElZo/Mvj+nPz/kLTmfnEwP3tB0AAAAASUVORK5CYII=);
}

/* Information icon encoded */
.IconInfoEncoded
{
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
}

/* Warning icon encoded */
.IconWarningEncoded
{
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
}

/* Error icon encoded */
.IconErrorEncoded
{
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
}
</style><script type="text/javascript" language="javascript">
// Startup
// Hook up the the loaded event for the document/window, to linkify the document content
var startupFunction = function() { linkifyElement("messages"); };
if(window.attachEvent)
{
window.attachEvent('onload', startupFunction);
}
else if (window.addEventListener)
{
window.addEventListener('load', startupFunction, false);
}
else
{
document.addEventListener('load', startupFunction, false);
}
// Toggles the visibility of table rows with the specified name
function toggleTableRowsByName(name)
{
var allRows = document.getElementsByTagName('tr');
for (i=0; i < allRows.length; i++)
{
var currentName = allRows[i].getAttribute('name');
if(!!currentName && currentName.indexOf(name) == 0)
{
var isVisible = allRows[i].style.display == '';
isVisible ? allRows[i].style.display = 'none' : allRows[i].style.display = '';
}
}
}
function scrollToFirstVisibleRow(name)
{
var allRows = document.getElementsByTagName('tr');
for (i=0; i < allRows.length; i++)
{
var currentName = allRows[i].getAttribute('name');
var isVisible = allRows[i].style.display == '';
if(!!currentName && currentName.indexOf(name) == 0 && isVisible)
{
allRows[i].scrollIntoView(true);
return true;
}
}
return false;
}
// Linkifies the specified text content, replaces candidate links with html links
function linkify(text)
{
if(!text || 0 === text.length)
{
return text;
}

// Find http, https and ftp links and replace them with hyper links
var urlLink = /(http|https|ftp)\:\/\/[a-zA-Z0-9\-\.]+(:[a-zA-Z0-9]*)?\/?([a-zA-Z0-9\-\._\?\,\/\\\+&%\$#\=~;\{\}])*/gi;
return text.replace(urlLink, '<a href="$&">$&</a>') ;
}
// Linkifies the specified element by ID
function linkifyElement(id)
{
var element = document.getElementById(id);
if(!!element)
{
element.innerHTML = linkify(element.innerHTML);
}
}
function ToggleMessageVisibility(projectName)
{
if(!projectName || 0 === projectName.length)
{
return;
}
toggleTableRowsByName("MessageRowClass" + projectName);
toggleTableRowsByName('MessageRowHeaderShow' + projectName);
toggleTableRowsByName('MessageRowHeaderHide' + projectName);
}
function ScrollToFirstVisibleMessage(projectName)
{
if(!projectName || 0 === projectName.length)
{
return;
}
// First try the 'Show messages' row
if(!scrollToFirstVisibleRow('MessageRowHeaderShow' + projectName))
{
// Failed to find a visible row for 'Show messages', try an actual message row
scrollToFirstVisibleRow('MessageRowClass' + projectName);
}
}
</script></head><body><h1 _locID="ConversionReport">
Migration Report - </h1><div id="content"><h2 _locID="OverviewTitle">Overview</h2><div id="overview"><table><tr><th></th><th _locID="ProjectTableHeader">Project</th><th _locID="PathTableHeader">Path</th><th _locID="ErrorsTableHeader">Errors</th><th _locID="WarningsTableHeader">Warnings</th><th _locID="MessagesTableHeader">Messages</th></tr><tr><td class="IconErrorEncoded" /><td><strong><a href="#SimulationCore2">SimulationCore2</a></strong></td><td>SimulationCore2.vfproj</td><td class="textCentered"><a href="#SimulationCore2Error">1</a></td><td class="textCentered"><a>0</a></td><td class="textCentered"><a href="#">0</a></td></tr><tr><td class="IconSuccessEncoded" /><td><strong><a href="#Solution"><span _locID="OverviewSolutionSpan">Solution</span></a></strong></td><td>SimulationCore2.sln</td><td class="textCentered"><a>0</a></td><td class="textCentered"><a>0</a></td><td class="textCentered"><a href="#" onclick="ScrollToFirstVisibleMessage('Solution'); return false;">1</a></td></tr></table></div><h2 _locID="SolutionAndProjectsTitle">Solution and projects</h2><div id="messages"><a name="SimulationCore2" /><h3>SimulationCore2</h3><table><tr id="SimulationCore2HeaderRow"><th></th><th class="messageCell" _locID="MessageTableHeader">Message</th></tr><tr name="ErrorRowClassSimulationCore2"><td class="IconErrorEncoded"><a name="SimulationCore2Error" /></td><td class="messageCell"><strong>SimulationCore2.vfproj:
</strong><span>The application which this project type is based on was not found. Please try this link for further information: 6989167d-11e4-40fe-8c1a-2192a86a7e90</span></td></tr></table><a name="Solution" /><h3 _locID="ProjectDisplayNameHeader">Solution</h3><table><tr id="SolutionHeaderRow"><th></th><th class="messageCell" _locID="MessageTableHeader">Message</th></tr><tr name="MessageRowHeaderShowSolution"><td class="IconInfoEncoded" /><td class="messageCell"><a _locID="ShowAdditionalMessages" href="#" name="SolutionMessage" onclick="ToggleMessageVisibility('Solution'); return false;">
Show 1 additional messages
</a></td></tr><tr name="MessageRowClassSolution" style="display: none"><td class="IconInfoEncoded"><a name="SolutionMessage" /></td><td class="messageCell"><strong>SimulationCore2.sln:
</strong><span>The solution file does not require migration.</span></td></tr><tr style="display: none" name="MessageRowHeaderHideSolution"><td class="IconInfoEncoded" /><td class="messageCell"><a _locID="HideAdditionalMessages" href="#" name="SolutionMessage" onclick="ToggleMessageVisibility('Solution'); return false;">
Hide 1 additional messages
</a></td></tr></table></div></div></body></html>

Двоични данни
Целия файл


Двоични данни
Целия файл


+ 2
- 3
config-asiatech.json Целия файл

@@ -2,10 +2,9 @@
"redis":{
"address":"85.198.9.229",
"port":6379,
"password":"1qazxsw2$$",
"datakey":"data"
"password":"1qazxsw2$$"
},
"logging":4,
"logging":3,
"process_name": "SimulationCore2",
"work_dir" : ".",
"step_time" : 1000

Някои файлове не бяха показани, защото твърде много файлове са промени

Зареждане…
Отказ
Запис