Hi Luca,

I'm not an expert but my approach would be to modify the torque function to 
include a negative torque component w.r.t motor RPM (measured mechanically 
in Chrono) That way, as motor RPM goes up, torque applied goes down, 
approximating the behavior you want 

The ideal (more precise) way would probably be to mathematically define the 
model of the DC motor (& circuit) you are trying to simulate, and relate it 
to the torque function. It would probably be like the suggestion above but 
with the empirical constants describing the motor (i.e k_t, k_emf) coupled 
with Chrono dynamics

I believe (cautiously, as I’m not much of an expert) that back EMF drives a 
lot of the behavior you’re looking for so this way could be best

Bret

On Monday, December 30, 2024 at 7:32:56 AM UTC-10 [email protected] wrote:

> 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/projectchrono/51bd38e1-6db2-4790-a628-8ca976d861b4n%40googlegroups.com.

Reply via email to