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.
 
 
 
 
 
 

130 rindas
3.6 KiB

  1. module FluidFlowMain
  2. use SimulationVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine FluidFlow_Init
  7. USE Fluid_Flow_Startup_Vars
  8. implicit none
  9. !WRITE (*,*) ' fluid flow done_Start'
  10. CALL NormalCirculation_StartUp()
  11. CALL FlowStartup
  12. Call TD_StartUp
  13. Call TD_WellReadData
  14. Call TD_WellElementsReadData
  15. Call TD_DrillStemReadData
  16. Call TD_PipePropertiesReadData
  17. end subroutine FluidFlow_Init
  18. subroutine FluidFlow_Step
  19. implicit none
  20. integer :: i, FlowDuration, SimulationStateOld
  21. integer,dimension(8) :: FlowStartTime,FlowEndTime
  22. !WRITE (*,*) ' fluid flow done_Step'
  23. !call Fluid_Flow_Solver
  24. CALL DATE_AND_TIME(values=FlowStartTime)
  25. call Fluid_Flow_Solver
  26. CALL DATE_AND_TIME(values=FlowEndTime)
  27. FlowDuration = 3600000 * (FlowEndTime(5) - FlowStartTime(5)) + 60000 * (FlowEndTime(6) - FlowStartTime(6)) + 1000 * (FlowEndTime(7) - FlowStartTime(7)) + (FlowEndTime(8) - FlowStartTime(8))
  28. ! if(print_log) WRITE (*,*) 'FlowDuration (ms)=' , FlowDuration
  29. end subroutine FluidFlow_Step
  30. !subroutine FluidFlow_Output
  31. ! implicit none
  32. !end subroutine FluidFlow_Output
  33. ! subroutine FluidFlowMainBody
  34. ! !
  35. ! use ifport
  36. ! use ifmt
  37. ! ! use CSimulationVariables
  38. ! USE Fluid_Flow_Startup_Vars
  39. ! !use general_info, only : reset_data
  40. ! !use well_info
  41. ! !use drilling_info
  42. ! use CLog1
  43. ! !
  44. ! implicit none
  45. !integer :: i, FlowDuration, SimulationStateOld
  46. !integer,dimension(8) :: FlowStartTime,FlowEndTime
  47. !
  48. !
  49. !CALL NormalCirculation_StartUp()
  50. !CALL FlowStartup
  51. !
  52. !Call TD_StartUp
  53. !Call TD_WellReadData
  54. !Call TD_WellElementsReadData
  55. !Call TD_DrillStemReadData
  56. !Call TD_PipePropertiesReadData
  57. !
  58. !
  59. !LoopSimulation: do
  60. ! !WRITE (*,*) ' fluid flow done 0'
  61. !!
  62. ! CALL DATE_AND_TIME(values=FlowStartTime)
  63. ! !WRITE (*,*) 'FlowStartTime=', FlowStartTime
  64. !!
  65. ! call Fluid_Flow_Solver
  66. !
  67. !!
  68. ! CALL DATE_AND_TIME(values=FlowEndTime)
  69. !!
  70. ! !WRITE (*,*) ' fluid flow done 1'
  71. !
  72. !
  73. !
  74. ! FlowDuration = 3600000 * (FlowEndTime(5) - FlowStartTime(5)) + 60000 * (FlowEndTime(6) - FlowStartTime(6)) + 1000 * (FlowEndTime(7) - FlowStartTime(7)) + (FlowEndTime(8) - FlowStartTime(8))
  75. !
  76. !
  77. ! !call Log_1('FlowDuration=', FlowDuration)
  78. ! !WRITE (*,*) 'FlowDuration (ms)=' , FlowDuration
  79. !
  80. ! if ((100 - FlowDuration) > 0) then
  81. ! !WRITE (*,*) 'fluid flow done 2'
  82. ! call sleepqq(100 - FlowDuration)
  83. ! !WRITE (*,*) ' fluid flow done 3'
  84. !
  85. ! end if
  86. ! !WRITE (*,*) ' fluid flow done 4'
  87. !
  88. !
  89. !
  90. ! !WRITE (*,*) "FlowDuration", FlowDuration
  91. ! !if(IsStopped) then
  92. ! ! EXIT LoopSimulation
  93. ! !ENDIF
  94. ! !write(*,*) 'IsStopped=' , IsStopped
  95. !
  96. ! if(IsStopped) then
  97. ! !write(*,*) '44444444444'
  98. !
  99. ! call DEALLOCATE_ARRAYS_NormalCirculation()
  100. ! CALL DeallocateFlowTypes
  101. ! call Quit()
  102. ! end if
  103. ! !
  104. ! ! if(IsStopped) exit LoopSimulation
  105. ! !
  106. !end do LoopSimulation
  107. !!call DEALLOCATE_ARRAYS_NormalCirculation()
  108. !!CALL DeallocateFlowTypes
  109. !
  110. !
  111. ! end subroutine FluidFlowMainBody
  112. end module FluidFlowMain