Skip to content

Commit e874dee

Browse files
melundJacob Hilmar Adamsen
and
Jacob Hilmar Adamsen
authored
Muscle modeling updates (#40)
* Updates to Muscle Modeling Tutorial * Update of intro image in Muscle Modeling * Added label to Chapter for reference --------- Co-authored-by: Jacob Hilmar Adamsen <[email protected]>
1 parent 94c7bbd commit e874dee

File tree

11 files changed

+295
-97
lines changed

11 files changed

+295
-97
lines changed
-78.1 KB
Binary file not shown.
554 KB
Loading

Muscle_modeling/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
::: {rst-class} break
22
:::
33

4+
(MuscleModeling)=
45
# Muscle Modeling
56

67
This tutorial introduces the many facilities for modeling muscles in the

Muscle_modeling/intro.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33

44
# Introduction to Muscle Modeling
55

6-
![Muscles back](_static/intro/image1.jpeg)
6+
```{image} _static/intro/image1.png
7+
:alt: Muscles back
8+
:align: center
9+
:width: 50%
10+
```
711

812
Muscles are the actuators of living bodies. They are activated by the
913
central nervous system (CNS) by a complicated electro-chemical process.
@@ -15,14 +19,14 @@ the user to the necessary muscle forces in a process known as inverse
1519
dynamics. To do so, the system must know the properties of the muscles
1620
involved, and this is where muscle modeling comes into the picture.
1721

18-
AnyBody contains four different muscle models ranging from simple to
19-
more complicated physiological behavior. The simplest model just assumes
20-
a constant strength of the muscle regardless of its working conditions.
21-
The more complicated models take such conditions as current length,
22-
contraction velocity, fiber length, pennation angle, tendon elasticity,
23-
and stiffness of passive tissues into account. Please refer to the
24-
AnyScript Reference Manual (Find it in AnyBody->Help) for concise
25-
information about the available muscle models:
22+
AnyBody contains four different muscle models ranging from simple to more
23+
complicated physiological behavior. The simplest model just assumes a constant
24+
strength of the muscle regardless of its working conditions. The more
25+
complicated models take such conditions as current length, contraction velocity,
26+
fiber length, pennation angle, tendon elasticity, and stiffness of passive
27+
tissues into account. Please refer to the AnyScript Reference Manual (Find it in
28+
AnyBody->Help->AnyScript Reference) for concise information about the available
29+
muscle models:
2630

2731
1. AnyMuscleModel - assuming constant strength of the muscle
2832
2. AnyMuscleModel3E - a three element model taking serial and parallel

Muscle_modeling/lesson1.md

+33-18
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ Main = {
7373
When you load the model, open a model view window, and run the
7474
SetInitialConditions operation, you should get the following picture:
7575

76-
![simple model](_static/lesson1/image1.jpeg)
76+
```{image} _static/lesson1/image1.jpeg
77+
:alt: simple model
78+
:align: center
79+
```
7780

7881
The model has a driver, so you can run the kinematic analysis and see
7982
the movement. The arm flexes about the origin of the red reference
@@ -95,7 +98,10 @@ If you pick the Classes tab in the right-hand side of the window, then
9598
you will get access to the class tree. Expand the tree as shown in the
9699
picture until you get to the AnyMuscleModel.
97100

98-
![class tree](_static/lesson1/image2.png)
101+
```{image} _static/lesson1/image2.png
102+
:alt: class tree
103+
:align: center
104+
```
99105

100106
Notice that this class has three derived classes. These are more
101107
advanced muscle models, and we shall get to those later. However for the
@@ -185,23 +191,26 @@ Place the cursor right after the end brace of the musle model,
185191
right-click the AnyMuscleViaPoint class in the tree, and insert an
186192
instance of it:
187193

188-
![class tree AnyMuscleViaPoint](_static/lesson1/image3.png)
194+
```{image} _static/lesson1/image3.png
195+
:alt: class tree AnyMuscleViaPoint
196+
:align: center
197+
```
189198

190199
```AnyScriptDoc
191200
AnyMuscleModel SimpleModel = {
192-
      F0 = 100;
193-
//Lf0 = 0;
194-
//Vol0 = 0;
195-
   };
196-
197-
§ AnyMuscleViaPoint <ObjectName> = {
198-
//RefFrames = ;
199-
//Surfaces = ;
200-
AnyMuscleModel &<Insert name0> = <Insert object reference (or full object definition)>;
201-
AnyRefFrame &<Insert name0> = <Insert object reference (or full object definition)>;
202-
AnyRefFrame &<Insert name1> = <Insert object reference (or full object definition)>;
203-
//AnyRefFrame &<Insert name2> = <Insert object reference (or full object definition)>; You can make any number of these objects!
204-
};§
201+
   F0 = 100;
202+
//Lf0 = 0;
203+
//Vol0 = 0;
204+
};
205+
206+
§ AnyMuscleViaPoint <ObjectName> = {
207+
//RefFrames = ;
208+
//Surfaces = ;
209+
AnyMuscleModel &<Insert name0> = <Insert object reference (or full object definition)>;
210+
AnyRefFrame &<Insert name0> = <Insert object reference (or full object definition)>;
211+
AnyRefFrame &<Insert name1> = <Insert object reference (or full object definition)>;
212+
//AnyRefFrame &<Insert name2> = <Insert object reference (or full object definition)>; You can make any number of these objects!
213+
};§
205214
```
206215

207216
Let us start by filling out what we can and removing what we have no use
@@ -265,13 +274,19 @@ window unless you specifically ask for it. When you load the model and
265274
run the SetInitialConditions study you will get the following picture
266275
(if your model does not load, and you cannot find the error, {download}`clickhere to download a model that works <Downloads/MuscleDemo.1.any>`):
267276

268-
![simple model with muscle](_static/lesson1/image4.jpeg)
277+
```{image} _static/lesson1/image4.jpeg
278+
:alt: simple model with muscle
279+
:align: center
280+
```
269281

270282
Notice that the muscle is now able to balance the gravity, and we are
271283
able to run the InverseDynamicAnalysis. If you try it out and
272284
subsequently open a chart view, you are able to plot the muscle force:
273285

274-
![muscle force](_static/lesson1/image5.png)
286+
```{image} _static/lesson1/image5.png
287+
:alt: muscle force
288+
:align: center
289+
```
275290

276291
The muscle force is the item Fm in the list of properties you can plot
277292
for a muscle. As you can see, lots of other properties are available,

Muscle_modeling/lesson2.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,19 @@ AnyDrawMuscle drw = {};
1414
It obviously does not contain much, so every setting is at its default
1515
value leading to the following display of the muscle:
1616

17-
![simple model with muscle](_static/lesson2/image1.jpeg)
17+
```{image} _static/lesson2/image1.jpeg
18+
:alt: simple model with muscle
19+
:align: center
20+
```
1821

1922
Let us play around with the settings a bit. An easy way to display all
2023
the settings is to discard our manually defined AnyDrawMuscle object and
2124
insert a template from the class tree instead:
2225

23-
![class tree AnyDrawMuscle](_static/lesson2/image2.gif)
26+
```{image} _static/lesson2/image2.gif
27+
:alt: class tree AnyDrawMuscle
28+
:align: center
29+
```
2430

2531
Erase the previous AnyDrawMuscle, right-click the AnyDrawMuscle in the
2632
tree view, and insert an instance:
@@ -130,7 +136,10 @@ how the muscle force goes up drastically with the reduced moment arm:
130136
Consequently the muscle now bulges more towards the end of the movement
131137
than it does in the beginning:
132138

133-
![Chart view Muscle1.Fm](_static/lesson2/image3.gif)
139+
```{image} _static/lesson2/image3.gif
140+
:alt: Chart view Muscle1.Fm
141+
:align: center
142+
```
134143

135144
The muscle thickness does not have to reflect force. Choosing other
136145
values for the Bulging property will give other results:
@@ -162,7 +171,10 @@ AnyDrawMuscle drw = {
162171
When you reload and run the InverseDynamicAnalysis, you will notice that
163172
the red shade of the muscle changes as its activity grows:
164173

165-
![Simple model two positions](_static/lesson2/image4.jpeg)
174+
```{image} _static/lesson2/image4.jpeg
175+
:alt: Simple model two positions
176+
:align: center
177+
```
166178

167179
When the activity is zero, the color defaults to a rather pale red. You
168180
can control this "initial" value of the scaled color through the

Muscle_modeling/lesson3.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,18 @@ Anatomically, via point muscles are mostly found in the lower
2424
extremities and in the spine, while the arms and shoulders almost
2525
exclusively have wrapping muscles.
2626

27-
![Old leg Muscle wrapping](_static/lesson3/image1.jpeg)
27+
```{image} _static/lesson3/image1.jpeg
28+
:alt: Old leg Muscle wrapping
29+
:align: center
30+
```
2831

2932
*Most muscles in the legs can be modeled
3033
reasonably with via point muscles.*
3134

32-
![Deltoid muscles](_static/lesson3/image2.jpeg)
35+
```{image} _static/lesson3/image2.jpeg
36+
:alt: Deltoid muscles
37+
:align: center
38+
```
3339

3440
*The deltoid muscle wraps over the head
3541
of the humerus.*
@@ -125,7 +131,10 @@ AnyMuscleViaPoint Muscle1 = {
125131

126132
The figure below shows the result:
127133

128-
![Simpel model with via point muscle](_static/lesson3/image3.jpeg)
134+
```{image} _static/lesson3/image3.jpeg
135+
:alt: Simple model with via point muscle
136+
:align: center
137+
```
129138

130139
A muscle can pass through an unlimited number of via points, and the
131140
points can be attached to different segments. This can be used to create

Muscle_modeling/lesson4.md

+20-5
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ insertion point of the cylinder is at {0, 0, 0.2} corresponding exactly
8383
to half of the length of the cylinder of 0.4. This causes the cylinder
8484
to be inserted symmetrically about the xy plane as illustrated below:
8585

86-
![wrapcylinder](_static/lesson4/image1.jpeg)
86+
```{image} _static/lesson4/image1.jpeg
87+
:alt: Wrap cylinder
88+
:align: center
89+
```
8790

8891
The cylinder direction is always z in the coordinate direction of the
8992
object that the cylinder is inserted into. So, if the cylinder does not
@@ -109,7 +112,10 @@ AnyRefNode CylCenter = {
109112

110113
&#160;Which causes the cylinder to rotate 20 degrees about the y axis.
111114

112-
![wrap cylinder rotated](_static/lesson4/image2.jpeg)
115+
```{image} _static/lesson4/image2.jpeg
116+
:alt: Wrap cylinder rotated
117+
:align: center
118+
```
113119

114120
There are a couple of things to notice about the cylinder: First of all
115121
the graphics looks like the cylinder is faceted. This is not really the
@@ -242,7 +248,10 @@ It is time to see what we have done. If you load the model and run the
242248
InverseDynamics analysis (and have done everything right), you will see
243249
the model moving through a sequence of positions like this:
244250

245-
![wrap cylinder with via point sequence](_static/lesson4/image3.jpeg)
251+
```{image} _static/lesson4/image3.jpeg
252+
:alt: Wrap cylinder with via point sequence
253+
:align: center
254+
```
246255

247256
As mentioned above, wrapping muscles can also have via points. In fact,
248257
we can easily change the via point muscle, Muscle1,  to wrap over the
@@ -269,7 +278,10 @@ to change the type from AnyMuscleViaPoint to AnyMuscleShortestPath and
269278
insert the wrapping surface and the StringMesh specification. This gives
270279
us the following result:
271280

272-
![wrap cylinder two muscles](_static/lesson4/image4.jpeg)
281+
```{image} _static/lesson4/image4.jpeg
282+
:alt: Wrap cylinder two muscles
283+
:align: center
284+
```
273285

274286
As you can see, both muscles are now wrapping over the cylinder, and we
275287
can run the InverseDynamics analysis. It seems to work, but the system
@@ -339,7 +351,10 @@ Step button rather than the run button. This will show you how the
339351
system uses the InitWrapVectors to pull the muscle to the other side of
340352
the cylinder:
341353

342-
![wrap cylinder Init wrap vectors](_static/lesson4/image5.jpeg)
354+
```{image} _static/lesson4/image5.jpeg
355+
:alt: Wrap cylinder Init wrap vectors
356+
:align: center
357+
```
343358

344359
If you keep pressing the step button you will see how the muscle now
345360
wraps on the other side of the cylinder.

0 commit comments

Comments
 (0)