Simulation Core
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 
 

81 рядки
2.4 KiB

  1. # 1 "/home/admin/SimulationCore2/Equipments/BopStack/PipeRams1Main.f90"
  2. module PipeRams1Main
  3. implicit none
  4. public
  5. contains
  6. ! subroutine PipeRams1_Setup()
  7. ! ! use CSimulationVariables
  8. ! implicit none
  9. ! call OnSimulationInitialization%Add(PipeRams1_Init)
  10. ! call OnSimulationStop%Add(PipeRams1_Init)
  11. ! call OnPipeRams1Step%Add(PipeRams1_Step)
  12. ! call OnPipeRams1Output%Add(PipeRams1_Output)
  13. ! call OnPipeRams1Main%Add(PipeRams1MainBody)
  14. ! end subroutine
  15. subroutine PipeRams1_Init
  16. call BOP_StartUp()
  17. end subroutine PipeRams1_Init
  18. subroutine PipeRams1_Step
  19. use SimulationVariables
  20. implicit none
  21. if (data%State%PipeRam1%finished/=0) then
  22. call PIPE_RAMS1
  23. if (data%State%PipeRam1%IsOpening .or. data%State%PipeRam1%IsClosing .or. data%State%RAM(2)%Bottles_Charged_MalfActive) then
  24. if(data%State%PipeRam1%finished==0) then
  25. call PIPE_RAMS1_SUB !only body of loop2
  26. endif
  27. endif
  28. else
  29. call PIPE_RAMS1_SUB
  30. endif
  31. end subroutine PipeRams1_Step
  32. ! subroutine PipeRams1_Output
  33. ! end subroutine PipeRams1_Output
  34. ! subroutine PipeRams1MainBody
  35. ! USE ifport
  36. ! USE ifmt
  37. ! ! use CSimulationVariables
  38. ! ! USE BOP
  39. ! implicit none
  40. ! INTEGER :: PipeRam1Duration
  41. ! integer,dimension(8) :: PipeRam1StartTime , PipeRam1EndTime
  42. ! ! CALL BOP_StartUp()
  43. ! loop1: DO
  44. ! CALL DATE_AND_TIME(values=PipeRam1StartTime)
  45. ! CALL PIPE_RAMS1
  46. ! CALL DATE_AND_TIME(values=PipeRam1EndTime)
  47. ! PipeRam1Duration = 3600000 * (PipeRam1EndTime(5) - PipeRam1StartTime(5)) + 60000 * (PipeRam1EndTime(6) - PipeRam1StartTime(6)) + 1000 * (PipeRam1EndTime(7) - PipeRam1StartTime(7)) + (PipeRam1EndTime(8) - PipeRam1StartTime(8))
  48. ! if (PipeRam1Duration < 100) then
  49. ! call sleepqq(100 - PipeRam1Duration)
  50. ! ELSE
  51. ! WRITE (*,*) 'PipeRam1 BOP run duration exceeded 100 ms and =', PipeRam1Duration
  52. ! end if
  53. ! IF (IsStopped==.true.) THEN
  54. ! EXIT loop1
  55. ! ENDIF
  56. ! ENDDO loop1
  57. ! ! CALL DEALLOCATE_ARRAYS()
  58. ! end subroutine PipeRams1MainBody
  59. end module PipeRams1Main