Hello, I’m using the AnyBody modeling system (version 7.2.3) to create a Knee Simulator-like system.
To replicate the geometry of ligaments withing the intact knee, I am using AnyKinSPLine elements, and have been trying to replicate the ligament tensions which form on either insertion sites of the ligament using AnyForce3D.
So far, I have been able to use the ligament length to determine the ligament tensions, but have been unable to line the force vectors with the ligament fibers at each insertion site.
Can somebody help me align the force vectors with the fiber orientation?
AnyForce3D is used to create a 3D force in a point, it does not use a measure.
This is contrast to AnyForce which applies a force to a measure in this case the SPLine measure. So the force in the ligaments should be applied using AnyForce this will automatically ensure the force is along the direction of the line.
Thank you for your swift response.
I had not known that AnyForce3D did not use a measure.
I have since fixed the issue using AnyForce and resolved the problem.
Thank you for sharing your knowledge.
Upon fixing this issue, I have been facing another issue.
The locations of the ligament insertions (defined by AnyRefNode) happened to be underneath the STL surface.
Although I can manually re-locate the node locations, is there a more efficient way available to overcome this issue?
Sorry for the inconvenience, but the answers would be of great help to me.
Best regards.
Thank you for the suggestion.
I have tried using MeshLab, and it seems to be working fine.
Going back to the original question, upon integrating the ligament force into my knee model, I have been facing another problem.
When I was confirming the functionality of AnyForce, I have been using the ligament length (Lt) as a threshold (L0 being the threshold length) and outputting a constant value as ligament force as shown below.
AnyForce LigForce1 = {
AnyVar L0 = 2.2;
AnyVar Lt = .LigMeas1.Pos;
AnyRefFrame &ref = .stat.OrgPoint;
AnyKinMeasure &meas = .LigMeas1;
#include "LigForce.any"
//The contents of LigForce.any is the following
// AnyFloat Val = iffun(gteqfun(Lt, L0), -100, 0);
F = Val;
AnyDrawForce drwForce = {};
};
This has been working fine but in order to integrate the force into my knee model, I wanted to calculate the outputted force based on the current ligament length, so I changed the "LigForce.any" as the following.
After making this change, the following error has been popping up.
ERROR(SCR.EXP0) : -- : 'F' : Error in expression. Please refer to the following error messages for details ...
ERROR(SCR.EXP1) : -- : Operator '=' : Illegal operation for given argument types : 'AnyFloat' '=' 'AnyFloat[1]'
I'm guessing that this error stems from the fact that the "F" in AnyForce is a vector whereas the "Val" that I have defined is a float. But the same code seems to exist within the "TKA-KneeBendDemo.any" file included in the install of AnyBody.
I'm sorry for the late reply.
Since the last suggestion that you have provided me with, I have been able to fix the problems at hand.
Thank you very much for your help.
In the last reply, you have suggested using the built-in ligament force model.
I was confused about whether you were implying that I could use the AnyLigament model instead of the AnyKinSPLine, or if you were suggesting that there was a way to place ligament models around the bone STLs.
Is it possible to place ligament models using the AnyLigament element along the bone STLs?
I'm sorry for the endless questions, and the inconvenience it causes.
But any answer would be of great help to my knowledge and modeling.
This object deals only with the force not the line of action. You can use the SPLine to make the ligament wrap around bones this will give you a kinematic measure.
With the kinematic measure you can apply a force model lige the AnyLigamentModelPol or the if sentence you listed.
I think I understand what you mean.
Since the SPLine provides me with a kinematic measure, it is possible to use the length of the SPLine to calculate the ligament force using AnyLigamentModelPol.
Therefore, combining these two elements would provide me with a SPLine that wraps around the STL models while the ligament forces are properly calculated.
I will give it a try.
Exactly, the SPLine will wrap on geometrical objects like cylinders spheres which can represent the STL surface, in the locations where the wrapping occurs.