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.
 
 
 
 
 
 

33 lines
2.3 KiB

  1. subroutine Pump_OnMode_Solver(Pump_No)
  2. use SimulationVariables
  3. IMPLICIT NONE
  4. INTEGER :: Pump_No
  5. data%State%Pump(Pump_No)%Flow_Rate = data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0*(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio) ![gpm]
  6. data%State%Pump(Pump_No)%Max_FlowRate = data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0*data%State%Pump(Pump_No)%MaxSPM ![gpm]
  7. data%State%Pump(Pump_No)%HorsePower = ((data%State%Pump(Pump_No)%Flow_Rate/0.01d0)*data%State%Pump(Pump_No)%StandPipe_Pressure)/(168067.d0*data%State%Pump(Pump_No)%Mech_Efficiency) ![HHP]
  8. !data%State%Pump(Pump_No)%Max_Horsepower = ((data%State%Pump(Pump_No)%Flow_Rate/0.01d0)*data%State%Pump(Pump_No)%Max_Pressure)/(168067.d0*data%State%Pump(Pump_No)%Mech_Efficiency) ![HHP]
  9. data%State%Pump(Pump_No)%Max_Horsepower = (data%State%Pump(Pump_No)%Flow_Rate*data%State%Pump(Pump_No)%Max_Pressure)/(1714.d0*data%State%Pump(Pump_No)%Mech_Efficiency)
  10. if ( data%State%Pump(Pump_No)%StandPipe_Pressure>data%State%Pump(Pump_No)%Max_Pressure ) then ! in shart check shavad
  11. !if ( (data%State%Pump(Pump_No)%StandPipe_Pressure*data%State%Pump(Pump_No)%Flow_Rate)>(1714.d0*data%State%Pump(Pump_No)%Max_Horsepower*data%State%Pump(Pump_No)%Mech_Efficiency) ) then
  12. data%State%Pump(Pump_No)%Flow_Rate = (1714.d0*data%State%Pump(Pump_No)%Mech_Efficiency*data%State%Pump(Pump_No)%Max_Horsepower)/data%State%Pump(Pump_No)%StandPipe_Pressure ![gpm]
  13. data%State%Pump(Pump_No)%Speed = ( data%State%Pump(Pump_No)%Flow_Rate/(data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0) )*data%State%Pump(Pump_No)%Trans_Ratio ![rpm]
  14. end if
  15. data%State%Pump(Pump_No)%SoundSPM = INT(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio) ![spm]
  16. If (data%State%Pump(Pump_No)%Flow_Rate>0.d0) Then
  17. data%State%Pump(Pump_No)%Open_Close = 1
  18. Else
  19. data%State%Pump(Pump_No)%Open_Close = 0
  20. End if
  21. end subroutine Pump_OnMode_Solver