Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

457 lines
18 KiB

  1. SUBROUTINE DEALLOCATE_ARRAYS_CHOKE()
  2. USE CHOKEVARIABLES
  3. implicit none
  4. write(*,*) 'deallocateeeeeeeeeeeee'
  5. !===========================================================================
  6. ! AIR PUMP LOSSES INPUT
  7. !===========================================================================
  8. !if(allocated(PIPINGS_AIRPUMP)) deallocate(PIPINGS_AIRPUMP)
  9. DEALLOCATE (AirPumpLine%PIPINGS_AIRPUMP,AirPumpLine%DIAM_AIR_INCH, &
  10. AirPumpLine%Re_air,AirPumpLine%AREA_AIR,AirPumpLine%LENGT_AIR,AirPumpLine%ROUGHNESS_AIRPLINE,AirPumpLine%REL_ROUGHAIR, &
  11. AirPumpLine%fric_air,AirPumpLine%fricloss_air)
  12. !================================================================
  13. DEALLOCATE (AirPumpLine%MINORS_AIRPUMP,AirPumpLine%MINORDIAM_AIR_INCH, &
  14. AirPumpLine%MINORAREA_AIR,AirPumpLine%LF_AIR,AirPumpLine%CV_AIR,AirPumpLine%NOTE_AIR &
  15. ,AirPumpLine%minlosspa_air,AirPumpLine%minloss_air)
  16. END
  17. SUBROUTINE LOSS_INPUTS_CHOKE()
  18. USE CHOKEVARIABLES
  19. implicit none
  20. Integer I
  21. !===========================================================================
  22. ! AIR PUMP LOSSES INPUT
  23. !===========================================================================
  24. AirPumpLine%NO_PIPINGS_AIRPLINE=1
  25. ALLOCATE (AirPumpLine%PIPINGS_AIRPUMP(AirPumpLine%NO_PIPINGS_AIRPLINE,3))
  26. ! ID(INCH) L(MM) ROUGHNESS(MM)=e DESCRIPTION
  27. AirPumpLine%PIPINGS_AIRPUMP(1,1:3)= (/0.5, 60960., 0.03/) !Avg.acc.distance
  28. !60960= 200 ft
  29. ALLOCATE (AirPumpLine%DIAM_AIR_INCH(AirPumpLine%NO_PIPINGS_AIRPLINE),AirPumpLine%Re_air(AirPumpLine%NO_PIPINGS_AIRPLINE),AirPumpLine%AREA_AIR(AirPumpLine%NO_PIPINGS_AIRPLINE), &
  30. AirPumpLine%LENGT_AIR(AirPumpLine%NO_PIPINGS_AIRPLINE),AirPumpLine%ROUGHNESS_AIRPLINE(AirPumpLine%NO_PIPINGS_AIRPLINE),AirPumpLine%REL_ROUGHAIR(AirPumpLine%NO_PIPINGS_AIRPLINE), &
  31. AirPumpLine%fric_air(AirPumpLine%NO_PIPINGS_AIRPLINE),AirPumpLine%fricloss_air(AirPumpLine%NO_PIPINGS_AIRPLINE))
  32. DO I=1,AirPumpLine%NO_PIPINGS_AIRPLINE
  33. AirPumpLine%DIAM_AIR_INCH(I)=AirPumpLine%PIPINGS_AIRPUMP(I,1)
  34. AirPumpLine%LENGT_AIR(I)=AirPumpLine%PIPINGS_AIRPUMP(I,2)
  35. AirPumpLine%ROUGHNESS_AIRPLINE(I)=AirPumpLine%PIPINGS_AIRPUMP(I,3)
  36. AirPumpLine%AREA_AIR(I)=PI*(AirPumpLine%DIAM_AIR_INCH(I)*0.0254)**2/4 !D(in), AREA(m)
  37. AirPumpLine%REL_ROUGHAIR(I)=AirPumpLine%ROUGHNESS_AIRPLINE(I)/(AirPumpLine%DIAM_AIR_INCH(I)*25.4)
  38. !DIAM_RAMLINE_MM(I)=DIAM_RAMLINE_MM(I)*.001 ! (m)
  39. AirPumpLine%LENGT_AIR(I)=AirPumpLine%LENGT_AIR(I)*.001 ! (m)
  40. ENDDO
  41. !================================================================
  42. AirPumpLine%NO_MINORS_AIRPLINE=6
  43. ALLOCATE (AirPumpLine%MINORS_AIRPUMP(AirPumpLine%NO_MINORS_AIRPLINE,4))
  44. ! ID(INCH) LF CV NOTE(BAR) DESCRIPTION
  45. AirPumpLine%MINORS_AIRPUMP(1,1:4)= (/2., 10., 0., 0./) !Acc.tee
  46. AirPumpLine%MINORS_AIRPUMP(2,1:4)= (/2., 11., 0., 0./) !elbow
  47. AirPumpLine%MINORS_AIRPUMP(3,1:4)= (/1., 0., 0., 3.4/) !filter
  48. AirPumpLine%MINORS_AIRPUMP(4,1:4)= (/2., 0., 105., 0./) !valve
  49. AirPumpLine%MINORS_AIRPUMP(5,1:4)= (/1., 0., 9.2, 0./) !valve
  50. AirPumpLine%MINORS_AIRPUMP(6,1:4)= (/2., 6.4, 0., 0./) !unionA
  51. ALLOCATE (AirPumpLine%MINORDIAM_AIR_INCH(AirPumpLine%NO_MINORS_AIRPLINE),AirPumpLine%MINORAREA_AIR(AirPumpLine%NO_MINORS_AIRPLINE), &
  52. AirPumpLine%LF_AIR(AirPumpLine%NO_MINORS_AIRPLINE),AirPumpLine%CV_AIR(AirPumpLine%NO_MINORS_AIRPLINE),AirPumpLine%NOTE_AIR(AirPumpLine%NO_MINORS_AIRPLINE) &
  53. ,AirPumpLine%minlosspa_air(AirPumpLine%NO_MINORS_AIRPLINE),AirPumpLine%minloss_air(AirPumpLine%NO_MINORS_AIRPLINE))
  54. DO I=1,AirPumpLine%NO_MINORS_AIRPLINE
  55. AirPumpLine%MINORDIAM_AIR_INCH(I)=AirPumpLine%MINORS_AIRPUMP(I,1)
  56. AirPumpLine%LF_AIR(I)=AirPumpLine%MINORS_AIRPUMP(I,2)
  57. AirPumpLine%CV_AIR(I)=AirPumpLine%MINORS_AIRPUMP(I,3)
  58. AirPumpLine%NOTE_AIR(I)=AirPumpLine%MINORS_AIRPUMP(I,4)
  59. AirPumpLine%MINORAREA_AIR(I)=PI*(AirPumpLine%MINORDIAM_AIR_INCH(I)*0.0254)**2/4. !D(in), AREA(m)
  60. ENDDO
  61. END
  62. SUBROUTINE PIPE_RAMS_CHOKE(CHNUMBER)
  63. USE CHOKEVARIABLES
  64. Use CSimulationVariables
  65. implicit none
  66. INTEGER CHNUMBER
  67. Integer I
  68. loop3: do while (ABS(ChokeControlPanel%ChokeControlLever)==1.0 .AND. ChokeControlPanel%ChokePanelRigAirSwitch == 1 .AND. CHOOKE(CHNUMBER)%FailMalf==0 .AND. AirDrivenPump%ChokeAirFail==0)
  69. if (ChokeControlPanel%ChokeControlLever == 1.0) then
  70. CHOOKE(CHNUMBER)%ChokeIsClosing = .true.
  71. CHOOKE(CHNUMBER)%ChokeIsOpening = .false.
  72. endif
  73. if (ChokeControlPanel%ChokeControlLever == -1.0) then
  74. CHOOKE(CHNUMBER)%ChokeIsOpening = .true.
  75. CHOOKE(CHNUMBER)%ChokeIsClosing = .false.
  76. endif
  77. AirPumpLine%TIME=AirPumpLine%TIME+AirPumpLine%DeltaT_Choke !overal time (s)
  78. !====================================================
  79. ! ********************************
  80. call airpump_code_CHOKE(CHNUMBER)
  81. ! *************************
  82. !====================================================
  83. call sleepqq(100)
  84. if (IsStopped == .true.) return
  85. end do loop3 !while finished_Choke==0
  86. end
  87. SUBROUTINE airpump_code_CHOKE(CHNUMBER)
  88. USE CHOKEVARIABLES
  89. USE CChokeManifoldVariables
  90. use CSounds
  91. USE CChokeProblemsVariables
  92. implicit none
  93. Integer I
  94. INTEGER CHNUMBER
  95. AirDrivenPump%QAIR_PUMP=AirPumpLine%QITER+.1 !(gpm) maximum flow for the start
  96. AirPumpLine%diffp_air=-10
  97. AirPumpLine%losses_air=10
  98. !===================================================================
  99. ! AIR OPERATED PUMP
  100. ! MODEL 10-6000W030 RATIO 55:1
  101. !=================for air consumption at 100 psig===================
  102. do while (AirPumpLine%diffp_air<0)
  103. AirDrivenPump%QAIR_PUMP=AirDrivenPump%QAIR_PUMP-.1
  104. ! Qup=AirDrivenPump%QAIR_PUMP;
  105. !cc1 = 1354; cc2 = -2066; cc3 = -2109; cc4 = -513.6; cc5 = 5935 FOR OUTPUT IN GPM
  106. AirPumpLine%P_AIRP=AirDrivenPump%cc1*(AirDrivenPump%QAIR_PUMP**4) + AirDrivenPump%cc2*(AirDrivenPump%QAIR_PUMP**3) + AirDrivenPump%cc3*(AirDrivenPump%QAIR_PUMP**2) + AirDrivenPump%cc4*AirDrivenPump%QAIR_PUMP + AirDrivenPump%cc5 !(psig)
  107. ! kinetic_air=sg*wdens*(QAIR_PUMP*6.30902e-5/((1/4.)*pi*(2*0.254e-1)**2))**2/(2*6895) !(psi)
  108. AirPumpLine%diffp_air= AirPumpLine%P_AIRP - AirPumpLine%Pdownstrem
  109. end do !returns Qup
  110. do while (abs((AirPumpLine%diffp_air-AirPumpLine%losses_air)/AirPumpLine%diffp_air)>AirPumpLine%TOL_AIR) !finding correct QAIR_pump for 1 timecounter_ram
  111. if (AirPumpLine%diffp_air-AirPumpLine%losses_air>0) then
  112. AirDrivenPump%QAIR_PUMP=AirDrivenPump%QAIR_PUMP+.005
  113. else
  114. AirDrivenPump%QAIR_PUMP=AirDrivenPump%QAIR_PUMP-.005
  115. endif
  116. !===================================================================
  117. ! AIR OPERATED PUMP
  118. ! MODEL 10-6000W030 RATIO 55:1
  119. !=================for air consumption at 100 psig===================
  120. AirPumpLine%P_AIRP=AirDrivenPump%cc1*(AirDrivenPump%QAIR_PUMP**4) + AirDrivenPump%cc2*(AirDrivenPump%QAIR_PUMP**3) + AirDrivenPump%cc3*(AirDrivenPump%QAIR_PUMP**2) + AirDrivenPump%cc4*AirDrivenPump%QAIR_PUMP + AirDrivenPump%cc5 !(psig)
  121. !kinetic_air=sg*wdens*(QAIR_PUMP*6.30902e-005/((1/4.)*pi*(2*0.254e-1)**2))**2/(2*6895) !(psi)
  122. AirPumpLine%diffp_air= AirPumpLine%P_AIRP - AirPumpLine%Pdownstrem
  123. !===========================LOSSES====================================
  124. do i=1,AirPumpLine%NO_PIPINGS_AIRPLINE
  125. AirPumpLine%Re_air(i)=AirDrivenPump%QAIR_PUMP*6.30902e-005*AirPumpLine%DIAM_AIR_INCH(I)*0.0254/(AirPumpLine%AREA_AIR(i)*nu)
  126. enddo
  127. do i=1,AirPumpLine%NO_PIPINGS_AIRPLINE
  128. if (AirPumpLine%Re_air(i)<Re_cr) then
  129. AirPumpLine%fric_air(i)=64/AirPumpLine%Re_air(i)
  130. else
  131. AirPumpLine%fric_air(i)=1/(-1.8*log10((AirPumpLine%REL_ROUGHAIR(i)/3.7)**1.11+6.9/AirPumpLine%Re_air(i)))**2
  132. endif
  133. AirPumpLine%fricloss_air(i)=((AirPumpLine%fric_air(i)*(wdens*sg*AirPumpLine%LENGT_AIR(i)*(AirDrivenPump%QAIR_PUMP*6.30902e-005/AirPumpLine%AREA_AIR(i))**2))/(2*AirPumpLine%DIAM_AIR_INCH(I)*0.0254))/6895
  134. enddo
  135. AirPumpLine%pipe_loss1air=sum(AirPumpLine%fricloss_air) !loss before regulator(psi)
  136. do i=1,AirPumpLine%NO_MINORS_AIRPLINE
  137. if (AirPumpLine%LF_AIR(i)/=0) then
  138. AirPumpLine%minlosspa_air(i)=AirPumpLine%LF_AIR(i)*wdens*sg*(AirDrivenPump%QAIR_PUMP*6.30902e-005/AirPumpLine%MINORAREA_AIR(i))**2/2 !(Pa)
  139. AirPumpLine%minloss_air(i)=AirPumpLine%minlosspa_air(i)/6895 !(psi)
  140. elseif (AirPumpLine%CV_AIR(i)/=0) then
  141. AirPumpLine%minlosspa_air(i)=1000*sg*((11.7*AirDrivenPump%QAIR_PUMP*6.30902e-005*3600)/(AirPumpLine%CV_AIR(i)))**2 !(pa)
  142. AirPumpLine%minloss_air(i)=AirPumpLine%minlosspa_air(i)/6895 !(psi)
  143. else
  144. AirPumpLine%minlosspa_air(i)=AirPumpLine%NOTE_AIR(i)*1e5 !(pa)
  145. AirPumpLine%minloss_air(i)=AirPumpLine%minlosspa_air(i)/6895 !(psi)
  146. endif
  147. enddo
  148. AirPumpLine%minor_loss1air=sum(AirPumpLine%minloss_air) !loss before regulator(psi)
  149. AirPumpLine%static_loss1air=0
  150. AirPumpLine%losses_air=AirPumpLine%pipe_loss1air+AirPumpLine%minor_loss1air+AirPumpLine%static_loss1air !(psi)
  151. !=========================================================================
  152. end do !returns correct QAIR_PUMP for 1 counter
  153. AirPumpLine%QITER=AirDrivenPump%QAIR_PUMP
  154. AirDrivenPump%QAIR_PUMP=AirDrivenPump%QAIR_PUMP*(ChokeControlPanel%ChokeRateControlKnob/10.) ! final Q (gpm)
  155. Choke%Cumulative_AirVolume_Choke= Choke%Cumulative_AirVolume_Choke + ((AirDrivenPump%QAIR_PUMP * AirPumpLine%DeltaT_Choke / 60.0 ) / (1.5*0.004329004) ) ! =strokes
  156. if ( Choke%Cumulative_AirVolume_Choke > 1.0 ) then
  157. Choke%SoundChokePump= 60
  158. Choke%Cumulative_AirVolume_Choke= Choke%Cumulative_AirVolume_Choke - 1.0
  159. else
  160. Choke%SoundChokePump= 0.0
  161. endif
  162. !SoundChokePump= int (QAIR_PUMP/ (1.5*0.004329004)*DeltaT_Choke/60.0) ! 1.5: Volume per stroke (in^3) , 0.004329004: in^3 to gal , 60:seconds
  163. AirPumpLine%DELTAV_AIR=AirDrivenPump%QAIR_PUMP*AirPumpLine%DeltaT_Choke/60 !(galon) delta_t=1sec , Q(gpm)
  164. if (CHOOKE(CHNUMBER)%ChokeIsClosing) CHOOKE(CHNUMBER)%PassedCourse=CHOOKE(CHNUMBER)%PassedCourse + (AirPumpLine%DELTAV_AIR*3785.412/AirPumpLine%Acylinder)!*(ChokeRateControlKnob/10.) ! 3785.412 : GALON TO CM^3
  165. if (CHOOKE(CHNUMBER)%ChokeIsOpening) CHOOKE(CHNUMBER)%PassedCourse=CHOOKE(CHNUMBER)%PassedCourse - (AirPumpLine%DELTAV_AIR*3785.412/AirPumpLine%Acylinder)!*(ChokeRateControlKnob/10.)
  166. !DeltaT_Choke= 1sec or 2sec
  167. !((((((((IN OUTER LOOP))))))
  168. !===============AIR PUMP OUTPUTS=========================
  169. AirPumpLine%alpha_timeair=AirPumpLine%TIME ! overal time (s)
  170. AirPumpLine%alpha_Pdownstrem=AirPumpLine%Pdownstrem
  171. AirPumpLine%alpha_pairp=AirPumpLine%P_AIRP
  172. AirPumpLine%alpha_Qair=AirDrivenPump%QAIR_PUMP
  173. !write(*,*) 'diffp_air=',diffp_air
  174. !pause
  175. AirPumpLine%alpha_diffpair=AirPumpLine%diffp_air
  176. AirPumpLine%alpha_lossesair=AirPumpLine%losses_air
  177. !========================================================
  178. !OPEN(150,FILE='CHOKE_AIRPUMP_OUTPUTS.DAT')
  179. if (CHOOKE(CHNUMBER)%ChokeIsClosing .AND. CHOOKE(CHNUMBER)%PassedCourse>AirPumpLine%CourseBase) then
  180. CHOOKE(CHNUMBER)%PassedCourse=AirPumpLine%CourseBase
  181. Choke%SoundChokePump= 0.0
  182. endif
  183. if (CHOOKE(CHNUMBER)%ChokeIsOpening .AND. CHOOKE(CHNUMBER)%PassedCourse<0.) then
  184. CHOOKE(CHNUMBER)%PassedCourse=0.
  185. Choke%SoundChokePump= 0.0
  186. endif
  187. call SetSoundChokePump(Choke%SoundChokePump)
  188. CHOOKE(CHNUMBER)%PercentClose= CHOOKE(CHNUMBER)%PassedCourse/AirPumpLine%CourseBase
  189. IF (ChokeControlPanel%Choke1LED==1) THEN
  190. ChokeControlPanel%ChokePosition= (1 - Choke%GaugeChokePositionMailf) * CHOOKE(1)%PercentClose*10
  191. ELSE ! Choke2LED==1
  192. ChokeControlPanel%ChokePosition= (1 - Choke%GaugeChokePositionMailf) * CHOOKE(2)%PercentClose*10
  193. ENDIF
  194. !CALL SetHydraulicChock1(nint(MIN(CHOOKE(1)%PercentClose / 0.91 , 1.0)*100))
  195. ! CALL SetHydraulicChock2(nint(MIN(CHOOKE(2)%PercentClose / 0.91 , 1.0)*100))
  196. ! .91 >> 9 percent clearance
  197. ! =================== calculating Area
  198. ! AreaChoke=0.5
  199. ! .91 >> 9 percent clearance
  200. CHOOKE(1)%AreaChoke=0.01334635-(0.01334635* MIN(CHOOKE(1)%PercentClose / 0.91 , 1.0)) !ft^2 0.01334635 is ChokeAreaFullyOpen (ft^2)
  201. CHOOKE(2)%AreaChoke=0.01334635-(0.01334635* MIN(CHOOKE(2)%PercentClose/ 0.91 , 1.0)) !ft^2
  202. !write(*,*) 'CHOOKE(1)%AreaChoke= ' , CHOOKE(1)%AreaChoke
  203. Choke%HydraulicChoke1WashoutCoef= Choke%HydraulicChoke1WashoutCoef * CHOOKE(1)%WashoutMalf
  204. Choke%HydraulicChoke1WashoutCoef= MIN( 0.5 , Choke%HydraulicChoke1WashoutCoef+ CHOOKE(1)%WashoutMalf*(0.5/(60.0/AirPumpLine%DeltaT_Choke)) ) ! 0.5=maximum washout coef , 60.0 sec= 1min duration time
  205. Choke%HydraulicChoke2WashoutCoef= Choke%HydraulicChoke2WashoutCoef * CHOOKE(2)%WashoutMalf
  206. Choke%HydraulicChoke2WashoutCoef= MIN( 0.5 , Choke%HydraulicChoke2WashoutCoef+ CHOOKE(2)%WashoutMalf*(0.5/(60.0/AirPumpLine%DeltaT_Choke)) ) ! 0.5=maximum washout coef , 60.0 sec= 1min duration time
  207. !write(*,*) 'HydraulicChoke1WashoutCoef=' , HydraulicChoke1WashoutCoef
  208. IF (CHOOKE(1)%PlugMalf == 1) THEN
  209. Choke%Present_HydraulicChoke1Plug= Choke%Present_HydraulicChoke1Plug * CHOOKE(1)%PlugMalf
  210. ! integer: HydraulicChoke1PluggedPercent,HydraulicChoke1PluggedPercent_Old,PlugTimeCounter,ChokePlugTimeDelay
  211. ! real: Present_HydraulicChoke1Plug,DeltaPlug1Percent
  212. !write(*,*) 'HydraulicChoke1PluggedPercent=' , HydraulicChoke1PluggedPercent
  213. if ( (ChokeProblems%HydraulicChoke1PluggedPercent - Choke%HydraulicChoke1PluggedPercent_Old) /= 0) then
  214. Choke%DeltaPlug1Percent = (REAL(ChokeProblems%HydraulicChoke1PluggedPercent)/100.) - Choke%Present_HydraulicChoke1Plug
  215. Choke%Plug1TimeCounter = 0
  216. !write(*,*) 'DeltaPlug1Percent, Present_HydraulicChoke1Plug = ' ,DeltaPlug1Percent , Present_HydraulicChoke1Plug
  217. endif
  218. Choke%Plug1TimeCounter= Choke%Plug1TimeCounter + 1
  219. Choke%HydraulicChoke1PluggedPercent_Old= ChokeProblems%HydraulicChoke1PluggedPercent
  220. if (Choke%Plug1TimeCounter <= Choke%ChokePlugTimeDelay) then !ChokePlugTimeDelay=600
  221. Choke%Present_HydraulicChoke1Plug = Choke%Present_HydraulicChoke1Plug + CHOOKE(1)%PlugMalf* ((Choke%DeltaPlug1Percent / real(Choke%ChokePlugTimeDelay))) ! real(ChokePlugTimeDelay)= 600.0
  222. endif
  223. !write(*,*) 'Present_HydraulicChoke1Plug=' , Present_HydraulicChoke1Plug
  224. ENDIF
  225. IF (CHOOKE(2)%PlugMalf == 1) THEN
  226. Choke%Present_HydraulicChoke2Plug= Choke%Present_HydraulicChoke2Plug * CHOOKE(2)%PlugMalf
  227. ! integer: HydraulicChoke2PluggedPercent,HydraulicChoke2PluggedPercent_Old,PlugTimeCounter,ChokePlugTimeDelay
  228. ! real: Present_HydraulicChoke2Plug,DeltaPlug2Percent
  229. if ( (ChokeProblems%HydraulicChoke2PluggedPercent - Choke%HydraulicChoke2PluggedPercent_Old) /= 0 ) then
  230. Choke%DeltaPlug2Percent = (REAL(ChokeProblems%HydraulicChoke2PluggedPercent)/100.) - Choke%Present_HydraulicChoke2Plug
  231. Choke%Plug2TimeCounter = 0
  232. endif
  233. Choke%Plug2TimeCounter= Choke%Plug2TimeCounter + 1
  234. Choke%HydraulicChoke2PluggedPercent_Old= ChokeProblems%HydraulicChoke2PluggedPercent
  235. if (Choke%Plug2TimeCounter <= Choke%ChokePlugTimeDelay) then !ChokePlugTimeDelay=600
  236. Choke%Present_HydraulicChoke2Plug = Choke%Present_HydraulicChoke2Plug + CHOOKE(2)%PlugMalf *((Choke%DeltaPlug2Percent / real(Choke%ChokePlugTimeDelay))) ! real(ChokePlugTimeDelay)= 600.0
  237. endif
  238. ENDIF
  239. ! fully open area is 123/64 in^2 = 0.01334635 ft^2
  240. CHOOKE(1)%AreaChoke=CHOOKE(1)%AreaChoke+(CHOOKE(1)%WashoutMalf*Choke%HydraulicChoke1WashoutCoef*Choke%ChokeAreaFullyOpen/144.0) ! Initialised in Choke Startup
  241. !write(*,*) 'CHOOKE(1)%WashoutMalf , CHOOKE(1)%AreaChoke=' ,CHOOKE(1)%WashoutMalf , CHOOKE(1)%AreaChoke
  242. CHOOKE(1)%AreaChoke=CHOOKE(1)%AreaChoke-(CHOOKE(1)%PlugMalf* Choke%Present_HydraulicChoke1Plug *CHOOKE(1)%AreaChoke) ! Initialised in Choke Startup
  243. CHOOKE(2)%AreaChoke=CHOOKE(2)%AreaChoke+(CHOOKE(2)%WashoutMalf*Choke%HydraulicChoke2WashoutCoef*Choke%ChokeAreaFullyOpen/144.0) ! Initialised in Choke Startup
  244. CHOOKE(2)%AreaChoke=CHOOKE(2)%AreaChoke-(CHOOKE(2)%PlugMalf* Choke%Present_HydraulicChoke2Plug *CHOOKE(2)%AreaChoke) ! Initialised in Choke Startup
  245. !write(*,*) 'CHOOKE(2)%WashoutMalf , CHOOKE(2)%AreaChoke=' ,CHOOKE(2)%WashoutMalf , CHOOKE(2)%AreaChoke
  246. CHOOKE(1)%AreaChokeFinal= CHOOKE(1)%AreaChoke
  247. CHOOKE(2)%AreaChokeFinal= CHOOKE(2)%AreaChoke
  248. ! 144: ft^2 to in^2
  249. CALL SetHydraulicChock1(100 - nint((CHOOKE(1)%AreaChokeFinal/(Choke%ChokeAreaFullyOpen/144.))*100)) ! for manifold valve
  250. CALL SetHydraulicChock2(100 - nint((CHOOKE(2)%AreaChokeFinal/(Choke%ChokeAreaFullyOpen/144.))*100)) ! for manifold valve
  251. !write(*,*) 'CHOOKE(1)%PercentClose=' , CHOOKE(1)%PercentClose ! close percent 0 to 100
  252. !write(*,*) 'ChokePosition=' , ChokePosition ! close position 0 to 10 for display
  253. !write(*,*) 'CHOOKE(1)%AreaChokeFinal=' , CHOOKE(1)%AreaChokeFinal ! Open Area (in^2) with clearance
  254. !write(*,*) '(ChokeAreaFullyOpen/144.)=' , (ChokeAreaFullyOpen/144.)
  255. !write(*,*) 'valve value=' , 100 - nint((CHOOKE(1)%AreaChokeFinal/(ChokeAreaFullyOpen/144.))*100) ! percent close 0 to 100 with clearance
  256. !write(*,*) 'Valve(33)%Status=' , Valve(33)%Status ! T : open , F: close
  257. ! =================== calculating Area
  258. !write(*,*) 'CHOOKE(1)%AreaChoke= ' , CHOOKE(1)%AreaChoke
  259. ! WRITE(150,50) alpha_timeair,alpha_Qair,alpha_pairp, &
  260. ! alpha_Pdownstrem,alpha_diffpair,alpha_lossesair,CHOOKE(CHNUMBER)%PassedCourse
  261. !50 FORMAT(7(f15.5))
  262. !========================================================================================
  263. !========================================================================================
  264. ! write(*,*) PassedCourse
  265. end