Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ChokeControlMain.i90 3.0 KiB

1 年之前
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/ChokeControl/ChokeControlMain.f90"
  2. module ChokeControlMain
  3. USE CHOKEVARIABLES
  4. use SimulationVariables !@
  5. implicit none
  6. public
  7. contains
  8. ! subroutine ChokeControl_Setup()
  9. ! ! use CSimulationVariables
  10. ! implicit none
  11. ! call OnSimulationInitialization%Add(ChokeControl_Init)
  12. ! call OnSimulationStop%Add(ChokeControl_Init)
  13. ! call OnChokeControlStep%Add(ChokeControl_Step)
  14. ! call OnChokeControlOutput%Add(ChokeControl_Output)
  15. ! call OnChokeControlMain%Add(ChokeControlMainBody)
  16. ! end subroutine
  17. subroutine ChokeControl_Init
  18. call Choke_StartUp
  19. end subroutine ChokeControl_Init
  20. subroutine ChokeControl_Step
  21. use ChokeModule
  22. implicit none
  23. INTEGER CHNUMBER
  24. IF(data%Equipments%ChokeControlPanel%ChokeSelectorSwitch== 1) THEN
  25. data%Equipments%ChokeControlPanel%Choke1LED=1
  26. data%Equipments%ChokeControlPanel%Choke2LED=0
  27. CHNUMBER=1
  28. ELSE
  29. data%Equipments%ChokeControlPanel%Choke2LED=1
  30. data%Equipments%ChokeControlPanel%Choke1LED=0
  31. CHNUMBER=2
  32. ENDIF
  33. if(ABS(data%Equipments%ChokeControlPanel%ChokeControlLever)==1.0 .AND. data%Equipments%ChokeControlPanel%ChokePanelRigAirSwitch == 1 .AND. data%State%CHOOKE(CHNUMBER)%FailMalf==0 .AND. data%State%AirDrivenPump%ChokeAirFail==0) then
  34. if (data%Equipments%ChokeControlPanel%ChokeControlLever == 1.0) then
  35. data%State%CHOOKE(CHNUMBER)%ChokeIsClosing = .true.
  36. data%State%CHOOKE(CHNUMBER)%ChokeIsOpening = .false.
  37. endif
  38. if (data%Equipments%ChokeControlPanel%ChokeControlLever == -1.0) then
  39. data%State%CHOOKE(CHNUMBER)%ChokeIsOpening = .true.
  40. data%State%CHOOKE(CHNUMBER)%ChokeIsClosing = .false.
  41. endif
  42. data%State%AirPumpLine%TIME=data%State%AirPumpLine%TIME+data%State%AirPumpLine%DeltaT_Choke !overal time (s)
  43. call airpump_code_CHOKE(CHNUMBER)
  44. else
  45. call CHOKE_MainBody2()
  46. endif
  47. end subroutine ChokeControl_Step
  48. ! subroutine ChokeControl_Output
  49. ! implicit none
  50. ! end subroutine ChokeControl_Output
  51. ! subroutine ChokeControlMainBody
  52. ! use CRigSizeVariables
  53. ! use CHOKE
  54. ! implicit none
  55. ! CALL Choke_StartUp()
  56. ! loop1: DO
  57. ! CALL CHOKE_MainBody
  58. ! call sleepqq(100)
  59. ! !IF (IsStopped==.true.) THEN
  60. ! ! EXIT loop1
  61. ! !ENDIF
  62. ! !write(*,*) '1111111111111'
  63. ! if(IsStopped) then
  64. ! !write(*,*) '22222222222222'
  65. ! CALL DEALLOCATE_ARRAYS_CHOKE()
  66. ! !write(*,*) '333333333'
  67. ! call Quit()
  68. ! end if
  69. ! ENDDO loop1
  70. ! CLOSE(150)
  71. ! !CALL DEALLOCATE_ARRAYS_CHOKE()
  72. ! end subroutine ChokeControlMainBody
  73. end module ChokeControlMain