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.
 
 
 
 
 
 

45 lines
2.0 KiB

  1. subroutine TopDrive_Inputs
  2. ! Use CSimulationVariables
  3. use CTopDrivePanelVariables
  4. use SimulationVariables
  5. use UnitySignalsModule
  6. use SimulationVariables
  7. Use TD_DrillStemComponents
  8. IMPLICIT NONE
  9. integer :: i
  10. data%State%TDS%String_Torque = data%State%TD_String%StringTorque*12.d0 ![lb.ft]*12 ---> [lb.in] ?????????
  11. !data%State%TDS%String_Torque = 20000.
  12. data%State%TDS%String_Torque = 0.112984829d0*data%State%TDS%String_Torque ![N.m]
  13. data%State%TDS%PowerState = data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState
  14. data%State%TDS%RpmKnob = data%EquipmentControl%TopDrivePanel%RpmKnob
  15. !data%State%TDS%MotorFaileMalf ! jayi meghdardehi nashode ??????????????????
  16. data%State%TDS%RateChange = 193.d0 ![RPM/s] motaghayere voroudi ???
  17. data%State%TDS%DrillTorqueState = data%EquipmentControl%TopDrivePanel%TopDriveDrillTorqueState
  18. data%State%TDS%TorqueLimitKnob = data%EquipmentControl%TopDrivePanel%TopDriveTorqueLimitKnob ! bayad hazf shavad??????????????/
  19. !===> data%State%TDS%String_JCoef Calculation
  20. if ( (data%State%TDS%DrillTorqueState==-1) .and. ((Get_TdsConnectionModes()==TDS_CONNECTION_STRING).or.(Get_TdsConnectionModes()==TDS_CONNECTION_SPINE)) ) then !if TopDrive connected to string
  21. data%State%TDS%String_JCoef = 0.d0
  22. Do i = 1,data%State%TD_String%StringConfigurationCount
  23. data%State%TDS%String_JCoef = data%State%TDS%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)
  24. End Do
  25. data%State%TDS%String_JCoef = data%State%TDS%String_JCoef*0.0421401d0 ![kg.m^2]
  26. else
  27. data%State%TDS%String_JCoef = 0.d0
  28. data%State%TDS%String_Torque = 0.d0
  29. end if
  30. data%State%TDS%String_JCoef = data%State%TDS%String_JCoef/10.d0 !???????? /10: bi dalil, check it
  31. end subroutine