Hi all,
I'm trying to simulate a DC motor with PyChrono, able to put in rotation a component imported from SolidWorks with PyChrono plugin.
I have already implemented a motor rotation with ChLinkMotorRotationTorque() as in the following piece of code, between a motor body and an arm body (a parallelepiped block):
link_motor = chrono.ChLinkMotorRotationTorque()
link_motor.Initialize(armMotorBody, motorBody, revolute_frame_motor)
link_motor.SetSpindleConstraint(chrono.ChLinkMotorRotationTorque.SpindleConstraint_CYLINDRICAL)
link_motor.SetName("Motor")
exported_items.append(link_motor)
# # Add the revolute joint and motor to the system
# my_system.Add(revolute_joint)
my_system.Add(link_motor)
# # Apply the calculated torque to the motor
link_motor.SetTorqueFunction(chrono.ChFunction_Const(0.1))
The problem is that this code is not considering the load torque of the component: indeed, in PyChrono, if I impose a constant torque, the component will accelerate indefinitely. However in reality the component has a load torque counteracting the imposed torque, at a certain point no acceleration will be present anymore, and the component will move with constant angular speed.
Is there a known way to introduce the load torque for a component in PyChrono?
Thank you in advance
Luca Nanu