Simulation Core
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

ChokeControlMain.f90 3.1 KiB

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