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.

pump_diff_eqs.f90 2.8 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. subroutine Pump_dia(x1,x2,x3,x5,x6,Pump_No)
  2. use Pump_VARIABLES
  3. use equipments_PowerLimit
  4. IMPLICIT NONE
  5. INTEGER :: Pump_No
  6. REAL :: x1,x2,x3,x4,x5,x6
  7. !Power_sigma=2.*(PUMP(1)%Vt*PUMP(1)%ia_new)+2.*(PUMP(2)%Vt*PUMP(2)%ia_new)+2.*(PUMP(3)%Vt*PUMP(3)%ia_new)+(RTable%Vt*RTable%ia_new)+2.*(Drawworks%Vt*Drawworks%ia_new)
  8. PUMP(Pump_No)%Vt = PUMP(Pump_No)%x_new+Kpi*((Kpn*((30.*PUMP(Pump_No)%w_ref/pi)-(30.*PUMP(Pump_No)%w_new/pi)))+20.d0-PUMP(Pump_No)%ia_new)
  9. IF (PUMP(Pump_No)%Vt>810.) THEN
  10. PUMP(Pump_No)%Vt = 810.0
  11. ELSE IF (PUMP(Pump_No)%Vt<0.) THEN
  12. PUMP(Pump_No)%Vt = 0.0d0
  13. END IF
  14. !call PowerLimits
  15. !
  16. !if (Power_sigma>max_Power_sigma) then
  17. ! PUMP(Pump_No)%Vt=PUMP(Pump_No)%Vt_old
  18. !else
  19. ! PUMP(Pump_No)%Vt=x6+Kpi*(Kpn*((30.*PUMP(Pump_No)%w_ref/pi)-(30.*x3/pi))-x2)
  20. ! IF (PUMP(Pump_No)%Vt>810.) THEN
  21. ! PUMP(Pump_No)%Vt=810.
  22. !ELSE IF (PUMP(Pump_No)%Vt<0.) THEN
  23. ! PUMP(Pump_No)%Vt=0.
  24. !END IF
  25. ! PUMP(Pump_No)%Vt_old=PUMP(Pump_No)%x_new+Kpi*(Kpn*((30.*PUMP(Pump_No)%w_ref/pi)-(30.*PUMP(Pump_No)%w_new/pi))-PUMP(Pump_No)%ia_new)
  26. ! IF (PUMP(Pump_No)%Vt_old>810.) THEN
  27. ! PUMP(Pump_No)%Vt_old=810.
  28. !ELSE IF (PUMP(Pump_No)%Vt_old<0.) THEN
  29. ! PUMP(Pump_No)%Vt_old=0.
  30. !END IF
  31. !end if
  32. !IF (PUMP(Pump_No)%Vt>810.) THEN
  33. ! PUMP(Pump_No)%Vt=810.
  34. !ELSE IF (PUMP(Pump_No)%Vt<0.) THEN
  35. ! PUMP(Pump_No)%Vt=0.
  36. !END IF
  37. !PUMP(Pump_No)%Vt_old=PUMP(Pump_No)%Vt
  38. !IF (x2<=1150.) THEN
  39. ! x5 = 6.3304d-3*x2
  40. !ELSE IF (x2>1150.) THEN
  41. ! x5 = 2.8571d-7*(x2-1150.)+7.28
  42. !END IF
  43. x5 = 6.3304d-3*1150.0
  44. PUMP(Pump_No)%Ea = x5*x3
  45. PUMP(Pump_No)%dia = (PUMP(Pump_No)%Vt-(Ra+Rf)*x2-PUMP(Pump_No)%Ea)/(La+Lf)
  46. end subroutine
  47. !------------------------------------------------------------
  48. subroutine Pump_dw(x1,x2,x3,x4,x5,Pump_No)
  49. use Pump_VARIABLES
  50. IMPLICIT NONE
  51. INTEGER :: Pump_No
  52. REAL :: x1,x2,x3,x4,x5
  53. !IF (x2<=1150.) THEN
  54. ! x4 = 6.3304d-3*x2
  55. !ELSE IF (x2>1150.) THEN
  56. ! x4 = 2.8571d-7*(x2-1150.)+7.28
  57. !END IF
  58. x4 = 6.3304d-3*1150.0
  59. PUMP(Pump_No)%Te = x4*x2
  60. PUMP(Pump_No)%dw = (PUMP(Pump_No)%Te-x5)/PUMP(Pump_No)%J_coef
  61. end subroutine
  62. !------------------------------------------------------------
  63. subroutine Pump_dx(x1,x2,x3,x4,Pump_No)
  64. use Pump_VARIABLES
  65. IMPLICIT NONE
  66. INTEGER :: Pump_No
  67. REAL :: x1,x2,x3,x4
  68. PUMP(Pump_No)%dx = Kii*((Kpn*((30.*PUMP(Pump_No)%w_ref/pi)-(30.*x3/pi)))+20.d0-x2)
  69. end subroutine