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.
 
 
 
 
 
 

46 lines
2.9 KiB

  1. subroutine Pump_OffMode_Solver(Pump_No)
  2. use SimulationVariables
  3. IMPLICIT NONE
  4. INTEGER :: Pump_No
  5. data%State%Pump(Pump_No)%N_new = 0.d0
  6. !========================== Pump Rate limit ==========================
  7. if (((data%State%Pump(Pump_No)%N_new-data%State%Pump(Pump_No)%N_old)/data%State%Pump(Pump_No)%time_step)>data%State%Pump(Pump_No)%RateChange) then
  8. data%State%Pump(Pump_No)%Speed =(data%State%Pump(Pump_No)%RateChange*data%State%Pump(Pump_No)%time_step)+data%State%Pump(Pump_No)%N_old
  9. else if (((data%State%Pump(Pump_No)%N_old-data%State%Pump(Pump_No)%N_new)/data%State%Pump(Pump_No)%time_step)>data%State%Pump(Pump_No)%RateChange) then
  10. data%State%Pump(Pump_No)%Speed = (-data%State%Pump(Pump_No)%RateChange*data%State%Pump(Pump_No)%time_step)+data%State%Pump(Pump_No)%N_old
  11. else
  12. data%State%Pump(Pump_No)%Speed = data%State%Pump(Pump_No)%N_new
  13. end if
  14. !=======================================================================
  15. 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]
  16. 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]
  17. !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]
  18. 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)
  19. if ( data%State%Pump(Pump_No)%StandPipe_Pressure>data%State%Pump(Pump_No)%Max_Pressure ) then ! in shart check shavad
  20. !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
  21. 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]
  22. 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]
  23. end if
  24. data%State%Pump(Pump_No)%SoundSPM = INT(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio)
  25. If (data%State%Pump(Pump_No)%Flow_Rate>0.d0) Then
  26. data%State%Pump(Pump_No)%Open_Close = 1
  27. Else
  28. data%State%Pump(Pump_No)%Open_Close = 0
  29. End if
  30. end subroutine Pump_OffMode_Solver