|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- module FluidFlowMain
- use SimulationVariables
- implicit none
- public
- contains
-
- subroutine FluidFlow_Init
- USE Fluid_Flow_Startup_Vars
- implicit none
- !WRITE (*,*) ' fluid flow done_Start'
- CALL NormalCirculation_StartUp()
- CALL FlowStartup
-
- Call TD_StartUp
- Call TD_WellReadData
- Call TD_WellElementsReadData
- Call TD_DrillStemReadData
- Call TD_PipePropertiesReadData
- end subroutine FluidFlow_Init
-
- subroutine FluidFlow_Step
- implicit none
- integer :: i, FlowDuration, SimulationStateOld
- integer,dimension(8) :: FlowStartTime,FlowEndTime
-
- !WRITE (*,*) ' fluid flow done_Step'
- !call Fluid_Flow_Solver
-
-
-
-
-
-
- CALL DATE_AND_TIME(values=FlowStartTime)
- call Fluid_Flow_Solver
-
- CALL DATE_AND_TIME(values=FlowEndTime)
-
- FlowDuration = 3600000 * (FlowEndTime(5) - FlowStartTime(5)) + 60000 * (FlowEndTime(6) - FlowStartTime(6)) + 1000 * (FlowEndTime(7) - FlowStartTime(7)) + (FlowEndTime(8) - FlowStartTime(8))
-
- ! if(print_log) WRITE (*,*) 'FlowDuration (ms)=' , FlowDuration
-
- end subroutine FluidFlow_Step
-
- !subroutine FluidFlow_Output
- ! implicit none
- !end subroutine FluidFlow_Output
-
- ! subroutine FluidFlowMainBody
- ! !
- ! use ifport
- ! use ifmt
- ! ! use CSimulationVariables
- ! USE Fluid_Flow_Startup_Vars
- ! !use general_info, only : reset_data
- ! !use well_info
- ! !use drilling_info
- ! use CLog1
- ! !
- ! implicit none
-
- !integer :: i, FlowDuration, SimulationStateOld
- !integer,dimension(8) :: FlowStartTime,FlowEndTime
- !
- !
- !CALL NormalCirculation_StartUp()
- !CALL FlowStartup
- !
- !Call TD_StartUp
- !Call TD_WellReadData
- !Call TD_WellElementsReadData
- !Call TD_DrillStemReadData
- !Call TD_PipePropertiesReadData
- !
- !
- !LoopSimulation: do
- ! !WRITE (*,*) ' fluid flow done 0'
- !!
- ! CALL DATE_AND_TIME(values=FlowStartTime)
- ! !WRITE (*,*) 'FlowStartTime=', FlowStartTime
- !!
- ! call Fluid_Flow_Solver
- !
- !!
- ! CALL DATE_AND_TIME(values=FlowEndTime)
- !!
- ! !WRITE (*,*) ' fluid flow done 1'
- !
- !
- !
- ! FlowDuration = 3600000 * (FlowEndTime(5) - FlowStartTime(5)) + 60000 * (FlowEndTime(6) - FlowStartTime(6)) + 1000 * (FlowEndTime(7) - FlowStartTime(7)) + (FlowEndTime(8) - FlowStartTime(8))
- !
- !
- ! !call Log_1('FlowDuration=', FlowDuration)
- ! !WRITE (*,*) 'FlowDuration (ms)=' , FlowDuration
- !
- ! if ((100 - FlowDuration) > 0) then
- ! !WRITE (*,*) 'fluid flow done 2'
- ! call sleepqq(100 - FlowDuration)
- ! !WRITE (*,*) ' fluid flow done 3'
- !
- ! end if
- ! !WRITE (*,*) ' fluid flow done 4'
- !
- !
- !
- ! !WRITE (*,*) "FlowDuration", FlowDuration
- ! !if(IsStopped) then
- ! ! EXIT LoopSimulation
- ! !ENDIF
- ! !write(*,*) 'IsStopped=' , IsStopped
- !
- ! if(IsStopped) then
- ! !write(*,*) '44444444444'
- !
- ! call DEALLOCATE_ARRAYS_NormalCirculation()
- ! CALL DeallocateFlowTypes
- ! call Quit()
- ! end if
- ! !
- ! ! if(IsStopped) exit LoopSimulation
- ! !
- !end do LoopSimulation
- !!call DEALLOCATE_ARRAYS_NormalCirculation()
- !!CALL DeallocateFlowTypes
- !
- !
- ! end subroutine FluidFlowMainBody
-
- end module FluidFlowMain
|