diff --git a/CSharp/BasicInputs/Geology/CFormation.f90 b/CSharp/BasicInputs/Geology/CFormation.f90 index c30d3f8..83939b1 100644 --- a/CSharp/BasicInputs/Geology/CFormation.f90 +++ b/CSharp/BasicInputs/Geology/CFormation.f90 @@ -20,6 +20,7 @@ module CFormation call json%info(p, n_children=n_children) data%Configuration%Formation%Count = n_children + if (.not. allocated(data%Configuration%Formation%Formations) .or. size(data%Configuration%Formation%Formations)/=n_children) then ALLOCATE(data%Configuration%Formation%Formations(n_children)) endif diff --git a/CSharp/BasicInputs/WellProfile/CPathGeneration.f90 b/CSharp/BasicInputs/WellProfile/CPathGeneration.f90 index 9d2f9a1..98d4886 100644 --- a/CSharp/BasicInputs/WellProfile/CPathGeneration.f90 +++ b/CSharp/BasicInputs/WellProfile/CPathGeneration.f90 @@ -54,7 +54,6 @@ module CPathGeneration call json%get(parent,'Path',p) call json%get(p,'Items',pitems) call json%info(pitems, n_children=n_children) - if (.not. allocated(data%Configuration%Path%Items)) then ALLOCATE(data%Configuration%Path%Items(n_children)) endif diff --git a/CSharp/DownHole/DownHole.f90 b/CSharp/DownHole/DownHole.f90 index 561aeb0..d17f593 100644 --- a/CSharp/DownHole/DownHole.f90 +++ b/CSharp/DownHole/DownHole.f90 @@ -51,8 +51,8 @@ module DownHoleModule integer :: i, offset type(CFluid), intent(inout), target :: array(count) type(CFluid), pointer :: item - data%Equipments%DownHole%AnnalusFluidsCount = count - if(print_log) print*, 'AnnalusFluidsCount = ', count + ! data%Equipments%DownHole%AnnalusFluidsCount = count + ! if(print_log) print*, 'AnnalusFluidsCount = ', count if(size(data%Equipments%DownHole%AnnalusFluids) > 0) then deallocate(data%Equipments%DownHole%AnnalusFluids) end if @@ -103,7 +103,7 @@ module DownHoleModule type(CFluid), intent(inout), target :: array(count) type(CFluid), pointer :: item data%Equipments%DownHole%StringFluidsCount = count - if(print_log) print*, 'StringFluidsCount = ', count + ! if(print_log) print*, 'StringFluidsCount = ', count if(size(data%Equipments%DownHole%StringFluids) > 0) then deallocate(data%Equipments%DownHole%StringFluids) end if diff --git a/CSharp/Equipments/ControlPanels/CChokeControlPanel.f90 b/CSharp/Equipments/ControlPanels/CChokeControlPanel.f90 index e228cd3..4634335 100644 --- a/CSharp/Equipments/ControlPanels/CChokeControlPanel.f90 +++ b/CSharp/Equipments/ControlPanels/CChokeControlPanel.f90 @@ -21,7 +21,7 @@ module CChokeControlPanel if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokeControlLever") call jsonfile%get('Equipments.ChokeControl.ChokePanelRigAirSwitch',data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch,found) if ( .not. found ) call logg(4,"Not found: ChokeControlPanel%ChokePanelRigAirSwitch") - print *,data%Equipments%ChokeControlPanel%ChokeSelectorSwitch + ! print *,data%Equipments%ChokeControlPanel%ChokeSelectorSwitch end subroutine subroutine ChokeControlPanelToJson(parent) @@ -33,9 +33,9 @@ module CChokeControlPanel ! 1. create new node call json%create_object(p,'ChokeControl') call json%add(p,"ChokePanelPumpSelectorSwitch",data%Equipments%ChokeControlPanel%ChokePanelPumpSelectorSwitch) - ! call json%add(p,"ChokePanelStrokeResetSwitch",data%Equipments%ChokeControlPanel%ChokePanelStrokeResetSwitch) + call json%add(p,"ChokePanelStrokeResetSwitch",data%Equipments%ChokeControlPanel%ChokePanelStrokeResetSwitch) call json%add(p,"ChokeSelectorSwitch",data%Equipments%ChokeControlPanel%ChokeSelectorSwitch) - ! call json%add(p,"ChokeRateControlKnob",data%Equipments%ChokeControlPanel%ChokeRateControlKnob) + call json%add(p,"ChokeRateControlKnob",data%Equipments%ChokeControlPanel%ChokeRateControlKnob) call json%add(p,"ChokeControlLever",data%Equipments%ChokeControlPanel%ChokeControlLever) call json%add(p,"ChokePanelRigAirSwitch",data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch) ! call json%add(p,"EnableAutoChoke",data%Equipments%ChokeControlPanel%EnableAutoChoke) diff --git a/CSharp/Equipments/ControlPanels/CChokeManifold.f90 b/CSharp/Equipments/ControlPanels/CChokeManifold.f90 index 4c9ff5d..4d2388e 100644 --- a/CSharp/Equipments/ControlPanels/CChokeManifold.f90 +++ b/CSharp/Equipments/ControlPanels/CChokeManifold.f90 @@ -96,9 +96,9 @@ module CChokeManifold call ChangeValve(33, .true.) else if(v == 100) then - if(Manifold%Valve(33)%Status) call ChangeValve(33, .false.) + if(data%state%manifold%Valve(33)%Status) call ChangeValve(33, .false.) else - if(.not.Manifold%Valve(33)%Status) call ChangeValve(33, .true.) + if(.not.data%state%manifold%Valve(33)%Status) call ChangeValve(33, .true.) endif endif !WRITE (*,*) ' valve 33 ', Valve(33)%Status, ' arg ', v @@ -112,9 +112,9 @@ subroutine SetHydraulicChock2(v) call ChangeValve(34, .true.) else if(v==100) then - if(Manifold%Valve(34)%Status) call ChangeValve(34, .false.) + if(data%state%manifold%Valve(34)%Status) call ChangeValve(34, .false.) else - if(.not.Manifold%Valve(34)%Status) call ChangeValve(34, .true.) + if(.not.data%state%manifold%Valve(34)%Status) call ChangeValve(34, .true.) endif endif !WRITE (*,*) ' valve 34 ', Valve(34)%Status, ' arg ', v diff --git a/CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90 b/CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90 index b716ed2..9704a17 100644 --- a/CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90 +++ b/CSharp/Equipments/ControlPanels/CDataDisplayConsole.f90 @@ -108,7 +108,6 @@ module CDataDisplayConsole end subroutine subroutine DataDisplayConsoleToJson(parent) - type(json_value),pointer :: parent type(json_core) :: json type(json_value),pointer :: p diff --git a/CSharp/Equipments/ControlPanels/CDrillingConsole.f90 b/CSharp/Equipments/ControlPanels/CDrillingConsole.f90 index b9337a5..453fb0d 100644 --- a/CSharp/Equipments/ControlPanels/CDrillingConsole.f90 +++ b/CSharp/Equipments/ControlPanels/CDrillingConsole.f90 @@ -43,6 +43,7 @@ module CDrillingConsole if ( .not. found ) call logg(4,"Not found: DWSwitch") call jsonfile%get('Equipments.Drilling.DWThrottle',data%Equipments%DrillingConsole%DWThrottle,found) if ( .not. found ) call logg(4,"Not found: DWThrottle") + if (print_log .and. abs(data%Equipments%DrillingConsole%DWThrottle)>0) print *,"data%Equipments%DrillingConsole%DWThrottle = ",data%Equipments%DrillingConsole%DWThrottle call jsonfile%get('Equipments.Drilling.RTSwitch',data%Equipments%DrillingConsole%RTSwitch,found) if ( .not. found ) call logg(4,"Not found: RTSwitch") call jsonfile%get('Equipments.Drilling.RTThrottle',i,found) diff --git a/CSharp/Equipments/ControlPanels/CHook.f90 b/CSharp/Equipments/ControlPanels/CHook.f90 index 2a58c99..f2eec65 100644 --- a/CSharp/Equipments/ControlPanels/CHook.f90 +++ b/CSharp/Equipments/ControlPanels/CHook.f90 @@ -5,34 +5,24 @@ module CHook public contains - subroutine HookFromJson(parent) - type(json_value),pointer :: parent - type(json_core) :: json - type(json_value),pointer :: p,pval + ! subroutine HookFromJson(jsonfile) + ! type(json_file)::jsonfile + ! logical::found - ! 1. get related root - ! call json%get(parent,'Hook',p) - - ! ! 2. get member of data type from node - ! call json%get(p,'HookHeight_S',pval) - ! call json%get(pval,data%Equipments%Hook%HookHeight_S) - ! call json%get(p,'HookHeight',pval) - ! call json%get(pval,data%Equipments%Hook%HookHeight) - end subroutine - - subroutine HookToJson(parent) + ! call jsonfile%get('Equipments.HookHeight',data%State%Drawworks%Hook_Height_final,found) + ! if ( .not. found ) call logg(4,"Not found: Equipments.Hook.HookHeight") + ! end subroutine - type(json_value),pointer :: parent - type(json_core) :: json - type(json_value),pointer :: p + ! subroutine HookToJson(parent) + ! type(json_value),pointer :: parent + ! type(json_core) :: json + ! type(json_value),pointer :: p - ! 1. create new node - call json%create_object(p,'Hook') - call json%add(p,"HookHeight_S",data%Equipments%Hook%HookHeight_S) - call json%add(p,"HookHeight",data%Equipments%Hook%HookHeight) - - call json%add(parent,p) - end subroutine + ! ! 1. create new node + ! call json%create_object(p,'Hook') + ! call json%add(p,"Velocity",data%State%Drawworks%HookLinearVelocity_final) + ! call json%add(parent,p) + ! end subroutine subroutine Set_HookHeight(v) use CDrillingConsoleVariables diff --git a/CSharp/Equipments/ControlPanels/CStandPipeManifoldVariables.f90 b/CSharp/Equipments/ControlPanels/CStandPipeManifoldVariables.f90 index 7fb53e8..f357870 100644 --- a/CSharp/Equipments/ControlPanels/CStandPipeManifoldVariables.f90 +++ b/CSharp/Equipments/ControlPanels/CStandPipeManifoldVariables.f90 @@ -1,7 +1,7 @@ module CStandPipeManifoldVariables implicit none public - + !TODO: check and remove is unused Type::StandPipeManifoldType ! Input vars logical :: StandPipeManifoldValve1 diff --git a/CSharp/Equipments/MudPathFinding/CManifolds.f90 b/CSharp/Equipments/MudPathFinding/CManifolds.f90 index 43d67b8..4929dfb 100644 --- a/CSharp/Equipments/MudPathFinding/CManifolds.f90 +++ b/CSharp/Equipments/MudPathFinding/CManifolds.f90 @@ -1,46 +1,34 @@ module CManifolds - use CStack - use CArrangement + ! use CStack + ! use CArrangement use SimulationVariables - + use ManifoldVariables implicit none - public - integer, parameter :: ValveCount = 128 - integer, parameter :: MinSource = 71 - integer, parameter :: MaxSource = 90 - integer, parameter :: MinRelation = 91 - integer, parameter :: MaxRelation = 128 + contains + + subroutine ManifoldToJson(parent) + type(json_value),pointer :: parent + type(json_value),pointer :: p + type(json_core) :: json + logical :: valve_states(ValveCount) + integer :: i + ! 1. create new node + call json%create_object(p,'Manifold') + ! 2. add member of data type to new node + DO I=1,ValveCount + valve_states(i) = data%state%Manifold%Valve(i)%Status + ENDDO + + call json%add(p, "valves", valve_states) + ! 3. add new node to parent + call json%add(parent,p) + end subroutine - Type::ManifoldType - type(Arrangement) :: Valve(ValveCount) - type(Path), allocatable :: OpenPaths(:) - type(Stack) :: Fringe - logical :: IsRepititveOutput - - logical :: IsSafetyValveInstalled - logical :: IsSafetyValveInstalled_KellyMode - logical :: IsSafetyValveInstalled_TripMode - logical :: IsSafetyValveInstalled_TopDrive - logical :: SafetyValve - logical :: IsIBopInstalled - logical :: IBop - logical :: IsKellyCockInstalled - logical :: KellyCock - logical :: IsTopDriveIBopInstalled - logical :: TopDriveIBop - logical :: IsFloatValveInstalled - logical :: FloatValve - logical :: IsPathsDirty = .false. - logical :: IsTraverse = .false. - End type ManifoldType - type(ManifoldType)::Manifold - contains - subroutine PathFinding_Setup() ! use CSimulationVariables implicit none - Manifold%IsTraverse = .false. + data%state%manifold%IsTraverse = .false. call Setup() !call OnSimulationInitialization%Add(PathFinding_Init) !call OnSimulationStop%Add(PathFinding_Init) @@ -51,13 +39,13 @@ module CManifolds subroutine PathFinding_Init implicit none - Manifold%IsTraverse = .false. + data%state%manifold%IsTraverse = .false. call Setup() end subroutine PathFinding_Init subroutine PathFinding_Step - if (Manifold%IsPathsDirty) then - Manifold%IsPathsDirty = .false. + if (data%state%manifold%IsPathsDirty) then + data%state%manifold%IsPathsDirty = .false. call Traverse() endif end subroutine PathFinding_Step @@ -79,7 +67,7 @@ end subroutine PathFinding_Step ! end do loop ! end subroutine PathFindingMainBody - subroutine Traverse() + subroutine Traverse() bind(C,name="Traverse") use CLog5 implicit none integer :: i, Duration @@ -89,22 +77,22 @@ end subroutine PathFinding_Step !**call BeforeTraverse%RunAll() - if(allocated(Manifold%OpenPaths)) deallocate(Manifold%OpenPaths) + if(allocated(data%state%manifold%OpenPaths)) deallocate(data%state%manifold%OpenPaths) do i=MinSource, MaxSource if(IsValveOpen(i)) then call AddRootNode(i) - call AddChildren(Manifold%Valve(i)) + call AddChildren(data%state%manifold%Valve(i)) endif enddo - call PostProcess(Manifold%OpenPaths) + call PostProcess(data%state%manifold%OpenPaths) !**call AfterTraverse%RunAll() - Manifold%IsTraverse = .true. + data%state%manifold%IsTraverse = .true. !TODO: clean up -#ifdef Log5 + #ifdef Log5 CALL DATE_AND_TIME(values=EndTime) Duration= EndTime(8) - StartTime(8) !if(print_log) print*, 'Duration= ', Duration, 'ms' @@ -112,9 +100,8 @@ end subroutine PathFinding_Step call DisplayOpenPaths() call Log_5('==========================================') -#endif - - endsubroutine + #endif + end subroutine subroutine PostProcess(pathArr) implicit none @@ -141,7 +128,7 @@ end subroutine PathFinding_Step subroutine AddRootNode(valve) implicit none integer, intent(in) :: valve - call Manifold%Fringe%Push(valve) + call data%state%manifold%Fringe%Push(valve) end subroutine recursive subroutine AddChildren(node) @@ -149,33 +136,33 @@ end subroutine PathFinding_Step type(Arrangement), intent(inout) :: node integer :: i,t - do i=1, Manifold%Valve(node%Number)%Length() - t = Manifold%Valve(node%Number)%Adjacent(i) + do i=1, data%state%manifold%Valve(node%Number)%Length() + t = data%state%manifold%Valve(node%Number)%Adjacent(i) if(IsValveOpen(t)) then - if(Manifold%Fringe%DoesHave(t)) cycle + if(data%state%manifold%Fringe%DoesHave(t)) cycle - call Manifold%Fringe%Push(t) + call data%state%manifold%Fringe%Push(t) - if(Manifold%Valve(t)%IsSource()) then - call AddPath(Manifold%OpenPaths, Manifold%Fringe%List) - call Manifold%Fringe%Pop() + if(data%state%manifold%Valve(t)%IsSource()) then + call AddPath(data%state%manifold%OpenPaths, data%state%manifold%Fringe%List) + call data%state%manifold%Fringe%Pop() cycle endif - call AddChildren(Manifold%Valve(node%Adjacent(i))) + call AddChildren(data%state%manifold%Valve(node%Adjacent(i))) end if enddo - call Manifold%Fringe%Pop() + call data%state%manifold%Fringe%Pop() end subroutine logical function IsValveOpen(no) implicit none integer, intent(in) :: no - IsValveOpen = Manifold%Valve(no)%Status + IsValveOpen = data%state%manifold%Valve(no)%Status end function @@ -269,168 +256,168 @@ end subroutine PathFinding_Step ! initialize all valves do i = 1, ValveCount - call Manifold%Valve(i)%init(i) + call data%state%manifold%Valve(i)%init(i) end do ! open source valves do i = MinSource , MaxSource - Manifold%Valve(i)%Status = .true. - Manifold%Valve(i)%ValveType = InputOutput + data%state%manifold%Valve(i)%Status = .true. + data%state%manifold%Valve(i)%ValveType = InputOutput end do do i = MinRelation , MaxRelation - Manifold%Valve(i)%Status = .true. - Manifold%Valve(i)%ValveType = Relation + data%state%manifold%Valve(i)%Status = .true. + data%state%manifold%Valve(i)%ValveType = Relation end do ! make adjustments - call Manifold%Valve(1)%AdjacentTo(91) + call data%state%manifold%Valve(1)%AdjacentTo(91) - call Manifold%Valve(2)%AdjacentTo(92) - call Manifold%Valve(2)%AdjacentTo(117) + call data%state%manifold%Valve(2)%AdjacentTo(92) + call data%state%manifold%Valve(2)%AdjacentTo(117) - call Manifold%Valve(3)%AdjacentTo(93) - call Manifold%Valve(3)%AdjacentTo(118) + call data%state%manifold%Valve(3)%AdjacentTo(93) + call data%state%manifold%Valve(3)%AdjacentTo(118) - call Manifold%Valve(4)%AdjacentTo(94) + call data%state%manifold%Valve(4)%AdjacentTo(94) - call Manifold%Valve(5)%AdjacentTo(95) + call data%state%manifold%Valve(5)%AdjacentTo(95) - call Manifold%Valve(6)%AdjacentTo(91) - call Manifold%Valve(6)%AdjacentTo(92) + call data%state%manifold%Valve(6)%AdjacentTo(91) + call data%state%manifold%Valve(6)%AdjacentTo(92) - call Manifold%Valve(7)%AdjacentTo(92) - call Manifold%Valve(7)%AdjacentTo(93) + call data%state%manifold%Valve(7)%AdjacentTo(92) + call data%state%manifold%Valve(7)%AdjacentTo(93) - call Manifold%Valve(8)%AdjacentTo(93) - call Manifold%Valve(8)%AdjacentTo(94) + call data%state%manifold%Valve(8)%AdjacentTo(93) + call data%state%manifold%Valve(8)%AdjacentTo(94) - call Manifold%Valve(9)%AdjacentTo(91) - call Manifold%Valve(9)%AdjacentTo(96) + call data%state%manifold%Valve(9)%AdjacentTo(91) + call data%state%manifold%Valve(9)%AdjacentTo(96) - call Manifold%Valve(10)%AdjacentTo(94) - call Manifold%Valve(10)%AdjacentTo(98) + call data%state%manifold%Valve(10)%AdjacentTo(94) + call data%state%manifold%Valve(10)%AdjacentTo(98) - call Manifold%Valve(11)%AdjacentTo(96) - call Manifold%Valve(11)%AdjacentTo(97) + call data%state%manifold%Valve(11)%AdjacentTo(96) + call data%state%manifold%Valve(11)%AdjacentTo(97) - call Manifold%Valve(12)%AdjacentTo(97) - call Manifold%Valve(12)%AdjacentTo(98) + call data%state%manifold%Valve(12)%AdjacentTo(97) + call data%state%manifold%Valve(12)%AdjacentTo(98) - call Manifold%Valve(13)%AdjacentTo(96) - call Manifold%Valve(13)%AdjacentTo(99) + call data%state%manifold%Valve(13)%AdjacentTo(96) + call data%state%manifold%Valve(13)%AdjacentTo(99) - call Manifold%Valve(14)%AdjacentTo(78) - call Manifold%Valve(14)%AdjacentTo(97) + call data%state%manifold%Valve(14)%AdjacentTo(78) + call data%state%manifold%Valve(14)%AdjacentTo(97) !call Valve(14)%AdjacentTo(126) - call Manifold%Valve(15)%AdjacentTo(98) - call Manifold%Valve(15)%AdjacentTo(99) + call data%state%manifold%Valve(15)%AdjacentTo(98) + call data%state%manifold%Valve(15)%AdjacentTo(99) - call Manifold%Valve(16)%AdjacentTo(121) + call data%state%manifold%Valve(16)%AdjacentTo(121) !call Valve(16)%AdjacentTo() - call Manifold%Valve(17)%AdjacentTo(122) + call data%state%manifold%Valve(17)%AdjacentTo(122) !call Valve(17)%AdjacentTo() - call Manifold%Valve(18)%AdjacentTo(123) + call data%state%manifold%Valve(18)%AdjacentTo(123) !call Valve(18)%AdjacentTo() - call Manifold%Valve(19)%AdjacentTo(101) - call Manifold%Valve(19)%AdjacentTo(102) + call data%state%manifold%Valve(19)%AdjacentTo(101) + call data%state%manifold%Valve(19)%AdjacentTo(102) - call Manifold%Valve(20)%AdjacentTo(100) + call data%state%manifold%Valve(20)%AdjacentTo(100) - call Manifold%Valve(21)%AdjacentTo(101) + call data%state%manifold%Valve(21)%AdjacentTo(101) - call Manifold%Valve(22)%AdjacentTo(102) + call data%state%manifold%Valve(22)%AdjacentTo(102) - call Manifold%Valve(23)%AdjacentTo(71) + call data%state%manifold%Valve(23)%AdjacentTo(71) - call Manifold%Valve(24)%AdjacentTo(71) + call data%state%manifold%Valve(24)%AdjacentTo(71) - call Manifold%Valve(25)%AdjacentTo(108) - call Manifold%Valve(25)%AdjacentTo(118) + call data%state%manifold%Valve(25)%AdjacentTo(108) + call data%state%manifold%Valve(25)%AdjacentTo(118) - call Manifold%Valve(26)%AdjacentTo(109) - call Manifold%Valve(26)%AdjacentTo(117) + call data%state%manifold%Valve(26)%AdjacentTo(109) + call data%state%manifold%Valve(26)%AdjacentTo(117) - call Manifold%Valve(27)%AdjacentTo(32) - call Manifold%Valve(27)%AdjacentTo(108) + call data%state%manifold%Valve(27)%AdjacentTo(32) + call data%state%manifold%Valve(27)%AdjacentTo(108) - call Manifold%Valve(28)%AdjacentTo(33) - call Manifold%Valve(28)%AdjacentTo(108) + call data%state%manifold%Valve(28)%AdjacentTo(33) + call data%state%manifold%Valve(28)%AdjacentTo(108) - call Manifold%Valve(29)%AdjacentTo(110) - call Manifold%Valve(29)%AdjacentTo(113) + call data%state%manifold%Valve(29)%AdjacentTo(110) + call data%state%manifold%Valve(29)%AdjacentTo(113) - call Manifold%Valve(30)%AdjacentTo(34) - call Manifold%Valve(30)%AdjacentTo(109) + call data%state%manifold%Valve(30)%AdjacentTo(34) + call data%state%manifold%Valve(30)%AdjacentTo(109) - call Manifold%Valve(31)%AdjacentTo(35) - call Manifold%Valve(31)%AdjacentTo(109) + call data%state%manifold%Valve(31)%AdjacentTo(35) + call data%state%manifold%Valve(31)%AdjacentTo(109) - call Manifold%Valve(32)%AdjacentTo(27) - call Manifold%Valve(32)%AdjacentTo(61) + call data%state%manifold%Valve(32)%AdjacentTo(27) + call data%state%manifold%Valve(32)%AdjacentTo(61) - call Manifold%Valve(33)%AdjacentTo(28) - call Manifold%Valve(33)%AdjacentTo(62) + call data%state%manifold%Valve(33)%AdjacentTo(28) + call data%state%manifold%Valve(33)%AdjacentTo(62) - call Manifold%Valve(34)%AdjacentTo(30) - call Manifold%Valve(34)%AdjacentTo(63) + call data%state%manifold%Valve(34)%AdjacentTo(30) + call data%state%manifold%Valve(34)%AdjacentTo(63) - call Manifold%Valve(35)%AdjacentTo(31) - call Manifold%Valve(35)%AdjacentTo(64) + call data%state%manifold%Valve(35)%AdjacentTo(31) + call data%state%manifold%Valve(35)%AdjacentTo(64) - call Manifold%Valve(36)%AdjacentTo(116) + call data%state%manifold%Valve(36)%AdjacentTo(116) - call Manifold%Valve(37)%AdjacentTo(78) + call data%state%manifold%Valve(37)%AdjacentTo(78) - call Manifold%Valve(38)%AdjacentTo(71) + call data%state%manifold%Valve(38)%AdjacentTo(71) - call Manifold%Valve(39)%AdjacentTo(77) + call data%state%manifold%Valve(39)%AdjacentTo(77) !call Valve(40)%AdjacentTo(105) - call Manifold%Valve(40)%AdjacentTo(80) + call data%state%manifold%Valve(40)%AdjacentTo(80) - call Manifold%Valve(41)%AdjacentTo(77) + call data%state%manifold%Valve(41)%AdjacentTo(77) - call Manifold%Valve(42)%AdjacentTo(71) + call data%state%manifold%Valve(42)%AdjacentTo(71) - call Manifold%Valve(43)%AdjacentTo(106) + call data%state%manifold%Valve(43)%AdjacentTo(106) - call Manifold%Valve(44)%AdjacentTo(77) + call data%state%manifold%Valve(44)%AdjacentTo(77) - call Manifold%Valve(45)%AdjacentTo(71) + call data%state%manifold%Valve(45)%AdjacentTo(71) - call Manifold%Valve(46)%AdjacentTo(104) + call data%state%manifold%Valve(46)%AdjacentTo(104) - call Manifold%Valve(47)%AdjacentTo(104) - call Manifold%Valve(47)%AdjacentTo(117) + call data%state%manifold%Valve(47)%AdjacentTo(104) + call data%state%manifold%Valve(47)%AdjacentTo(117) - call Manifold%Valve(48)%AdjacentTo(69) - call Manifold%Valve(48)%AdjacentTo(79) + call data%state%manifold%Valve(48)%AdjacentTo(69) + call data%state%manifold%Valve(48)%AdjacentTo(79) - call Manifold%Valve(49)%AdjacentTo(104) - call Manifold%Valve(49)%AdjacentTo(79) + call data%state%manifold%Valve(49)%AdjacentTo(104) + call data%state%manifold%Valve(49)%AdjacentTo(79) !call Valve(50)%AdjacentTo(48) - call Manifold%Valve(50)%AdjacentTo(51) + call data%state%manifold%Valve(50)%AdjacentTo(51) !call Valve(50)%AdjacentTo(54) - call Manifold%Valve(50)%AdjacentTo(104) + call data%state%manifold%Valve(50)%AdjacentTo(104) - call Manifold%Valve(51)%AdjacentTo(50) - call Manifold%Valve(51)%AdjacentTo(52) + call data%state%manifold%Valve(51)%AdjacentTo(50) + call data%state%manifold%Valve(51)%AdjacentTo(52) - call Manifold%Valve(52)%AdjacentTo(51) + call data%state%manifold%Valve(52)%AdjacentTo(51) !call Valve(52)%AdjacentTo(127) - call Manifold%Valve(52)%AdjacentTo(80) + call data%state%manifold%Valve(52)%AdjacentTo(80) !call Valve(53)%AdjacentTo(103) !call Valve(53)%AdjacentTo(105) - call Manifold%Valve(53)%AdjacentTo(80) + call data%state%manifold%Valve(53)%AdjacentTo(80) !call Valve(54)%AdjacentTo(69) !call Valve(54)%AdjacentTo(124) @@ -438,79 +425,79 @@ end subroutine PathFinding_Step !call Valve(55)%AdjacentTo(103) !call Valve(55)%AdjacentTo(124) - call Manifold%Valve(56)%AdjacentTo(128) - call Manifold%Valve(56)%AdjacentTo(127) + call data%state%manifold%Valve(56)%AdjacentTo(128) + call data%state%manifold%Valve(56)%AdjacentTo(127) !call Valve(57)%AdjacentTo(14) !call Valve(57)%AdjacentTo(103) !call Valve(57)%AdjacentTo(126) - call Manifold%Valve(58)%AdjacentTo(78) + call data%state%manifold%Valve(58)%AdjacentTo(78) - call Manifold%Valve(59)%AdjacentTo(78) + call data%state%manifold%Valve(59)%AdjacentTo(78) - call Manifold%Valve(60)%AdjacentTo(78) + call data%state%manifold%Valve(60)%AdjacentTo(78) - call Manifold%Valve(61)%AdjacentTo(32) - call Manifold%Valve(61)%AdjacentTo(115) + call data%state%manifold%Valve(61)%AdjacentTo(32) + call data%state%manifold%Valve(61)%AdjacentTo(115) - call Manifold%Valve(62)%AdjacentTo(33) - call Manifold%Valve(62)%AdjacentTo(114) + call data%state%manifold%Valve(62)%AdjacentTo(33) + call data%state%manifold%Valve(62)%AdjacentTo(114) - call Manifold%Valve(63)%AdjacentTo(112) - call Manifold%Valve(63)%AdjacentTo(34) + call data%state%manifold%Valve(63)%AdjacentTo(112) + call data%state%manifold%Valve(63)%AdjacentTo(34) - call Manifold%Valve(64)%AdjacentTo(35) - call Manifold%Valve(64)%AdjacentTo(111) + call data%state%manifold%Valve(64)%AdjacentTo(35) + call data%state%manifold%Valve(64)%AdjacentTo(111) - call Manifold%Valve(65)%AdjacentTo(120) + call data%state%manifold%Valve(65)%AdjacentTo(120) - call Manifold%Valve(66)%AdjacentTo(120) + call data%state%manifold%Valve(66)%AdjacentTo(120) - call Manifold%Valve(67)%AdjacentTo(73) + call data%state%manifold%Valve(67)%AdjacentTo(73) - call Manifold%Valve(68)%AdjacentTo(125) - call Manifold%Valve(68)%AdjacentTo(126) + call data%state%manifold%Valve(68)%AdjacentTo(125) + call data%state%manifold%Valve(68)%AdjacentTo(126) - call Manifold%Valve(69)%AdjacentTo(48) - call Manifold%Valve(69)%AdjacentTo(124) + call data%state%manifold%Valve(69)%AdjacentTo(48) + call data%state%manifold%Valve(69)%AdjacentTo(124) !call Valve(70)%AdjacentTo() !call Valve(70)%AdjacentTo() - call Manifold%Valve(71)%AdjacentTo(20) - call Manifold%Valve(71)%AdjacentTo(44) - call Manifold%Valve(71)%AdjacentTo(59) + call data%state%manifold%Valve(71)%AdjacentTo(20) + call data%state%manifold%Valve(71)%AdjacentTo(44) + call data%state%manifold%Valve(71)%AdjacentTo(59) - call Manifold%Valve(72)%AdjacentTo(21) - call Manifold%Valve(72)%AdjacentTo(23) + call data%state%manifold%Valve(72)%AdjacentTo(21) + call data%state%manifold%Valve(72)%AdjacentTo(23) - call Manifold%Valve(73)%AdjacentTo(22) + call data%state%manifold%Valve(73)%AdjacentTo(22) - call Manifold%Valve(74)%AdjacentTo(24) + call data%state%manifold%Valve(74)%AdjacentTo(24) !call Valve(75)%AdjacentTo() !call Valve(76)%AdjacentTo() - call Manifold%Valve(77)%AdjacentTo(43) - call Manifold%Valve(77)%AdjacentTo(58) + call data%state%manifold%Valve(77)%AdjacentTo(43) + call data%state%manifold%Valve(77)%AdjacentTo(58) !call Valve(78)%AdjacentTo() - call Manifold%Valve(79)%AdjacentTo(48) - call Manifold%Valve(79)%AdjacentTo(49) + call data%state%manifold%Valve(79)%AdjacentTo(48) + call data%state%manifold%Valve(79)%AdjacentTo(49) - call Manifold%Valve(80)%AdjacentTo(52) - call Manifold%Valve(80)%AdjacentTo(107) + call data%state%manifold%Valve(80)%AdjacentTo(52) + call data%state%manifold%Valve(80)%AdjacentTo(107) - call Manifold%Valve(81)%AdjacentTo(53) + call data%state%manifold%Valve(81)%AdjacentTo(53) - call Manifold%Valve(82)%AdjacentTo(16) + call data%state%manifold%Valve(82)%AdjacentTo(16) - call Manifold%Valve(83)%AdjacentTo(17) + call data%state%manifold%Valve(83)%AdjacentTo(17) - call Manifold%Valve(84)%AdjacentTo(18) + call data%state%manifold%Valve(84)%AdjacentTo(18) !call Valve(85)%AdjacentTo() @@ -524,161 +511,161 @@ end subroutine PathFinding_Step !call Valve(90)%AdjacentTo() - call Manifold%Valve(91)%AdjacentTo(6) - call Manifold%Valve(91)%AdjacentTo(9) - call Manifold%Valve(91)%AdjacentTo(75) + call data%state%manifold%Valve(91)%AdjacentTo(6) + call data%state%manifold%Valve(91)%AdjacentTo(9) + call data%state%manifold%Valve(91)%AdjacentTo(75) - call Manifold%Valve(92)%AdjacentTo(6) - call Manifold%Valve(92)%AdjacentTo(7) - call Manifold%Valve(92)%AdjacentTo(2) + call data%state%manifold%Valve(92)%AdjacentTo(6) + call data%state%manifold%Valve(92)%AdjacentTo(7) + call data%state%manifold%Valve(92)%AdjacentTo(2) - call Manifold%Valve(93)%AdjacentTo(3) - call Manifold%Valve(93)%AdjacentTo(7) - call Manifold%Valve(93)%AdjacentTo(8) + call data%state%manifold%Valve(93)%AdjacentTo(3) + call data%state%manifold%Valve(93)%AdjacentTo(7) + call data%state%manifold%Valve(93)%AdjacentTo(8) - call Manifold%Valve(94)%AdjacentTo(8) - call Manifold%Valve(94)%AdjacentTo(10) - call Manifold%Valve(94)%AdjacentTo(95) + call data%state%manifold%Valve(94)%AdjacentTo(8) + call data%state%manifold%Valve(94)%AdjacentTo(10) + call data%state%manifold%Valve(94)%AdjacentTo(95) - call Manifold%Valve(95)%AdjacentTo(76) - call Manifold%Valve(95)%AdjacentTo(94) + call data%state%manifold%Valve(95)%AdjacentTo(76) + call data%state%manifold%Valve(95)%AdjacentTo(94) - call Manifold%Valve(96)%AdjacentTo(9) - call Manifold%Valve(96)%AdjacentTo(11) - call Manifold%Valve(96)%AdjacentTo(13) + call data%state%manifold%Valve(96)%AdjacentTo(9) + call data%state%manifold%Valve(96)%AdjacentTo(11) + call data%state%manifold%Valve(96)%AdjacentTo(13) - call Manifold%Valve(97)%AdjacentTo(11) - call Manifold%Valve(97)%AdjacentTo(12) - call Manifold%Valve(97)%AdjacentTo(14) + call data%state%manifold%Valve(97)%AdjacentTo(11) + call data%state%manifold%Valve(97)%AdjacentTo(12) + call data%state%manifold%Valve(97)%AdjacentTo(14) - call Manifold%Valve(98)%AdjacentTo(10) - call Manifold%Valve(98)%AdjacentTo(12) - call Manifold%Valve(98)%AdjacentTo(15) + call data%state%manifold%Valve(98)%AdjacentTo(10) + call data%state%manifold%Valve(98)%AdjacentTo(12) + call data%state%manifold%Valve(98)%AdjacentTo(15) - call Manifold%Valve(99)%AdjacentTo(13) - call Manifold%Valve(99)%AdjacentTo(15) - call Manifold%Valve(99)%AdjacentTo(125) + call data%state%manifold%Valve(99)%AdjacentTo(13) + call data%state%manifold%Valve(99)%AdjacentTo(15) + call data%state%manifold%Valve(99)%AdjacentTo(125) !call Valve(100)%AdjacentTo(16) - call Manifold%Valve(100)%AdjacentTo(82) - call Manifold%Valve(100)%AdjacentTo(101) + call data%state%manifold%Valve(100)%AdjacentTo(82) + call data%state%manifold%Valve(100)%AdjacentTo(101) !call Valve(101)%AdjacentTo(17) - call Manifold%Valve(101)%AdjacentTo(19) - call Manifold%Valve(101)%AdjacentTo(83) - call Manifold%Valve(101)%AdjacentTo(100) + call data%state%manifold%Valve(101)%AdjacentTo(19) + call data%state%manifold%Valve(101)%AdjacentTo(83) + call data%state%manifold%Valve(101)%AdjacentTo(100) !call Valve(102)%AdjacentTo(18) - call Manifold%Valve(102)%AdjacentTo(19) - call Manifold%Valve(102)%AdjacentTo(84) + call data%state%manifold%Valve(102)%AdjacentTo(19) + call data%state%manifold%Valve(102)%AdjacentTo(84) !call Valve(103)%AdjacentTo(53) !call Valve(103)%AdjacentTo(56) - call Manifold%Valve(103)%AdjacentTo(124) + call data%state%manifold%Valve(103)%AdjacentTo(124) !call Valve(103)%AdjacentTo(56) !call Valve(103)%AdjacentTo(78) - call Manifold%Valve(104)%AdjacentTo(46) - call Manifold%Valve(104)%AdjacentTo(47) - call Manifold%Valve(104)%AdjacentTo(49) - call Manifold%Valve(104)%AdjacentTo(50) + call data%state%manifold%Valve(104)%AdjacentTo(46) + call data%state%manifold%Valve(104)%AdjacentTo(47) + call data%state%manifold%Valve(104)%AdjacentTo(49) + call data%state%manifold%Valve(104)%AdjacentTo(50) !call Valve(105)%AdjacentTo(53) !call Valve(105)%AdjacentTo(107) !call Valve(105)%AdjacentTo(127) - call Manifold%Valve(106)%AdjacentTo(40) - call Manifold%Valve(106)%AdjacentTo(45) + call data%state%manifold%Valve(106)%AdjacentTo(40) + call data%state%manifold%Valve(106)%AdjacentTo(45) - call Manifold%Valve(107)%AdjacentTo(41) + call data%state%manifold%Valve(107)%AdjacentTo(41) !call Valve(107)%AdjacentTo(105) - call Manifold%Valve(107)%AdjacentTo(119) + call data%state%manifold%Valve(107)%AdjacentTo(119) !call Valve(107)%AdjacentTo(42) - call Manifold%Valve(108)%AdjacentTo(25) - call Manifold%Valve(108)%AdjacentTo(27) - call Manifold%Valve(108)%AdjacentTo(28) - call Manifold%Valve(108)%AdjacentTo(110) + call data%state%manifold%Valve(108)%AdjacentTo(25) + call data%state%manifold%Valve(108)%AdjacentTo(27) + call data%state%manifold%Valve(108)%AdjacentTo(28) + call data%state%manifold%Valve(108)%AdjacentTo(110) - call Manifold%Valve(109)%AdjacentTo(26) - call Manifold%Valve(109)%AdjacentTo(30) - call Manifold%Valve(109)%AdjacentTo(31) - call Manifold%Valve(109)%AdjacentTo(110) + call data%state%manifold%Valve(109)%AdjacentTo(26) + call data%state%manifold%Valve(109)%AdjacentTo(30) + call data%state%manifold%Valve(109)%AdjacentTo(31) + call data%state%manifold%Valve(109)%AdjacentTo(110) - call Manifold%Valve(110)%AdjacentTo(29) - call Manifold%Valve(110)%AdjacentTo(85) - call Manifold%Valve(110)%AdjacentTo(108) - call Manifold%Valve(110)%AdjacentTo(109) + call data%state%manifold%Valve(110)%AdjacentTo(29) + call data%state%manifold%Valve(110)%AdjacentTo(85) + call data%state%manifold%Valve(110)%AdjacentTo(108) + call data%state%manifold%Valve(110)%AdjacentTo(109) - call Manifold%Valve(111)%AdjacentTo(37) - call Manifold%Valve(111)%AdjacentTo(64) - call Manifold%Valve(111)%AdjacentTo(112) + call data%state%manifold%Valve(111)%AdjacentTo(37) + call data%state%manifold%Valve(111)%AdjacentTo(64) + call data%state%manifold%Valve(111)%AdjacentTo(112) - call Manifold%Valve(112)%AdjacentTo(63) - call Manifold%Valve(112)%AdjacentTo(111) - call Manifold%Valve(112)%AdjacentTo(113) + call data%state%manifold%Valve(112)%AdjacentTo(63) + call data%state%manifold%Valve(112)%AdjacentTo(111) + call data%state%manifold%Valve(112)%AdjacentTo(113) - call Manifold%Valve(113)%AdjacentTo(29) - call Manifold%Valve(113)%AdjacentTo(112) - call Manifold%Valve(113)%AdjacentTo(114) + call data%state%manifold%Valve(113)%AdjacentTo(29) + call data%state%manifold%Valve(113)%AdjacentTo(112) + call data%state%manifold%Valve(113)%AdjacentTo(114) - call Manifold%Valve(114)%AdjacentTo(62) - call Manifold%Valve(114)%AdjacentTo(113) - call Manifold%Valve(114)%AdjacentTo(115) + call data%state%manifold%Valve(114)%AdjacentTo(62) + call data%state%manifold%Valve(114)%AdjacentTo(113) + call data%state%manifold%Valve(114)%AdjacentTo(115) - call Manifold%Valve(115)%AdjacentTo(36) - call Manifold%Valve(115)%AdjacentTo(61) - call Manifold%Valve(115)%AdjacentTo(114) + call data%state%manifold%Valve(115)%AdjacentTo(36) + call data%state%manifold%Valve(115)%AdjacentTo(61) + call data%state%manifold%Valve(115)%AdjacentTo(114) - call Manifold%Valve(116)%AdjacentTo(38) - call Manifold%Valve(116)%AdjacentTo(39) + call data%state%manifold%Valve(116)%AdjacentTo(38) + call data%state%manifold%Valve(116)%AdjacentTo(39) - call Manifold%Valve(117)%AdjacentTo(2) - call Manifold%Valve(117)%AdjacentTo(26) - call Manifold%Valve(117)%AdjacentTo(47) + call data%state%manifold%Valve(117)%AdjacentTo(2) + call data%state%manifold%Valve(117)%AdjacentTo(26) + call data%state%manifold%Valve(117)%AdjacentTo(47) - call Manifold%Valve(118)%AdjacentTo(3) - call Manifold%Valve(118)%AdjacentTo(25) - call Manifold%Valve(118)%AdjacentTo(46) + call data%state%manifold%Valve(118)%AdjacentTo(3) + call data%state%manifold%Valve(118)%AdjacentTo(25) + call data%state%manifold%Valve(118)%AdjacentTo(46) - call Manifold%Valve(119)%AdjacentTo(42) - call Manifold%Valve(119)%AdjacentTo(60) - call Manifold%Valve(119)%AdjacentTo(107) + call data%state%manifold%Valve(119)%AdjacentTo(42) + call data%state%manifold%Valve(119)%AdjacentTo(60) + call data%state%manifold%Valve(119)%AdjacentTo(107) - call Manifold%Valve(120)%AdjacentTo(71) + call data%state%manifold%Valve(120)%AdjacentTo(71) !call Valve(121)%AdjacentTo(16) - call Manifold%Valve(121)%AdjacentTo(1) - call Manifold%Valve(121)%AdjacentTo(65) + call data%state%manifold%Valve(121)%AdjacentTo(1) + call data%state%manifold%Valve(121)%AdjacentTo(65) !call Valve(122)%AdjacentTo(17) - call Manifold%Valve(122)%AdjacentTo(4) - call Manifold%Valve(122)%AdjacentTo(66) + call data%state%manifold%Valve(122)%AdjacentTo(4) + call data%state%manifold%Valve(122)%AdjacentTo(66) !call Valve(123)%AdjacentTo(18) - call Manifold%Valve(123)%AdjacentTo(5) - call Manifold%Valve(123)%AdjacentTo(67) + call data%state%manifold%Valve(123)%AdjacentTo(5) + call data%state%manifold%Valve(123)%AdjacentTo(67) !call Valve(124)%AdjacentTo(54) !call Valve(124)%AdjacentTo(55) - call Manifold%Valve(124)%AdjacentTo(69) - call Manifold%Valve(124)%AdjacentTo(103) + call data%state%manifold%Valve(124)%AdjacentTo(69) + call data%state%manifold%Valve(124)%AdjacentTo(103) - call Manifold%Valve(125)%AdjacentTo(68) - call Manifold%Valve(125)%AdjacentTo(99) + call data%state%manifold%Valve(125)%AdjacentTo(68) + call data%state%manifold%Valve(125)%AdjacentTo(99) ! call Valve(125)%AdjacentTo(126) - call Manifold%Valve(126)%AdjacentTo(128) - call Manifold%Valve(126)%AdjacentTo(68) + call data%state%manifold%Valve(126)%AdjacentTo(128) + call data%state%manifold%Valve(126)%AdjacentTo(68) !call Valve(126)%AdjacentTo(125) - call Manifold%Valve(127)%AdjacentTo(56) - call Manifold%Valve(127)%AdjacentTo(78) + call data%state%manifold%Valve(127)%AdjacentTo(56) + call data%state%manifold%Valve(127)%AdjacentTo(78) !call Valve(127)%AdjacentTo(105) - call Manifold%Valve(128)%AdjacentTo(56) - call Manifold%Valve(128)%AdjacentTo(126) + call data%state%manifold%Valve(128)%AdjacentTo(56) + call data%state%manifold%Valve(128)%AdjacentTo(126) ! initialization @@ -693,38 +680,24 @@ end subroutine PathFinding_Step - subroutine KellyConnected() - !use CLog3 + subroutine KellyConnected() !Bind(C,name='KellyConnected') implicit none + call data%state%manifold%Valve(127)%RemoveAdjacent(78) - call Manifold%Valve(127)%RemoveAdjacent(78) - - call Manifold%Valve(127)%AdjacentTo(103) - call Manifold%Valve(103)%AdjacentTo(127) + call data%state%manifold%Valve(127)%AdjacentTo(103) + call data%state%manifold%Valve(103)%AdjacentTo(127) -#ifdef deb if(print_log) print*, 'KellyConnected()' - !call Log_3( 'KellyConnected()') -#endif - Manifold%IsPathsDirty = .true. + data%state%manifold%IsPathsDirty = .true. end subroutine - subroutine KellyDisconnected() - !use CLog3 - implicit none - - call Manifold%Valve(127)%RemoveAdjacent(103) - call Manifold%Valve(103)%RemoveAdjacent(127) - - call Manifold%Valve(127)%AdjacentTo(78) - -#ifdef deb + subroutine KellyDisconnected() !Bind(C,name='KellyDisconnected') + implicit none + call data%state%manifold%Valve(127)%RemoveAdjacent(103) + call data%state%manifold%Valve(103)%RemoveAdjacent(127) + call data%state%manifold%Valve(127)%AdjacentTo(78) if(print_log) print*, 'KellyDisconnected()' - !call Log_3( 'KellyDisconnected()') -#endif - - Manifold%IsPathsDirty = .true. - + data%state%manifold%IsPathsDirty = .true. end subroutine @@ -737,35 +710,35 @@ end subroutine PathFinding_Step subroutine InstallSafetyValve_KellyMode() implicit none - Manifold%IsSafetyValveInstalled_KellyMode = .true. + data%state%manifold%IsSafetyValveInstalled_KellyMode = .true. call RemoveTopDriveIBop() ! Remove Safey Valve (54) - call Manifold%Valve(124)%RemoveAdjacent(54) - call Manifold%Valve(54)%RemoveAdjacent(124) + call data%state%manifold%Valve(124)%RemoveAdjacent(54) + call data%state%manifold%Valve(54)%RemoveAdjacent(124) - call Manifold%Valve(69)%RemoveAdjacent(54) - call Manifold%Valve(54)%RemoveAdjacent(69) + call data%state%manifold%Valve(69)%RemoveAdjacent(54) + call data%state%manifold%Valve(54)%RemoveAdjacent(69) ! Remove 126-103 cnn - call Manifold%Valve(128)%RemoveAdjacent(127) - call Manifold%Valve(127)%RemoveAdjacent(128) + call data%state%manifold%Valve(128)%RemoveAdjacent(127) + call data%state%manifold%Valve(127)%RemoveAdjacent(128) ! now make cnn - call Manifold%Valve(124)%AdjacentTo(69) - call Manifold%Valve(69)%AdjacentTo(124) + call data%state%manifold%Valve(124)%AdjacentTo(69) + call data%state%manifold%Valve(69)%AdjacentTo(124) - call Manifold%Valve(128)%AdjacentTo(56) + call data%state%manifold%Valve(128)%AdjacentTo(56) - call Manifold%Valve(56)%AdjacentTo(128) - call Manifold%Valve(56)%AdjacentTo(127) + call data%state%manifold%Valve(56)%AdjacentTo(128) + call data%state%manifold%Valve(56)%AdjacentTo(127) - call Manifold%Valve(127)%AdjacentTo(56) + call data%state%manifold%Valve(127)%AdjacentTo(56) -#ifdef deb - if(print_log) print*, 'InstallSafetyValve_KellyMode()' -#endif + #ifdef deb + if(print_log) print*, 'InstallSafetyValve_KellyMode()' + #endif data%Equipments%DrillingConsole%IRSafetyValveLed = 1 call OpenSafetyValve_KellyMode() @@ -773,16 +746,16 @@ end subroutine PathFinding_Step subroutine RemoveSafetyValve_KellyMode() implicit none - Manifold%IsSafetyValveInstalled_KellyMode = .false. + data%state%manifold%IsSafetyValveInstalled_KellyMode = .false. - call Manifold%Valve(128)%RemoveAdjacent(56) - call Manifold%Valve(56)%RemoveAdjacent(128) + call data%state%manifold%Valve(128)%RemoveAdjacent(56) + call data%state%manifold%Valve(56)%RemoveAdjacent(128) - call Manifold%Valve(127)%RemoveAdjacent(56) - call Manifold%Valve(56)%RemoveAdjacent(127) + call data%state%manifold%Valve(127)%RemoveAdjacent(56) + call data%state%manifold%Valve(56)%RemoveAdjacent(127) - call Manifold%Valve(127)%AdjacentTo(128) - call Manifold%Valve(128)%AdjacentTo(127) + call data%state%manifold%Valve(127)%AdjacentTo(128) + call data%state%manifold%Valve(128)%AdjacentTo(127) data%Equipments%DrillingConsole%IRSafetyValveLed = 0 call CloseSafetyValve_KellyMode() @@ -797,11 +770,11 @@ end subroutine PathFinding_Step subroutine OpenSafetyValve_KellyMode() implicit none - if(.not.Manifold%IsSafetyValveInstalled_KellyMode) return + if(.not.data%state%manifold%IsSafetyValveInstalled_KellyMode) return data%Equipments%DrillingConsole%OpenSafetyValveLed = 1 data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 - Manifold%SafetyValve = .true. - call ChangeValve(56, Manifold%SafetyValve) + data%state%manifold%SafetyValve = .true. + call ChangeValve(56, data%state%manifold%SafetyValve) #ifdef deb if(print_log) print*, 'OpenSafetyValve_KellyMode()' @@ -811,11 +784,11 @@ end subroutine PathFinding_Step subroutine CloseSafetyValve_KellyMode() implicit none - if(.not.Manifold%IsSafetyValveInstalled_KellyMode) return + if(.not.data%state%manifold%IsSafetyValveInstalled_KellyMode) return data%Equipments%DrillingConsole%CloseSafetyValveLed = 1 data%Equipments%DrillingConsole%OpenSafetyValveLed = 0 - Manifold%SafetyValve = .false. - call ChangeValve(56, Manifold%SafetyValve) + data%state%manifold%SafetyValve = .false. + call ChangeValve(56, data%state%manifold%SafetyValve) #ifdef deb if(print_log) print*, 'CloseSafetyValve_KellyMode()' @@ -834,26 +807,26 @@ end subroutine PathFinding_Step subroutine InstallSafetyValve_TripMode() implicit none - Manifold%IsSafetyValveInstalled_TripMode = .true. + data%state%manifold%IsSafetyValveInstalled_TripMode = .true. - call Manifold%Valve(128)%RemoveAdjacent(56) - call Manifold%Valve(56)%RemoveAdjacent(128) + call data%state%manifold%Valve(128)%RemoveAdjacent(56) + call data%state%manifold%Valve(56)%RemoveAdjacent(128) - call Manifold%Valve(127)%RemoveAdjacent(56) - call Manifold%Valve(56)%RemoveAdjacent(127) + call data%state%manifold%Valve(127)%RemoveAdjacent(56) + call data%state%manifold%Valve(56)%RemoveAdjacent(127) - call Manifold%Valve(69)%RemoveAdjacent(124) - call Manifold%Valve(124)%RemoveAdjacent(69) + call data%state%manifold%Valve(69)%RemoveAdjacent(124) + call data%state%manifold%Valve(124)%RemoveAdjacent(69) - call Manifold%Valve(127)%AdjacentTo(128) - call Manifold%Valve(128)%AdjacentTo(127) + call data%state%manifold%Valve(127)%AdjacentTo(128) + call data%state%manifold%Valve(128)%AdjacentTo(127) - call Manifold%Valve(124)%AdjacentTo(54) - call Manifold%Valve(54)%AdjacentTo(124) + call data%state%manifold%Valve(124)%AdjacentTo(54) + call data%state%manifold%Valve(54)%AdjacentTo(124) - call Manifold%Valve(54)%AdjacentTo(69) - call Manifold%Valve(69)%AdjacentTo(54) + call data%state%manifold%Valve(54)%AdjacentTo(69) + call data%state%manifold%Valve(69)%AdjacentTo(54) data%Equipments%DrillingConsole%IRSafetyValveLed = 1 call OpenSafetyValve_TripMode() @@ -866,35 +839,31 @@ end subroutine PathFinding_Step subroutine RemoveSafetyValve_TripMode() implicit none - Manifold%IsSafetyValveInstalled_TripMode = .false. + data%state%manifold%IsSafetyValveInstalled_TripMode = .false. - call Manifold%Valve(124)%RemoveAdjacent(54) - call Manifold%Valve(54)%RemoveAdjacent(124) + call data%state%manifold%Valve(124)%RemoveAdjacent(54) + call data%state%manifold%Valve(54)%RemoveAdjacent(124) - call Manifold%Valve(54)%RemoveAdjacent(69) - call Manifold%Valve(69)%RemoveAdjacent(54) + call data%state%manifold%Valve(54)%RemoveAdjacent(69) + call data%state%manifold%Valve(69)%RemoveAdjacent(54) - call Manifold%Valve(124)%AdjacentTo(69) - call Manifold%Valve(69)%AdjacentTo(124) + call data%state%manifold%Valve(124)%AdjacentTo(69) + call data%state%manifold%Valve(69)%AdjacentTo(124) data%Equipments%DrillingConsole%IRSafetyValveLed = 0 call CloseSafetyValve_TripMode() data%Equipments%DrillingConsole%OpenSafetyValveLed = 0 data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 - -#ifdef deb - if(print_log) print*, 'RemoveSafetyValve_TripMode()' -#endif - + if(print_log) print*, 'RemoveSafetyValve_TripMode()' end subroutine subroutine OpenSafetyValve_TripMode() implicit none - if(.not.Manifold%IsSafetyValveInstalled_TripMode) return + if(.not.data%state%manifold%IsSafetyValveInstalled_TripMode) return data%Equipments%DrillingConsole%OpenSafetyValveLed = 1 data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 - Manifold%SafetyValve = .true. - call ChangeValve(54, Manifold%SafetyValve) + data%state%manifold%SafetyValve = .true. + call ChangeValve(54, data%state%manifold%SafetyValve) #ifdef deb if(print_log) print*, 'OpenSafetyValve_TripMode()' @@ -904,11 +873,11 @@ end subroutine PathFinding_Step subroutine CloseSafetyValve_TripMode() implicit none - if(.not.Manifold%IsSafetyValveInstalled_TripMode) return + if(.not.data%state%manifold%IsSafetyValveInstalled_TripMode) return data%Equipments%DrillingConsole%CloseSafetyValveLed = 1 data%Equipments%DrillingConsole%OpenSafetyValveLed = 0 - Manifold%SafetyValve = .false. - call ChangeValve(54, Manifold%SafetyValve) + data%state%manifold%SafetyValve = .false. + call ChangeValve(54, data%state%manifold%SafetyValve) #ifdef deb if(print_log) print*, 'CloseSafetyValve_TripMode()' @@ -925,22 +894,22 @@ end subroutine PathFinding_Step subroutine InstallSafetyValve_TopDrive() implicit none - Manifold%IsSafetyValveInstalled_TopDrive = .true. + data%state%manifold%IsSafetyValveInstalled_TopDrive = .true. - call Manifold%Valve(128)%RemoveAdjacent(56) - call Manifold%Valve(56)%RemoveAdjacent(128) + call data%state%manifold%Valve(128)%RemoveAdjacent(56) + call data%state%manifold%Valve(56)%RemoveAdjacent(128) - call Manifold%Valve(127)%RemoveAdjacent(56) - call Manifold%Valve(56)%RemoveAdjacent(127) + call data%state%manifold%Valve(127)%RemoveAdjacent(56) + call data%state%manifold%Valve(56)%RemoveAdjacent(127) - call Manifold%Valve(69)%RemoveAdjacent(124) - call Manifold%Valve(124)%RemoveAdjacent(69) + call data%state%manifold%Valve(69)%RemoveAdjacent(124) + call data%state%manifold%Valve(124)%RemoveAdjacent(69) - call Manifold%Valve(124)%AdjacentTo(54) - call Manifold%Valve(54)%AdjacentTo(124) + call data%state%manifold%Valve(124)%AdjacentTo(54) + call data%state%manifold%Valve(54)%AdjacentTo(124) - call Manifold%Valve(54)%AdjacentTo(69) - call Manifold%Valve(69)%AdjacentTo(54) + call data%state%manifold%Valve(54)%AdjacentTo(69) + call data%state%manifold%Valve(69)%AdjacentTo(54) data%Equipments%DrillingConsole%IRSafetyValveLed = 1 call OpenSafetyValve_TopDrive() @@ -953,16 +922,16 @@ end subroutine PathFinding_Step subroutine RemoveSafetyValve_TopDrive() implicit none - Manifold%IsSafetyValveInstalled_TopDrive = .false. + data%state%manifold%IsSafetyValveInstalled_TopDrive = .false. - call Manifold%Valve(124)%RemoveAdjacent(54) - call Manifold%Valve(54)%RemoveAdjacent(124) + call data%state%manifold%Valve(124)%RemoveAdjacent(54) + call data%state%manifold%Valve(54)%RemoveAdjacent(124) - call Manifold%Valve(54)%RemoveAdjacent(69) - call Manifold%Valve(69)%RemoveAdjacent(54) + call data%state%manifold%Valve(54)%RemoveAdjacent(69) + call data%state%manifold%Valve(69)%RemoveAdjacent(54) - call Manifold%Valve(124)%AdjacentTo(69) - call Manifold%Valve(69)%AdjacentTo(124) + call data%state%manifold%Valve(124)%AdjacentTo(69) + call data%state%manifold%Valve(69)%AdjacentTo(124) data%Equipments%DrillingConsole%IRSafetyValveLed = 0 call CloseSafetyValve_TopDrive() @@ -977,30 +946,30 @@ end subroutine PathFinding_Step subroutine OpenSafetyValve_TopDrive() implicit none - if(.not.Manifold%IsSafetyValveInstalled_TopDrive) return + if(.not.data%state%manifold%IsSafetyValveInstalled_TopDrive) return data%Equipments%DrillingConsole%OpenSafetyValveLed = 1 data%Equipments%DrillingConsole%CloseSafetyValveLed = 0 - Manifold%SafetyValve = .true. + data%state%manifold%SafetyValve = .true. #ifdef deb if(print_log) print*, 'OpenSafetyValve_TopDrive()' #endif - call ChangeValve(54, Manifold%SafetyValve) + call ChangeValve(54, data%state%manifold%SafetyValve) end subroutine subroutine CloseSafetyValve_TopDrive() implicit none - if(.not.Manifold%IsSafetyValveInstalled_TopDrive) return + if(.not.data%state%manifold%IsSafetyValveInstalled_TopDrive) return data%Equipments%DrillingConsole%CloseSafetyValveLed = 1 data%Equipments%DrillingConsole%OpenSafetyValveLed = 0 - Manifold%SafetyValve = .false. + data%state%manifold%SafetyValve = .false. #ifdef deb if(print_log) print*, 'CloseSafetyValve_TopDrive()' #endif - call ChangeValve(54, Manifold%SafetyValve) + call ChangeValve(54, data%state%manifold%SafetyValve) end subroutine @@ -1013,16 +982,16 @@ end subroutine PathFinding_Step subroutine InstallIBop() implicit none - Manifold%IsIBopInstalled = .true. + data%state%manifold%IsIBopInstalled = .true. - call Manifold%Valve(103)%RemoveAdjacent(124) - call Manifold%Valve(124)%RemoveAdjacent(103) + call data%state%manifold%Valve(103)%RemoveAdjacent(124) + call data%state%manifold%Valve(124)%RemoveAdjacent(103) - call Manifold%Valve(55)%AdjacentTo(103) - call Manifold%Valve(55)%AdjacentTo(124) + call data%state%manifold%Valve(55)%AdjacentTo(103) + call data%state%manifold%Valve(55)%AdjacentTo(124) - call Manifold%Valve(103)%AdjacentTo(55) - call Manifold%Valve(124)%AdjacentTo(55) + call data%state%manifold%Valve(103)%AdjacentTo(55) + call data%state%manifold%Valve(124)%AdjacentTo(55) #ifdef deb if(print_log) print*, 'InstallIBop()' @@ -1034,48 +1003,48 @@ end subroutine PathFinding_Step subroutine RemoveIBop() implicit none - Manifold%IsIBopInstalled = .false. + data%state%manifold%IsIBopInstalled = .false. - call Manifold%Valve(55)%RemoveAdjacent(103) - call Manifold%Valve(55)%RemoveAdjacent(124) + call data%state%manifold%Valve(55)%RemoveAdjacent(103) + call data%state%manifold%Valve(55)%RemoveAdjacent(124) - call Manifold%Valve(103)%RemoveAdjacent(55) - call Manifold%Valve(124)%RemoveAdjacent(55) + call data%state%manifold%Valve(103)%RemoveAdjacent(55) + call data%state%manifold%Valve(124)%RemoveAdjacent(55) - call Manifold%Valve(103)%AdjacentTo(124) - call Manifold%Valve(124)%AdjacentTo(103) + call data%state%manifold%Valve(103)%AdjacentTo(124) + call data%state%manifold%Valve(124)%AdjacentTo(103) #ifdef deb if(print_log) print*, 'RemoveIBop()' #endif data%Equipments%DrillingConsole%IRIBopLed = 0 - Manifold%IBop = .false. - call ChangeValve(55, Manifold%IBop) + data%state%manifold%IBop = .false. + call ChangeValve(55, data%state%manifold%IBop) end subroutine subroutine OpenIBop() implicit none - if(.not.Manifold%IsIBopInstalled) return - Manifold%IBop = .true. + if(.not.data%state%manifold%IsIBopInstalled) return + data%state%manifold%IBop = .true. #ifdef deb if(print_log) print*, 'OpenIBop()' #endif - call ChangeValve(55, Manifold%IBop) + call ChangeValve(55, data%state%manifold%IBop) end subroutine subroutine CloseIBop() implicit none - if(.not.Manifold%IsIBopInstalled) return - Manifold%IBop = .false. + if(.not.data%state%manifold%IsIBopInstalled) return + data%state%manifold%IBop = .false. #ifdef deb if(print_log) print*, 'CloseIBop()' #endif - call ChangeValve(55, Manifold%IBop) + call ChangeValve(55, data%state%manifold%IBop) end subroutine @@ -1085,17 +1054,17 @@ end subroutine PathFinding_Step subroutine InstallKellyCock() implicit none - Manifold%IsKellyCockInstalled = .true. + data%state%manifold%IsKellyCockInstalled = .true. - call Manifold%Valve(125)%RemoveAdjacent(126) - call Manifold%Valve(126)%RemoveAdjacent(125) + call data%state%manifold%Valve(125)%RemoveAdjacent(126) + call data%state%manifold%Valve(126)%RemoveAdjacent(125) - call Manifold%Valve(125)%AdjacentTo(68) + call data%state%manifold%Valve(125)%AdjacentTo(68) - call Manifold%Valve(68)%AdjacentTo(125) - call Manifold%Valve(68)%AdjacentTo(126) + call data%state%manifold%Valve(68)%AdjacentTo(125) + call data%state%manifold%Valve(68)%AdjacentTo(126) - call Manifold%Valve(126)%AdjacentTo(68) + call data%state%manifold%Valve(126)%AdjacentTo(68) #ifdef deb if(print_log) print*, 'InstallKellyCock()' @@ -1106,19 +1075,19 @@ end subroutine PathFinding_Step subroutine RemoveKellyCock() implicit none - Manifold%IsKellyCockInstalled = .false. + data%state%manifold%IsKellyCockInstalled = .false. - call Manifold%Valve(125)%RemoveAdjacent(68) - call Manifold%Valve(126)%RemoveAdjacent(68) + call data%state%manifold%Valve(125)%RemoveAdjacent(68) + call data%state%manifold%Valve(126)%RemoveAdjacent(68) - call Manifold%Valve(68)%RemoveAdjacent(125) - call Manifold%Valve(68)%RemoveAdjacent(126) + call data%state%manifold%Valve(68)%RemoveAdjacent(125) + call data%state%manifold%Valve(68)%RemoveAdjacent(126) - call Manifold%Valve(125)%AdjacentTo(126) - call Manifold%Valve(126)%AdjacentTo(125) + call data%state%manifold%Valve(125)%AdjacentTo(126) + call data%state%manifold%Valve(126)%AdjacentTo(125) - Manifold%KellyCock = .false. - call ChangeValve(68, Manifold%KellyCock) + data%state%manifold%KellyCock = .false. + call ChangeValve(68, data%state%manifold%KellyCock) data%Equipments%DrillingConsole%CloseKellyCockLed = 0 data%Equipments%DrillingConsole%OpenKellyCockLed = 0 @@ -1130,30 +1099,30 @@ end subroutine PathFinding_Step subroutine OpenKellyCock() implicit none - if(.not.Manifold%IsKellyCockInstalled) return + if(.not.data%state%manifold%IsKellyCockInstalled) return data%Equipments%DrillingConsole%OpenKellyCockLed = 1 data%Equipments%DrillingConsole%CloseKellyCockLed = 0 - Manifold%KellyCock = .true. + data%state%manifold%KellyCock = .true. #ifdef deb if(print_log) print*, 'OpenKellyCock()' #endif - call ChangeValve(68, Manifold%KellyCock) + call ChangeValve(68, data%state%manifold%KellyCock) end subroutine subroutine CloseKellyCock() implicit none - if(.not.Manifold%IsKellyCockInstalled) return + if(.not.data%state%manifold%IsKellyCockInstalled) return data%Equipments%DrillingConsole%CloseKellyCockLed = 1 data%Equipments%DrillingConsole%OpenKellyCockLed = 0 - Manifold%KellyCock = .false. + data%state%manifold%KellyCock = .false. #ifdef deb if(print_log) print*, 'CloseKellyCock()' #endif - call ChangeValve(68, Manifold%KellyCock) + call ChangeValve(68, data%state%manifold%KellyCock) end subroutine @@ -1165,17 +1134,17 @@ end subroutine PathFinding_Step subroutine InstallTopDriveIBop() implicit none - Manifold%IsTopDriveIBopInstalled = .true. + data%state%manifold%IsTopDriveIBopInstalled = .true. - call Manifold%Valve(126)%RemoveAdjacent(128) - call Manifold%Valve(128)%RemoveAdjacent(126) + call data%state%manifold%Valve(126)%RemoveAdjacent(128) + call data%state%manifold%Valve(128)%RemoveAdjacent(126) - call Manifold%Valve(126)%AdjacentTo(70) - call Manifold%Valve(70)%AdjacentTo(126) + call data%state%manifold%Valve(126)%AdjacentTo(70) + call data%state%manifold%Valve(70)%AdjacentTo(126) - call Manifold%Valve(128)%AdjacentTo(70) - call Manifold%Valve(70)%AdjacentTo(128) + call data%state%manifold%Valve(128)%AdjacentTo(70) + call data%state%manifold%Valve(70)%AdjacentTo(128) #ifdef deb if(print_log) print*, 'InstallTopDriveIBop()' @@ -1185,29 +1154,29 @@ end subroutine PathFinding_Step subroutine RemoveTopDriveIBop() implicit none - Manifold%IsTopDriveIBopInstalled = .false. + data%state%manifold%IsTopDriveIBopInstalled = .false. - call Manifold%Valve(126)%RemoveAdjacent(70) - call Manifold%Valve(70)%RemoveAdjacent(126) + call data%state%manifold%Valve(126)%RemoveAdjacent(70) + call data%state%manifold%Valve(70)%RemoveAdjacent(126) - call Manifold%Valve(128)%RemoveAdjacent(70) - call Manifold%Valve(70)%RemoveAdjacent(128) + call data%state%manifold%Valve(128)%RemoveAdjacent(70) + call data%state%manifold%Valve(70)%RemoveAdjacent(128) - call Manifold%Valve(126)%AdjacentTo(128) - call Manifold%Valve(128)%AdjacentTo(126) + call data%state%manifold%Valve(126)%AdjacentTo(128) + call data%state%manifold%Valve(128)%AdjacentTo(126) #ifdef deb if(print_log) print*, 'RemoveTopDriveIBop()' #endif - Manifold%TopDriveIBop = .false. - call ChangeValve(70, Manifold%TopDriveIBop) + data%state%manifold%TopDriveIBop = .false. + call ChangeValve(70, data%state%manifold%TopDriveIBop) end subroutine subroutine OpenTopDriveIBop() implicit none - if(.not.Manifold%IsTopDriveIBopInstalled) return - Manifold%TopDriveIBop = .true. - call ChangeValve(70, Manifold%TopDriveIBop) + if(.not.data%state%manifold%IsTopDriveIBopInstalled) return + data%state%manifold%TopDriveIBop = .true. + call ChangeValve(70, data%state%manifold%TopDriveIBop) #ifdef deb if(print_log) print*, 'OpenTopDriveIBop()' #endif @@ -1215,9 +1184,9 @@ end subroutine PathFinding_Step subroutine CloseTopDriveIBop() implicit none - if(.not.Manifold%IsTopDriveIBopInstalled) return - Manifold%TopDriveIBop = .false. - call ChangeValve(70, Manifold%TopDriveIBop) + if(.not.data%state%manifold%IsTopDriveIBopInstalled) return + data%state%manifold%TopDriveIBop = .false. + call ChangeValve(70, data%state%manifold%TopDriveIBop) #ifdef deb if(print_log) print*, 'CloseTopDriveIBop()' #endif @@ -1233,16 +1202,16 @@ end subroutine PathFinding_Step subroutine InstallFloatValve() implicit none - Manifold%IsFloatValveInstalled = .true. + data%state%manifold%IsFloatValveInstalled = .true. - call Manifold%Valve(69)%RemoveAdjacent(79) - call Manifold%Valve(79)%RemoveAdjacent(69) + call data%state%manifold%Valve(69)%RemoveAdjacent(79) + call data%state%manifold%Valve(79)%RemoveAdjacent(69) - call Manifold%Valve(48)%AdjacentTo(69) - call Manifold%Valve(48)%AdjacentTo(79) + call data%state%manifold%Valve(48)%AdjacentTo(69) + call data%state%manifold%Valve(48)%AdjacentTo(79) - call Manifold%Valve(69)%AdjacentTo(48) - call Manifold%Valve(79)%AdjacentTo(48) + call data%state%manifold%Valve(69)%AdjacentTo(48) + call data%state%manifold%Valve(79)%AdjacentTo(48) #ifdef deb if(print_log) print*, 'InstallFloatValve()' #endif @@ -1251,41 +1220,41 @@ end subroutine PathFinding_Step subroutine RemoveFloatValve() implicit none - Manifold%IsFloatValveInstalled = .false. + data%state%manifold%IsFloatValveInstalled = .false. - call Manifold%Valve(48)%RemoveAdjacent(69) - call Manifold%Valve(48)%RemoveAdjacent(79) + call data%state%manifold%Valve(48)%RemoveAdjacent(69) + call data%state%manifold%Valve(48)%RemoveAdjacent(79) - call Manifold%Valve(69)%RemoveAdjacent(48) - call Manifold%Valve(79)%RemoveAdjacent(48) + call data%state%manifold%Valve(69)%RemoveAdjacent(48) + call data%state%manifold%Valve(79)%RemoveAdjacent(48) - call Manifold%Valve(69)%AdjacentTo(79) - call Manifold%Valve(79)%AdjacentTo(69) + call data%state%manifold%Valve(69)%AdjacentTo(79) + call data%state%manifold%Valve(79)%AdjacentTo(69) #ifdef deb if(print_log) print*, 'RemoveFloatValve()' #endif - Manifold%FloatValve = .false. - call ChangeValve(48, Manifold%FloatValve) + data%state%manifold%FloatValve = .false. + call ChangeValve(48, data%state%manifold%FloatValve) end subroutine subroutine OpenFloatValve() implicit none - if(.not.Manifold%IsFloatValveInstalled) return - Manifold%FloatValve = .true. + if(.not.data%state%manifold%IsFloatValveInstalled) return + data%state%manifold%FloatValve = .true. #ifdef deb if(print_log) print*, 'OpenFloatValve()' #endif - call ChangeValve(48, Manifold%FloatValve) + call ChangeValve(48, data%state%manifold%FloatValve) end subroutine subroutine CloseFloatValve() implicit none - if(.not.Manifold%IsFloatValveInstalled) return - Manifold%FloatValve = .false. + if(.not.data%state%manifold%IsFloatValveInstalled) return + data%state%manifold%FloatValve = .false. #ifdef deb if(print_log) print*, 'CloseFloatValve()' #endif - call ChangeValve(48, Manifold%FloatValve) + call ChangeValve(48, data%state%manifold%FloatValve) end subroutine @@ -1298,22 +1267,22 @@ end subroutine PathFinding_Step implicit none logical, intent(in) :: v if(v) then - call Manifold%Valve(14)%RemoveAdjacent(78) + call data%state%manifold%Valve(14)%RemoveAdjacent(78) - call Manifold%Valve(14)%AdjacentTo(57) - call Manifold%Valve(57)%AdjacentTo(14) - call Manifold%Valve(57)%AdjacentTo(103) - call Manifold%Valve(103)%AdjacentTo(57) + call data%state%manifold%Valve(14)%AdjacentTo(57) + call data%state%manifold%Valve(57)%AdjacentTo(14) + call data%state%manifold%Valve(57)%AdjacentTo(103) + call data%state%manifold%Valve(103)%AdjacentTo(57) else - call Manifold%Valve(14)%RemoveAdjacent(57) - call Manifold%Valve(57)%RemoveAdjacent(14) - call Manifold%Valve(57)%RemoveAdjacent(103) - call Manifold%Valve(103)%RemoveAdjacent(57) + call data%state%manifold%Valve(14)%RemoveAdjacent(57) + call data%state%manifold%Valve(57)%RemoveAdjacent(14) + call data%state%manifold%Valve(57)%RemoveAdjacent(103) + call data%state%manifold%Valve(103)%RemoveAdjacent(57) - call Manifold%Valve(14)%AdjacentTo(78) + call data%state%manifold%Valve(14)%AdjacentTo(78) endif - Manifold%IsPathsDirty = .true. + data%state%manifold%IsPathsDirty = .true. call ChangeValve(57, .true.) end subroutine @@ -1323,47 +1292,39 @@ end subroutine PathFinding_Step call ChangeValve(53, v) end subroutine - - - - - - - - subroutine ToggleMiddleRams(v) implicit none logical, intent(in) :: v - Manifold%Valve(50)%Status = v + data%state%manifold%Valve(50)%Status = v call ChangeValve(69, v) end subroutine - - - - - - - + subroutine ToggleValve(i) bind(C,name="ToggleValve") + integer :: i + logical :: currentStatus + currentStatus = data%State%Manifold%Valve(i)%Status + call ChangeValve(i,.not. currentStatus) + end subroutine + subroutine ChangeValve(i, state) implicit none integer, intent(in) :: i logical, intent(in) :: state - if(Manifold%Valve(i)%Status==state) return - Manifold%Valve(i)%Status = state + if(data%state%manifold%Valve(i)%Status==state) return + data%state%manifold%Valve(i)%Status = state if(i == 41 .or. i == 42) then - if(Manifold%Valve(41)%Status == .false. .and. Manifold%Valve(42)%Status == .false.) then - Manifold%Valve(60)%Status = .true. + if(data%state%manifold%Valve(41)%Status == .false. .and. data%state%manifold%Valve(42)%Status == .false.) then + data%state%manifold%Valve(60)%Status = .true. else - Manifold%Valve(60)%Status = .false. + data%state%manifold%Valve(60)%Status = .false. endif endif #ifdef deb if(print_log) print*, 'Valve(', i, ') = ', state #endif !call Traverse() - Manifold%IsPathsDirty = .true. + data%state%manifold%IsPathsDirty = .true. end subroutine @@ -1373,9 +1334,9 @@ end subroutine PathFinding_Step subroutine DisplayOpenPaths() implicit none integer :: i - if(allocated(Manifold%OpenPaths)) then - do i = 1, size(Manifold%OpenPaths) - call Manifold%OpenPaths(i)%Display() + if(allocated(data%state%manifold%OpenPaths)) then + do i = 1, size(data%state%manifold%OpenPaths) + call data%state%manifold%OpenPaths(i)%Display() end do end if end subroutine @@ -1383,9 +1344,9 @@ end subroutine PathFinding_Step subroutine DisplayOpenPathsWrite() implicit none integer :: i - if(allocated(Manifold%OpenPaths)) then - do i = 1, size(Manifold%OpenPaths) - call Manifold%OpenPaths(i)%DisplayWrite() + if(allocated(data%state%manifold%OpenPaths)) then + do i = 1, size(data%state%manifold%OpenPaths) + call data%state%manifold%OpenPaths(i)%DisplayWrite() end do end if end subroutine diff --git a/CSharp/Equipments/MudPathFinding/ManifoldVariables.f90 b/CSharp/Equipments/MudPathFinding/ManifoldVariables.f90 new file mode 100644 index 0000000..e6f7085 --- /dev/null +++ b/CSharp/Equipments/MudPathFinding/ManifoldVariables.f90 @@ -0,0 +1,37 @@ +module ManifoldVariables + use CStack + use CArrangement + ! use SimulationVariables + ! use CStandPipeManifoldVariables + implicit none + + public + integer, parameter :: ValveCount = 128 + integer, parameter :: MinSource = 71 + integer, parameter :: MaxSource = 90 + integer, parameter :: MinRelation = 91 + integer, parameter :: MaxRelation = 128 + + Type::ManifoldType + type(Arrangement) :: Valve(ValveCount) + type(Path), allocatable :: OpenPaths(:) + type(Stack) :: Fringe + logical :: IsRepititveOutput + + logical :: IsSafetyValveInstalled + logical :: IsSafetyValveInstalled_KellyMode + logical :: IsSafetyValveInstalled_TripMode + logical :: IsSafetyValveInstalled_TopDrive + logical :: SafetyValve + logical :: IsIBopInstalled + logical :: IBop + logical :: IsKellyCockInstalled + logical :: KellyCock + logical :: IsTopDriveIBopInstalled + logical :: TopDriveIBop + logical :: IsFloatValveInstalled + logical :: FloatValve + logical :: IsPathsDirty = .false. + logical :: IsTraverse = .false. + End type ManifoldType +End module ManifoldVariables \ No newline at end of file diff --git a/CSharp/OperationScenarios/Notifications/CTongNotification.f90 b/CSharp/OperationScenarios/Notifications/CTongNotification.f90 index 002cd59..b41041c 100644 --- a/CSharp/OperationScenarios/Notifications/CTongNotification.f90 +++ b/CSharp/OperationScenarios/Notifications/CTongNotification.f90 @@ -6,12 +6,8 @@ module CTongNotification subroutine Evaluate_TongNotification() implicit none - - - - if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then - if(print_log) print*, 'Evaluate_TongNotification=TopDrive' + ! if(print_log) print*, 'Evaluate_TongNotification=TopDrive' !TOPDRIVE-CODE=50 if (((Get_HookHeight() >= (TL() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + NFC() - data%State%OperationScenario%RE) .and. Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + data%State%OperationScenario%TG)) .or.& @@ -55,19 +51,8 @@ module CTongNotification endif - - - - - - - - if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then -#ifdef OST - if(print_log) print*, 'Evaluate_TongNotification=Kelly' -#endif - + ! if(print_log) print*, 'Evaluate_TongNotification=Kelly' !OPERATION-CODE=44 if (Get_OperationCondition() == OPERATION_DRILL .and.& !((Get_HookHeight() >= 65.0 .and. Get_HookHeight() <= 70.0) .or.& @@ -86,9 +71,6 @@ module CTongNotification return end if - - - !OPERATION-CODE=45 if (Get_OperationCondition() == OPERATION_DRILL .and.& Get_HookHeight() >= 66 .and. Get_HookHeight() <= 69 .and.& @@ -101,8 +83,6 @@ module CTongNotification return end if - - !OPERATION-CODE=46 if (Get_OperationCondition() == OPERATION_DRILL .and.& Get_JointConnectionPossible() .and.& @@ -115,9 +95,6 @@ module CTongNotification return end if - - - !OPERATION-CODE=47 if (Get_OperationCondition() == OPERATION_DRILL .and.& GetRotaryRpm() == 0.0d0 .and.& @@ -130,11 +107,7 @@ module CTongNotification call Set_TongNotification(.true.) return - end if - - - - + end if !OPERATION-CODE=48 if (Get_OperationCondition() == OPERATION_DRILL .and.& @@ -149,21 +122,7 @@ module CTongNotification call Set_TongNotification(.true.) return end if - - - - - - - - - - - - - - - + !OPERATION-CODE=50 if (Get_OperationCondition() == OPERATION_TRIP .and.& ((Get_HookHeight() >= (data%State%OperationScenario%HL + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + Get_NearFloorConnection() - data%State%OperationScenario%RE) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + data%State%OperationScenario%TG)) .or.& @@ -197,11 +156,7 @@ module CTongNotification call Set_TongNotification(.true.) return end if - - - - - + !OPERATION-CODE=52 if (Get_OperationCondition() == OPERATION_TRIP .and.& GetRotaryRpm() == 0.0d0 .and.& @@ -215,9 +170,6 @@ module CTongNotification call Set_TongNotification(.true.) return end if - - - !if (Get_OperationCondition() == OPERATION_DRILL .and.& ! Get_KellyConnection() == KELLY_CONNECTION_STRING .and.& @@ -233,14 +185,6 @@ module CTongNotification call Set_TongNotification(.true.) - - - - - - - - end subroutine ! subroutine Subscribe_TongNotification() diff --git a/CSharp/OperationScenarios/Notifications/Notifications.f90 b/CSharp/OperationScenarios/Notifications/Notifications.f90 index e59aee6..b70e592 100644 --- a/CSharp/OperationScenarios/Notifications/Notifications.f90 +++ b/CSharp/OperationScenarios/Notifications/Notifications.f90 @@ -251,8 +251,8 @@ contains subroutine Set_IrSafetyValveLed(v) use CDrillingConsoleVariables - use SimulationVariables - use SimulationVariables!, only: data%Equipments%DrillingConsole%CloseKellyCockLed => IRSafetyValveLed + use SimulationVariables + use UnitySignalsModule use CManifolds, only: & InstallSafetyValve_TopDrive, & InstallSafetyValve_KellyMode, & @@ -261,31 +261,24 @@ contains RemoveSafetyValve_KellyMode, & RemoveSafetyValve_TripMode use UnitySignalVariables - use UnitySignalsModule, only: Set_SafetyValve_Install, Set_SafetyValve_Remove use CHoistingVariables - use SimulationVariables!, only: data%Configuration%Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType implicit none logical , intent(in) :: v #ifdef ExcludeExtraChanges - if(data%State%notifications%IrSafetyValveLed == v) return + if(data%State%notifications%IrSafetyValveLed == v) return #endif data%State%notifications%IrSafetyValveLed = v - if(data%State%notifications%IrSafetyValveLed) then data%Equipments%DrillingConsole%IRSafetyValveLed = 1 - if(data%Configuration%Hoisting%DriveType == TopDrive_DriveType) call InstallSafetyValve_TopDrive() if(data%Configuration%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_IrSafetyValveLed == 0) call InstallSafetyValve_KellyMode() if(data%Configuration%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_IrSafetyValveLed == 1) call InstallSafetyValve_TripMode() - call Set_SafetyValve_Install() else data%Equipments%DrillingConsole%IRSafetyValveLed = 0 - if(data%Configuration%Hoisting%DriveType == TopDrive_DriveType) call RemoveSafetyValve_TopDrive() if(data%Configuration%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_IrSafetyValveLed == 0) call RemoveSafetyValve_KellyMode() if(data%Configuration%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_IrSafetyValveLed == 1) call RemoveSafetyValve_TripMode() - call Set_SafetyValve_Remove() endif @@ -299,11 +292,11 @@ contains subroutine Set_IrIBopLed(v) use CDrillingConsoleVariables - use SimulationVariables - use SimulationVariables!, 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 + use UnitySignalsModule, only: Set_Ibop_Install, Set_Ibop_Remove implicit none logical , intent(in) :: v #ifdef ExcludeExtraChanges @@ -329,11 +322,10 @@ contains subroutine Set_FillMouseHoleLed(v) use CDrillingConsoleVariables - use SimulationVariables - use SimulationVariables!, only: FillMouseHoleLedHw => FillMouseHoleLed + use SimulationVariables ! use CMouseHoleEnumVariables use UnitySignalVariables - use UnitySignalsModule + use UnitySignalsModule implicit none logical , intent(in) :: v #ifdef ExcludeExtraChanges diff --git a/Equipments/BopStack/LOSS_INPUTS.f90 b/Equipments/BopStack/LOSS_INPUTS.f90 index 21566ea..d657be7 100644 --- a/Equipments/BopStack/LOSS_INPUTS.f90 +++ b/Equipments/BopStack/LOSS_INPUTS.f90 @@ -63,7 +63,6 @@ INTEGER I ! RAMLINE MINOR LOSSES INPUT !=========================================================================== data%State%RamLine%NO_MINORSRAMLINE=34 - ALLOCATE (data%State%BopStackInput%MINORS1(data%State%RamLine%NO_MINORSRAMLINE,4)) ! ID(INCH) LF CV NOTE(BAR) DESCRIPTION diff --git a/Equipments/ChokeControl/AirPump_Choke_Subs.f90 b/Equipments/ChokeControl/AirPump_Choke_Subs.f90 index f2c3b85..ea58b95 100644 --- a/Equipments/ChokeControl/AirPump_Choke_Subs.f90 +++ b/Equipments/ChokeControl/AirPump_Choke_Subs.f90 @@ -43,13 +43,15 @@ ALLOCATE (data%State%AirPumpLine%PIPINGS_AIRPUMP(data%State%AirPumpLine%NO_PIPIN data%State%AirPumpLine%PIPINGS_AIRPUMP(1,1:3)= (/0.5, 60960., 0.03/) !Avg.acc.distance !60960= 200 ft +ALLOCATE(data%State%AirPumpLine%DIAM_AIR_INCH(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE)) +ALLOCATE(data%State%AirPumpLine%Re_air(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE)) - - ALLOCATE (data%State%AirPumpLine%DIAM_AIR_INCH(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE),data%State%AirPumpLine%Re_air(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE),data%State%AirPumpLine%AREA_AIR(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE), & - data%State%AirPumpLine%LENGT_AIR(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE),data%State%AirPumpLine%ROUGHNESS_AIRPLINE(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE),data%State%AirPumpLine%REL_ROUGHAIR(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE), & - data%State%AirPumpLine%fric_air(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE),data%State%AirPumpLine%fricloss_air(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE)) - - +ALLOCATE(data%State%AirPumpLine%AREA_AIR(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE)) +ALLOCATE(data%State%AirPumpLine%LENGT_AIR(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE)) +ALLOCATE(data%State%AirPumpLine%ROUGHNESS_AIRPLINE(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE)) +ALLOCATE(data%State%AirPumpLine%REL_ROUGHAIR(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE)) +ALLOCATE(data%State%AirPumpLine%fric_air(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE)) +ALLOCATE(data%State%AirPumpLine%fricloss_air(data%State%AirPumpLine%NO_PIPINGS_AIRPLINE)) DO I=1,data%State%AirPumpLine%NO_PIPINGS_AIRPLINE data%State%AirPumpLine%DIAM_AIR_INCH(I)=data%State%AirPumpLine%PIPINGS_AIRPUMP(I,1) @@ -76,13 +78,11 @@ data%State%AirPumpLine%MINORS_AIRPUMP(3,1:4)= (/1., 0., 0., 3.4/) data%State%AirPumpLine%MINORS_AIRPUMP(4,1:4)= (/2., 0., 105., 0./) !valve data%State%AirPumpLine%MINORS_AIRPUMP(5,1:4)= (/1., 0., 9.2, 0./) !valve data%State%AirPumpLine%MINORS_AIRPUMP(6,1:4)= (/2., 6.4, 0., 0./) !unionA - - ALLOCATE (data%State%AirPumpLine%MINORDIAM_AIR_INCH(data%State%AirPumpLine%NO_MINORS_AIRPLINE),data%State%AirPumpLine%MINORAREA_AIR(data%State%AirPumpLine%NO_MINORS_AIRPLINE), & - data%State%AirPumpLine%LF_AIR(data%State%AirPumpLine%NO_MINORS_AIRPLINE),data%State%AirPumpLine%CV_AIR(data%State%AirPumpLine%NO_MINORS_AIRPLINE),data%State%AirPumpLine%NOTE_AIR(data%State%AirPumpLine%NO_MINORS_AIRPLINE) & - ,data%State%AirPumpLine%minlosspa_air(data%State%AirPumpLine%NO_MINORS_AIRPLINE),data%State%AirPumpLine%minloss_air(data%State%AirPumpLine%NO_MINORS_AIRPLINE)) - +ALLOCATE (data%State%AirPumpLine%MINORDIAM_AIR_INCH(data%State%AirPumpLine%NO_MINORS_AIRPLINE),data%State%AirPumpLine%MINORAREA_AIR(data%State%AirPumpLine%NO_MINORS_AIRPLINE), & + data%State%AirPumpLine%LF_AIR(data%State%AirPumpLine%NO_MINORS_AIRPLINE),data%State%AirPumpLine%CV_AIR(data%State%AirPumpLine%NO_MINORS_AIRPLINE),data%State%AirPumpLine%NOTE_AIR(data%State%AirPumpLine%NO_MINORS_AIRPLINE) & + ,data%State%AirPumpLine%minlosspa_air(data%State%AirPumpLine%NO_MINORS_AIRPLINE),data%State%AirPumpLine%minloss_air(data%State%AirPumpLine%NO_MINORS_AIRPLINE)) DO I=1,data%State%AirPumpLine%NO_MINORS_AIRPLINE diff --git a/Equipments/Drawworks/DWFixModeMotion.f90 b/Equipments/Drawworks/DWFixModeMotion.f90 index ee02045..3d30890 100644 --- a/Equipments/Drawworks/DWFixModeMotion.f90 +++ b/Equipments/Drawworks/DWFixModeMotion.f90 @@ -6,8 +6,10 @@ subroutine DWFixModeMotion - data%State%Drawworks%Hook_Height_final = data%State%Drawworks%Hook_Height_final ![ft] - data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height_final/3.280839895d0 ![m] + !data%State%Drawworks%Hook_Height_final = data%State%Drawworks%Hook_Height_final ![ft] + data%State%Drawworks%HookLinearVelocity_final = 0.d0 ![ft/s] + !data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height_final/3.280839895d0 ![m] + data%State%Drawworks%HookLinearVelocity = data%State%Drawworks%HookLinearVelocity_final/3.280839895d0 ![m/s] data%State%Drawworks%w_drum = 0.d0 data%State%Drawworks%w_old_drum = 0.d0 data%State%Drawworks%motion = 0 diff --git a/Equipments/Drawworks/Drawworks_Direction.f90 b/Equipments/Drawworks/Drawworks_Direction.f90 index d606417..446513b 100644 --- a/Equipments/Drawworks/Drawworks_Direction.f90 +++ b/Equipments/Drawworks/Drawworks_Direction.f90 @@ -33,17 +33,20 @@ subroutine Drawworks_Direction data%State%Drawworks%motion = +1 data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ? data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s] - data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height+(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m] + !data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height+(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m] + data%State%Drawworks%HookLinearVelocity = (((data%State%Drawworks%Diameter/2.0)*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum))/data%State%Drawworks%NumberOfLine) ![m/s] else if ((data%State%Drawworks%Throttle<0.d0) .or. (data%State%Drawworks%Throttle==0.d0 .and. data%State%Drawworks%Speed/=0.d0 .and. data%State%Drawworks%motion==-1)) then !Down data%State%Drawworks%motion = -1 data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ? data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s] - data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height-(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m] + !data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height-(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m] + data%State%Drawworks%HookLinearVelocity = -(((data%State%Drawworks%Diameter/2.0)*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum))/data%State%Drawworks%NumberOfLine) ![m/s] else !fixed data%State%Drawworks%motion = 0 data%State%Drawworks%w_old_drum = 0.d0 data%State%Drawworks%w_drum = 0.d0 data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height + !data%State%Drawworks%HookLinearVelocity = 0.d0 ![m/s] end if diff --git a/Equipments/Drawworks/Drawworks_Outputs.f90 b/Equipments/Drawworks/Drawworks_Outputs.f90 index 9681b4c..895a3c1 100644 --- a/Equipments/Drawworks/Drawworks_Outputs.f90 +++ b/Equipments/Drawworks/Drawworks_Outputs.f90 @@ -28,8 +28,9 @@ subroutine Drawworks_Outputs Call Activate_FloorCollision() end if - Call Set_HookHeight( real(data%State%Drawworks%Hook_Height_final) ) ![ft] + !Call Set_HookHeight( real(data%State%Drawworks%Hook_Height_final) ) ![ft] data%State%Drawworks%TDHookHeight = data%State%Drawworks%Hook_Height_final ![ft] + ! = data%State%Drawworks%HookLinearVelocity_final ![ft/s] !!data%State%Drawworks%HookHeight_graph_output !data%Equipments%DrillingConsole%ParkingBrakeLed = 0 ! in Drawworks_Inputs diff --git a/Equipments/Drawworks/Drawworks_Solver.f90 b/Equipments/Drawworks/Drawworks_Solver.f90 index 03d0bb1..b58b092 100644 --- a/Equipments/Drawworks/Drawworks_Solver.f90 +++ b/Equipments/Drawworks/Drawworks_Solver.f90 @@ -77,24 +77,25 @@ subroutine Drawworks_Solver -!==================================================== -! Crown Collision (Max_Hook_Height) -!==================================================== - if ( ((3.280839895d0*data%State%Drawworks%Hook_Height)>=data%State%Drawworks%max_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/3,4,7,10,11,12,14/))) ) then - if ( CrownCollision_Status==0 .and. data%State%Drawworks%motion==1 ) then - CrownCollision_Status = 1 - data%State%Drawworks%CrownCollision = .true. - data%State%Drawworks%SoundCrownCollision = .true. - else - data%State%Drawworks%SoundCrownCollision = .false. - end if - if ( data%State%Drawworks%motion==-1 .and. data%State%Drawworks%CrownCollision==.false. ) then - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] - else - Call DWFixModeMotion - end if - return - end if +! !==================================================== +! ! Crown Collision (Max_Hook_Height) +! !==================================================== +! ?if ( ((3.280839895d0*data%State%Drawworks%Hook_Height)>=data%State%Drawworks%max_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/3,4,7,10,11,12,14/))) ) then +! if ( CrownCollision_Status==0 .and. data%State%Drawworks%motion==1 ) then +! CrownCollision_Status = 1 +! data%State%Drawworks%CrownCollision = .true. +! data%State%Drawworks%SoundCrownCollision = .true. +! else +! data%State%Drawworks%SoundCrownCollision = .false. +! end if +! if ( data%State%Drawworks%motion==-1 .and. data%State%Drawworks%CrownCollision==.false. ) then +! !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] +! data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] +! else + ! Call DWFixModeMotion + ! end if + ! return + ! end if @@ -102,24 +103,25 @@ subroutine Drawworks_Solver -!==================================================== -! Floor Collision (Min_Hook_Height) -!==================================================== - if ( ((3.280839895*data%State%Drawworks%Hook_Height)<=data%State%Drawworks%min_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/3,4,7,10,11,12,14/))) ) then - if ( FloorCollision_Status==0 .and. data%State%Drawworks%motion==-1 ) then - FloorCollision_Status = 1 - data%State%Drawworks%FloorCollision = .true. - data%State%Drawworks%SoundFloorCollision = .true. - else - data%State%Drawworks%SoundFloorCollision = .false. - end if - if ( data%State%Drawworks%motion==1 .and. data%State%Drawworks%FloorCollision==.false. ) then - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] - else - Call DWFixModeMotion - end if - return - end if +! !==================================================== +! ! Floor Collision (Min_Hook_Height) +! !==================================================== +! ?if ( ((3.280839895*data%State%Drawworks%Hook_Height)<=data%State%Drawworks%min_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/3,4,7,10,11,12,14/))) ) then +! if ( FloorCollision_Status==0 .and. data%State%Drawworks%motion==-1 ) then +! FloorCollision_Status = 1 +! data%State%Drawworks%FloorCollision = .true. +! data%State%Drawworks%SoundFloorCollision = .true. +! else +! data%State%Drawworks%SoundFloorCollision = .false. +! end if + ! if ( data%State%Drawworks%motion==1 .and. data%State%Drawworks%FloorCollision==.false. ) then + ! !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] + ! data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] + ! else + ! Call DWFixModeMotion + ! end if + ! return + ! end if @@ -128,17 +130,18 @@ subroutine Drawworks_Solver -!==================================================== -! Crown Warning -!==================================================== - if ( ((3.280839895*data%State%Drawworks%Hook_Height)>=data%State%Drawworks%max_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/1,2,5,6,8,9,13/))) ) then - if ( data%State%Drawworks%motion==-1 ) then - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] - else - Call DWFixModeMotion - end if - return - end if +! !==================================================== +! ! Crown Warning +! !==================================================== +! ?if ( ((3.280839895*data%State%Drawworks%Hook_Height)>=data%State%Drawworks%max_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/1,2,5,6,8,9,13/))) ) then +! if ( data%State%Drawworks%motion==-1 ) then +! !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] +! data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] +! else +! Call DWFixModeMotion +! end if +! return +! end if @@ -146,17 +149,18 @@ subroutine Drawworks_Solver -!==================================================== -! Floor Warning -!==================================================== - if ( ((3.280839895*data%State%Drawworks%Hook_Height)<=data%State%Drawworks%min_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/1,2,5,6,8,9,13/))) ) then - if ( data%State%Drawworks%motion==1 ) then - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] - else - Call DWFixModeMotion - end if - return - end if +! !==================================================== +! ! Floor Warning +! !==================================================== +! ?if ( ((3.280839895*data%State%Drawworks%Hook_Height)<=data%State%Drawworks%min_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/1,2,5,6,8,9,13/))) ) then +! if ( data%State%Drawworks%motion==1 ) then +! !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] +! data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] +! else +! Call DWFixModeMotion +! end if +! return +! end if @@ -197,7 +201,8 @@ subroutine Drawworks_Solver if ( data%State%Drawworks%TDBOPElementNo(j)/=0 ) then if ( ((data%State%Drawworks%TDBOPHeight(j)-data%State%Drawworks%TDBOPThickness)<=(data%State%Drawworks%TDDrillStemsTopDepth(data%State%Drawworks%TDBOPElementNo(j))+data%State%Drawworks%TDDrillStemsToolJointRange(data%State%Drawworks%TDBOPElementNo(j)))) .and. ((data%State%Drawworks%TDBOPHeight(j)-data%State%Drawworks%TDBOPThickness)>data%State%Drawworks%TDDrillStemsTopDepth(data%State%Drawworks%TDBOPElementNo(j))) .and. (data%State%Drawworks%TDBOPRamDiam(j)<(2.d0*12.d0*data%State%Drawworks%TDDrillStemsRtoolJoint(data%State%Drawworks%TDBOPElementNo(j)))) ) then if ( data%State%Drawworks%motion==1 ) then - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] + !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] + data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] else Call DWFixModeMotion end if @@ -221,7 +226,8 @@ subroutine Drawworks_Solver if ( data%State%Drawworks%TDBOPElementNo(j)/=0 ) then if ( ((data%State%Drawworks%TDBOPHeight(j)+data%State%Drawworks%TDBOPThickness)>=(data%State%Drawworks%TDDrillStemsDownDepth(data%State%Drawworks%TDBOPElementNo(j))-data%State%Drawworks%TDDrillStemsToolJointRange(data%State%Drawworks%TDBOPElementNo(j)))) .and. ((data%State%Drawworks%TDBOPHeight(j)+data%State%Drawworks%TDBOPThickness) BottomHole ROP Condition if ( (int(data%State%Drawworks%TDDrillStemBottom*10000.d0)>=(int((data%State%Drawworks%TDWellTotalLength+data%State%Drawworks%TDDlMax)*10000.d0))) .and. (data%State%Drawworks%motion==-1 .or. data%State%Drawworks%motion==0) ) then if ( data%State%Drawworks%StringIsBottomOfWell==0 ) then - data%State%Drawworks%Hook_Height_final = data%State%Drawworks%Hook_Height_final+(data%State%Drawworks%TDDrillStemBottom-(data%State%Drawworks%TDWellTotalLength+data%State%Drawworks%TDDlMax)) + !?data%State%Drawworks%Hook_Height_final = data%State%Drawworks%Hook_Height_final+(data%State%Drawworks%TDDrillStemBottom-(data%State%Drawworks%TDWellTotalLength+data%State%Drawworks%TDDlMax)) + data%State%Drawworks%HookLinearVelocity_final = (data%State%Drawworks%TDDrillStemBottom-(data%State%Drawworks%TDWellTotalLength+data%State%Drawworks%TDDlMax))/data%State%Drawworks%time_step ![ft/s] data%State%Drawworks%StringIsBottomOfWell = 1 end if Call DWFixModeMotion @@ -267,7 +275,8 @@ subroutine Drawworks_Solver - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] + !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] + data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] data%State%Drawworks%HookHeight_graph_output = 0.1189d0*((3.280839895d0*data%State%Drawworks%Hook_Height)-28.d0)-2.6d0 ![ft] diff --git a/Equipments/Drawworks/Drawworks_Solver_OffMode.f90 b/Equipments/Drawworks/Drawworks_Solver_OffMode.f90 index dc806c5..c2a14c3 100644 --- a/Equipments/Drawworks/Drawworks_Solver_OffMode.f90 +++ b/Equipments/Drawworks/Drawworks_Solver_OffMode.f90 @@ -23,7 +23,8 @@ subroutine Drawworks_Solver_OffMode data%State%Drawworks%motion = 0 data%State%Drawworks%w_old_drum = 0.d0 data%State%Drawworks%w_drum = 0.d0 - data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height + !data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height + data%State%Drawworks%HookLinearVelocity = 0.d0 ![ft/s] @@ -46,24 +47,25 @@ subroutine Drawworks_Solver_OffMode -!==================================================== -! Crown Collision (Max_Hook_Height) -!==================================================== - if ( ((3.280839895*data%State%Drawworks%Hook_Height)>=data%State%Drawworks%max_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/3,4,7,10,11,12,14/))) ) then - if ( CrownCollision_Status==0 .and. data%State%Drawworks%motion==1 ) then - CrownCollision_Status = 1 - data%State%Drawworks%CrownCollision = .true. - data%State%Drawworks%SoundCrownCollision = .true. - else - data%State%Drawworks%SoundCrownCollision = .false. - end if - if ( data%State%Drawworks%motion==-1 .and. data%State%Drawworks%CrownCollision==.false. ) then - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] - else - Call DWFixModeMotion - end if - return - end if +!!==================================================== +!! Crown Collision (Max_Hook_Height) +!!==================================================== + ! ?if ( ((3.280839895*data%State%Drawworks%Hook_Height)>=data%State%Drawworks%max_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/3,4,7,10,11,12,14/))) ) then + ! if ( CrownCollision_Status==0 .and. data%State%Drawworks%motion==1 ) then + ! CrownCollision_Status = 1 + ! data%State%Drawworks%CrownCollision = .true. + ! data%State%Drawworks%SoundCrownCollision = .true. + ! else + ! data%State%Drawworks%SoundCrownCollision = .false. + ! end if + ! if ( data%State%Drawworks%motion==-1 .and. data%State%Drawworks%CrownCollision==.false. ) then + ! !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] + ! data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] + ! else + ! Call DWFixModeMotion + ! end if + ! return + ! end if @@ -71,24 +73,25 @@ subroutine Drawworks_Solver_OffMode -!==================================================== -! Floor Collision (Min_Hook_Height) -!==================================================== - if ( ((3.280839895*data%State%Drawworks%Hook_Height)<=data%State%Drawworks%min_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/3,4,7,10,11,12,14/))) ) then - if ( FloorCollision_Status==0 .and. data%State%Drawworks%motion==-1 ) then - FloorCollision_Status = 1 - data%State%Drawworks%FloorCollision = .true. - data%State%Drawworks%SoundFloorCollision = .true. - else - data%State%Drawworks%SoundFloorCollision = .false. - end if - if ( data%State%Drawworks%motion==1 .and. data%State%Drawworks%FloorCollision==.false. ) then - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] - else - Call DWFixModeMotion - end if - return - end if +! !==================================================== +! ! Floor Collision (Min_Hook_Height) +! !==================================================== +! ?if ( ((3.280839895*data%State%Drawworks%Hook_Height)<=data%State%Drawworks%min_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/3,4,7,10,11,12,14/))) ) then +! if ( FloorCollision_Status==0 .and. data%State%Drawworks%motion==-1 ) then +! FloorCollision_Status = 1 +! data%State%Drawworks%FloorCollision = .true. +! data%State%Drawworks%SoundFloorCollision = .true. +! else +! data%State%Drawworks%SoundFloorCollision = .false. +! end if +! if ( data%State%Drawworks%motion==1 .and. data%State%Drawworks%FloorCollision==.false. ) then +! !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] +! data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] +! else +! Call DWFixModeMotion +! end if +! return +! end if @@ -97,17 +100,18 @@ subroutine Drawworks_Solver_OffMode -!==================================================== -! Warning (Max_Hook_Height) -!==================================================== - if ( ((3.280839895*data%State%Drawworks%Hook_Height)>=data%State%Drawworks%max_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/1,2,5,6,8,9,13/))) ) then - if ( data%State%Drawworks%motion==-1 ) then - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] - else - Call DWFixModeMotion - end if - return - end if +! !==================================================== +! ! Warning (Max_Hook_Height) +! !==================================================== +! ?if ( ((3.280839895*data%State%Drawworks%Hook_Height)>=data%State%Drawworks%max_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/1,2,5,6,8,9,13/))) ) then +! if ( data%State%Drawworks%motion==-1 ) then +! !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] +! data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] +! else +! Call DWFixModeMotion +! end if +! return +! end if @@ -115,17 +119,18 @@ subroutine Drawworks_Solver_OffMode -!==================================================== -! Warning (Min_Hook_Height) -!==================================================== - if ( ((3.280839895*data%State%Drawworks%Hook_Height)<=data%State%Drawworks%min_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/1,2,5,6,8,9,13/))) ) then - if ( data%State%Drawworks%motion==1 ) then - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] - else - Call DWFixModeMotion - end if - return - end if +! !==================================================== +! ! Warning (Min_Hook_Height) +! !==================================================== +! ?if ( ((3.280839895*data%State%Drawworks%Hook_Height)<=data%State%Drawworks%min_Hook_Height) .and. (any(data%State%Drawworks%DrillModeCond==(/1,2,5,6,8,9,13/))) ) then +! if ( data%State%Drawworks%motion==1 ) then +! !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] +! data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] +! else +! Call DWFixModeMotion +! end if +! return +! end if @@ -163,7 +168,8 @@ subroutine Drawworks_Solver_OffMode if ( data%State%Drawworks%TDBOPElementNo(j)/=0 ) then if ( ((data%State%Drawworks%TDBOPHeight(j)-data%State%Drawworks%TDBOPThickness)<=(data%State%Drawworks%TDDrillStemsTopDepth(data%State%Drawworks%TDBOPElementNo(j))+data%State%Drawworks%TDDrillStemsToolJointRange(data%State%Drawworks%TDBOPElementNo(j)))) .and. ((data%State%Drawworks%TDBOPHeight(j)-data%State%Drawworks%TDBOPThickness)>data%State%Drawworks%TDDrillStemsTopDepth(data%State%Drawworks%TDBOPElementNo(j))) .and. (data%State%Drawworks%TDBOPRamDiam(j)<(2.d0*12.d0*data%State%Drawworks%TDDrillStemsRtoolJoint(data%State%Drawworks%TDBOPElementNo(j)))) ) then if ( data%State%Drawworks%motion==1 ) then - data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] + !data%State%Drawworks%Hook_Height_final = 3.280839895d0*data%State%Drawworks%Hook_Height ![ft] + data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] else Call DWFixModeMotion end if @@ -187,7 +193,8 @@ subroutine Drawworks_Solver_OffMode if ( data%State%Drawworks%TDBOPElementNo(j)/=0 ) then if ( ((data%State%Drawworks%TDBOPHeight(j)+data%State%Drawworks%TDBOPThickness)>=(data%State%Drawworks%TDDrillStemsDownDepth(data%State%Drawworks%TDBOPElementNo(j))-data%State%Drawworks%TDDrillStemsToolJointRange(data%State%Drawworks%TDBOPElementNo(j)))) .and. ((data%State%Drawworks%TDBOPHeight(j)+data%State%Drawworks%TDBOPThickness) BottomHole ROP Condition if ( (int(data%State%Drawworks%TDDrillStemBottom*10000.d0)>=(int((data%State%Drawworks%TDWellTotalLength+data%State%Drawworks%TDDlMax)*10000.d0))) .and. (data%State%Drawworks%motion==-1 .or. data%State%Drawworks%motion==0) ) then if ( data%State%Drawworks%StringIsBottomOfWell==0 ) then - data%State%Drawworks%Hook_Height_final = data%State%Drawworks%Hook_Height_final+(data%State%Drawworks%TDDrillStemBottom-(data%State%Drawworks%TDWellTotalLength+data%State%Drawworks%TDDlMax)) + !?data%State%Drawworks%Hook_Height_final = data%State%Drawworks%Hook_Height_final+(data%State%Drawworks%TDDrillStemBottom-(data%State%Drawworks%TDWellTotalLength+data%State%Drawworks%TDDlMax)) + data%State%Drawworks%HookLinearVelocity_final = (data%State%Drawworks%TDDrillStemBottom-(data%State%Drawworks%TDWellTotalLength+data%State%Drawworks%TDDlMax))/data%State%Drawworks%time_step ![ft/s] data%State%Drawworks%StringIsBottomOfWell = 1 end if Call DWFixModeMotion @@ -238,7 +247,8 @@ subroutine Drawworks_Solver_OffMode - data%State%Drawworks%Hook_Height_final=3.280839895d0*data%State%Drawworks%Hook_Height ![ft] + !data%State%Drawworks%Hook_Height_final=3.280839895d0*data%State%Drawworks%Hook_Height ![ft] + data%State%Drawworks%HookLinearVelocity_final = 3.280839895d0*data%State%Drawworks%HookLinearVelocity ![ft/s] data%State%Drawworks%HookHeight_graph_output=0.1189d0*((3.280839895d0*data%State%Drawworks%Hook_Height)-28.0d0)-2.6d0 ![ft] diff --git a/Equipments/Drawworks/Drawworks_StartUp.f90 b/Equipments/Drawworks/Drawworks_StartUp.f90 index fde56e5..2a62c2d 100644 --- a/Equipments/Drawworks/Drawworks_StartUp.f90 +++ b/Equipments/Drawworks/Drawworks_StartUp.f90 @@ -20,9 +20,11 @@ subroutine Drawworks_StartUp data%State%Drawworks%Hook_Height_ini = 75.0d0 ![ft] data%State%Drawworks%Hook_Height_ini_graph_output = -1.54090d0 ![ft] data%State%Drawworks%Hook_Height_inim = 0.3048d0*data%State%Drawworks%Hook_Height_ini ![m] - data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height_inim ![m] - data%State%Drawworks%Hook_Height_final = 75.d0 ![ft] - data%State%Drawworks%TDHookHeight = 75.d0 ![ft] + !data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height_inim ![m] + !data%State%Drawworks%Hook_Height_final = 75.d0 ![ft] + data%State%Drawworks%TDHookHeight = data%State%Drawworks%Hook_Height_final ![ft] + data%State%Drawworks%HookLinearVelocity_final = 0.d0 ![ft/s] + data%State%Drawworks%HookLinearVelocity = 0.d0 ![m/s] diff --git a/Equipments/Drawworks/Drawworks_VARIABLES.f90 b/Equipments/Drawworks/Drawworks_VARIABLES.f90 index bb3e25e..9908fb7 100644 --- a/Equipments/Drawworks/Drawworks_VARIABLES.f90 +++ b/Equipments/Drawworks/Drawworks_VARIABLES.f90 @@ -26,6 +26,8 @@ MODULE Drawworks_VARIABLES REAL :: Hook_Height, Hook_Height_ini, Hook_Height_inim, Hook_Height_ini_graph_output, Hook_Height_final, max_Hook_Height, min_Hook_Height, HookHeight_graph_output REAL :: N_Throtle, Conv_Ratio, NumberOfLine, Speed, N_new, N_old ! N[RPM] REAL :: w_drum, w_old_drum ! w[rad/s] + REAL :: HookLinearVelocity ! [m/s] + REAL :: HookLinearVelocity_final ! [ft/s] REAL , Dimension(6) :: TDBOPHeight REAL , Dimension(4) :: TDBOPRamDiam REAL :: TDBOPThickness, TDDrillStemBottom, TDWellTotalLength, TDDlMax diff --git a/Equipments/Drawworks/Drawworks_VARIABLES.i90 b/Equipments/Drawworks/Drawworks_VARIABLES.i90 index f64113f..f6f50f3 100644 --- a/Equipments/Drawworks/Drawworks_VARIABLES.i90 +++ b/Equipments/Drawworks/Drawworks_VARIABLES.i90 @@ -27,6 +27,7 @@ MODULE Drawworks_VARIABLES REAL :: Hook_Height, Hook_Height_ini, Hook_Height_inim, Hook_Height_ini_graph_output, Hook_Height_final, max_Hook_Height, min_Hook_Height, HookHeight_graph_output REAL :: N_Throtle, Conv_Ratio, NumberOfLine, Speed, N_new, N_old ! N[RPM] REAL :: w_drum, w_old_drum ! w[rad/s] + REAL :: HookLinearVelocity ! [ft/s] REAL , Dimension(6) :: TDBOPHeight REAL , Dimension(4) :: TDBOPRamDiam REAL :: TDBOPThickness, TDDrillStemBottom, TDWellTotalLength, TDDlMax diff --git a/Equipments/MudSystem/Disconnecting_Pipe.f90 b/Equipments/MudSystem/Disconnecting_Pipe.f90 index bcef0a5..89b37aa 100644 --- a/Equipments/MudSystem/Disconnecting_Pipe.f90 +++ b/Equipments/MudSystem/Disconnecting_Pipe.f90 @@ -26,11 +26,11 @@ subroutine DisconnectingPipe ! is called in subroutine CirculationCodeSelect ! ======if(ExcessMudVolume <= 0.) No Modification Needed Because Removed Pipe was Empty===== - if (Get_KellyConnection() == KELLY_CONNECTION_NOTHING .and. Manifold%Valve(56)%Status == .False.) ExcessMudVolume= 0.d0 !Valve(56)%Status == .False. :: safety valve installed + if (Get_KellyConnection() == KELLY_CONNECTION_NOTHING .and. data%state%manifold%Valve(56)%Status == .False.) ExcessMudVolume= 0.d0 !Valve(56)%Status == .False. :: safety valve installed if (ExcessMudVolume > 0.) then - if ( Manifold%Valve(53)%Status == .true. ) then + if ( data%state%manifold%Valve(53)%Status == .true. ) then data%State%MudSystem%MudBucketVolume= ExcessMudVolume else data%State%MudSystem%MudBucketVolume= 0.0 diff --git a/Equipments/MudSystem/MudSystem.f90 b/Equipments/MudSystem/MudSystem.f90 index 3feb2b5..cc78284 100644 --- a/Equipments/MudSystem/MudSystem.f90 +++ b/Equipments/MudSystem/MudSystem.f90 @@ -801,16 +801,16 @@ use SimulationVariables !@ data%State%FricPressDrop%PumpToManifoldCompressedMudVol = data%State%FricPressDrop%PumpToManifoldCompressedMudVol + MP1_Q / ConvMinToSec * dt PumpPressure1= data%State%FricPressDrop%PumpToManifoldCompressedMudVol / (MudCompressibility * data%State%FricPressDrop%PumpToManifoldMudVol) write(*,*) '21)PumpPressure1=' , PumpPressure1 - WRITE (*,*) ' valve 1 ', Manifold%Valve(1)%Status - WRITE (*,*) ' valve 4 ', Manifold%Valve(4)%Status - WRITE (*,*) ' valve 6 ', Manifold%Valve(6)%Status - WRITE (*,*) ' valve 7 ', Manifold%Valve(7)%Status - WRITE (*,*) ' valve 8 ', Manifold%Valve(8)%Status - WRITE (*,*) ' valve 9 ', Manifold%Valve(9)%Status - WRITE (*,*) ' valve 13 ', Manifold%Valve(13)%Status - WRITE (*,*) ' valve 68 ', Manifold%Valve(68)%Status - WRITE (*,*) ' valve 69 ', Manifold%Valve(69)%Status - WRITE (*,*) ' valve 48 ', Manifold%Valve(48)%Status + WRITE (*,*) ' valve 1 ', data%state%manifold%Valve(1)%Status + WRITE (*,*) ' valve 4 ', data%state%manifold%Valve(4)%Status + WRITE (*,*) ' valve 6 ', data%state%manifold%Valve(6)%Status + WRITE (*,*) ' valve 7 ', data%state%manifold%Valve(7)%Status + WRITE (*,*) ' valve 8 ', data%state%manifold%Valve(8)%Status + WRITE (*,*) ' valve 9 ', data%state%manifold%Valve(9)%Status + WRITE (*,*) ' valve 13 ', data%state%manifold%Valve(13)%Status + WRITE (*,*) ' valve 68 ', data%state%manifold%Valve(68)%Status + WRITE (*,*) ' valve 69 ', data%state%manifold%Valve(69)%Status + WRITE (*,*) ' valve 48 ', data%state%manifold%Valve(48)%Status !call DisplayOpenPathsWrite() ENDIF @@ -818,16 +818,16 @@ use SimulationVariables !@ data%State%FricPressDrop%PumpToManifoldCompressedMudVol = data%State%FricPressDrop%PumpToManifoldCompressedMudVol + MP2_Q / ConvMinToSec * dt PumpPressure2= data%State%FricPressDrop%PumpToManifoldCompressedMudVol / (MudCompressibility * data%State%FricPressDrop%PumpToManifoldMudVol) write(*,*) '22)PumpPressure1=' , PumpPressure2 - WRITE (*,*) ' -valve 1 ', Manifold%Valve(1)%Status - WRITE (*,*) ' -valve 4 ', Manifold%Valve(4)%Status - WRITE (*,*) ' -valve 6 ', Manifold%Valve(6)%Status - WRITE (*,*) ' -valve 7 ', Manifold%Valve(7)%Status - WRITE (*,*) ' -valve 8 ', Manifold%Valve(8)%Status - WRITE (*,*) ' -valve 9 ', Manifold%Valve(9)%Status - WRITE (*,*) ' -valve 13 ', Manifold%Valve(13)%Status - WRITE (*,*) ' -valve 68 ', Manifold%Valve(68)%Status - WRITE (*,*) ' -valve 69 ', Manifold%Valve(69)%Status - WRITE (*,*) ' -valve 48 ', Manifold%Valve(48)%Status + WRITE (*,*) ' -valve 1 ', data%state%manifold%Valve(1)%Status + WRITE (*,*) ' -valve 4 ', data%state%manifold%Valve(4)%Status + WRITE (*,*) ' -valve 6 ', data%state%manifold%Valve(6)%Status + WRITE (*,*) ' -valve 7 ', data%state%manifold%Valve(7)%Status + WRITE (*,*) ' -valve 8 ', data%state%manifold%Valve(8)%Status + WRITE (*,*) ' -valve 9 ', data%state%manifold%Valve(9)%Status + WRITE (*,*) ' -valve 13 ', data%state%manifold%Valve(13)%Status + WRITE (*,*) ' -valve 68 ', data%state%manifold%Valve(68)%Status + WRITE (*,*) ' -valve 69 ', data%state%manifold%Valve(69)%Status + WRITE (*,*) ' -valve 48 ', data%state%manifold%Valve(48)%Status !call DisplayOpenPathsWrites() ENDIF @@ -1996,9 +1996,9 @@ use SimulationVariables !@ !!====================================================================== - IF (Manifold%Valve(65)%Status == .TRUE.) call Activate_Pump1PopOffValveBlown() !Pump1PopOffValveBlown= .TRUE. - IF (Manifold%Valve(66)%Status == .TRUE.) call Activate_Pump2PopOffValveBlown() ! Pump2PopOffValveBlown= .TRUE. - IF (Manifold%Valve(67)%Status == .TRUE.) call Activate_Pump3PopOffValveBlown() !Pump2PopOffValveBlown= .TRUE. + IF (data%state%manifold%Valve(65)%Status == .TRUE.) call Activate_Pump1PopOffValveBlown() !Pump1PopOffValveBlown= .TRUE. + IF (data%state%manifold%Valve(66)%Status == .TRUE.) call Activate_Pump2PopOffValveBlown() ! Pump2PopOffValveBlown= .TRUE. + IF (data%state%manifold%Valve(67)%Status == .TRUE.) call Activate_Pump3PopOffValveBlown() !Pump2PopOffValveBlown= .TRUE. IF (data%State%MudSystem%ActiveTankVolume >= (data%Configuration%Mud%ActiveTotalTankCapacityGal-data%Configuration%Mud%ActiveSettledContentsGal)) THEN @@ -2806,7 +2806,7 @@ use SimulationVariables !@ !============BellNippleToPits-FullWell(MLnumber=3)============== - if ( Manifold%Valve(41)%Status == .false. .and. Manifold%Valve(42)%Status == .false. ) then + if ( data%state%manifold%Valve(41)%Status == .false. .and. data%state%manifold%Valve(42)%Status == .false. ) then call ChangeValve(60, .TRUE.) else call ChangeValve(60, .FALSE.) diff --git a/Equipments/MudSystem/MudSystemMain.f90 b/Equipments/MudSystem/MudSystemMain.f90 index 41d2799..d7a9a51 100644 --- a/Equipments/MudSystem/MudSystemMain.f90 +++ b/Equipments/MudSystem/MudSystemMain.f90 @@ -32,9 +32,9 @@ module MudSystemMain implicit none !if(print_log) print* , 'MudSystem_Step' !CALL main - if(Manifold%IsTraverse) then + if(data%state%manifold%IsTraverse) then call LineupAndPath() - Manifold%IsTraverse = .false. + data%state%manifold%IsTraverse = .false. endif call main() end subroutine MudSystem_Step diff --git a/Equipments/MudSystem/Pump_and_Trip_In.f90 b/Equipments/MudSystem/Pump_and_Trip_In.f90 index 9762098..2da2e89 100644 --- a/Equipments/MudSystem/Pump_and_Trip_In.f90 +++ b/Equipments/MudSystem/Pump_and_Trip_In.f90 @@ -1633,7 +1633,7 @@ use SimulationVariables !@@@ WRITE (*,*) 'WellToChokeManifoldOpen', data%State%MudSystem%WellToChokeManifoldOpen else data%State%MudSystem%SoundGasThroughChoke = 0 - if(print_log) print* , 'SoundGasThroughChoke2=', data%State%MudSystem%SoundGasThroughChoke + ! if(print_log) print* , 'SoundGasThroughChoke2=', data%State%MudSystem%SoundGasThroughChoke endif !if(print_log) print* , 'SoundGasThroughChoke3=', SoundGasThroughChoke diff --git a/FluidFlow/Annulus_and_Openhole_Pressure_Distribution.f90 b/FluidFlow/Annulus_and_Openhole_Pressure_Distribution.f90 index 5ace983..aeaa188 100644 --- a/FluidFlow/Annulus_and_Openhole_Pressure_Distribution.f90 +++ b/FluidFlow/Annulus_and_Openhole_Pressure_Distribution.f90 @@ -73,17 +73,17 @@ IF (KickVARIABLES%WellHeadOpen .OR. KickVARIABLES%NoGasPocket == 0) THEN !! ( WRITE (*,*) ' PressureGauges(2) , Kchoke' , data%State%PressureDisplay%PressureGauges(2) , data%State%FricPressDrop%Kchoke WRITE (*,*) 'Initial guess after opening choke =', GasPocketFlowInduced%Array(1) - WRITE (*,*) ' valve 49 ', Manifold%Valve(49)%Status - WRITE (*,*) ' valve 47 ', Manifold%Valve(47)%Status - WRITE (*,*) ' valve 26 ', Manifold%Valve(26)%Status - WRITE (*,*) ' valve 30 ', Manifold%Valve(30)%Status - WRITE (*,*) ' valve 34 ', Manifold%Valve(34)%Status - WRITE (*,*) ' valve 63 ', Manifold%Valve(63)%Status - WRITE (*,*) ' valve 28 ', Manifold%Valve(28)%Status - WRITE (*,*) ' valve 33 ', Manifold%Valve(33)%Status - WRITE (*,*) ' valve 62 ', Manifold%Valve(62)%Status - WRITE (*,*) ' valve 36 ', Manifold%Valve(36)%Status - WRITE (*,*) ' valve 38 ', Manifold%Valve(38)%Status + WRITE (*,*) ' valve 49 ', data%state%manifold%Valve(49)%Status + WRITE (*,*) ' valve 47 ', data%state%manifold%Valve(47)%Status + WRITE (*,*) ' valve 26 ', data%state%manifold%Valve(26)%Status + WRITE (*,*) ' valve 30 ', data%state%manifold%Valve(30)%Status + WRITE (*,*) ' valve 34 ', data%state%manifold%Valve(34)%Status + WRITE (*,*) ' valve 63 ', data%state%manifold%Valve(63)%Status + WRITE (*,*) ' valve 28 ', data%state%manifold%Valve(28)%Status + WRITE (*,*) ' valve 33 ', data%state%manifold%Valve(33)%Status + WRITE (*,*) ' valve 62 ', data%state%manifold%Valve(62)%Status + WRITE (*,*) ' valve 36 ', data%state%manifold%Valve(36)%Status + WRITE (*,*) ' valve 38 ', data%state%manifold%Valve(38)%Status ELSE ! flow through bell nipple k = data%State%FricPressDrop%NoHorizontalEl + data%State%FricPressDrop%NoStringEl + data%State%FricPressDrop%NoAnnulusEl diff --git a/FluidFlow/FluidFlowMain.f90 b/FluidFlow/FluidFlowMain.f90 index 3cd8390..ce0fc3a 100644 --- a/FluidFlow/FluidFlowMain.f90 +++ b/FluidFlow/FluidFlowMain.f90 @@ -38,7 +38,7 @@ module FluidFlowMain FlowDuration = 3600000 * (FlowEndTime(5) - FlowStartTime(5)) + 60000 * (FlowEndTime(6) - FlowStartTime(6)) + 1000 * (FlowEndTime(7) - FlowStartTime(7)) + (FlowEndTime(8) - FlowStartTime(8)) - if(print_log) WRITE (*,*) 'FlowDuration (ms)=' , FlowDuration + ! if(print_log) WRITE (*,*) 'FlowDuration (ms)=' , FlowDuration end subroutine FluidFlow_Step diff --git a/FluidFlow/Fluid_Flow_Solver.f90 b/FluidFlow/Fluid_Flow_Solver.f90 index 227a305..f33d996 100644 --- a/FluidFlow/Fluid_Flow_Solver.f90 +++ b/FluidFlow/Fluid_Flow_Solver.f90 @@ -6,7 +6,7 @@ subroutine Fluid_Flow_Solver use PressureDisplayVARIABLESModule USE FricPressDropVarsModule USE MudSystemVARIABLES -use SimulationVariables !@@@ + use SimulationVariables !@@@ USE Fluid_Flow_Startup_Vars USE CError diff --git a/FluidFlow/kick/Kick_VARIABLES.f90 b/FluidFlow/kick/Kick_VARIABLES.f90 index cd7016d..1f8f7c3 100644 --- a/FluidFlow/kick/Kick_VARIABLES.f90 +++ b/FluidFlow/kick/Kick_VARIABLES.f90 @@ -6,7 +6,7 @@ MODULE KickVARIABLESModule IMPLICIT NONE - TYPE :: KickVARIABLESTYPE + ! TYPE :: KickVARIABLESTYPE REAL :: DrillStringSpeed ! drill string speed during surge and swab [ft/s] @@ -80,8 +80,8 @@ MODULE KickVARIABLESModule - END TYPE KickVARIABLESTYPE - TYPE(KickVARIABLESTYPE) :: KickVARIABLES + ! END TYPE KickVARIABLESTYPE + ! TYPE(KickVARIABLESTYPE) :: KickVARIABLES INTEGER :: KickIteration ! the number of itertion for calculating pressure and flowrate, when kick is in the well diff --git a/Makefile b/Makefile index e12cabf..6ba86d8 100644 --- a/Makefile +++ b/Makefile @@ -152,6 +152,9 @@ SRCS_F =\ Equipments/MudSystem/MudSystem_Variables.f90 \ TorqueDrag/TD_Modules/TD_DrillStem.f90 \ CSharp/Equipments/MudPathFinding/CStack.f90 \ + \ + CSharp/Equipments/MudPathFinding/ManifoldVariables.f90 \ + \ CSharp/Problems/CDrillStemProblemsVariables.f90 \ CSharp/Problems/COtherProblemsVariables.f90 \ CSharp/Problems/CLostProblemsVariables.f90 \ diff --git a/Redis/Redis_Interface.f90 b/Redis/Redis_Interface.f90 index db03466..ae9eedf 100644 --- a/Redis/Redis_Interface.f90 +++ b/Redis/Redis_Interface.f90 @@ -120,9 +120,9 @@ Module RedisInterface use iso_c_binding, only: c_null_char character(len=*):: str character(len=len_trim(str)+1)::c_str - print *, "publishMessageToChannel: ", str + if(str .ne. 'ack') print *, "publishMessageToChannel: ", str c_str = str//c_null_char - if(log_level>4) print *,"Sending message: ",len_trim(str) + ! if(log_level>4) print *,"Sending message: ",len_trim(str) call publishMessageToChannel_C(c_str) end subroutine publishMessageToChannel diff --git a/Redis/redis_io.c b/Redis/redis_io.c index 3132548..04fd1a4 100644 --- a/Redis/redis_io.c +++ b/Redis/redis_io.c @@ -12,14 +12,13 @@ char *result,*key,*pass,*channel_in,*channel_out; extern void test(); extern void setTongLever(int *v); extern void ButtonPress_Slips(); +extern void ToggleValve(int *valve_number); - -void addnums( int* a, int* b ) +char *clone(char *s) { - int c = (*a) + (*b); /* convert pointers to values, then add them */ - printf("sum of %i and %i is %i\n", (*a), (*b), c ); -} + char *r = malloc(strlen(s)+1); +} void initConnection(char *address, int *port,char * password,char *datakey,int *returnValue) { context = redisConnect(address,*port); @@ -77,15 +76,6 @@ void setData(char *part, char *data) freeReplyObject(reply); } -// void getData_bystr(void *s) -// { -// redisReply *reply; -// reply = redisCommand(context, "GET %s.in",key); -// freeReplyObject(reply); -// set_fortran_string(s, strlen(reply->str), reply->str); -// return; -// } - char *getData(int *len) { @@ -120,7 +110,13 @@ void onMessage(redisAsyncContext * c, void *reply, void * privdata) { if(strcmp(r->element[0]->str,"message")==0) if(strcmp(r->element[1]->str,channel_in)==0) { - char *fn = r->element[2]->str; + // char *message = malloc(srlen(r->element[2]->str)); + // strcpy(message,r->element[2]->str); + char delimiter = ','; + char *chptr = strchr(r->element[2]->str, delimiter); + char *fn = strtok(r->element[2]->str,&delimiter); + char *parameter = malloc(20); + parameter = strtok(NULL,&delimiter); printf("calling %s\n",fn); if(strcmp(fn,"test")==0) test(); @@ -133,8 +129,14 @@ void onMessage(redisAsyncContext * c, void *reply, void * privdata) { setTongLever(&v); }else if(strcmp(fn,"BUTTON_PRESS_SLIPS")==0){ ButtonPress_Slips(); - } - else + }else if(strcmp(fn,"ChangeValve")==0){ + int valve_number = atoi(parameter); + ToggleValve(&valve_number); + // }else if(strcmp(fn,"KellyConnected")==0){ + // KellyConnected(); + // }else if(strcmp(fn,"KellyDisconnected")==0){ + // KellyDisconnected(); + }else printf("message: %s\n",r->element[2]->str); } } diff --git a/Redis/test.c b/Redis/test.c new file mode 100644 index 0000000..7e54aa0 --- /dev/null +++ b/Redis/test.c @@ -0,0 +1,23 @@ +#include +#include +#include + +int main () { +// char str[80] = "This is - www.tutorialspoint.com - website"; + char *str=malloc(30); + scanf("%s",str); + const char s[2] = "-"; + char *token; + + /* get the first token */ + token = strtok(str, s); + + /* walk through other tokens */ + while( token != NULL ) { + printf( " %s\n", token ); + + token = strtok(NULL, s); + } + + return(0); +} \ No newline at end of file diff --git a/Simulation/SimulationVariables.f90 b/Simulation/SimulationVariables.f90 index 0f29d33..f0e3ffa 100644 --- a/Simulation/SimulationVariables.f90 +++ b/Simulation/SimulationVariables.f90 @@ -2,7 +2,8 @@ module SimulationVariables use Constants use logging use json_module - + + use ManifoldVariables use CUnityInputs use CUnityOutputs use COperationScenariosVariables @@ -109,6 +110,7 @@ module SimulationVariables end type EquipmentControlType type SimulationStateType + type(ManifoldType)::Manifold ! Type(HoistingType)::Hoisting !This ds placed twice in data (onece in configuration, once in state) type(OperationScenarioType)::OperationScenario type(NotificationType)::notifications diff --git a/SimulationCore2 b/SimulationCore2 index eaf0861..63240aa 100755 Binary files a/SimulationCore2 and b/SimulationCore2 differ diff --git a/Simulator.f90 b/Simulator.f90 index aebf3c0..69bc851 100644 --- a/Simulator.f90 +++ b/Simulator.f90 @@ -119,10 +119,11 @@ module Simulator do while (.true.) if(mod(simulationStep,print_freq)==0) then print_log=.true. - ! call publishMessageToChannel("Hello from FORTRAN!") else print_log=.false. - endif + endif + if(mod(simulationStep,10)==0) call publishMessageToChannel("ack") + if(simulationStep>100) exit t0 = time_ms() if(print_log) print *,"simulationStep = ",simulationStep call read_variables() @@ -258,6 +259,7 @@ module Simulator call WarningsToJson(jsonroot) ! call ProblemsToJson(jsonroot) call EquipmentsToJson(jsonroot) + call StateToJson(jsonroot) call jsoncore%print_to_string(jsonroot,redisInput) if(log_level>4) then @@ -312,9 +314,9 @@ module Simulator logical::found call getData(redisOutput,leng) - open(1,file="redisContent.json",status="REPLACE") - write(1,"(A)") redisOutput - close(1) + ! open(1,file="redisContent.json",status="REPLACE") + ! write(1,"(A)") redisOutput + ! close(1) call jsonfile%initialize() call jsonfile%get_core(json) ! print *,"len_trim(redidOutput)=",len_trim(redisOutput) @@ -325,6 +327,7 @@ module Simulator call json%get(jsonroot,'status',pval) call json%get(pval,stat) if (stat==0) then + if(print_log) print *,"Status is oddly zero" return endif simulationStatus = stat @@ -403,12 +406,17 @@ module Simulator call ChokeManifoldFromJson(p) call DataDisplayConsoleFromJson(p) call DrillingConsoleFromJson(jsonfile) - ! call HookFromJson(p) call StandPipeManifoldFromJson(p) call TopDrivePanelFromJson(p) ! call DrillingWatchFromJson(p) call TankFromJson(p) call UnityInputsFromJson(jsonfile) + + ! call HookFromJson(p) + call jsonfile%get('Equipments.HookHeight',data%State%Drawworks%Hook_Height_final,is_found) + if ( .not. is_found ) call logg(4,"Not found: Equipments.HookHeight") + if(print_log) print *,"HookHeight=",data%State%Drawworks%Hook_Height_final + end subroutine subroutine EquipmentsToJson(parent) @@ -426,11 +434,12 @@ module Simulator call ChokeManifoldToJson(p) call DataDisplayConsoleToJson(p) call DrillingConsoleToJson(p) - call HookToJson(p) call StandPipeManifoldToJson(p) call TopDrivePanelToJson(p) call DrillingWatchToJson(p) - ! call TankToJson(p) + + ! call HookToJson(p) + call jsoncore%add(p,"HookVelocity",data%State%Drawworks%HookLinearVelocity_final) ! 3. add new node to parent call jsoncore%add(parent,p) @@ -536,9 +545,10 @@ module Simulator ! 1. create new node call jsoncore%create_object(p,'State') - + call ManifoldToJson(p) ! call OperationScenarioToJson(p) call notificationsToJson(p) + ! call permissionsToJson(p) ! call unitySignalsToJson(p) ! call StudentStationToJson(p) @@ -603,16 +613,11 @@ module Simulator !use this as a template subroutine notificationsToJson(parent) - type(json_value),pointer :: parent - type(json_value),pointer :: p - ! 1. create new node call jsoncore%create_object(p,'Notifications') - ! 2. add member of data type to new node - ! 3. add new node to parent call jsoncore%add(parent,p) end subroutine diff --git a/TorqueDrag/TD_StartUp/TD_StartUp.f90 b/TorqueDrag/TD_StartUp/TD_StartUp.f90 index b5b4458..589f3c9 100644 --- a/TorqueDrag/TD_StartUp/TD_StartUp.f90 +++ b/TorqueDrag/TD_StartUp/TD_StartUp.f90 @@ -49,9 +49,11 @@ subroutine TD_StartUp data%State%TD_BOP%AnnularFillingFinal = 0.d0 - data%State%Drawworks%TDHookHeight = 75.d0 ![ft] + data%State%Drawworks%Hook_Height_ini = 75.d0 ![ft] - data%State%Drawworks%Hook_Height_final = 75.d0 ![ft] + !data%State%Drawworks%Hook_Height_final = 75.d0 ![ft] + data%State%Drawworks%HookLinearVelocity_final = 0.d0 ![ft/s] + data%State%Drawworks%TDHookHeight = data%State%Drawworks%Hook_Height_final ![ft] diff --git a/a.out b/a.out index c17b77f..8fcc0e5 100755 Binary files a/a.out and b/a.out differ diff --git a/output.txt b/output.txt new file mode 100644 index 0000000..e7f7141 --- /dev/null +++ b/output.txt @@ -0,0 +1,316 @@ + allocate string + connection initialized + initializing modules + pump1 initialized + RT initialized + TD initialized + time step delay 4 18 10 + KellyDisconnected() + Modules are initialized + modules initialized + ListenToChannel + simulationStep = 1 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 1402 + simulationStep = 2 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 242 + simulationStep = 3 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 321 + simulationStep = 4 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 185 + simulationStep = 5 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 212 + simulationStep = 6 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 165 + simulationStep = 7 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 284 + simulationStep = 8 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 272 + simulationStep = 9 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 208 + simulationStep = 10 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 190 + simulationStep = 11 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 170 + simulationStep = 12 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 188 + simulationStep = 13 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 176 + simulationStep = 14 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 158 + simulationStep = 15 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 16 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 149 + simulationStep = 17 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 149 + simulationStep = 18 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 + simulationStep = 19 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 150 + simulationStep = 20 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 142 + simulationStep = 21 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 145 + simulationStep = 22 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 151 + simulationStep = 23 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 24 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 150 + simulationStep = 25 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 + simulationStep = 26 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 + simulationStep = 27 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 + simulationStep = 28 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 29 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 30 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 31 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 141 + simulationStep = 32 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 144 + simulationStep = 33 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 150 + simulationStep = 34 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 35 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 36 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 37 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 152 + simulationStep = 38 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 39 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 144 + simulationStep = 40 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 142 + simulationStep = 41 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 42 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 145 + simulationStep = 43 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 145 + simulationStep = 44 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 143 + simulationStep = 45 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 46 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 144 + simulationStep = 47 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 145 + simulationStep = 48 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 49 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 50 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 + simulationStep = 51 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 + simulationStep = 52 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 + simulationStep = 53 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 154 + simulationStep = 54 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 142 + simulationStep = 55 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 + simulationStep = 56 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 57 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 58 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 145 + simulationStep = 59 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 145 + simulationStep = 60 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 141 + simulationStep = 61 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 62 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 63 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 64 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 145 + simulationStep = 65 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 66 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 150 + simulationStep = 67 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 145 + simulationStep = 68 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 69 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 161 + simulationStep = 70 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 162 + simulationStep = 71 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 145 + simulationStep = 72 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 149 + simulationStep = 73 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 + simulationStep = 74 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 149 + simulationStep = 75 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 152 + simulationStep = 76 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 146 + simulationStep = 77 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 262 + simulationStep = 78 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 173 + simulationStep = 79 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 172 + simulationStep = 80 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 176 + simulationStep = 81 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 178 + simulationStep = 82 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 255 + simulationStep = 83 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 179 + simulationStep = 84 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 174 + simulationStep = 85 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 180 + simulationStep = 86 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 164 + simulationStep = 87 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 88 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 149 + simulationStep = 89 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 144 + simulationStep = 90 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 154 + simulationStep = 91 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 152 + simulationStep = 92 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 93 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 + simulationStep = 94 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 145 + simulationStep = 95 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 152 + simulationStep = 96 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 150 + simulationStep = 97 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 149 + simulationStep = 98 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 149 + simulationStep = 99 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 148 + simulationStep = 100 + HookHeight= 10.67848 + Simulation step can not be complete in 100 ms. step time= 147 +Connection Stablished to 78.109.201.86 +Authentication is done. +Listening To channel (C) +Subscribed to channel 37364875-c9cf-43a3-de45-08dc0c6103c9.ch_in +got a message of type: 2 diff --git a/redisContent.json b/redisContent.json index 022bba5..0e0f9d7 100644 --- a/redisContent.json +++ b/redisContent.json @@ -1 +1 @@ -{"UnitySignals":{"MudBucket":0,"Elevator":0,"FillupHead":0,"Ibop":0,"Kelly":0,"MouseHole":0,"OperationCondition":0,"SafetyValve":0,"operation":0,"Slips":0,"Slips_S":0,"Swing":0,"Swing_S":0,"TdsBackupClamp":0,"TdsSpine":0,"TdsSwing":0,"TdsTong":0,"Tong":0,"Tong_S":0,"TdsConnectionModes":0,"TdsElevatorModes":0},"OperationScenarioEvent":"","status":1,"speed":10,"endstep":0,"Configuration":{"StringConfiguration":{"StringConfigurationItems":[{"ComponentLength":1.0,"ComponentType":0,"Grade":null,"LengthPerJoint":1.0,"NominalId":203.0,"NominalOd":0.0,"NominalToolJointOd":0.0,"NumberOfJoint":1.0,"WeightPerLength":74.41},{"ComponentLength":600.0,"ComponentType":2,"Grade":null,"LengthPerJoint":30.0,"NominalId":203.0,"NominalOd":0.0,"NominalToolJointOd":0.0,"NumberOfJoint":20.0,"WeightPerLength":74.41},{"ComponentLength":600.0,"ComponentType":3,"Grade":null,"LengthPerJoint":30.0,"NominalId":228.0,"NominalOd":0.0,"NominalToolJointOd":0.0,"NumberOfJoint":20.0,"WeightPerLength":74.41}],"BitDefenition":{"BitCodeHundreds":1,"BitCodeOnes":3,"BitCodeTens":2,"BitLength":1.0,"BitNozzleNo":3,"BitNozzleSize":355.6,"BitSize":215.9,"BitType":0,"BitWeightPerLength":74.41,"FloatValve":true}},"Formations":[{"Abrasiveness":80.0,"Drillablity":5.0,"PorePressureGradient":10.43,"Thickness":990.0,"ThresholdWeight":0.5,"Top":10.0},{"Abrasiveness":85.0,"Drillablity":30.0,"PorePressureGradient":11.31,"Thickness":600.0,"ThresholdWeight":0.7,"Top":1000.0},{"Abrasiveness":85.0,"Drillablity":30.0,"PorePressureGradient":12.44,"Thickness":1.0,"ThresholdWeight":0.8,"Top":1600.0},{"Abrasiveness":90.0,"Drillablity":15.0,"PorePressureGradient":14.7,"Thickness":200.0,"ThresholdWeight":0.8,"Top":1601.0}],"Reservoir":{"AutoMigrationRate":100.0,"FluidGradient":0.0,"FluidType":0,"FluidViscosity":0.0,"FormationNo":3,"FormationPermeability":500.0,"FormationTop":1601.0,"GeothermalGradient":0.0,"InactiveInflux":false,"IsAutoMigrationRateSelected":false,"MakeKickSinglePacket":false,"PressureGradient":14.7},"Shoe":{"Breakdown":6.21,"FormationNo":0,"FracturePropagation":5.86,"InactiveFracture":false,"LeakOff":6.21,"ShoeDepth":5200.0},"Accumulator":{"AccumulatorMinimumOperatingPressure":8273.0,"AccumulatorSystemSize":1.0,"AirPlungerPumpOutput":1.0,"ElectricPumpOutput":0.0,"NumberOfBottels":20,"OilTankVolume":1.0,"PrechargePressure":6901.0,"StartPressure":19305.0,"StartPressure2":17926.0,"StopPressure":20684.0,"StopPressure2":20070.0},"BopStack":{"AboveAnnularHeight":10.0,"AnnularPreventerClose":2.86,"AnnularPreventerHeight":10.0,"AnnularPreventerOpen":2.25,"AnnularStringDrag":100.0,"BlindRamClose":0.92,"BlindRamHeight":16.24,"BlindRamOpen":0.87,"ChokeClose":0.24,"ChokeLineId":2800.0,"ChokeLineLength":12.0,"ChokeOpen":0.24,"GroundLevel":30.0,"KillClose":0.24,"KillHeight":18.8,"KillOpen":0.24,"LowerRamClose":0.59,"LowerRamHeight":21.35,"LowerRamOpen":0.56,"RamStringDrag":102800.65,"UpperRamClose":0.59,"UpperRamHeight":14.632,"UpperRamOpen":0.56},"Hoisting":{"DrillingLineBreakingLoad":0.0,"DriveType":0,"KellyWeight":0.0,"NumberOfLine":0,"TopDriveWeight":0.0,"TravelingBlockWeight":0.0},"Power":{"CementPump":298.0,"Drawworks":604.0,"GeneratorPowerRating":1200.0,"MudPump1":1194.0,"MudPump2":1194.0,"NumberOfgenerators":4,"RotaryTable":604.0,"TopDrive":775.0},"Pumps":{"MudPump1LinerDiameter":6.4,"MudPump1Stroke":120.0,"MudPump1MechanicalEfficiency":0.9,"MudPump1VolumetricEfficiency":6.4,"MudPump1Output":10.0,"MudPump1OutputBblStroke":10.0,"MudPump1Maximum":120.0,"MudPump1ReliefValvePressure":41368.469,"MudPump2LinerDiameter":6.4,"MudPump2Stroke":120.0,"MudPump2MechanicalEfficiency":0.9,"MudPump2VolumetricEfficiency":6.4,"MudPump2Output":10.0,"MudPump2OutputBblStroke":10.0,"MudPump2Maximum":120.0,"MudPump2ReliefValvePressure":41368.469,"CementPumpLinerDiameter":6.4,"CementPumpStroke":120.0,"CementPumpMechanicalEfficiency":1.0,"CementPumpVolumetricEfficiency":6.4,"CementPumpOutput":10.0,"CementPumpOutputBblStroke":10.0,"CementPumpMaximum":120.0,"CementPumpReliefValvePressure":68.947,"MudPump1ReliefValveIsSet":true,"MudPump2ReliefValveIsSet":true,"CementPumpReliefValveIsSet":true,"ManualPumpPower":false,"Valve1":false,"Valve2":false,"Valve3":false,"Valve4":false,"Valve5":false,"MudPump1MaximumPressure":41368.469,"MudPump1PumpRateChange":5000.0,"MudPump1SurfaceLineLength":2.0,"MudPump1DelayToShutdown":5.0,"MudPump2MaximumPressure":41368.469,"MudPump2PumpRateChange":5000.0,"MudPump2SurfaceLineLength":4.0,"MudPump2DelayToShutdown":5.0,"CementPumpMaximumPressure":41368.469,"CementPumpPumpRateChange":5000.0,"CementPumpSurfaceLineLength":2.0,"CementPumpDelayToShutdown":5.0,"MudPump1VolumetricOutput":10.0,"MudPump2VolumetricOutput":10.0,"CementPumpVolumetricOutput":10.0},"RigSize":{"RigType":0,"CrownHeight":0.0,"MonkeyBoandHeight":0.0,"RigFloorHeight":0.0},"CasingLinerChoke":{"CasingDepth":1524.0,"CasingId":254.0,"CasingOd":243.84,"CasingWeight":69.94,"CasingCollapsePressure":17236.86,"CasingTensileStrength":1270.06,"LinerTopDepth":0.0,"LinerLength":0.0,"LinerId":0.0,"LinerOd":0.0,"LinerWeight":0.0,"LinerCollapsePressure":0.0,"LinerTensileStrength":0.0,"OpenHoleId":215.9,"OpenHoleLength":476.006},"Path":{"Items":[{"HoleType":0,"Angle":0.0,"Length":9144.0,"FinalAngle":0.0,"TotalLength":9144.0,"MeasuredDepth":9144.0,"TotalVerticalDepth":0.0}]},"Mud":{"ActiveMudType":0,"ActiveRheologyModel":0,"ActiveMudVolume":68.68,"ActiveMudVolumeGal":2884.5600000000004,"ActiveDensity":1269.461181640625,"ActivePlasticViscosity":23.0,"ActiveYieldPoint":18.3,"ActiveThetaThreeHundred":0.0,"ActiveThetaSixHundred":0.0,"ReserveMudType":0,"ReserveMudVolume":63.59,"ReserveMudVolumeGal":0.0,"ReserveDensity":1497.0059814453125,"ReservePlasticViscosity":23.0,"ReserveYieldPoint":21.13,"ReserveThetaThreeHundred":0.0,"ReserveThetaSixHundred":0.0,"ActiveTotalTankCapacity":190.78,"ActiveTotalTankCapacityGal":8012.76,"ActiveSettledContents":0.0,"ActiveSettledContentsGal":0.0,"ActiveTotalContents":0.0,"ActiveTotalContentsGal":0.0,"ActiveAutoDensity":false,"InitialTripTankMudVolume":3.18,"InitialTripTankMudVolumeGal":133.56,"PedalFlowMeter":1600.0}},"Problems":{"BitProblems":{"JetWashout":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"PlugJets":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"JetWashoutCount":0,"PlugJetsCount":0},"BopProblems":{"AnnularWash":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AnnularFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AnnularLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"UpperRamWash":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"UpperRamFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"UpperRamLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"MiddleRamWash":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"MiddleRamFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"MiddleRamLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"LowerRamWash":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"LowerRamFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"LowerRamLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AccumulatorPumpFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AccumulatorPumpLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AccumulatorSystemFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AccumulatorSystemLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"ChokeProblems":{"HydraulicChoke1Plugged":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"HydraulicChoke1Fail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"HydraulicChoke1Washout":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"HydraulicChoke2Plugged":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"HydraulicChoke2Fail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"HydraulicChoke2Washout":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke1Plugged":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke1Fail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke1Washout":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke2Plugged":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke2Fail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke2Washout":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ChokePanelAirFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke1PluggedPercent":0,"HydraulicChoke2PluggedPercent":0,"HydraulicChoke1PluggedPercent":0,"ManualChoke2PluggedPercent":0},"DrillStemsProblems":{"StringDragIncrease":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StringTorqueIncrease":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StringTorqueFluctuation":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StringDragIncreaseTime":0.0,"StringTorqueIncreaseTime":0.0},"GaugesProblems":{"WeightIndicator":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"RotaryRpm":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"RotaryTorque":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StandPipePressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"CasingPressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Pump1Strokes":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Pump2Strokes":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ReturnLineTemperature":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"TripTank":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"PitGainLoss":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"MudTankVolume":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ReturnMudFlow":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"TorqueLimit":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"PowerLimit":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AccumulatorPressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManifoldPressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AnnularPressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"RigAirPressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StandPipe1":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StandPipe2":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"DrillPipePressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ChokePosition":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"CasingPressure2":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"HoistingProblems":{"MotorFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ClutchEngage":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ClutchDisengage":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"KickProblems":{"Kick":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"FluidType":0,"FlowRate":0,"OverBalancePressure":0,"IsAutoMigrationRateSelected":false,"AutoMigrationRate":0.0},"LostProblems":{"LostCirculation":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"FlowRate":0.0},"MudTreatmentProblems":{"Degasser":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ShaleShaker":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Desander":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Desilter":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"OtherProblems":{"RigAlarm":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"RigWaterSupply":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"RigAir":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Gen1":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Gen2":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Gen3":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Gen4":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Scr1":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Scr2":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Scr3":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Scr4":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"PumpProblems":{"Pump1PowerFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Pump1BlowPopOffValve":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Pump2PowerFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Pump2BlowPopOffValve":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"CementPumpPowerFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"CementPumpBlowPopOffValve":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"RotaryProblems":{"MotorFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"OverideTorqueLimit":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}}},"Equipments":{"BopControl":{"ManifoldPressureGauge":0.0,"AirSupplyPressureGauge":0.0,"AccumulatorPressureGauge":0.0,"AnnularPressureGauge":0.0,"AnnularOpenLED":0,"AnnularCloseLED":0,"UpperRamsOpenLED":0,"UpperRamsCloseLED":0,"MiddleRamsOpenLED":0,"MiddleRamsCloseLED":0,"KillLineOpenLED":0,"KillLineCloseLED":0,"ChokeLineOpenLED":0,"ChokeLineCloseLED":0,"LowerRamsOpenLED":0,"LowerRamsCloseLED":0,"AnnularStatus":0.0,"UpperRamsStatus":0.0,"MiddleRamsStatus":0.0,"LowerRamsStatus":0.0,"AirMasterValve":-1.0,"KillLineValve":0.0,"ChokeLineValve":0.0,"UpperRamsValve":1.0,"LowerRamsValve":0.0,"AnnularValve":1.0,"ByePassValve":0.0,"MiddleRamsValve":1.0},"ChokeControl":{"StandPipePressure":0.0,"CasingPressure":0.0,"ChokePosition":0.0,"ChokePanelSPMCounter":0.0,"ChokePanelTotalStrokeCounter":0.0,"Choke1LED":0,"Choke2LED":0,"ChokePanelRigAirSwitch":true,"ChokePanelStrokeResetSwitch":false,"ChokeControlLever":1.0,"ChokePanelPumpSelectorSwitch":1.0,"ChokeSelectorSwitch":true},"ChokeManifold":{"HydraulicChock1":0,"HydraulicChock2":0,"HyChock1OnProblem":false,"HyChock2OnProblem":false,"LeftManChokeOnProblem":false,"RightManChokeOnProblem":false,"ChokeManifoldValve1":false,"ChokeManifoldValve2":false,"ChokeManifoldValve3":false,"ChokeManifoldValve4":false,"ChokeManifoldValve5":false,"ChokeManifoldValve6":false,"ChokeManifoldValve7":false,"ChokeManifoldValve8":false,"ChokeManifoldValve9":false,"ChokeManifoldValve10":false,"ChokeManifoldValve11":false,"ChokeManifoldValve12":false,"ChokeManifoldValve13":false,"LeftManualChoke":0.0,"RightManualChoke":0.0},"DataDisplay":{"WOBPointer":0.0,"HookLoadPointer":0.0,"TripTankGauge":0.0,"TripTankAlarmLED":0,"TripTankPumpLED":0,"StandPipePressureGauge":0.0,"CasingPressureGauge":0.0,"MP1SPMGauge":0.0,"MP2SPMGauge":0.0,"ReturnLineTempGauge":0.0,"RotaryTorqueGauge":0.0,"RotaryRPMGauge":0.0,"AcidGasDetectionLED":0,"TotalStrokeCounter":0.0,"PitGainLossGauge":0.0,"MudTanksVolumeGauge":0.0,"MVTAlarmLED":0,"MVTSetAlarmSwitch":0,"ReturnMudFlowGauge":0.0,"FillStrokeCounter":0.0,"MFFITotalStrokeCounter":0.0,"MFFIAlarmLED":0,"MFFISetAlarmSwitch":0,"MFFIPumpLED":0,"TotalWellDepth":0.0,"BitDepth":0.0,"HookLoad":0.0,"StandPipePressure":0.0,"CasingPressure":0.0,"MP1SPM":0.0,"MP2SPM":0.0,"RTTorque":0.0,"RTRPM":0.0,"WOP":0.0,"ROP":0.0,"MudWeightIn":0.0,"MudWeightOut":0.0,"Buzzer1":false,"Buzzer2":false,"Buzzer3":false,"Buzzer4":false,"MVTAlarmHigh":6.0,"MVTAlarmLow":-9.0,"MFFIAlarmHigh":44.0,"MFFIAlarmLow":0.0,"TotalStrokeCounterResetSwitch":0,"ResetWob":0},"Drilling":{"MP1Throttle":2.0,"MP2Throttle":4.0,"RTThrottle":12.0,"DWThrottle":0.0,"ParkingBrakeLed":false,"GEN1LED":0,"GEN2LED":0,"GEN3LED":0,"GEN4LED":0,"SCR1LED":0,"SCR2LED":0,"SCR3LED":0,"SCR4LED":0,"MP1BLWR":0,"MP2BLWR":0,"DWBLWR":0,"RTBLWR":0,"PWRLIM":0,"PWRLIMMTR":0.0,"RTTorqueLimitGauge":0.0,"AutoDWLED":0,"GEN1BTNLED":0,"GEN2BTNLED":0,"GEN3BTNLED":0,"GEN4BTNLED":0,"OpenKellyCockLed":0,"CloseKellyCockLed":0,"OpenSafetyValveLed":0,"CloseSafetyValveLed":0,"IRSafetyValveLed":0,"IRIBopLed":0,"LatchPipeLED":0,"UnlatchPipeLED":0,"SwingLed":0,"FillMouseHoleLed":0,"MP1CPSwitch":-1,"MP2Switch":-1,"DWSwitch":0,"RTSwitch":0,"TongLever":0.0},"Hook":{"HookHeight_S":0.0,"HookHeight":0.0},"StandPipeManifold":{"StandPipeGauge1":0.0,"StandPipeGauge2":0.0,"StandPipeManifoldValve1":false,"StandPipeManifoldValve2":false,"StandPipeManifoldValve3":false,"StandPipeManifoldValve4":false,"StandPipeManifoldValve5":false,"StandPipeManifoldValve6":false,"StandPipeManifoldValve7":false,"StandPipeManifoldValve8":false,"StandPipeManifoldValve9":false,"StandPipeManifoldValve10":false,"StandPipeManifoldValve11":false,"StandPipeManifoldValve12":false,"StandPipeManifoldValve13":false,"StandPipeManifoldValve14":false,"StandPipeManifoldValve15":false},"DrillingWatch":{"Depth":0.0,"BitPosition":0.0,"HookLoad":0.0,"WeightOnBit":0.0,"RPM":0.0,"ROP":0.0,"Torque":0.0,"PumpPressure":0.0,"SPM1":0.0,"SPM2":0.0,"CasingPressure":0.0,"PercentFlow":0.0,"PitGainLose":0.0,"PitVolume":0.0,"KillMudVolume":0.0,"TripTankVolume":0.0,"MudWeightIn":0.0,"FillVolume":0.0,"MudWeightOut":0.0}}} O +{"Signals":{"MudBucket":0,"Elevator":0,"FillupHead":0,"Ibop":0,"Kelly":0,"MouseHole":0,"OperationCondition":0,"SafetyValve":0,"operation":0,"Slips":0,"Slips_S":0,"Swing":0,"Swing_S":0,"TdsBackupClamp":0,"TdsSpine":0,"TdsSwing":0,"TdsTong":0,"Tong":0,"Tong_S":0,"TdsConnectionModes":0,"TdsElevatorModes":0},"OperationScenarioEvent":"","status":1,"speed":2,"endstep":0,"Configuration":{"StringConfiguration":{"StringConfigurationItems":[{"ComponentLength":1.0,"ComponentType":0,"Grade":null,"LengthPerJoint":1.0,"NominalId":203.0,"NominalOd":0.0,"NominalToolJointOd":0.0,"NumberOfJoint":1.0,"WeightPerLength":74.41},{"ComponentLength":600.0,"ComponentType":2,"Grade":null,"LengthPerJoint":30.0,"NominalId":203.0,"NominalOd":0.0,"NominalToolJointOd":0.0,"NumberOfJoint":20.0,"WeightPerLength":74.41},{"ComponentLength":600.0,"ComponentType":3,"Grade":null,"LengthPerJoint":30.0,"NominalId":228.0,"NominalOd":0.0,"NominalToolJointOd":0.0,"NumberOfJoint":20.0,"WeightPerLength":74.41}],"BitDefenition":{"BitCodeHundreds":1,"BitCodeOnes":3,"BitCodeTens":2,"BitLength":1.0,"BitNozzleNo":3,"BitNozzleSize":355.6,"BitSize":215.9,"BitType":0,"BitWeightPerLength":74.41,"FloatValve":true}},"Formations":[{"Abrasiveness":80.0,"Drillablity":5.0,"PorePressureGradient":10.43,"Thickness":990.0,"ThresholdWeight":0.5,"Top":10.0},{"Abrasiveness":85.0,"Drillablity":30.0,"PorePressureGradient":11.31,"Thickness":600.0,"ThresholdWeight":0.7,"Top":1000.0},{"Abrasiveness":85.0,"Drillablity":30.0,"PorePressureGradient":12.44,"Thickness":1.0,"ThresholdWeight":0.8,"Top":1600.0},{"Abrasiveness":90.0,"Drillablity":15.0,"PorePressureGradient":14.7,"Thickness":200.0,"ThresholdWeight":0.8,"Top":1601.0}],"Reservoir":{"AutoMigrationRate":100.0,"FluidGradient":0.0,"FluidType":0,"FluidViscosity":0.0,"FormationNo":3,"FormationPermeability":500.0,"FormationTop":1601.0,"GeothermalGradient":0.0,"InactiveInflux":false,"IsAutoMigrationRateSelected":false,"MakeKickSinglePacket":false,"PressureGradient":14.7},"Shoe":{"Breakdown":6.21,"FormationNo":0,"FracturePropagation":5.86,"InactiveFracture":false,"LeakOff":6.21,"ShoeDepth":5200.0},"Accumulator":{"AccumulatorMinimumOperatingPressure":8273.0,"AccumulatorSystemSize":1.0,"AirPlungerPumpOutput":1.0,"ElectricPumpOutput":0.0,"NumberOfBottels":20,"OilTankVolume":1.0,"PrechargePressure":6901.0,"StartPressure":19305.0,"StartPressure2":17926.0,"StopPressure":20684.0,"StopPressure2":20070.0},"BopStack":{"AboveAnnularHeight":10.0,"AnnularPreventerClose":2.86,"AnnularPreventerHeight":10.0,"AnnularPreventerOpen":2.25,"AnnularStringDrag":100.0,"BlindRamClose":0.92,"BlindRamHeight":16.24,"BlindRamOpen":0.87,"ChokeClose":0.24,"ChokeLineId":2800.0,"ChokeLineLength":12.0,"ChokeOpen":0.24,"GroundLevel":30.0,"KillClose":0.24,"KillHeight":18.8,"KillOpen":0.24,"LowerRamClose":0.59,"LowerRamHeight":21.35,"LowerRamOpen":0.56,"RamStringDrag":102800.65,"UpperRamClose":0.59,"UpperRamHeight":14.632,"UpperRamOpen":0.56},"Hoisting":{"DrillingLineBreakingLoad":0.0,"DriveType":0,"KellyWeight":0.0,"NumberOfLine":0,"TopDriveWeight":0.0,"TravelingBlockWeight":0.0},"Power":{"CementPump":298.0,"Drawworks":604.0,"GeneratorPowerRating":1200.0,"MudPump1":1194.0,"MudPump2":1194.0,"NumberOfgenerators":4,"RotaryTable":604.0,"TopDrive":775.0},"Pumps":{"MudPump1LinerDiameter":6.4,"MudPump1Stroke":120.0,"MudPump1MechanicalEfficiency":0.9,"MudPump1VolumetricEfficiency":6.4,"MudPump1Output":10.0,"MudPump1OutputBblStroke":10.0,"MudPump1Maximum":120.0,"MudPump1ReliefValvePressure":41368.469,"MudPump2LinerDiameter":6.4,"MudPump2Stroke":120.0,"MudPump2MechanicalEfficiency":0.9,"MudPump2VolumetricEfficiency":6.4,"MudPump2Output":10.0,"MudPump2OutputBblStroke":10.0,"MudPump2Maximum":120.0,"MudPump2ReliefValvePressure":41368.469,"CementPumpLinerDiameter":6.4,"CementPumpStroke":120.0,"CementPumpMechanicalEfficiency":1.0,"CementPumpVolumetricEfficiency":6.4,"CementPumpOutput":10.0,"CementPumpOutputBblStroke":10.0,"CementPumpMaximum":120.0,"CementPumpReliefValvePressure":68.947,"MudPump1ReliefValveIsSet":true,"MudPump2ReliefValveIsSet":true,"CementPumpReliefValveIsSet":true,"ManualPumpPower":false,"Valve1":false,"Valve2":false,"Valve3":false,"Valve4":false,"Valve5":false,"MudPump1MaximumPressure":41368.469,"MudPump1PumpRateChange":5000.0,"MudPump1SurfaceLineLength":2.0,"MudPump1DelayToShutdown":5.0,"MudPump2MaximumPressure":41368.469,"MudPump2PumpRateChange":5000.0,"MudPump2SurfaceLineLength":4.0,"MudPump2DelayToShutdown":5.0,"CementPumpMaximumPressure":41368.469,"CementPumpPumpRateChange":5000.0,"CementPumpSurfaceLineLength":2.0,"CementPumpDelayToShutdown":5.0,"MudPump1VolumetricOutput":10.0,"MudPump2VolumetricOutput":10.0,"CementPumpVolumetricOutput":10.0},"RigSize":{"RigType":0,"CrownHeight":0.0,"MonkeyBoandHeight":0.0,"RigFloorHeight":0.0},"CasingLinerChoke":{"CasingDepth":1524.0,"CasingId":254.0,"CasingOd":243.84,"CasingWeight":69.94,"CasingCollapsePressure":17236.86,"CasingTensileStrength":1270.06,"LinerTopDepth":0.0,"LinerLength":0.0,"LinerId":0.0,"LinerOd":0.0,"LinerWeight":0.0,"LinerCollapsePressure":0.0,"LinerTensileStrength":0.0,"OpenHoleId":215.9,"OpenHoleLength":476.006},"Path":{"Items":[{"HoleType":0,"Angle":0.0,"Length":9144.0,"FinalAngle":0.0,"TotalLength":9144.0,"MeasuredDepth":9144.0,"TotalVerticalDepth":0.0}]},"Mud":{"ActiveMudType":0,"ActiveRheologyModel":0,"ActiveMudVolume":68.68,"ActiveMudVolumeGal":2884.5600000000004,"ActiveDensity":1269.461181640625,"ActivePlasticViscosity":23.0,"ActiveYieldPoint":18.3,"ActiveThetaThreeHundred":0.0,"ActiveThetaSixHundred":0.0,"ReserveMudType":0,"ReserveMudVolume":63.59,"ReserveMudVolumeGal":0.0,"ReserveDensity":1497.0059814453125,"ReservePlasticViscosity":23.0,"ReserveYieldPoint":21.13,"ReserveThetaThreeHundred":0.0,"ReserveThetaSixHundred":0.0,"ActiveTotalTankCapacity":190.78,"ActiveTotalTankCapacityGal":8012.76,"ActiveSettledContents":0.0,"ActiveSettledContentsGal":0.0,"ActiveTotalContents":0.0,"ActiveTotalContentsGal":0.0,"ActiveAutoDensity":false,"InitialTripTankMudVolume":3.18,"InitialTripTankMudVolumeGal":133.56,"PedalFlowMeter":1600.0}},"Problems":{"BitProblems":{"JetWashout":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"PlugJets":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"JetWashoutCount":0,"PlugJetsCount":0},"BopProblems":{"AnnularWash":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AnnularFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AnnularLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"UpperRamWash":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"UpperRamFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"UpperRamLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"MiddleRamWash":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"MiddleRamFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"MiddleRamLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"LowerRamWash":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"LowerRamFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"LowerRamLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AccumulatorPumpFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AccumulatorPumpLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AccumulatorSystemFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AccumulatorSystemLeak":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"ChokeProblems":{"HydraulicChoke1Plugged":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"HydraulicChoke1Fail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"HydraulicChoke1Washout":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"HydraulicChoke2Plugged":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"HydraulicChoke2Fail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"HydraulicChoke2Washout":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke1Plugged":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke1Fail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke1Washout":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke2Plugged":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke2Fail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke2Washout":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ChokePanelAirFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManualChoke1PluggedPercent":0,"HydraulicChoke2PluggedPercent":0,"HydraulicChoke1PluggedPercent":0,"ManualChoke2PluggedPercent":0},"DrillStemsProblems":{"StringDragIncrease":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StringTorqueIncrease":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StringTorqueFluctuation":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StringDragIncreaseTime":0.0,"StringTorqueIncreaseTime":0.0},"GaugesProblems":{"WeightIndicator":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"RotaryRpm":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"RotaryTorque":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StandPipePressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"CasingPressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Pump1Strokes":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Pump2Strokes":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ReturnLineTemperature":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"TripTank":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"PitGainLoss":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"MudTankVolume":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ReturnMudFlow":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"TorqueLimit":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"PowerLimit":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AccumulatorPressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ManifoldPressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"AnnularPressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"RigAirPressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StandPipe1":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"StandPipe2":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"DrillPipePressure":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ChokePosition":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"CasingPressure2":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"HoistingProblems":{"MotorFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ClutchEngage":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ClutchDisengage":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"KickProblems":{"Kick":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"FluidType":0,"FlowRate":0,"OverBalancePressure":0,"IsAutoMigrationRateSelected":false,"AutoMigrationRate":0.0},"LostProblems":{"LostCirculation":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"FlowRate":0.0},"MudTreatmentProblems":{"Degasser":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"ShaleShaker":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Desander":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Desilter":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"OtherProblems":{"RigAlarm":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"RigWaterSupply":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"RigAir":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Gen1":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Gen2":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Gen3":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Gen4":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Scr1":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Scr2":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Scr3":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Scr4":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"PumpProblems":{"Pump1PowerFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Pump1BlowPopOffValve":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Pump2PowerFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"Pump2BlowPopOffValve":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"CementPumpPowerFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"CementPumpBlowPopOffValve":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}},"RotaryProblems":{"MotorFail":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0},"OverideTorqueLimit":{"ProblemType":0,"StatusType":0,"Value":0.0,"DueValue":0.0}}},"Equipments":{"HookVelocity":0.0,"HookHeight":10.67848503986859,"BopControl":{"ManifoldPressureGauge":0.0,"AirSupplyPressureGauge":0.0,"AccumulatorPressureGauge":0.0,"AnnularPressureGauge":0.0,"AnnularOpenLED":0,"AnnularCloseLED":0,"UpperRamsOpenLED":0,"UpperRamsCloseLED":0,"MiddleRamsOpenLED":0,"MiddleRamsCloseLED":0,"KillLineOpenLED":0,"KillLineCloseLED":0,"ChokeLineOpenLED":0,"ChokeLineCloseLED":0,"LowerRamsOpenLED":0,"LowerRamsCloseLED":0,"AnnularStatus":0.0,"UpperRamsStatus":0.0,"MiddleRamsStatus":0.0,"LowerRamsStatus":0.0,"AirMasterValve":0.0,"KillLineValve":0.0,"ChokeLineValve":0.0,"UpperRamsValve":0.0,"LowerRamsValve":0.0,"AnnularValve":0.0,"ByePassValve":0.0,"MiddleRamsValve":0.0,"AnnularRegulatorSetControl":0.0},"ChokeControl":{"StandPipePressure":0.0,"CasingPressure":0.0,"ChokePosition":0.0,"ChokePanelSPMCounter":0.0,"ChokePanelTotalStrokeCounter":0.0,"Choke1LED":0,"Choke2LED":0,"ChokePanelRigAirSwitch":false,"ChokePanelStrokeResetSwitch":false,"ChokeControlLever":0.0,"ChokePanelPumpSelectorSwitch":0.0,"ChokeRateControlKnob":0.0,"ChokeSelectorSwitch":false},"ChokeManifold":{"HydraulicChock1":0,"HydraulicChock2":0,"HyChock1OnProblem":false,"HyChock2OnProblem":false,"LeftManChokeOnProblem":false,"RightManChokeOnProblem":false,"ChokeManifoldValve1":false,"ChokeManifoldValve2":false,"ChokeManifoldValve3":false,"ChokeManifoldValve4":false,"ChokeManifoldValve5":false,"ChokeManifoldValve6":false,"ChokeManifoldValve7":false,"ChokeManifoldValve8":false,"ChokeManifoldValve9":false,"ChokeManifoldValve10":false,"ChokeManifoldValve11":false,"ChokeManifoldValve12":false,"ChokeManifoldValve13":false,"LeftManualChoke":0.0,"RightManualChoke":0.0},"DataDisplay":{"WOBPointer":0.0,"HookLoadPointer":0.0,"TripTankGauge":0.0,"TripTankAlarmLED":0,"TripTankPumpLED":0,"StandPipePressureGauge":0.0,"CasingPressureGauge":0.0,"MP1SPMGauge":0.0,"MP2SPMGauge":0.0,"ReturnLineTempGauge":0.0,"RotaryTorqueGauge":0.0,"RotaryRPMGauge":0.0,"AcidGasDetectionLED":0,"TotalStrokeCounter":0.0,"PitGainLossGauge":0.0,"MudTanksVolumeGauge":0.0,"MVTAlarmLED":0,"MVTSetAlarmSwitch":0,"ReturnMudFlowGauge":0.0,"FillStrokeCounter":0.0,"MFFITotalStrokeCounter":0.0,"MFFIAlarmLED":0,"MFFISetAlarmSwitch":0,"MFFIPumpLED":0,"TotalWellDepth":0.0,"BitDepth":0.0,"HookLoad":0.0,"StandPipePressure":0.0,"CasingPressure":0.0,"MP1SPM":0.0,"MP2SPM":0.0,"RTTorque":0.0,"RTRPM":0.0,"WOP":0.0,"ROP":0.0,"MudWeightIn":0.0,"MudWeightOut":0.0,"Buzzer1":false,"Buzzer2":false,"Buzzer3":false,"Buzzer4":false,"MVTAlarmHigh":0.0,"MVTAlarmLow":0.0,"MFFIAlarmHigh":0.0,"MFFIAlarmLow":0.0,"TotalStrokeCounterResetSwitch":0,"ResetWob":0},"Drilling":{"MP1Throttle":9.0,"MP2Throttle":0.0,"RTThrottle":0.0,"DWThrottle":0.0,"ParkingBrakeLed":false,"GEN1LED":0,"GEN2LED":0,"GEN3LED":0,"GEN4LED":0,"SCR1LED":0,"SCR2LED":0,"SCR3LED":0,"SCR4LED":0,"MP1BLWR":0,"MP2BLWR":0,"DWBLWR":0,"RTBLWR":0,"PWRLIM":0,"PWRLIMMTR":0.0,"RTTorqueLimitGauge":0.0,"AutoDWLED":0,"GEN1BTNLED":0,"GEN2BTNLED":0,"GEN3BTNLED":0,"GEN4BTNLED":0,"OpenKellyCockLed":0,"CloseKellyCockLed":0,"OpenSafetyValveLed":0,"CloseSafetyValveLed":0,"IRSafetyValveLed":0,"IRIBopLed":0,"LatchPipeLED":0,"UnlatchPipeLED":0,"SwingLed":0,"FillMouseHoleLed":0,"MP1CPSwitch":0,"MP2Switch":0,"DWSwitch":0,"RTSwitch":-1,"TongLever":0.0},"Hook":{"HookHeight_S":0.0,"HookHeight":0.0},"StandPipeManifold":{"StandPipeGauge1":0.0,"StandPipeGauge2":0.0,"StandPipeManifoldValve1":false,"StandPipeManifoldValve2":false,"StandPipeManifoldValve3":false,"StandPipeManifoldValve4":false,"StandPipeManifoldValve5":false,"StandPipeManifoldValve6":false,"StandPipeManifoldValve7":false,"StandPipeManifoldValve8":false,"StandPipeManifoldValve9":false,"StandPipeManifoldValve10":false,"StandPipeManifoldValve11":false,"StandPipeManifoldValve12":false,"StandPipeManifoldValve13":false,"StandPipeManifoldValve14":false,"StandPipeManifoldValve15":false},"DrillingWatch":{"Depth":0.0,"BitPosition":0.0,"HookLoad":0.0,"WeightOnBit":0.0,"RPM":0.0,"ROP":0.0,"Torque":0.0,"PumpPressure":0.0,"SPM1":0.0,"SPM2":0.0,"CasingPressure":0.0,"PercentFlow":0.0,"PitGainLose":0.0,"PitVolume":0.0,"KillMudVolume":0.0,"TripTankVolume":0.0,"MudWeightIn":0.0,"FillVolume":0.0,"MudWeightOut":0.0}}}