subroutine TopDrive_Inputs ! Use CSimulationVariables Use CTopDrivePanelVariables Use CTdsConnectionModesEnumVariables Use TopDrive_VARIABLES Use TD_DrillStemComponents IMPLICIT NONE integer :: i TDS%String_Torque = TD_String%StringTorque*12.d0 ![lb.ft]*12 ---> [lb.in] ????????? !TDS%String_Torque = 20000. TDS%String_Torque = 0.112984829d0*TDS%String_Torque ![N.m] TDS%PowerState = TopDrivePanel%TopDriveTdsPowerState TDS%RpmKnob = TopDrivePanel%RpmKnob !TDS%MotorFaileMalf ! jayi meghdardehi nashode ?????????????????? TDS%RateChange = 193.d0 ![RPM/s] motaghayere voroudi ??? TDS%DrillTorqueState = TopDrivePanel%TopDriveDrillTorqueState TDS%TorqueLimitKnob = TopDrivePanel%TopDriveTorqueLimitKnob ! bayad hazf shavad??????????????/ !===> TDS%String_JCoef Calculation if ( (TDS%DrillTorqueState==-1) .and. ((Get_TdsConnectionModes()==TDS_CONNECTION_STRING).or.(Get_TdsConnectionModes()==TDS_CONNECTION_SPINE)) ) then !if TopDrive connected to string TDS%String_JCoef = 0.d0 Do i = 1,TD_String%StringConfigurationCount TDS%String_JCoef = TDS%String_JCoef+( (TD_DrillStem(i)%TotalWeight*((TD_DrillStem(i)%Id**2.d0)+(TD_DrillStem(i)%Od**2.d0)))/8.d0 ) ![lb.ft^2] , Jz=(1/2)*m*(r1^2+r2^2) End Do TDS%String_JCoef = TDS%String_JCoef*0.0421401d0 ![kg.m^2] else TDS%String_JCoef = 0.d0 TDS%String_Torque = 0.d0 end if TDS%String_JCoef = TDS%String_JCoef/10.d0 !???????? /10: bi dalil, check it end subroutine