Ground reaction loads

HI

I have a physical model in my lab of a 2D lumbar spine with a
loadcell at the base. I thought it would be possible to input these
reactions into the model, similar to the gait example. The diffrence
is that the base of my model is static. I wrote the following simple
code, just to try to implement the loadcell reactions. However, my
model does not load the muscles. Can you please help me understand
how to appropriately apply these reactions.

Liss

Main = {

  // Global Reference Frame
 AnyFixedRefFrame GlobalRef = {

AnyDrawRefFrame DrwGlobalRef = {
ScaleXYZ = {.1, .1, .1};
RGB = {0,1,0};
};
AnyRefNode Ground = {
sRel = {0,0,0};
AnyDrawNode SN = {
ScaleXYZ = {.002,.002,.002};
};
};
AnyRefNode Hz = {
sRel = {1,1,0};
AnyDrawNode SN = {
ScaleXYZ = {.02,.02,.02};
};
};
AnyRefNode Hz2 = {
sRel = {-1,1,0};
AnyDrawNode SN = {
ScaleXYZ = {.02,.02,.02};
};
};

   AnyRefNode Vt = {
     sRel = {0,2,0};
     AnyDrawNode SN = {
       ScaleXYZ = {.02,.02,.02};
     };
   };

 };  // Global reference frame

 AnyFolder Segs = {

////Define dummy segment
AnySeg Ground={
r0={0,0,0};
Mass = 0;
Jii = {0,0,0};
AnyRefNode GRF={ sRel={0,0,0};};
};

   AnySeg L5 = {
     r0 = {0, 0.5, 0};
     Mass = 2.0;
     Jii = {.02,.01,.01};
     AnyRefNode Top = {
       sRel = {0,0.5,0};
        AnyDrawRefFrame DrwNode = {
        ScaleXYZ = {.02,.02,.02};
      };
    };
    AnyRefNode Bottom = {
       sRel = {0,-0.5,0};
        AnyDrawNode DrwNode = {
        ScaleXYZ = {.002,.002,.002};
      };
    };
     AnyDrawSeg Bar = {};
   };
 };

AnyFolder Muscles = {
// // Simple muscle model with constant strength = 300 Newton
AnyMuscleModel MusMdl = {
F0 = 300;
};

   //---------------------------------
   AnyViaPointMuscle MuscleVt = {
     AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
     AnyRefNode &Org = ..Segs.L5.Top;
     AnyRefNode &Ins = ..GlobalRef.Vt;
     AnyDrawMuscle DrwMus = {};
   };

// //---------------------------------
AnyViaPointMuscle MuscleHzR = {
AnyMuscleModel &MusMdl = …Muscles.MusMdl;
AnyRefNode &Org = …Segs.L5.Top;
AnyRefNode &Ins = …GlobalRef.Hz;
AnyDrawMuscle DrwMus = {};
};

 AnyViaPointMuscle MuscleHzL = {
     AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
     AnyRefNode &Org = ..Segs.L5.Top;
     AnyRefNode &Ins = ..GlobalRef.Hz2;
     AnyDrawMuscle DrwMus = {};
   };
 };


 //_____________JOINT DEFINITIONS______________________

AnyFolder Jnts = {
//
// //---------------------------------
AnyRevoluteJoint Base = {
Axis = z;
AnyRefNode &GN = …GlobalRef.Ground;
AnyRefNode &L5Node = …Segs.L5.Bottom;
}; // L5S1 joint
};
AnyKinEqPolynomialDriver L5S1Driver = {
AnyRevoluteJoint &Jnt = .Jnts.Base;
PolyCoef = { {0.2 } };
Reaction.Type = {Off};
};

AnyFolder Moments = {

AnyForceMomentMeasure2 L1Reaction = {
AnyForceBase &Mext = Main.MyModel.Muscles.MuscleVt;
AnyForceBase &M1 = Main.MyModel.Muscles.MuscleHzR;
AnyForceBase &M2 = Main.MyModel.Muscles.MuscleHzL;
// AnyRefFrame &Ref = Main.MyModel.Segs.L5.Top;
AnyRefFrame &Ref = Main.MyModel.GlobalRef;

 AnySeg &L1=Main.MyModel.Segs.L5;

};
};
////Kinematic Measures________

// Place the L5 segment on the ground
AnyKinEqSimpleDriver GroundLinConstraint ={
AnyKinLinear Lin = {
//Ref=-1;
AnyFixedRefFrame &Ground = Main.MyModel.GlobalRef;
AnyRefFrame &L5 = …Segs.Ground;
};
DriverPos = {0,0,0};
DriverVel = {0,0,0};
Reaction.Type = {Off,Off,Off}; // Provide ground reaction
forces
};

AnyKinEqSimpleDriver GroundRotConstraint ={
AnyKinRotational Rot = {
AnyFixedRefFrame &Ground = Main.MyModel.GlobalRef;
AnyRefFrame &L5 = …Segs.Ground;
Type =RotAxesAngles;
};
DriverPos = {0,0,0};
DriverVel = {0,0,0};
Reaction.Type = {Off,Off,Off}; // Provide ground reaction
forces
};

AnyReacForce GroundContactForce={
//
AnyKinLinear Lin={
Ref=0;
AnySeg &ref1=Main.MyModel.Segs.Ground;
AnyRefNode &ref2=Main.MyModel.Segs.L5.Bottom;
};

////
AnyKinRotational Rot= {
AnySeg &ref1=Main.MyModel.Segs.Ground;
AnyRefNode &ref2=Main.MyModel.Segs.L5.Bottom;
Type=RotVector;
};
};

//_____________________________
AnyForce3D ForceOnGround ={

// AnyFunInterpol force ={
// Type=Bspline;
// BsplineOrder = 8;
// FileName =“Force.txt”; //t, Fx, Fy, Fz
// };
AnySeg &ref1=Main.MyModel.Segs.Ground;
F={0,-20,0};

};

//AnyMoment3D MomentOnGround ={
//
//// AnyFunInterpol moment ={
//// Type=Bspline;
//// BsplineOrder = 8;
//// FileName = “Moment.txt”;
//// };
// AnySeg &ref1=Main.MyModel.Segs.L5;
// M={0,0,0};
//};

}; // MyModel

