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.

PipeRams1Main.f90 2.4 KiB

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