Browse Source

In the middle of configuration to json

najafi
mahmood19227 1 year ago
parent
commit
ff152e5717
100 changed files with 835 additions and 1288 deletions
  1. +44
    -55
      CSharp/BasicInputs/Bha/CStringConfiguration.f90
  2. +29
    -33
      CSharp/BasicInputs/Geology/CFormation.f90
  3. +29
    -107
      CSharp/BasicInputs/Geology/CReservoir.f90
  4. +24
    -49
      CSharp/BasicInputs/Geology/CShoe.f90
  5. +23
    -87
      CSharp/BasicInputs/RigSpecifications/CAccumulator.f90
  6. +1
    -1
      CSharp/BasicInputs/RigSpecifications/CAccumulatorVariables.f90
  7. +40
    -196
      CSharp/BasicInputs/RigSpecifications/CBopStack.f90
  8. +0
    -1
      CSharp/BasicInputs/RigSpecifications/CBopStackVariables.f90
  9. +25
    -3
      CSharp/BasicInputs/RigSpecifications/CHoisting.f90
  10. +25
    -63
      CSharp/BasicInputs/RigSpecifications/CPower.f90
  11. +1
    -1
      CSharp/BasicInputs/RigSpecifications/CPowerVariables.f90
  12. +155
    -106
      CSharp/BasicInputs/RigSpecifications/CPumps.f90
  13. +7
    -7
      CSharp/BasicInputs/RigSpecifications/CPumpsVariables.f90
  14. +22
    -31
      CSharp/BasicInputs/RigSpecifications/CRigSize.f90
  15. +32
    -137
      CSharp/BasicInputs/WellProfile/CCasingLinerChoke.f90
  16. +1
    -1
      CSharp/BasicInputs/WellProfile/CCasingLinerChokeVariables.f90
  17. +20
    -53
      CSharp/BasicInputs/WellProfile/CPathGeneration.f90
  18. +1
    -1
      CSharp/DownHole/DownHole.f90
  19. +1
    -1
      CSharp/Equipments/ControlPanels/CBopControlPanel.f90
  20. +1
    -1
      CSharp/Equipments/ControlPanels/CChokeControlPanel.f90
  21. +1
    -1
      CSharp/Equipments/ControlPanels/CChokeManifold.f90
  22. +16
    -16
      CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90
  23. +2
    -2
      CSharp/Equipments/ControlPanels/CDrillingConsole.f90
  24. +3
    -3
      CSharp/Equipments/ControlPanels/CHook.f90
  25. +1
    -1
      CSharp/Equipments/ControlPanels/CStandPipeManifold.f90
  26. +5
    -5
      CSharp/Equipments/ControlPanels/CTopDrivePanel.f90
  27. +1
    -1
      CSharp/Equipments/MudPathFinding/CManifolds.f90
  28. +1
    -1
      CSharp/Equipments/Tanks/CTanks.f90
  29. +4
    -4
      CSharp/OperationScenarios/Common/COperationScenariosMain.f90
  30. +1
    -1
      CSharp/OperationScenarios/Common/COperationScenariosSettings.f90
  31. +3
    -3
      CSharp/OperationScenarios/Common/OperationScenarios.f90
  32. +1
    -1
      CSharp/OperationScenarios/Enums/CElevatorConnectionEnum.f90
  33. +2
    -2
      CSharp/OperationScenarios/Enums/CTdsElevatorModesEnum.f90
  34. +1
    -1
      CSharp/OperationScenarios/Notifications/CIrIBopLedNotification.f90
  35. +1
    -1
      CSharp/OperationScenarios/Notifications/CTdsPowerLedNotification.f90
  36. +25
    -25
      CSharp/OperationScenarios/Notifications/Notofications.f90
  37. +1
    -1
      CSharp/OperationScenarios/Permissions/CSwingDrillPermission.f90
  38. +1
    -1
      CSharp/OperationScenarios/Permissions/CSwingTiltPermission.f90
  39. +1
    -1
      CSharp/OperationScenarios/Permissions/Permissions.f90
  40. +2
    -2
      CSharp/OperationScenarios/UnitySignals/CMouseHoleEnum.f90
  41. +3
    -3
      CSharp/OperationScenarios/UnitySignals/COperationConditionEnum.f90
  42. +2
    -2
      CSharp/OperationScenarios/UnitySignals/CTdsBackupClamp.f90
  43. +2
    -2
      CSharp/OperationScenarios/UnitySignals/CTdsSpineEnum.f90
  44. +3
    -3
      CSharp/OperationScenarios/UnitySignals/CTdsSwingEnum.f90
  45. +2
    -2
      CSharp/OperationScenarios/UnitySignals/CTdsTongEnum.f90
  46. +4
    -4
      CSharp/OperationScenarios/UnitySignals/UnitySignals.f90
  47. +1
    -1
      CSharp/Problems/CBitProblems.f90
  48. +10
    -10
      CSharp/Problems/CBopProblems.f90
  49. +12
    -12
      CSharp/Problems/CChokeProblems.f90
  50. +1
    -1
      CSharp/Problems/CDrillStemProblems.f90
  51. +18
    -18
      CSharp/Problems/CGaugesProblems.f90
  52. +4
    -4
      CSharp/Problems/CHoistingProblems.f90
  53. +1
    -1
      CSharp/Problems/CKickProblems.f90
  54. +1
    -1
      CSharp/Problems/CLostProblems.f90
  55. +1
    -1
      CSharp/Problems/CMudTreatmentProblems.f90
  56. +1
    -1
      CSharp/Problems/COtherProblems.f90
  57. +7
    -7
      CSharp/Problems/CPumpProblems.f90
  58. +3
    -3
      CSharp/Problems/CRotaryProblems.f90
  59. +1
    -1
      CSharp/Warnings/CWarnings.f90
  60. +1
    -1
      Common/DynamicDoubleArray.f90
  61. +8
    -8
      Equipments/BopStack/ANNULAR.f90
  62. +1
    -1
      Equipments/BopStack/AnnularMain.f90
  63. +2
    -2
      Equipments/BopStack/BOP.f90
  64. +18
    -18
      Equipments/BopStack/BOPstartup.f90
  65. +1
    -1
      Equipments/BopStack/BlindRamsMain.f90
  66. +8
    -8
      Equipments/BopStack/CHOKE_LINE.f90
  67. +1
    -1
      Equipments/BopStack/ChokeLineMain.f90
  68. +8
    -8
      Equipments/BopStack/KILL_LINE.f90
  69. +1
    -1
      Equipments/BopStack/KillLineMain.f90
  70. +11
    -11
      Equipments/BopStack/LOSS_INPUTS.f90
  71. +8
    -8
      Equipments/BopStack/PIPE_RAM1.f90
  72. +8
    -8
      Equipments/BopStack/PIPE_RAM2.f90
  73. +1
    -1
      Equipments/BopStack/PipeRams1Main.f90
  74. +1
    -1
      Equipments/BopStack/PipeRams2Main.f90
  75. +7
    -7
      Equipments/BopStack/SHEAR_RAM.f90
  76. +4
    -4
      Equipments/ChokeControl/AirPump_Choke_Subs.f90
  77. +3
    -3
      Equipments/ChokeControl/CHOKE.f90
  78. +1
    -1
      Equipments/ChokeControl/ChokeControlMain.f90
  79. +1
    -1
      Equipments/ChokeControl/ChokeStartup.f90
  80. +1
    -1
      Equipments/Drawworks/DWFixModeMotion.f90
  81. +5
    -5
      Equipments/Drawworks/DWMalfunction_MotorFailure.f90
  82. +1
    -1
      Equipments/Drawworks/DrawworksMain.f90
  83. +4
    -4
      Equipments/Drawworks/Drawworks_Direction.f90
  84. +6
    -6
      Equipments/Drawworks/Drawworks_INPUTS.f90
  85. +1
    -1
      Equipments/Drawworks/Drawworks_MainSolver.f90
  86. +4
    -4
      Equipments/Drawworks/Drawworks_Outputs.f90
  87. +1
    -1
      Equipments/Drawworks/Drawworks_Solver.f90
  88. +1
    -1
      Equipments/Drawworks/Drawworks_Solver_OffMode.f90
  89. +4
    -4
      Equipments/Drawworks/Drawworks_StartUp.f90
  90. +3
    -3
      Equipments/DrillingConsole_ScrLEDs.f90
  91. +1
    -1
      Equipments/MudSystem/Circulation_Code_Select.f90
  92. +5
    -5
      Equipments/MudSystem/Deallocate_Normal_Circulation.f90
  93. +3
    -3
      Equipments/MudSystem/Disconnecting_Pipe.f90
  94. +5
    -5
      Equipments/MudSystem/Elements_Creation.f90
  95. +3
    -3
      Equipments/MudSystem/FillingWell_By_BellNipple.f90
  96. +6
    -6
      Equipments/MudSystem/Kick_Expansion_and_Contraction.f90
  97. +5
    -5
      Equipments/MudSystem/Kick_Influx.f90
  98. +3
    -3
      Equipments/MudSystem/Kick_Migration.f90
  99. +27
    -27
      Equipments/MudSystem/MudSystem.f90
  100. +21
    -21
      Equipments/MudSystem/MudSystemStartup.f90

+ 44
- 55
CSharp/BasicInputs/Bha/CStringConfiguration.f90 View File

@@ -1,64 +1,53 @@
module CStringConfiguration
use CStringConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use json_module
implicit none
public
contains
integer function SetStringConfigurations(count, array, bit)
!DEC$ ATTRIBUTES DLLEXPORT::SetStringConfigurations
!DEC$ ATTRIBUTES ALIAS: 'SetStringConfigurations' :: SetStringConfigurations
use CManifolds
implicit none
integer, intent(in) :: count
integer :: i, j
type(CStringItem), intent(inout), target :: array(count)
type(CBitInfo), intent(inout) :: bit
type(CStringItem), pointer :: item
data%Configuration%StringConfiguration%BitDefinition%BitType = bit%BitType
data%Configuration%StringConfiguration%BitDefinition%BitSize = bit%BitSize
data%Configuration%StringConfiguration%BitDefinition%BitCodeHundreds = bit%BitCodeHundreds
data%Configuration%StringConfiguration%BitDefinition%BitCodeTens = bit%BitCodeTens
data%Configuration%StringConfiguration%BitDefinition%BitCodeOnes = bit%BitCodeOnes
data%Configuration%StringConfiguration%BitDefinition%BitNozzleSize = bit%BitNozzleSize
data%Configuration%StringConfiguration%BitDefinition%BitLength = bit%BitLength
data%Configuration%StringConfiguration%BitDefinition%BitWeightPerLength = bit%BitWeightPerLength
data%Configuration%StringConfiguration%BitDefinition%BitNozzleNo = bit%BitNozzleNo
data%Configuration%StringConfiguration%BitDefinition%FloatValve = bit%FloatValve
data%Configuration%StringConfiguration%StringConfigurationCount = count
if(data%Configuration%StringConfiguration%BitDefinition%FloatValve) then
call InstallFloatValve()
else
call RemoveFloatValve()
endif
if(size(data%Configuration%StringConfiguration%StringConfigurations) > 0) then
deallocate(data%Configuration%StringConfiguration%StringConfigurations)
end if
if(count > 0) then
allocate(data%Configuration%StringConfiguration%StringConfigurations(count))
!j = count
do i = 1, count
item => array(i)
data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentType = item%ComponentType
data%Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint = item%NumberOfJoint
data%Configuration%StringConfiguration%StringConfigurations(i)%LengthPerJoint = item%LengthPerJoint
data%Configuration%StringConfiguration%StringConfigurations(i)%NominalOd = item%NominalOd
data%Configuration%StringConfiguration%StringConfigurations(i)%NominalId = item%NominalId
data%Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength = item%WeightPerLength
data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength = item%ComponentLength
data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd = item%NominalToolJointOd
data%Configuration%StringConfiguration%StringConfigurations(i)%Grade = item%Grade
!print*, 'type=', StringConfigurations(i)%ComponentType
!print*, 'NumberOfJoint=', StringConfigurations(i)%NumberOfJoint
!print*, '-----------------------------------------------------------'
!j = j - 1
end do
end if
SetStringConfigurations = 0
end function SetStringConfigurations
subroutine StringConfigurationToJson(parent)

type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: pitems,pitem,pbit,p
integer:: i
! 1. create new node
call json%create_object(p,'StringConfiguration')
call json%create_array(pitems,'StringConfigurationItems')

! 2. add member of data type to new node
do i=1,data%Configuration%StringConfiguration%StringConfigurationCount
call json%create_object(pitem,'StringConfigurationItem')
call json%add(pitem,"ComponentLength",data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength)
call json%add(pitem,"ComponentType",data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentType)
call json%add(pitem,"Grade",data%Configuration%StringConfiguration%StringConfigurations(i)%Grade)
call json%add(pitem,"LengthPerJoint",data%Configuration%StringConfiguration%StringConfigurations(i)%LengthPerJoint)
call json%add(pitem,"NominalId",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalId)
call json%add(pitem,"NominalOd",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalOd)
call json%add(pitem,"NominalToolJointOd",data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd)
call json%add(pitem,"NumberOfJoint",data%Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint)
call json%add(pitem,"WeightPerLength",data%Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength)
call json%add(pitems,pitem)
end do
call json%create_object(pbit,"BitDefenition")
call json%add(pbit,"BitCodeHundreds",data%Configuration%StringConfiguration%BitDefinition%BitCodeHundreds)
call json%add(pbit,"BitCodeOnes",data%Configuration%StringConfiguration%BitDefinition%BitCodeOnes)
call json%add(pbit,"BitCodeTens",data%Configuration%StringConfiguration%BitDefinition%BitCodeTens)
call json%add(pbit,"BitLength",data%Configuration%StringConfiguration%BitDefinition%BitLength)
call json%add(pbit,"BitNozzleNo",data%Configuration%StringConfiguration%BitDefinition%BitNozzleNo)
call json%add(pbit,"BitNozzleSize",data%Configuration%StringConfiguration%BitDefinition%BitNozzleSize)
call json%add(pbit,"BitSize",data%Configuration%StringConfiguration%BitDefinition%BitSize)
call json%add(pbit,"BitType",data%Configuration%StringConfiguration%BitDefinition%BitType)
call json%add(pbit,"BitWeightPerLength",data%Configuration%StringConfiguration%BitDefinition%BitWeightPerLength)
call json%add(pbit,"FloatValve",data%Configuration%StringConfiguration%BitDefinition%FloatValve)

! call json%add(p,"StringConfigurationCount",dat%Configuration%StringConfiguration%StringConfigurationCount)
! 3. add new node to parent
call json%add(p,pitems)
call json%add(p,pbit)
call json%add(parent,p)
end subroutine
end module CStringConfiguration

+ 29
- 33
CSharp/BasicInputs/Geology/CFormation.f90 View File

@@ -1,37 +1,33 @@
module CFormation
use CFormationVariables
use ConfigurationVariables
implicit none
public
contains
integer function SetFormations(count, array)
!DEC$ ATTRIBUTES DLLEXPORT::SetFormations
!DEC$ ATTRIBUTES ALIAS: 'SetFormations' :: SetFormations
implicit none
integer, intent(in) :: count
use SimulationVariables
use json_module
implicit none

contains

subroutine FormationToJson(parent)

type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pform
integer :: i
type(CFormationItem), intent(inout), target :: array(count)
type(CFormationItem), pointer :: item
data%Configuration%Formation%Count = count
if(size(data%Configuration%Formation%Formations) > 0) then
deallocate(data%Configuration%Formation%Formations)
end if
if(count > 0) then
allocate(data%Configuration%Formation%Formations(count))
do i = 1, count
item => array(i)
data%Configuration%Formation%Formations(i)%Top = item%Top
data%Configuration%Formation%Formations(i)%Thickness = item%Thickness
data%Configuration%Formation%Formations(i)%Drillablity = item%Drillablity
data%Configuration%Formation%Formations(i)%Abrasiveness = item%Abrasiveness
data%Configuration%Formation%Formations(i)%ThresholdWeight = item%ThresholdWeight
data%Configuration%Formation%Formations(i)%PorePressureGradient = item%PorePressureGradient
!print*, "==========================="
!print*, "Formations(", i, ")%Top=", Formations(i)%Top
!print*, "Formations(",i,")%Thickness", Formations(i)%Thickness
!print*, "Formations(",i,")%Drillablity", Formations(i)%Drillablity
end do
end if
SetFormations = 0
end function SetFormations

! 1. create new node
call json%create_array(p,'Fromations')

do i=1,data%Configuration%Formation%Count
call json%create_object(pform,'')
call json%add(pform,"Abrasiveness",data%Configuration%Formation%Formations(i)%Abrasiveness)
call json%add(pform,"Drillablity",data%Configuration%Formation%Formations(i)%Drillablity)
call json%add(pform,"PorePressureGradient",data%Configuration%Formation%Formations(i)%PorePressureGradient)
call json%add(pform,"Thickness",data%Configuration%Formation%Formations(i)%Thickness)
call json%add(pform,"ThresholdWeight",data%Configuration%Formation%Formations(i)%ThresholdWeight)
call json%add(pform,"Top",data%Configuration%Formation%Formations(i)%Top)
call json%add(p,pform)
end do

call json%add(parent,p)
end subroutine
end module CFormation

+ 29
- 107
CSharp/BasicInputs/Geology/CReservoir.f90 View File

@@ -1,114 +1,36 @@
module CReservoir
use CReservoirVariables
implicit none
public
use SimulationVariables
use json_module
implicit none

