Specifications

98
Calibrating the muscle in a particular position requires a calibration study. It's basic definition is very simple:
// =======================================================
// "The body study"
// =======================================================
AnyBodyStudy ArmModelStudy = {
AnyFolder &Model = Main.ArmModel;
RecruitmentSolver = MinMaxSimplex;
Gravity = {0.0, -9.81, 0.0};
};
// A new calibration study
AnyBodyCalibrationStudy CalibrationStudy = {
AnyFolder &Model = Main.ArmModel;
nStep = 1;
}; // End of study
If you load the model in you can study the structure of the new study:
You can see that it has multiple operations. The interesting ones are the two latter:
TendonLengthAdjustment and LigamentLengthAdjustment. As the names indicate they are for tendon and
ligament calibration respectively. Notice that the study only has one time step. The model posture in that
step should be the position in which you wish to calibrate the tendon. If you run the
TendonLengthAdjustment operation you will notice that the model takes the initial posture of the flexion
movement it was doing in the InverseDynamicsAnalysis. This is because of the line
AnyFolder &Model = Main.ArmModel;
The ArmModel contains movement drivers, and when they are included in the study they cause the model to
attain the same posture in the calibration study as it does in the inverse dynamic analysis. To be able to
calibrate in another posture we must perform a small restructuring of the model and perhaps recommend a
organizing things a little differently in general when making models.
We included the movement in the model when we developed it in the "Getting Started with AnyScript
"
tutorial because we wanted things to be simple. But think for a moment about how you would typically want
to use models. Let's imagine you have developed a model of a leg. One day you might want to simulate
squat, another day perhaps gait, and yet another day a football kick. You would want to use the same model
but with different sets of drivers. This speaks in favor of having drivers, loads, and other problem-specific
properties outside the folder containing the body model.
Calibration is actually an example of using the same model with two different movements, so we have to
place the drivers outside the ArmModel folder. In the editor, highlight the entire Drivers folder, cut it out,
and paste it in right below the end of the ArmModel folder like this: