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.
 
 
 
 
 
 

90 line
3.0 KiB

  1. # 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/BopStack/BlindRamsMain.f90"
  2. module BlindRamsMain
  3. implicit none
  4. public
  5. contains
  6. ! subroutine BlindRams_Setup()
  7. ! ! use CSimulationVariables
  8. ! implicit none
  9. ! call OnSimulationInitialization%Add(BlindRams_Init)
  10. ! call OnSimulationStop%Add(BlindRams_Init)
  11. ! call OnBlindRamsStep%Add(BlindRams_Step)
  12. ! call OnBlindRamsOutput%Add(BlindRams_Output)
  13. ! call OnBlindRamsMain%Add(BlindRamsMainBody)
  14. ! end subroutine
  15. ! subroutine BlindRams_Init
  16. ! implicit none
  17. ! end subroutine BlindRams_Init
  18. subroutine BlindRams_Step
  19. use SimulationVariables
  20. implicit none
  21. if (data%State%RamLine%FINISHED_shear/=0) then
  22. call SHEAR_RAMS
  23. if (data%State%RamLine%ShearRamIsOpening .or. data%State%RamLine%ShearRamIsClosing .or. data%State%RAM(4)%Bottles_Charged_MalfActive) then
  24. data%State%Annular%FirstSet= 0
  25. data%State%AnnularComputational%RamsFirstSet= 0
  26. if(data%State%RamLine%FINISHED_shear==0) then
  27. call SHEAR_RAMS_SUB !only body of loop2
  28. if (data%State%RamLine%FINISHED_shear/=0 .and. data%State%RamLine%FINISHED_shear==1 .and. data%State%RAM(4)%Bottles_Charged_MalfActive==.true.) then
  29. call bop_code(1,data%State%ShearRAM%H_ShearRamBop,4)
  30. endif
  31. endif
  32. endif
  33. else
  34. call SHEAR_RAMS_SUB
  35. if (data%State%RamLine%FINISHED_shear/=0 .and. data%State%RamLine%FINISHED_shear==1 .and. data%State%RAM(4)%Bottles_Charged_MalfActive==.true.) then
  36. call bop_code(1,data%State%ShearRAM%H_ShearRamBop,4)
  37. endif
  38. endif
  39. end subroutine BlindRams_Step
  40. ! subroutine BlindRams_Output
  41. ! implicit none
  42. ! end subroutine BlindRams_Output
  43. ! subroutine BlindRamsMainBody
  44. ! USE ifport
  45. ! USE ifmt
  46. ! ! use CSimulationVariables
  47. ! ! USE BOP
  48. ! implicit none
  49. ! INTEGER :: ShearRamDuration
  50. ! integer,dimension(8) :: ShearRamStartTime , ShearRamEndTime
  51. ! ! CALL BOP_StartUp()
  52. ! loop1: DO
  53. ! CALL DATE_AND_TIME(values=ShearRamStartTime)
  54. ! CALL SHEAR_RAMS
  55. ! CALL DATE_AND_TIME(values=ShearRamEndTime)
  56. ! ShearRamDuration = 3600000 * (ShearRamEndTime(5) - ShearRamStartTime(5)) + 60000 * (ShearRamEndTime(6) - ShearRamStartTime(6)) + 1000 * (ShearRamEndTime(7) - ShearRamStartTime(7)) + (ShearRamEndTime(8) - ShearRamStartTime(8))
  57. ! if (ShearRamDuration < 100) then
  58. ! call sleepqq(100 - ShearRamDuration)
  59. ! ELSE
  60. ! WRITE (*,*) 'ShearRam BOP run duration exceeded 100 ms and =', ShearRamDuration
  61. ! end if
  62. ! IF (IsStopped==.true.) THEN
  63. ! EXIT loop1
  64. ! ENDIF
  65. ! ENDDO loop1
  66. ! end subroutine BlindRamsMainBody
  67. end module BlindRamsMain