Simulation Core
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

79 wiersze
3.4 KiB

  1. # 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/RotaryTable/RTable_Inputs.f90"
  2. subroutine RTable_INPUTS
  3. use CDrillingConsoleVariables
  4. use SimulationVariables
  5. ! use CSimulationVariables
  6. use UnitySignalsModule
  7. ! use CTdsElevatorModesEnumVariables
  8. use CHoistingVariables
  9. use TD_DrillStemComponents
  10. use UnityModule
  11. use CWarnings
  12. use UnitySignalVariables
  13. use UnitySignalsModule
  14. IMPLICIT NONE
  15. integer :: i
  16. data%State%RTable%AssignmentSwitch = data%Equipments%DrillingConsole%AssignmentSwitch
  17. data%State%RTable%Switch = data%Equipments%DrillingConsole%RTSwitch
  18. !data%State%RTable%GearsAbuse = RotaryGearsAbuse
  19. data%State%RTable%Throttle = data%Equipments%DrillingConsole%RTThrottle ![RPM]
  20. data%State%RTable%String_Torque = data%State%TD_String%StringTorque*12.d0 ![lb.ft]*12 ---> [lb.in] ?????????
  21. !data%State%RTable%RpmGaugeMalf !:dar module haye C meghdardehi mishe
  22. data%State%RTable%N_new = data%State%RTable%Throttle
  23. if ( data%State%RTable%MotorFaileMalf==1 ) then
  24. data%State%RTable%N_new = 0.d0
  25. end if
  26. data%State%RTable%String_Torque = 0.112984d0*data%State%RTable%String_Torque ![N.m]
  27. !===> String_JCoef Calculation
  28. if ( data%Configuration%Hoisting%DriveType==0 ) then
  29. if ( Get_TdsConnectionModes()==TDS_CONNECTION_NOTHING .and. Get_TdsElevatorModes()==TDS_ELEVATOR_CONNECTION_NOTHING ) then
  30. data%State%RTable%RotaryMode = 1
  31. data%State%RTable%String_JCoef = 0.d0
  32. Do i = 1,data%State%TD_String%StringConfigurationCount
  33. data%State%RTable%String_JCoef = data%State%RTable%String_JCoef+( (data%State%TD_DrillStem(i)%TotalWeight*((data%State%TD_DrillStem(i)%Id**2.d0)+(data%State%TD_DrillStem(i)%Od**2.d0)))/8.d0 ) ![lb.ft^2] , Jz=(1/2)*m*(r1^2+r2^2)
  34. End Do
  35. data%State%RTable%String_JCoef = data%State%RTable%String_JCoef*0.0421401d0 ![kg.m^2]
  36. else if ( Get_Slips() /= SLIPS_SET_END ) then
  37. data%State%RTable%RotaryMode = 2
  38. data%State%RTable%String_JCoef = 0.d0
  39. data%State%RTable%String_Torque = 0.d0
  40. else
  41. data%State%RTable%RotaryMode = 3
  42. data%State%RTable%String_JCoef = 0.d0
  43. data%State%RTable%String_Torque = 0.d0
  44. end if
  45. else if ( data%Configuration%Hoisting%DriveType==1 ) then
  46. if ( Get_IsKellyBushingSetInTable() .or. Get_Slips() == SLIPS_SET_END ) then !if rotary connected to string
  47. data%State%RTable%RotaryMode = 4
  48. data%State%RTable%String_JCoef = 0.d0
  49. Do i = 1,data%State%TD_String%StringConfigurationCount
  50. data%State%RTable%String_JCoef = data%State%RTable%String_JCoef+( (data%State%TD_DrillStem(i)%TotalWeight*((data%State%TD_DrillStem(i)%Id**2.d0)+(data%State%TD_DrillStem(i)%Od**2.d0)))/8.d0 ) ![lb.ft^2] , Jz=(1/2)*m*(r1^2+r2^2)
  51. End Do
  52. data%State%RTable%String_JCoef = data%State%RTable%String_JCoef*0.0421401e0 ![kg.m^2]
  53. else
  54. data%State%RTable%RotaryMode = 5
  55. data%State%RTable%String_JCoef = 0.d0
  56. data%State%RTable%String_Torque = 0.d0
  57. end if
  58. end if
  59. !===> Transmission Mode
  60. data%State%RTable%Conv_Ratio = data%State%RTable%High_Conv_Ratio
  61. end subroutine RTable_INPUTS