Simulation Core
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

128 řádky
5.8 KiB

  1. subroutine RTable_Solver
  2. use CDrillingConsoleVariables
  3. use CDataDisplayConsoleVariables
  4. use CSimulationVariables
  5. use CDrillWatchVariables
  6. use RTable_VARIABLES
  7. use CSounds
  8. use equipments_PowerLimit
  9. IMPLICIT NONE
  10. REAL :: const , RT_RpmGaugeOutput
  11. !RTable%TracTorque = RTable%String_Torque/RTable%Conv_Ratio/RTable%Mech_Efficiency
  12. RT_wOld = RTable%w_new/RTable%Conv_Ratio
  13. CALL RTable_Traction_Motor
  14. if (RTable%N_ref<=0.) then
  15. Call RTable_OffMode
  16. end if
  17. !IF (RTable%ia_new<=1150.) THEN
  18. RTable%fii = 6.3304d-3*1150.
  19. !ELSE IF (RTable%ia_new>1150.) THEN
  20. ! RTable%fii = 2.8571d-7*(RTable%ia_new-1150.)+7.28
  21. !END IF
  22. RTable%Te = RTable%fii*RTable%ia_new
  23. const = RTable%J_coef+(RTable%String_JCoef/(RTable%Mech_Efficiency*RTable%Conv_Ratio))
  24. RTable%dw = (RTable%Te-RTable%TL)/(const)
  25. if ( any(RT_RotaryMode==(/1,4/)) ) then !if rotary connected to string
  26. RT_RpmGaugeOutput = (30.d0*RTable%w_new/pi)/RTable%Conv_Ratio
  27. RTable%Speed = min(RT_RpmGaugeOutput,200.d0) !Speed [RPM]
  28. Call Set_RotaryRPMGauge(sngl(1-RTable%RpmGaugeMalf)*real(RTable%Speed,8))
  29. RTable%SoundRPM = INT(RTable%Speed)
  30. Call SetSoundRT( RTable%SoundRPM )
  31. !RotaryRPMGauge = RTable%Speed
  32. !RPM = RotaryRPMGauge
  33. RotaryTorqueGauge = ( ((RTable%J_coef+RTable%String_JCoef)*(((RTable%w_new/RTable%Conv_Ratio)-RT_wOld)/RTable%time_step))+(RTable%String_Torque) )*0.73756215 ![N.m]*0.73756215 = [ft.lbf]
  34. RTable%Torque = ( ((RTable%J_coef+RTable%String_JCoef)*(((RTable%w_new/RTable%Conv_Ratio)-RT_wOld)/RTable%time_step))+(RTable%String_Torque) )*0.73756215 ![N.m]*0.73756215 = [ft.lbf]
  35. Call Set_RotaryTorque(sngl(1-RTable%TorqueGaugeMalf)*real(RTable%Torque,8))
  36. Torque = RotaryTorqueGauge
  37. !print*, 'RTable%Speed=', RTable%Speed
  38. !print*, 'RTable%String_JCoef=', RTable%String_JCoef
  39. !print*, 'RTable%String_Torque=', RTable%String_Torque
  40. else if ( any(RT_RotaryMode==(/2,5/)) ) then
  41. RTable%Speed = 0.0
  42. RT_RpmGaugeOutput = (30.d0*RTable%w_new/pi)/RTable%Conv_Ratio
  43. RT_RpmGaugeOutput = min(RT_RpmGaugeOutput,200.d0)
  44. !print*, 'RT_RpmGaugeOutputif=', RT_RpmGaugeOutput
  45. Call Set_RotaryRPMGauge(sngl(1-RTable%RpmGaugeMalf)*real(RT_RpmGaugeOutput,8))
  46. RTable%SoundRPM = INT((30.d0*RTable%w_new/pi)/RTable%Conv_Ratio)
  47. Call SetSoundRT( RTable%SoundRPM )
  48. RTable%Torque = 0.0
  49. Call Set_RotaryTorque(sngl(1-RTable%TorqueGaugeMalf)*real( (((RTable%J_coef+RTable%String_JCoef)*(((RTable%w_new/RTable%Conv_Ratio)-RT_wOld)/RTable%time_step))+(RTable%String_Torque))*0.73756215,8 ))
  50. !print*, 'RT_Rpmtorqueif=', RTable%Torque , sngl(1-RTable%TorqueGaugeMalf)*real( (((RTable%J_coef+RTable%String_JCoef)*(((RTable%w_new/RTable%Conv_Ratio)-RT_wOld)/RTable%time_step))+(RTable%String_Torque))*0.73756215,8 )
  51. else if ( RT_RotaryMode==3 ) then
  52. RTable%Speed = 0.0
  53. RT_RpmGaugeOutput = 0.d0
  54. Call Set_RotaryRPMGauge(sngl(1-RTable%RpmGaugeMalf)*real(RT_RpmGaugeOutput,8))
  55. RTable%SoundRPM = 0
  56. Call SetSoundRT( RTable%SoundRPM )
  57. RTable%Torque = 0.0
  58. Call Set_RotaryTorque(sngl(1-RTable%TorqueGaugeMalf)*real( 0.d0,8 ))
  59. end if
  60. !if ( RTable%String_JCoef/=0.0 ) then !if rotary connected to string
  61. ! RT_RpmGaugeOutput = (30.d0*RTable%w_new/pi)/RTable%Conv_Ratio
  62. ! RTable%Speed = min(RT_RpmGaugeOutput,200.d0) !Speed [RPM]
  63. ! Call Set_RotaryRPMGauge(real(RTable%Speed,8))
  64. ! RTable%SoundRPM = INT(RTable%Speed)
  65. ! Call SetSoundRT( RTable%SoundRPM )
  66. ! !RotaryRPMGauge = RTable%Speed
  67. ! !RPM = RotaryRPMGauge
  68. ! RotaryTorqueGauge = ( ((RTable%J_coef+RTable%String_JCoef)*(((RTable%w_new/RTable%Conv_Ratio)-RT_wOld)/RTable%time_step))+(RTable%String_Torque) )*0.73756215 ![N.m]*0.73756215 = [ft.lbf]
  69. ! RTable%Torque = ( ((RTable%J_coef+RTable%String_JCoef)*(((RTable%w_new/RTable%Conv_Ratio)-RT_wOld)/RTable%time_step))+(RTable%String_Torque) )*0.73756215 ![N.m]*0.73756215 = [ft.lbf]
  70. ! Call Set_RotaryTorque(real(RTable%Torque,8))
  71. ! Torque = RotaryTorqueGauge
  72. !else
  73. ! RTable%Speed = 0.0
  74. ! RT_RpmGaugeOutput = (30.d0*RTable%w_new/pi)/RTable%Conv_Ratio
  75. ! RT_RpmGaugeOutput = min(RT_RpmGaugeOutput,200.d0)
  76. ! Call Set_RotaryRPMGauge(real(RT_RpmGaugeOutput,8))
  77. ! RTable%SoundRPM = INT((30.d0*RTable%w_new/pi)/RTable%Conv_Ratio)
  78. ! Call SetSoundRT( RTable%SoundRPM )
  79. ! RTable%Torque = 0.0
  80. ! Call Set_RotaryTorque(real( (((RTable%J_coef+RTable%String_JCoef)*(((RTable%w_new/RTable%Conv_Ratio)-RT_wOld)/RTable%time_step))+(RTable%String_Torque))*0.73756215,8 ))
  81. !end if
  82. !******************************************************************
  83. !!!!!RTable%Output_Current = (RTable%TracTorque*RTable%w_new)/RTable%Vt !????????????
  84. !!print*, 'Power_sigma=', Power_sigma
  85. !!print*, 'power_num_of_Jenerators=', power_num_of_Jenerators
  86. !!print*, 'drilling_num_of_Jenerators=', drilling_num_of_Jenerators
  87. !!!print*, 'Jenerator_power=', Jenerator_power
  88. !print*, 'RT_RpmGaugeOutput=', RT_RpmGaugeOutput
  89. !!!print*, 'RTable%Vt=', RTable%Vt
  90. !print*, 'RTable%w=', RTable%w_new
  91. !print*, 'RTable%String_Torque=', RTable%String_Torque
  92. !print*, 'RTable%Speed=', RTable%Speed
  93. !!print*, 'RTable%Speed2=', ((30.*RTable%w_new/pi)/RTable%Conv_Ratio)
  94. !!!!!!!print*, 'RTable%Te=', RTable%Te
  95. !print*, 'RTable%TL=', RTable%TL
  96. !!print*, 'RTable%ia=', RTable%ia_new
  97. !!print*, 'RTable%ia_ref=', RTable%ia_ref
  98. !!print*, 'RTable%ia_ref_limit=', RTable%ia_ref_limit
  99. END subroutine RTable_Solver