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

147 行
4.2 KiB

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