For the following exercise, it is recommended that you have a program capable of recognizing XML tags and folding code (e.g., Notepad++ on Windows, TextMate on Mac, Sublime Text on either platform).
To teach Notepad++ to recognize XML tags in .osim files, go to Settings → Style Configurator…, select "XML" from the Language list, type "osim" in the User ext. box, and click Save & Close. (You will need to re-open your .osim file for the change to take effect.) |
The necessary files are located in the "Models/Tug_of_War" folder of the OpenSim Resources directory (by default, C:/Users/<username>/Documents/OpenSim/4.4). Locate the model file 'Tug_of_War_Millard.osim', the controls file 'Tug_of_War_Millard_controls.xml' , and the initial states file 'Tug_of_War_Millard_initial_states.sto' and copy them into your working directory. Copy the model and save it with the filename Tug_of_War_Millard_Iso.osim.
An OpenSim model is created using a series of XML elements. An XML element consists of a start tag, a value, and an end tag. The value between the start and end tags can be a string, a number, or another XML element.
Open the model file 'Tug_of_War_Millard_Iso.osim' in your favorite text editor. At the top of the file, you will find a block that indicates the presence of XML content, then an XML element called OpenSimDocument. Within the OpenSimDocument element is a Model element consisting of several model components. You may recognize the model components as categories shown in the Navigator Pane of the OpenSim GUI.
|
Create a set of files for a single muscle simulation as follows:
Open the new Isometric model in the OpenSim GUI.
Configure the Forward Dynamics Tool as follows:
Zajac (1989) showed that the ratio between the tendon slack length and the optimal muscle fiber length () can have a substantial effect on the mechanical response of a muscle–tendon actuator. In this section, you will vary this ratio and examine the mechanical response of the muscle–tendon actuator during isometric contractions.
Set the block_tz coordinate to zero and lock the coordinate in the GUI.
Run a forward dynamic simulation of isometric contraction using tendon-to-fiber length ratios of 0.5, 1.0, 2.0, 4.0, and 7.0. For each ratio, ensure the sum of the tendon slack length and the optimal fiber length is constant (i.e., ). Perform the following tasks for each tendon-to-fiber length ratio:
In this section, you will evaluate the effect of the ratio between the tendon slack length and the optimal fiber length on an isokinetic (i.e., constant-velocity) contraction. The motion you will be using to calculate muscle forces is 1 second in duration and moves the cube at a speed of 0.1 m/s.
Copy the motion file "Tug_of_War_ConstantVelocity.sto" from the "Models/Tug_of_War" folder into your working directory. Unlock the block_tz coordinate in the OpenSim GUI. Load the motion into the OpenSim GUI and play the animation.
For the same set of tendon-to-fiber length ratios (0.5, 1.0, 2.0, 4.0, and 7.0), you will analyze an isokinetic contraction. For each ratio, ensure the sum of the tendon slack length and the optimal fiber length is constant (i.e., ). Use the controls from the previous section. To calculate the muscle forces, you will use the Analyze Tool to recreate the force profiles given the known information. As discussed in the introduction to this example, the activation, fiber length, and fiber shortening/lengthening velocity are needed to calculate the muscle force using a Millard2012EquilibriumMuscle model. The loaded motion for the block kinematics is used to calculate the muscle fiber length and velocity at each time step. The Analyze Tool uses this information to calculate the muscle force applied to the block.
For more background on the Analyze Tool, see the Analyses page in the User Guide.
Perform the following tasks for each tendon-to-fiber length ratio:
You win the competition by getting the center of the block onto your side of the arena at the end of a 1.0-second simulation. For this competition, start with a copy of the original Tug_of_War_Millard.osim model file.
The design variables that you can modify to create your competitor are:
– Maximum isometric muscle fiber force
– Optimal muscle fiber length
– Tendon slack length
– Muscle fiber pennation angle at optimal fiber length
– Muscle excitation time history
– Total length of muscle–tendon actuator
– Activation time constant
– Deactivation time constant
– Maximum contraction velocity normalized by optimal fiber length
– Muscle volume
– The Z-coordinate of the muscle's attachment point on the ground body
The muscle must obey the following physical relationships:
– The specific tension of the muscle at its maximum isometric force (from Zajac, 1989).
, where
is the cross-sectional area of the muscle,
is the optimal fiber length of the muscle, and
is the muscle volume.
, where
is the distance between the origin of the muscle (on the ground) and its attachment point (on the block) at the beginning of the simulation. Note that
must be set so this constraint is satisfied.
To be a valid entry for the design competition, your muscle must satisfy the following constraints:
Note that you can adjust
to satisfy this constraint.
(i.e., the max_contraction_velocity muscle property must be between 2 and 10)
(constraint on excitation signal)
The initial activation will be 0.01 and the initial fiber length will be determined by the equilibrium condition. To match these conditions in your testing, make sure your muscle's default_activation is 0.01 and enable "Solve for equilibrium for actuator states" when using the ForwardTool.
Before you begin creating muscles, write down your conceptual strategy for building the best muscle possible.
Design your muscle and complete the design report in the questions section.
Next: Questions: Muscle Design for Tug-of-War Home: Pulling Out the Stops: Designing a Muscle for a Tug-of-War Competition |