Simulation Core
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

222 строки
7.5 KiB

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