// The study: Operations to be performed on the model
AnyBodyStudy MyStudy = {
AnyFolder &Model = .MyModel;
RecruitmentSolver = MinMaxSimplex;
Gravity = {0.0, 0, 0.0};
};

}; // Main

Hi Liss,

You have to switch off the reaction force in the AnyRevoluteJoint that
connects the L5 segment with the ground.

Just insert

Constraints.Reaction.Type = {On,Off,On,On,On};

In the definition of the Joint should do the trick. So only the Force in Y
direction is free.

Then the muscle will be activated.

Best regards,

Sebastian


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of rubertel
Sent: 5. december 2008 23:31
To: anyscript@yahoogroups.com
Subject: [AnyScript] Ground reaction loads

HI

I have a physical model in my lab of a 2D lumbar spine with a
loadcell at the base. I thought it would be possible to input these
reactions into the model, similar to the gait example. The diffrence
is that the base of my model is static. I wrote the following simple
code, just to try to implement the loadcell reactions. However, my
model does not load the muscles. Can you please help me understand
how to appropriately apply these reactions.

Liss

Main = {

// Global Reference Frame
AnyFixedRefFrame GlobalRef = {

AnyDrawRefFrame DrwGlobalRef = {
ScaleXYZ = {.1, .1, .1};
RGB = {0,1,0};
};
AnyRefNode Ground = {
sRel = {0,0,0};
AnyDrawNode SN = {
ScaleXYZ = {.002,.002,.002};
};
};
AnyRefNode Hz = {
sRel = {1,1,0};
AnyDrawNode SN = {
ScaleXYZ = {.02,.02,.02};
};
};
AnyRefNode Hz2 = {
sRel = {-1,1,0};
AnyDrawNode SN = {
ScaleXYZ = {.02,.02,.02};
};
};

AnyRefNode Vt = {
sRel = {0,2,0};
AnyDrawNode SN = {
ScaleXYZ = {.02,.02,.02};
};
};

}; // Global reference frame

AnyFolder Segs = {

////Define dummy segment
AnySeg Ground={
r0={0,0,0};
Mass = 0;
Jii = {0,0,0};
AnyRefNode GRF={ sRel={0,0,0};};
};

AnySeg L5 = {
r0 = {0, 0.5, 0};
Mass = 2.0;
Jii = {.02,.01,.01};
AnyRefNode Top = {
sRel = {0,0.5,0};
AnyDrawRefFrame DrwNode = {
ScaleXYZ = {.02,.02,.02};
};
};
AnyRefNode Bottom = {
sRel = {0,-0.5,0};
AnyDrawNode DrwNode = {
ScaleXYZ = {.002,.002,.002};
};
};
AnyDrawSeg Bar = {};
};
};
AnyFolder Muscles = {
// // Simple muscle model with constant strength = 300 Newton
AnyMuscleModel MusMdl = {
F0 = 300;
};

//---------------------------------
AnyViaPointMuscle MuscleVt = {
AnyMuscleModel &MusMdl = …Muscles.MusMdl;
AnyRefNode &Org = …Segs.L5.Top;
AnyRefNode &Ins = …GlobalRef.Vt;
AnyDrawMuscle DrwMus = {};
};

// //---------------------------------
AnyViaPointMuscle MuscleHzR = {
AnyMuscleModel &MusMdl = …Muscles.MusMdl;
AnyRefNode &Org = …Segs.L5.Top;
AnyRefNode &Ins = …GlobalRef.Hz;
AnyDrawMuscle DrwMus = {};
};

AnyViaPointMuscle MuscleHzL = {
AnyMuscleModel &MusMdl = …Muscles.MusMdl;
AnyRefNode &Org = …Segs.L5.Top;
AnyRefNode &Ins = …GlobalRef.Hz2;
AnyDrawMuscle DrwMus = {};
};
};

//JOINT DEFINITIONS_________
AnyFolder Jnts = {
//
// //---------------------------------
AnyRevoluteJoint Base = {
Axis = z;
AnyRefNode &GN = …GlobalRef.Ground;
AnyRefNode &L5Node = …Segs.L5.Bottom;
}; // L5S1 joint
};
AnyKinEqPolynomialDriver L5S1Driver = {
AnyRevoluteJoint &Jnt = .Jnts.Base;
PolyCoef = { {0.2 } };
Reaction.Type = {Off};
};

AnyFolder Moments = {

AnyForceMomentMeasure2 L1Reaction = {
AnyForceBase &Mext = Main.MyModel.Muscles.MuscleVt;
AnyForceBase &M1 = Main.MyModel.Muscles.MuscleHzR;
AnyForceBase &M2 = Main.MyModel.Muscles.MuscleHzL;
// AnyRefFrame &Ref = Main.MyModel.Segs.L5.Top;
AnyRefFrame &Ref = Main.MyModel.GlobalRef;

AnySeg &L1=Main.MyModel.Segs.L5;
};
};
////Kinematic Measures________

// Place the L5 segment on the ground
AnyKinEqSimpleDriver GroundLinConstraint ={
AnyKinLinear Lin = {
//Ref=-1;
AnyFixedRefFrame &Ground = Main.MyModel.GlobalRef;
AnyRefFrame &L5 = …Segs.Ground;
};
DriverPos = {0,0,0};
DriverVel = {0,0,0};
Reaction.Type = {Off,Off,Off}; // Provide ground reaction
forces
};

AnyKinEqSimpleDriver GroundRotConstraint ={
AnyKinRotational Rot = {
AnyFixedRefFrame &Ground = Main.MyModel.GlobalRef;
AnyRefFrame &L5 = …Segs.Ground;
Type =RotAxesAngles;
};
DriverPos = {0,0,0};
DriverVel = {0,0,0};
Reaction.Type = {Off,Off,Off}; // Provide ground reaction
forces
};

AnyReacForce GroundContactForce={
//
AnyKinLinear Lin={
Ref=0;
AnySeg &ref1=Main.MyModel.Segs.Ground;
AnyRefNode &ref2=Main.MyModel.Segs.L5.Bottom;
};

////
AnyKinRotational Rot= {
AnySeg &ref1=Main.MyModel.Segs.Ground;
AnyRefNode &ref2=Main.MyModel.Segs.L5.Bottom;
Type=RotVector;
};
};

//_____________________________
AnyForce3D ForceOnGround ={

// AnyFunInterpol force ={
// Type=Bspline;
// BsplineOrder = 8;
// FileName =“Force.txt”; //t, Fx, Fy, Fz
// };
AnySeg &ref1=Main.MyModel.Segs.Ground;
F={0,-20,0};

};

//AnyMoment3D MomentOnGround ={
//
//// AnyFunInterpol moment ={
//// Type=Bspline;
//// BsplineOrder = 8;
//// FileName = “Moment.txt”;
//// };
// AnySeg &ref1=Main.MyModel.Segs.L5;
// M={0,0,0};
//};

}; // MyModel

// The study: Operations to be performed on the model
AnyBodyStudy MyStudy = {
AnyFolder &Model = .MyModel;
RecruitmentSolver = MinMaxSimplex;
Gravity = {0.0, 0, 0.0};
};

}; // Main

[Non-text portions of this message have been removed]