Simulation Core
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

PipeRams2Main.f90 1.9 KiB

1 rok temu
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. CALL PIPE_RAMS2
  19. end subroutine PipeRams2_Step
  20. subroutine PipeRams2_Output
  21. implicit none
  22. end subroutine PipeRams2_Output
  23. subroutine PipeRams2MainBody
  24. USE ifport
  25. USE ifmt
  26. USE CSimulationVariables
  27. ! USE BOP
  28. implicit none
  29. INTEGER :: PipeRam2Duration
  30. integer,dimension(8) :: PipeRam2StartTime , PipeRam2EndTime
  31. ! CALL BOP_StartUp()
  32. loop1: DO
  33. CALL DATE_AND_TIME(values=PipeRam2StartTime)
  34. CALL PIPE_RAMS2
  35. CALL DATE_AND_TIME(values=PipeRam2EndTime)
  36. PipeRam2Duration = 3600000 * (PipeRam2EndTime(5) - PipeRam2StartTime(5)) + 60000 * (PipeRam2EndTime(6) - PipeRam2StartTime(6)) + 1000 * (PipeRam2EndTime(7) - PipeRam2StartTime(7)) + (PipeRam2EndTime(8) - PipeRam2StartTime(8))
  37. if (PipeRam2Duration < 100) then
  38. call sleepqq(100 - PipeRam2Duration)
  39. ELSE
  40. WRITE (*,*) 'PipeRam2 BOP run duration exceeded 100 ms and =', PipeRam2Duration
  41. end if
  42. IF (IsStopped==.true.) THEN
  43. EXIT loop1
  44. ENDIF
  45. ENDDO loop1
  46. ! CALL DEALLOCATE_ARRAYS()
  47. end subroutine PipeRams2MainBody
  48. end module PipeRams2Main