BergmannGH Shoulder Model with FDK Contact Based Joint


I have modified the BergmannGH shoulder model to include a contact based glenohumeral joint. I deactivated the GH joint by excluding the GHReactions.any file and the GHLinCon line in Jnt.any in the “Arm” directory of the AAUHuman.

I used the THA example contact joint in the AMMR1.6.3 to add my own shoulder contact geometry.

I attached the code that I used to create my new GH joint. This code is inserted in the Study section of my main.any file.

I assume that now that the joint is FDK and contact force based the humeral head is able to translate relative to the scapula. I want to plot these translations. I believe that the object that I need to look at is


I’d appreciate confirmation that this is where the humerus motion relative to the scapula is?


Hi Cesar,

if Main.Study.newGlenoHumeralCesar.Pos relates to a Linear measure = AnyKinLinear it will show translations in meter, if it relates to a rotational measure = AnyKinRotational it will relate to a rotation in degree.

Thanks, Amir.

I’m very grateful for all your help.



Hi Cesar,
I don’t know what are exactly your objectives, but probably could I help you in your development process : I worked for more than 2 years now on integrating humeral head translation and prosthetic components in a shoulder model.

Do not hesitate if you need :wink:


hello cesar,

I’m also trying to change to GHBergmann Joint into FDK, but it somehow doesn’t work properly, could you maybe sent all the changes you made to make it work?


Hi Marc,
Cesar and Lauranne worked for a long time (years) to get such a model running, I don’t think they will share before it is published :cool:

Hi all!
I indeed worked a little on this aspect :wink:
My paper is at the final stage of revision and should be in press in the next few monthes. I’ll give you news when available !

Hello together

I modified the Bergmann model to get my contact based glenohumeral joint running:

I excluded the GHReactions.any and the GHLinCon in Jnt.any

and i created my new joint close the THA example:

[i]AnyKinRotational newGlenoHumeralJoint ={
AnyRefNode &ScapNode =;
AnyRefNode &HumNode =;//Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.HipJoint;//Right;
// AnyRefNode &PelvisNode = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.HipJointRightTD;
}; // End of new joint definition

AnyKinLinear GHLin={
AnyRefFrame &ScapNode =;//Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.HipJoint;//Right;
AnyRefFrame &HumNode =;
// AnyRefNode &PelvisNode = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.HipJointRightTD;

AnyKinEqSimpleDriver GHLinCon={
AnyKinLinear &ref=.GHLin;
CType = {ForceDep,ForceDep,ForceDep};
Reaction.Type = {Off,Off,Off};
My problem is that the model is not performing the abduction motion anymore, I tried different ways to use the drivers but I can’t find a solution

So my question:

How does the drivers need to be changed to still perform an abduction even with FDK activated?


Dear Marc,

In the Bergmann’s model, the shoulder abduction is related to the GlenohumeralAbduction measurement in the ‘AMMR\Body\AAUHuman\Arm\Interface.any’ file.

AnyKinMeasureOrg GlenohumeralFlexion ={
  AnyRefNode &ShoulderNodeRef  = ..ShoulderRef;
    AnyRefNode RotNode={ARel={{0,0,1},{0,....Sign*-1,0},{....Sign*1,0,0}};
  AnyFolder & ;
  gh ={
    AnyRefNode RotNode={
  AnyKinRotational GHMeasure ={
    AnyRefNode &ref1  = ...ShoulderRef.RotNode;
    AnyRefNode &ref2  =;
  MeasureOrganizer ={1};


AnyKinMeasureOrg GlenohumeralExternalRotation ={
  AnyKinRotational &ref=.GlenohumeralFlexion.GHMeasure;
  MeasureOrganizer ={2};
AnyKinMeasureOrg GlenohumeralAbduction ={
  AnyKinRotational &ref=.GlenohumeralFlexion.GHMeasure;
  MeasureOrganizer ={0};

So if you didn’t change this part of the code, then there is no reason why the abduction motion is not working.

If you want to implement the FDK in your shoulder model, you also have to implement both surface contact and stiffness.

It will be better if you can see the previous webcast which is related to that topic:

Best regards,


Thank you for the help so far,

the error I’m facing now is, that my stl surfaces penetrate each other after starting the simulation and I can’t explain why.

I tried them in the simple FDK tutorial, where I replaced the simpletibial.stl and the simplefemural.stl by them, which worked.

But also importing the simpletibial.stl and the simplefemural.stl into my model resulted in the same error.

As soon as it comes to 3D modeling, theres is no contact created anymore.

For the stiffness and the pressure model I used the same parameters as in the hipjoint example:

This my contact forces file

[i] AnyForceSurfaceContact FSurf =
AnySurface &sSlave =;
AnySurface &sMaster =;

PressureModule = 3e9;//3.7e9;//600e8; //Vol Pen

ForceViewOnOff = On;
MeshRefinementMaster = 10;
MeshRefinementSlave = 10;
SingleSidedOnOff= On;


AnyForce ArtificialStiffness =
AnyFloat Stiffness =7.5e4; //7.5e5;//5e4; // N/m
AnyKinLinear lin =
//Ref = -1;
AnyRefFrame &r1=;
AnyRefFrame &r2 =;

F = - Stiffness * lin.Pos;

AnyKinPLine ArtificialSpring =
AnyRefFrame &r1=;
AnyRefFrame &r2 =;
AnyDrawPLine drw =
//Visible = On;
//Opacity = 1;
Thickness = 0.0025;
RGB = {0,0,1};

[/i]I don’t know where to look for, to fix this problem.



Hi Marc,

From the code i can not see spot the error,

I can think of these things:

[li]there is a force present but you do not display it please use the object AnyDrawForceSurface to display the force, if this object is not present it will not be visual, the ForceViewOnOff do not work anymore it will be discontinued in the next release.
[/li][li] please try run the model kinematically and drive it in a way which will make the surfaces penetrate, check that there is a force. (These force are also found running just kinematics)
[/li][li]Make a simple model like described in this page and ensure that the contact surfaces works as intended.


Best regards

Hi Marc,
Sorry for delay, 24h per day is definitely too short!
I’m current uploading the model on which I worked during my PhD. I think it could help you and maybe answer you question. I should have time this week end to complete it.
You also could see my very last paper, where the method and implementation is described: Sins L, Tétreault P, Hagemeister N, Nuño N. Adaptation of the AnyBody™ Musculoskeletal Shoulder Model to the Nonconforming Total Shoulder Arthroplasty Context. ASME. J Biomech Eng. 2015;137(10):101006-101006-7. doi:10.1115/1.4031330. Online:

Please, do not hesitate to write me by e-mail if you have any question; it’ll be a pleasure to try to help you!