Page 1 of 1

Friction damper for a hint joint

Posted: Thu Jul 20, 2017 4:45 am
by gabor
Dear All

I am struggling to create a simulation of a pendulum with friction damping in the joint :( . I would like to apply a constant moment on the joint always acting against the rotational movement; like in the reality in case of a frictional (and not viscous) damper.

Put it on another way: If the pendulum rotates clockwise, the drag moment (e.g. 5 Nm) should act counterclockwise (against the movement) and if the pendulum rotates counterclockwise, the moment (5 Nm) should act clockwise.

A BushingForce is unfortunately not the right solution as the drag moment should be independent from the rotational velocity, but should only depend on the sign +/- (i.e. direction) of the rotation.

Probably, the FunctionBsedBushingForce is the solution, but without an example I have no clue how to apply it.

I would appreciate any help.

Thank you.

Best regards

Gabor

Re: Friction damper for a hint joint

Posted: Thu Jul 20, 2017 12:32 pm
by tkuchida
Probably, the FunctionBsedBushingForce is the solution, but without an example I have no clue how to apply it.
The FunctionBasedBushingForce is used in testForces.cpp (https://github.com/opensim-org/opensim- ... s.cpp#L713). The code on GitHub is written in 4.0, but in most cases it isn't too difficult to translate into 3.3 (assuming that's what you're using). If you're building your model in XML and using the GUI, you can select "XML Browser" from the "Help" menu to see a template of the XML code.

Re: Friction damper for a hint joint

Posted: Mon Jul 24, 2017 1:05 am
by gabor
Dear Tom,

thank you for your hint. First I have to get familiar with programming to be able to understand it.

Now, I use the ExpressionBasedPointToPointForce, acting on a 1 m long level arm. This approach is accurate enough for small angel range:

<ExpressionBasedPointToPointForce name="FRICTION">
<body1>HEAD</body1>
<body2>PENDULUM</body2>
<point1>1 -1 0</point1>
<point2>-1 -1 0</point2>
<expression>50*abs(ddot)/(ddot)</expression
</ExpressionBasedPointToPointForce>

Here, abs(ddot)/(ddot) is the direction of the rotation, and 50 is the applied moment.

Best regards

Gabor