ChLinkRotSpringCB minimum angle

29 views
Skip to first unread message

Roberto Echeverria

unread,
Nov 19, 2021, 10:34:15 AM11/19/21
to ProjectChrono
I am using a rotational spring to estimate the torsional load of a body attached to another. The stiffness used is relatively high (1e10). What i observe is that the torsional spring requires a minimum deformation to start reacting:

Figure_1.png
This is my torque functor:

class MySpringTorque(chrono.TorqueFunctor):
    rest_angle = 0
    
    def __init__(self,stiffness,damping):
        self.stiffness=stiffness
        self.damping=damping
        super(MySpringTorque, self).__init__()
    
    def __call__(             self,         #
                              time,         # current time
                              angle,       # current length
                              vel,          # current velocity (positive when extending)
                              link):         # back-pointer to associated link
        
   
        torque = -self.stiffness * (angle - self.rest_angle) -  self.damping * vel
        return torque      

Is this a expected behavior?


Kind regards

Roberto


Roberto Echeverria

unread,
Nov 22, 2021, 10:39:30 AM11/22/21
to ProjectChrono
Hello,

In order to add some additional information, I was able to reproduce the effect on the demo_IRR_rot_spring.py example. I just set the the Timestep to 0.0001 (demo comes with 0.001) and increase the spring coefficient to 400 (demo comes with 40).

In the figure below, blue shows the simulation with 0.001 time step, and orange is for the simulation with 0.0001 time step. At a certain moment, Chrono decides to round to 0 de angle of the spring. Is this expected?

Kind regards

Roberto
pMOOe2BtgR.png

Reply all
Reply to author
Forward
0 new messages