Simulation Core
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

248 Zeilen
7.9 KiB

  1. module PumpsMain
  2. use CPumpsVariables
  3. use CDrillingConsoleVariables
  4. use CDataDisplayConsoleVariables
  5. use CSimulationVariables
  6. use Pumps_VARIABLES
  7. use CSounds
  8. implicit none
  9. public
  10. contains
  11. ! ****************************************
  12. ! ***** subroutine Pump1MainBody *****
  13. ! ****************************
  14. subroutine Pump1_Setup()
  15. use CSimulationVariables
  16. implicit none
  17. call OnSimulationInitialization%Add(Pump1_Init)
  18. call OnSimulationStop%Add(Pump1_Init)
  19. call OnPump1Step%Add(Pump1_Step)
  20. call OnPump1Output%Add(Pump1_Output)
  21. call OnPump1Main%Add(Pump1MainBody)
  22. end subroutine
  23. subroutine Pump1_Init
  24. Call Pumps_StartUp
  25. end subroutine Pump1_Init
  26. subroutine Pump1_Step
  27. Call Pump1_MainSolver
  28. end subroutine Pump1_Step
  29. subroutine Pump1_Output
  30. implicit none
  31. end subroutine Pump1_Output
  32. subroutine Pump1MainBody
  33. use ifport
  34. use ifmt
  35. !use Pump1_MainSolver
  36. use CWarningsVariables
  37. !use equipments_PowerLimit
  38. implicit none
  39. integer,dimension(8) :: MP_START_TIME, MP_END_TIME
  40. INTEGER :: MP_SolDuration
  41. Call Pumps_StartUp
  42. loop1 : do
  43. !!Call sleepqq(10)
  44. !!Call DATE_AND_TIME(values=MP_START_TIME)
  45. Call Pump1_MainSolver
  46. if (Pumps_IsStopped == .true.) then
  47. exit loop1
  48. end if
  49. !!Call DATE_AND_TIME(values=MP_END_TIME)
  50. !!MP_SolDuration = 100-(MP_END_TIME(5)*3600000+MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(5)*3600000-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8))
  51. !!if(MP_SolDuration > 0.0) then
  52. !! Call sleepqq(MP_SolDuration)
  53. !!end if
  54. end do loop1
  55. end subroutine Pump1MainBody
  56. ! ****************************************
  57. ! ***** subroutine Pump2MainBody *****
  58. ! ****************************
  59. ! subroutine Pump2_Setup()
  60. ! use CSimulationVariables
  61. ! implicit none
  62. ! call OnSimulationInitialization%Add(Pump2_Init)
  63. ! call OnSimulationStop%Add(Pump2_Init)
  64. ! call OnPump2Step%Add(Pump2_Step)
  65. ! call OnPump2Output%Add(Pump2_Output)
  66. ! call OnPump2Main%Add(Pump2MainBody)
  67. ! end subroutine
  68. !
  69. ! subroutine Pump2_Init
  70. ! implicit none
  71. ! end subroutine Pump2_Init
  72. !
  73. ! subroutine Pump2_Step
  74. ! call Pump2_MainSolver
  75. ! end subroutine Pump2_Step
  76. !
  77. ! subroutine Pump2_Output
  78. ! implicit none
  79. ! end subroutine Pump2_Output
  80. !
  81. ! subroutine Pump2MainBody
  82. ! use ifport
  83. ! use ifmt
  84. ! use CWarningsVariables
  85. ! implicit none
  86. !
  87. ! integer,dimension(8) :: MP_START_TIME, MP_END_TIME
  88. ! INTEGER :: MP_SolDuration
  89. !
  90. ! Call Pump_StartUp
  91. !
  92. ! loop1 : do
  93. !
  94. ! Call DATE_AND_TIME(values=MP_START_TIME)
  95. !
  96. ! Call Pump2_MainSolver
  97. !
  98. ! Call DATE_AND_TIME(values=MP_END_TIME)
  99. ! MP_SolDuration = 100-(MP_END_TIME(5)*3600000+MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(5)*3600000-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8))
  100. ! if(MP_SolDuration > 0.0) then
  101. ! Call sleepqq(MP_SolDuration)
  102. ! end if
  103. !
  104. ! if (IsStopped == .true.) then
  105. ! exit loop1
  106. ! end if
  107. !
  108. ! end do loop1
  109. !
  110. !
  111. ! end subroutine Pump2MainBody
  112. !
  113. !
  114. !
  115. !
  116. !! ****************************************
  117. !! ***** subroutine Pump3MainBody *****
  118. !! ****************************
  119. ! subroutine Pump3_Setup()
  120. ! use CSimulationVariables
  121. ! implicit none
  122. ! call OnSimulationInitialization%Add(Pump3_Init)
  123. ! call OnSimulationStop%Add(Pump3_Init)
  124. ! call OnPump3Step%Add(Pump3_Step)
  125. ! call OnPump3Output%Add(Pump3_Output)
  126. ! call OnPump3Main%Add(Pump3MainBody)
  127. ! end subroutine
  128. !
  129. ! subroutine Pump3_Init
  130. ! implicit none
  131. ! end subroutine Pump3_Init
  132. !
  133. ! subroutine Pump3_Step
  134. ! implicit none
  135. ! end subroutine Pump3_Step
  136. !
  137. ! subroutine Pump3_Output
  138. ! implicit none
  139. ! end subroutine Pump3_Output
  140. !
  141. ! subroutine Pump3MainBody
  142. ! use ifport
  143. ! use ifmt
  144. ! implicit none
  145. !
  146. !
  147. ! integer,dimension(8) :: MP_START_TIME, MP_END_TIME
  148. ! INTEGER :: MP_SolDuration
  149. !
  150. ! !Call Pump_StartUp
  151. ! !loop1 : do
  152. ! !
  153. ! ! Call sleepqq(10)
  154. ! !
  155. ! ! !!! Pump3 Malfunction ----> Power Failure
  156. ! ! !!if (PUMP(1)%PowerFailMalf==1) then
  157. ! ! !! !MP1BLWR=0
  158. ! ! !! Call Pump3_OffMode_Solver
  159. ! ! !! Call ClosePump1()
  160. ! ! !!end if
  161. ! !
  162. ! ! !if( (MP1CPSwitch==1) .and. (MP1Throttle==0.) .and. (PUMP(3)%PowerFailMalf==0) ) then
  163. ! !!
  164. ! !! loop2: do
  165. ! !!
  166. ! !! Call DATE_AND_TIME(values=MP_START_TIME)
  167. ! !!
  168. ! !!!! ! Pump3 Malfunction ----> Power Failure
  169. ! !!!! if (PUMP(1)%PowerFailMalf==1) then
  170. ! !!!! !MP1BLWR=0
  171. ! !!!! Pump3_OffMode_Solver
  172. ! !!!! Call ClosePump1()
  173. ! !!!! exit loop2
  174. ! !!!! end if
  175. ! !!
  176. ! !! PUMP(3)%N_new = MP1Throttle
  177. ! !! if (((PUMP(3)%N_new-PUMP(3)%N_old)/PUMP(3)%time_step)>193.) then
  178. ! !! PUMP(3)%N_ref =(193.*PUMP(3)%time_step)+PUMP(3)%N_old
  179. ! !! else if (((PUMP(3)%N_old-PUMP(3)%N_new)/PUMP(3)%time_step)>193.) then
  180. ! !! PUMP(3)%N_ref = (-193.*PUMP(3)%time_step)+PUMP(3)%N_old
  181. ! !! else
  182. ! !! PUMP(3)%N_ref = PUMP(3)%N_new
  183. ! !! end if
  184. ! !!
  185. ! !! Call Pump3_OnMode_Solver
  186. ! !!
  187. ! !! IF (PUMP(3)%Flow_Rate>0.) Then
  188. ! !! Call OpenCementPump()
  189. ! !! Else
  190. ! !! Call CloseCementPump()
  191. ! !! End if
  192. ! !!
  193. ! !! PUMP(3)%N_old = PUMP(3)%N_ref
  194. ! !!
  195. ! !! Call DATE_AND_TIME(values=MP_END_TIME)
  196. ! !! MP_SolDuration = 100-(MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8))
  197. ! !! !print*, 'MPtime=', MP_SolDuration
  198. ! !! if(MP_SolDuration > 0.0) then
  199. ! !! Call sleepqq(MP_SolDuration)
  200. ! !! end if
  201. ! !!
  202. ! !! if ((MP1CPSwitch==0) .or. (IsStopped == .true.)) then
  203. ! !! Call Pump3_OffMode_Solver
  204. ! !! Call CloseCementPump()
  205. ! !! exit loop2
  206. ! !! end if
  207. ! !! end do loop2
  208. ! !
  209. ! ! else
  210. ! !
  211. ! ! !Call Pump3_OffMode_Solver
  212. ! ! !Call CloseCementPump()
  213. ! !
  214. ! ! end if
  215. ! !
  216. ! ! if (IsStopped == .true.) then
  217. ! ! exit loop1
  218. ! ! end if
  219. ! !
  220. ! !end do loop1
  221. !
  222. !
  223. ! end subroutine Pump3MainBody
  224. end module PumpsMain