Using Nonlinear Stiffness for Translational Constraint made Force Dependent

Hello AnyBody,

I would like to know, for a spherical joint, how i can apply a nonlinear stiffness in the direction of a translational constraint, which is made force dependent. Can you provide help with a simple example. Thanks.

Hello,

I would recommend to look at the class example which you can find AnyOprSetForceDepKin, which is an example of the simple 2D arm using two springs to model the elbow joint force dependent.

In this example you can find the definition of two forces, Spring1 and Spring2. Here, you can exchange e.g. Spring1 with a nonlinear spring, say a spring with a quadratic characteristic like

AnyForce Spring1 = 
{
  AnyVar Stiffness = Main.Stiffness;
  AnyVar l0 = 0.0;
  
  AnyKinMeasure &line = .L1;
  
  F = {-Stiffness*(line.Pos[0]-l0)*(line.Pos[0]-l0)};
};

Best regards
Daniel

Hi Rizwan,

Would you like to free up a spherical joint to have more degrees of freedom? And set one of them to be force-dependent? If so - you can construct a 6 dof kinematic measure like, where you can set constraint types individually for each dof:


      AnyKinMeasureOrg org = {
        AnyKinLinear lin = {
          AnyRefFrame &ref1 = ...UpperArm.Elbow;
          AnyRefFrame &ref2 = ...LowerArm.Elbow;          
        };
        AnyKinRotational rot = {
          Type = RotAxesAngles;
          //Type = PlanarAngles;
          AnyRefFrame &ref1 = ...UpperArm.Elbow;
          AnyRefFrame &ref2 = ...LowerArm.Elbow;          
        };
     };

You would need to replace the existing spherical joint by this kinematic measure. And drive this one.

You can check the SpineFixationWithForceDepKinematics example to see how a single dof can be set to be force-depedent.

In order to remove the spherical joint you do not need to modify the repository. You need to use the MechObjectExclude member of your study class to do that (i include a bigger example to show this may work in a more complex situation):


AnyObjectPtrArray l2 = ObjSearchRecursive("Main.HumanModel.BodyModel.Right.Leg.Jnt.Knee","*","AnyMechObject");
AnyObjectPtrArray l3 = ObjSearchRecursive("Main.Model.ModelEnvironmentConnection.JointsAndDrivers.JntDriverRightLegTD","Knee*","AnyMechObject");

AnyObjectPtrArray l4 = ObjSearch("Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.PatellaFemurJoint","AnyMechObject");
AnyObjectPtrArray l5 = ObjSearchRecursive("Main.HumanModel.BodyModel.Right.Leg.Jnt.PatellaFemur","*","AnyMechObject");
AnyObjectPtrArray l6 = ObjSearch("Main.HumanModel.BodyModel.Right.Leg.Jnt.PatellaMovement","AnyMechObject");
AnyObjectPtrArray l7 = ObjSearchRecursive("Main.HumanModel.BodyModel.Right.Leg.Jnt.PatellaMovement","*","AnyMechObject");

AnyObjectPtrArray KneeExcludeList = arrcat(arrcat(l1,l2), l3);
AnyObjectPtrArray PatellaExcludeList = arrcat(arrcat(arrcat(l4, l5),l6),l7);

AnyObjectPtrArray excludelist = arrcat(KneeExcludeList, PatellaExcludeList );
MechObjectExclude = excludelist;


And finally for the nonlinear stiffness you would need to define your nonlinear behaviour by using the AnyFunPolynomial class, in a manner like:


AnyFunPolynomial nonlinearity = 
  {
    AnyFloat Stiffness = 15;
    PolyCoef = Stiffness*{0,1,0,1,0,1};
  };
  AnyForce MyForce = {
    AnyKinMeasure &l = .mykinematicmeasure;
    F = {.nonlinearity(l.pos[0])};
  };

Hope this helps.

Regards,
Pavel

P.S. I have not checked this code - please adapt it to your needs and read the reference manual for each class.

1 Like

Thanks alot. I will adapt it for my situation. Incase, i have a question, i will get back to you.

Hello Pavel,

I am using Standing Model from AMMR V 1.5. I tested non-linear stiffness in one of the lumbar joints given as

AnyVar Stiffness = 1896.0*1000;
AnyFunPolynomial nonlinearity =
{
PolyCoef = {0,0,1};
};

AnyForce DiscStiffness = {

 AnyKinMeasure &lin = ...Trunk.JointsLumbar.L4L5Jnt.Linear;
 
 F = {-SStiffness*lin.Pos[0],   
        -.Stiffness*.nonlinearity(lin.Pos[1]), 
       0};

};

However, during inverse analysis it says.

‘‘Failed to resolve force-dependent kinematics. Too small steps for GSS search causes looping of Newton method (final force error = 1.140899E+003). Continue anyhow.’’

Can you tell me how to fix this problem.

Hi Rizwan,

It is very hard to say from your description what is wrong, but most likely the system is not very well balanced. It could be that the stiffness values are too large or too small and the whole system is not in balance. You would also need to calibrate your model properly.

But if you can’t resolve the problem you could try uploading your model to the Debug section of the forum.

Regards,
Pavel

Dear Pavel,

Using the linear stiffness simply works. Its only when i make it nonlinear in one of the directions of a translational constraints is a problem.

Can you please provide a simple case of a standing model with non linear stiffness in any of the lumbar joints. That would help.

Could you describe your nonlinear behaviour? Does it differ much from the linear one in the lower end?

Pavel

Dear Pavel,

For, different body positions, axial loading on the lumbar segments are different. I therefore, used linear stiffnesses for a particular body position which reflect a small range of the non-linear load displacement curve at that particular load.

No i did not use any linear stiffness value that reflects the lower end of the non-linear curve. for example not below the Load of 350 N.

For testing, Initially, I tried 1610x^2 + 229.4x. When this didnt work, then i used a function simply with quadratic characteristic i.e. 1896x^2. These equations reflect the stiffnesses in N/mm.

Dear Rizwan,

Unfortunately I do not have an out-of-the-box solution here - the problem is still in stability of the system. I would need to have a look at the model to see what happens. Or you can try to try different ranges and see where the problem occurs and what the forces are at the failing point. I believe it should just work for the 0 displacements.

Regards,
Pavel