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
Friction damper for a hint joint
- Thomas Uchida
- Posts: 1794
- Joined: Wed May 16, 2012 11:40 am
Re: Friction damper for a hint joint
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.Probably, the FunctionBsedBushingForce is the solution, but without an example I have no clue how to apply it.
- Gabor Piskoty
- Posts: 10
- Joined: Mon Nov 16, 2015 7:52 am
Re: Friction damper for a hint joint
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
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