# Import Forces, Net moment

[FONT=“Verdana”]Hi, I’m a research assistant of the Politecnico di Torino. I’m working with ergonomics and I’m facing to the Anybody software. I have two questions, and I’d be very grateful if anybody could help me:

1.- I have run simple simulations using the Standing Human model, focusing on the Shoulder-Arm region. We need to introduce an external real force into the model, exactly on the PalmNode. Can anybody give me some tips or documents to read to import and use that force? Is it possible to do that?

2.- We are interested in Joint Moments, and I found those outputs in the Selected Output of the Human Model. But I also find some “NET” moments opening the “moment measure” folder in the “Right Part” of the model. For the Elbow Flexion I found different values. Can you explain me which is the difference? Maybe the Net is the moment calculated excluding the muscle forces?

Cesar

Dear Cesar,

1. One way for to create an AnyRefNode in the area, where you want the force to be applied and add an AnyForce3D object with some value. Please check the reference manual for more information and descriptions of these classes.

2. Could the difference between just in the axes, which where used for reporting, because the code suggests that they should be the same:

``````
AnyForceMomentMeasure2 GHNetMomentMuscles = {
. . .
//Make transformation to the Scapula.gh.RotNode coordinate system
AnyVec3 Mlocal=M*ref.Axes;
AnyVar GHAbduction=Mlocal[0];
AnyVar GHFlexion=Mlocal[2];
AnyVar GHExternalRotation=Mlocal[1];
``````

Regards,
Pavel

Good evening Pavel,

Thanks for the reply and the attention to my question. I have clarified the difference between the joint moments. Regarding the first question I need to import a real force data (I have a csv file from a pressure sensor) and apply it to the PalmNode in order to start a static simulation. Browsering the reference manual I found the “Demo.forces.any” file in which there is something similar with my issue but there’s no suggestions on how to import data. And the solution at the end of the file (interpolated force) is quite long for all my data. I know how to create a 3D vector, apply it to a reference node but I don’t know how to import real data. If you have any other suggestions I’d be very grateful.
Best Regards,
Cesar

Dear Cesar,

You found a good example, but what was missing in it was the information that this class can also take external files:

``````
// -------------------------------------------------------------------
// Example 2
// -------------------------------------------------------------------

/// Definition of an interpol function
/// that retieves the data from an external file
AnyFunInterpol TestFfile = {
Type = Bspline;
FileName = "AnyFunInterpol.dat";
};

AnyVector vfile = 0.025*TestFfile(1.5);
``````

You can find more information on AnyFunInterpol and this example in the reference manual. The only difference to your case is that it requires a plain text format:

FileName: - Name of a text file with data points in space-separated columns. The first column must hold T and the following must correspond to the rows of Data. Comments can be entered into the data file in lines that do not start with a number and after the correct number of values.

Kind regards,
Pavel

Good afternoon Pavel,

I found the example and I finally imported my force data. Now I have to play a bit to link these data to a Force applied on a reference joint but it’s up to me. Thanks for the support! I’m very grateful.
Best regards,
Cesar