Forums Anyscript.org Getting the muscle force in the X,Y,Z directions
 User Name Remember Me? Password
 Register FAQ Calendar Search Today's Posts Mark Forums Read

 Notices Meet us !

 Thread Tools Display Modes
#11
02-01-2018, 11:31 AM
 mewael Junior Member Join Date: Aug 2017 Posts: 8

Hallo Pavel,

Thx a lot for your helpful reply. Unfortunately I didn't notice your reply until now.

I understand now how to make a transformation from local to global CS, but I'm not sure how to find the the torque around the axial axis of the femur.

I did it using the muscle forces, which go through the femur. As a reference frame I used the femur itself. So I'm not sure if that the right way to get the torque.

I would appreciate it if you could tell me if this the right way to do it.

Best regards

Wael
#12
02-01-2018, 12:47 PM
 pgalibarov Senior Member Join Date: Oct 2010 Posts: 926

Dear Wael,

I may be misunderstanding something. But I will refer back to the previous code:

Code:
```AnyForceMomentMeasure2 MomentMeasureLoc =
{

AnyVec3 Mlocal=M*ref.Axes;
AnyVar AxialTorque=Mlocal[2]; // Z torque

// defines the axial axis, Z aligned with the axis
AnyRefFrame &Ref = Main.CanineModel.Segs.Right.Femur.NodeOfInterest;;

AnySeg &Seg = Main.CanineModel.Segs.Right.Femur;

AnyFolder &Mus1 = Main.CanineModel.Muscles.Right.Vastus_lateralis_in termedius;
AnyFolder &Mus2 = Main.CanineModel.Muscles.Right.Vastus_medialis;
AnyFolder &Mus3 = Main.CanineModel.Muscles.Right.Adductor_magnus;
AnyFolder &Mus4 = Main.CanineModel.Muscles.Right.Gluteus_medius_caud alis;
};```
As a result you will get the torque about Z axis (your axial axis), generated by specified muscles. You just need to define NodeOfInterest to be on the relevant axis and Z pointing in the needed direction.

Code:
```Main.CanineModel.Segs.Right.Femur = {
AnyRefNode NodeOfInterest = {
sRel = {...}; // coordinates of a point on the axis
ARel = {...};// rotation matrix to align Z axis, please read about RotMat functions
};```
If that does not make sense - you could try a simple example and check your variation of this code works.

Kind regards,
Pavel
#13
02-01-2018, 01:13 PM
 mewael Junior Member Join Date: Aug 2017 Posts: 8

Hallo Pavel,

perfect. That's exactly, what i wanted to know.

Thank you so much

Best Regards

Wael

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Professional Forum     AnyBody Managed Model Repository     Gallery of user models and videos     AnyGait     AnyBody Exporter for SOLIDWORKS     Debug model General Forum     AnyBody Modeling System     Wish list for AMS and AMMR     Announcements Self-Supported Forum     AnyBody Model Repository     Debug model Archive     AnyScript Message Archive

All times are GMT +2. The time now is 07:54 PM.

 Contact Us - Anyscript.org - Archive - Top