Specifications
75
tEnd
Ah, you guessed it already. This is the time at which the study ends. Contrary to tStart, this often
has to be set by the user. The standard value is tEnd = 1.0, and if you want your study to span
any more or less time, you have to set tEnd manually. A very common modeling mistake is to
define data-based drivers such as the AnyKinEqInterPolDriver with a time span exceeding the
interval from 0 to 1 and then wondering why only a small part of the movement interval gets
simulated. In this case, the user must manually specify tEnd to correspond with the end of the
driver time span.
nStep
AnyBody analyzes movement in discrete time steps, and nStep specifies how many steps the
system should use to come from tStart to tEnd. The steps are equidistant, and since tStart is
always the first analysis time, and tEnd the last, the interval gets divided into nStep-1 equal
intervals. The default value is nStep=100, which for most purposes is a very fine resolution. If you
have a large and time-consuming model, it might be a good idea to manually set nStep to a
smaller number.
The first line of the study reads
AnyFolder &Model = .MyModel;
Notice that the first word of that line is a type definition: "AnyFolder". The predefined properties we have
just discussed need no type definition because the study already knows them. They are already defined and
merely get new values by the assignments we may specify. So the type definition at the beginning of this
line indicates that this property is an addition to the study; something that was not known already. This is
an important point to understand about studies: You can add almost anything to a study and the study does
not need to know its type in advance.
The significance of adding something to a study is that whatever you add becomes a part of what the study
executes. This particular line defines a variable called "Model" and sets it equal to .MyModel. If you look at
the beginning of the AnyScript file, you will see that MyModel is really the folder containing the entire model
the system has generated for you (we refer to it as .MyModel with a leading dot because it is one brace up
compared to where it is referenced from). This means that the entire model comes under influence of the
study. Instead of this line, we could simply have pasted the entire contents of the braces defining the
MyModel in at this place, and in some sense, this is precisely what we have done. The ampersand '&' in front
of "Model" means that Model does not get replicated inside the study. Instead, the '&' means that the study
merely contains a pointer to MyModel. The concept of pointers should be very familiar to you if you have any
experience in C, C++, or Java programming. If not, simply think of a pointer as a handle to something that's
defined elsewhere. Whenever you access it, you are actually handling what it is pointing to.
Instead of including the entire model, we could have chosen to point to some of the sub folders of MyModel.
This would mean that the study would work on just a subset of the model, and it can be very relevant in
some cases. One of the more important is examples is for calibration of muscles as we shall see in the
forthcoming lesson on Calibration Studies
.
The elements of a study
When you define an AnyBodyStudy, regardless of what you include between the braces of the study, the
result is four standard operations that appear in the study tree. They each represent something you can do
to the model elements the study is pointing at:
• ModelInformation dumps statistics of the mechanical system and is mainly a model debugging tool.
• SetInitialConditions reads the values of whatever drivers you have included in the study and puts
the model in the position of these drivers at time tStart. This is done in a multi-step process: The
model is initialized into the initial positions from load time, and the kinematics is subsequently
solved in a few steps (more details can be found in the reference manual
). This is particularly useful
for inspection of the specified initial positions when having problems with the initial configuration of
the mechanism.
• KinematicAnalysis. A kinematic analysis is a simulation of the movement of the model without










