Ver código fonte

migration to new server (afra)

master
Mahmood Farokhian 11 meses atrás
pai
commit
9f0233da87
66 arquivos alterados com 1200 adições e 831 exclusões
  1. +18
    -1
      .gitignore
  2. +1
    -1
      .vscode/launch.json
  3. +1
    -1
      CSharp/BasicInputs/Geology/CShoe.i90
  4. +15
    -16
      CSharp/BasicInputs/RigSpecifications/CPumps.f90
  5. +33
    -67
      CSharp/BasicInputs/RigSpecifications/CPumps.i90
  6. +2
    -1
      CSharp/BasicInputs/RigSpecifications/CPumpsVariables.i90
  7. +35
    -0
      CSharp/BasicInputs/WellProfile/CWellSurveyData.i90
  8. +24
    -0
      CSharp/BasicInputs/WellProfile/CWellSurveyDataVariables.i90
  9. +4
    -4
      CSharp/Equipments/ControlPanels/CBopControlPanel.f90
  10. +4
    -4
      CSharp/Equipments/ControlPanels/CBopControlPanel.i90
  11. +1
    -1
      CSharp/Equipments/ControlPanels/CBopControlPanelVariables.i90
  12. +12
    -8
      CSharp/Equipments/ControlPanels/CChokeControlPanel.f90
  13. +12
    -8
      CSharp/Equipments/ControlPanels/CChokeControlPanel.i90
  14. +1
    -1
      CSharp/Equipments/ControlPanels/CChokeControlPanelVariables.i90
  15. +45
    -9
      CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90
  16. +45
    -9
      CSharp/Equipments/ControlPanels/CDataDisplayConsole.i90
  17. +7
    -0
      CSharp/Equipments/ControlPanels/CDataDisplayConsoleVariables.f90
  18. +7
    -0
      CSharp/Equipments/ControlPanels/CDataDisplayConsoleVariables.i90
  19. +18
    -14
      CSharp/Equipments/ControlPanels/CDrillingConsole.f90
  20. +18
    -14
      CSharp/Equipments/ControlPanels/CDrillingConsole.i90
  21. +5
    -5
      CSharp/Equipments/ControlPanels/CDrillingConsoleVariables.f90
  22. +5
    -5
      CSharp/Equipments/ControlPanels/CDrillingConsoleVariables.i90
  23. +1
    -1
      CSharp/Equipments/ControlPanels/CHookVariables.i90
  24. +1
    -1
      CSharp/Equipments/DrillWatch/CDrillWatchVariables.i90
  25. +8
    -46
      CSharp/OperationScenarios/Common/COperationScenariosMain.f90
  26. +9
    -47
      CSharp/OperationScenarios/Common/COperationScenariosMain.i90
  27. +6
    -20
      CSharp/OperationScenarios/Common/OperationScenarios.f90
  28. +9
    -21
      CSharp/OperationScenarios/Common/OperationScenarios.i90
  29. +1
    -1
      CSharp/OperationScenarios/Enums/CElevatorConnectionEnum.i90
  30. +1
    -1
      CSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotification.i90
  31. +159
    -0
      CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotification.i90
  32. +1
    -1
      CSharp/OperationScenarios/Notifications/CTongNotification.i90
  33. +1
    -1
      CSharp/OperationScenarios/SoftwareInputsVariables.i90
  34. +1
    -1
      CSharp/OperationScenarios/Unity/CUnityInputs.i90
  35. +1
    -1
      CSharp/OperationScenarios/Unity/CUnityOutputs.i90
  36. +3
    -3
      CSharp/OperationScenarios/UnitySignals/UnitySignals.f90
  37. +3
    -2
      CSharp/OperationScenarios/UnitySignals/UnitySignals.i90
  38. +10
    -6
      CSharp/OperationScenarios/UnitySignals/UnitySignalsVariables.i90
  39. +16
    -0
      CSharp/StudentStation/CStudentStationVariables.i90
  40. +1
    -1
      Equipments/BopStack/ANNULAR.i90
  41. +1
    -1
      Equipments/BopStack/BOP.i90
  42. +1
    -1
      Equipments/BopStack/BOPstartup.i90
  43. +1
    -1
      Equipments/BopStack/LOSS_INPUTS.i90
  44. +80
    -0
      Equipments/BopStack/PipeRams1Main.i90
  45. +1
    -1
      Equipments/BopStack/VARIABLES.i90
  46. +1
    -1
      Equipments/DrillingConsole_ScrLEDs.i90
  47. +1
    -1
      Equipments/Pumps/Pump_OffMode_Solver.i90
  48. +34
    -0
      Equipments/Pumps/Pump_OnMode_Solver.i90
  49. +6
    -5
      Equipments/Pumps/Pumps_Inputs.f90
  50. +114
    -113
      Equipments/Pumps/Pumps_Inputs.i90
  51. +0
    -2
      Equipments/Pumps/Pumps_Outputs.f90
  52. +95
    -97
      Equipments/Pumps/Pumps_Outputs.i90
  53. +3
    -3
      Equipments/Pumps/Pumps_StartUp.f90
  54. +63
    -50
      Equipments/Pumps/Pumps_StartUp.i90
  55. +49
    -49
      Equipments/Pumps/Pumps_VARIABLES.i90
  56. +10
    -13
      Equipments/RotaryTable/RTable_Inputs.f90
  57. +78
    -78
      Equipments/RotaryTable/RTable_Inputs.i90
  58. +1
    -5
      Equipments/RotaryTable/RTable_Outputs.f90
  59. +29
    -33
      Equipments/RotaryTable/RTable_Outputs.i90
  60. +2
    -2
      Equipments/RotaryTable/RTable_StartUp.f90
  61. +33
    -0
      Equipments/RotaryTable/RTable_StartUp.i90
  62. +49
    -49
      Equipments/RotaryTable/RotaryTableMain.i90
  63. +1
    -1
      FluidFlow/Well_Pressure_Data_Transfer.i90
  64. BIN
     
  65. +1
    -1
      config-asiatech.json
  66. +1
    -1
      redisContent.json

+ 18
- 1
.gitignore Ver arquivo

