|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594 |
- module CUnityOutputs
- implicit none
- type :: UnityOutputsType
- real(8) :: KellyHoseVibrationRate
- real(8) :: BlowoutFromStringPercent
- real(8) :: Pedal
- real(8) :: FlowRate
- real(8) :: RotaryRpm
- logical :: BlowoutFromString
- logical :: BlowoutFromAnnular
- logical :: FlowFromReturnLine
- real :: FlowFromKelly
- real :: FlowFromFillupHead
- logical :: FlowKellyDisconnect
- logical :: FlowPipeDisconnect
- end type UnityOutputsType
- type(UnityOutputsType):: UnityOutputs
-
- contains
-
- ! subroutine Setup()
- ! use CDataDisplayConsole
- ! use ConfigurationVariables
- ! implicit none
- ! ! PumpsSpmChanges => Calc_KellyHoseVibrationRate
- ! ! call data%EquipmentControl%DataDisplayConsole%OnRotaryRpmChange%Add(Set_RotaryRpm)
- ! end subroutine
-
-
-
-
-
-
-
-
-
-
- subroutine Set_BlowoutFromString(v)
- implicit none
- logical, intent (in) :: v
- UnityOutputs%BlowoutFromString = v
- #ifdef deb
- print*, 'BlowoutFromString=', v
- #endif
- end subroutine
-
- logical function Get_BlowoutFromString()
- implicit none
- Get_BlowoutFromString = UnityOutputs%BlowoutFromString
- end function
-
- subroutine Set_BlowoutFromString_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_BlowoutFromString_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_BlowoutFromString_WN' :: Set_BlowoutFromString_WN
- implicit none
- logical, intent (in) :: v
- call Set_BlowoutFromString(v)
- end subroutine
-
- logical function Get_BlowoutFromString_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_BlowoutFromString_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_BlowoutFromString_WN' :: Get_BlowoutFromString_WN
- implicit none
- Get_BlowoutFromString_WN = UnityOutputs%BlowoutFromString
- !Get_BlowoutFromString = .TRUE.
- end function
-
-
-
- subroutine Set_BlowoutFromAnnular(v)
- implicit none
- logical, intent (in) :: v
- UnityOutputs%BlowoutFromAnnular = v
- #ifdef deb
- print*, 'BlowoutFromAnnular=', v
- #endif
- end subroutine
-
- logical function Get_BlowoutFromAnnular()
- implicit none
- Get_BlowoutFromAnnular = UnityOutputs%BlowoutFromAnnular
- end function
-
- subroutine Set_BlowoutFromAnnular_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_BlowoutFromAnnular_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_BlowoutFromAnnular_WN' :: Set_BlowoutFromAnnular_WN
- implicit none
- logical, intent (in) :: v
- call Set_BlowoutFromAnnular(v)
- end subroutine
-
- logical function Get_BlowoutFromAnnular_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_BlowoutFromAnnular_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_BlowoutFromAnnular_WN' :: Get_BlowoutFromAnnular_WN
- implicit none
- Get_BlowoutFromAnnular_WN = UnityOutputs%BlowoutFromAnnular
- end function
-
-
-
-
-
- subroutine Set_FlowFromReturnLine(v)
- implicit none
- logical, intent (in) :: v
- UnityOutputs%FlowFromReturnLine = v
- #ifdef deb
- print*, 'FlowFromReturnLine=', v
- #endif
- end subroutine
-
- logical function Get_FlowFromReturnLine()
- implicit none
- Get_FlowFromReturnLine = UnityOutputs%FlowFromReturnLine
- end function
-
-
- subroutine Set_FlowFromReturnLine_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowFromReturnLine_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_FlowFromReturnLine_WN' :: Set_FlowFromReturnLine_WN
- implicit none
- logical, intent (in) :: v
- call Set_FlowFromReturnLine(v)
- end subroutine
-
- logical function Get_FlowFromReturnLine_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowFromReturnLine_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_FlowFromReturnLine_WN' :: Get_FlowFromReturnLine_WN
- implicit none
- Get_FlowFromReturnLine_WN = UnityOutputs%FlowFromReturnLine
- !Get_FlowFromReturnLine_WN = .FALSE.
- end function
-
-
-
- subroutine Set_FlowFromKelly(v)
- implicit none
- real, intent (in) :: v
- UnityOutputs%FlowFromKelly = v
- #ifdef deb
- print*, 'FlowFromKelly=', v
- #endif
- end subroutine
-
- real function Get_FlowFromKelly()
- implicit none
- Get_FlowFromKelly = UnityOutputs%FlowFromKelly
- end function
-
-
- subroutine Set_FlowFromKelly_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowFromKelly_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_FlowFromKelly_WN' :: Set_FlowFromKelly_WN
- implicit none
- real, intent (in) :: v
- call Set_FlowFromKelly(v)
- end subroutine
-
- real function Get_FlowFromKelly_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowFromKelly_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_FlowFromKelly_WN' :: Get_FlowFromKelly_WN
- implicit none
- #ifdef deb
- print*, 'FlowFromKellyR=', UnityOutputs%FlowFromKelly
- #endif
- Get_FlowFromKelly_WN = UnityOutputs%FlowFromKelly
- !Get_FlowFromKelly = .FALSE.
- end function
-
-
-
-
- subroutine Set_FlowFromFillupHead(v)
- implicit none
- real, intent (in) :: v
- UnityOutputs%FlowFromFillupHead = v
- #ifdef deb
- print*, 'FlowFromFillupHead=', v
- #endif
- end subroutine
-
- real function Get_FlowFromFillupHead()
- implicit none
- Get_FlowFromFillupHead = UnityOutputs%FlowFromFillupHead
- end function
-
-
- subroutine Set_FlowFromFillupHead_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowFromFillupHead_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_FlowFromFillupHead_WN' :: Set_FlowFromFillupHead_WN
- implicit none
- real, intent (in) :: v
- call Set_FlowFromFillupHead(v)
- end subroutine
-
- real function Get_FlowFromFillupHead_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowFromFillupHead_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_FlowFromFillupHead_WN' :: Get_FlowFromFillupHead_WN
- implicit none
- #ifdef deb
- print*, 'FlowFromFillupHeadR=', UnityOutputs%FlowFromFillupHead
- #endif
- Get_FlowFromFillupHead_WN = UnityOutputs%FlowFromFillupHead
- !Get_FlowFromFillupHead = .FALSE.
- end function
-
-
-
-
-
- subroutine Set_FlowKellyDisconnect(v)
- implicit none
- logical, intent (in) :: v
- UnityOutputs%FlowKellyDisconnect = v
- #ifdef deb
- print*, 'FlowKellyDisconnect=', v
- #endif
- end subroutine
-
- logical function Get_FlowKellyDisconnect()
- implicit none
- Get_FlowKellyDisconnect = UnityOutputs%FlowKellyDisconnect
- end function
-
-
- subroutine Set_FlowKellyDisconnect_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowKellyDisconnect_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_FlowKellyDisconnect_WN' :: Set_FlowKellyDisconnect_WN
- implicit none
- logical, intent (in) :: v
- call Set_FlowKellyDisconnect(v)
- end subroutine
-
- logical function Get_FlowKellyDisconnect_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowKellyDisconnect_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_FlowKellyDisconnect_WN' :: Get_FlowKellyDisconnect_WN
- implicit none
- Get_FlowKellyDisconnect_WN = UnityOutputs%FlowKellyDisconnect
- !Get_FlowKellyDisconnect_WN = .false.
- end function
-
-
-
-
- subroutine Set_FlowPipeDisconnect(v)
- implicit none
- logical, intent (in) :: v
- UnityOutputs%FlowPipeDisconnect = v
- #ifdef deb
- print*, 'FlowPipeDisconnect=', v
- #endif
- end subroutine
-
- logical function Get_FlowPipeDisconnect()
- implicit none
- Get_FlowPipeDisconnect = UnityOutputs%FlowPipeDisconnect
- end function
-
-
- subroutine Set_FlowPipeDisconnect_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowPipeDisconnect_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_FlowPipeDisconnect_WN' :: Set_FlowPipeDisconnect_WN
- implicit none
- logical, intent (in) :: v
- call Set_FlowPipeDisconnect(v)
- end subroutine
-
- logical function Get_FlowPipeDisconnect_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowPipeDisconnect_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_FlowPipeDisconnect_WN' :: Get_FlowPipeDisconnect_WN
- implicit none
- Get_FlowPipeDisconnect_WN = UnityOutputs%FlowPipeDisconnect
- !Get_FlowPipeDisconnect_WN = .false.
- end function
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- subroutine Set_BlowoutFromStringPercent(v)
- implicit none
- real(8), intent (in) :: v
- UnityOutputs%BlowoutFromStringPercent = v
- #ifdef deb
- print*, 'BlowoutFromStringPercent=', v
- #endif
- end subroutine
-
- real(8) function GetBlowoutFromStringPercent()
- implicit none
- GetBlowoutFromStringPercent = UnityOutputs%BlowoutFromStringPercent
- end function
-
-
-
- subroutine Set_BlowoutFromStringPercent_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_BlowoutFromStringPercent_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_BlowoutFromStringPercent_WN' :: Set_BlowoutFromStringPercent_WN
- implicit none
- real(8), intent (in) :: v
- call Set_BlowoutFromStringPercent(v)
- end subroutine
-
- real(8) function GetBlowoutFromStringPercent_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetBlowoutFromStringPercent_WN
- !DEC$ ATTRIBUTES ALIAS: 'GetBlowoutFromStringPercent_WN' :: GetBlowoutFromStringPercent_WN
- implicit none
- GetBlowoutFromStringPercent_WN = UnityOutputs%BlowoutFromStringPercent
- !GetBlowoutFromStringPercent_WN = 0d0
- end function
-
-
-
-
-
-
-
-
- subroutine Calc_KellyHoseVibrationRate(spm1, spm2)
- use CScaleRange
- implicit none
- real(8), intent (in) :: spm1, spm2
- real :: total
- total = (spm1 + spm2)/2
- UnityOutputs%KellyHoseVibrationRate = ScaleRange(total, 0.0, 10.0, 0.0, 120.0)
- #ifdef deb
- print*, 'KellyHoseVibrationRate=', UnityOutputs%KellyHoseVibrationRate
- #endif
- end subroutine
-
- real(8) function GetKellyHoseVibrationRate()
- implicit none
- GetKellyHoseVibrationRate = UnityOutputs%KellyHoseVibrationRate
- end function
-
- real(8) function GetKellyHoseVibrationRate_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetKellyHoseVibrationRate_WN
- !DEC$ ATTRIBUTES ALIAS: 'GetKellyHoseVibrationRate_WN' :: GetKellyHoseVibrationRate_WN
- implicit none
- GetKellyHoseVibrationRate_WN = UnityOutputs%KellyHoseVibrationRate
- end function
-
-
-
-
- subroutine Set_Pedal(v)
- implicit none
- real(8), intent (in) :: v
- UnityOutputs%Pedal = v
- #ifdef deb
- print*, 'Pedal=', v
- #endif
- end subroutine
-
- real(8) function GetPedal()
- implicit none
- GetPedal = UnityOutputs%Pedal
- end function
-
- subroutine Set_Pedal_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_Pedal_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_Pedal_WN' :: Set_Pedal_WN
- implicit none
- real(8), intent (in) :: v
- call Set_Pedal(v)
- end subroutine
-
- real(8) function GetPedal_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetPedal_WN
- !DEC$ ATTRIBUTES ALIAS: 'GetPedal_WN' :: GetPedal_WN
- implicit none
- GetPedal_WN = UnityOutputs%Pedal
- !GetPedal = 50d0
- end function
-
-
-
-
-
- subroutine Set_FlowRate(v)
- implicit none
- real(8), intent (in) :: v
- UnityOutputs%FlowRate = v
- #ifdef deb
- print*, 'FlowRate=', v
- #endif
- end subroutine
-
-
- real(8) function GetFlowRate()
- implicit none
- GetFlowRate = UnityOutputs%FlowRate
- end function
-
-
- subroutine Set_FlowRate_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowRate_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_FlowRate_WN' :: Set_FlowRate_WN
- implicit none
- real(8), intent (in) :: v
- call Set_FlowRate(v)
- end subroutine
-
- real(8) function GetFlowRate_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetFlowRate_WN
- !DEC$ ATTRIBUTES ALIAS: 'GetFlowRate_WN' :: GetFlowRate_WN
- implicit none
- GetFlowRate_WN = UnityOutputs%FlowRate
- !GetFlowRate_WN = 50d0
- end function
-
-
-
-
- subroutine Set_RotaryRpm(v)
- implicit none
- real(8), intent (in) :: v
- UnityOutputs%RotaryRpm = v
- #ifdef deb
- print*, 'RotaryRpm=', v
- #endif
- end subroutine
-
- real(8) function GetRotaryRpm()
- implicit none
- GetRotaryRpm = UnityOutputs%RotaryRpm
- end function
-
-
- subroutine Set_RotaryRpm_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_RotaryRpm_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_RotaryRpm_WN' :: Set_RotaryRpm_WN
- implicit none
- real(8), intent (in) :: v
- call Set_RotaryRpm(v)
- end subroutine
-
- real(8) function GetRotaryRpm_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetRotaryRpm_WN
- !DEC$ ATTRIBUTES ALIAS: 'GetRotaryRpm_WN' :: GetRotaryRpm_WN
- implicit none
- GetRotaryRpm_WN = UnityOutputs%RotaryRpm
- end function
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- logical function GetSignal1()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal1
- !DEC$ ATTRIBUTES ALIAS: 'GetSignal1' :: GetSignal1
- implicit none
- !GetSignal1 = Signal1
- GetSignal1 = .false.
- end function
-
- logical function GetSignal2()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal2
- !DEC$ ATTRIBUTES ALIAS: 'GetSignal2' :: GetSignal2
- implicit none
- !GetSignal2 = Signal2
- GetSignal2 = .false.
- end function
-
- logical function GetSignal3()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal3
- !DEC$ ATTRIBUTES ALIAS: 'GetSignal3' :: GetSignal3
- implicit none
- !GetSignal3 = Signal3
- GetSignal3 = .false.
- end function
-
- logical function GetSignal4()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal4
- !DEC$ ATTRIBUTES ALIAS: 'GetSignal4' :: GetSignal4
- implicit none
- !GetSignal4 = Signal4
- GetSignal4 = .false.
- end function
-
- logical function GetSignal5()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal5
- !DEC$ ATTRIBUTES ALIAS: 'GetSignal5' :: GetSignal5
- implicit none
- !GetSignal5 = Signal5
- GetSignal5 = .false.
- end function
-
- logical function GetSignal6()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal6
- !DEC$ ATTRIBUTES ALIAS: 'GetSignal6' :: GetSignal6
- implicit none
- !GetSignal6 = Signal6
- GetSignal6 = .false.
- end function
-
- logical function GetSignal7()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal7
- !DEC$ ATTRIBUTES ALIAS: 'GetSignal7' :: GetSignal7
- implicit none
- !GetSignal7 = Signal7
- GetSignal7 = .false.
- end function
-
- logical function GetSignal8()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal8
- !DEC$ ATTRIBUTES ALIAS: 'GetSignal8' :: GetSignal8
- implicit none
- !GetSignal8 = Signal8
- GetSignal8 = .false.
- end function
-
- logical function GetSignal9()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal9
- !DEC$ ATTRIBUTES ALIAS: 'GetSignal9' :: GetSignal9
- implicit none
- !GetSignal9 = Signal9
- GetSignal9 = .false.
- end function
-
- logical function GetSignal10()
- !DEC$ ATTRIBUTES DLLEXPORT :: GetSignal10
- !DEC$ ATTRIBUTES ALIAS: 'GetSignal10' :: GetSignal10
- implicit none
- !GetSignal10 = Signal10
- GetSignal10 = .false.
- end function
-
-
-
- end module CUnityOutputs
|