Simulation Core
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

AnnularMain.f90 1.8 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. module AnnularMain
  2. implicit none
  3. public
  4. contains
  5. subroutine Annular_Setup()
  6. use CSimulationVariables
  7. implicit none
  8. call OnSimulationInitialization%Add(Annular_Init)
  9. call OnSimulationStop%Add(Annular_Init)
  10. call OnAnnularStep%Add(Annular_Step)
  11. call OnAnnularOutput%Add(Annular_Output)
  12. call OnAnnularMain%Add(AnnularMainBody)
  13. end subroutine
  14. subroutine Annular_Init
  15. implicit none
  16. end subroutine Annular_Init
  17. subroutine Annular_Step
  18. CALL ANNULAR
  19. end subroutine Annular_Step
  20. subroutine Annular_Output
  21. implicit none
  22. end subroutine Annular_Output
  23. subroutine AnnularMainBody
  24. USE ifport
  25. USE ifmt
  26. USE CSimulationVariables
  27. ! USE BOP
  28. implicit none
  29. INTEGER :: AnnularDuration
  30. integer,dimension(8) :: AnnularStartTime , AnnularEndTime
  31. ! CALL BOP_StartUp()
  32. loop1: DO
  33. CALL DATE_AND_TIME(values=AnnularStartTime)
  34. CALL ANNULAR
  35. CALL DATE_AND_TIME(values=AnnularEndTime)
  36. AnnularDuration = 3600000 * (AnnularEndTime(5) - AnnularStartTime(5)) + 60000 * (AnnularEndTime(6) - AnnularStartTime(6)) + 1000 * (AnnularEndTime(7) - AnnularStartTime(7)) + (AnnularEndTime(8) - AnnularStartTime(8))
  37. if (AnnularDuration < 100) then
  38. call sleepqq(100 - AnnularDuration)
  39. ELSE
  40. WRITE (*,*) 'Annular BOP run duration exceeded 100 ms and =', AnnularDuration
  41. end if
  42. IF (IsStopped==.true.) THEN
  43. EXIT loop1
  44. ENDIF
  45. ENDDO loop1
  46. ! CALL DEALLOCATE_ARRAYS()
  47. end subroutine AnnularMainBody
  48. end module AnnularMain