Defining Spring Force

How to apply a constant force along a spring connected between two nodes?

Hi @NissyElan and welcome to the forum!

You can define forces in AnyBody using a force class such as the AnyForce3D
Here is an example of a constant force defined in the local coordinates of the target object.

AnyForce3D AppliedForce = {
  Flocal = {100, 0.0, 0.0};
  AnyRefFrame &obj = TargetObject;

You can also make the force depent on some measure:

AnyForce3D AppliedForce = {
  AnyKinLinear &MyMeasure =;
  F = {100 * MyMeasure.Pos, 0.0, 0.0};
  AnyRefFrame &obj = TargetObject;

Using the F variable instead of the Flocal expresses the force in global coordinates.

Best regards,

1 Like

Thank you Sir for your response

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.