contains
subroutine SetReservoirFormationNo(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetReservoirFormationNo
!DEC$ ATTRIBUTES ALIAS: 'SetReservoirFormationNo' :: SetReservoirFormationNo
implicit none
integer, intent(in) :: v
Reservoir%FormationNo = v
end subroutine
subroutine ReservoirToJson(parent)

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

! 1. create new node
call json%create_object(p,'Reservoir')
subroutine SetFormationTop(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetFormationTop
!DEC$ ATTRIBUTES ALIAS: 'SetFormationTop' :: SetFormationTop
implicit none
real*8, intent(in) :: v
Reservoir%FormationTop = v
end subroutine
subroutine SetPressureGradient(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetPressureGradient
!DEC$ ATTRIBUTES ALIAS: 'SetPressureGradient' :: SetPressureGradient
implicit none
real*8, intent(in) :: v
Reservoir%PressureGradient = v
end subroutine
subroutine SetFormationPermeability(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetFormationPermeability
!DEC$ ATTRIBUTES ALIAS: 'SetFormationPermeability' :: SetFormationPermeability
implicit none
real*8, intent(in) :: v
Reservoir%FormationPermeability = v
end subroutine
subroutine SetGeothermalGradient(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetGeothermalGradient
!DEC$ ATTRIBUTES ALIAS: 'SetGeothermalGradient' :: SetGeothermalGradient
implicit none
real*8, intent(in) :: v
Reservoir%GeothermalGradient = v
end subroutine
subroutine SetFluidType(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetFluidType
!DEC$ ATTRIBUTES ALIAS: 'SetFluidType' :: SetFluidType
implicit none
integer, intent(in) :: v
Reservoir%FluidType = v
end subroutine
subroutine SetFluidGradient(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetFluidGradient
!DEC$ ATTRIBUTES ALIAS: 'SetFluidGradient' :: SetFluidGradient
implicit none
real*8, intent(in) :: v
Reservoir%FluidGradient = v
end subroutine
subroutine SetFluidViscosity(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetFluidViscosity
!DEC$ ATTRIBUTES ALIAS: 'SetFluidViscosity' :: SetFluidViscosity
implicit none
real*8, intent(in) :: v
Reservoir%FluidViscosity = v
end subroutine
subroutine SetInactiveInflux(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetInactiveInflux
!DEC$ ATTRIBUTES ALIAS: 'SetInactiveInflux' :: SetInactiveInflux
implicit none
logical, intent(in) :: v
Reservoir%InactiveInflux = v
end subroutine
subroutine SetMakeKickSinglePacket(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetMakeKickSinglePacket
!DEC$ ATTRIBUTES ALIAS: 'SetMakeKickSinglePacket' :: SetMakeKickSinglePacket
implicit none
logical, intent(in) :: v
Reservoir%MakeKickSinglePacket = v
#ifdef deb
print*, 'MakeKickSinglePacket=', Reservoir%MakeKickSinglePacket
#endif
end subroutine
subroutine SetIsAutoMigrationRateSelected(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetIsAutoMigrationRateSelected
!DEC$ ATTRIBUTES ALIAS: 'SetIsAutoMigrationRateSelected' :: SetIsAutoMigrationRateSelected
implicit none
logical, intent(in) :: v
Reservoir%IsAutoMigrationRateSelected = v
#ifdef deb
print*, 'IsAutoMigrationRateSelected=', Reservoir%IsAutoMigrationRateSelected
#endif
end subroutine
! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
call json%add(p,"AutoMigrationRate",data%Configuration%Reservoir%AutoMigrationRate)
call json%add(p,"FluidGradient",data%Configuration%Reservoir%FluidGradient)
call json%add(p,"FluidType",data%Configuration%Reservoir%FluidType)
call json%add(p,"FluidViscosity",data%Configuration%Reservoir%FluidViscosity)
call json%add(p,"FormationNo",data%Configuration%Reservoir%FormationNo)
call json%add(p,"FormationPermeability",data%Configuration%Reservoir%FormationPermeability)
call json%add(p,"FormationTop",data%Configuration%Reservoir%FormationTop)
call json%add(p,"GeothermalGradient",data%Configuration%Reservoir%GeothermalGradient)
call json%add(p,"InactiveInflux",data%Configuration%Reservoir%InactiveInflux)
call json%add(p,"IsAutoMigrationRateSelected",data%Configuration%Reservoir%IsAutoMigrationRateSelected)
call json%add(p,"MakeKickSinglePacket",data%Configuration%Reservoir%MakeKickSinglePacket)
call json%add(p,"PressureGradient",data%Configuration%Reservoir%PressureGradient)

subroutine SetAutoMigrationRate(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetAutoMigrationRate
!DEC$ ATTRIBUTES ALIAS: 'SetAutoMigrationRate' :: SetAutoMigrationRate
implicit none
real*8, intent(in) :: v
Reservoir%AutoMigrationRate = v
#ifdef deb
print*, 'AutoMigrationRate=', Reservoir%AutoMigrationRate
#endif
! 3. add new node to parent
call json%add(parent,p)
end subroutine
end module CReservoir

+ 24
- 49
CSharp/BasicInputs/Geology/CShoe.f90 View File

@@ -1,55 +1,30 @@
module CShoe
use CShoeVariables
use SimulationVariables
use json_module

implicit none
public
contains
subroutine SetShoeFormationNo(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetShoeFormationNo
!DEC$ ATTRIBUTES ALIAS: 'SetShoeFormationNo' :: SetShoeFormationNo
implicit none
integer, intent(in) :: v
Shoe%FormationNo = v
end subroutine
contains

subroutine ShoeToJson(parent)

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

! 1. create new node
call json%create_object(p,'Shoe')
subroutine SetShoeDepth(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetShoeDepth
!DEC$ ATTRIBUTES ALIAS: 'SetShoeDepth' :: SetShoeDepth
implicit none
real*8, intent(in) :: v
Shoe%ShoeDepth = v
end subroutine
subroutine SetLeakOff(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLeakOff
!DEC$ ATTRIBUTES ALIAS: 'SetLeakOff' :: SetLeakOff
implicit none
real*8, intent(in) :: v
Shoe%LeakOff = v
end subroutine
subroutine SetBreakdown(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetBreakdown
!DEC$ ATTRIBUTES ALIAS: 'SetBreakdown' :: SetBreakdown
implicit none
real*8, intent(in) :: v
Shoe%Breakdown = v
end subroutine
subroutine SetFracturePropagation(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetFracturePropagation
!DEC$ ATTRIBUTES ALIAS: 'SetFracturePropagation' :: SetFracturePropagation
implicit none
real*8, intent(in) :: v
Shoe%FracturePropagation = v
end subroutine
subroutine SetInactiveFracture(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetInactiveFracture
!DEC$ ATTRIBUTES ALIAS: 'SetInactiveFracture' :: SetInactiveFracture
implicit none
logical, intent(in) :: v
Shoe%InactiveFracture = v
! 2. add member of data type to new node
call json%add(p,"Breakdown",data%Configuration%Shoe%Breakdown)
call json%add(p,"FormationNo",data%Configuration%Shoe%FormationNo)
call json%add(p,"FracturePropagation",data%Configuration%Shoe%FracturePropagation)
call json%add(p,"InactiveFracture",data%Configuration%Shoe%InactiveFracture)
call json%add(p,"LeakOff",data%Configuration%Shoe%LeakOff)
call json%add(p,"ShoeDepth",data%Configuration%Shoe%ShoeDepth)

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

end module CShoe

+ 23
- 87
CSharp/BasicInputs/RigSpecifications/CAccumulator.f90 View File

@@ -1,95 +1,31 @@
module CAccumulator
use CAccumulatorVariables
use SimulationVariables
! use CAccumulatorVariables
use json_module
implicit none
public
contains
subroutine SetNumberOfBottels(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetNumberOfBottels
!DEC$ ATTRIBUTES ALIAS: 'SetNumberOfBottels' :: SetNumberOfBottels
implicit none
integer, intent(in) :: v
Accumulator%NumberOfBottels = v
end subroutine
subroutine SetAccumulatorSystemSize(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetAccumulatorSystemSize
!DEC$ ATTRIBUTES ALIAS: 'SetAccumulatorSystemSize' :: SetAccumulatorSystemSize
implicit none
real*8, intent(in) :: v
Accumulator%AccumulatorSystemSize = v
end subroutine
subroutine SetOilTankVolume(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetOilTankVolume
!DEC$ ATTRIBUTES ALIAS: 'SetOilTankVolume' :: SetOilTankVolume
implicit none
real*8, intent(in) :: v
Accumulator%OilTankVolume = v
end subroutine
subroutine SetPrechargePressure(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetPrechargePressure
!DEC$ ATTRIBUTES ALIAS: 'SetPrechargePressure' :: SetPrechargePressure
implicit none
real*8, intent(in) :: v
Accumulator%PrechargePressure = v
end subroutine
subroutine SetAccumulatorMinimumOperatingPressure(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetAccumulatorMinimumOperatingPressure
!DEC$ ATTRIBUTES ALIAS: 'SetAccumulatorMinimumOperatingPressure' :: SetAccumulatorMinimumOperatingPressure
implicit none
real*8, intent(in) :: v
Accumulator%AccumulatorMinimumOperatingPressure = v
end subroutine
subroutine SetElectricPumpOutput(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetElectricPumpOutput
!DEC$ ATTRIBUTES ALIAS: 'SetElectricPumpOutput' :: SetElectricPumpOutput
implicit none
real*8, intent(in) :: v
Accumulator%ElectricPumpOutput = v
end subroutine
subroutine SetStartPressure(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetStartPressure
!DEC$ ATTRIBUTES ALIAS: 'SetStartPressure' :: SetStartPressure
implicit none
real*8, intent(in) :: v
Accumulator%StartPressure = v
end subroutine
subroutine SetStopPressure(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetStopPressure
!DEC$ ATTRIBUTES ALIAS: 'SetStopPressure' :: SetStopPressure
implicit none
real*8, intent(in) :: v
Accumulator%StopPressure = v
end subroutine
subroutine SetAirPlungerPumpOutput(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetAirPlungerPumpOutput
!DEC$ ATTRIBUTES ALIAS: 'SetAirPlungerPumpOutput' :: SetAirPlungerPumpOutput
implicit none
real*8, intent(in) :: v
Accumulator%AirPlungerPumpOutput = v
end subroutine
subroutine SetStartPressure2(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetStartPressure2
!DEC$ ATTRIBUTES ALIAS: 'SetStartPressure2' :: SetStartPressure2
implicit none
real*8, intent(in) :: v
Accumulator%StartPressure2 = v
end subroutine
subroutine SetStopPressure2(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetStopPressure2
!DEC$ ATTRIBUTES ALIAS: 'SetStopPressure2' :: SetStopPressure2
implicit none
real*8, intent(in) :: v
Accumulator%StopPressure2 = v
subroutine AccumulatorToJson(parent)
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p

call json%create_object(p,'Accumulator')
call json%add(p,'AccumulatorMinimumOperatingPressure',data%Configuration%Accumulator%AccumulatorMinimumOperatingPressure)
call json%add(p,'AccumulatorSystemSize',data%Configuration%Accumulator%AccumulatorSystemSize)
call json%add(p,'AirPlungerPumpOutput',data%Configuration%Accumulator%AirPlungerPumpOutput)
call json%add(p,'ElectricPumpOutput',data%Configuration%Accumulator%ElectricPumpOutput)
call json%add(p,'NumberOfBottels',data%Configuration%Accumulator%NumberOfBottels)
call json%add(p,'OilTankVolume',data%Configuration%Accumulator%OilTankVolume)
call json%add(p,'PrechargePressure',data%Configuration%Accumulator%PrechargePressure)
call json%add(p,'StartPressure',data%Configuration%Accumulator%StartPressure)
call json%add(p,'StartPressure2',data%Configuration%Accumulator%StartPressure2)
call json%add(p,'StopPressure',data%Configuration%Accumulator%StopPressure)
call json%add(p,'StopPressure2',data%Configuration%Accumulator%StopPressure2)

call json%add(parent,p)
end subroutine
end module CAccumulator

+ 1
- 1
CSharp/BasicInputs/RigSpecifications/CAccumulatorVariables.f90 View File

@@ -14,5 +14,5 @@ module CAccumulatorVariables
real(8) :: StartPressure2
real(8) :: StopPressure2
End Type AccumulatorType
Type(AccumulatorType)::Accumulator
! Type(AccumulatorType)::Accumulator
end module CAccumulatorVariables

+ 40
- 196
CSharp/BasicInputs/RigSpecifications/CBopStack.f90 View File

@@ -1,201 +1,45 @@
module CBopStack
use CBopStackVariables
use CLog4
use SimulationVariables
use json_module
implicit none
public
contains
subroutine SetAboveAnnularHeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetAboveAnnularHeight
!DEC$ ATTRIBUTES ALIAS: 'SetAboveAnnularHeight' :: SetAboveAnnularHeight
implicit none
real*8, intent(in) :: v
!AboveAnnularHeight = v
!call Log_4('AboveAnnularHeight=', AboveAnnularHeight)
end subroutine
subroutine SetAnnularPreventerHeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetAnnularPreventerHeight
!DEC$ ATTRIBUTES ALIAS: 'SetAnnularPreventerHeight' :: SetAnnularPreventerHeight
implicit none
real*8, intent(in) :: v
!AnnularPreventerHeight = v
!call Log_4('AnnularPreventerHeight=', AnnularPreventerHeight)
end subroutine
subroutine SetUpperRamHeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetUpperRamHeight
!DEC$ ATTRIBUTES ALIAS: 'SetUpperRamHeight' :: SetUpperRamHeight
implicit none
real*8, intent(in) :: v
!UpperRamHeight = v
!call Log_4('UpperRamHeight=', UpperRamHeight)
end subroutine
subroutine SetLowerRamHeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLowerRamHeight
!DEC$ ATTRIBUTES ALIAS: 'SetLowerRamHeight' :: SetLowerRamHeight
implicit none
real*8, intent(in) :: v
!LowerRamHeight = v
!call Log_4('LowerRamHeight=', LowerRamHeight)
end subroutine
subroutine SetBlindRamHeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetBlindRamHeight
!DEC$ ATTRIBUTES ALIAS: 'SetBlindRamHeight' :: SetBlindRamHeight
implicit none
real*8, intent(in) :: v
!BlindRamHeight = v
!call Log_4('BlindRamHeight=', BlindRamHeight)
end subroutine
subroutine SetKillHeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetKillHeight
!DEC$ ATTRIBUTES ALIAS: 'SetKillHeight' :: SetKillHeight
implicit none
real*8, intent(in) :: v
!KillHeight = v
!call Log_4('KillHeight=', KillHeight)
end subroutine
subroutine SetKillOpen(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetKillOpen
!DEC$ ATTRIBUTES ALIAS: 'SetKillOpen' :: SetKillOpen
implicit none
real*8, intent(in) :: v
!KillOpen = v
!call Log_4('KillOpen=', KillOpen)
end subroutine
subroutine SetKillClose(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetKillClose
!DEC$ ATTRIBUTES ALIAS: 'SetKillClose' :: SetKillClose
implicit none
real*8, intent(in) :: v
!KillClose = v
!call Log_4('KillClose=', KillClose)
end subroutine
subroutine SetGroundLevel(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetGroundLevel
!DEC$ ATTRIBUTES ALIAS: 'SetGroundLevel' :: SetGroundLevel
implicit none
real*8, intent(in) :: v
!GroundLevel = v
!call Log_4('GroundLevel=', GroundLevel)
end subroutine
subroutine SetLowerRamOpen(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLowerRamOpen
!DEC$ ATTRIBUTES ALIAS: 'SetLowerRamOpen' :: SetLowerRamOpen
implicit none
real*8, intent(in) :: v
BopStackSpecification%LowerRamOpen = v
end subroutine
subroutine SetLowerRamClose(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLowerRamClose
!DEC$ ATTRIBUTES ALIAS: 'SetLowerRamClose' :: SetLowerRamClose
implicit none
real*8, intent(in) :: v
BopStackSpecification%LowerRamClose = v
end subroutine
subroutine SetChokeOpen(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeOpen
!DEC$ ATTRIBUTES ALIAS: 'SetChokeOpen' :: SetChokeOpen
implicit none
real*8, intent(in) :: v
BopStackSpecification%ChokeOpen = v
end subroutine
subroutine SetChokeClose(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeClose
!DEC$ ATTRIBUTES ALIAS: 'SetChokeClose' :: SetChokeClose
implicit none
real*8, intent(in) :: v
BopStackSpecification%ChokeClose = v
end subroutine
subroutine SetBlindRamOpen(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetBlindRamOpen
!DEC$ ATTRIBUTES ALIAS: 'SetBlindRamOpen' :: SetBlindRamOpen
implicit none
real*8, intent(in) :: v
BopStackSpecification%BlindRamOpen = v
end subroutine
subroutine SetBlindRamClose(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetBlindRamClose
!DEC$ ATTRIBUTES ALIAS: 'SetBlindRamClose' :: SetBlindRamClose
implicit none
real*8, intent(in) :: v
BopStackSpecification%BlindRamClose = v
end subroutine
subroutine SetUpperRamOpen(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetUpperRamOpen
!DEC$ ATTRIBUTES ALIAS: 'SetUpperRamOpen' :: SetUpperRamOpen
implicit none
real*8, intent(in) :: v
BopStackSpecification%UpperRamOpen = v
end subroutine
subroutine SetUpperRamClose(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetUpperRamClose
!DEC$ ATTRIBUTES ALIAS: 'SetUpperRamClose' :: SetUpperRamClose
implicit none
real*8, intent(in) :: v
BopStackSpecification%UpperRamClose = v
end subroutine
subroutine SetAnnularPreventerOpen(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetAnnularPreventerOpen
!DEC$ ATTRIBUTES ALIAS: 'SetAnnularPreventerOpen' :: SetAnnularPreventerOpen
implicit none
real*8, intent(in) :: v
BopStackSpecification%AnnularPreventerOpen = v
end subroutine
subroutine SetAnnularPreventerClose(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetAnnularPreventerClose
!DEC$ ATTRIBUTES ALIAS: 'SetAnnularPreventerClose' :: SetAnnularPreventerClose
implicit none
real*8, intent(in) :: v
BopStackSpecification%AnnularPreventerClose = v
end subroutine
subroutine SetRamStringDrag(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetRamStringDrag
!DEC$ ATTRIBUTES ALIAS: 'SetRamStringDrag' :: SetRamStringDrag
implicit none
real*8, intent(in) :: v
BopStackSpecification%RamStringDrag = v
end subroutine
subroutine SetAnnularStringDrag(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetAnnularStringDrag
!DEC$ ATTRIBUTES ALIAS: 'SetAnnularStringDrag' :: SetAnnularStringDrag
implicit none
real*8, intent(in) :: v
BopStackSpecification%AnnularStringDrag = v
end subroutine
subroutine SetChokeLineLength(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeLineLength
!DEC$ ATTRIBUTES ALIAS: 'SetChokeLineLength' :: SetChokeLineLength
implicit none
real*8, intent(in) :: v
BopStackSpecification%ChokeLineLength = v
end subroutine
subroutine SetChokeLineId(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeLineId
!DEC$ ATTRIBUTES ALIAS: 'SetChokeLineId' :: SetChokeLineId
implicit none
real*8, intent(in) :: v
BopStackSpecification%ChokeLineId = v
end subroutine

subroutine BopStackToJson(parent)

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

! 1. create new node
call json%create_object(p,'BopStack')
! 2. add member of data type to new node
call json%add(p,"AboveAnnularHeight",data%Configuration%BopStack%AboveAnnularHeight)
call json%add(p,"AnnularPreventerClose",data%Configuration%BopStack%AnnularPreventerClose)
call json%add(p,"AnnularPreventerHeight",data%Configuration%BopStack%AnnularPreventerHeight)
call json%add(p,"AnnularPreventerOpen",data%Configuration%BopStack%AnnularPreventerOpen)
call json%add(p,"AnnularStringDrag",data%Configuration%BopStack%AnnularStringDrag)
call json%add(p,"BlindRamClose",data%Configuration%BopStack%BlindRamClose)
call json%add(p,"BlindRamHeight",data%Configuration%BopStack%BlindRamHeight)
call json%add(p,"BlindRamOpen",data%Configuration%BopStack%BlindRamOpen)
call json%add(p,"ChokeClose",data%Configuration%BopStack%ChokeClose)
call json%add(p,"ChokeLineId",data%Configuration%BopStack%ChokeLineId)
call json%add(p,"ChokeLineLength",data%Configuration%BopStack%ChokeLineLength)
call json%add(p,"ChokeOpen",data%Configuration%BopStack%ChokeOpen)
call json%add(p,"GroundLevel",data%Configuration%BopStack%GroundLevel)
call json%add(p,"KillClose",data%Configuration%BopStack%KillClose)
call json%add(p,"KillHeight",data%Configuration%BopStack%KillHeight)
call json%add(p,"KillOpen",data%Configuration%BopStack%KillOpen)
call json%add(p,"LowerRamClose",data%Configuration%BopStack%LowerRamClose)
call json%add(p,"LowerRamHeight",data%Configuration%BopStack%LowerRamHeight)
call json%add(p,"LowerRamOpen",data%Configuration%BopStack%LowerRamOpen)
call json%add(p,"RamStringDrag",data%Configuration%BopStack%RamStringDrag)
call json%add(p,"UpperRamClose",data%Configuration%BopStack%UpperRamClose)
call json%add(p,"UpperRamHeight",data%Configuration%BopStack%UpperRamHeight)
call json%add(p,"UpperRamOpen",data%Configuration%BopStack%UpperRamOpen)
! 3. add new node to parent
call json%add(parent,p)
end subroutine

end module CBopStack

+ 0
- 1
CSharp/BasicInputs/RigSpecifications/CBopStackVariables.f90 View File

@@ -27,5 +27,4 @@ module CBopStackVariables
real(8) :: ChokeLineId
End Type BopStackSpecificationType
Type(BopStackSpecificationType)::BopStackSpecification
end module CBopStackVariables

+ 25
- 3
CSharp/BasicInputs/RigSpecifications/CHoisting.f90 View File

@@ -1,8 +1,30 @@
module CHoisting
use CHoistingVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use json_module
implicit none
public
contains

subroutine HoistingToJson(parent)

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

! 1. create new node
call json%create_object(p,'Hoisting')
! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
call json%add(p,"DrillingLineBreakingLoadAbrasiveness",data%Configuration%Hoisting%DrillingLineBreakingLoad)
call json%add(p,"DriveTypeAbrasiveness",data%Configuration%Hoisting%DriveType)
call json%add(p,"KellyWeightAbrasiveness",data%Configuration%Hoisting%KellyWeight)
call json%add(p,"NumberOfLineAbrasiveness",data%Configuration%Hoisting%NumberOfLine)
call json%add(p,"TopDriveWeightAbrasiveness",data%Configuration%Hoisting%TopDriveWeight)
call json%add(p,"TravelingBlockWeightAbrasiveness",data%Configuration%Hoisting%TravelingBlockWeight)
! 3. add new node to parent
call json%add(parent,p)
end subroutine

end module CHoisting

+ 25
- 63
CSharp/BasicInputs/RigSpecifications/CPower.f90 View File

@@ -1,71 +1,33 @@
module CPower
use CPowerVariables
use SimulationVariables
use json_module
implicit none
public
contains
subroutine SetNumberOfgenerators(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetNumberOfgenerators
!DEC$ ATTRIBUTES ALIAS: 'SetNumberOfgenerators' :: SetNumberOfgenerators
implicit none
integer, intent(in) :: v
Power%NumberOfgenerators = v
end subroutine
subroutine SetGeneratorPowerRating(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetGeneratorPowerRating
!DEC$ ATTRIBUTES ALIAS: 'SetGeneratorPowerRating' :: SetGeneratorPowerRating
implicit none
real*8, intent(in) :: v
Power%GeneratorPowerRating = v
end subroutine
subroutine SetMudPump1(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump1
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump1' :: SetMudPump1
implicit none
real*8, intent(in) :: v
Power%MudPump1 = v
end subroutine
subroutine SetMudPump2(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump2
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump2' :: SetMudPump2
implicit none
real*8, intent(in) :: v
Power%MudPump2 = v
end subroutine
subroutine SetCementPump(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementPump
!DEC$ ATTRIBUTES ALIAS: 'SetCementPump' :: SetCementPump
implicit none
real*8, intent(in) :: v
Power%CementPump = v
end subroutine
subroutine SetRotaryTable(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetRotaryTable
!DEC$ ATTRIBUTES ALIAS: 'SetRotaryTable' :: SetRotaryTable
implicit none
real*8, intent(in) :: v
Power%RotaryTable = v
end subroutine
subroutine SetDrawworks(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetDrawworks
!DEC$ ATTRIBUTES ALIAS: 'SetDrawworks' :: SetDrawworks
implicit none
real*8, intent(in) :: v
Power%Drawworks = v
end subroutine
subroutine PowerToJson(parent)

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

! 1. create new node
call json%create_object(p,'Power')
subroutine SetTopDrive(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetTopDrive
!DEC$ ATTRIBUTES ALIAS: 'SetTopDrive' :: SetTopDrive
implicit none
real*8, intent(in) :: v
Power%TopDrive = v
end subroutine
! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
call json%add(p,"CementPump",data%Configuration%Power%CementPump)
call json%add(p,"Drawworks",data%Configuration%Power%Drawworks)
call json%add(p,"GeneratorPowerRating",data%Configuration%Power%GeneratorPowerRating)
call json%add(p,"MudPump1",data%Configuration%Power%MudPump1)
call json%add(p,"MudPump2",data%Configuration%Power%MudPump2)
call json%add(p,"NumberOfgenerators",data%Configuration%Power%NumberOfgenerators)
call json%add(p,"RotaryTable",data%Configuration%Power%RotaryTable)
call json%add(p,"TopDrive",data%Configuration%Power%TopDrive)
! 3. add new node to parent
call json%add(parent,p)
end subroutine

end module CPower

+ 1
- 1
CSharp/BasicInputs/RigSpecifications/CPowerVariables.f90 View File

@@ -12,5 +12,5 @@ module CPowerVariables
real(8) :: Drawworks
real(8) :: TopDrive
End type PowerType
Type(PowerType)::Power
! Type(PowerType)::Power
end module CPowerVariables

+ 155
- 106
CSharp/BasicInputs/RigSpecifications/CPumps.f90 View File

@@ -1,12 +1,61 @@
module CPumps
use CPumpsVariables
! use CPumps
use CManifolds
use CLog4
use SimulationVariables
use json_module
implicit none
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 OpenPump1()
use CManifolds
implicit none
@@ -44,107 +93,107 @@ module CPumps
call ChangeValve(18, .false.)
end subroutine

subroutine SetMudPump1LinerDiameterN(a)
implicit none
real(8) :: a
if(associated(MudPump1LinerDiameterPtr)) call MudPump1LinerDiameterPtr(a)
end subroutine
subroutine SetMudPump2LinerDiameterN(a)
implicit none
real(8) :: a
if(associated(MudPump2LinerDiameterPtr)) call MudPump2LinerDiameterPtr(a)
end subroutine
subroutine SetMudPump3LinerDiameterN(a)
implicit none
real(8) :: a
if(associated(MudPump3LinerDiameterPtr)) call MudPump3LinerDiameterPtr(a)
end subroutine
subroutine SetMudPump1OutputBblStrokeN(a)
implicit none
real(8) :: a
if(associated(MudPump1OutputBblStrokePtr)) call MudPump1OutputBblStrokePtr(a)
end subroutine
subroutine SetMudPump2OutputBblStrokeN(a)
implicit none
real(8) :: a
if(associated(MudPump2OutputBblStrokePtr)) call MudPump2OutputBblStrokePtr(a)
end subroutine
subroutine SetMudPump3OutputBblStrokeN(a)
implicit none
real(8) :: a
if(associated(MudPump3OutputBblStrokePtr)) call MudPump3OutputBblStrokePtr(a)
end subroutine
subroutine CalcMudPump1LinerDiameter()
use, intrinsic :: IEEE_ARITHMETIC
implicit none
real(8) :: a
a = (MathPI / 4.d0) * PumpsSpecification%MudPump1Stroke * 3.0d0 * PumpsSpecification%MudPump1VolumetricEfficiency / 9702.03d0
a = dsqrt(PumpsSpecification%MudPump1OutputBblStroke / a)
if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then
PumpsSpecification%MudPump1LinerDiameter = 0.0
else
PumpsSpecification%MudPump1LinerDiameter = a
endif
call SetMudPump1LinerDiameterN(PumpsSpecification%MudPump1LinerDiameter)
end subroutine
subroutine CalcMudPump2LinerDiameter()
use, intrinsic :: IEEE_ARITHMETIC
implicit none
real(8) :: a
a = (MathPI / 4.d0) * PumpsSpecification%MudPump2Stroke * 3.0d0 * PumpsSpecification%MudPump2VolumetricEfficiency / 9702.03d0
a = dsqrt(PumpsSpecification%MudPump2OutputBblStroke / a)
if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then
PumpsSpecification%MudPump2LinerDiameter = 0.0
else
PumpsSpecification%MudPump2LinerDiameter = a
endif
call SetMudPump2LinerDiameterN(PumpsSpecification%MudPump2LinerDiameter)
end subroutine
subroutine CalcMudPump3LinerDiameter()
use, intrinsic :: IEEE_ARITHMETIC
implicit none
real(8) :: a
a = (MathPI / 4.d0) * PumpsSpecification%CementPumpStroke * 3.0d0 * PumpsSpecification%CementPumpVolumetricEfficiency / 9702.03d0
a = dsqrt(PumpsSpecification%CementPumpOutputBblStroke / a)
if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then
PumpsSpecification%CementPumpLinerDiameter = 0.0
else
PumpsSpecification%CementPumpLinerDiameter = a
endif
call SetMudPump3LinerDiameterN(PumpsSpecification%CementPumpLinerDiameter)
end subroutine
subroutine CalcPump1OutputBblStroke()
implicit none
PumpsSpecification%MudPump1OutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%MudPump1LinerDiameter**2) * PumpsSpecification%MudPump1Stroke * 3.0d0 * PumpsSpecification%MudPump1VolumetricEfficiency / 9702.03d0
call SetMudPump1OutputBblStrokeN(PumpsSpecification%MudPump1OutputBblStroke)
end subroutine
subroutine CalcPump2OutputBblStroke()
implicit none
PumpsSpecification%MudPump2OutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%MudPump2LinerDiameter**2) * PumpsSpecification%MudPump2Stroke * 3.0d0 * PumpsSpecification%MudPump2VolumetricEfficiency / 9702.03d0
call SetMudPump2OutputBblStrokeN(PumpsSpecification%MudPump2OutputBblStroke)
end subroutine
subroutine CalcPump3OutputBblStroke()
implicit none
PumpsSpecification%CementPumpOutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%CementPumpLinerDiameter**2) * PumpsSpecification%CementPumpStroke * 3.0d0 * PumpsSpecification%CementPumpVolumetricEfficiency / 9702.03d0
call SetMudPump3OutputBblStrokeN(PumpsSpecification%CementPumpOutputBblStroke)
end subroutine
! subroutine SetMudPump1LinerDiameterN(a)
! implicit none
! real(8) :: a
! if(associated(MudPump1LinerDiameterPtr)) call MudPump1LinerDiameterPtr(a)
! end subroutine
! subroutine SetMudPump2LinerDiameterN(a)
! implicit none
! real(8) :: a
! if(associated(MudPump2LinerDiameterPtr)) call MudPump2LinerDiameterPtr(a)
! end subroutine
! subroutine SetMudPump3LinerDiameterN(a)
! implicit none
! real(8) :: a
! if(associated(MudPump3LinerDiameterPtr)) call MudPump3LinerDiameterPtr(a)
! end subroutine
! subroutine SetMudPump1OutputBblStrokeN(a)
! implicit none
! real(8) :: a
! if(associated(MudPump1OutputBblStrokePtr)) call MudPump1OutputBblStrokePtr(a)
! end subroutine
! subroutine SetMudPump2OutputBblStrokeN(a)
! implicit none
! real(8) :: a
! if(associated(MudPump2OutputBblStrokePtr)) call MudPump2OutputBblStrokePtr(a)
! end subroutine
! subroutine SetMudPump3OutputBblStrokeN(a)
! implicit none
! real(8) :: a
! if(associated(MudPump3OutputBblStrokePtr)) call MudPump3OutputBblStrokePtr(a)
! end subroutine
! subroutine CalcMudPump1LinerDiameter()
! use, intrinsic :: IEEE_ARITHMETIC
! implicit none
! real(8) :: a
! a = (MathPI / 4.d0) * data%Configuration%Pumps%MudPump1Stroke * 3.0d0 * data%Configuration%Pumps%MudPump1VolumetricEfficiency / 9702.03d0
! a = dsqrt(data%Configuration%Pumps%MudPump1OutputBblStroke / a)
! if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then
! data%Configuration%Pumps%MudPump1LinerDiameter = 0.0
! else
! data%Configuration%Pumps%MudPump1LinerDiameter = a
! endif
! call SetMudPump1LinerDiameterN(data%Configuration%Pumps%MudPump1LinerDiameter)
! end subroutine
! subroutine CalcMudPump2LinerDiameter()
! use, intrinsic :: IEEE_ARITHMETIC
! implicit none
! real(8) :: a
! a = (MathPI / 4.d0) * data%Configuration%Pumps%MudPump2Stroke * 3.0d0 * data%Configuration%Pumps%MudPump2VolumetricEfficiency / 9702.03d0
! a = dsqrt(data%Configuration%Pumps%MudPump2OutputBblStroke / a)
! if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then
! data%Configuration%Pumps%MudPump2LinerDiameter = 0.0
! else
! data%Configuration%Pumps%MudPump2LinerDiameter = a
! endif
! call SetMudPump2LinerDiameterN(data%Configuration%Pumps%MudPump2LinerDiameter)
! end subroutine
! subroutine CalcMudPump3LinerDiameter()
! use, intrinsic :: IEEE_ARITHMETIC
! implicit none
! real(8) :: a
! a = (MathPI / 4.d0) * data%Configuration%Pumps%CementPumpStroke * 3.0d0 * data%Configuration%Pumps%CementPumpVolumetricEfficiency / 9702.03d0
! a = dsqrt(data%Configuration%Pumps%CementPumpOutputBblStroke / a)
! if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then
! data%Configuration%Pumps%CementPumpLinerDiameter = 0.0
! else
! data%Configuration%Pumps%CementPumpLinerDiameter = a
! endif
! call SetMudPump3LinerDiameterN(data%Configuration%Pumps%CementPumpLinerDiameter)
! end subroutine
! subroutine CalcPump1OutputBblStroke()
! implicit none
! data%Configuration%Pumps%MudPump1OutputBblStroke = (MathPI / 4.d0) * (data%Configuration%Pumps%MudPump1LinerDiameter**2) * data%Configuration%Pumps%MudPump1Stroke * 3.0d0 * data%Configuration%Pumps%MudPump1VolumetricEfficiency / 9702.03d0
! call SetMudPump1OutputBblStrokeN(data%Configuration%Pumps%MudPump1OutputBblStroke)
! end subroutine
! subroutine CalcPump2OutputBblStroke()
! implicit none
! data%Configuration%Pumps%MudPump2OutputBblStroke = (MathPI / 4.d0) * (data%Configuration%Pumps%MudPump2LinerDiameter**2) * data%Configuration%Pumps%MudPump2Stroke * 3.0d0 * data%Configuration%Pumps%MudPump2VolumetricEfficiency / 9702.03d0
! call SetMudPump2OutputBblStrokeN(data%Configuration%Pumps%MudPump2OutputBblStroke)
! end subroutine
! subroutine CalcPump3OutputBblStroke()
! implicit none
! data%Configuration%Pumps%CementPumpOutputBblStroke = (MathPI / 4.d0) * (data%Configuration%Pumps%CementPumpLinerDiameter**2) * data%Configuration%Pumps%CementPumpStroke * 3.0d0 * data%Configuration%Pumps%CementPumpVolumetricEfficiency / 9702.03d0
! call SetMudPump3OutputBblStrokeN(data%Configuration%Pumps%CementPumpOutputBblStroke)
! end subroutine
end module CPumps

+ 7
- 7
CSharp/BasicInputs/RigSpecifications/CPumpsVariables.f90 View File

@@ -44,14 +44,14 @@ module CPumpsVariables
logical :: Valve4
logical :: Valve5
End type PumpSpecificationType
Type(PumpSpecificationType)::PumpsSpecification
! Type(PumpSpecificationType)::PumpsSpecification
procedure (ActionDouble), pointer :: MudPump1LinerDiameterPtr
procedure (ActionDouble), pointer :: MudPump2LinerDiameterPtr
procedure (ActionDouble), pointer :: MudPump3LinerDiameterPtr
procedure (ActionDouble), pointer :: MudPump1OutputBblStrokePtr
procedure (ActionDouble), pointer :: MudPump2OutputBblStrokePtr
procedure (ActionDouble), pointer :: MudPump3OutputBblStrokePtr
! procedure (ActionDouble), pointer :: MudPump1LinerDiameterPtr
! procedure (ActionDouble), pointer :: MudPump2LinerDiameterPtr
! procedure (ActionDouble), pointer :: MudPump3LinerDiameterPtr
! procedure (ActionDouble), pointer :: MudPump1OutputBblStrokePtr
! procedure (ActionDouble), pointer :: MudPump2OutputBblStrokePtr
! procedure (ActionDouble), pointer :: MudPump3OutputBblStrokePtr
real(8) :: MathPI = 3.14159265358979d0


+ 22
- 31
CSharp/BasicInputs/RigSpecifications/CRigSize.f90 View File

@@ -1,37 +1,28 @@
module CRigSize
use CRigSizeVariables
use SimulationVariables
use json_module
implicit none
public
contains
subroutine SetRigType(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetRigType
!DEC$ ATTRIBUTES ALIAS: 'SetRigType' :: SetRigType
implicit none
integer, intent(in) :: v
RigSize%RigType = v
end subroutine
subroutine SetCrownHeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetCrownHeight
!DEC$ ATTRIBUTES ALIAS: 'SetCrownHeight' :: SetCrownHeight
implicit none
real*8, intent(in) :: v
RigSize%CrownHeight = v
end subroutine
subroutine SetMonkeyBoandHeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetMonkeyBoandHeight
!DEC$ ATTRIBUTES ALIAS: 'SetMonkeyBoandHeight' :: SetMonkeyBoandHeight
implicit none
real*8, intent(in) :: v
RigSize%MonkeyBoandHeight = v
end subroutine
contains

subroutine RigSizeToJson(parent)

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

! 1. create new node
call json%create_object(p,'RigSize')
subroutine SetRigFloorHeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetRigFloorHeight
!DEC$ ATTRIBUTES ALIAS: 'SetRigFloorHeight' :: SetRigFloorHeight
implicit none
real*8, intent(in) :: v
RigSize%RigFloorHeight = v
! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
call json%add(p,"RigType",data%Configuration%RigSize%RigType)
call json%add(p,"CrownHeight",data%Configuration%RigSize%CrownHeight)
call json%add(p,"MonkeyBoandHeight",data%Configuration%RigSize%MonkeyBoandHeight)
call json%add(p,"RigFloorHeight",data%Configuration%RigSize%RigFloorHeight)
! 3. add new node to parent
call json%add(parent,p)
end subroutine

end module CRigSize

+ 32
- 137
CSharp/BasicInputs/WellProfile/CCasingLinerChoke.f90 View File

@@ -1,145 +1,40 @@
module CCasingLinerChoke
use CCasingLinerChokeVariables
use SimulationVariables
use json_module
implicit none
public
contains
subroutine SetCasingDepth(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetCasingDepth
!DEC$ ATTRIBUTES ALIAS: 'SetCasingDepth' :: SetCasingDepth
implicit none
real*8, intent(in) :: v
CasingLinerChoke%CasingDepth = v
end subroutine
subroutine SetCasingId(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetCasingId
!DEC$ ATTRIBUTES ALIAS: 'SetCasingId' :: SetCasingId
implicit none
real*8, intent(in) :: v
CasingLinerChoke%CasingId = v
end subroutine
subroutine SetCasingOd(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetCasingOd
!DEC$ ATTRIBUTES ALIAS: 'SetCasingOd' :: SetCasingOd
implicit none
real*8, intent(in) :: v
CasingLinerChoke%CasingOd = v
end subroutine
subroutine SetCasingWeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetCasingWeight
!DEC$ ATTRIBUTES ALIAS: 'SetCasingWeight' :: SetCasingWeight
implicit none
real*8, intent(in) :: v
CasingLinerChoke%CasingWeight = v
end subroutine
subroutine SetCasingCollapsePressure(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetCasingCollapsePressure
!DEC$ ATTRIBUTES ALIAS: 'SetCasingCollapsePressure' :: SetCasingCollapsePressure
implicit none
real*8, intent(in) :: v
CasingLinerChoke%CasingCollapsePressure = v
end subroutine
subroutine SetCasingTensileStrength(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetCasingTensileStrength
!DEC$ ATTRIBUTES ALIAS: 'SetCasingTensileStrength' :: SetCasingTensileStrength
implicit none
real*8, intent(in) :: v
CasingLinerChoke%CasingTensileStrength = v
end subroutine
subroutine SetLinerTopDepth(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLinerTopDepth
!DEC$ ATTRIBUTES ALIAS: 'SetLinerTopDepth' :: SetLinerTopDepth
implicit none
real*8, intent(in) :: v
CasingLinerChoke%LinerTopDepth = v
end subroutine
subroutine SetLinerLength(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLinerLength
!DEC$ ATTRIBUTES ALIAS: 'SetLinerLength' :: SetLinerLength
implicit none
real*8, intent(in) :: v
CasingLinerChoke%LinerLength = v
end subroutine
subroutine SetLinerId(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLinerId
!DEC$ ATTRIBUTES ALIAS: 'SetLinerId' :: SetLinerId
implicit none
real*8, intent(in) :: v
CasingLinerChoke%LinerId = v
end subroutine
subroutine SetLinerOd(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLinerOd
!DEC$ ATTRIBUTES ALIAS: 'SetLinerOd' :: SetLinerOd
implicit none
real*8, intent(in) :: v
CasingLinerChoke%LinerOd = v
end subroutine
subroutine SetLinerWeight(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLinerWeight
!DEC$ ATTRIBUTES ALIAS: 'SetLinerWeight' :: SetLinerWeight
implicit none
real*8, intent(in) :: v
CasingLinerChoke%LinerWeight = v
end subroutine
subroutine SetLinerCollapsePressure(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLinerCollapsePressure
!DEC$ ATTRIBUTES ALIAS: 'SetLinerCollapsePressure' :: SetLinerCollapsePressure
implicit none
real*8, intent(in) :: v
CasingLinerChoke%LinerCollapsePressure = v
end subroutine
subroutine SetLinerTensileStrength(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetLinerTensileStrength
!DEC$ ATTRIBUTES ALIAS: 'SetLinerTensileStrength' :: SetLinerTensileStrength
implicit none
real*8, intent(in) :: v
CasingLinerChoke%LinerTensileStrength = v
end subroutine
subroutine SetOpenHoleId(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetOpenHoleId
!DEC$ ATTRIBUTES ALIAS: 'SetOpenHoleId' :: SetOpenHoleId
implicit none
real*8, intent(in) :: v
CasingLinerChoke%OpenHoleId = v
#ifdef deb
print*, 'OpenHoleId=', CasingLinerChoke%OpenHoleId
#endif
end subroutine
subroutine CasingLinerChokeToJson(parent)

subroutine SetOpenHoleLength(v)
!DEC$ ATTRIBUTES DLLEXPORT :: SetOpenHoleLength
!DEC$ ATTRIBUTES ALIAS: 'SetOpenHoleLength' :: SetOpenHoleLength
implicit none
real*8, intent(in) :: v
CasingLinerChoke%OpenHoleLength = v
#ifdef deb
print*, 'OpenHoleLength=', CasingLinerChoke%OpenHoleLength
#endif
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p

! 1. create new node
call json%create_object(p,'CasingLinerChoke')
! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
call json%add(p,"CasingDepth",data%Configuration%CasingLinerChoke%CasingDepth)
call json%add(p,"CasingId",data%Configuration%CasingLinerChoke%CasingId)
call json%add(p,"CasingOd",data%Configuration%CasingLinerChoke%CasingOd)
call json%add(p,"CasingWeight",data%Configuration%CasingLinerChoke%CasingWeight)
call json%add(p,"CasingCollapsePressure",data%Configuration%CasingLinerChoke%CasingCollapsePressure)
call json%add(p,"CasingTensileStrength",data%Configuration%CasingLinerChoke%CasingTensileStrength)
call json%add(p,"LinerTopDepth",data%Configuration%CasingLinerChoke%LinerTopDepth)
call json%add(p,"LinerLength",data%Configuration%CasingLinerChoke%LinerLength)
call json%add(p,"LinerId",data%Configuration%CasingLinerChoke%LinerId)
call json%add(p,"LinerOd",data%Configuration%CasingLinerChoke%LinerOd)
call json%add(p,"LinerWeight",data%Configuration%CasingLinerChoke%LinerWeight)
call json%add(p,"LinerCollapsePressure",data%Configuration%CasingLinerChoke%LinerCollapsePressure)
call json%add(p,"LinerTensileStrength",data%Configuration%CasingLinerChoke%LinerTensileStrength)
call json%add(p,"OpenHoleId",data%Configuration%CasingLinerChoke%OpenHoleId)
call json%add(p,"OpenHoleLength",data%Configuration%CasingLinerChoke%OpenHoleLength)
! 3. add new node to parent
call json%add(parent,p)
end subroutine


end module CCasingLinerChoke

+ 1
- 1
CSharp/BasicInputs/WellProfile/CCasingLinerChokeVariables.f90 View File

@@ -21,6 +21,6 @@ module CCasingLinerChokeVariables
real(8) :: OpenHoleId
real(8) :: OpenHoleLength
End Type CasingLinerChokeType
Type(CasingLinerChokeType)::CasingLinerChoke
! Type(CasingLinerChokeType)::CasingLinerChoke
contains
end module CCasingLinerChokeVariables

+ 20
- 53
CSharp/BasicInputs/WellProfile/CPathGeneration.f90 View File

@@ -1,59 +1,26 @@
module CPathGeneration
use ConfigurationVariables !@
use SimulationVariables !@
use json_module
implicit none
public
contains
integer function SetPathGeneration(count, array)
!DEC$ ATTRIBUTES DLLEXPORT::SetPathGeneration
!DEC$ ATTRIBUTES ALIAS: 'SetPathGeneration' :: SetPathGeneration
implicit none
integer, intent(in) :: count
integer :: i
type(CPathGenerationItem), intent(inout), target :: array(count)
type(CPathGenerationItem), pointer :: item
PathGeneration%ItemCount = count
if(size(PathGeneration%Items) > 0) then
deallocate(PathGeneration%Items)
end if
if(count > 0) then
allocate(PathGeneration%Items(count))
do i = 1, count
item => array(i)
PathGeneration%Items(i)%HoleType = item%HoleType
PathGeneration%Items(i)%Angle = item%Angle
PathGeneration%Items(i)%Length = item%Length
PathGeneration%Items(i)%FinalAngle = item%FinalAngle
PathGeneration%Items(i)%TotalLength = item%TotalLength
PathGeneration%Items(i)%MeasuredDepth = item%MeasuredDepth
PathGeneration%Items(i)%TotalVerticalDepth = item%TotalVerticalDepth
end do
end if
contains

SetPathGeneration = 0
end function SetPathGeneration
integer function SetPathGenerationDataPoints(count, array)
!DEC$ ATTRIBUTES DLLEXPORT::SetPathGenerationDataPoints
!DEC$ ATTRIBUTES ALIAS: 'SetPathGenerationDataPoints' :: SetPathGenerationDataPoints
implicit none
integer, intent(in) :: count
integer :: i
type(CDataPointItem), intent(inout), target :: array(count)
type(CDataPointItem), pointer :: item
PathGeneration%DataPointsCount = count
if(size(PathGeneration%DataPoints) > 0) then
deallocate(PathGeneration%DataPoints)
end if
if(count > 0) then
allocate(PathGeneration%DataPoints(count))
do i = 1, count
item => array(i)
PathGeneration%DataPoints(i)%X = item%X
PathGeneration%DataPoints(i)%Y = item%Y
end do
end if
subroutine PathGenerationToJson(parent)

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

! 1. create new node
call json%create_object(p,'Path')
! 2. add member of data type to new node
! call StringConfigurationToJson(p)
! call FormationToJson(p)
! call json%add(p,"",data%Configuration%Formation%Formations(i)%Abrasiveness)

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

SetPathGenerationDataPoints = 0
end function SetPathGenerationDataPoints
end module CPathGeneration

+ 1
- 1
CSharp/DownHole/DownHole.f90 View File

@@ -1,5 +1,5 @@
module DownHoleModule
use ConfigurationVariables
use SimulationVariables
contains
subroutine SetAnnalusFluids(count, array)
implicit none


+ 1
- 1
CSharp/Equipments/ControlPanels/CBopControlPanel.f90 View File

@@ -1,6 +1,6 @@
module CBopControlPanel
! use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains


+ 1
- 1
CSharp/Equipments/ControlPanels/CChokeControlPanel.f90 View File

@@ -1,6 +1,6 @@
module CChokeControlPanel
use CChokeControlPanelVariables
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains


+ 1
- 1
CSharp/Equipments/ControlPanels/CChokeManifold.f90 View File

@@ -1,6 +1,6 @@
module CChokeManifold
! use CChokeManifoldVariables
use ConfigurationVariables
use SimulationVariables
use CManifolds
use CLog2
implicit none


+ 16
- 16
CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90 View File

@@ -1,11 +1,11 @@
module CDataDisplayConsole
! use CDataDisplayConsole
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains
subroutine Set_TotalDepth(v)
use ConfigurationVariables !@!!, only: data%EquipmentControl%DrillingWatch%Depth
use SimulationVariables !@!!, only: data%EquipmentControl%DrillingWatch%Depth
! use CSimulationVariables, only: SetDistanceDrilled
implicit none
real(8), intent(in) :: v
@@ -15,7 +15,7 @@ module CDataDisplayConsole
end subroutine
subroutine Set_BitPosition(v)
use ConfigurationVariables !@!!, only: data%EquipmentControl%DrillingWatch%BitPosition
use SimulationVariables !@!!, only: data%EquipmentControl%DrillingWatch%BitPosition
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DataDisplayConsole%BitDepth = v
@@ -23,7 +23,7 @@ module CDataDisplayConsole
end subroutine
subroutine Set_RotaryTorque(v)
use ConfigurationVariables !@!!, only: data%EquipmentControl%DrillingWatch%Torque
use SimulationVariables !@!!, only: data%EquipmentControl%DrillingWatch%Torque
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DataDisplayConsole%RotaryTorqueGauge = v
@@ -33,7 +33,7 @@ module CDataDisplayConsole
subroutine Set_MudWeightIn(v)
use ConfigurationVariables !@!, only: MudWeightInDw => data%EquipmentControl%DataDisplayConsole%MudWeightIn
use SimulationVariables !@!, only: MudWeightInDw => data%EquipmentControl%DataDisplayConsole%MudWeightIn
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DataDisplayConsole%MudWeightIn = v
@@ -41,7 +41,7 @@ module CDataDisplayConsole
end subroutine
subroutine Set_MudWeightOut(v)
use ConfigurationVariables !@!, only: MudWeightOutDw => data%EquipmentControl%DataDisplayConsole%MudWeightOut
use SimulationVariables !@!, only: MudWeightOutDw => data%EquipmentControl%DataDisplayConsole%MudWeightOut
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DataDisplayConsole%MudWeightOut = v
@@ -49,21 +49,21 @@ module CDataDisplayConsole
end subroutine
subroutine Set_TripTankVolume(v)
use ConfigurationVariables !@!, only: data%EquipmentControl%DrillingWatch%TripTankVolume
use SimulationVariables !@!, only: data%EquipmentControl%DrillingWatch%TripTankVolume
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DrillingWatch%TripTankVolume = v
end subroutine
subroutine Set_FillVolume(v)
use ConfigurationVariables !@!, only: data%EquipmentControl%DrillingWatch%FillVolume
use SimulationVariables !@!, only: data%EquipmentControl%DrillingWatch%FillVolume
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DrillingWatch%FillVolume = v
end subroutine
subroutine Set_HookLoad(v)
use ConfigurationVariables !@!, only: HookLoadDw => data%EquipmentControl%DataDisplayConsole%HookLoad
use SimulationVariables !@!, only: HookLoadDw => data%EquipmentControl%DataDisplayConsole%HookLoad
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DataDisplayConsole%HookLoadPointer = v
@@ -72,7 +72,7 @@ module CDataDisplayConsole
end subroutine
subroutine Set_WeightOnBit(v)
use ConfigurationVariables !@!, only: data%EquipmentControl%DrillingWatch%WeightOnBit
use SimulationVariables !@!, only: data%EquipmentControl%DrillingWatch%WeightOnBit
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DataDisplayConsole%WOBPointer = v
@@ -81,7 +81,7 @@ module CDataDisplayConsole
end subroutine
subroutine Set_ROP(v)
use ConfigurationVariables !@!, only: ROPDw => data%EquipmentControl%DataDisplayConsole%ROP
use SimulationVariables !@!, only: ROPDw => data%EquipmentControl%DataDisplayConsole%ROP
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DataDisplayConsole%ROP = v
@@ -89,9 +89,9 @@ module CDataDisplayConsole
end subroutine
subroutine Set_CasingPressure(v)
use ConfigurationVariables !@!, only: CasingPressureDw => CasingPressure
use SimulationVariables !@!, only: CasingPressureDw => CasingPressure
use CChokeControlPanelVariables
use ConfigurationVariables!, only: CasingPressureChoke => CasingPressure
use SimulationVariables!, only: CasingPressureChoke => CasingPressure
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DataDisplayConsole%CasingPressureGauge = v
@@ -101,9 +101,9 @@ module CDataDisplayConsole
end subroutine
subroutine Set_StandPipePressure(v)
use ConfigurationVariables !@!, only: data%EquipmentControl%DrillingWatch%PumpPressure
use SimulationVariables !@!, only: data%EquipmentControl%DrillingWatch%PumpPressure
use CChokeControlPanelVariables
use ConfigurationVariables!, only: StandPipePressureChoke => data%EquipmentControl%DataDisplayConsole%StandPipePressure
use SimulationVariables!, only: StandPipePressureChoke => data%EquipmentControl%DataDisplayConsole%StandPipePressure
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DataDisplayConsole%StandPipePressureGauge = v
@@ -117,7 +117,7 @@ module CDataDisplayConsole
subroutine Set_RotaryRPMGauge(v)
use ConfigurationVariables !@!, only: data%EquipmentControl%DrillingWatch%RPM
use SimulationVariables !@!, only: data%EquipmentControl%DrillingWatch%RPM
implicit none
real(8), intent(in) :: v
data%EquipmentControl%DataDisplayConsole%RotaryRPMGauge = v


+ 2
- 2
CSharp/Equipments/ControlPanels/CDrillingConsole.f90 View File

@@ -1,7 +1,7 @@
module CDrillingConsole
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
! use CSimulationVariables
use CLog4
use CLog3


+ 3
- 3
CSharp/Equipments/ControlPanels/CHook.f90 View File

@@ -1,14 +1,14 @@
module CHook
use CHookVariables
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains
subroutine Set_HookHeight(v)
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
implicit none
real , intent(in) :: v


+ 1
- 1
CSharp/Equipments/ControlPanels/CStandPipeManifold.f90 View File

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


+ 5
- 5
CSharp/Equipments/ControlPanels/CTopDrivePanel.f90 View File

@@ -1,6 +1,6 @@
module CTopDrivePanel
use CTopDrivePanelVariables
use ConfigurationVariables
use SimulationVariables
use CLog3
implicit none
public
@@ -67,8 +67,8 @@ module CTopDrivePanel
!DEC$ ATTRIBUTES ALIAS: 'SetTopDriveTorqueLimitKnob' :: SetTopDriveTorqueLimitKnob
! use CSimulationVariables, only: IsPortable
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables!, only: data%EquipmentControl%DrillingConsole%RTSwitch, data%EquipmentControl%DrillingConsole%RTTorqueLimitKnob
use SimulationVariables
use SimulationVariables!, only: data%EquipmentControl%DrillingConsole%RTSwitch, data%EquipmentControl%DrillingConsole%RTTorqueLimitKnob
use CWarnings, only: Activate_TopdriveRotaryTableConfilict
use CScaleRange
implicit none
@@ -105,8 +105,8 @@ module CTopDrivePanel
!DEC$ ATTRIBUTES ALIAS: 'SetRpmKnob' :: SetRpmKnob
! use CSimulationVariables, only: IsPortable
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables!, only: data%EquipmentControl%DrillingConsole%RTSwitch, data%EquipmentControl%DrillingConsole%RTThrottle
use SimulationVariables
use SimulationVariables!, only: data%EquipmentControl%DrillingConsole%RTSwitch, data%EquipmentControl%DrillingConsole%RTThrottle
use CWarnings, only: Activate_TopdriveRotaryTableConfilict
use CScaleRange
implicit none


+ 1
- 1
CSharp/Equipments/MudPathFinding/CManifolds.f90 View File

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


+ 1
- 1
CSharp/Equipments/Tanks/CTanks.f90 View File

@@ -1,6 +1,6 @@

module CTanks
use ConfigurationVariables
use SimulationVariables
use CManifolds
implicit none
public


+ 4
- 4
CSharp/OperationScenarios/Common/COperationScenariosMain.f90 View File

@@ -164,7 +164,7 @@ module COperationScenariosMain
use UnitySignalVariables
use UnitySignalsModule
use CHook
use ConfigurationVariables
use SimulationVariables
implicit none
call Set_HookHeight(75.0)
@@ -220,7 +220,7 @@ module COperationScenariosMain
use UnitySignalVariables
use UnitySignalsModule
use CHook
use ConfigurationVariables
use SimulationVariables
! use CTongEnumVariables
implicit none
@@ -286,7 +286,7 @@ module COperationScenariosMain
use UnitySignalVariables
use UnitySignalsModule
use CHook
use ConfigurationVariables
use SimulationVariables
implicit none
call Set_HookHeight(75.0)
@@ -360,7 +360,7 @@ module COperationScenariosMain
use UnitySignalVariables
use UnitySignalsModule
use CHook
use ConfigurationVariables
use SimulationVariables
! use CKellyEnumVariables
implicit none


+ 1
- 1
CSharp/OperationScenarios/Common/COperationScenariosSettings.f90 View File

@@ -155,7 +155,7 @@ module COperationScenariosSettings
subroutine SetDefaultValues()
use OperationScenariosModule
use CHoistingVariables
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType
use SimulationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType
use CManifolds, only: RemoveSafetyValve_TripMode, RemoveSafetyValve_KellyMode
implicit none


+ 3
- 3
CSharp/OperationScenarios/Common/OperationScenarios.f90 View File

@@ -5,7 +5,7 @@ module OperationScenariosModule
! use OperationScenariosModule !
! use OperationScenariosModule !!CElevator...
! use COperationScenariosVariables
use ConfigurationVariables
use SimulationVariables
use PermissionsModule
use SoftwareInputsVariables
use CUnityInputs
@@ -15,9 +15,9 @@ module OperationScenariosModule
use PermissionsModule
! use CTdsElevatorModesEnumVariables !
use CHoistingVariables
use ConfigurationVariables
use SimulationVariables
use CTopDrivePanelVariables
use ConfigurationVariables
use SimulationVariables
use NotificationModule
use UnitySignalsModule !for CTdsConnectionModesEnum!!!!



+ 1
- 1
CSharp/OperationScenarios/Enums/CElevatorConnectionEnum.f90 View File

@@ -7,7 +7,7 @@ module CElevatorConnectionEnum
subroutine Evaluate_ElevatorConnection()
use CHoistingVariables
use ConfigurationVariables
use SimulationVariables
use CCommon, only: SetStandRack
implicit none


+ 2
- 2
CSharp/OperationScenarios/Enums/CTdsElevatorModesEnum.f90 View File

@@ -324,8 +324,8 @@ module CTdsElevatorModesEnum
subroutine Subscribe_TdsElevatorModes()
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
implicit none
end subroutine

+ 1
- 1
CSharp/OperationScenarios/Notifications/CIrIBopLedNotification.f90 View File

@@ -1,7 +1,7 @@
module CIrIBopLedNotification
use OperationScenariosModule
! use CTopDrivePanelVariables
use ConfigurationVariables
use SimulationVariables
implicit none
contains


+ 1
- 1
CSharp/OperationScenarios/Notifications/CTdsPowerLedNotification.f90 View File

@@ -1,6 +1,6 @@
module CTdsPowerLedNotification
use OperationScenariosModule
use ConfigurationVariables
use SimulationVariables
implicit none
contains


+ 25
- 25
CSharp/OperationScenarios/Notifications/Notofications.f90 View File

@@ -1,10 +1,10 @@
module NotificationModule
use ConfigurationVariables
use SimulationVariables
implicit none
contains
subroutine Set_UnlatchLed(v)
use CDrillingConsoleVariables
use ConfigurationVariables
use SimulationVariables
!use CLatchLedNotification
implicit none
logical , intent(in) :: v
@@ -49,7 +49,7 @@ contains

subroutine Set_TorqueWrenchLed(v)
use CTopDrivePanelVariables
use ConfigurationVariables!, only: data%EquipmentControl%TopDrivePanel%TopDriveTorqueWrenchLed
use SimulationVariables!, only: data%EquipmentControl%TopDrivePanel%TopDriveTorqueWrenchLed
implicit none
integer , intent(in) :: v
@@ -68,7 +68,7 @@ contains

subroutine Set_PowerLed(v)
use CTopDrivePanelVariables
use ConfigurationVariables!, only: data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerLed
use SimulationVariables!, only: data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerLed
!use CLatchLedNotification
implicit none
logical , intent(in) :: v
@@ -94,7 +94,7 @@ contains

subroutine Set_IbopLed(v)
use CTopDrivePanelVariables
use ConfigurationVariables!, only: data%EquipmentControl%TopDrivePanel%TopDriveIbopLed
use SimulationVariables!, only: data%EquipmentControl%TopDrivePanel%TopDriveIbopLed
use CManifolds, Only: OpenTopDriveIBop, CloseTopDriveIBop
!use CLatchLedNotification
implicit none
@@ -122,8 +122,8 @@ contains

subroutine Set_SwingLed(v)
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables!, only: SwingLedHw => SwingLed
use SimulationVariables
use SimulationVariables!, only: SwingLedHw => SwingLed
implicit none
logical , intent(in) :: v
@@ -165,11 +165,11 @@ contains

subroutine Set_OpenSafetyValveLed(v)
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables!, only: OpenSafetyValveLedHw => OpenSafetyValveLed
use SimulationVariables
use SimulationVariables!, only: OpenSafetyValveLedHw => OpenSafetyValveLed
use CManifolds, only: OpenSafetyValve_TopDrive, OpenSafetyValve_KellyMode, OpenSafetyValve_TripMode
use CHoistingVariables
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType
use SimulationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType
implicit none
logical , intent(in) :: v
#ifdef ExcludeExtraChanges
@@ -194,8 +194,8 @@ contains

subroutine Set_OpenKellyCockLed(v)
! use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables!, only: OpenKellyCockLedHw => OpenKellyCockLed
use SimulationVariables
use SimulationVariables!, only: OpenKellyCockLedHw => OpenKellyCockLed
use CManifolds, only: OpenKellyCock
implicit none
logical , intent(in) :: v
@@ -226,8 +226,8 @@ contains

subroutine Set_LatchLed(v)
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables!, only: data%EquipmentControl%DrillingConsole%LatchPipeLED
use SimulationVariables
use SimulationVariables!, only: data%EquipmentControl%DrillingConsole%LatchPipeLED
!use CUnlatchLedNotification
implicit none
logical , intent(in) :: v
@@ -251,8 +251,8 @@ contains

subroutine Set_IrSafetyValveLed(v)
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables!, only: data%EquipmentControl%DrillingConsole%CloseKellyCockLed => IRSafetyValveLed
use SimulationVariables
use SimulationVariables!, only: data%EquipmentControl%DrillingConsole%CloseKellyCockLed => IRSafetyValveLed
use CManifolds, only: &
InstallSafetyValve_TopDrive, &
InstallSafetyValve_KellyMode, &
@@ -263,7 +263,7 @@ contains
use UnitySignalVariables
use UnitySignalsModule, only: Set_SafetyValve_Install, Set_SafetyValve_Remove
use CHoistingVariables
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType
use SimulationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType
implicit none
logical , intent(in) :: v
#ifdef ExcludeExtraChanges
@@ -299,8 +299,8 @@ contains
subroutine Set_IrIBopLed(v)
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables!, only: IRIBopLedHw => IRIBopLed
use SimulationVariables
use SimulationVariables!, only: IRIBopLedHw => IRIBopLed
use CManifolds, only: InstallIBop, RemoveIBop
use UnitySignalVariables
use UnitySignalsModule, only: Set_Ibop_Install, Set_Ibop_Remove
@@ -329,8 +329,8 @@ contains

subroutine Set_FillMouseHoleLed(v)
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables!, only: FillMouseHoleLedHw => FillMouseHoleLed
use SimulationVariables
use SimulationVariables!, only: FillMouseHoleLedHw => FillMouseHoleLed
! use CMouseHoleEnumVariables
use UnitySignalVariables
use UnitySignalsModule
@@ -357,8 +357,8 @@ contains

subroutine Set_CloseKellyCockLed(v)
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables!, only: CloseKellyCockLedHw => CloseKellyCockLed
use SimulationVariables
use SimulationVariables!, only: CloseKellyCockLedHw => CloseKellyCockLed
use CManifolds, only: CloseKellyCock
implicit none
logical , intent(in) :: v
@@ -379,11 +379,11 @@ contains

subroutine Set_CloseSafetyValveLed(v)
! use CDrillingConsoleVariables
use ConfigurationVariables
use SimulationVariables
!@use ConfigurationVariables, only: CloseSafetyValveLedHw => CloseSafetyValveLed
use CManifolds, only: CloseSafetyValve_TopDrive, CloseSafetyValve_KellyMode, CloseSafetyValve_TripMode
use CHoistingVariables
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType
use SimulationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType
implicit none
logical , intent(in) :: v
#ifdef ExcludeExtraChanges


+ 1
- 1
CSharp/OperationScenarios/Permissions/CSwingDrillPermission.f90 View File

@@ -1,7 +1,7 @@
module CSwingDrillPermission
use OperationScenariosModule
use CTopDrivePanelVariables
use ConfigurationVariables
use SimulationVariables
implicit none
contains


+ 1
- 1
CSharp/OperationScenarios/Permissions/CSwingTiltPermission.f90 View File

@@ -1,7 +1,7 @@
module CSwingTiltPermission
use UnitySignalsModule
use OperationScenariosModule
use ConfigurationVariables
use SimulationVariables
implicit none
contains


+ 1
- 1
CSharp/OperationScenarios/Permissions/Permissions.f90 View File

@@ -1,5 +1,5 @@
module PermissionsModule
use ConfigurationVariables
use SimulationVariables
implicit none
contains


+ 2
- 2
CSharp/OperationScenarios/UnitySignals/CMouseHoleEnum.f90 View File

@@ -27,8 +27,8 @@ module CMouseHoleEnum
subroutine Subscribe_MouseHole()
!use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
implicit none
!call OnFillMouseHolePress%Add(ButtonPress_MouseHole)
end subroutine


+ 3
- 3
CSharp/OperationScenarios/UnitySignals/COperationConditionEnum.f90 View File

@@ -1,7 +1,7 @@
module COperationConditionEnum
use CLog4
use OperationScenariosModule
use ConfigurationVariables
use SimulationVariables
implicit none
! enum, bind(c)
! enumerator OPERATION_DRILL
@@ -69,7 +69,7 @@ module COperationConditionEnum
subroutine ButtonPress_Latch_OperationCondition()
! use ConfigurationVariables
use CHoistingVariables
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, Kelly_DriveType
use SimulationVariables!, only: data%State%Hoisting%DriveType, Kelly_DriveType
use CManifolds, only: InstallKellyCock
implicit none
@@ -124,7 +124,7 @@ module COperationConditionEnum
subroutine ButtonPress_Unlatch_OperationCondition()
use CHoistingVariables
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, Kelly_DriveType
use SimulationVariables!, only: data%State%Hoisting%DriveType, Kelly_DriveType
use CManifolds, only: RemoveKellyCock
implicit none


+ 2
- 2
CSharp/OperationScenarios/UnitySignals/CTdsBackupClamp.f90 View File

@@ -51,8 +51,8 @@ module CTdsBackupClamp
subroutine Subscribe_TdsBackupClamp()
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
implicit none
end subroutine

+ 2
- 2
CSharp/OperationScenarios/UnitySignals/CTdsSpineEnum.f90 View File

@@ -56,8 +56,8 @@ module CTdsSpineEnum
subroutine Subscribe_TdsSpine()
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
implicit none
end subroutine

+ 3
- 3
CSharp/OperationScenarios/UnitySignals/CTdsSwingEnum.f90 View File

@@ -1,6 +1,6 @@
module CTdsSwingEnum
use OperationScenariosModule
use ConfigurationVariables
use SimulationVariables
use UnitySignalsModule
implicit none
contains
@@ -136,8 +136,8 @@ module CTdsSwingEnum
subroutine Subscribe_TdsSwing()
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
implicit none
end subroutine

+ 2
- 2
CSharp/OperationScenarios/UnitySignals/CTdsTongEnum.f90 View File

@@ -58,8 +58,8 @@ module CTdsTongEnum
subroutine Subscribe_TdsTong()
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
implicit none
end subroutine

+ 4
- 4
CSharp/OperationScenarios/UnitySignals/UnitySignals.f90 View File

@@ -1,6 +1,6 @@
module UnitySignalsModule
use UnitySignalVariables
use ConfigurationVariables
use SimulationVariables
contains

subroutine Set_TdsElevatorModes(v)
@@ -313,7 +313,7 @@ end function

subroutine Evaluate_FillupHead()
use CHoistingVariables
use ConfigurationVariables
use SimulationVariables
use CStudentStationVariables!, only: data%State%StudentStation%FillupHeadInstallation
implicit none
@@ -425,14 +425,14 @@ subroutine Set_TdsConnectionModes(v)
end subroutine

integer function Get_TdsConnectionModes()
use ConfigurationVariables
use SimulationVariables
implicit none
Get_TdsConnectionModes = data%State%unitySignals%TdsConnectionModes
end function

subroutine Evaluate_TdsConnectionModes()
use CUnityInputs
use ConfigurationVariables
use SimulationVariables
implicit none
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then


+ 1
- 1
CSharp/Problems/CBitProblems.f90 View File

@@ -1,5 +1,5 @@
module CBitProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains


+ 10
- 10
CSharp/Problems/CBopProblems.f90 View File

@@ -1,5 +1,5 @@
module CBopProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains
@@ -98,7 +98,7 @@ module CBopProblems
endsubroutine
subroutine ChangeAnnularFail(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! ! if(associated(AnnularFailPtr)) call AnnularFailPtr(status)
@@ -107,7 +107,7 @@ module CBopProblems
endsubroutine
subroutine ChangeAnnularLeak(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! ! if(associated(AnnularLeakPtr)) call AnnularLeakPtr(status)
@@ -126,7 +126,7 @@ module CBopProblems
endsubroutine
subroutine ChangeUpperRamFail(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! ! if(associated(UpperRamFailPtr)) call UpperRamFailPtr(status)
@@ -135,7 +135,7 @@ module CBopProblems
endsubroutine
subroutine ChangeUpperRamLeak(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! ! if(associated(UpperRamLeakPtr)) call UpperRamLeakPtr(status)
@@ -153,7 +153,7 @@ module CBopProblems
endsubroutine
subroutine ChangeMiddleRamFail(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(MiddleRamFailPtr)) call MiddleRamFailPtr(status)
@@ -162,7 +162,7 @@ module CBopProblems
endsubroutine
subroutine ChangeMiddleRamLeak(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! ! if(associated(MiddleRamLeakPtr)) call MiddleRamLeakPtr(status)
@@ -181,7 +181,7 @@ module CBopProblems
endsubroutine
subroutine ChangeLowerRamFail(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! ! if(associated(LowerRamFailPtr)) call LowerRamFailPtr(status)
@@ -190,7 +190,7 @@ module CBopProblems
endsubroutine
subroutine ChangeLowerRamLeak(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(LowerRamLeakPtr)) call LowerRamLeakPtr(status)
@@ -199,7 +199,7 @@ module CBopProblems
endsubroutine
subroutine ChangeAccumulatorPumpFail(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(AccumulatorPumpFailPtr)) call AccumulatorPumpFailPtr(status)


+ 12
- 12
CSharp/Problems/CChokeProblems.f90 View File

@@ -1,5 +1,5 @@
module CChokeProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains
@@ -80,7 +80,7 @@ module CChokeProblems
subroutine ChangeHydraulicChoke1Plugged(status)
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(HydraulicChoke1PluggedPtr)) call HydraulicChoke1PluggedPtr(status)
@@ -90,7 +90,7 @@ use ConfigurationVariables !@
subroutine ChangeHydraulicChoke1Fail(status)
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(HydraulicChoke1FailPtr)) call HydraulicChoke1FailPtr(status)
@@ -100,9 +100,9 @@ use ConfigurationVariables !@
subroutine ChangeHydraulicChoke1Washout(status)
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
use CChokeManifoldVariables
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(HydraulicChoke1WashoutPtr)) call HydraulicChoke1WashoutPtr(status)
@@ -115,7 +115,7 @@ use ConfigurationVariables !@
subroutine ChangeHydraulicChoke2Plugged(status)
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(HydraulicChoke2PluggedPtr)) call HydraulicChoke2PluggedPtr(status)
@@ -125,7 +125,7 @@ use ConfigurationVariables !@
subroutine ChangeHydraulicChoke2Fail(status)
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(HydraulicChoke2FailPtr)) call HydraulicChoke2FailPtr(status)
@@ -135,9 +135,9 @@ use ConfigurationVariables !@
subroutine ChangeHydraulicChoke2Washout(status)
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
use CChokeManifoldVariables
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(HydraulicChoke2WashoutPtr)) call HydraulicChoke2WashoutPtr(status)
@@ -168,7 +168,7 @@ use ConfigurationVariables !@
subroutine ChangeManualChoke1Washout(status)
USE FricPressDropVarsModule
use CChokeManifoldVariables
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(ManualChoke1WashoutPtr)) call ManualChoke1WashoutPtr(status)
@@ -199,7 +199,7 @@ use ConfigurationVariables !@
subroutine ChangeManualChoke2Washout(status)
USE FricPressDropVarsModule
use CChokeManifoldVariables
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(ManualChoke2WashoutPtr)) call ManualChoke2WashoutPtr(status)
@@ -212,7 +212,7 @@ use ConfigurationVariables !@
subroutine ChangeChokePanelAirFail(status)
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(ChokePanelAirFailPtr)) call ChokePanelAirFailPtr(status)


+ 1
- 1
CSharp/Problems/CDrillStemProblems.f90 View File

@@ -1,5 +1,5 @@
module CDrillStemProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains


+ 18
- 18
CSharp/Problems/CGaugesProblems.f90 View File

@@ -1,5 +1,5 @@
module CGaugesProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains
@@ -125,7 +125,7 @@ module CGaugesProblems
subroutine ChangeWeightIndicator(status)
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(WeightIndicatorPtr)) call WeightIndicatorPtr(status)
@@ -134,7 +134,7 @@ module CGaugesProblems
endsubroutine
subroutine ChangeRotaryRpm(status)
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(RotaryRpmPtr)) call RotaryRpmPtr(status)
@@ -143,7 +143,7 @@ module CGaugesProblems
endsubroutine
subroutine ChangeRotaryTorque(status)
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(RotaryTorquePtr)) call RotaryTorquePtr(status)
@@ -153,7 +153,7 @@ module CGaugesProblems
subroutine ChangeStandPipePressure(status)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
integer, intent (in) :: status
! if(associated(StandPipePressurePtr)) call StandPipePressurePtr(status)
@@ -171,7 +171,7 @@ use ConfigurationVariables !@@@
endsubroutine
subroutine ChangePump1Strokes(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(Pump1StrokesPtr)) call Pump1StrokesPtr(status)
@@ -180,7 +180,7 @@ use ConfigurationVariables !@@@
endsubroutine
subroutine ChangePump2Strokes(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(Pump2StrokesPtr)) call Pump2StrokesPtr(status)
@@ -198,7 +198,7 @@ use ConfigurationVariables !@@@
subroutine ChangeTripTank(status)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
integer, intent (in) :: status
! if(associated(TripTankPtr)) call TripTankPtr(status)
@@ -208,7 +208,7 @@ use ConfigurationVariables !@@@
subroutine ChangePitGainLoss(status)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
integer, intent (in) :: status
! if(associated(PitGainLossPtr)) call PitGainLossPtr(status)
@@ -233,7 +233,7 @@ use ConfigurationVariables !@@@
endsubroutine
subroutine ChangeTorqueLimit(status)
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(TorqueLimitPtr)) call TorqueLimitPtr(status)
@@ -250,7 +250,7 @@ use ConfigurationVariables !@@@
endsubroutine
subroutine ChangeAccumulatorPressure(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(AccumulatorPressurePtr)) call AccumulatorPressurePtr(status)
@@ -259,7 +259,7 @@ use ConfigurationVariables !@@@
endsubroutine
subroutine ChangeManifoldPressure(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(ManifoldPressurePtr)) call ManifoldPressurePtr(status)
@@ -268,7 +268,7 @@ use ConfigurationVariables !@@@
endsubroutine
subroutine ChangeAnnularPressure(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(AnnularPressurePtr)) call AnnularPressurePtr(status)
@@ -277,7 +277,7 @@ use ConfigurationVariables !@@@
endsubroutine
subroutine ChangeRigAirPressure(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
! if(associated(RigAirPressurePtr)) call RigAirPressurePtr(status)
@@ -287,7 +287,7 @@ use ConfigurationVariables !@@@
subroutine ChangeStandPipe1(status)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
integer, intent (in) :: status
! if(associated(StandPipe1Ptr)) call StandPipe1Ptr(status)
@@ -297,7 +297,7 @@ use ConfigurationVariables !@@@
subroutine ChangeStandPipe2(status)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
integer, intent (in) :: status
! if(associated(StandPipe2Ptr)) call StandPipe2Ptr(status)
@@ -307,7 +307,7 @@ use ConfigurationVariables !@@@
subroutine ChangeDrillPipePressure(status)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
integer, intent (in) :: status
! if(associated(DrillPipePressurePtr)) call DrillPipePressurePtr(status)
@@ -317,7 +317,7 @@ use ConfigurationVariables !@@@
subroutine ChangeChokePosition(status)
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(ChokePositionPtr)) call ChokePositionPtr(status)


+ 4
- 4
CSharp/Problems/CHoistingProblems.f90 View File

@@ -1,5 +1,5 @@
module CHoistingProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains
@@ -42,7 +42,7 @@ module CHoistingProblems
subroutine ChangeMotorFail(status)
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(MotorFailPtr)) call MotorFailPtr(status)
@@ -51,7 +51,7 @@ module CHoistingProblems
endsubroutine
subroutine ChangeClutchEngage(status)
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(ClutchEngagePtr)) call ClutchEngagePtr(status)
@@ -60,7 +60,7 @@ module CHoistingProblems
endsubroutine
subroutine ChangeClutchDisengage(status)
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
! if(associated(ClutchDisengagePtr)) call ClutchDisengagePtr(status)


+ 1
- 1
CSharp/Problems/CKickProblems.f90 View File

@@ -1,5 +1,5 @@
module CKickProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
!constants


+ 1
- 1
CSharp/Problems/CLostProblems.f90 View File

@@ -1,5 +1,5 @@
module CLostProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains


+ 1
- 1
CSharp/Problems/CMudTreatmentProblems.f90 View File

@@ -1,5 +1,5 @@
module CMudTreatmentProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains


+ 1
- 1
CSharp/Problems/COtherProblems.f90 View File

@@ -93,7 +93,7 @@ module COtherProblems
endsubroutine
subroutine ChangeRigAir(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
!if(associated(RigAirPtr)) call RigAirPtr(status)


+ 7
- 7
CSharp/Problems/CPumpProblems.f90 View File

@@ -1,5 +1,5 @@
module CPumpProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains
@@ -66,7 +66,7 @@ module CPumpProblems
subroutine ChangePump1PowerFail(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
!if(associated(Pump1PowerFailPtr)) call Pump1PowerFailPtr(status)
@@ -75,7 +75,7 @@ module CPumpProblems
endsubroutine
subroutine ChangePump1BlowPopOffValve(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
!if(associated(Pump1BlowPopOffValvePtr)) call Pump1BlowPopOffValvePtr(status)
@@ -84,7 +84,7 @@ module CPumpProblems
endsubroutine
subroutine ChangePump2PowerFail(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
!if(associated(Pump2PowerFailPtr)) call Pump2PowerFailPtr(status)
@@ -93,7 +93,7 @@ module CPumpProblems
endsubroutine
subroutine ChangePump2BlowPopOffValve(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
!if(associated(Pump2BlowPopOffValvePtr)) call Pump2BlowPopOffValvePtr(status)
@@ -102,7 +102,7 @@ module CPumpProblems
endsubroutine
subroutine ChangeCementPumpPowerFail(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
!if(associated(CementPumpPowerFailPtr)) call CementPumpPowerFailPtr(status)
@@ -111,7 +111,7 @@ module CPumpProblems
endsubroutine
subroutine ChangeCementPumpBlowPopOffValve(status)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, intent (in) :: status
!if(associated(CementPumpBlowPopOffValvePtr)) call CementPumpBlowPopOffValvePtr(status)


+ 3
- 3
CSharp/Problems/CRotaryProblems.f90 View File

@@ -1,5 +1,5 @@
module CRotaryProblems
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains
@@ -46,7 +46,7 @@ module CRotaryProblems
subroutine ChangeMotorFail(status)
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
!if(associated(MotorFailPtr)) call MotorFailPtr(status)
@@ -55,7 +55,7 @@ module CRotaryProblems
endsubroutine
subroutine ChangeOverideTorqueLimit(status)
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
integer, intent (in) :: status
!if(associated(OverideTorqueLimitPtr)) call OverideTorqueLimitPtr(status)


+ 1
- 1
CSharp/Warnings/CWarnings.f90 View File

@@ -1,6 +1,6 @@
module CWarnings
! use CWarnings
use ConfigurationVariables
use SimulationVariables
implicit none
public
contains


+ 1
- 1
Common/DynamicDoubleArray.f90 View File

@@ -1,6 +1,6 @@
module DynamicDoubleArray
implicit none
public
public
type, public :: DynamicDoubleArrayType
real(8), allocatable :: Array(:)


+ 8
- 8
Equipments/BopStack/ANNULAR.f90 View File

@@ -1,7 +1,7 @@
SUBROUTINE ANNULAR_SUB1
use ConfigurationVariables
use SimulationVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
use PressureDisplayVARIABLESModule
USE CEquipmentsConstants
USE CBopStackVariables
@@ -78,7 +78,7 @@ SUBROUTINE ANNULAR_SUB1

data%State%RAM(2)%bop_type = 3
!AbopAnnular=963.1 !(in^2)
data%State%Annular%AbopAnnular=(BopStackSpecification%AnnularPreventerClose*231.)/((data%State%Annular%IDAnnularBase-data%State%Annular%ODDrillpipe_inAnnularBase)/2.) ! 231 in^3 = 1 gal
data%State%Annular%AbopAnnular=(data%Configuration%BopStack%AnnularPreventerClose*231.)/((data%State%Annular%IDAnnularBase-data%State%Annular%ODDrillpipe_inAnnularBase)/2.) ! 231 in^3 = 1 gal
data%State%Annular%NeededVolumeAnnular=data%State%Annular%AbopAnnular*(data%State%Annular%IDAnnularBase-max(data%State%Annular%ODDrillpipe_inAnnular,data%State%Annular%ODDrillpipe_inAnnularBase))/(2.*231) !=17.98 galon for IDAnnularBase=13 5/8 , ODDrillpipe_inAnnularBase=5
!WRITE(*,*) 'a)NeededVolumeAnnular=' , NeededVolumeAnnular
!write(*,*) 'close 1'
@@ -165,7 +165,7 @@ SUBROUTINE ANNULAR_SUB1

data%State%RAM(1)%bop_type = 3
!AbopAnnular=758.48 !(in^2)
data%State%Annular%AbopAnnular=(BopStackSpecification%AnnularPreventerOpen*231)/((data%State%Annular%IDAnnularBase-max(data%State%Annular%ODDrillpipe_inAnnular,data%State%Annular%ODDrillpipe_inAnnularBase))/2.)
data%State%Annular%AbopAnnular=(data%Configuration%BopStack%AnnularPreventerOpen*231)/((data%State%Annular%IDAnnularBase-max(data%State%Annular%ODDrillpipe_inAnnular,data%State%Annular%ODDrillpipe_inAnnularBase))/2.)
data%State%Annular%NeededVolumeAnnular=data%State%Annular%AbopAnnular*(data%State%Annular%IDAnnularBase-data%State%Annular%ODDrillpipe_inAnnular)/(2.*231) !=14.16 galon for IDAnnularBase=13 5/8 , ODDrillpipe_inAnnular=5
!write(*,*) 'open 1'
@@ -196,10 +196,10 @@ end if
SUBROUTINE ANNULAR_SUB2
use ConfigurationVariables
use SimulationVariables
use PressureDisplayVARIABLESModule
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
USE CBopStackVariables
! use CSimulationVariables
@@ -267,7 +267,7 @@ SUBROUTINE ANNULAR_SUB2
data%State%Annular%Annular_Situation_forTD= 0 ! open - for TD code
data%State%RAM(1)%bop_type = 3
!AbopAnnular=963.1 !(in^2)
data%State%Annular%AbopAnnular=(BopStackSpecification%AnnularPreventerClose*231)/((data%State%Annular%IDAnnularBase-data%State%Annular%ODDrillpipe_inAnnularBase)/2.)
data%State%Annular%AbopAnnular=(data%Configuration%BopStack%AnnularPreventerClose*231)/((data%State%Annular%IDAnnularBase-data%State%Annular%ODDrillpipe_inAnnularBase)/2.)
!write(*,*) 'NeededVolumeShearRams1=',NeededVolumeShearRams
data%State%Annular%NeededVolumeAnnular=data%State%Annular%AbopAnnular*(data%State%Annular%IDAnnular-max(data%State%Annular%ODDrillpipe_inAnnular,data%State%Annular%ODDrillpipe_inAnnularBase))/(2*231.)
! write(*,*) 'NeededVolumeAnnular=',NeededVolumeAnnular
@@ -331,7 +331,7 @@ SUBROUTINE ANNULAR_SUB2
data%State%Annular%Annular_Situation_forTD= 0 ! open - for TD code
data%State%RAM(1)%bop_type = 3
!AbopAnnular=758.48 !(in^2)
data%State%Annular%AbopAnnular=(BopStackSpecification%AnnularPreventerOpen*231)/((data%State%Annular%IDAnnularBase-data%State%Annular%ODDrillpipe_inAnnularBase)/2.)
data%State%Annular%AbopAnnular=(data%Configuration%BopStack%AnnularPreventerOpen*231)/((data%State%Annular%IDAnnularBase-data%State%Annular%ODDrillpipe_inAnnularBase)/2.)
data%State%Annular%NeededVolumeAnnular=data%State%Annular%AbopAnnular*(data%State%Annular%IDAnnularBase-data%State%Annular%IDAnnular)/(2*231.)
data%State%RAM(1)%vdis_bottles=0.
data%State%RAM(1)%fvr_air=0.


+ 1
- 1
Equipments/BopStack/AnnularMain.f90 View File

@@ -18,7 +18,7 @@ module AnnularMain
! end subroutine Annular_Init
subroutine Annular_Step
use ConfigurationVariables
use SimulationVariables
implicit none
if (data%State%Annular%finished_Annular/=0) then
call ANNULAR_SUB1


+ 2
- 2
Equipments/BopStack/BOP.f90 View File

@@ -6,10 +6,10 @@ module BOP
end subroutine BopStack_Init

subroutine BopStack_Step
use ConfigurationVariables
use SimulationVariables
use CBopControlPanel
use BopVariables
use ConfigurationVariables !@
use SimulationVariables !@
! USE CEquipmentsConstants
use CSounds
implicit none


+ 18
- 18
Equipments/BopStack/BOPstartup.f90 View File

@@ -1,10 +1,10 @@

SUBROUTINE BOP_StartUp()
use ConfigurationVariables
use SimulationVariables
USE CAccumulatorVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
implicit none

@@ -59,7 +59,7 @@ data%State%BopStackAcc%Cumulative_AirVolume= 0.0


data%State%BopStackAcc%BOTTLE_CAPACITY=10 !(GALON)
data%State%BopStackAcc%NOBOTTLES=Accumulator%NumberOfBottels
data%State%BopStackAcc%NOBOTTLES=data%Configuration%Accumulator%NumberOfBottels



@@ -70,7 +70,7 @@ data%State%BopStackAcc%NOBOTTLES=Accumulator%NumberOfBottels
!fvr_tot=40 !(GALON) IN CHARGED POSITION
data%State%BopStackAcc%PRAMS_REGSET=1500 !RamsReglatorSet !=1500 DEFAULT regulator set pressure (PSI)
data%State%BopStackAcc%acc_ChargedPressure=3000 !charged(PSI)
data%State%BopStackAcc%acc_MinPressure=Accumulator%AccumulatorMinimumOperatingPressure !1200 !discharged(PSI)
data%State%BopStackAcc%acc_MinPressure=data%Configuration%Accumulator%AccumulatorMinimumOperatingPressure !1200 !discharged(PSI)
!acc_precharge=1000


@@ -79,18 +79,18 @@ data%State%BopStackAcc%FVR_TOT=(-2451*(data%State%BopStackAcc%acc_ChargedPressur
!write(*,*) 'fvr_tot=',fvr_tot

!ELECTRIC_PUMPON=2800
data%State%Pumps%ELECTRIC_ON=Accumulator%StartPressure
data%State%Pumps%ELECTRIC_ON=data%Configuration%Accumulator%StartPressure
!ELECTRIC_PUMPOFF=acc_ChargedPressure !=3000 psi
data%State%Pumps%ELECTRIC_OFF=Accumulator%StopPressure
data%State%Pumps%ELECTRIC_OFF=data%Configuration%Accumulator%StopPressure
!QELECTRIC_PUMP=12 !(gpm)
data%State%Pumps%QELECTRIC=Accumulator%ElectricPumpOutput
data%State%Pumps%QELECTRIC=data%Configuration%Accumulator%ElectricPumpOutput



!AIR_PUMPON=2600
data%State%Pumps%AIR_ON=Accumulator%StartPressure2
data%State%Pumps%AIR_ON=data%Configuration%Accumulator%StartPressure2
!AIR_PUMPOFF=2900
data%State%Pumps%AIR_OFF=Accumulator%StopPressure2
data%State%Pumps%AIR_OFF=data%Configuration%Accumulator%StopPressure2



@@ -153,12 +153,12 @@ data%State%KillLine%ODDrillpipe_in=5

data%State%ShearRAM%RAM_COURSE=320.2 !milimeter
data%State%ShearRAM%H_REGRAM=0 !(m)<<<<<<<<<<<<<<<<<<<<<<<<
data%State%ShearRAM%H_ShearRamBop=(BopStackSpecification%GroundLevel-BopStackSpecification%BlindRamHeight)*0.3048 ! foot to meter
data%State%PipeRam1%H=(BopStackSpecification%GroundLevel-BopStackSpecification%UpperRamHeight)*0.3048 ! foot to meter
data%State%PipeRam2%H_Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%LowerRamHeight)*0.3048 ! foot to meter
data%State%Annular%H_AnnularBop=(BopStackSpecification%GroundLevel-BopStackSpecification%AnnularPreventerHeight)*0.3048 ! foot to meter
data%State%ChokeLine%H_Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%KillHeight)*0.3048 ! foot to meter
data%State%KillLine%H_Bop=(BopStackSpecification%GroundLevel-BopStackSpecification%KillHeight)*0.3048 ! foot to meter
data%State%ShearRAM%H_ShearRamBop=(data%Configuration%BopStack%GroundLevel-data%Configuration%BopStack%BlindRamHeight)*0.3048 ! foot to meter
data%State%PipeRam1%H=(data%Configuration%BopStack%GroundLevel-data%Configuration%BopStack%UpperRamHeight)*0.3048 ! foot to meter
data%State%PipeRam2%H_Bop=(data%Configuration%BopStack%GroundLevel-data%Configuration%BopStack%LowerRamHeight)*0.3048 ! foot to meter
data%State%Annular%H_AnnularBop=(data%Configuration%BopStack%GroundLevel-data%Configuration%BopStack%AnnularPreventerHeight)*0.3048 ! foot to meter
data%State%ChokeLine%H_Bop=(data%Configuration%BopStack%GroundLevel-data%Configuration%BopStack%KillHeight)*0.3048 ! foot to meter
data%State%KillLine%H_Bop=(data%Configuration%BopStack%GroundLevel-data%Configuration%BopStack%KillHeight)*0.3048 ! foot to meter


data%State%RamLine%P_ACC=data%State%BopStackAcc%acc_ChargedPressure
@@ -194,11 +194,11 @@ data%State%RamLine%counter_airp=1

!======================BOP INPUTS(CONSTANTS)===========================

if (Accumulator%PrechargePressure == 1400.) then
if (data%Configuration%Accumulator%PrechargePressure == 1400.) then
data%State%RamLine%B1=1396; data%State%RamLine%B2=0.17; data%State%RamLine%B3=3.873; data%State%RamLine%B4=1.101
elseif (Accumulator%PrechargePressure == 2000.) then
elseif (data%Configuration%Accumulator%PrechargePressure == 2000.) then
data%State%RamLine%B1=1980; data%State%RamLine%B2=0.1237; data%State%RamLine%B3=15.69; data%State%RamLine%B4=1.029
elseif (Accumulator%PrechargePressure == 600.) then
elseif (data%Configuration%Accumulator%PrechargePressure == 600.) then
data%State%RamLine%B1=591.9; data%State%RamLine%B2=0.1968; data%State%RamLine%B3=2.887; data%State%RamLine%B4=0.9757
else !(PrechargePressure == 1000.) then ! this is for precharge=1000 psi
data%State%RamLine%B1=993.7; data%State%RamLine%B2=0.164; data%State%RamLine%B3=5.492; data%State%RamLine%B4=0.9796


+ 1
- 1
Equipments/BopStack/BlindRamsMain.f90 View File

@@ -18,7 +18,7 @@ module BlindRamsMain
! end subroutine BlindRams_Init
subroutine BlindRams_Step
use ConfigurationVariables
use SimulationVariables
implicit none
if (data%State%RamLine%FINISHED_shear/=0) then
call SHEAR_RAMS


+ 8
- 8
Equipments/BopStack/CHOKE_LINE.f90 View File

@@ -1,11 +1,11 @@

SUBROUTINE CHOKE_LINE
use ConfigurationVariables
use SimulationVariables
USE CAccumulatorVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants

implicit none
@@ -64,7 +64,7 @@ SUBROUTINE CHOKE_LINE
data%EquipmentControl%BopControlPanel%ChokeLineOpenLED = LedOn !LedBlinking
data%State%RAM(5)%bop_type = 3
!AbopChokeLine=196.67
data%State%ChokeLine%Abop=(BopStackSpecification%ChokeClose*231)/((data%State%ChokeLine%IDBase-data%State%ChokeLine%ODDrillpipe_inBase)/2.)
data%State%ChokeLine%Abop=(data%Configuration%BopStack%ChokeClose*231)/((data%State%ChokeLine%IDBase-data%State%ChokeLine%ODDrillpipe_inBase)/2.)
data%State%ChokeLine%NeededVolume=data%State%ChokeLine%Abop*(data%State%ChokeLine%IDBase-max(data%State%ChokeLine%ODDrillpipe_in,data%State%ChokeLine%ODDrillpipe_inBase))/(2.*231) !1.5 galon for each BOP
endif
@@ -124,7 +124,7 @@ SUBROUTINE CHOKE_LINE
data%EquipmentControl%BopControlPanel%ChokeLineCloseLED = LedOn !LedBlinking
data%State%RAM(5)%bop_type = 3
!AbopChokeLine=196.67
data%State%ChokeLine%Abop=(BopStackSpecification%ChokeOpen*231)/((data%State%ChokeLine%IDBase-data%State%ChokeLine%ODDrillpipe_inBase)/2.)
data%State%ChokeLine%Abop=(data%Configuration%BopStack%ChokeOpen*231)/((data%State%ChokeLine%IDBase-data%State%ChokeLine%ODDrillpipe_inBase)/2.)
data%State%ChokeLine%NeededVolume=data%State%ChokeLine%Abop*(data%State%ChokeLine%IDBase-max(data%State%ChokeLine%ODDrillpipe_in,data%State%ChokeLine%ODDrillpipe_inBase))/(2.*231) !1.5 galon for each BOP
endif

@@ -151,11 +151,11 @@ SUBROUTINE CHOKE_LINE
SUBROUTINE CHOKE_LINE_SUB

use ConfigurationVariables
use SimulationVariables
USE CAccumulatorVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! use CSimulationVariables
implicit none
@@ -202,7 +202,7 @@ SUBROUTINE CHOKE_LINE_SUB
CALL OpenChokeLine
data%State%RAM(5)%bop_type = 3
!AbopChokeLine=196.67
data%State%ChokeLine%Abop=(BopStackSpecification%ChokeClose*231)/((data%State%ChokeLine%IDBase-data%State%ChokeLine%ODDrillpipe_inBase)/2.)
data%State%ChokeLine%Abop=(data%Configuration%BopStack%ChokeClose*231)/((data%State%ChokeLine%IDBase-data%State%ChokeLine%ODDrillpipe_inBase)/2.)
data%State%ChokeLine%NeededVolume=data%State%ChokeLine%Abop*(data%State%ChokeLine%ID-max(data%State%ChokeLine%ODDrillpipe_in,data%State%ChokeLine%ODDrillpipe_inBase))/(2.*231)
data%State%RAM(5)%vdis_bottles=0.
@@ -241,7 +241,7 @@ SUBROUTINE CHOKE_LINE_SUB
CALL OpenChokeLine
data%State%RAM(5)%bop_type = 3
!AbopChokeLine=196.67
data%State%ChokeLine%Abop=(BopStackSpecification%ChokeOpen*231)/((data%State%ChokeLine%IDBase-data%State%ChokeLine%ODDrillpipe_inBase)/2.)
data%State%ChokeLine%Abop=(data%Configuration%BopStack%ChokeOpen*231)/((data%State%ChokeLine%IDBase-data%State%ChokeLine%ODDrillpipe_inBase)/2.)
data%State%ChokeLine%NeededVolume=data%State%ChokeLine%Abop*(data%State%ChokeLine%IDBase-data%State%ChokeLine%ID)/(2.*231)
data%State%RAM(5)%vdis_bottles=0.
data%State%RAM(5)%fvr_air=0.


+ 1
- 1
Equipments/BopStack/ChokeLineMain.f90 View File

@@ -18,7 +18,7 @@ module ChokeLineMain
! end subroutine ChokeLine_Init
subroutine ChokeLine_Step
use ConfigurationVariables
use SimulationVariables
implicit none
if (data%State%ChokeLine%finished/=0) then
call CHOKE_LINE


+ 8
- 8
Equipments/BopStack/KILL_LINE.f90 View File

@@ -1,11 +1,11 @@

SUBROUTINE KILL_LINE
use ConfigurationVariables
use SimulationVariables
USE CAccumulatorVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! use CSimulationVariables
@@ -64,7 +64,7 @@ SUBROUTINE KILL_LINE
data%EquipmentControl%BopControlPanel%KillLineOpenLED = LedOn !LedBlinking
data%State%RAM(6)%bop_type = 3
!AbopKillLine=196.67
data%State%KillLine%Abop=(BopStackSpecification%KillClose*231)/((data%State%KillLine%IDBase-data%State%KillLine%ODDrillpipe_inBase)/2.)
data%State%KillLine%Abop=(data%Configuration%BopStack%KillClose*231)/((data%State%KillLine%IDBase-data%State%KillLine%ODDrillpipe_inBase)/2.)
data%State%KillLine%NeededVolume=data%State%KillLine%Abop*(data%State%KillLine%IDBase-max(data%State%KillLine%ODDrillpipe_in,data%State%KillLine%ODDrillpipe_inBase))/(2.*231) !1.5 galon for each BOP
endif
@@ -123,7 +123,7 @@ SUBROUTINE KILL_LINE
data%EquipmentControl%BopControlPanel%KillLineCloseLED = LedOn !LedBlinking
data%State%RAM(6)%bop_type = 3
!AbopKillLine=196.67
data%State%KillLine%Abop=(BopStackSpecification%KillOpen*231)/((data%State%KillLine%IDBase-data%State%KillLine%ODDrillpipe_inBase)/2.)
data%State%KillLine%Abop=(data%Configuration%BopStack%KillOpen*231)/((data%State%KillLine%IDBase-data%State%KillLine%ODDrillpipe_inBase)/2.)
data%State%KillLine%NeededVolume=data%State%KillLine%Abop*(data%State%KillLine%IDBase-max(data%State%KillLine%ODDrillpipe_in,data%State%KillLine%ODDrillpipe_inBase))/(2.*231) !1.5 galon for each BOP
endif
@@ -148,11 +148,11 @@ end if
SUBROUTINE KILL_LINE_SUB
use ConfigurationVariables
use SimulationVariables
USE CAccumulatorVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! use CSimulationVariables

@@ -201,7 +201,7 @@ SUBROUTINE KILL_LINE_SUB
CALL OpenKillLine
data%State%RAM(6)%bop_type = 3
!AbopKillLine=196.67
data%State%KillLine%Abop=(BopStackSpecification%KillClose*231)/((data%State%KillLine%IDBase-data%State%KillLine%ODDrillpipe_inBase)/2.)
data%State%KillLine%Abop=(data%Configuration%BopStack%KillClose*231)/((data%State%KillLine%IDBase-data%State%KillLine%ODDrillpipe_inBase)/2.)
data%State%KillLine%NeededVolume=data%State%KillLine%Abop*(data%State%KillLine%ID-max(data%State%KillLine%ODDrillpipe_in,data%State%KillLine%ODDrillpipe_inBase))/(2.*231)
data%State%RAM(6)%vdis_bottles=0.
@@ -240,7 +240,7 @@ SUBROUTINE KILL_LINE_SUB
CALL OpenKillLine
data%State%RAM(6)%bop_type = 3
!AbopKillLine=196.67
data%State%KillLine%Abop=(BopStackSpecification%KillOpen*231)/((data%State%KillLine%IDBase-data%State%KillLine%ODDrillpipe_inBase)/2.)
data%State%KillLine%Abop=(data%Configuration%BopStack%KillOpen*231)/((data%State%KillLine%IDBase-data%State%KillLine%ODDrillpipe_inBase)/2.)
data%State%KillLine%NeededVolume=data%State%KillLine%Abop*(data%State%KillLine%IDBase-data%State%KillLine%ID)/(2.*231)
data%State%RAM(6)%vdis_bottles=0.
data%State%RAM(6)%fvr_air=0.


+ 1
- 1
Equipments/BopStack/KillLineMain.f90 View File

@@ -18,7 +18,7 @@ module KillLineMain
! end subroutine KillLine_Init
subroutine KillLine_Step
use ConfigurationVariables
use SimulationVariables
implicit none
if (data%State%KillLine%finished/=0) then
call KILL_LINE


+ 11
- 11
Equipments/BopStack/LOSS_INPUTS.f90 View File

@@ -1,5 +1,5 @@
SUBROUTINE DEALLOCATE_ARRAYS()
use ConfigurationVariables
use SimulationVariables
implicit none
!===========================================================================
! RAMLINE MINOR LOSSES INPUT
@@ -54,7 +54,7 @@ call data%State%AnnularComputational%Pannular_regDelay%Empty()
SUBROUTINE LOSS_INPUTS()
use ConfigurationVariables
use SimulationVariables
implicit none
INTEGER I

@@ -327,11 +327,11 @@ ENDDO
END
SUBROUTINE pumps_charge_bottle()
use ConfigurationVariables
use SimulationVariables
USE CAccumulatorVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! use CSimulationVariables
implicit none
@@ -413,7 +413,7 @@ data%State%RamLine%P_ACC=data%State%RamLine%B1*exp(data%State%RamLine%B2*data%St
SUBROUTINE airpump_code()
use ConfigurationVariables
use SimulationVariables
use CSounds
implicit none
INTEGER I
@@ -546,13 +546,13 @@ data%State%Pumps%DELTAV_AIR=data%State%Pumps%QAIR*data%State%RamLine%DeltaT_BOP/
SUBROUTINE bop_code(ramtype,H_RAMBOP,RNUMBER)
use ConfigurationVariables
use SimulationVariables
USE CAccumulatorVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! use CSimulationVariables
use ConfigurationVariables !@
use SimulationVariables !@
use CUnityOutputs
implicit none
integer ramtype, I
@@ -1021,11 +1021,11 @@ endif
SUBROUTINE bop_codeAnnular(RNUMBER)
use ConfigurationVariables
use SimulationVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
INTEGER RNUMBER, I



+ 8
- 8
Equipments/BopStack/PIPE_RAM1.f90 View File

@@ -1,10 +1,10 @@
SUBROUTINE PIPE_RAMS1
use ConfigurationVariables
use SimulationVariables
! USE CAccumulatorVariables
! USE CBopStackVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! ! use CSimulationVariables
implicit none
@@ -73,7 +73,7 @@ SUBROUTINE PIPE_RAMS1

data%State%RAM(2)%bop_type = 3
!AbopPipeRam=196.67
data%State%PipeRam1%A=(BopStackSpecification%UpperRamClose*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%A=(data%Configuration%BopStack%UpperRamClose*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%NeededVolume=data%State%PipeRam1%A*(data%State%PipeRam1%IDBase-max(data%State%PipeRam1%ODDrillpipe_in,data%State%PipeRam1%ODDrillpipe_inBase))/(2.*231) !3.67 galon for each BOP
endif
@@ -145,7 +145,7 @@ SUBROUTINE PIPE_RAMS1

data%State%RAM(2)%bop_type = 3
!AbopPipeRam=186.5
data%State%PipeRam1%A=(BopStackSpecification%UpperRamOpen*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%A=(data%Configuration%BopStack%UpperRamOpen*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%NeededVolume=data%State%PipeRam1%A*(data%State%PipeRam1%IDBase-max(data%State%PipeRam1%ODDrillpipe_in,data%State%PipeRam1%ODDrillpipe_inBase))/(2.*231) !3.48 galon for each BOP
endif
@@ -174,10 +174,10 @@ end if
SUBROUTINE PIPE_RAMS1_SUB
use ConfigurationVariables
use SimulationVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! use CSimulationVariables
implicit none
@@ -240,7 +240,7 @@ SUBROUTINE PIPE_RAMS1_SUB
data%State%RAM(2)%bop_type = 3
!AbopPipeRam=196.67
data%State%PipeRam1%A=(BopStackSpecification%UpperRamClose*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%A=(data%Configuration%BopStack%UpperRamClose*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
!write(*,*) 'NeededVolumeShearRams1=',NeededVolumeShearRams
data%State%PipeRam1%NeededVolume=data%State%PipeRam1%A*(data%State%PipeRam1%ID-max(data%State%PipeRam1%ODDrillpipe_in,data%State%PipeRam1%ODDrillpipe_inBase))/(2.*231)
! write(*,*) 'NeededVolumeShearRams2=',NeededVolumeShearRams
@@ -297,7 +297,7 @@ SUBROUTINE PIPE_RAMS1_SUB

data%State%RAM(2)%bop_type = 3
!AbopPipeRam=186.5
data%State%PipeRam1%A=(BopStackSpecification%UpperRamOpen*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%A=(data%Configuration%BopStack%UpperRamOpen*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%NeededVolume=data%State%PipeRam1%A*(data%State%PipeRam1%IDBase-data%State%PipeRam1%ID)/(2.*231)
data%State%RAM(2)%vdis_bottles=0.
data%State%RAM(2)%fvr_air=0.


+ 8
- 8
Equipments/BopStack/PIPE_RAM2.f90 View File

@@ -1,10 +1,10 @@

SUBROUTINE PIPE_RAMS2
use ConfigurationVariables
use SimulationVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! ! use CSimulationVariables
implicit none
@@ -85,7 +85,7 @@ SUBROUTINE PIPE_RAMS2

data%State%RAM(3)%bop_type = 3
!AbopPipeRam=196.67
data%State%PipeRam1%A=(BopStackSpecification%LowerRamClose*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%A=(data%Configuration%BopStack%LowerRamClose*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam2%NeededVolume=data%State%PipeRam1%A*(data%State%PipeRam1%IDBase-max(data%State%PipeRam2%ODDrillpipe_in,data%State%PipeRam1%ODDrillpipe_inBase))/(2.*231) !galon for each BOP
!write(*,*) 'close 1'
endif
@@ -158,7 +158,7 @@ SUBROUTINE PIPE_RAMS2

data%State%RAM(3)%bop_type = 3
!AbopPipeRam=186.5
data%State%PipeRam1%A=(BopStackSpecification%LowerRamOpen*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%A=(data%Configuration%BopStack%LowerRamOpen*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam2%NeededVolume=data%State%PipeRam1%A*(data%State%PipeRam1%IDBase-max(data%State%PipeRam2%ODDrillpipe_in,data%State%PipeRam1%ODDrillpipe_inBase))/(2.*231) !galon for each BOP
!write(*,*) 'open 1'
@@ -188,10 +188,10 @@ END SUBROUTINE PIPE_RAMS2
SUBROUTINE PIPE_RAMS2_SUB
use ConfigurationVariables
use SimulationVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! use CSimulationVariables
implicit none
@@ -258,7 +258,7 @@ SUBROUTINE PIPE_RAMS2_SUB
data%State%PipeRam2%Situation_forTD= 0 ! open - for TD code
data%State%RAM(3)%bop_type = 3
!AbopPipeRam=196.67
data%State%PipeRam1%A=(BopStackSpecification%LowerRamClose*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%A=(data%Configuration%BopStack%LowerRamClose*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam2%NeededVolume=data%State%PipeRam1%A*(data%State%PipeRam2%ID-max(data%State%PipeRam2%ODDrillpipe_in,data%State%PipeRam1%ODDrillpipe_inBase))/(2.*231)
data%State%RAM(3)%vdis_bottles=0.
@@ -315,7 +315,7 @@ SUBROUTINE PIPE_RAMS2_SUB
data%State%PipeRam2%Situation_forTD= 0 ! open - for TD code
data%State%RAM(3)%bop_type = 3
!AbopPipeRam=186.5
data%State%PipeRam1%A=(BopStackSpecification%LowerRamOpen*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam1%A=(data%Configuration%BopStack%LowerRamOpen*231)/((data%State%PipeRam1%IDBase-data%State%PipeRam1%ODDrillpipe_inBase)/2.)
data%State%PipeRam2%NeededVolume=data%State%PipeRam1%A*(data%State%PipeRam1%IDBase-data%State%PipeRam2%ID)/(2.*231)
data%State%RAM(3)%vdis_bottles=0.
data%State%RAM(3)%fvr_air=0.


+ 1
- 1
Equipments/BopStack/PipeRams1Main.f90 View File

@@ -18,7 +18,7 @@ module PipeRams1Main
end subroutine PipeRams1_Init
subroutine PipeRams1_Step
use ConfigurationVariables
use SimulationVariables
implicit none
if (data%State%PipeRam1%finished/=0) then
call PIPE_RAMS1


+ 1
- 1
Equipments/BopStack/PipeRams2Main.f90 View File

@@ -19,7 +19,7 @@
! end subroutine PipeRams2_Init
subroutine PipeRams2_Step
use ConfigurationVariables
use SimulationVariables
implicit none
if (data%State%PipeRam2%finished/=0) then
call PIPE_RAMS2


+ 7
- 7
Equipments/BopStack/SHEAR_RAM.f90 View File

@@ -1,9 +1,9 @@

SUBROUTINE SHEAR_RAMS
use ConfigurationVariables
use SimulationVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! use CSimulationVariables
implicit none
@@ -79,7 +79,7 @@ SUBROUTINE SHEAR_RAMS
data%State%RAM(4)%bop_type = 2
!NeededVolumeShearRams=5.8 !galon for each BOP
!AbopShearRam=196.67 !(in^2)
data%State%ShearRAM%AbopShearRam=(BopStackSpecification%BlindRamClose*231)/(data%State%ShearRAM%IDshearBopBase/2.)
data%State%ShearRAM%AbopShearRam=(data%Configuration%BopStack%BlindRamClose*231)/(data%State%ShearRAM%IDshearBopBase/2.)
!NeededVolumeShearRams=BlindRamClose !galon for each BOP **changed
data%State%ShearRAM%NeededVolumeShearRams=data%State%ShearRAM%AbopShearRam*(data%State%ShearRAM%IDshearBopBase-data%State%ShearRAM%ShearIsNotAllowed*data%State%ShearRAM%ODDrillpipe_inShearRam)/(2.*231) !3.67 galon for each BOP ! **changed
data%State%ShearRAM%VA=data%State%ShearRAM%AbopShearRam*(data%State%ShearRAM%IDshearBopBase-data%State%ShearRAM%ODDrillpipe_inShearRam)/(2.*231)
@@ -145,7 +145,7 @@ SUBROUTINE SHEAR_RAMS

data%State%RAM(4)%bop_type = 3
!AbopShearRam=186.5 !(in^2)
data%State%ShearRAM%AbopShearRam=(BopStackSpecification%BlindRamOpen*231)/(data%State%ShearRAM%IDshearBopBase/2.)
data%State%ShearRAM%AbopShearRam=(data%Configuration%BopStack%BlindRamOpen*231)/(data%State%ShearRAM%IDshearBopBase/2.)
!NeededVolumeShearRams=5.5 !galon for each BOP
!NeededVolumeShearRams=BlindRamOpen ! **changed
data%State%ShearRAM%NeededVolumeShearRams=data%State%ShearRAM%AbopShearRam*(data%State%ShearRAM%IDshearBopBase-data%State%ShearRAM%ShearIsNotAllowed*data%State%ShearRAM%ODDrillpipe_inShearRam)/(2.*231) !3.67 galon for each BOP ! **changed
@@ -164,10 +164,10 @@ END SUBROUTINE SHEAR_RAMS
SUBROUTINE SHEAR_RAMS_SUB
use ConfigurationVariables
use SimulationVariables
USE CBopStackVariables
use CBopControlPanel
use ConfigurationVariables
use SimulationVariables
USE CEquipmentsConstants
! use CSimulationVariables
implicit none
@@ -200,7 +200,7 @@ SUBROUTINE SHEAR_RAMS_SUB
CALL OpenMiddleRams ! for C code
data%State%RamLine%ShearBop_Situation_forTD= 0 ! open - for TD code
data%State%RAM(4)%bop_type = 2
data%State%ShearRAM%AbopShearRam=(BopStackSpecification%BlindRamClose*231)/(data%State%ShearRAM%IDshearBopBase/2.)
data%State%ShearRAM%AbopShearRam=(data%Configuration%BopStack%BlindRamClose*231)/(data%State%ShearRAM%IDshearBopBase/2.)
data%State%ShearRAM%NeededVolumeShearRams=data%State%ShearRAM%AbopShearRam*(data%State%ShearRAM%IDshearBop-data%State%ShearRAM%ShearIsNotAllowed*data%State%ShearRAM%ODDrillpipe_inShearRam)/(2.*231) ! **changed
data%State%RAM(4)%vdis_bottles=0.
data%State%RAM(4)%fvr_air=0.


+ 4
- 4
Equipments/ChokeControl/AirPump_Choke_Subs.f90 View File

@@ -2,7 +2,7 @@
SUBROUTINE DEALLOCATE_ARRAYS_CHOKE()
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@

implicit none
write(*,*) 'deallocateeeeeeeeeeeee'
@@ -28,7 +28,7 @@ DEALLOCATE (data%State%AirPumpLine%MINORS_AIRPUMP,data%State%AirPumpLine%MINORDI
SUBROUTINE LOSS_INPUTS_CHOKE()
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
Integer I

@@ -133,9 +133,9 @@ ENDDO
SUBROUTINE airpump_code_CHOKE(CHNUMBER)
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
use CChokeManifold
use ConfigurationVariables
use SimulationVariables
use CSounds
USE CChokeProblemsVariables
implicit none


+ 3
- 3
Equipments/ChokeControl/CHOKE.f90 View File

@@ -2,16 +2,16 @@
module ChokeModule
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
!use CDataDisplayConsole
! !@use ConfigurationVariables, CasingPressureDataDisplay=>CasingPressure!, StandPipePressureDataDisplay=>StandPipePressure
USE CChokeProblemsVariables
!use CChokeControlPanelVariables
! !@use ConfigurationVariables, StandPipePressureChoke=>StandPipePressure
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
use CChokeManifold
use ConfigurationVariables
use SimulationVariables
contains


+ 1
- 1
Equipments/ChokeControl/ChokeControlMain.f90 View File

@@ -1,6 +1,6 @@
module ChokeControlMain
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
public
contains


+ 1
- 1
Equipments/ChokeControl/ChokeStartup.f90 View File

@@ -1,7 +1,7 @@
SUBROUTINE Choke_StartUp()
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
USE CChokeProblemsVariables
implicit none


+ 1
- 1
Equipments/Drawworks/DWFixModeMotion.f90 View File

@@ -1,6 +1,6 @@
subroutine DWFixModeMotion
use ConfigurationVariables !@
use SimulationVariables !@
IMPLICIT NONE


+ 5
- 5
Equipments/Drawworks/DWMalfunction_MotorFailure.f90 View File

@@ -1,13 +1,13 @@
subroutine DWMalfunction_MotorFailure
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
use CDataDisplayConsole
use ConfigurationVariables
use SimulationVariables
use CHoistingVariables
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables
use SimulationVariables !@
IMPLICIT NONE


+ 1
- 1
Equipments/Drawworks/DrawworksMain.f90 View File

@@ -22,7 +22,7 @@ module DrawworksMain
end subroutine Drawworks_Step
subroutine DrawworksMainBody
use ConfigurationVariables !@
use SimulationVariables !@
implicit none
Call Drawworks_StartUp
loopdrawsim : do


+ 4
- 4
Equipments/Drawworks/Drawworks_Direction.f90 View File

@@ -1,11 +1,11 @@
subroutine Drawworks_Direction

use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
use CDataDisplayConsole
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables
use SimulationVariables !@

IMPLICIT NONE


+ 6
- 6
Equipments/Drawworks/Drawworks_INPUTS.f90 View File

@@ -1,17 +1,17 @@
subroutine Drawworks_Inputs

use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
! Use CSimulationVariables
use OperationScenariosModule
use CWarnings
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables
use SimulationVariables !@
Use TD_StringConnectionData
Use TD_DrillStemComponents
use ConfigurationVariables !@
use ConfigurationVariables !@
use SimulationVariables !@
use SimulationVariables !@
IMPLICIT NONE


+ 1
- 1
Equipments/Drawworks/Drawworks_MainSolver.f90 View File

@@ -1,6 +1,6 @@
subroutine Drawworks_MainSolver
use ConfigurationVariables !@
use SimulationVariables !@
IMPLICIT NONE


+ 4
- 4
Equipments/Drawworks/Drawworks_Outputs.f90 View File

@@ -2,12 +2,12 @@ subroutine Drawworks_Outputs
Use CSounds
use CHook
use ConfigurationVariables
use SimulationVariables
use CWarnings
use ConfigurationVariables !@
use SimulationVariables !@
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
IMPLICIT NONE


+ 1
- 1
Equipments/Drawworks/Drawworks_Solver.f90 View File

@@ -3,7 +3,7 @@ subroutine Drawworks_Solver
Use CUnityInputs
use UnitySignalVariables
use UnitySignalsModule
use ConfigurationVariables !@
use SimulationVariables !@
use OperationScenariosModule
use OperationScenariosModule !!CElevator...
use UnitySignalsModule


+ 1
- 1
Equipments/Drawworks/Drawworks_Solver_OffMode.f90 View File

@@ -3,7 +3,7 @@ subroutine Drawworks_Solver_OffMode
Use CUnityInputs
use UnitySignalVariables
use UnitySignalsModule
use ConfigurationVariables !@
use SimulationVariables !@
use OperationScenariosModule
use OperationScenariosModule !!CElevator...
use UnitySignalsModule


+ 4
- 4
Equipments/Drawworks/Drawworks_StartUp.f90 View File

@@ -1,11 +1,11 @@
subroutine Drawworks_StartUp

use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use SimulationVariables
use SimulationVariables
use CHoistingVariables
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables
use SimulationVariables !@
!use CWarnings
IMPLICIT NONE


+ 3
- 3
Equipments/DrillingConsole_ScrLEDs.f90 View File

@@ -1,9 +1,9 @@
subroutine DrillingConsole_ScrLEDs
use CDrillingConsoleVariables
use ConfigurationVariables
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables
use SimulationVariables
use SimulationVariables !@
IMPLICIT NONE


+ 1
- 1
Equipments/MudSystem/Circulation_Code_Select.f90 View File

@@ -2,7 +2,7 @@ subroutine CirculationCodeSelect ! is called in subroutine Fluid_Flow_Solver
use KickVARIABLESModule
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
USE TD_DrillStemComponents
Use CUnityInputs
Use CUnityOutputs


+ 5
- 5
Equipments/MudSystem/Deallocate_Normal_Circulation.f90 View File

@@ -1,6 +1,6 @@
subroutine DEALLOCATE_ARRAYS_NormalCirculation() ! is called in module FluidFlowMain
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none


@@ -100,7 +100,7 @@ if(allocated(data%State%MudSystem%GeoType)) deallocate(data%State%MudSystem%GeoT
subroutine RemoveAnnulusMudArrays(ilocal)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
INTEGER :: ilocal
@@ -124,7 +124,7 @@ use ConfigurationVariables !@@@
subroutine RemoveStringMudArrays(ilocal)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
INTEGER :: ilocal
@@ -147,7 +147,7 @@ use ConfigurationVariables !@@@
subroutine RemoveOpMudArrays(ilocal)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
INTEGER :: ilocal
@@ -169,7 +169,7 @@ use ConfigurationVariables !@@@
subroutine RemoveHzMudArrays(ilocal)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
INTEGER :: ilocal


+ 3
- 3
Equipments/MudSystem/Disconnecting_Pipe.f90 View File

@@ -3,9 +3,9 @@ subroutine DisconnectingPipe ! is called in subroutine CirculationCodeSelect
Use GeoElements_FluidModule
USE CMudPropertiesVariables
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables !@@@
use SimulationVariables
use SimulationVariables !@
! !use CTanks
!@use ConfigurationVariables, TripTankVolume2 => data%EquipmentControl%DrillingWatch%TripTankVolume, TripTankDensity2 => TripTankDensity
USE sROP_Other_Variables


+ 5
- 5
Equipments/MudSystem/Elements_Creation.f90 View File

@@ -3,18 +3,18 @@ subroutine ElementsCreation ! is called in subroutine Fluid_Flow_Solver
Use GeoElements_FluidModule
USE CMudPropertiesVariables
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use ConfigurationVariables
use SimulationVariables !@@@
use SimulationVariables
USE CHOKEVARIABLES
!use ConfigurationVariables !@
!use CDataDisplayConsole
!@ use ConfigurationVariables , StandPipePressureDataDisplay=>StandPipePressure
!use CManifolds
use ConfigurationVariables !@
use SimulationVariables !@
USE CHOKEVARIABLES
!use ConfigurationVariables !@
!use CChokeManifoldVariables
use ConfigurationVariables
use SimulationVariables
! !use CTanks
!@use ConfigurationVariables, TripTankVolume2 => data%EquipmentControl%DrillingWatch%TripTankVolume, TripTankDensity2 => TripTankDensity
USE sROP_Other_Variables
@@ -175,7 +175,7 @@ ALLOCATE (data%State%MudSystem%Xstart_OpSection(data%State%F_Counts%BottomHoleIn
call data%State%MudSystem%ChokeLine_MudDischarged_Volume%AddToFirst(data%State%MudSystem%ChokeLine_VolumeCapacity)
call data%State%MudSystem%ChokeLine_Mud_Backhead_X%AddToFirst (0.0d0)
call data%State%MudSystem%ChokeLine_Mud_Backhead_section%AddToFirst (1)
call data%State%MudSystem%ChokeLine_Mud_Forehead_X%AddToFirst (BopStackSpecification%ChokeLineLength)
call data%State%MudSystem%ChokeLine_Mud_Forehead_X%AddToFirst (data%Configuration%BopStack%ChokeLineLength)
call data%State%MudSystem%ChokeLine_Mud_Forehead_section%AddToFirst (1)
call data%State%MudSystem%ChokeLine_Density%AddToFirst (MudProperties%ActiveDensity) ! initial(ppg)
call data%State%MudSystem%ChokeLine_RemainedVolume_in_LastSection%AddToFirst (0.0d0)


+ 3
- 3
Equipments/MudSystem/FillingWell_By_BellNipple.f90 View File

@@ -6,9 +6,9 @@ subroutine FillingWell_By_BellNipple ! is called in subroutine CirculationCo
Use GeoElements_FluidModule
USE CMudPropertiesVariables
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables !@@@
use SimulationVariables
use SimulationVariables !@
!use CTanks
!@use ConfigurationVariables, TripTankVolume2 => data%EquipmentControl%DrillingWatch%TripTankVolume, TripTankDensity2 => TripTankDensity
USE sROP_Other_Variables


+ 6
- 6
Equipments/MudSystem/Kick_Expansion_and_Contraction.f90 View File

@@ -3,9 +3,9 @@ subroutine Kick_Expansion ! is called in subroutine CirculationCodeSelect
Use GeoElements_FluidModule
USE CMudPropertiesVariables
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables !@@@
use SimulationVariables
use SimulationVariables !@
!use CTanks !@use ConfigurationVariables, TripTankVolume2 => data%EquipmentControl%DrillingWatch%TripTankVolume, TripTankDensity2 => TripTankDensity
USE sROP_Other_Variables
USE sROP_Variables
@@ -127,9 +127,9 @@ subroutine Kick_Contraction ! is called in subroutine CirculationCodeSelect
Use GeoElements_FluidModule
USE CMudPropertiesVariables
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables !@@@
use SimulationVariables
use SimulationVariables !@
!use CTanks !@use ConfigurationVariables, TripTankVolume2 => data%EquipmentControl%DrillingWatch%TripTankVolume, TripTankDensity2 => TripTankDensity
USE sROP_Other_Variables
USE sROP_Variables


+ 5
- 5
Equipments/MudSystem/Kick_Influx.f90 View File

@@ -3,9 +3,9 @@ subroutine Kick_Influx ! is called in subroutine CirculationCodeSelect
Use GeoElements_FluidModule
USE CMudPropertiesVariables
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables !@@@
use SimulationVariables
use SimulationVariables !@
!use CTanks
! !@use ConfigurationVariables, TripTankVolume2 => data%EquipmentControl%DrillingWatch%TripTankVolume, TripTankDensity2 => TripTankDensity
USE sROP_Other_Variables
@@ -65,7 +65,7 @@ subroutine Instructor_CirculationMud_Edit ! is called in subroutine Circulat

use KickVARIABLESModule
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
USE TD_DrillStemComponents
Use CUnityInputs
Use CUnityOutputs
@@ -126,7 +126,7 @@ subroutine ShoeLostSub ! is called in subroutine CirculationCodeSelect

use KickVARIABLESModule
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
USE TD_DrillStemComponents
Use CUnityInputs
Use CUnityOutputs


+ 3
- 3
Equipments/MudSystem/Kick_Migration.f90 View File

@@ -3,9 +3,9 @@ subroutine Kick_Migration ! is called in subroutine CirculationCodeSelect
Use GeoElements_FluidModule
USE CMudPropertiesVariables
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables !@@@
use SimulationVariables
use SimulationVariables !@
!use CTanks
!@use ConfigurationVariables, TripTankVolume2 => data%EquipmentControl%DrillingWatch%TripTankVolume, TripTankDensity2 => TripTankDensity
USE sROP_Other_Variables


+ 27
- 27
Equipments/MudSystem/MudSystem.f90 View File

@@ -1,7 +1,7 @@
module MudSystemModule
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
use PressureDisplayVARIABLESModule
USE FricPressDropVarsModule
USE Fluid_Flow_Startup_Vars
@@ -15,7 +15,7 @@ use ConfigurationVariables !@@@
use CError
use CLog1
use CDataDisplayConsole
use ConfigurationVariables
use SimulationVariables
use CStudentStationVariables !, PitGainLossReset=>PitGainLossZero
@@ -320,9 +320,9 @@ use ConfigurationVariables !@@@
write(*,*) 'data%State%MudSystem%MudVolume_InjectedFromAnn-WellToBellNipple=' , data%State%MudSystem%MudVolume_InjectedFromAnn
write(*,*) 'int:::=' , (data%State%MudSystem%Ann_Mud_Forehead_X%Last() - BopStackSpecification%AboveAnnularHeight)
write(*,*) 'int:::=' , (data%State%MudSystem%Ann_Mud_Forehead_X%Last() - data%Configuration%BopStack%AboveAnnularHeight)
write(*,*) 'Ann_Mud_Forehead_X%Last()=' , data%State%MudSystem%Ann_Mud_Forehead_X%Last()
write(*,*) 'AboveAnnularHeight=' , BopStackSpecification%AboveAnnularHeight
write(*,*) 'AboveAnnularHeight=' , data%Configuration%BopStack%AboveAnnularHeight
write(*,*) 'Ann_Density%Last()=' , data%State%MudSystem%Ann_Density%Last()
CALL ErrorStop('error stop1')
@@ -627,21 +627,21 @@ use ConfigurationVariables !@@@
subroutine main
Use GeoElements_FluidModule
use ConfigurationVariables
use SimulationVariables
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
use CDataDisplayConsole
use ConfigurationVariables
use ConfigurationVariables !@
use SimulationVariables
use SimulationVariables !@
USE CHOKEVARIABLES
use ConfigurationVariables !@
use SimulationVariables !@
use CChokeManifoldVariables
use ConfigurationVariables
use SimulationVariables
use CTanks
use ConfigurationVariables
use SimulationVariables
use KickVARIABLESModule
use CHoistingVariables
use ConfigurationVariables
use SimulationVariables
! use CSimulationVariables
implicit none
@@ -653,9 +653,9 @@ use ConfigurationVariables !@
endif
!WRITE (*,*) 'MudSys_timeCounter', MudSys_timeCounter
if (PumpsSpecification%MudPump1ReliefValveIsSet==.false.) PumpsSpecification%MudPump1ReliefValvePressure=6000.
if (PumpsSpecification%MudPump2ReliefValveIsSet==.false.) PumpsSpecification%MudPump2ReliefValvePressure=6000.
if (PumpsSpecification%CementPumpReliefValveIsSet==.false.) PumpsSpecification%CementPumpReliefValvePressure=6000.
if (data%Configuration%Pumps%MudPump1ReliefValveIsSet==.false.) data%Configuration%Pumps%MudPump1ReliefValvePressure=6000.
if (data%Configuration%Pumps%MudPump2ReliefValveIsSet==.false.) data%Configuration%Pumps%MudPump2ReliefValvePressure=6000.
if (data%Configuration%Pumps%CementPumpReliefValveIsSet==.false.) data%Configuration%Pumps%CementPumpReliefValvePressure=6000.
!===========================================================================================================================
!===========================================================================================================================
! >>> Should Be on Top of Other Codes <<<
@@ -736,18 +736,18 @@ use ConfigurationVariables !@
!===========================================================================================================================
!===========================================================================================================================
! ****** Calculating Maximum Working Pressure
if (PumpsSpecification%MudPump1ReliefValveIsSet) then
MaxWorkingPressure1= PumpsSpecification%MudPump1ReliefValvePressure
if (data%Configuration%Pumps%MudPump1ReliefValveIsSet) then
MaxWorkingPressure1= data%Configuration%Pumps%MudPump1ReliefValvePressure
else
MaxWorkingPressure1= 6000. !psi
endif
if (PumpsSpecification%MudPump2ReliefValveIsSet) then
MaxWorkingPressure2= PumpsSpecification%MudPump2ReliefValvePressure
if (data%Configuration%Pumps%MudPump2ReliefValveIsSet) then
MaxWorkingPressure2= data%Configuration%Pumps%MudPump2ReliefValvePressure
else
MaxWorkingPressure2= 6000. !psi
endif
if (PumpsSpecification%CementPumpReliefValveIsSet) then
MaxWorkingPressure3= PumpsSpecification%CementPumpReliefValveIsSet
if (data%Configuration%Pumps%CementPumpReliefValveIsSet) then
MaxWorkingPressure3= data%Configuration%Pumps%CementPumpReliefValveIsSet
else
MaxWorkingPressure3= 6000. !psi
endif
@@ -849,7 +849,7 @@ use ConfigurationVariables !@
! Pump1BlownStarted = .TRUE.
!endif
!write(*,*) 'SimulationTime===', SimulationTime, Pump1BlownInTimeStep
if(PumpsSpecification%MudPump1ReliefValveIsSet .and. data%State%MudSystem%Pump1BlownCount >= BlownThreshold) then
if(data%Configuration%Pumps%MudPump1ReliefValveIsSet .and. data%State%MudSystem%Pump1BlownCount >= BlownThreshold) then
write(*,*) 'valve 65 open, BLOWN'
call ChangeValve(65, .TRUE.)
data%State%FricPressDrop%PumpToManifoldCompressedMudVol= 0.0
@@ -877,7 +877,7 @@ use ConfigurationVariables !@
! Pump2BlownStarted = .TRUE.
!endif
!if (MudPump2ReliefValveIsSet .and. SimulationTime >= Pump2BlownInTimeStep .and. Pump2BlownStarted) then
if (PumpsSpecification%MudPump2ReliefValveIsSet .and. data%State%MudSystem%Pump2BlownCount >= BlownThreshold) then
if (data%Configuration%Pumps%MudPump2ReliefValveIsSet .and. data%State%MudSystem%Pump2BlownCount >= BlownThreshold) then
write(*,*) 'valve 66 open, BLOWN'
call ChangeValve(66, .TRUE.)
data%State%FricPressDrop%PumpToManifoldCompressedMudVol= 0.0
@@ -896,7 +896,7 @@ use ConfigurationVariables !@
if(PumpPressure3 >= MaxWorkingPressure3 .and. MP3_Q > 0.0 ) then
data%State%MudSystem%Pump3BlownCount = data%State%MudSystem%Pump3BlownCount + 1
if (PumpsSpecification%CementPumpReliefValveIsSet .and. data%State%MudSystem%Pump3BlownCount >= BlownThreshold) then
if (data%Configuration%Pumps%CementPumpReliefValveIsSet .and. data%State%MudSystem%Pump3BlownCount >= BlownThreshold) then
!write(*,*) 'valve 67 open, BLOWN'
call ChangeValve(67, .TRUE.)
data%State%FricPressDrop%PumpToManifoldCompressedMudVol= 0.0
@@ -958,7 +958,7 @@ use ConfigurationVariables !@
!data%State%MUD(7)%Q= ( Ann_Saved_MudDischarged_Volume_Final+Ann_Kick_Saved_Volume_Final - ((Qlost/60.0d0)*DeltaT_Mudline) )*60.d0/DeltaT_Mudline
data%State%MUD(7)%Q= ( data%State%MudSystem%MudVolume_InjectedFromAnn + data%State%MudSystem%Ann_Kick_Saved_Volume )*60.d0/data%State%MudSystem%DeltaT_Mudline !Injected is referred only to Mud
if (j4 > 0) then
BellNipple_FlowCoef= 13.625/(13.625+BopStackSpecification%ChokeLineId) ! 13.625= BellNipple ID (inch)
BellNipple_FlowCoef= 13.625/(13.625+data%Configuration%BopStack%ChokeLineId) ! 13.625= BellNipple ID (inch)
data%State%MUD(7)%Q= BellNipple_FlowCoef * data%State%MUD(7)%Q
endif
@@ -1258,7 +1258,7 @@ use ConfigurationVariables !@
if (j9 > 0) then
ChokeLine_FlowCoef= BopStackSpecification%ChokeLineId/(13.625+BopStackSpecification%ChokeLineId) ! 13.625= BellNipple ID (inch)
ChokeLine_FlowCoef= data%Configuration%BopStack%ChokeLineId/(13.625+data%Configuration%BopStack%ChokeLineId) ! 13.625= BellNipple ID (inch)
data%State%MUD(4)%Q= ChokeLine_FlowCoef * data%State%MUD(4)%Q
endif

@@ -2701,7 +2701,7 @@ use ConfigurationVariables !@
end subroutine
subroutine WhenPathOpen(valves)
use ConfigurationVariables
use SimulationVariables
implicit none
integer, allocatable, intent (in) :: valves(:)
integer :: first, last


+ 21
- 21
Equipments/MudSystem/MudSystemStartup.f90 View File

@@ -1,15 +1,15 @@
SUBROUTINE NormalCirculation_StartUp() ! is called in module FluidFlowMain
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
use CTanks
use ConfigurationVariables
use SimulationVariables
USE CMudPropertiesVariables
Use GeoElements_FluidModule
use KickVARIABLESModule
Use CUnityOutputs
Use CShoeVariables
use ConfigurationVariables
use SimulationVariables
implicit none
@@ -118,17 +118,17 @@ data%State%MudSystem%FluidFlowCounter = 0
SUBROUTINE MudSystem_StartUp()
USE CMudPropertiesVariables
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
use CDataDisplayConsole
use ConfigurationVariables
use SimulationVariables
USE CHOKEVARIABLES
use ConfigurationVariables !@
use ConfigurationVariables
use SimulationVariables !@
use SimulationVariables
USE CBopStackVariables
use CPumpsVariables
use CPumps
use CTanks
use ConfigurationVariables
use SimulationVariables
use KickVARIABLESModule
implicit none
@@ -281,7 +281,7 @@ data%State%MudSystem%ReturnFlowRate=0.
SUBROUTINE MUDLINE_LOSS_INPUTS()
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
USE CBopStackVariables
use CPumpsVariables
use CPumps
@@ -299,12 +299,12 @@ data%State%MudSystem%NO_MudMinors=4
ALLOCATE (data%State%MudSystem%MudMinors(data%State%MudSystem%NO_MudMinors,4))

! ID(INCH) LF CV NOTE(BAR) DESCRIPTION
data%State%MudSystem%MudMinors(1,1)= PumpsSpecification%MudPump1Output
data%State%MudSystem%MudMinors(1,1)= data%Configuration%Pumps%MudPump1Output
data%State%MudSystem%MudMinors(1,2:4)= (/1.5*8., 0., 0./) !elbow (MLnumber=1,,PumpsToString)
data%State%MudSystem%MudMinors(2,1)= PumpsSpecification%MudPump1Output
data%State%MudSystem%MudMinors(2,1)= data%Configuration%Pumps%MudPump1Output
data%State%MudSystem%MudMinors(2,2:4)= (/1.5*6., 0., 0./) !elbow (MLnumber=2,,STGaugeToString)
data%State%MudSystem%MudMinors(3,1:4)= (/0., 0., 0., 0./) !elbow (MLnumber=3,,WellToPits)
data%State%MudSystem%MudMinors(4,1)= BopStackSpecification%ChokeLineId
data%State%MudSystem%MudMinors(4,1)= data%Configuration%BopStack%ChokeLineId
data%State%MudSystem%MudMinors(4,2:4)= (/1.5*7., 0., 0./) !elbow (MLnumber=4,,WellToChokeManifold)


@@ -332,17 +332,17 @@ data%State%MudSystem%NO_PIPINGSMUDLINE=4
ALLOCATE (data%State%MudSystem%PIPINGS_MUDLINE(data%State%MudSystem%NO_PIPINGSMUDLINE,3))

! ID(INCH) L(FEET) ROUGHNESS(MM)=e DESCRIPTION
data%State%MudSystem%PIPINGS_MUDLINE(1,1)= PumpsSpecification%MudPump1Output
data%State%MudSystem%PIPINGS_MUDLINE(1,1)= data%Configuration%Pumps%MudPump1Output
data%State%MudSystem%PIPINGS_MUDLINE(1,2:3)= (/265., 0.03/) !(MLnumber=1,,PumpsToString)
data%State%MudSystem%PIPINGS_MUDLINE(2,1)= PumpsSpecification%MudPump1Output
data%State%MudSystem%PIPINGS_MUDLINE(2,1)= data%Configuration%Pumps%MudPump1Output
data%State%MudSystem%PIPINGS_MUDLINE(2,2:3)= (/100., 0.03/) !(MLnumber=2,,STGaugeToString)
data%State%MudSystem%PIPINGS_MUDLINE(3,1:3)= (/0., 0., 0./) !(MLnumber=3,,WellToPits)
data%State%MudSystem%PIPINGS_MUDLINE(4,1)= BopStackSpecification%ChokeLineId
data%State%MudSystem%PIPINGS_MUDLINE(4,2)= BopStackSpecification%ChokeLineLength
data%State%MudSystem%PIPINGS_MUDLINE(4,1)= data%Configuration%BopStack%ChokeLineId
data%State%MudSystem%PIPINGS_MUDLINE(4,2)= data%Configuration%BopStack%ChokeLineLength
data%State%MudSystem%PIPINGS_MUDLINE(4,3)= 0.03 !(MLnumber=4,,WellToChokeManifold)

data%State%MudSystem%Area_ChokeLineFt= PII*((BopStackSpecification%ChokeLineId/12.)**2)/4. !D(in), AREA(ft^2)
data%State%MudSystem%ChokeLine_VolumeCapacity= data%State%MudSystem%Area_ChokeLineFt* BopStackSpecification%ChokeLineLength* 7.48051948 ! (gal)
data%State%MudSystem%Area_ChokeLineFt= PII*((data%Configuration%BopStack%ChokeLineId/12.)**2)/4. !D(in), AREA(ft^2)
data%State%MudSystem%ChokeLine_VolumeCapacity= data%State%MudSystem%Area_ChokeLineFt* data%Configuration%BopStack%ChokeLineLength* 7.48051948 ! (gal)

ALLOCATE (data%State%MudSystem%DIAM_MUDLINE_INCH(data%State%MudSystem%NO_PIPINGSMUDLINE), &
data%State%MudSystem%AREA_MUDLINE(data%State%MudSystem%NO_PIPINGSMUDLINE),data%State%MudSystem%LENGT_MUDLINE(data%State%MudSystem%NO_PIPINGSMUDLINE),data%State%MudSystem%ROUGHNESS_MUDLINE(data%State%MudSystem%NO_PIPINGSMUDLINE),data%State%MudSystem%RELROUGH_MUDLINE(data%State%MudSystem%NO_PIPINGSMUDLINE))
@@ -371,7 +371,7 @@ data%State%MudSystem%Pumps_Height= 0.
data%State%MudSystem%STpipeGauge_Height= 2. !(m)
data%State%MudSystem%Pits_Height= 1. !(m)
data%State%MudSystem%ChokeManifold_Height= 1.*0.3048 !(ft to meter)
data%State%MudSystem%WellChokeExit_Height= BopStackSpecification%GroundLevel-BopStackSpecification%KillHeight
data%State%MudSystem%WellChokeExit_Height= data%Configuration%BopStack%GroundLevel-data%Configuration%BopStack%KillHeight



@@ -393,7 +393,7 @@ data%State%MudSystem%WellChokeExit_Height= BopStackSpecification%GroundLevel-Bop
SUBROUTINE MUDLINE_LOSSES(MLnumber)
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
integer I
INTEGER MLnumber
@@ -454,7 +454,7 @@ data%State%MUD(4)%static_loss=(data%State%MudSystem%ChokeManifold_Height- data%S
SUBROUTINE DEALLOCATE_ARRAYS_MudSystem()
USE MudSystemVARIABLES
use ConfigurationVariables !@@@
use SimulationVariables !@@@
implicit none
!===========================================================================
! RAMLINE MINOR LOSSES INPUT


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save