Simulation Core
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

BlindRamsMain.f90 3.2 KiB

pirms 1 gada
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. use SimulationVariables
  19. implicit none
  20. if (data%State%RamLine%FINISHED_shear/=0) then
  21. call SHEAR_RAMS
  22. if (data%State%RamLine%ShearRamIsOpening .or. data%State%RamLine%ShearRamIsClosing .or. data%State%RAM(4)%Bottles_Charged_MalfActive) then
  23. data%State%Annular%FirstSet= 0
  24. data%State%AnnularComputational%RamsFirstSet= 0
  25. if(data%State%RamLine%FINISHED_shear==0) then
  26. call SHEAR_RAMS_SUB !only body of loop2
  27. if (data%State%RamLine%FINISHED_shear/=0 .and. data%State%RamLine%FINISHED_shear==1 .and. data%State%RAM(4)%Bottles_Charged_MalfActive==.true.) then
  28. call bop_code(1,data%State%ShearRAM%H_ShearRamBop,4)
  29. endif
  30. endif
  31. endif
  32. else
  33. call SHEAR_RAMS_SUB
  34. if (data%State%RamLine%FINISHED_shear/=0 .and. data%State%RamLine%FINISHED_shear==1 .and. data%State%RAM(4)%Bottles_Charged_MalfActive==.true.) then
  35. call bop_code(1,data%State%ShearRAM%H_ShearRamBop,4)
  36. endif
  37. endif
  38. end subroutine BlindRams_Step
  39. ! subroutine BlindRams_Output
  40. ! implicit none
  41. ! end subroutine BlindRams_Output
  42. ! subroutine BlindRamsMainBody
  43. ! USE ifport
  44. ! USE ifmt
  45. ! ! use CSimulationVariables
  46. ! ! USE BOP
  47. ! implicit none
  48. ! INTEGER :: ShearRamDuration
  49. ! integer,dimension(8) :: ShearRamStartTime , ShearRamEndTime
  50. ! ! CALL BOP_StartUp()
  51. ! loop1: DO
  52. ! CALL DATE_AND_TIME(values=ShearRamStartTime)
  53. ! CALL SHEAR_RAMS
  54. ! CALL DATE_AND_TIME(values=ShearRamEndTime)
  55. ! ShearRamDuration = 3600000 * (ShearRamEndTime(5) - ShearRamStartTime(5)) + 60000 * (ShearRamEndTime(6) - ShearRamStartTime(6)) + 1000 * (ShearRamEndTime(7) - ShearRamStartTime(7)) + (ShearRamEndTime(8) - ShearRamStartTime(8))
  56. ! if (ShearRamDuration < 100) then
  57. ! call sleepqq(100 - ShearRamDuration)
  58. ! ELSE
  59. ! WRITE (*,*) 'ShearRam BOP run duration exceeded 100 ms and =', ShearRamDuration
  60. ! end if
  61. ! IF (IsStopped==.true.) THEN
  62. ! EXIT loop1
  63. ! ENDIF
  64. ! ENDDO loop1
  65. ! end subroutine BlindRamsMainBody
  66. end module BlindRamsMain