@@ -10,4 +10,21 @@
*.rar
/mod
/obj
./*.mod
./*.mod
# Compiled object files
*.o
*.mod
# Executables
exe/*
# Ignore files generated by Make
Makefile
Makefile.in
Makefile.in~
# Ignore build output directories
/build/
/.idea/
/.vscode/

+ 1
- 1
.vscode/launch.json Ver arquivo

@@ -42,7 +42,7 @@
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/SimulationCore2",
"args": ["85.198.9.229", "6379", "'1qazxsw2$$'", "72a84eb3-eee5-4104-8363-08dba3c9a113", "4", "1000"],
"args": ["85.198.9.229", "6379", "'1qazxsw2$$'", "b6996849-fb69-4076-ca17-08dbea60e4cb", "4", "100"],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"externalConsole": false,


+ 1
- 1
CSharp/BasicInputs/Geology/CShoe.i90 Ver arquivo

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


+ 15
- 16
CSharp/BasicInputs/RigSpecifications/CPumps.f90 Ver arquivo

@@ -64,37 +64,36 @@ module CPumps
call json%get(p,"ManualPumpPower",pitem)
! Newly added
call json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricOutput)
call json%get(p,"MudPump1VolumetricOutput",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricOutput)
call json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricOutput)
call json%get(p,"MudPump2VolumetricOutput",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricOutput)
call json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricOutput)
call json%get(p,"CementPumpVolumetricOutput",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1MaximumPressure)
call json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricOutput)
call json%get(p,"MudPump1MaximumPressure",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1PumpRateChange)
call json%get(pitem,data%Configuration%Pumps%MudPump1MaximumPressure)
call json%get(p,"MudPump1PumpRateChange",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1SurfaceLineLength)
call json%get(pitem,data%Configuration%Pumps%MudPump1PumpRateChange)
call json%get(p,"MudPump1SurfaceLineLength",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1DelayToShutdown)
call json%get(pitem,data%Configuration%Pumps%MudPump1SurfaceLineLength)
call json%get(p,"MudPump1DelayToShutdown",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2MaximumPressure)
call json%get(pitem,data%Configuration%Pumps%MudPump1DelayToShutdown)
call json%get(p,"MudPump2MaximumPressure",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2PumpRateChange)
call json%get(pitem,data%Configuration%Pumps%MudPump2MaximumPressure)
call json%get(p,"MudPump2PumpRateChange",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2SurfaceLineLength)
call json%get(pitem,data%Configuration%Pumps%MudPump2PumpRateChange)
call json%get(p,"MudPump2SurfaceLineLength",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2DelayToShutdown)
call json%get(pitem,data%Configuration%Pumps%MudPump2SurfaceLineLength)
call json%get(p,"MudPump2DelayToShutdown",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpMaximumPressure)
call json%get(pitem,data%Configuration%Pumps%MudPump2DelayToShutdown)
call json%get(p,"CementPumpMaximumPressure",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpPumpRateChange)
call json%get(pitem,data%Configuration%Pumps%CementPumpMaximumPressure)
call json%get(p,"CementPumpPumpRateChange",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpSurfaceLineLength)
call json%get(pitem,data%Configuration%Pumps%CementPumpPumpRateChange)
call json%get(p,"CementPumpSurfaceLineLength",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpDelayToShutdown)
call json%get(pitem,data%Configuration%Pumps%CementPumpSurfaceLineLength)
call json%get(p,"CementPumpDelayToShutdown",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpDelayToShutdown)
end subroutine


+ 33
- 67
CSharp/BasicInputs/RigSpecifications/CPumps.i90 Ver arquivo

@@ -6,56 +6,6 @@ module CPumps
public
contains

! subroutine PumpsToJson(parent)

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

! ! 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)
! ! 3. add new node to parent
! call json%add(parent,p)
! end subroutine

subroutine PumpsFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
@@ -70,8 +20,6 @@ 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,"MudPump1Output",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1Output)
call json%get(p,"MudPump1OutputBblStroke",pitem)
@@ -86,8 +34,6 @@ 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,"MudPump2Output",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2Output)
call json%get(p,"MudPump2OutputBblStroke",pitem)
@@ -102,8 +48,6 @@ 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,"CementPumpOutput",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpOutput)
call json%get(p,"CementPumpOutputBblStroke",pitem)
@@ -119,17 +63,39 @@ module CPumps
call json%get(p,"CementPumpReliefValveIsSet",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpReliefValveIsSet)
call json%get(p,"ManualPumpPower",pitem)
! call json%get(pitem,data%Configuration%Pumps%ManualPumpPower)
! call json%get(p,"Valve1",pitem)
! call json%get(pitem,data%Configuration%Pumps%Valve1)
! call json%get(p,"Valve2",pitem)
! call json%get(pitem,data%Configuration%Pumps%Valve2)
! call json%get(p,"Valve3",pitem)
! call json%get(pitem,data%Configuration%Pumps%Valve3)
! call json%get(p,"Valve4",pitem)
! call json%get(pitem,data%Configuration%Pumps%Valve4)
! call json%get(p,"Valve5",pitem)
! call json%get(pitem,data%Configuration%Pumps%Valve5)

! Newly added
call json%get(p,"MudPump1VolumetricOutput",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricOutput)
call json%get(p,"MudPump2VolumetricOutput",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricOutput)
call json%get(p,"CementPumpVolumetricOutput",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricOutput)
call json%get(p,"MudPump1MaximumPressure",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1MaximumPressure)
call json%get(p,"MudPump1PumpRateChange",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1PumpRateChange)
call json%get(p,"MudPump1SurfaceLineLength",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1SurfaceLineLength)
call json%get(p,"MudPump1DelayToShutdown",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1DelayToShutdown)
call json%get(p,"MudPump2MaximumPressure",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2MaximumPressure)
call json%get(p,"MudPump2PumpRateChange",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2PumpRateChange)
call json%get(p,"MudPump2SurfaceLineLength",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2SurfaceLineLength)
call json%get(p,"MudPump2DelayToShutdown",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2DelayToShutdown)
call json%get(p,"CementPumpMaximumPressure",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpMaximumPressure)
call json%get(p,"CementPumpPumpRateChange",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpPumpRateChange)
call json%get(p,"CementPumpSurfaceLineLength",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpSurfaceLineLength)
call json%get(p,"CementPumpDelayToShutdown",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpDelayToShutdown)


end subroutine



+ 2
- 1
CSharp/BasicInputs/RigSpecifications/CPumpsVariables.i90 Ver arquivo

@@ -38,12 +38,13 @@ module CPumpsVariables
logical :: MudPump2ReliefValveIsSet
logical :: CementPumpReliefValveIsSet
real(8) :: MudPump1VolumetricOutput
real(8) :: MudPump1VolumetricOutput,MudPump2VolumetricOutput,CementPumpVolumetricOutput

! 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


+ 35
- 0
CSharp/BasicInputs/WellProfile/CWellSurveyData.i90 Ver arquivo

@@ -0,0 +1,35 @@
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/WellProfile/CWellSurveyData.f90"
module CWellSurveyData
use CWellSurveyDataVariables
implicit none
public
contains
! integer function SetSurveyData(count, array)
! !DEC$ ATTRIBUTES DLLEXPORT::SetSurveyData
! !DEC$ ATTRIBUTES ALIAS: 'SetSurveyData' :: SetSurveyData
! implicit none
! integer, intent(in) :: count
! integer :: i
! type(CSurveyDataItem), intent(inout), target :: array(count)
! type(CSurveyDataItem), pointer :: item
! WellSurveyData%Count = count
! if(size(WellSurveyData%Items) > 0) then
! deallocate(WellSurveyData%Items)
! end if
! if(count > 0) then
! allocate(WellSurveyData%Items(count))
! do i = 1, count
! item => array(i)
! WellSurveyData%Items(i)%MeasuredDepth = item%MeasuredDepth
! WellSurveyData%Items(i)%Inclination = item%Inclination
! WellSurveyData%Items(i)%Azimoth = item%Azimoth
! WellSurveyData%Items(i)%TotalVerticalDepth = item%TotalVerticalDepth
! WellSurveyData%Items(i)%X = item%X
! WellSurveyData%Items(i)%Y = item%Y
! WellSurveyData%Items(i)%Z = item%Z
! end do
! end if

! SetSurveyData = 0
! end function SetSurveyData
end module CWellSurveyData

+ 24
- 0
CSharp/BasicInputs/WellProfile/CWellSurveyDataVariables.i90 Ver arquivo

@@ -0,0 +1,24 @@
# 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/WellProfile/CWellSurveyDataVariables.f90"
module CWellSurveyDataVariables
implicit none
public
! types
type, bind(c), public :: CSurveyDataItem
real(8) :: MeasuredDepth
real(8) :: Inclination
real(8) :: Azimoth
real(8) :: TotalVerticalDepth
real(8) :: X
real(8) :: Y
real(8) :: Z
end type CSurveyDataItem

Type :: WellSurveyDataType
integer :: Count = 0
type(CSurveyDataItem), allocatable :: Items(:)
End Type WellSurveyDataType
! Type(WellSurveyDataType)::WellSurveyData
contains
end module CWellSurveyDataVariables

+ 4
- 4
CSharp/Equipments/ControlPanels/CBopControlPanel.f90 Ver arquivo

@@ -12,8 +12,6 @@ module CBopControlPanel

! 1. get related root
call json%get(parent,'BopControl',p)
call json%get(p,'AnnularRegulatorSetControl',pval)
call json%get(pval,data%Equipments%BopControlPanel%AnnularRegulatorSetControl)
call json%get(p,'AirMasterValve',pval)
call json%get(pval,data%Equipments%BopControlPanel%AirMasterValve)
call json%get(p,'ByePassValve',pval)
@@ -71,6 +69,8 @@ module CBopControlPanel
! call json%get(p,'LowerRamsStatus',pval)
! call json%get(pval,data%Equipments%BopControlPanel%LowerRamsStatus)

call json%get(p,'AnnularRegulatorSetControl',pval)
call json%get(pval,data%Equipments%BopControlPanel%AnnularRegulatorSetControl)
! 2. get member of data type from node
end subroutine

@@ -84,8 +84,8 @@ module CBopControlPanel
call json%create_object(p,'BopControl')
! call json%add(p,"AnnularRegulatorSetControl",data%Equipments%BopControlPanel%AnnularRegulatorSetControl)
! call json%add(p,"AirMasterValve",data%Equipments%BopControlPanel%AirMasterValve)
! call json%add(p,"ByePassValve",data%Equipments%BopControlPanel%ByePassValve)
call json%add(p,"AirMasterValve",data%Equipments%BopControlPanel%AirMasterValve)
call json%add(p,"ByePassValve",data%Equipments%BopControlPanel%ByePassValve)
! call json%add(p,"AnnularValve",data%Equipments%BopControlPanel%AnnularValve)
! call json%add(p,"UpperRamsValve",data%Equipments%BopControlPanel%UpperRamsValve)
! call json%add(p,"MiddleRamsValve",data%Equipments%BopControlPanel%MiddleRamsValve)


+ 4
- 4
CSharp/Equipments/ControlPanels/CBopControlPanel.i90 Ver arquivo

@@ -13,8 +13,6 @@ module CBopControlPanel

! 1. get related root
call json%get(parent,'BopControl',p)
call json%get(p,'AnnularRegulatorSetControl',pval)
call json%get(pval,data%Equipments%BopControlPanel%AnnularRegulatorSetControl)
call json%get(p,'AirMasterValve',pval)
call json%get(pval,data%Equipments%BopControlPanel%AirMasterValve)
call json%get(p,'ByePassValve',pval)
@@ -72,6 +70,8 @@ module CBopControlPanel
! call json%get(p,'LowerRamsStatus',pval)
! call json%get(pval,data%Equipments%BopControlPanel%LowerRamsStatus)

call json%get(p,'AnnularRegulatorSetControl',pval)
call json%get(pval,data%Equipments%BopControlPanel%AnnularRegulatorSetControl)
! 2. get member of data type from node
end subroutine

@@ -85,8 +85,8 @@ module CBopControlPanel
call json%create_object(p,'BopControl')
! call json%add(p,"AnnularRegulatorSetControl",data%Equipments%BopControlPanel%AnnularRegulatorSetControl)
! call json%add(p,"AirMasterValve",data%Equipments%BopControlPanel%AirMasterValve)
! call json%add(p,"ByePassValve",data%Equipments%BopControlPanel%ByePassValve)
call json%add(p,"AirMasterValve",data%Equipments%BopControlPanel%AirMasterValve)
call json%add(p,"ByePassValve",data%Equipments%BopControlPanel%ByePassValve)
! call json%add(p,"AnnularValve",data%Equipments%BopControlPanel%AnnularValve)
! call json%add(p,"UpperRamsValve",data%Equipments%BopControlPanel%UpperRamsValve)
! call json%add(p,"MiddleRamsValve",data%Equipments%BopControlPanel%MiddleRamsValve)


+ 1
- 1
CSharp/Equipments/ControlPanels/CBopControlPanelVariables.i90 Ver arquivo

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


+ 12
- 8
CSharp/Equipments/ControlPanels/CChokeControlPanel.f90 Ver arquivo

@@ -13,6 +13,13 @@ module CChokeControlPanel
call json%get(parent,'ChokeControl',p)
! 2. get member of data type from node
call json%get(p,'ChokeControlLever',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeControlLever)
call json%get(p,'ChokePanelRigAirSwitch',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch)
call json%get(p,'ChokePanelPumpSelectorSwitch',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch)
call json%get(p,'ChokePanelStrokeResetSwitch',pval)
@@ -21,10 +28,7 @@ module CChokeControlPanel
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeSelectorSwitch)
call json%get(p,'ChokeRateControlKnob',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeRateControlKnob)
call json%get(p,'ChokeControlLever',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeControlLever)
call json%get(p,'ChokePanelRigAirSwitch',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch)
! call json%get(p,'EnableAutoChoke',pval)
! call json%get(pval,data%Equipments%ChokeControlPanel%EnableAutoChoke)
! call json%get(p,'StandPipePressure',pval)
@@ -51,12 +55,12 @@ module CChokeControlPanel

! 1. create new node
call json%create_object(p,'ChokeControl')
! call json%add(p,"ChokePanelPumpSelectorSwitch",data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch)
call json%add(p,"ChokePanelPumpSelectorSwitch",data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch)
! call json%add(p,"ChokePanelStrokeResetSwitch",data%Equipments%ChokeControlPanel%ChokePanelStrokeResetSwitch)
! call json%add(p,"ChokeSelectorSwitch",data%Equipments%ChokeControlPanel%ChokeSelectorSwitch)
call json%add(p,"ChokeSelectorSwitch",data%Equipments%ChokeControlPanel%ChokeSelectorSwitch)
! call json%add(p,"ChokeRateControlKnob",data%Equipments%ChokeControlPanel%ChokeRateControlKnob)
! call json%add(p,"ChokeControlLever",data%Equipments%ChokeControlPanel%ChokeControlLever)
! call json%add(p,"ChokePanelRigAirSwitch",data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch)
call json%add(p,"ChokeControlLever",data%Equipments%ChokeControlPanel%ChokeControlLever)
call json%add(p,"ChokePanelRigAirSwitch",data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch)
! call json%add(p,"EnableAutoChoke",data%Equipments%ChokeControlPanel%EnableAutoChoke)
call json%add(p,"StandPipePressure",data%Equipments%ChokeControlPanel%StandPipePressure)
call json%add(p,"CasingPressure",data%Equipments%ChokeControlPanel%CasingPressure)


+ 12
- 8
CSharp/Equipments/ControlPanels/CChokeControlPanel.i90 Ver arquivo

@@ -14,6 +14,13 @@ module CChokeControlPanel
call json%get(parent,'ChokeControl',p)
! 2. get member of data type from node
call json%get(p,'ChokeControlLever',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeControlLever)
call json%get(p,'ChokePanelRigAirSwitch',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch)
call json%get(p,'ChokePanelPumpSelectorSwitch',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch)
call json%get(p,'ChokePanelStrokeResetSwitch',pval)
@@ -22,10 +29,7 @@ module CChokeControlPanel
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeSelectorSwitch)
call json%get(p,'ChokeRateControlKnob',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeRateControlKnob)
call json%get(p,'ChokeControlLever',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokeControlLever)
call json%get(p,'ChokePanelRigAirSwitch',pval)
call json%get(pval,data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch)
! call json%get(p,'EnableAutoChoke',pval)
! call json%get(pval,data%Equipments%ChokeControlPanel%EnableAutoChoke)
! call json%get(p,'StandPipePressure',pval)
@@ -52,12 +56,12 @@ module CChokeControlPanel

! 1. create new node
call json%create_object(p,'ChokeControl')
! call json%add(p,"ChokePanelPumpSelectorSwitch",data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch)
call json%add(p,"ChokePanelPumpSelectorSwitch",data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch)
! call json%add(p,"ChokePanelStrokeResetSwitch",data%Equipments%ChokeControlPanel%ChokePanelStrokeResetSwitch)
! call json%add(p,"ChokeSelectorSwitch",data%Equipments%ChokeControlPanel%ChokeSelectorSwitch)
call json%add(p,"ChokeSelectorSwitch",data%Equipments%ChokeControlPanel%ChokeSelectorSwitch)
! call json%add(p,"ChokeRateControlKnob",data%Equipments%ChokeControlPanel%ChokeRateControlKnob)
! call json%add(p,"ChokeControlLever",data%Equipments%ChokeControlPanel%ChokeControlLever)
! call json%add(p,"ChokePanelRigAirSwitch",data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch)
call json%add(p,"ChokeControlLever",data%Equipments%ChokeControlPanel%ChokeControlLever)
call json%add(p,"ChokePanelRigAirSwitch",data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch)
! call json%add(p,"EnableAutoChoke",data%Equipments%ChokeControlPanel%EnableAutoChoke)
call json%add(p,"StandPipePressure",data%Equipments%ChokeControlPanel%StandPipePressure)
call json%add(p,"CasingPressure",data%Equipments%ChokeControlPanel%CasingPressure)


+ 1
- 1
CSharp/Equipments/ControlPanels/CChokeControlPanelVariables.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/ControlPanels/CChokeControlPanelVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/ControlPanels/CChokeControlPanelVariables.f90"
module CChokeControlPanelVariables
implicit none
type, public :: ChokeControlPanelType


+ 45
- 9
CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90 Ver arquivo

@@ -9,9 +9,37 @@ module CDataDisplayConsole
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pval
! type(json_file)::parent

! 1. get related root
call json%get(parent,'DataDisplay',p)

call json%get(p,'ResetWob',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%ResetWob)

call json%get(p,'TotalStrokeCounterResetSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%TotalStrokeCounterResetSwitch)

call json%get(p,'MVTSetAlarmSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmSwitch)

call json%get(p,'MFFISetAlarmSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmSwitch)

! Alarms Upper - lower bounds
call json%get(p,'MFFIAlarmLow',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFIAlarmLow)

call json%get(p,'MFFIAlarmHigh',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFIAlarmHigh)

call json%get(p,'MVTAlarmLow',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTAlarmLow)

call json%get(p,'MVTAlarmHigh',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTAlarmHigh)

! 2. get member of data type from node
call json%get(p,'TripTankSetAlarmLow',pval)
@@ -28,16 +56,14 @@ module CDataDisplayConsole
call json%get(pval,data%Equipments%DataDisplayConsole%TripTankHornSwitch)
call json%get(p,'AcidGasDetectionHornSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%AcidGasDetectionHornSwitch)
call json%get(p,'TotalStrokeCounterResetSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%TotalStrokeCounterResetSwitch)
call json%get(p,'DrillingTrippingSelectorSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%DrillingTrippingSelectorSwitch)
call json%get(p,'MVTSetAlarmLowKnob',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmLowKnob)
call json%get(p,'MVTSetAlarmHighKnob',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmHighKnob)
call json%get(p,'MVTSetAlarmSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmSwitch)

call json%get(p,'MudTank1Switch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MudTank1Switch)
call json%get(p,'MudTank2Switch',pval)
@@ -68,15 +94,18 @@ module CDataDisplayConsole
call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmLowKnob)
call json%get(p,'MFFISetAlarmHighKnob',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmHighKnob)
call json%get(p,'MFFISetAlarmSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmSwitch)
call json%get(p,'MFFIPowerSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFIPowerSwitch)
call json%get(p,'MFFIHornSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFIHornSwitch)
call json%get(p,'ResetWob',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%ResetWob)
call json%get(p,'Clutch',pval)



! call jsonfile%get('Equipments.DataDisplay.MVTAlarmHigh',data%Equipments%DataDisplayConsole%MVTAlarmHigh,found)

end subroutine

subroutine DataDisplayConsoleToJson(parent)
@@ -127,8 +156,15 @@ module CDataDisplayConsole
call json%add(p,"Buzzer2",data%Equipments%DataDisplayConsole%Buzzer2)
call json%add(p,"Buzzer3",data%Equipments%DataDisplayConsole%Buzzer3)
call json%add(p,"Buzzer4",data%Equipments%DataDisplayConsole%Buzzer4)

call json%add(p,"MFFIAlarmLow",data%Equipments%DataDisplayConsole%MFFIAlarmLow)
call json%add(p,"MFFIAlarmHigh",data%Equipments%DataDisplayConsole%MFFIAlarmHigh)
call json%add(p,"MVTAlarmLow",data%Equipments%DataDisplayConsole%MVTAlarmLow)
call json%add(p,"MVTAlarmHigh",data%Equipments%DataDisplayConsole%MVTAlarmHigh)

call json%add(p,"MFFISetAlarmSwitch",data%Equipments%DataDisplayConsole%MFFISetAlarmSwitch)
call json%add(p,"MVTSetAlarmSwitch",data%Equipments%DataDisplayConsole%MVTSetAlarmSwitch)
call json%add(parent,p)
end subroutine



+ 45
- 9
CSharp/Equipments/ControlPanels/CDataDisplayConsole.i90 Ver arquivo

@@ -10,9 +10,37 @@ module CDataDisplayConsole
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pval
! type(json_file)::parent

! 1. get related root
call json%get(parent,'DataDisplay',p)

call json%get(p,'ResetWob',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%ResetWob)

call json%get(p,'TotalStrokeCounterResetSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%TotalStrokeCounterResetSwitch)

call json%get(p,'MVTSetAlarmSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmSwitch)

call json%get(p,'MFFISetAlarmSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmSwitch)

! Alarms Upper - lower bounds
call json%get(p,'MFFIAlarmLow',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFIAlarmLow)

call json%get(p,'MFFIAlarmHigh',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFIAlarmHigh)

call json%get(p,'MVTAlarmLow',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTAlarmLow)

call json%get(p,'MVTAlarmHigh',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTAlarmHigh)

! 2. get member of data type from node
call json%get(p,'TripTankSetAlarmLow',pval)
@@ -29,16 +57,14 @@ module CDataDisplayConsole
call json%get(pval,data%Equipments%DataDisplayConsole%TripTankHornSwitch)
call json%get(p,'AcidGasDetectionHornSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%AcidGasDetectionHornSwitch)
call json%get(p,'TotalStrokeCounterResetSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%TotalStrokeCounterResetSwitch)
call json%get(p,'DrillingTrippingSelectorSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%DrillingTrippingSelectorSwitch)
call json%get(p,'MVTSetAlarmLowKnob',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmLowKnob)
call json%get(p,'MVTSetAlarmHighKnob',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmHighKnob)
call json%get(p,'MVTSetAlarmSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MVTSetAlarmSwitch)

call json%get(p,'MudTank1Switch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MudTank1Switch)
call json%get(p,'MudTank2Switch',pval)
@@ -69,15 +95,18 @@ module CDataDisplayConsole
call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmLowKnob)
call json%get(p,'MFFISetAlarmHighKnob',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmHighKnob)
call json%get(p,'MFFISetAlarmSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFISetAlarmSwitch)
call json%get(p,'MFFIPowerSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFIPowerSwitch)
call json%get(p,'MFFIHornSwitch',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%MFFIHornSwitch)
call json%get(p,'ResetWob',pval)
call json%get(pval,data%Equipments%DataDisplayConsole%ResetWob)
call json%get(p,'Clutch',pval)



! call jsonfile%get('Equipments.DataDisplay.MVTAlarmHigh',data%Equipments%DataDisplayConsole%MVTAlarmHigh,found)

end subroutine

subroutine DataDisplayConsoleToJson(parent)
@@ -128,8 +157,15 @@ module CDataDisplayConsole
call json%add(p,"Buzzer2",data%Equipments%DataDisplayConsole%Buzzer2)
call json%add(p,"Buzzer3",data%Equipments%DataDisplayConsole%Buzzer3)
call json%add(p,"Buzzer4",data%Equipments%DataDisplayConsole%Buzzer4)

call json%add(p,"MFFIAlarmLow",data%Equipments%DataDisplayConsole%MFFIAlarmLow)
call json%add(p,"MFFIAlarmHigh",data%Equipments%DataDisplayConsole%MFFIAlarmHigh)
call json%add(p,"MVTAlarmLow",data%Equipments%DataDisplayConsole%MVTAlarmLow)
call json%add(p,"MVTAlarmHigh",data%Equipments%DataDisplayConsole%MVTAlarmHigh)

call json%add(p,"MFFISetAlarmSwitch",data%Equipments%DataDisplayConsole%MFFISetAlarmSwitch)
call json%add(p,"MVTSetAlarmSwitch",data%Equipments%DataDisplayConsole%MVTSetAlarmSwitch)
call json%add(parent,p)
end subroutine



+ 7
- 0
CSharp/Equipments/ControlPanels/CDataDisplayConsoleVariables.f90 Ver arquivo

@@ -46,6 +46,13 @@ module CDataDisplayConsoleVariables
logical :: MFFIFillSPMSelectorSwitch
real(8) :: MFFISetAlarmLowKnob
real(8) :: MFFISetAlarmHighKnob
real(8) :: MFFIAlarmLow
real(8) :: MFFIAlarmHigh
real(8) :: MVTAlarmLow
real(8) :: MVTAlarmHigh
integer :: MFFISetAlarmSwitch
logical :: MFFIPowerSwitch
logical :: MFFIHornSwitch


+ 7
- 0
CSharp/Equipments/ControlPanels/CDataDisplayConsoleVariables.i90 Ver arquivo

@@ -47,6 +47,13 @@ module CDataDisplayConsoleVariables
logical :: MFFIFillSPMSelectorSwitch
real(8) :: MFFISetAlarmLowKnob
real(8) :: MFFISetAlarmHighKnob

real(8) :: MFFIAlarmLow
real(8) :: MFFIAlarmHigh

real(8) :: MVTAlarmLow
real(8) :: MVTAlarmHigh

integer :: MFFISetAlarmSwitch
logical :: MFFIPowerSwitch
logical :: MFFIHornSwitch


+ 18
- 14
CSharp/Equipments/ControlPanels/CDrillingConsole.f90 Ver arquivo

@@ -24,10 +24,6 @@ module CDrillingConsole
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)
@@ -36,10 +32,6 @@ module CDrillingConsole
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)
@@ -48,8 +40,8 @@ module CDrillingConsole
if ( .not. found ) then
call logg(4,"Not found: MP2Throttle")
endif
! 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.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)
@@ -132,11 +124,11 @@ module CDrillingConsole

! call jsonfile%destroy()

data%Equipments%DrillingConsole%DWSwitch = -1
! 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
! data%Equipments%DrillingConsole%MP1CPSwitch = -1
! data%Equipments%DrillingConsole%MP2Switch = -1
! data%Equipments%DrillingConsole%RTSwitch = -1
end subroutine

subroutine DrillingConsoleToJson(parent)
@@ -179,6 +171,18 @@ module CDrillingConsole
call json%add(p,"UnlatchPipeLED",data%Equipments%DrillingConsole%UnlatchPipeLED)
call json%add(p,"SwingLed",data%Equipments%DrillingConsole%SwingLed)
call json%add(p,"FillMouseHoleLed",data%Equipments%DrillingConsole%FillMouseHoleLed)
call json%add(p,"MP1CPSwitch",data%Equipments%DrillingConsole%MP1CPSwitch)
call json%add(p,"MP2Switch",data%Equipments%DrillingConsole%MP2Switch)
call json%add(p,"DWSwitch",data%Equipments%DrillingConsole%DWSwitch)
call json%add(p,"RTSwitch",data%Equipments%DrillingConsole%RTSwitch)
call json%add(p,"RTSwitch",data%Equipments%DrillingConsole%RTSwitch)

! Trottle -------------
call json%add(p,"MP1Throttle",data%Equipments%DrillingConsole%MP1Throttle)
call json%add(p,"MP2Throttle",data%Equipments%DrillingConsole%MP2Throttle)
call json%add(p,"RTThrottle",data%Equipments%DrillingConsole%RTThrottle)
call json%add(p,"DWThrottle",data%Equipments%DrillingConsole%DWThrottle)

call json%add(parent,p)
end subroutine


+ 18
- 14
CSharp/Equipments/ControlPanels/CDrillingConsole.i90 Ver arquivo

@@ -25,10 +25,6 @@ module CDrillingConsole
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)
@@ -37,10 +33,6 @@ module CDrillingConsole
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)
@@ -49,8 +41,8 @@ module CDrillingConsole
if ( .not. found ) then
call logg(4,"Not found: MP2Throttle")
endif
! 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.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)
@@ -133,11 +125,11 @@ module CDrillingConsole

! call jsonfile%destroy()

data%Equipments%DrillingConsole%DWSwitch = -1
! 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
! data%Equipments%DrillingConsole%MP1CPSwitch = -1
! data%Equipments%DrillingConsole%MP2Switch = -1
! data%Equipments%DrillingConsole%RTSwitch = -1
end subroutine

subroutine DrillingConsoleToJson(parent)
@@ -180,6 +172,18 @@ module CDrillingConsole
call json%add(p,"UnlatchPipeLED",data%Equipments%DrillingConsole%UnlatchPipeLED)
call json%add(p,"SwingLed",data%Equipments%DrillingConsole%SwingLed)
call json%add(p,"FillMouseHoleLed",data%Equipments%DrillingConsole%FillMouseHoleLed)
call json%add(p,"MP1CPSwitch",data%Equipments%DrillingConsole%MP1CPSwitch)
call json%add(p,"MP2Switch",data%Equipments%DrillingConsole%MP2Switch)
call json%add(p,"DWSwitch",data%Equipments%DrillingConsole%DWSwitch)
call json%add(p,"RTSwitch",data%Equipments%DrillingConsole%RTSwitch)
call json%add(p,"RTSwitch",data%Equipments%DrillingConsole%RTSwitch)

! Trottle -------------
call json%add(p,"MP1Throttle",data%Equipments%DrillingConsole%MP1Throttle)
call json%add(p,"MP2Throttle",data%Equipments%DrillingConsole%MP2Throttle)
call json%add(p,"RTThrottle",data%Equipments%DrillingConsole%RTThrottle)
call json%add(p,"DWThrottle",data%Equipments%DrillingConsole%DWThrottle)

call json%add(parent,p)
end subroutine


+ 5
- 5
CSharp/Equipments/ControlPanels/CDrillingConsoleVariables.f90 Ver arquivo

@@ -9,14 +9,14 @@ module CDrillingConsoleVariables
integer :: AssignmentSwitch
logical :: EmergencySwitch
real(8) :: RTTorqueLimitKnob
integer :: MP1CPSwitchI = 0 !for not turning on pump1 on simulation start
integer :: MP1CPSwitchT !for not turning on pump1 on simulation start
! integer :: MP1CPSwitchI = 0 !for not turning on pump1 on simulation start
! integer :: MP1CPSwitchT !for not turning on pump1 on simulation start
integer :: MP1CPSwitch
logical :: MP1ThrottleUpdate = .false.
real(8) :: MP1Throttle = -1.0
integer :: MP2SwitchI = 0 !for not turning on pump2 on simulation start
logical :: MP2SwitchT !for not turning on pump2 on simulation start
logical :: MP2Switch
! integer :: MP2SwitchI = 0 !for not turning on pump2 on simulation start
! logical :: MP2SwitchT !for not turning on pump2 on simulation start
integer :: MP2Switch
logical :: MP2ThrottleUpdate = .false.
real(8) :: MP2Throttle = -1.0
integer :: DWSwitch


+ 5
- 5
CSharp/Equipments/ControlPanels/CDrillingConsoleVariables.i90 Ver arquivo

@@ -10,14 +10,14 @@ module CDrillingConsoleVariables
integer :: AssignmentSwitch
logical :: EmergencySwitch
real(8) :: RTTorqueLimitKnob
integer :: MP1CPSwitchI = 0 !for not turning on pump1 on simulation start
integer :: MP1CPSwitchT !for not turning on pump1 on simulation start
! integer :: MP1CPSwitchI = 0 !for not turning on pump1 on simulation start
! integer :: MP1CPSwitchT !for not turning on pump1 on simulation start
integer :: MP1CPSwitch
logical :: MP1ThrottleUpdate = .false.
real(8) :: MP1Throttle = -1.0
integer :: MP2SwitchI = 0 !for not turning on pump2 on simulation start
logical :: MP2SwitchT !for not turning on pump2 on simulation start
logical :: MP2Switch
! integer :: MP2SwitchI = 0 !for not turning on pump2 on simulation start
! logical :: MP2SwitchT !for not turning on pump2 on simulation start
integer :: MP2Switch
logical :: MP2ThrottleUpdate = .false.
real(8) :: MP2Throttle = -1.0
integer :: DWSwitch


+ 1
- 1
CSharp/Equipments/ControlPanels/CHookVariables.i90 Ver arquivo

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


+ 1
- 1
CSharp/Equipments/DrillWatch/CDrillWatchVariables.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Equipments/DrillWatch/CDrillWatchVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/Equipments/DrillWatch/CDrillWatchVariables.f90"
module CDrillWatchVariables
implicit none


+ 8
- 46
CSharp/OperationScenarios/Common/COperationScenariosMain.f90 Ver arquivo

@@ -160,12 +160,10 @@ module COperationScenariosMain
! end subroutine
subroutine Kelly_ConnectionNothing
! use CSwingEnumVariables
! use CSlipsEnumVariables
use UnitySignalVariables
use UnitySignalsModule
use UnitySignalsModule
use CHook
use SimulationVariables
use SimulationVariables
implicit none
call Set_HookHeight(75.0)
@@ -211,18 +209,11 @@ module COperationScenariosMain
end subroutine Kelly_ConnectionNothing
subroutine Kelly_ConnectionString
! use CSwingEnumVariables
! use CSlipsEnumVariables
use UnitySignalVariables
use UnitySignalsModule
use UnitySignalsModule
use CHook
use SimulationVariables
! use CTongEnumVariables
use SimulationVariables
implicit none
call Set_HookHeight(75.0)
@@ -277,17 +268,14 @@ module COperationScenariosMain
end subroutine Kelly_ConnectionString
subroutine Kelly_ConnectionSingle
! use CSwingEnumVariables
! use CSlipsEnumVariables
! use CTongEnumVariables
use UnitySignalVariables
use UnitySignalsModule
use UnitySignalsModule
use CHook
use SimulationVariables
use SimulationVariables
implicit none
call Set_HookHeight(75.0)
@@ -356,13 +344,10 @@ module COperationScenariosMain
end subroutine Kelly_ConnectionSingle
subroutine Elevator_ConnectionNothing
! use CSwingEnumVariables
! use CSlipsEnumVariables
use UnitySignalVariables
use UnitySignalsModule
use UnitySignalsModule
use CHook
use SimulationVariables
! use CKellyEnumVariables
use SimulationVariables
implicit none
call Set_HookHeight(75.0)
@@ -376,27 +361,6 @@ module COperationScenariosMain
call sleep(1)
!TODO: possibly goto a position to activate swing
!! first goto mouse hole
!call Set_Swing(SWING_MOUSE_HOLE_BEGIN)
!!@call UpdateUnity()
!loop2: do
! if(Get_Swing() == SWING_MOUSE_HOLE_END) exit loop2
! call sleepqq(100)
!enddo loop2
!call sleep(1)
!
!! then goto rat hole
!call Set_Swing(SWING_RAT_HOLE_BEGIN)
!!@call UpdateUnity()
!loop3: do
! if(Get_Swing() == SWING_RAT_HOLE_END) exit loop3
! call sleepqq(100)
!enddo loop3
!call sleep(1)
! kelly back
call Set_Kelly(KELLY_REMOVE)
call sleepqq(100)
@@ -425,8 +389,6 @@ module COperationScenariosMain
endif
call sleepqq(100)
! move to final hook height
call Update_HookHeight_From_Snapshot()
call sleep(3)


+ 9
- 47
CSharp/OperationScenarios/Common/COperationScenariosMain.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Common/COperationScenariosMain.f90"
# 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Common/COperationScenariosMain.f90"
module COperationScenariosMain
use CIActionReference
implicit none
@@ -161,12 +161,10 @@ module COperationScenariosMain
! end subroutine
subroutine Kelly_ConnectionNothing
! use CSwingEnumVariables
! use CSlipsEnumVariables
use UnitySignalVariables
use UnitySignalsModule
use UnitySignalsModule
use CHook
use SimulationVariables
use SimulationVariables
implicit none
call Set_HookHeight(75.0)
@@ -212,18 +210,11 @@ module COperationScenariosMain
end subroutine Kelly_ConnectionNothing
subroutine Kelly_ConnectionString
! use CSwingEnumVariables
! use CSlipsEnumVariables
use UnitySignalVariables
use UnitySignalsModule
use UnitySignalsModule
use CHook
use SimulationVariables
! use CTongEnumVariables
use SimulationVariables
implicit none
call Set_HookHeight(75.0)
@@ -278,17 +269,14 @@ module COperationScenariosMain
end subroutine Kelly_ConnectionString
subroutine Kelly_ConnectionSingle
! use CSwingEnumVariables
! use CSlipsEnumVariables
! use CTongEnumVariables
use UnitySignalVariables
use UnitySignalsModule
use UnitySignalsModule
use CHook
use SimulationVariables
use SimulationVariables
implicit none
call Set_HookHeight(75.0)
@@ -357,13 +345,10 @@ module COperationScenariosMain
end subroutine Kelly_ConnectionSingle
subroutine Elevator_ConnectionNothing
! use CSwingEnumVariables
! use CSlipsEnumVariables
use UnitySignalVariables
use UnitySignalsModule
use UnitySignalsModule
use CHook
use SimulationVariables
! use CKellyEnumVariables
use SimulationVariables
implicit none
call Set_HookHeight(75.0)
@@ -377,27 +362,6 @@ module COperationScenariosMain
call sleep(1)
!TODO: possibly goto a position to activate swing
!! first goto mouse hole
!call Set_Swing(SWING_MOUSE_HOLE_BEGIN)
!!@call UpdateUnity()
!loop2: do
! if(Get_Swing() == SWING_MOUSE_HOLE_END) exit loop2
! call sleepqq(100)
!enddo loop2
!call sleep(1)
!
!! then goto rat hole
!call Set_Swing(SWING_RAT_HOLE_BEGIN)
!!@call UpdateUnity()
!loop3: do
! if(Get_Swing() == SWING_RAT_HOLE_END) exit loop3
! call sleepqq(100)
!enddo loop3
!call sleep(1)
! kelly back
call Set_Kelly(KELLY_REMOVE)
call sleepqq(100)
@@ -426,8 +390,6 @@ module COperationScenariosMain
endif
call sleepqq(100)
! move to final hook height
call Update_HookHeight_From_Snapshot()
call sleep(3)


+ 6
- 20
CSharp/OperationScenarios/Common/OperationScenarios.f90 Ver arquivo

@@ -70,29 +70,15 @@ module OperationScenariosModule
subroutine Evaluate_KellyConnection()
implicit none
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
#ifdef OST
print*, 'Evaluate_KellyConnection=TopDrive'
#endif
#ifdef OST
print*, 'Evaluate_KellyConnection=TopDrive'
#endif
endif
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
#ifdef OST
print*, 'Evaluate_KellyConnection=Kelly'
#endif
#ifdef OST
print*, 'Evaluate_KellyConnection=Kelly'
#endif
!!OPERATION-CODE=4
!if (Get_OperationCondition() == OPERATION_DRILL .and.&
! Get_KellyConnection() == KELLY_CONNECTION_SINGLE .and.&
! Get_Swing() == SWING_MOUSE_HOLE_END .and.&
! Get_TongNotification() .and.&
! Get_FillMouseHoleLed() == .false. .and.&
! Get_Tong() == TONG_BREAKOUT_END) then
!
! call Set_FillMouseHoleLed(.true.)
! return
!end if
!OPERATION-CODE=1
if (Get_OperationCondition() == OPERATION_DRILL .and.&
!Get_JointConnectionPossible() .and.&


+ 9
- 21
CSharp/OperationScenarios/Common/OperationScenarios.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Common/OperationScenarios.f90"
# 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Common/OperationScenarios.f90"
module OperationScenariosModule
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Paseted From ....Variables.f90
@@ -71,27 +71,15 @@ module OperationScenariosModule
subroutine Evaluate_KellyConnection()
implicit none
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
# 75

#ifdef OST
print*, 'Evaluate_KellyConnection=TopDrive'
#endif
endif
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
# 80

#ifdef OST
print*, 'Evaluate_KellyConnection=Kelly'
#endif

!!OPERATION-CODE=4
!if (Get_OperationCondition() == OPERATION_DRILL .and.&
! Get_KellyConnection() == KELLY_CONNECTION_SINGLE .and.&
! Get_Swing() == SWING_MOUSE_HOLE_END .and.&
! Get_TongNotification() .and.&
! Get_FillMouseHoleLed() == .false. .and.&
! Get_Tong() == TONG_BREAKOUT_END) then
!
! call Set_FillMouseHoleLed(.true.)
! return
!end if
!OPERATION-CODE=1
if (Get_OperationCondition() == OPERATION_DRILL .and.&
!Get_JointConnectionPossible() .and.&
@@ -195,13 +183,13 @@ module OperationScenariosModule
subroutine ButtonPress_Breakout()
implicit none
# 201
# 187

end subroutine
subroutine ButtonPress_Makeup()
implicit none
# 208
# 194

end subroutine



+ 1
- 1
CSharp/OperationScenarios/Enums/CElevatorConnectionEnum.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Enums/CElevatorConnectionEnum.f90"
# 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Enums/CElevatorConnectionEnum.f90"
module CElevatorConnectionEnum
use OperationScenariosModule
use CLog3


+ 1
- 1
CSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotification.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotification.f90"
# 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Notifications/CCloseKellyCockLedNotification.f90"
module CCloseKellyCockLedNotification
use OperationScenariosModule
implicit none


+ 159
- 0
CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotification.i90 Ver arquivo

@@ -0,0 +1,159 @@
# 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Notifications/CIrSafetyValveLedNotification.f90"
module CIrSafetyValveLedNotification
use OperationScenariosModule
!use UnitySignalsModuleVariables
implicit none
contains
subroutine Evaluate_IrSafetyValveLed()
implicit none
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
# 17








endif
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
# 37


!OPERATION-CODE=56
if (Get_OperationCondition() == OPERATION_DRILL) then
call Set_IrSafetyValveLed(.true.)
return
end if
!call Set_IrSafetyValveLed(.false.)
endif
end subroutine
! subroutine Subscribe_IrSafetyValveLed()
! use CDrillingConsoleVariables
!@ use ConfigurationVariables
!@ use ConfigurationVariables
! implicit none
! call OnIRSafetyValvePress%Add(ButtonPress_IrSafetyValve)
! call OnOperationConditionChangeInt%Add(Set_Operation_IrSafetyValveLed)
! end subroutine
subroutine Set_Operation_IrSafetyValveLed(v)
implicit none
integer , intent(in) :: v
# 79

data%State%notifications%operation_IrSafetyValveLed = v
# 83

end subroutine
subroutine ButtonPress_IrSafetyValve()
implicit none
if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
# 95




!TOPDRIVE-CODE=53
if (Get_IrSafetyValvePermission() .and.&
Get_IrSafetyValveLed()) then
call Set_IrSafetyValveLed(.false.)
return
end if








!TOPDRIVE-CODE=54
if (Get_IrSafetyValvePermission() .and.&
Get_IrSafetyValveLed() == .false.) then
call Set_IrSafetyValveLed(.true.)
return
end if


endif
if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
# 134


!OPERATION-CODE=54
if (Get_OperationCondition() == OPERATION_TRIP .and.&
Get_IrSafetyValvePermission() .and.&
Get_IrSafetyValveLed()) then
call Set_IrSafetyValveLed(.false.)
return
end if
!OPERATION-CODE=55
if (Get_OperationCondition() == OPERATION_TRIP .and.&
Get_IrSafetyValvePermission() .and.&
Get_IrSafetyValveLed() == .false. ) then
call Set_IrSafetyValveLed(.true.)
return
end if

endif
end subroutine
end module CIrSafetyValveLedNotification

+ 1
- 1
CSharp/OperationScenarios/Notifications/CTongNotification.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Notifications/CTongNotification.f90"
# 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Notifications/CTongNotification.f90"
module CTongNotification
use OperationScenariosModule
implicit none


+ 1
- 1
CSharp/OperationScenarios/SoftwareInputsVariables.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/SoftwareInputsVariables.f90"
# 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/SoftwareInputsVariables.f90"
module SoftwareInputsVariables
! use CVoidEventHandlerCollection
type:: SoftwareInputsType


+ 1
- 1
CSharp/OperationScenarios/Unity/CUnityInputs.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Unity/CUnityInputs.f90"
# 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Unity/CUnityInputs.f90"
module CUnityInputs
! use CVoidEventHandlerCollection
implicit none


+ 1
- 1
CSharp/OperationScenarios/Unity/CUnityOutputs.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/OperationScenarios/Unity/CUnityOutputs.f90"
# 1 "/home/admin/SimulationCore2/CSharp/OperationScenarios/Unity/CUnityOutputs.f90"
module CUnityOutputs
implicit none
type :: UnityOutputsType


+ 3
- 3
CSharp/OperationScenarios/UnitySignals/UnitySignals.f90 Ver arquivo

@@ -6,9 +6,9 @@ contains
subroutine Set_TdsElevatorModes(v)
implicit none
integer , intent(in) :: v
#ifdef ExcludeExtraChanges
if(data%State%unitySignals%TdsElevatorModes == v) return
#endif
#ifdef ExcludeExtraChanges
if(data%State%unitySignals%TdsElevatorModes == v) return
#endif
data%State%unitySignals%TdsElevatorModes = v
!**call TdsElevatorModesEnum%OnTdsElevatorModesChange%RunAll()
end subroutine


+ 3
- 2
CSharp/OperationScenarios/UnitySignals/UnitySignals.i90 Ver arquivo

@@ -7,8 +7,9 @@ contains
subroutine Set_TdsElevatorModes(v)
implicit none
integer , intent(in) :: v
# 11

#ifdef ExcludeExtraChanges
if(data%State%unitySignals%TdsElevatorModes == v) return
#endif
data%State%unitySignals%TdsElevatorModes = v
!**call TdsElevatorModesEnum%OnTdsElevatorModesChange%RunAll()
end subroutine


+ 10
- 6
CSharp/OperationScenarios/UnitySignals/UnitySignalsVariables.i90 Ver arquivo

@@ -34,7 +34,8 @@ module UnitySignalVariables
enumerator TONG_BREAKOUT_END
enumerator TONG_MAKEUP_BEGIN
enumerator TONG_MAKEUP_END

end enum
enum, bind(c)
enumerator TDS_SWING_NEUTRAL
enumerator TDS_SWING_OFF_BEGIN
enumerator TDS_SWING_OFF_END
@@ -42,18 +43,21 @@ module UnitySignalVariables
enumerator TDS_SWING_DRILL_END
enumerator TDS_SWING_TILT_BEGIN
enumerator TDS_SWING_TILT_END

end enum
enum, bind(c)
enumerator TDS_SPINE_NEUTRAL
enumerator TDS_SPINE_CONNECT_BEGIN
enumerator TDS_SPINE_CONNECT_END
enumerator TDS_SPINE_DISCONNECT_BEGIN
enumerator TDS_SPINE_DISCONNECT_END

end enum
enum, bind(c)
enumerator BACKUP_CLAMP_OFF_END
enumerator BACKUP_CLAMP_OFF_BEGIN
enumerator BACKUP_CLAMP_FW_BEGIN
enumerator BACKUP_CLAMP_FW_END

end enum
enum, bind(c)
enumerator SWING_NEUTRAL
enumerator SWING_MOUSE_HOLE_BEGIN
enumerator SWING_MOUSE_HOLE_END
@@ -67,11 +71,11 @@ module UnitySignalVariables
enumerator TDS_TONG_BREAKOUT_BEGIN
enumerator TDS_TONG_MAKEUP_BEGIN
enumerator TDS_TONG_MAKEUP_END

end enum
enum, bind(c)
enumerator SAFETY_VALVE_NEUTRAL
enumerator SAFETY_VALVE_REMOVE
enumerator SAFETY_VALVE_INSTALL

end enum
enum, bind(c)
enumerator OPERATION_DRILL


+ 16
- 0
CSharp/StudentStation/CStudentStationVariables.i90 Ver arquivo

@@ -0,0 +1,16 @@
# 1 "/home/admin/SimulationCore2/CSharp/StudentStation/CStudentStationVariables.f90"
module CStudentStationVariables
! use CVoidEventHandlerCollection
implicit none
public
! Input vars
type StudentStationType
logical :: FillupHeadInstallation
logical :: PitGainLossZero
logical :: MudBoxInstallation
logical :: TapSelector
end type StudentStationType
contains
end module CStudentStationVariables

+ 1
- 1
Equipments/BopStack/ANNULAR.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/BopStack/ANNULAR.f90"
# 1 "/home/admin/SimulationCore2/Equipments/BopStack/ANNULAR.f90"
SUBROUTINE ANNULAR_SUB1
use SimulationVariables
use CBopControlPanel


+ 1
- 1
Equipments/BopStack/BOP.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/BopStack/BOP.f90"
# 1 "/home/admin/SimulationCore2/Equipments/BopStack/BOP.f90"
module BOP
contains


+ 1
- 1
Equipments/BopStack/BOPstartup.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/BopStack/BOPstartup.f90"
# 1 "/home/admin/SimulationCore2/Equipments/BopStack/BOPstartup.f90"

SUBROUTINE BOP_StartUp()
use SimulationVariables


+ 1
- 1
Equipments/BopStack/LOSS_INPUTS.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/BopStack/LOSS_INPUTS.f90"
# 1 "/home/admin/SimulationCore2/Equipments/BopStack/LOSS_INPUTS.f90"
SUBROUTINE DEALLOCATE_ARRAYS()
use SimulationVariables
use UnityModule


+ 80
- 0
Equipments/BopStack/PipeRams1Main.i90 Ver arquivo

@@ -0,0 +1,80 @@
# 1 "/home/admin/SimulationCore2/Equipments/BopStack/PipeRams1Main.f90"
module PipeRams1Main
implicit none
public
contains
! subroutine PipeRams1_Setup()
! ! use CSimulationVariables
! implicit none
! call OnSimulationInitialization%Add(PipeRams1_Init)
! call OnSimulationStop%Add(PipeRams1_Init)
! call OnPipeRams1Step%Add(PipeRams1_Step)
! call OnPipeRams1Output%Add(PipeRams1_Output)
! call OnPipeRams1Main%Add(PipeRams1MainBody)
! end subroutine
subroutine PipeRams1_Init
call BOP_StartUp()
end subroutine PipeRams1_Init
subroutine PipeRams1_Step
use SimulationVariables
implicit none
if (data%State%PipeRam1%finished/=0) then
call PIPE_RAMS1
if (data%State%PipeRam1%IsOpening .or. data%State%PipeRam1%IsClosing .or. data%State%RAM(2)%Bottles_Charged_MalfActive) then
if(data%State%PipeRam1%finished==0) then
call PIPE_RAMS1_SUB !only body of loop2
endif
endif
else
call PIPE_RAMS1_SUB
endif
end subroutine PipeRams1_Step
! subroutine PipeRams1_Output
! end subroutine PipeRams1_Output
! subroutine PipeRams1MainBody
! USE ifport
! USE ifmt
! ! use CSimulationVariables
! ! USE BOP

! implicit none
! INTEGER :: PipeRam1Duration
! integer,dimension(8) :: PipeRam1StartTime , PipeRam1EndTime
! ! CALL BOP_StartUp()
! loop1: DO
! CALL DATE_AND_TIME(values=PipeRam1StartTime)
! CALL PIPE_RAMS1
! CALL DATE_AND_TIME(values=PipeRam1EndTime)
! PipeRam1Duration = 3600000 * (PipeRam1EndTime(5) - PipeRam1StartTime(5)) + 60000 * (PipeRam1EndTime(6) - PipeRam1StartTime(6)) + 1000 * (PipeRam1EndTime(7) - PipeRam1StartTime(7)) + (PipeRam1EndTime(8) - PipeRam1StartTime(8))
! if (PipeRam1Duration < 100) then
! call sleepqq(100 - PipeRam1Duration)
! ELSE
! WRITE (*,*) 'PipeRam1 BOP run duration exceeded 100 ms and =', PipeRam1Duration
! end if
! IF (IsStopped==.true.) THEN
! EXIT loop1
! ENDIF

! ENDDO loop1


! ! CALL DEALLOCATE_ARRAYS()
! end subroutine PipeRams1MainBody
end module PipeRams1Main

+ 1
- 1
Equipments/BopStack/VARIABLES.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/BopStack/VARIABLES.f90"
# 1 "/home/admin/SimulationCore2/Equipments/BopStack/VARIABLES.f90"
MODULE BopVariables
use DynamicDoubleArray, only:DynamicDoubleArrayType
IMPLICIT NONE


+ 1
- 1
Equipments/DrillingConsole_ScrLEDs.i90 Ver arquivo

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


+ 1
- 1
Equipments/Pumps/Pump_OffMode_Solver.i90 Ver arquivo

@@ -31,7 +31,7 @@ subroutine Pump_OffMode_Solver(Pump_No)
data%State%Pump(Pump_No)%Speed = ( data%State%Pump(Pump_No)%Flow_Rate/(data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0) )*data%State%Pump(Pump_No)%Trans_Ratio ![rpm]
end if
data%State%Pump(Pump_No)%SoundSPM = INT(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio)
data%State%Pump(Pump_No)%SoundSPM = INT(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio) ![SPM]
If (data%State%Pump(Pump_No)%Flow_Rate>0.d0) Then
data%State%Pump(Pump_No)%Open_Close = 1


+ 34
- 0
Equipments/Pumps/Pump_OnMode_Solver.i90 Ver arquivo

@@ -0,0 +1,34 @@
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pump_OnMode_Solver.f90"
subroutine Pump_OnMode_Solver(Pump_No)
use SimulationVariables
IMPLICIT NONE
INTEGER :: Pump_No
data%State%Pump(Pump_No)%Flow_Rate = data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0*(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio) ![gpm]
data%State%Pump(Pump_No)%Max_FlowRate = data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0*data%State%Pump(Pump_No)%MaxSPM ![gpm]
data%State%Pump(Pump_No)%HorsePower = ((data%State%Pump(Pump_No)%Flow_Rate/0.01d0)*data%State%Pump(Pump_No)%StandPipe_Pressure)/(168067.d0*data%State%Pump(Pump_No)%Mech_Efficiency) ![HHP]
!data%State%Pump(Pump_No)%Max_Horsepower = ((data%State%Pump(Pump_No)%Flow_Rate/0.01d0)*data%State%Pump(Pump_No)%Max_Pressure)/(168067.d0*data%State%Pump(Pump_No)%Mech_Efficiency) ![HHP]
data%State%Pump(Pump_No)%Max_Horsepower = (data%State%Pump(Pump_No)%Flow_Rate*data%State%Pump(Pump_No)%Max_Pressure)/(1714.d0*data%State%Pump(Pump_No)%Mech_Efficiency)
! if ( data%State%Pump(Pump_No)%StandPipe_Pressure>data%State%Pump(Pump_No)%Max_Pressure ) then ! in shart check shavad
! !if ( (data%State%Pump(Pump_No)%StandPipe_Pressure*data%State%Pump(Pump_No)%Flow_Rate)>(1714.d0*data%State%Pump(Pump_No)%Max_Horsepower*data%State%Pump(Pump_No)%Mech_Efficiency) ) then
! data%State%Pump(Pump_No)%Flow_Rate = (1714.d0*data%State%Pump(Pump_No)%Mech_Efficiency*data%State%Pump(Pump_No)%Max_Horsepower)/data%State%Pump(Pump_No)%StandPipe_Pressure ![gpm]
! data%State%Pump(Pump_No)%Speed = ( data%State%Pump(Pump_No)%Flow_Rate/(data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0) )*data%State%Pump(Pump_No)%Trans_Ratio ![rpm]
! end if
data%State%Pump(Pump_No)%SoundSPM = INT(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio) ![SPM] ![spm]
If (data%State%Pump(Pump_No)%Flow_Rate>0.d0) Then
data%State%Pump(Pump_No)%Open_Close = 1
Else
data%State%Pump(Pump_No)%Open_Close = 0
End if
end subroutine Pump_OnMode_Solver

+ 6
- 5
Equipments/Pumps/Pumps_Inputs.f90 Ver arquivo

@@ -2,8 +2,6 @@ subroutine Pumps_Inputs
use CDrillingConsoleVariables
use SimulationVariables
use SimulationVariables
use SimulationVariables
Use MudSystemModule
IMPLICIT NONE
@@ -27,7 +25,8 @@ subroutine Pumps_Inputs
data%State%Pump(1)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch
data%State%Pump(1)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM] 0<MP1Throttle<965 rpm
data%State%Pump(1)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![SPM] 0<MP1Throttle<data%State%Pump(1)%MaxSPM
data%State%Pump(1)%Throttle = data%State%Pump(1)%Throttle*data%State%Pump(1)%Trans_Ratio ![RPM] 0<Pump(1)%Throttle<965 rpm
!data%State%Pump(1)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump1 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
@@ -58,7 +57,8 @@ subroutine Pumps_Inputs
data%State%Pump(2)%Switch = data%Equipments%DrillingConsole%MP2Switch
data%State%Pump(2)%Throttle = data%Equipments%DrillingConsole%MP2Throttle ![RPM] 0<MP2Throttle<965 rpm
data%State%Pump(2)%Throttle = data%Equipments%DrillingConsole%MP2Throttle ![SPM] 0<MP2Throttle<data%State%Pump(2)%MaxSPM
data%State%Pump(2)%Throttle = data%State%Pump(2)%Throttle*data%State%Pump(2)%Trans_Ratio ![RPM] 0<Pump(2)%Throttle<965 rpm
!data%State%Pump(2)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump2 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
@@ -87,7 +87,8 @@ subroutine Pumps_Inputs
data%State%Pump(3)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch
data%State%Pump(3)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM] 0<MP1Throttle<965 rpm
data%State%Pump(3)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![SPM] 0<MP1Throttle<data%State%Pump(3)%MaxSPM
data%State%Pump(3)%Throttle = data%State%Pump(3)%Throttle*data%State%Pump(3)%Trans_Ratio ![RPM] 0<Pump(3)%Throttle<965 rpm
!data%State%Pump(3)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump3 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad


+ 114
- 113
Equipments/Pumps/Pumps_Inputs.i90 Ver arquivo

@@ -1,113 +1,114 @@
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_Inputs.f90"
subroutine Pumps_Inputs
use CDrillingConsoleVariables
use SimulationVariables
use SimulationVariables
use SimulationVariables
Use MudSystemModule
IMPLICIT NONE
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<
!data%State%Pump(1)%BlowPopOffMalf = 0 !??????? motaghayere voroudi
if ( data%State%Pump(1)%BlowPopOffMalf==1 ) then ! Pump1 Malfunction ----> Blow Pop-offs (Relief Valves)
data%State%Pump(1)%StandPipe_Pressure = 0.d0
else
data%State%Pump(1)%StandPipe_Pressure = PumpPressure1 ![psi]
if ( data%State%Pump(1)%StandPipe_Pressure<=14.d0 ) then
data%State%Pump(1)%StandPipe_Pressure = 14.d0
end if
end if
data%State%Pump(1)%AssignmentSwitchh = data%Equipments%DrillingConsole%AssignmentSwitch
data%State%Pump(1)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch
data%State%Pump(1)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM]
!data%State%Pump(1)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump1 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
data%State%Pump(1)%Failure = data%Warnings%Pump1Failure !(Pump1 Warning ----> Failure)
data%State%Pump(1)%N_new = data%State%Pump(1)%Throttle
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<<
!data%State%Pump(2)%BlowPopOffMalf = 0 !??????? motaghayere voroudi
if ( data%State%Pump(2)%BlowPopOffMalf==1 ) then ! Pump2 Malfunction ----> Blow Pop-offs (Relief Valves)
data%State%Pump(2)%StandPipe_Pressure = 0.d0
else
data%State%Pump(2)%StandPipe_Pressure = PumpPressure2 ![psi]
if ( data%State%Pump(2)%StandPipe_Pressure<=14.d0 ) then
data%State%Pump(2)%StandPipe_Pressure = 14.d0
end if
end if
data%State%Pump(2)%AssignmentSwitchh = data%Equipments%DrillingConsole%AssignmentSwitch
data%State%Pump(2)%Switch = data%Equipments%DrillingConsole%MP2Switch
data%State%Pump(2)%Throttle = data%Equipments%DrillingConsole%MP2Throttle ![RPM]
!data%State%Pump(2)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump2 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
data%State%Pump(2)%Failure = data%Warnings%Pump2Failure !(Pump2 Warning ----> Failure)
data%State%Pump(2)%N_new = data%State%Pump(2)%Throttle
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<<
!data%State%Pump(3)%BlowPopOffMalf = 0 !??????? motaghayere voroudi
if ( data%State%Pump(3)%BlowPopOffMalf==1 ) then ! Pump3 Malfunction ----> Blow Pop-offs (Relief Valves)
data%State%Pump(3)%StandPipe_Pressure = 0.d0
else
data%State%Pump(3)%StandPipe_Pressure = PumpPressure3 ![psi]
if ( data%State%Pump(3)%StandPipe_Pressure<=14.d0 ) then
data%State%Pump(3)%StandPipe_Pressure = 14.d0
end if
end if
data%State%Pump(3)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch
data%State%Pump(3)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM]
!data%State%Pump(3)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump3 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
data%State%Pump(3)%Failure = data%Warnings%Pump3Failure !(Pump1 Warning ----> Failure)
data%State%Pump(3)%N_new = data%State%Pump(3)%Throttle
!>>>>>>>>>>>>>>>>>>>>>>> Total Pumps <<<<<<<<<<<<<<<<<<<<<<<<<<<
end subroutine Pumps_Inputs
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_Inputs.f90"
subroutine Pumps_Inputs
use CDrillingConsoleVariables
use SimulationVariables
Use MudSystemModule
IMPLICIT NONE
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<

!data%State%Pump(1)%BlowPopOffMalf = 0 !??????? motaghayere voroudi
if ( data%State%Pump(1)%BlowPopOffMalf==1 ) then ! Pump1 Malfunction ----> Blow Pop-offs (Relief Valves)
data%State%Pump(1)%StandPipe_Pressure = 0.d0
else
data%State%Pump(1)%StandPipe_Pressure = PumpPressure1 ![psi]
if ( data%State%Pump(1)%StandPipe_Pressure<=14.d0 ) then
data%State%Pump(1)%StandPipe_Pressure = 14.d0
end if
end if
data%State%Pump(1)%AssignmentSwitchh = data%Equipments%DrillingConsole%AssignmentSwitch
data%State%Pump(1)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch
data%State%Pump(1)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![SPM] 0<MP1Throttle<data%State%Pump(1)%MaxSPM
data%State%Pump(1)%Throttle = data%State%Pump(1)%Throttle*data%State%Pump(1)%Trans_Ratio ![RPM] 0<Pump(1)%Throttle<965 rpm
!data%State%Pump(1)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump1 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
data%State%Pump(1)%Failure = data%Warnings%Pump1Failure !(Pump1 Warning ----> Failure)
data%State%Pump(1)%N_new = data%State%Pump(1)%Throttle

!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<<

!data%State%Pump(2)%BlowPopOffMalf = 0 !??????? motaghayere voroudi
if ( data%State%Pump(2)%BlowPopOffMalf==1 ) then ! Pump2 Malfunction ----> Blow Pop-offs (Relief Valves)
data%State%Pump(2)%StandPipe_Pressure = 0.d0
else
data%State%Pump(2)%StandPipe_Pressure = PumpPressure2 ![psi]
if ( data%State%Pump(2)%StandPipe_Pressure<=14.d0 ) then
data%State%Pump(2)%StandPipe_Pressure = 14.d0
end if
end if
data%State%Pump(2)%AssignmentSwitchh = data%Equipments%DrillingConsole%AssignmentSwitch
data%State%Pump(2)%Switch = data%Equipments%DrillingConsole%MP2Switch
data%State%Pump(2)%Throttle = data%Equipments%DrillingConsole%MP2Throttle ![SPM] 0<MP2Throttle<data%State%Pump(2)%MaxSPM
data%State%Pump(2)%Throttle = data%State%Pump(2)%Throttle*data%State%Pump(2)%Trans_Ratio ![RPM] 0<Pump(2)%Throttle<965 rpm
!data%State%Pump(2)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump2 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
data%State%Pump(2)%Failure = data%Warnings%Pump2Failure !(Pump2 Warning ----> Failure)
data%State%Pump(2)%N_new = data%State%Pump(2)%Throttle
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<<

!data%State%Pump(3)%BlowPopOffMalf = 0 !??????? motaghayere voroudi
if ( data%State%Pump(3)%BlowPopOffMalf==1 ) then ! Pump3 Malfunction ----> Blow Pop-offs (Relief Valves)
data%State%Pump(3)%StandPipe_Pressure = 0.d0
else
data%State%Pump(3)%StandPipe_Pressure = PumpPressure3 ![psi]
if ( data%State%Pump(3)%StandPipe_Pressure<=14.d0 ) then
data%State%Pump(3)%StandPipe_Pressure = 14.d0
end if
end if
data%State%Pump(3)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch
data%State%Pump(3)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![SPM] 0<MP1Throttle<data%State%Pump(3)%MaxSPM
data%State%Pump(3)%Throttle = data%State%Pump(3)%Throttle*data%State%Pump(3)%Trans_Ratio ![RPM] 0<Pump(3)%Throttle<965 rpm
!data%State%Pump(3)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump3 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
data%State%Pump(3)%Failure = data%Warnings%Pump3Failure !(Pump1 Warning ----> Failure)
data%State%Pump(3)%N_new = data%State%Pump(3)%Throttle
!>>>>>>>>>>>>>>>>>>>>>>> Total Pumps <<<<<<<<<<<<<<<<<<<<<<<<<<<
end subroutine Pumps_Inputs

+ 0
- 2
Equipments/Pumps/Pumps_Outputs.f90 Ver arquivo

@@ -3,9 +3,7 @@ subroutine Pumps_Outputs
use CDataDisplayConsole
use SimulationVariables
! Use CSimulationVariables
use SimulationVariables
Use MudSystemModule
use SimulationVariables !@
Use CSounds
IMPLICIT NONE


+ 95
- 97
Equipments/Pumps/Pumps_Outputs.i90 Ver arquivo

@@ -1,97 +1,95 @@
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_Outputs.f90"
subroutine Pumps_Outputs
use CDataDisplayConsole
use SimulationVariables
! Use CSimulationVariables
use SimulationVariables
Use MudSystemModule
use SimulationVariables !@
Use CSounds
IMPLICIT NONE
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<
If (data%State%Pump(1)%Open_Close==1) then
Call OpenPump1()
Else if (data%State%Pump(1)%Open_Close==0) then
Call ClosePump1()
End if
data%Equipments%DrillingConsole%MP1BLWR = data%State%Pump(1)%BLWR
Call SetSoundBlowerMP1( data%State%Pump(1)%SoundBlower ) !.true. or .false.
Call SetSoundMP1( data%State%Pump(1)%SoundSPM ) ![spm] , integer
if ((data%State%Pump(1)%Switch==-1) .or. (data%State%Pump(1)%Switch==0)) then
Call Set_MP1SPMGauge( sngl(1-data%State%Pump(1)%SPMGaugeMalf)*real((data%State%Pump(1)%Speed/data%State%Pump(1)%Trans_Ratio),8) ) ![spm] , real
data%Equipments%DrillingWatch%SPM1 = data%Equipments%DataDisplayConsole%MP1SPMGauge
end if
!data%State%Pump(1)%Flow_Rate !to other modules , [gpm]
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<<
If (data%State%Pump(2)%Open_Close==1) then
Call OpenPump2()
Else if (data%State%Pump(2)%Open_Close==0) then
Call ClosePump2()
End if
data%Equipments%DrillingConsole%MP2BLWR = data%State%Pump(2)%BLWR
Call SetSoundBlowerMP2( data%State%Pump(2)%SoundBlower )
Call SetSoundMP2( data%State%Pump(2)%SoundSPM )
Call Set_MP2SPMGauge( sngl(1-data%State%Pump(2)%SPMGaugeMalf)*real((data%State%Pump(2)%Speed/data%State%Pump(2)%Trans_Ratio),8) )
data%Equipments%DrillingWatch%SPM2 = data%Equipments%DataDisplayConsole%MP2SPMGauge
!data%State%Pump(2)%Flow_Rate !to other modules
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<<
If (data%State%Pump(3)%Open_Close==1) then
Call OpenCementPump()
Else if (data%State%Pump(3)%Open_Close==0) then
Call CloseCementPump()
End if
Call SetSoundMP3( data%State%Pump(3)%SoundSPM )
if (data%State%Pump(3)%Switch==1) then
Call Set_MP1SPMGauge( real((data%State%Pump(3)%Speed/data%State%Pump(3)%Trans_Ratio),8) )
data%Equipments%DrillingWatch%SPM1 = data%Equipments%DataDisplayConsole%MP1SPMGauge
end if
!data%State%Pump(3)%Flow_Rate !to other modules
!>>>>>>>>>>>>>>>>>>>>>>> Total Pumps <<<<<<<<<<<<<<<<<<<<<<<<<<<
!data%State%MPumps%Total_Pump_Gpm = 100.d0 !???????????
!data%State%MPumps%Total_Pump_SPM = 1000.d0 !?????????????
!SCR1LED=1
!SCR2LED=1
!SCR3LED=1
!SCR4LED=1
end subroutine Pumps_Outputs
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_Outputs.f90"
subroutine Pumps_Outputs
use CDataDisplayConsole
use SimulationVariables
! Use CSimulationVariables
Use MudSystemModule
Use CSounds
IMPLICIT NONE
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<
If (data%State%Pump(1)%Open_Close==1) then
Call OpenPump1()
Else if (data%State%Pump(1)%Open_Close==0) then
Call ClosePump1()
End if
data%Equipments%DrillingConsole%MP1BLWR = data%State%Pump(1)%BLWR
Call SetSoundBlowerMP1( data%State%Pump(1)%SoundBlower ) !.true. or .false.
Call SetSoundMP1( data%State%Pump(1)%SoundSPM ) ![SPM] , integer
if ((data%State%Pump(1)%Switch==-1) .or. (data%State%Pump(1)%Switch==0)) then
Call Set_MP1SPMGauge( sngl(1-data%State%Pump(1)%SPMGaugeMalf)*real((data%State%Pump(1)%Speed/data%State%Pump(1)%Trans_Ratio),8) ) ![spm] , real
data%Equipments%DrillingWatch%SPM1 = data%Equipments%DataDisplayConsole%MP1SPMGauge
end if
!data%State%Pump(1)%Flow_Rate !to other modules , [gpm]
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<<
If (data%State%Pump(2)%Open_Close==1) then
Call OpenPump2()
Else if (data%State%Pump(2)%Open_Close==0) then
Call ClosePump2()
End if
data%Equipments%DrillingConsole%MP2BLWR = data%State%Pump(2)%BLWR
Call SetSoundBlowerMP2( data%State%Pump(2)%SoundBlower )
Call SetSoundMP2( data%State%Pump(2)%SoundSPM ) ![SPM]
Call Set_MP2SPMGauge( sngl(1-data%State%Pump(2)%SPMGaugeMalf)*real((data%State%Pump(2)%Speed/data%State%Pump(2)%Trans_Ratio),8) ) ![SPM]
data%Equipments%DrillingWatch%SPM2 = data%Equipments%DataDisplayConsole%MP2SPMGauge
!data%State%Pump(2)%Flow_Rate !to other modules
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<<

If (data%State%Pump(3)%Open_Close==1) then
Call OpenCementPump()
Else if (data%State%Pump(3)%Open_Close==0) then
Call CloseCementPump()
End if
Call SetSoundMP3( data%State%Pump(3)%SoundSPM )
if (data%State%Pump(3)%Switch==1) then
Call Set_MP1SPMGauge( real((data%State%Pump(3)%Speed/data%State%Pump(3)%Trans_Ratio),8) ) ![SPM] SPMGaugeMalf Malf nadarad????
data%Equipments%DrillingWatch%SPM1 = data%Equipments%DataDisplayConsole%MP1SPMGauge
end if
!data%State%Pump(3)%Flow_Rate !to other modules
!>>>>>>>>>>>>>>>>>>>>>>> Total Pumps <<<<<<<<<<<<<<<<<<<<<<<<<<<
!data%State%MPumps%Total_Pump_Gpm = 100.d0 !???????????
!data%State%MPumps%Total_Pump_SPM = 1000.d0 !?????????????
!SCR1LED=1
!SCR2LED=1
!SCR3LED=1
!SCR4LED=1
end subroutine Pumps_Outputs

+ 3
- 3
Equipments/Pumps/Pumps_StartUp.f90 Ver arquivo

@@ -16,7 +16,7 @@ subroutine Pumps_StartUp
data%State%Pump(1)%Trans_Ratio = 965.d0/data%State%Pump(1)%MaxSPM
data%State%Pump(1)%time_step = 0.1d0 !?????? niaz hast ya na??
data%State%Pump(1)%RateChange = (data%State%Pump(1)%RateChange*data%State%Pump(1)%Trans_Ratio)/60.d0 ![rpm/s ??] 24/60
data%State%Pump(1)%RateChange = (data%State%Pump(1)%RateChange*data%State%Pump(1)%Trans_Ratio)/60.d0 ![rpm/s ??] 24/60
data%State%Pump(1)%DelayToShutdown = data%State%Pump(1)%DelayToShutdown/60.d0 ![s]
data%State%Pump(1)%K_throttle = 0
data%State%Pump(1)%N_old = 0.d0
@@ -34,7 +34,7 @@ subroutine Pumps_StartUp
data%State%Pump(2)%Trans_Ratio = 965.d0/data%State%Pump(2)%MaxSPM
data%State%Pump(2)%time_step = 0.1d0 !?????? niaz hast ya na??
data%State%Pump(2)%RateChange = (data%State%Pump(2)%RateChange*data%State%Pump(2)%Trans_Ratio)/60.d0 ![rpm/s ??]
data%State%Pump(2)%RateChange = (data%State%Pump(2)%RateChange*data%State%Pump(2)%Trans_Ratio)/60.d0 ![rpm/s ??]
data%State%Pump(2)%DelayToShutdown = data%State%Pump(2)%DelayToShutdown/60.d0 ![s]
data%State%Pump(2)%K_throttle = 0
data%State%Pump(2)%N_old = 0.d0
@@ -52,7 +52,7 @@ subroutine Pumps_StartUp
data%State%Pump(3)%Trans_Ratio = 965.d0/data%State%Pump(3)%MaxSPM
data%State%Pump(3)%time_step = 0.1d0 !?????? niaz hast ya na??
data%State%Pump(3)%RateChange = (data%State%Pump(3)%RateChange*data%State%Pump(3)%Trans_Ratio)/60.d0 ![rpm/s ??]
data%State%Pump(3)%RateChange = (data%State%Pump(3)%RateChange*data%State%Pump(3)%Trans_Ratio)/60.d0 ![rpm/s ??]
data%State%Pump(3)%DelayToShutdown = data%State%Pump(3)%DelayToShutdown/60.d0 ![s]
data%State%Pump(3)%K_throttle = 0
data%State%Pump(3)%N_old = 0.d0


+ 63
- 50
Equipments/Pumps/Pumps_StartUp.i90 Ver arquivo

@@ -1,50 +1,63 @@
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_StartUp.f90"
subroutine Pumps_StartUp
use CPumpsVariables
use CPumps
use SimulationVariables
IMPLICIT NONE
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<
data%State%Pump(1)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi
!data%State%Pump(1)%FlowRatePerSTK = data%State%Pump(1)%FlowRatePerSTK*0.0292d0 ![gpm]
data%State%Pump(1)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi
data%State%Pump(1)%Mech_Efficiency = data%Configuration%Pumps%MudPump1MechanicalEfficiency ![dimensionless]
!data%State%Pump(1)%Vol_Efficiency = MudPump1VolumetricEfficiency !bayad hazf beshe ?
data%State%Pump(1)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi
data%State%Pump(1)%MaxSPM = data%Configuration%Pumps%MudPump1Maximum ![spm]
data%State%Pump(1)%Trans_Ratio = 965.d0/data%State%Pump(1)%MaxSPM
data%State%Pump(1)%time_step = 0.1d0 !?????? niaz hast ya na??
data%State%Pump(1)%RateChange = 193.d0!data%State%Pump(1)%RateChange*data%State%Pump(1)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s
data%State%Pump(1)%K_throttle = 0
data%State%Pump(1)%N_old = 0.d0
Call Pump_OffMode_Solver(1)
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<<
data%State%Pump(2)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi
!data%State%Pump(2)%FlowRatePerSTK = data%State%Pump(2)%FlowRatePerSTK*0.0292d0 ![gpm]
data%State%Pump(2)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi
data%State%Pump(2)%Mech_Efficiency = data%Configuration%Pumps%MudPump2MechanicalEfficiency ![dimensionless]
!data%State%Pump(2)%Vol_Efficiency = MudPump2VolumetricEfficiency !bayad hazf beshe ?
data%State%Pump(2)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi
data%State%Pump(2)%MaxSPM = data%Configuration%Pumps%MudPump2Maximum ![spm]
data%State%Pump(2)%Trans_Ratio = 965.d0/data%State%Pump(2)%MaxSPM
data%State%Pump(2)%time_step = 0.1d0 !?????? niaz hast ya na??
data%State%Pump(2)%RateChange = 193.d0!data%State%Pump(2)%RateChange*data%State%Pump(2)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s
data%State%Pump(2)%K_throttle = 0
data%State%Pump(2)%N_old = 0.d0
Call Pump_OffMode_Solver(2)
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<<
data%State%Pump(3)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi
!data%State%Pump(3)%FlowRatePerSTK = data%State%Pump(3)%FlowRatePerSTK*0.0292d0 ![gpm]
data%State%Pump(3)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi
data%State%Pump(3)%Mech_Efficiency = data%Configuration%Pumps%CementPumpMechanicalEfficiency ![dimensionless]
!data%State%Pump(3)%Vol_Efficiency = CementPumpVolumetricEfficiency !bayad hazf beshe ?
data%State%Pump(3)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi
data%State%Pump(3)%MaxSPM = data%Configuration%Pumps%CementPumpMaximum ![spm]
data%State%Pump(3)%Trans_Ratio = 965.d0/data%State%Pump(3)%MaxSPM
data%State%Pump(3)%time_step = 0.1d0 !?????? niaz hast ya na??
data%State%Pump(3)%RateChange = 193.d0!data%State%Pump(3)%RateChange*data%State%Pump(3)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s
data%State%Pump(3)%K_throttle = 0
data%State%Pump(3)%N_old = 0.d0
Call Pump_OffMode_Solver(3)
end subroutine Pumps_StartUp
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_StartUp.f90"
subroutine Pumps_StartUp
use CPumpsVariables
use CPumps
use SimulationVariables
IMPLICIT NONE
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<
data%State%Pump(1)%FlowRatePerSTK = data%Configuration%Pumps%MudPump1VolumetricOutput !.1d0 ![bbl/stk]
data%State%Pump(1)%RateChange = data%Configuration%Pumps%MudPump1PumpRateChange ![stk/min2 ??]
data%State%Pump(1)%DelayToShutdown = data%Configuration%Pumps%MudPump1DelayToShutdown ![min]
data%State%Pump(1)%Mech_Efficiency = data%Configuration%Pumps%MudPump1MechanicalEfficiency ![dimensionless]
!data%State%Pump(1)%Vol_Efficiency = MudPump1VolumetricEfficiency !bayad hazf beshe ?
data%State%Pump(1)%Max_Pressure = data%Configuration%Pumps%MudPump1MaximumPressure !6000.d0 ![psi]
data%State%Pump(1)%MaxSPM = data%Configuration%Pumps%MudPump1Maximum ![spm]
data%State%Pump(1)%Trans_Ratio = 965.d0/data%State%Pump(1)%MaxSPM
data%State%Pump(1)%time_step = 0.1d0 !?????? niaz hast ya na??
data%State%Pump(1)%RateChange = (data%State%Pump(1)%RateChange*data%State%Pump(1)%Trans_Ratio)/60.d0 ![rpm/s ??] 24/60
data%State%Pump(1)%DelayToShutdown = data%State%Pump(1)%DelayToShutdown/60.d0 ![s]
data%State%Pump(1)%K_throttle = 0
data%State%Pump(1)%N_old = 0.d0
Call Pump_OffMode_Solver(1)
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<<
data%State%Pump(2)%FlowRatePerSTK = data%Configuration%Pumps%MudPump2VolumetricOutput !.1d0 ![bbl/stk]
data%State%Pump(2)%RateChange = data%Configuration%Pumps%MudPump2PumpRateChange ![stk/min2 ??]
data%State%Pump(2)%DelayToShutdown = data%Configuration%Pumps%MudPump2DelayToShutdown ![min]
data%State%Pump(2)%Mech_Efficiency = data%Configuration%Pumps%MudPump2MechanicalEfficiency ![dimensionless]
!data%State%Pump(2)%Vol_Efficiency = MudPump2VolumetricEfficiency !bayad hazf beshe ?
data%State%Pump(2)%Max_Pressure = data%Configuration%Pumps%MudPump2MaximumPressure !6000.d0 ![psi]
data%State%Pump(2)%MaxSPM = data%Configuration%Pumps%MudPump2Maximum ![spm]
data%State%Pump(2)%Trans_Ratio = 965.d0/data%State%Pump(2)%MaxSPM
data%State%Pump(2)%time_step = 0.1d0 !?????? niaz hast ya na??
data%State%Pump(2)%RateChange = (data%State%Pump(2)%RateChange*data%State%Pump(2)%Trans_Ratio)/60.d0 ![rpm/s ??]
data%State%Pump(2)%DelayToShutdown = data%State%Pump(2)%DelayToShutdown/60.d0 ![s]
data%State%Pump(2)%K_throttle = 0
data%State%Pump(2)%N_old = 0.d0
Call Pump_OffMode_Solver(2)
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<<
data%State%Pump(3)%FlowRatePerSTK = data%Configuration%Pumps%CementPumpVolumetricOutput !.1d0 ![bbl/stk]
data%State%Pump(3)%RateChange = data%Configuration%Pumps%CementPumpPumpRateChange ![stk/min2 ??]
data%State%Pump(3)%DelayToShutdown = data%Configuration%Pumps%CementPumpDelayToShutdown ![min]
data%State%Pump(3)%Mech_Efficiency = data%Configuration%Pumps%CementPumpMechanicalEfficiency ![dimensionless]
!data%State%Pump(3)%Vol_Efficiency = CementPumpVolumetricEfficiency !bayad hazf beshe ?
data%State%Pump(3)%Max_Pressure = data%Configuration%Pumps%CementPumpMaximumPressure !6000.d0 ![psi]
data%State%Pump(3)%MaxSPM = data%Configuration%Pumps%CementPumpMaximum ![spm]
data%State%Pump(3)%Trans_Ratio = 965.d0/data%State%Pump(3)%MaxSPM
data%State%Pump(3)%time_step = 0.1d0 !?????? niaz hast ya na??
data%State%Pump(3)%RateChange = (data%State%Pump(3)%RateChange*data%State%Pump(3)%Trans_Ratio)/60.d0 ![rpm/s ??]
data%State%Pump(3)%DelayToShutdown = data%State%Pump(3)%DelayToShutdown/60.d0 ![s]
data%State%Pump(3)%K_throttle = 0
data%State%Pump(3)%N_old = 0.d0
Call Pump_OffMode_Solver(3)
end subroutine Pumps_StartUp

+ 49
- 49
Equipments/Pumps/Pumps_VARIABLES.i90 Ver arquivo

@@ -1,49 +1,49 @@
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_VARIABLES.f90"
MODULE Pumps_VARIABLES
IMPLICIT NONE
PUBLIC
! REAL , PARAMETER :: pi=3.14159265d0
Type, public:: Pumps_Var
REAL :: Total_Pump_GPM, Total_Pump_SPM, Total_Stroke_Counter_For_Plot
end Type Pumps_Var
Type(Pumps_Var) :: MPumps
!****************************************************************************************************
!**************** Define PUMP Array ************************************************************
TYPE, PUBLIC :: Pump_Var
!***** Pump_VARIABLES ***************************
INTEGER :: AssignmentSwitchh, Switch, K_throttle
INTEGER :: PowerFailMalf , BlowPopOffMalf , SPMGaugeMalf , Failure
REAL :: Throttle, RateChange
REAL :: Mech_Efficiency, Vol_Efficiency, Trans_Ratio
REAL :: StandPipe_Pressure , Max_Pressure
REAL :: Speed, N_new, N_old, MaxSPM
REAL :: Flow_Rate, Hydraulic_HorsePower, Max_Horsepower, FlowRatePerSTK, Max_FlowRate, HorsePower
REAL :: time_step
INTEGER :: BLWR ! 1=On , 0=Off
INTEGER :: Open_Close ! 1=Open , 0=Close
!************* Sound_VARIABLES **********************
INTEGER :: SoundSPM
Logical :: SoundBlower
END TYPE Pump_Var
!***********************************************************************************************
!***********************************************************************************************
END MODULE Pumps_VARIABLES
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_VARIABLES.f90"
MODULE Pumps_VARIABLES
IMPLICIT NONE
PUBLIC
! REAL , PARAMETER :: pi=3.14159265d0
Type, public:: Pumps_Var
REAL :: Total_Pump_GPM, Total_Pump_SPM, Total_Stroke_Counter_For_Plot
end Type Pumps_Var
Type(Pumps_Var) :: MPumps
!****************************************************************************************************
!**************** Define PUMP Array ************************************************************
TYPE, PUBLIC :: Pump_Var
!***** Pump_VARIABLES ***************************
INTEGER :: AssignmentSwitchh, Switch, K_throttle
INTEGER :: PowerFailMalf , BlowPopOffMalf , SPMGaugeMalf , Failure
REAL :: Throttle, RateChange, DelayToShutdown
REAL :: Mech_Efficiency, Vol_Efficiency, Trans_Ratio
REAL :: StandPipe_Pressure , Max_Pressure
REAL :: Speed, N_new, N_old, MaxSPM
REAL :: Flow_Rate, Hydraulic_HorsePower, Max_Horsepower, FlowRatePerSTK, Max_FlowRate, HorsePower
REAL :: time_step
INTEGER :: BLWR ! 1=On , 0=Off
INTEGER :: Open_Close ! 1=Open , 0=Close
!************* Sound_VARIABLES **********************
INTEGER :: SoundSPM
Logical :: SoundBlower
END TYPE Pump_Var
!***********************************************************************************************
!***********************************************************************************************
END MODULE Pumps_VARIABLES

+ 10
- 13
Equipments/RotaryTable/RTable_Inputs.f90 Ver arquivo

@@ -2,29 +2,29 @@ subroutine RTable_INPUTS
use CDrillingConsoleVariables
use SimulationVariables
use SimulationVariables
! use CSimulationVariables
use UnitySignalsModule
! use CTdsElevatorModesEnumVariables
use CHoistingVariables
use SimulationVariables
use SimulationVariables !@
use TD_DrillStemComponents
use CUnityInputs
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%AssignmentSwitch = data%EquipmentControl%DrillingConsole%AssignmentSwitch
data%State%RTable%Switch = data%EquipmentControl%DrillingConsole%RTSwitch
!data%State%RTable%GearsAbuse = RotaryGearsAbuse
data%State%RTable%Throttle = data%EquipmentControl%DrillingConsole%RTThrottle ![RPM]
data%State%RTable%Throttle = data%Equipments%DrillingConsole%RTThrottle ![RPM] 0<RTThrottle<130(max output) rpm
data%State%RTable%Throttle = data%State%RTable%Throttle*data%State%RTable%Conv_Ratio ![RPM] 0<RTable%Throttle<965 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
@@ -72,9 +72,6 @@ subroutine RTable_INPUTS
end if
!===> Transmission Mode
data%State%RTable%Conv_Ratio = data%State%RTable%High_Conv_Ratio
end subroutine RTable_INPUTS

+ 78
- 78
Equipments/RotaryTable/RTable_Inputs.i90 Ver arquivo

@@ -1,78 +1,78 @@
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_Inputs.f90"
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 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_Inputs.f90"
subroutine RTable_INPUTS
use CDrillingConsoleVariables
use SimulationVariables
use UnitySignalsModule
use CHoistingVariables
use TD_DrillStemComponents
use UnityModule
use CWarnings
use UnitySignalVariables
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] 0<RTThrottle<130(max output) rpm
data%State%RTable%Throttle = data%State%RTable%Throttle*data%State%RTable%Conv_Ratio ![RPM] 0<RTable%Throttle<965 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
end subroutine RTable_INPUTS

+ 1
- 5
Equipments/RotaryTable/RTable_Outputs.f90 Ver arquivo

@@ -2,11 +2,7 @@ subroutine RTable_Outputs
use CDrillingConsoleVariables
use SimulationVariables
use SimulationVariables
use CDataDisplayConsole
use SimulationVariables
use SimulationVariables !@
use SimulationVariables !@
Use CSounds
IMPLICIT NONE
@@ -21,7 +17,7 @@ subroutine RTable_Outputs
!data%State%RTable%Speed !to other modules
Call Set_RotaryRPMGauge( sngl(1-data%State%RTable%RpmGaugeMalf)*real(data%State%RTable%RpmGaugeOutput,8) ) ![RPM]
data%Equipments%DataDisplayConsole%RotaryTorqueGauge = data%State%RTable%TorqueGaugeOutput ![ft.lbf]
data%Equipments%DataDisplayConsole%RotaryTorqueGauge = data%State%RTable%TorqueGaugeOutput ![ft.lbf]
data%Equipments%DrillingWatch%Torque = data%State%RTable%TorqueGaugeOutput
Call Set_RotaryTorque(sngl(1-data%State%RTable%TorqueGaugeMalf)*real(data%State%RTable%TorqueGaugeOutput,8)) ![ft.lbf]


+ 29
- 33
Equipments/RotaryTable/RTable_Outputs.i90 Ver arquivo

@@ -1,33 +1,29 @@
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_Outputs.f90"
subroutine RTable_Outputs
use CDrillingConsoleVariables
use SimulationVariables
use SimulationVariables
use CDataDisplayConsole
use SimulationVariables
use SimulationVariables !@
use SimulationVariables !@
Use CSounds
IMPLICIT NONE
data%Equipments%DrillingConsole%RTBLWR = data%State%RTable%BLWR
Call SetSoundBlowerRT(data%State%RTable%SoundBlower) !.true. or .false.
Call SetSoundRT( data%State%RTable%SoundRPM ) ![RPM] , integer
!data%State%RTable%Speed !to other modules
Call Set_RotaryRPMGauge( sngl(1-data%State%RTable%RpmGaugeMalf)*real(data%State%RTable%RpmGaugeOutput,8) ) ![RPM]
data%Equipments%DataDisplayConsole%RotaryTorqueGauge = data%State%RTable%TorqueGaugeOutput ![ft.lbf]
data%Equipments%DrillingWatch%Torque = data%State%RTable%TorqueGaugeOutput
Call Set_RotaryTorque(sngl(1-data%State%RTable%TorqueGaugeMalf)*real(data%State%RTable%TorqueGaugeOutput,8)) ![ft.lbf]
!RT_RPMUnityOutput = sngl(data%State%RTable%Switch)*-1.d0*RotaryRPMGauge
end subroutine RTable_Outputs
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_Outputs.f90"
subroutine RTable_Outputs
use CDrillingConsoleVariables
use SimulationVariables
use CDataDisplayConsole
Use CSounds
IMPLICIT NONE
data%Equipments%DrillingConsole%RTBLWR = data%State%RTable%BLWR

Call SetSoundBlowerRT(data%State%RTable%SoundBlower) !.true. or .false.
Call SetSoundRT( data%State%RTable%SoundRPM ) ![RPM] , integer
!data%State%RTable%Speed !to other modules
Call Set_RotaryRPMGauge( sngl(1-data%State%RTable%RpmGaugeMalf)*real(data%State%RTable%RpmGaugeOutput,8) ) ![RPM]
data%Equipments%DataDisplayConsole%RotaryTorqueGauge = data%State%RTable%TorqueGaugeOutput ![ft.lbf]
data%Equipments%DrillingWatch%Torque = data%State%RTable%TorqueGaugeOutput
Call Set_RotaryTorque(sngl(1-data%State%RTable%TorqueGaugeMalf)*real(data%State%RTable%TorqueGaugeOutput,8)) ![ft.lbf]
!RT_RPMUnityOutput = sngl(data%State%RTable%Switch)*-1.d0*RotaryRPMGauge
end subroutine RTable_Outputs

+ 2
- 2
Equipments/RotaryTable/RTable_StartUp.f90 Ver arquivo

@@ -12,14 +12,14 @@ subroutine RTable_StartUp
data%State%RTable%High_Conv_Ratio = 4.825d0
data%State%RTable%Low_Conv_Ratio = 7.31d0
data%State%RTable%time_step = 0.1d0 ![s]
data%State%RTable%MaxRPM = 200.d0 ![RPM] !??????? motaghayere voroudi
data%State%RTable%MaxRPM = 130.d0 ![RPM] !??????? motaghayere voroudi
data%State%RTable%MaxTorque = 1500.d0 ![ft.lbf] !??????? motaghayere voroudi
data%State%RTable%RateChange = 193.d0 !data%State%RTable%RateChange/60.d0 ![RPM/s] ![cycle/min]=[RPM] !1[Hz]=60[RPM]
data%State%RTable%J_coef = data%State%RTable%Inertia_Moment+(1.d0*(data%State%RTable%Inertia_Moment))
data%State%RTable%Conv_Ratio = data%State%RTable%Low_Conv_Ratio
data%State%RTable%Conv_Ratio = 7.423d0 ! 965rpm/130(max output rpm) = 7.423 !data%State%RTable%Low_Conv_Ratio
data%State%RTable%String_JCoef = 0.d0
data%State%RTable%Torque = 0.d0
data%State%RTable%K_throttle = 0


+ 33
- 0
Equipments/RotaryTable/RTable_StartUp.i90 Ver arquivo

@@ -0,0 +1,33 @@
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_StartUp.f90"
subroutine RTable_StartUp

Use SimulationVariables
IMPLICIT NONE
data%State%RTable%Inertia_Moment = 23.261341d0 ! 23.261341[kg.m^2] = 552[lb.ft^2]
data%State%RTable%Mech_Efficiency = 0.93d0
data%State%RTable%RateChange = 1.d0 ![RPM/min] !??????? motaghayere voroudi
data%State%RTable%High_Conv_Ratio = 4.825d0
data%State%RTable%Low_Conv_Ratio = 7.31d0
data%State%RTable%time_step = 0.1d0 ![s]
data%State%RTable%MaxRPM = 130.d0 ![RPM] !??????? motaghayere voroudi
data%State%RTable%MaxTorque = 1500.d0 ![ft.lbf] !??????? motaghayere voroudi
data%State%RTable%RateChange = 193.d0 !data%State%RTable%RateChange/60.d0 ![RPM/s] ![cycle/min]=[RPM] !1[Hz]=60[RPM]
data%State%RTable%J_coef = data%State%RTable%Inertia_Moment+(1.d0*(data%State%RTable%Inertia_Moment))
data%State%RTable%Conv_Ratio = 7.423d0 ! 965rpm/130(max output rpm) = 7.423 !data%State%RTable%Low_Conv_Ratio
data%State%RTable%String_JCoef = 0.d0
data%State%RTable%Torque = 0.d0
data%State%RTable%K_throttle = 0
data%State%RTable%Speed = 0.d0
data%State%RTable%TorqueGaugeOutput = 0.d0
call RTable_OffMode
end subroutine RTable_StartUp

+ 49
- 49
Equipments/RotaryTable/RotaryTableMain.i90 Ver arquivo

@@ -1,49 +1,49 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/RotaryTable/RotaryTableMain.f90"
module RotaryTableMain
implicit none
public
contains
subroutine RotaryTable_Setup()
!use CSimulationVariables
!call OnSimulationInitialization%Add(RotaryTable_Init)
!call OnSimulationStop%Add(RotaryTable_Init)
!call OnRotaryTableStep%Add(RotaryTable_Step)
!call OnRotaryTableOutput%Add(RotaryTable_Output)
!call OnRotaryTableMain%Add(RotaryTableMainBody)
end subroutine
subroutine RotaryTable_Init
Call RTable_StartUp
end subroutine RotaryTable_Init
subroutine RotaryTable_Step
Call Rtable_MainSolver
end subroutine RotaryTable_Step
subroutine RotaryTable_Output
implicit none
end subroutine RotaryTable_Output
subroutine RotaryTableMainBody
use SimulationVariables !@
implicit none
Call RTable_StartUp
loopRtablestart : do
Call RTable_MainSolver
end do loopRtablestart
end subroutine RotaryTableMainBody
end module RotaryTableMain
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RotaryTableMain.f90"
module RotaryTableMain
implicit none
public
contains
subroutine RotaryTable_Setup()
!use CSimulationVariables
!call OnSimulationInitialization%Add(RotaryTable_Init)
!call OnSimulationStop%Add(RotaryTable_Init)
!call OnRotaryTableStep%Add(RotaryTable_Step)
!call OnRotaryTableOutput%Add(RotaryTable_Output)
!call OnRotaryTableMain%Add(RotaryTableMainBody)
end subroutine
subroutine RotaryTable_Init
Call RTable_StartUp
end subroutine RotaryTable_Init
subroutine RotaryTable_Step
Call Rtable_MainSolver
end subroutine RotaryTable_Step
subroutine RotaryTable_Output
implicit none
end subroutine RotaryTable_Output
subroutine RotaryTableMainBody
use SimulationVariables !@
implicit none
Call RTable_StartUp
loopRtablestart : do
Call RTable_MainSolver
end do loopRtablestart
end subroutine RotaryTableMainBody
end module RotaryTableMain

+ 1
- 1
FluidFlow/Well_Pressure_Data_Transfer.i90 Ver arquivo

@@ -1,4 +1,4 @@
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/FluidFlow/Well_Pressure_Data_Transfer.f90"
# 1 "/home/admin/SimulationCore2/FluidFlow/Well_Pressure_Data_Transfer.f90"
SUBROUTINE WellPressureDataTransfer
!! This subroutine calculates pressure distribution in well



+ 1
- 1
config-asiatech.json Ver arquivo

@@ -7,5 +7,5 @@
"logging":3,
"process_name": "SimulationCore2",
"work_dir" : ".",
"step_time" : 1000
"step_time" : 100
}

+ 1
- 1
redisContent.json
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


Carregando…
Cancelar
Salvar