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.
 
 
 
 
 
 

68 wiersze
1.9 KiB

  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. implicit none
  16. end subroutine PipeRams1_Init
  17. subroutine PipeRams1_Step
  18. CALL PIPE_RAMS1
  19. end subroutine PipeRams1_Step
  20. subroutine PipeRams1_Output
  21. end subroutine PipeRams1_Output
  22. subroutine PipeRams1MainBody
  23. USE ifport
  24. USE ifmt
  25. USE CSimulationVariables
  26. ! USE BOP
  27. implicit none
  28. INTEGER :: PipeRam1Duration
  29. integer,dimension(8) :: PipeRam1StartTime , PipeRam1EndTime
  30. ! CALL BOP_StartUp()
  31. loop1: DO
  32. CALL DATE_AND_TIME(values=PipeRam1StartTime)
  33. CALL PIPE_RAMS1
  34. CALL DATE_AND_TIME(values=PipeRam1EndTime)
  35. PipeRam1Duration = 3600000 * (PipeRam1EndTime(5) - PipeRam1StartTime(5)) + 60000 * (PipeRam1EndTime(6) - PipeRam1StartTime(6)) + 1000 * (PipeRam1EndTime(7) - PipeRam1StartTime(7)) + (PipeRam1EndTime(8) - PipeRam1StartTime(8))
  36. if (PipeRam1Duration < 100) then
  37. call sleepqq(100 - PipeRam1Duration)
  38. ELSE
  39. WRITE (*,*) 'PipeRam1 BOP run duration exceeded 100 ms and =', PipeRam1Duration
  40. end if
  41. IF (IsStopped==.true.) THEN
  42. EXIT loop1
  43. ENDIF
  44. ENDDO loop1
  45. ! CALL DEALLOCATE_ARRAYS()
  46. end subroutine PipeRams1MainBody
  47. end module PipeRams1Main