Simulation Core
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

BlindRamsMain.f90 1.9 KiB

1 ano atrás
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. module BlindRamsMain
  2. implicit none
  3. public
  4. contains
  5. subroutine BlindRams_Setup()
  6. use CSimulationVariables
  7. implicit none
  8. call OnSimulationInitialization%Add(BlindRams_Init)
  9. call OnSimulationStop%Add(BlindRams_Init)
  10. call OnBlindRamsStep%Add(BlindRams_Step)
  11. call OnBlindRamsOutput%Add(BlindRams_Output)
  12. call OnBlindRamsMain%Add(BlindRamsMainBody)
  13. end subroutine
  14. subroutine BlindRams_Init
  15. implicit none
  16. end subroutine BlindRams_Init
  17. subroutine BlindRams_Step
  18. CALL SHEAR_RAMS
  19. end subroutine BlindRams_Step
  20. subroutine BlindRams_Output
  21. implicit none
  22. end subroutine BlindRams_Output
  23. subroutine BlindRamsMainBody
  24. USE ifport
  25. USE ifmt
  26. USE CSimulationVariables
  27. ! USE BOP
  28. implicit none
  29. INTEGER :: ShearRamDuration
  30. integer,dimension(8) :: ShearRamStartTime , ShearRamEndTime
  31. ! CALL BOP_StartUp()
  32. loop1: DO
  33. CALL DATE_AND_TIME(values=ShearRamStartTime)
  34. CALL SHEAR_RAMS
  35. CALL DATE_AND_TIME(values=ShearRamEndTime)
  36. ShearRamDuration = 3600000 * (ShearRamEndTime(5) - ShearRamStartTime(5)) + 60000 * (ShearRamEndTime(6) - ShearRamStartTime(6)) + 1000 * (ShearRamEndTime(7) - ShearRamStartTime(7)) + (ShearRamEndTime(8) - ShearRamStartTime(8))
  37. if (ShearRamDuration < 100) then
  38. call sleepqq(100 - ShearRamDuration)
  39. ELSE
  40. WRITE (*,*) 'ShearRam BOP run duration exceeded 100 ms and =', ShearRamDuration
  41. end if
  42. IF (IsStopped==.true.) THEN
  43. EXIT loop1
  44. ENDIF
  45. ENDDO loop1
  46. end subroutine BlindRamsMainBody
  47. end module BlindRamsMain