Simulation Core
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

79 rader
2.5 KiB

  1. module PipeRams2Main
  2. implicit none
  3. public
  4. contains
  5. ! subroutine PipeRams2_Setup()
  6. ! ! use CSimulationVariables
  7. ! implicit none
  8. ! call OnSimulationInitialization%Add(PipeRams2_Init)
  9. ! call OnSimulationStop%Add(PipeRams2_Init)
  10. ! call OnPipeRams2Step%Add(PipeRams2_Step)
  11. ! call OnPipeRams2Output%Add(PipeRams2_Output)
  12. ! call OnPipeRams2Main%Add(PipeRams2MainBody)
  13. ! end subroutine
  14. ! subroutine PipeRams2_Init
  15. ! implicit none
  16. ! end subroutine PipeRams2_Init
  17. subroutine PipeRams2_Step
  18. use SimulationVariables
  19. implicit none
  20. if (data%State%PipeRam2%finished/=0) then
  21. call PIPE_RAMS2
  22. if (data%State%PipeRam2%IsOpening .or. data%State%PipeRam2%IsClosing .or. data%State%RAM(3)%Bottles_Charged_MalfActive) then
  23. if(data%State%PipeRam2%finished==0) then
  24. call PIPE_RAMS2_SUB !only body of loop2
  25. endif
  26. endif
  27. else
  28. call PIPE_RAMS2_SUB
  29. endif
  30. end subroutine PipeRams2_Step
  31. ! subroutine PipeRams2_Output
  32. ! implicit none
  33. ! end subroutine PipeRams2_Output
  34. ! subroutine PipeRams2MainBody
  35. ! USE ifport
  36. ! USE ifmt
  37. ! ! use CSimulationVariables
  38. ! ! USE BOP
  39. ! implicit none
  40. ! INTEGER :: PipeRam2Duration
  41. ! integer,dimension(8) :: PipeRam2StartTime , PipeRam2EndTime
  42. ! ! CALL BOP_StartUp()
  43. ! loop1: DO
  44. ! CALL DATE_AND_TIME(values=PipeRam2StartTime)
  45. ! CALL PIPE_RAMS2
  46. ! CALL DATE_AND_TIME(values=PipeRam2EndTime)
  47. ! PipeRam2Duration = 3600000 * (PipeRam2EndTime(5) - PipeRam2StartTime(5)) + 60000 * (PipeRam2EndTime(6) - PipeRam2StartTime(6)) + 1000 * (PipeRam2EndTime(7) - PipeRam2StartTime(7)) + (PipeRam2EndTime(8) - PipeRam2StartTime(8))
  48. ! if (PipeRam2Duration < 100) then
  49. ! call sleepqq(100 - PipeRam2Duration)
  50. ! ELSE
  51. ! WRITE (*,*) 'PipeRam2 BOP run duration exceeded 100 ms and =', PipeRam2Duration
  52. ! end if
  53. ! IF (IsStopped==.true.) THEN
  54. ! EXIT loop1
  55. ! ENDIF
  56. ! ENDDO loop1
  57. ! ! CALL DEALLOCATE_ARRAYS()
  58. ! end subroutine PipeRams2MainBody
  59. end module PipeRams2Main