Académique Documents
Professionnel Documents
Culture Documents
, y
, z
, y
, z
) = u
x
(x
) y
z
(x
) + z
y
(x
)
U
y
(x
, y
, z
) = u
y
(x
) z
y
(x
)
U
z
(x
, y
, z
) = u
z
(x
) + y
z
(x
)
So, we deduce the strain components:
xx
(x
, y
, z
) =
u
x
(x
) y
(x
) + z
(x
) =
axialstrain
..
u
x
(x
)
bendingstrain
..
y
z
+ z
(1)
yy
(x
, y
, z
) =
u
x
(x
) z
(x
) =
u
x
(x
) z
y
(2)
zz
(x
, y
, z
) =
u
x
(x
) + y
(x
) =
u
x
(x
) + y
z
(3)
y
(resp.
z
) is the curvature around the y-axis (resp. the z-axis).
In this study, we are only interested in the xx-component of the strain tensor.
Figure 19: The local coordinate system (x,y,z) of the beam element
32
3.2 The 3D stiness method
To solve the problem, we use the 3D stiness method. This method is a very used
method to compute the nodal displacements of any mechanical models.
To do that, the model must be divided into several simple beam elements interconnected
at the nodes.
Knowing the nodal forces and the geometrical and mechanical properties of the ele-
ments, the nodal displacements can be found.
3.2.1 The local stiness matrix
We rst consider the local coordinate system of a beam element as we described in the
previous section.
The two nodes have six degrees of freedom and the element is characterised by its geo-
metrical parameters:
the length of the element, L
e
the area of the element section, A
e
It is also characterised by its mechanical parameters:
the Youngs Modulus, E
the Shear Modulus, G
the second moment of inertia about the y-axis, I
y
the second moment of inertia about the z-axis, I
z
the torsion constant of the element, J
All these parameters are computed into a single matrix (12 12) called the stiness
matrix. In fact, this matrix is the characterisation of the geometrical and mechanical
properties of an element. The element stiness matrix is dened in the local coordinate
system of the beam element.
33
This matrix for one element K
local
e
is the following:
AeE
Le
0 0 0 0 0
AeE
Le
0 0 0 0 0
0
12EIz
L
3
e
0 0 0
6EIz
L
2
e
0
12EIz
L
3
e
0 0 0
6EIz
L
2
e
0 0
12EIy
L
3
e
0
6EIy
L
2
e
0 0 0
12EIy
L
3
e
0
6EIy
L
2
e
0
0 0 0
JG
Le
0 0 0 0 0
JG
Le
0 0
0 0
6EIy
L
2
e
0
4EIy
Le
0 0 0
6EIy
L
2
e
0
2EIy
Le
0
0
6EIz
L
2
e
0 0 0
4EIz
Le
0
6EIz
L
2
e
0 0 0
2EIz
Le
AeE
Le
0 0 0 0 0
AeE
Le
0 0 0 0 0
0
12EIz
L
3
e
0 0 0
6EIz
L
2
e
0
12EIz
L
3
e
0 0 0
6EIz
L
2
e
0 0
12EIy
L
3
e
0
6EIy
L
2
e
0 0 0
12EIy
L
3
e
0
6EIy
L
2
e
0
0 0 0
JG
Le
0 0 0 0 0
JG
Le
0 0
0 0
6EIy
L
2
e
0
2EIy
Le
0 0 0
6EIy
L
2
e
0
4EIy
Le
0
0
6EIz
L
2
e
0 0 0
2EIz
Le
0
6EIz
L
2
e
0 0 0
4EIz
Le
Because the assumed behaviour of the mechanical system is linear, the equations al-
lowing to link the nodal forces and displacements must be linear. Furthermore, if all the
displacements vanish, so do the forces (assuming that there is no prestress or no initial
strain).
So, the equilibrium equation of an element is F
e
= K
e
U
e
(4), where F
e
is the nodal
forces matrix and U
e
is the nodal displacements matrix.
To better describe these two last matrix, we consider an element e with its two nodes
1 and 2. The nodal displacements matrix and the nodal forces matrices are
U
T
e
=
_
x
1
; y
1
; z
1
;
x
1
;
y
1
;
z
1
; x
2
; y
2
; z
2
;
x
2
;
y
2
;
z
2
_
F
T
e
=
_
F
x
1
; F
y
1
; F
z
1
; M
x
1
; M
y
1
; M
z
1
; F
x
2
; F
y
2
; F
z
2
; M
x
2
; M
y
2
; M
z
2
_
where (x, y, z) is the local coordinate system of the considered element.
3.2.2 Transformation matrix from the local coordinate system to the global
one
For each element, the nodal forces are generally known in the global coordinate system
and the stiness matrix is written in the local one.
The equation (4) is only correct when the nodal forces and the nodal displacements
matrices are written in the same coordinate system. So, following this idea, in the local
coordinate system of the element,
F
local
e
= K
local
e
U
local
e
34
To calculate the nodal displacements in the global coordinate system, a system where
the nodal forces are known, a 3D-transformation matrix R
e
from the global system to the
local system is needed for each element.
The rotation matrix R
e
is dened so that:
F
local
e
= R
e
F
global
e
and U
local
e
= R
e
U
global
e
With that, the stiness matrix in global coordinates is obtained as:
K
global
e
= R
T
e
K
local
e
R
e
The transformation matrix is a square matrix (12 12) and is characterized as orthog-
onal matrices with determinant 1. Considering the element stiness matrix, the transfor-
mation one can be written into the following form:
_
_
_
_
r 0 0 0
0 r 0 0
0 0 r 0
0 0 0 r
_
_
_
_
where r is the direction cosines matrix associated with the x axis (the axis of the beam
element):
_
_
C
xx
C
yx
C
zx
C
xy
C
yy
C
zy
C
xz
C
yz
C
zz
_
_
and
C
Xx
= cos
xx
where angles
xx
,
yx
and
zx
are measured from global axes x,y and z with respect to the
local axis x, respectively (gure 20) .
Figure 20: The direction cosines
35
The next step is to determine the direction cosines from the global coordinates of the
nodes of the model.
We consider a beam element with its two nodes called node1 and node2. The global
coordinates of node1 are (x
1
, y
1
, z
1
) and those of node2 are (x
2
, y
2
, z
2
).
First, consider the two following particular cases where x
1
= x
2
and y
1
= y
2
.
If z
2
> z
1
, the direction cosines matrix is
_
_
0 0 1
0 1 0
1 0 0
_
_
If z
1
> z
2
, the direction cosines matrix is
_
_
0 0 1
0 1 0
1 0 0
_
_
In a more general case, we rst consider the rotation with respect to the local axis x of the
element. In this case, the direction cosines are:
C
xx
= cos
xx
=
x
2
x
1
L
e
where L
e
is the length of the element
C
yx
= cos
yx
=
y
2
y
1
L
e
C
zx
= cos
zx
=
z
2
z
1
L
e
The rest of the direction cosines is deduced as follows:
C
xy
= cos
xy
=
C
yx
D
where D =
_
C
xx
C
xx
+ C
yx
C
yx
C
yy
= cos
yy
=
C
xx
D
C
zy
= cos
zy
= 0 by convention
C
xz
= cos
xz
=
C
xx
C
zx
D
C
yz
= cos
yz
=
C
yx
C
zx
D
C
zz
= cos
zz
= D
36
3.2.3 Computing the global nodal displacements
At this stage of the analysis, a global stiness matrix for each element is created by
using a transformation matrix.
To nd the nodal displacements, the overall mechanical system need to be considered
and so, the general matrices of the system must be calculated. To do that, the total num-
ber of nodal degrees of freedom N and the degree of kinetic indeterminacy n, must be
determined. This is done by considering the system boundary conditions. The number of
supported or restrained degrees of freedom is N-n.
The key operation of the assembly process is the placement of the contribution of each
member to the master equation representative of the equilibrium of the overall system.
To deal with this issue, the nodes, the elements and the degrees of freedom of the overall
system are numbered and classied in order to get a partition into three subsets:
1. Unknown displacements (L)
2. Displacements that are known and that are not equal to zero (P)
3. Displacements that are known and that are equal to zero (S)
The rst subset has n terms and the two other ones have together N-n terms .
This classication depends on the boundary conditions of the overall system. The par-
tition of the degrees of freedom of the system induces a partition of the general matrices:
nodal forces matrix, stiness matrix and nodal displacements matrix:
F =
_
_
[F
L
]
[F
P
]
[F
S
]
_
_
and U =
_
_
[U
L
]
[U
P
]
[U
S
]
_
_
and K =
_
_
[K
LL
] [K
LP
] [K
LS
]
[K
PL
] [K
PP
] [K
PS
]
[K
SL
] [K
SP
] [K
SS
]
_
_
The general matrices of the system will be written in bolt in all the report.
As all the equations used are linear, the rows and the columns associated with zero
displacements are never taken into account into the general matrices. So, the equilibrium
equations are the following:
_
[F
L
]
[F
P
]
_
=
_
[K
LL
] [K
LP
]
[K
PL
] [K
PP
]
_ _
[U
L
]
[U
P
]
_
The unknown displacements are the solutions of the following equation systems:
[K
LL
] [U
L
] = [F
L
] [K
LP
] [F
P
]
37
3.2.4 Calculation of the
xx
strain value
Knowing the nodal displacements in the global coordinate system, the transformation
matrix dened previously is used to determine these displacements in the local coordinate
system of each element.
For each element e with its two nodes 1 and 2, the nodal displacements in the global
system are considered in the following form:
U
T
e global
=
_
x
1
; y
1
; z
1
;
x 1
;
y 1
;
z 1
; x
2
; y
2
; z
2
;
x 2
;
y 2
;
z 2
_
where (x,y,z) is the global coordinate system.
The nodal displacements in the local system of the element e are given by:
U
e local
= R
e
U
e global
where: U
T
e local
=
_
x
1
; y
1
; z
1
;
x
1
;
y
1
;
z
1
; x
2
; y
2
; z
2
;
x
2
;
y
2
;
z
2
_
and (x,y,z) is the local coordinate system of the beam element e.
To determine the
xx
strain value for each element e of the system, the equation 1 is
used.
xx
(x
, y
, z
) =
u
x
(x
) y
(x
) + z
(x
)
To calculate the derivative functions from the nodal local displacements, a nite dier-
ence method is also used. Hence, the terms of the above equation are calculated for each
element as follows:
u
x
(x
) =
x
2
x
1
L
e
where L
e
is the length of the element e
y
(x
) = y
1
L
e
_
z
(x
) = z
1
L
e
_
38
4 Model
In this part, we will describe the model used during the dissertation. The geometry,
the mechanical and geometrical parameters, the boundary conditions and the load cases
will be mentioned.
4.1 Geometry
To determine the geometry of the femur considered in this study, a 3D Abaqus model
of an actual femur was used in order to get the exact dimensions of the bone. It is based on
a CT scan of a Sawbones fourth generation composite femur and provided by Dr Phillips
[Phillips, 2011].
Based on that, a line passing through the center of each part of the femur is plotted as
illustrated in the following pictures (gure 21).
Figure 21: A line, in red, is plotted passing through the center of each part of the femur
39
The equation of each part of this line is computed in order to dene the geometry of
the femur. This is illustrated in the following graphs in three dimensions (gure 22):
Figure 22: The geometry of the femur considered during this dissertation, plotted in the
global coordinate system
40
Every portion will be divided into several elements to match with beam theory and the
3D stiness method described previously.
4.2 Mechanical and Geometrical properties
In this study, it is important to recall the fact that we only consider the cortical bone,
and thus we neglect the inuence of the trabecular bone on the mechanical behaviour of
the femur. It is obvious that this assumption will have to be taken into consideration when
the results are discussed.
For the cortical bone, as mentioned in the Literature Review, the Youngs Modulus is
taken as equal to E = 18 GPa and the Poissons ratio equal to = 0.3. The Shear Modulus
is then calculated with the following formula: G =
E
2 (1 + )
.
Concerning the geometry of the bone sections, hollow elliptical sections are considered.
Even if we mentioned in the Literature Review that the femoral sections feature between a
triangular and cylindrical cross section, an hollow elliptical shape is a good approximation.
The mechanical and geometrical parameters of the hollow ellipse drawn in the gure
23 are:
_
_
I
x
=
4
_
b +
t
2
_
_
a +
t
2
_
3
4
_
b
t
2
_
_
a
t
2
_
3
I
y
=
4
_
b +
t
2
_
3
_
a +
t
2
_
4
_
b
t
2
_
3
_
a
t
2
_
Area =
_
a +
t
2
_
_
b +
t
2
_
_
a
t
2
_
_
b
t
2
_
Perimeter =
_
2
_
_
a +
t
2
_
2
+
_
b +
t
2
_
2
_
(a b)
2
2.2
_
2
_
_
a
t
2
_
2
+
_
b
t
2
_
2
_
(a b)
2
2.2
J =
2 (2tab)
2
t Perimeter
For non symmetric sections as this is the case for the sections considered during this
study, local and principal axes dont always coincide. So, they may be subjected to asym-
metric bending since the term I
xy
doesnt vanish.
However, all the above formula and the mechanical equations (1) to (3) are only valid
when the hollow ellipse is in canonical position (center at origin, major axis along the
y-axis...) as it is illustrated in the gure 23. In this case, the local and the principal axes
coincide and the term I
xy
vanishes.
So, when we consider all the above formula, we have to make sure that the local and
the principal axes of the hollow ellipse coincide.
41
Figure 23: An hollow ellipse
Moreover to calculate the strain at any point of the section by using the equation 1, it
can be useful to determine the coordinates of a point M(x,y) located at the outer surface of
the hollow ellipse (gure 23). Taking the angle as a general parameter, the coordinates
of M are equal to:
_
_
x =
_
b +
t
2
_
cos() (5)
y =
_
a +
t
2
_
sin() (6)
This parametrisation is also only valid when the local and the principal axes of the
hollow ellipse coincide as it is the case for the one represented in the gure 23.
4.3 Muscle and ligament loading
In this study, 30 muscles are considered to act on the femur. These muscles are rep-
resented by a series of 115 point loads which correspond to the attachment points of the
muscles.
The aim of this representation is to include in the analysis as muscles as possible, so as
to create a more physiologically correct set of loadings, as we mentioned in the Literature
Review (part 2.3).
The muscle loads are obtained by an adaptive model of the lower leg studied by Luca
Modenese, based on the research of Klein Horsman et al. (2007) [Modenese et al., 2011].
A total of 30 muscles is considered and, as some muscles act over large areas of the bones
surface, 115 attachment points are also considered to deal with this problem.
Using the same model, the knee, hip and patella joints are also calculated as well as
the inertia and weight forces.
42
In order to integrate the muscle loads and the attachments sites to our model, we use
beam elements to join the attachment points to the femur as illustrated in the gure 24.
Figure 24: The complete model: in red, the femur; in blue, the rigid elements linking the
muscle attachment points to the femur
In order to transfer the loads to the femur and not to interfere in the mechanical be-
haviour of the femur, the beam elements linking the attachment points to the femur must
be extremely rigid. So, we decide that the Youngs Modulus of these elements is equal to
18000 GPa, which is one thousand times the Youngs Modulus of the femoral cortical bone.
We must mention that a too high value of the Youngs Modulus of these elements
compared to the elements that form the femur, can lead to a singular stiness matrix.
Figure 25: The modelling of the hip joint (left) and the patella joint (right)
43
4.4 Load cases
During this study, we analyse three frequent human activities: walking, stair climbing
and sitting-to-standing movements. For each of these activities, the femur is subjected to
dierent forces.
Considering all these cases allows us to optimise the modelling of the femur. Indeed,
as the structure of the femur depends strongly on the loads acting on it, it is appropriate
to consider as many load cases as possible to produce an optimised model of the femur.
Lucas model divides each of these three motions into two hundred frames, each frame
representing a load case (30 muscles loads, 115 attachment points, 3 joint loads for each
frame).
During this dissertation, it was time consuming to consider, in the model, all the frames
for each of the three motions. It is decided to consider a total number of frames equal to
68 with 28 frames for the walking case, 20 frames for the stair climbing case and 20 frames
for the sit-to-stand one.
A discussion about the dependence of the model on the number of frames considered
will be done in the part 6.3.
A example of one load case with all the muscle loads considered is given in the tables
4 and 5 and illustrated in the gure 26.
Figure 26: The representation of the frame number 22 of the walking case: in purple, the
muscle loads
44
Table 4: Muscle forces for the frame number 22 of the walking case, corresponding to
t=0.047s Part 1)
Muscles Fx(N) Fy(N) Fz(N)
ADD BREV PROS 1 0.133 0.340 0.696
ADD BREV PROS 2 0.121 0.372 0.665
ADD BREV MID 1 0.056 0.408 0.573
ADD BREV MID 2 0.059 0.436 0.544
ADD BREV DIST 1 -0.002 0.442 0.464
ADD BREV DIST 2 -0.007 0.462 0.437
ADD LONG 1 0.083 0.831 0.486
ADD LONG 2 0.070 0.836 0.473
ADD LONG 3 0.051 0.847 0.449
ADD LONG 4 0.037 0.856 0.426
ADD LONG 5 0.022 0.866 0.403
ADD LONG 6 0.007 0.872 0.385
ADD MAG DIST 1 -0.644 3.234 0.099
ADD MAG DIST 2 -0.605 3.235 0.125
ADD MAG DIST 3 -0.496 3.243 0.203
ADD MAG MID 1 -0.398 1.325 0.320
ADD MAG MID 2 -0.381 1.338 0.307
ADD MAG MID 3 -0.336 1.333 0.302
ADD MAG MID 4 -0.323 1.342 0.291
ADD MAG MID 5 -0.286 1.336 0.291
ADD MAG MID 6 -0.277 1.342 0.284
ADD MAG PROX 1 -0.121 0.346 0.363
ADD MAG PROX 2 -0.149 0.416 0.265
ADD MAG PROX 3 -0.113 0.426 0.256
ADD MAG PROX 4 -0.087 0.436 0.238
BIC FEM CB 1 -0.770 -12.245 -0.811
BIC FEM CB 2 -0.997 -11.301 -1.330
BIC FEM CB 3 -1.279 -9.505 -1.736
GASTR LAT 1 -7.581 -4.618 -0.585
GASTR MED 1 -136.696 -50.090 -23.351
GEM INF 1 -3.010 2.506 3.513
GEM SUP 1 -1.204 2.565 2.033
GLUT MAX SUP 1 2.018 8.074 3.547
GLUT MAX SUP 2 0.818 12.425 5.171
GLUT MAX SUP 3 -2.115 16.532 6.699
GLUT MAX SUP 4 2.318 7.412 3.244
GLUT MAX SUP 5 1.632 11.703 4.850
GLUT MAX SUP 6 -0.706 16.207 6.535
GLUT MAX INF 1 -0.495 1.950 1.374
GLUT MAX INF 2 -0.414 1.657 1.030
GLUT MAX INF 3 -0.402 1.449 0.785
GLUT MAX INF 4 -0.387 1.954 1.335
GLUT MAX INF 5 -0.331 1.683 1.009
GLUT MAX INF 6 -0.352 1.478 0.775
GLUT MED ANT 1 2.043 0.903 0.804
GLUT MED ANT 2 2.077 0.758 0.844
GLUT MED ANT 3 2.102 0.576 0.911
GLUT MED ANT 4 2.068 0.893 0.732
GLUT MED ANT 5 2.079 0.794 0.798
GLUT MED ANT 6 2.076 0.667 0.905
GLUT MED POST 1 2.822 2.384 1.210
GLUT MED POST 2 2.534 3.270 2.072
GLUT MED POST 3 2.947 5.796 4.433
GLUT MED POST 4 2.754 2.515 1.217
GLUT MED POST 5 2.489 3.485 2.241
GLUT MED POST 6 3.015 5.846 4.271
45
Table 5: Muscle forces for the frame number 22 of the walking case, corresponding to
t=0.047s (Part 2)
Muscles Fx(N) Fy(N) Fz(N)
GLUT MIN ANT 1 2.592 2.100 1.723
GLUT MIN MID 2 1.668 2.272 1.756
GLUT MIN POST 3 1.241 3.025 2.431
ILIACUS LAT 1 0.711 0.594 0.437
ILIACUS LAT 2 0.711 0.594 0.437
ILIACUS LAT 3 0.711 0.594 0.437
ILIACUS MID 1 1.382 1.154 0.849
ILIACUS MID 2 1.382 1.154 0.849
ILIACUS MID 3 1.382 1.154 0.849
ILIACUS MED 1 0.817 0.682 0.502
ILIACUS MED 2 0.817 0.682 0.502
ILIACUS MED 3 0.817 0.682 0.502
OBT EXT SUP 1 0.661 -0.654 3.181
OBT EXT SUP 2 0.673 -0.666 3.236
OBT EXT SUP 3 0.693 -0.686 3.334
OBT INT 1 -6.979 7.784 11.718
OBT INT 2 -6.979 7.784 11.718
OBT INT 3 -6.979 7.784 11.718
PECTINEUS 1 0.264 0.415 0.547
PECTINEUS 2 0.231 0.411 0.548
PECTINEUS 3 0.194 0.430 0.528
PECTINEUS 4 0.233 0.307 0.610
PIRIFORME 1 -2.057 10.337 11.083
PLANTARIS 1 -0.690 -0.606 -0.025
POPLITEUS 1 -1.005 -1.473 0.899
POPLITEUS 2 -1.005 -1.473 0.899
PSOAS MAJ 1 2.042 1.705 1.255
PSOAS MAJ 2 2.042 1.705 1.255
PSOAS MAJ 3 2.042 1.705 1.255
QUAD FEM 1 -0.786 0.366 2.469
QUAD FEM 2 -0.780 0.743 2.381
QUAD FEM 3 -0.835 1.044 2.070
QUAD FEM 4 -0.867 1.271 1.633
VASTUS INTERM 1 0.697 -2.235 0.219
VASTUS INTERM 2 0.536 -2.276 0.241
VASTUS INTERM 3 0.438 -2.293 0.277
VASTUS INTERM 4 0.612 -2.252 0.282
VASTUS INTERM 5 0.468 -2.288 0.270
VASTUS INTERM 6 0.401 -2.300 0.274
VASTUS INTERM 7 0.831 -2.199 -0.032
VASTUS INTERM 8 0.875 -2.166 0.266
VASTUS LAT INF 1 0.400 -0.523 0.062
VASTUS LAT INF 2 0.290 -0.591 0.062
VASTUS LAT INF 3 0.144 -0.638 -0.101
VASTUS LAT INF 4 0.166 -0.639 -0.037
VASTUS LAT INF 5 0.168 -0.638 0.051
VASTUS LAT INF 6 0.146 -0.639 0.089
VASTUS LAT SUP 1 1.643 -10.651 1.740
VASTUS LAT SUP 2 1.201 -10.791 1.135
VASTUS MED INF 1 0.966 -1.227 0.924
VASTUS MED INF 2 1.152 -1.319 0.476
VASTUS MED MID 1 1.639 -3.631 1.602
VASTUS MED MID 2 1.843 -3.873 0.183
VASTUS MED SUP 1 0.547 -1.517 0.395
VASTUS MED SUP 2 0.467 -1.590 0.103
VASTUS MED SUP 3 0.432 -1.554 0.392
VASTUS MED SUP 4 0.364 -1.613 0.145
VASTUS MED SUP 5 0.299 -1.625 0.161
VASTUS MED SUP 6 0.299 -1.625 0.161
46
4.5 Boundary conditions
As we mentioned in the Literature Review (part 2.4), the choice of the boundary con-
ditions applied to the system has an important inuence on the mechanical results. We
noticed that xing the knee joint (localised at the centre of the condyles) in three spatial
directions and forcing the femoral head to move along an axis towards the knee center and
xing a node on the lateral epicondyle present the best results [Speirs et al., 2007].
In this study, we decide to x only the knee joint in its six degrees of freedom. Adopting
this boundary condition, the mechanical problem is entirely determined.
Even if this boundary condition is not the most physiological one, it has the advan-
tage to be easy to implement in the algorithm. A further study about the inuence of the
boundary conditions on the model can be interested in the future.
The boundary condition considered in the model is illustrated in the gure 27.
Figure 27: The boundary condition at the knee joint considered in the dissertation
The reactions forces and the moments at the knee joint will be computed in order to be
compared to those given by Lucas model. This comparison will allow us to explain some
results.
47
5 The iterative algorithm
5.1 Presentation and objective of the algorithm
The iterative algorithm is used to calculate the optimal femoral sections and it is based
on the Mechanostat Concept described in the Literature Review (part 1.3).
According to the Mechanostat concept, we notice the existence of strain thresholds for
which bone is created or resorbed (gure 4). In the lazy zone between 1000 and 1500,
there is no change in bone structure and we can consider that the structure of the bone
whose the strain values lie in this zone, is stable and wont change. Bones are only sensitive
to the highest mechanical solicitations and stimuli, and that why we only work with the
maximum strain values.
The objective of the iterative algorithm is to optimise the femoral cross sections in
order that the absolute maximum strain values of all the cross-sections due to various load
combinations lie in the lazy zone. In all this dissertation, we work with absolute strain
values.
To optimise the hollow elliptical cross-sections, we consider four variables to parameter
totally the problem. Each cross-section is characterised by two radius R
1
and R
2
, by a
constant thickness t and by an angle (gure 28).
Figure 28: Four variables are chosen to parameter totally the cross-section
The algorithm will change the values of these four variables for each cross-section of
the model in order that its absolute maximum strain value lies in the lazy zone at the end
of the analysis.
Nevertheless, if we analyse the problem carefully, there are four variables to optimise
as the only constraint of the problem is the strain value for each element. Because of that,
48
there is not an unique solution but several couples (R
1
, R
2
, , t) can satisfy the problem, a
problem that becomes relatively sensitive to the initial conditions considered.
Hence, this problem seems to be undetermined and some assumptions need to be taken
in order to solve it. Each variable will be optimised independently step-by-step in order to
converge to a solution. In order to make sure that the solution is the optimal one for our
specic problem, we limit the values taken by the variables based on the actual geometry
of the femur. For instance, the thickness value of a cross-section must lie in an interval
[0.1, maxt] where maxt is dened by us and reects the maximum thickness value of an
actual femur. Likewise, the radius parameters must lie in an interval dened by two con-
stants minR and maxR so that: minR R
1
, R
2
maxR.
The algorithm has changed several times during the dissertation and we only describe
its general idea in the following. All the mechanical calculations (nodal displacements,
strain values...) are performed by the 3D stiness method we described previously.
5.2 Optimisation of the angle
We begin the iterative algorithm by optimizing the angle of the hollow ellipse. To
optimise this parameter, we make a common assumption described in some articles. We
assume that the orientation of maximum bending rigidity reects the orientation of peak
or habitual bending forces the bone experiences [Lieberman et al., 2004]. In other words,
the principal bending axes of the section are orientated according to the maximum bending
strain value reached by the section due to the surrounding forces. By making sure that
the maximum strain value of the section is located at the minor principal bending axis, we
assume that the bone section is oriented in such a way that it can withstand the forces in
an optimal way.
Figure 29: Optimisation of the angle. (y,z) is the local coordinate system of the section
and (y
1
,z
1
) is the bending principal axes of the section. At the end, the maximum strain
value is located at the minor principal bending axis.
49
In the literature, some experimental studies show that this assumption is not really
correct for long bones as illustrated in the gure 30. Demes carried out experimental
studies on the tibia. She calculated the localization of both the Zero Strain neutral axis
and the maximum principal axis and she determined the angle between the two axes.
[Demes, 2007]. The assumption we make to optimise states that these two axes coincide
which is not always the case.
Nevertheless, the dierences between the experimental results and those found by con-
sidering the assumption are not really important (between 10 and 20depending on the
load cases that are considered). Moreover, it represents the only way to x the angular
parameter.
Figure 30: Dierence between the localization of the maximum principal axis and the Zero
strain neutral axis [Demes, 2007]
50
The iterative algorithm consists in making sure that the maximum strain value calcu-
lated for a section is located at the minor principal bending axis.
We initialise the algorithm with R
1
= 13mm, R
2
= 15mm and t = 5mm, making the
y-axis, the major principal bending axis.
The following diagram shows the working of the algorithm to optimise the angle of the
hollow ellipse:
For each element, this process is repeated for all the load cases we want to consider.
So, at the end, for each element, there are N maximum bending strain values for N frames
considered. We choose the maximum of these values and we rotate the element to the
angle associated.
51
5.3 Optimisation of the three geometrical parameters R
1
, R
2
and
t
Once the angle for each element is determined, the sections are rotated once and for
all (see gure 31), so that all the equations described in the parts 4.2 and 3.2.4 can be
applied without any problem. The local and the principal axes coincide.
The objective is now to determine the three variables so that, when all the load cases
are considered, the maximum strain value reached by each element lies in the lazy zone.
As we notice previously, this problem is undetermined because we have to deal with three
parameters and we have only one constraint.
To nd a solution, we optimise step-by-step these three variables independently. The
general idea of the algorithm is described in the table 6.
The stage 5 of the algorithm (see table 6) is an important one. To explain it, we consider
a step in which the variable t is optimised. At the end of the stage 4, for each element, we
determine N optimised values of t corresponding to the N load cases considered.
At the stage 5, we determine the maximum of these values for each element and we
state that the element thickness is equal to this maximum. So, by doing that, we are sure
that the structure withstands all the possible combination of loads applied on it.
The optimisation is nished once the three parameters converged.
5.3.1 Optimisation of the parameter t
In this part, we describe the stage 4 of the algorithm (see table 6). We consider a step
in which the variable t is optimised and a particular load case, i.
We dene a target strain value
t
equal to 1250 which is the center of the lazy zone.
The aim of that is to force the absolute maximum total strain value of each element to
converge towards this target value.
As said previously, the maximum total strain value is decomposed into two contribu-
tions : the axial strain
a
and the maximum bending strain
b
.
In this step, we want to optimise the thickness of all the elements for the load case, i,
considered. To do that, we dene a target axial strain value
at
=
t
|
a
a
+
b
|.
52
Table 6: The optimisation algorithm
53
The cross sectional area for each beam element bears direct proportionality to its axial
stiness according to the stiness matrix and so, the section area is adjusted by using the
target axial strain value:
A
i+1
= A
i
|
at
|
where A
i
is the cross sectional area of the previous step.
Knowing the new area value of each element, we can determine the thickness value by
using the equation linking the area of the hollow ellipse to its thickness.
To do that, the Newton Method is used and the thickness value is controlled in order
to lie in the following interval: [0.1; maxt] as mentioned in the part 5.1.
This process is repeated for all the N load cases we want to consider. At the end of
the stage 4, there are N optimized thickness values for each element associated with the N
load cases.
5.3.2 Optimisation of the parameter R
1
We now consider a step in which the parameter R
1
is optimised. Following the same
principle mentioned previously, we dened a target bending strain value
bt
equal to
t
|
b
a
+
b
|
The maximum bending strain value of an element can be also decomposed into two
contributions:
y
z
+ z
y
=
bz
+
by
Based on that, we can also dene a new target strain value based on these two contri-
butions:
_
by
t
=
bt
|
by
by
+
bz
bz
t
=
bt
|
bz
by
+
bz
|
According to the stiness matrix, bending stiness has a direct proportionality with
the second moment of area of the section. Changing the second moment of area regulates
the bending strains. As the second moment of area about the z-axis is more sensitive to
changes in R
1
as dened in the gure 31, we consider I
z
to optimise R
1
. So:
I
i+1
z
= I
i
z
|
bz
bz
t
|
Knowing the new second moment of area value I
z
of each element, we can determine
the new radius R
1
value by using the equation linking the second moment of area of the
hollow ellipse to this radius.
54
The solution R
1
is also found by using the Newton Method and must lie in the interval
[minR, maxR] as mentioned in the part 5.1.
5.3.3 Optimisation of the parameter R
2
We now consider a step in which the parameter R
2
is optimised. As the second moment
of area about the y-axis is more sensitive to changes in R
2
as dened in the gure 30, we
consider I
y
to optimise R
2
. So:
I
i+1
y
= I
i
y
|
by
by
t
|
Knowing the new second moment of area value I
y
of each element, we can determine
the radius R
2
value by using the equation linking the second moment of area of the hollow
ellipse to this radius by using the Newton Method. We control that R
2
lies in the interval
[minR, maxR] as mentioned in the part 5.1.
Figure 31: Hollow ellipse after rotation
55
Part V
Results
6 Sensitivity studies
In this part, we want to study the dependence of our algorithm on some inputs of the
model: the number of load cases considered, the number of elements used to represent the
femur....
As a modelling algorithm, there are a multitude of options available to run it and it is
interested as a rst approach to study their inuence.
All values are plotted against the vertical coordinate as measured from the distal end of
the femur. The 3D stiness method implemented in the algorithm was tested independently
with GSA.
6.1 Dependence on the number of elements
In this part, we want to study the dependence of the algorithm on the number of ele-
ments used. The aim of the algorithm is to reduce the computational time comparatively
to the nite element models. This requires that the number of elements used to model the
femur must be also minimize.
To analyse this inuence, we consider two cases. The only dierence between these two
models is the number of elements used to represent the shaft of the bone.
For the rst case, we use 20 elements and for the other one, we use 40. The inputs of
the algorithm which dont change, are summarised in the following table:
R
initial
1
= 13mm R
initial
2
= 15mm
t
initial
= 5mm number of load cases considered = 68
mint = 0.1mm maxt = 8mm
minR = 12mm maxR = 30mm
Number of load cases used to x = 28 walking load cases .
The results are illustrated in the gure 32.
It is interesting to notice that there is little dierence between the results found for
the two cases. Despite some small dierences, the two cases give similar variations of the
parameters across the elements representative of the shaft of the femur.
56
Figure 32: Dependence of the algorithm on the number of elements used to represent the
shaft of the femur: in blue, 20 elements; in red, 40 elements
57
This result is relatively important to mention because it means that 20 elements for the
shaft is sucient to have signicant results. Nevertheless, as the attachment points of the
muscles are directly linked to the nodes of the shaft, we cant reduce too much the number
of elements in order not to sacrice precision regarding to the muscle loads.
Moreover, with 20 elements, the computation time is reduced.
6.2 Dependence on the parameters optimisation order
As we described previously when we explained the general idea of the algorithm, we
mentioned the fact that we have to optimise four variables with only one constraint.
We decide to optimise the angle independently of the others because this optimisation
is based on a specic assumption.
Once this parameter found, we x it and we optimise step-by-step the three other
variables independently.
For each step, one variable is optimised as the two other ones are kept constant and
equal to the values found for their last optimisation. So, it takes three steps to optimise
the three variables. It is comparable to an optimisation cycle where the parameters are
optimised every three steps until they all converge.
There are exactly 6 possible permutations in this optimisation cycle and so, in this part,
we consider six cases described below:
1. we begin the optimisation by R
1
followed by R
2
and t
2. First, t, then R
1
and nally, R
2
3. First, t, then R
2
and nally, R
1
4. First, R
1
, then t and nally, R
2
5. First, R
2
, then R
1
and nally, t
6. First, R
2
, then t and nally, R
2
This study is important to know if the algorithm and the optimisation process really
depend on the variables optimisation order because if we consider the original problem,
there is no way that this issue has some kind of inuence on the results.
The inputs of the algorithm which dont change, are summarised in the following table:
R
initial
1
= 13mm R
initial
2
= 15mm
t
initial
= 5mm number of load cases considered = 68
mint = 0.1mm maxt = 8mm
minR = 12mm maxR = 30mm
Number of elements represented the shaft = 20 Number of load cases used to x = 28 walking load cases
58
In blue, case 1
In red, case 2
In green, case 3
In magenta, case 4
In black, case 5
In cyan, case 6
Figure 33: Dependence of the algorithm on the optimisation order of the parameters
59
The results are illustrated in the gure 33.
The results are quite interesting and show some variations between the dierent con-
sidered cases. For the parameter t, the maximum dierence is approximatively equal to
1.5mm and for the variable R
1
, it is almost 3.5mm.
It is also interesting to notice that the case 1 gives the same results as the case 4,
as it is the case for the cases 2-3 and 5-6. This means that the results depend on the
variables optimisation order and especially, depend on the variable by which we begin the
optimisation cycle.
When a parameter is optimised, the value we nd depends on the two other parameters.
For instance, if the optimisation cycle begins by the optimisation of t, the results found for
R
1
and R
2
will depend on the new thickness value. So deciding the parameter by which
the optimisation begins, forces the algorithm to converge to a specic solution.
It is obvious that the optimisation process used in the algorithm is not an ideal one
because all the variables are optimised step-by-step instead of being all optimised in one
step. Nevertheless, the dierences found between the various cases are not very important
and for a model that will be used for a preliminary analysis, we can consider that the
dependence of the algorithm on the parameters optimisation order is reasonable.
6.3 Dependence on the number of load cases considered
In this part, we want to study and underline the inuence of the number of load cases
considered in the model.
As said previously, we use Luca Modeneses model to nd the muscle and joint loads
during three motions: walking, stair climbing and sitting-to-standing. The model gives us
200 frames for each motion.
60
Figure 34: Dependence of the algorithm on the number of load cases considered: in blue,
68 load cases; in red, 3 load cases
61
In the Literature Review, we mentioned that fact that the bone adapts its structure
according to the loads applied on it. Considering a lot of load cases must allow us to create
an anatomically correct structure of the femur.
To demonstrate that, we consider two opposite situations:
1. Only three cases are considered, one for each motion. Each of these cases represents
the situation for which the amplitude of the hip joint forces are maximal. The walking
load case is used to x the parameter .
2. 68 load cases are considered, 28 for the walking case, 20 for the stair climbing case and
20 for the last one. The load cases considered in the rst situation are also considered
among all these cases. The 28 walking load cases are used to x the parameter .
The inputs of the algorithm which dont change, are summarised in the following table:
R
initial
1
= 13mm R
initial
2
= 15mm
t
initial
= 5mm Number of elements represented the shaft = 20
mint = 0.1mm maxt = 8mm
minR = 12mm maxR = 30mm
The results are illustrated in the gure 34.
We notice important dierences in the parameters values between the two considered
situations.
The parameter the most interested to analyse is the variable . As mentioned previ-
ously, is calculated from the maximum bending strain value reached by an element once
having considered all the load cases.
The fact that we nd dierent values shows that the walking case considered for the
rst situation are not the critical one for the femur.
The results concerning the three other parameters also show that considering only three
load cases can lead to an underestimation of these parameters and gives a modelling of a
femur that cant withstand all the possible load cases.
The conclusions drawn in this part are clearly obvious. Indeed, it seems that the more
load cases we consider, the better are the optimisation of the femur. The ideal case would
be to consider all the 600 frames given by Modeneses model but, in this dissertation, 68
load cases will be sucient to draw interesting conclusions.
6.4 Dependence on the load cases considered to x the parame-
ter
In this part, we want to study the inuence of the load cases considered to calculate
the parameter .
62
Figure 35: Dependence of the algorithm on the number of load cases considered to calculate
: in blue, 28 walking load cases; in red, 68 load cases
63
As mentioned previously, the determination of this parameter is based on an specic
assumption stating that the orientation of maximum bending rigidity reects the orienta-
tion of peak or habitual bending forces the bone experiences. In other words, the principal
bending axes are oriented according to the maximum bending strain value reached by the
elements.
The objective of this part is to determine which load cases we must consider to decide
the orientation of the femoral sections.
We consider two cases:
1. 28 frames from the walking case are considered to calculate the angular parameter.
In this situation, we suppose that the femoral sections are orientated according to
the most frequent human activity.
2. 68 load cases are considered, 28 for the walking case, 20 for the stair climbing case
and 20 for the last one. In this situation, we consider that the femoral sections are
oriented according to all the load cases and so the orientation is due, in this case, to
peak forces the femur experiences.
The inputs of the algorithm which dont change, are summarised in the following table:
R
initial
1
= 13mm R
initial
2
= 15mm
t
initial
= 5mm Number of elements represented the shaft = 20
mint = 0.1mm maxt = 8mm
minR = 12mm maxR = 30mm
The results are illustrated in the gure 35.
If we focus on the values taken by the parameter , we can notice a discontinuity for the
situation 2. This is due to the fact that there are dierent critical load cases for dierent
areas of the femur.
For instance, for the rst ve elements, the maximum bending strain is due to a frame
from the stair climbing case. For the other elements, the critical load is due to a frame
from the walking case. Thats why the parameters values are similar for the two situations
for the rest of the elements.
This discontinuity that appears also for the other parameters, can be due to the fact
that we only consider twenty frames for each motion and maybe, we dont choose the crit-
ical ones. Thats why it can be important to repeat this study with more frames. It can
be interesting to see if the frame from the walking motion is still the critical load case for
most of the elements.
Moreover, we can notice that the orientation of the femoral sections according to the
maximum bending strain values inuences a lot the strain distribution in the sections and
64
so, the optimisation of the other variables t, R
1
and R
2
, an optimisation based on the
strain values. Thats why we nd dierent results for the two cases.
It is dicult to determine the better case because no scientic studies have been made
on this subject and because this problem only arises due to the way our algorithm works.
There are good arguments for both cases and it is obvious that the way of how the sections
are orientated has an inuence of the optimisations of the other parameters. To draw
better conclusions, it will be interesting to repeat this study with all the frames.
Nevertheless, the thing that it is important to notice is that these two cases provide
dierent results. The way we x the angle changes the optimisation of the parameters.
65
6.5 Dependence on the constants minR and maxR
In this last sensitivity study, we study the inuence of the algorithm on the constants
minR and maxR.
As mentioned in the part 5.3, our algorithm optimises four variables according to only
one constraint. The angular parameter calculation is based on an assumption and the other
three are step-by-step optimised independently.
This problem is clearly undetermined and there is not an unique solution but several
couples (R
1
, R
2
, , t) can satisfy the problem.
We dene the constants minR, maxR , mint and maxt to control the values taken by
the parameters in order not to nd values too dierent from those of an actual femur.
But it is obvious that limiting the parameters values can have an inuence on the
solutions found by the algorithm.
The objective of this part is to analyse this inuence.
We consider the two following case:
1. maxR=30mm and minR=12mm
2. maxR=15mm and minR=8mm
We x the values of mint and maxt because (maxt,mint) has the same role as (maxR,minR)
and the conclusions drawn for this case would be the same if we changed mint and maxt
instead of minR and maxR.
The inputs of the algorithm which dont change, are summarised in the following table:
R
initial
1
(situation1) = 13mm; R
initial
1
(situation2) = 9mm R
initial
2
(situation1) = 15mm; R
initial
2
(situation2) = 10mm
t
initial
= 5mm Number of elements represented the shaft = 20
mint = 0.1mm maxt = 8mm
Number of load cases used to x = 28 walking load cases .
The results are illustrated in the gure 36.
The results are really interesting and allow us to understand and illustrate how the
algorithm works.
We can notice that the values found for the parameters R
1
and R
2
are higher for the
case 1 than for the case 2, which is normal because maxR is higher for the rst situation.
Nevertheless, we nd that the values of the thickness is higher for the situation 2. This
can be explained by the fact that the decrease in the R
1
and R
2
values is compensated by
an increase in the thickness value.
As we said previously, the optimisation of one parameter depends on the two others.
The fact that the R
1
and R
2
values are limited by maxR forces the algorithm to increase
the parameter t values.
66
Figure 36: Dependence of the algorithm on the constants maxR and minR: in blue,
minR=12mm and maxR=30mm; in red, minR=8mm and maxR=15mm
67
This study shows that the algorithm is sensitive to its inputs since a change in these
two constants leads to dierent solutions.
Nevertheless, we must mention the fact that limiting the values of the parameters can
prevent the absolute maximum total strain of each element from converging to the target
strain value dened in the part 5.1.
Figure 37: The maximum strain value
As we can see in the gure 37, for some elements, the maximum strain value does not
lie in the lazy zone due to limiting parameters values.
7 Discussion and Comparison to the geometry of a
real femur
Thanks to the sensitivity studies described in the previous part, we explained and il-
lustrated the working of the iterative algorithm. We show that the model is more or less
sensitive to the several inputs especially the constants maxR, minR and, to a lesser extent,
the parameters optimisation order.
This shows that several imputs combinations can lead to possible femur modelling and
it seems relatively dicult to nd one that models all the bone characteristics while keeping
the elements maximum total strain values in the lazy zone. Thats why the algorithm needs
to be improved.
68
If we analyse the experimental study realised by Stephenson et al. [Stephenson and
Seedhom, 1998], the average cortical diameter is equal to 27-28mm and the cortical thick-
ness to 6-8mm.
To get this range of values, we have to limit the interval [minR, maxR] but it will cause
the maximum total strain value of some elements no to lie in the lazy zone.
It is also interesting to notice that if we increase the maxR value, the sections have
elliptical shapes and the sectional orientation is similar to what we can observe on an
actual femur. This is obtained by considering only the walking load cases to optimise the
angular parameter.
Alfred Thibon, a MSc student, studied during his dissertation the meso-scale approach.
This approach created by Dr. Phillips is known to give accurate results [Thibon, 2011]. His
model is based on the same geometry as mine and the same load cases were considered. If
we compare the sections he found to the sections given by the algorithm, good correlation
can be found. Even if there are some problems with the dimensions of the sections, the
shape is similar (gure38).
Figure 38: GSA Model with maxR=30mm Figure 39: Alfred Thibons Model
Its dicult to conclude on which inputs combinations are the most appropriate to give
reasonable results and thats why the model needs to be improved as we will see in the
next part.
Nevertheless, we noticed that reducing the constant maxR based on the actual geometry
of the femur enables to give a good correlation because we nd sections that are more
circular and the thickness values are equal to 6-7.5 mm. But, the problem is that the
maximum total strain values may be lie outside the lazy zone.
Concerning the optimisation of the angular parameter, it is dicult to choose if we
must consider all the load cases or only the ones concerning the walking case. According
to me, I would only consider the load cases concerning the walking motion because I am
almost convinced that the sectional orientation and the external shape of the bone are due
to the most frequent activity, i.e walking. The other critical load cases as those occurring
69
during stair climbing, only change the bone volume in order to resist these loads. But no
scientic studies were found about that and we must recall that this problem arises due to
the specicity of our algorithm.
Overall, our algorithm is based on several assumptions and these simplications prevent
from getting an exact match-up with the actual geometry of the femur, but the model seems
capable to give a reasonable correlation to the actual femur.
70
Part VI
Development potential
8 Muscle loads
The muscle loads are given by the model studied by Luca Modenese. It gives relatively
good results for the majority of the muscles attached to the femur.
Nevertheless, the model gives inaccurate results for the muscles that wrap around the
bone as it happens near the knee joint. The model gives the amplitude and the direction of
the muscle loads based on the direction of the muscle tendons. But, when a muscle wraps
around the bone, its action line is totally dierent from the direction of its tendon.
Moreover, we notice that the forces and the moments given by the model dont satisfy
the mechanical equilibrium of the femur. To demonstrate that, if we compute all the forces
in a GSA model, we nd dierent forces and moments at the knee joint.
For instance, if we consider the frame number 21 corresponding to the time t=0.0987s,
Luca Modeneses model calculates the forces and the moments at the knee joint:
F
x
= 275.97N; F
y
= 2465.5262N; F
z
= 145.984N
M
x
= 59.84Nm; M
y
= 14.47Nm; M
z
= 7.192Nm
The GSA model gives the following reactions at the knee joint to equilibrate the system:
F
x
= 292.7N; F
y
= 2451N; F
z
= 140.9N
M
x
= 124.5Nm; M
y
= 7.098Nm; M
z
= 47.29Nm
This is also a consequence of the problem identied above.
As the results are based on the stain values, the optimisation algorithm is really sensitive
to the loads acting on the modelled femur. If there are some inaccuracies in the loads cal-
culation, this can lead to relatively wrong results especially for the elements representative
of the areas where the load muscles modelling remains problematic.
9 Geometry, Material Properties and Trabecular Bone
The geometry of the model is done by using a 3D Abaqus model of an actual femur as
illustrated in the part 4.1. In the model, nodes are aligned along straight axes.
71
We dont know the inuence of the geometry on the results but it could be interesting
to describe and model more precisely the distal and proximal ends of the bone in order to
simulate the stress distribution in these areas.
Then, it can be interesting to analyse the inuence of the elements linking the muscle
attachment points to the femur. For this dissertation, we consider that these elements are
very sti beam elements but the localisation of these elements was not really accurate.
Concerning the material properties of the femoral cortical bone, we choose to model
it as an isotropic material. Nevertheless, as mentioned in the Literature Review (see part
2.2), the cortical bone is described as being transversely isotropic in nature [Huiskes et al.,
1981]. It can be interesting to include this material behaviour by choosing a transverse
Youngs Modulus.
Moreover, during this dissertation, we neglect the shear deformation in order to con-
sider the Euler-Bernoulli beam bending theory. Nevertheless, it could be also interesting to
consider the shear deformations because Timoshenko beam theory provides more accurate
displacements and so strain values. Implementation of this theory involves the modication
of the stiness matrix described in the part 3.2.1.
Finally, we choose to neglect the inuence on the trabecular bone. This simplication
need to be seriously reconsidered especially to describe the behaviour of the areas located
near the hip and knee joints. To achieve that, a new material layer with a new Youngs
Modulus etc... can be included and the femur can be considered as a composite section.
This approach does not involve major complications and modications of the algorithm.
10 The algorithm
The problem is a very delicate one because four variables must be optimised according
to only one constraint. To optimise these variables, we have to make several assumptions.
These assumptions are all justied by the way that they have been used to elaborate bone
modelling algorithms.
Because of that, the algorithm is really sensitive to the several inputs of the model.
This is predominantly due to the fact that all the parameters are step-by-step optimised
independently. In other words, the optimisation of a parameter at a given step depends on
the values taken by the other parameters during their last optimisation.
This makes the problem be dependent on some factors that have no physical signica-
tions but are just tricks (maxR, minR...) in order to run the algorithm. Thus, it may
exist some inputs combinations that allow to create a model that provides good correlation
to the actual femur (see gures 38 and 39) but the diculty is to nd the one that models
all the characteristics of the bone (sections orientation, dimensions...).
The objective in the future is to reduce their inuence on the model. To do so, it
72
may be interesting to think about a better way to optimise these four variables or, even
better, to try to reduce the number of parameters. This can be done by nding empirical
relationships between the dierent parameters if it is possible, using experimental studies
about the femur geometry.
In this study, we only consider hollow elliptical cross-sections with a constant thickness.
The next step is to study sections for which the thickness is not constant anymore. I think
that this can be a very good improvement to the model.
For instance, if we consider the case where maxR is equal to 15mm, we nd circular
sections and dimensions similar to the actual femur as shows in the gures 40 and 41.
Figure 40: GSA Model with maxR=15mm Figure 41: Alfred Thibons Model
We can see that, using a constant thickness prevents the model from giving a section
that looks like the one found by the meso-scale approach. Thats why it can be interesting
to study sections with non-constant thickness.
The last point to mention is the denition of the target strain value. The algorithm is
based on the fact that the maximum total strain value of each element must converge to
this target value. The denition of this constant is a trick in order to make sure that the
maximum total strain value of each element lie in the lazy zone at the end.
The problem is that we dont know if this is really the case for an actual femur. In
other words, the total maximum strain values of each part of the femur due to the several
load cases that the bone carries are not especially equal to 1250 .
The parameters optimisation is based on this target value and thats why it may be
considered as an critical assumption. It is important to reconsider its meaning and maybe
reduce its role in the optimisation process.
73
Part VII
Conclusion
During this dissertation, we elaborate a macro-scale predictive model of the femur con-
structed using a beam structure approach.
Using the Mechanostat Concept based on the idea that the bones structure adapts to
their surrounding mechanical environment, the optimisation algorithm is based on the 3D
stiness method and the Euler-Bernoulli beam theory in order to predict the geometry of
the femur.
The model consists of the optimisation of four variables that totally parametrize the
hollow elliptical sections chosen to model the femoral cross-sections.
With only one constraint knowing the strain value that must be reached by each ele-
ment of the model, the problem is undetermined and several assumptions must be done to
solve it.
Knowing that, it is obvious that the created algorithm is dependent on the initial con-
ditions and the inputs of the problem, a dependence illustrated by the sensitivity studies
done during this dissertation and that we have to limit in the future.
Finally, even if this model demonstrates and validates the use of cross-sectional beam
analysis in the strain-adaptive modelling of the femur since correct correlation to the actual
femur is found, the dissertation also underlines the need for future improvements.
Current models based on nite element algorithms provide accurate results but the
lengthy computing times reduce the exibility of these methods.
The algorithm presented in this report requires little computational eort and its ease
of use allows us to imagine the elaboration of bigger models.
This dissertation allows to lay the foundations of a powerful algorithm, a platform for
further developments and subsequent use alongside nite element models. Nevertheless,
this new approach must be considered as a complimentary method.
By testing it during this study, we underline the further developments needed to ame-
liorate the model so that it will produce a better correlation in the future.
74
References
G. Bergmann, G. Deuretzbacher, M. Heller, F. Graichen, A. Rohlmann, J. Strauss, and
G.N. Duda. Hip contact forces and gait patterns from routine activities. Journal of
Biomechanics, 2001.
A.H. Burstein, D.T. Reilly, and M. Martens. Aging of bone tissue: Mechanical properties.
The Journal of Bone and Joint Surgery, 1976.
B. Demes. In vivo bone strain and bone functional adaptation. American Journal of
Physical Anthropology, 2007.
R.L. Drake, W.Vogl, and A.W Mitchell. Grays anatomy for students, 2004.
F.G Evans and A.L. King. Regional dierences in some physical properties of human
spongy bone. Biomechanical Studies of the Musco-Skeletal System, 1961.
H.M. Frost. From wols law to the mechanostat: A new face of physiology. Journal of
Orthopaedic Science, 1998.
H.M. Frost. Bones mechanostat: A 2003 update. The Anatomical Record, 2003.
S.A. Goldstein. The mechanical properties of trabecular bone: Dependence on anatomic
location and function. Journal of Biomechanics, 1987.
M.O. Heller, G. Bergmann, J.P. Kassi, L. Claes, N.P. Haas, and G.N. Duda. Determination
of muscle loading at the hip joint for use in pre-clinical testing. Journal of Biomechanics,
2005.
H.W.J. Huiskes. Analyses of Trabecular Bone Failure, chapter 1: General Introduction.
2006.
R. Huiskes, J.D. Jansen, and T.J. Sloof. A detailed comparison of experimental and theo-
retical stress analysis of a human femur. Mechanical properties of Bones, 1981.
John C. Koch. American Journal of Anatomy, volume 21, chapter The Laws of Bone
Architecture, pages 177298. 1917.
D.E. Lieberman, J.D. Polk, and B. Demes. Predicting long bone loading from cross-
sectional geometry. American Journal of Physical Anthropology, 2004.
R.A. Melick and D.R. Miller. Variations of tensile strength of human cortical bone with
age. Clin. Science, 1966.
Z. Miller, M.B. Fuchs, and M. Arcan. Trabecular bone adaptation with a orthotropic
material model. Journal of Biomechanics, 2001.
75
M.Martens, R. Van Audekercke, P. De Meester, and J.C. Mulier. The geometrical prop-
erties of human femur and tibia and their importance for the mechanical behaviour of
these bone structures. Archives of Orthopaedic and Traumatic Surgery, 1980.
L. Modenese, A.T.M. Phillips, and A.M.J. Bull. An open source lower limb model: Hip
joint validation. Journal of Biomechanics, 2011.
A. Nather, HJC Ong, and Z. Aziz. Bone Grafts and Bone Substitutes, chapter 1: Structure
of Bone. 2005.
A.T.M Phillips. The femur as a musculo-skeletal construct: A free boundary condition
modelling approach. Medical Engineering & Physics, 2009.
A.T.M Phillips. Structural optimisation: Biomechanics of the femur. Engineering and
Computational Mechanics, 2011.
T. R uberg. Computer simulation of adaptive bone remodelling. Masters thesis, Technische
Universitat Braunschweig, 2003.
J.Y. Rho, M.C. Hobatho, and R.B. Ashman. Relations of mechanical properties to density
and ct numbers in human bone. Med. Eng. Phys., 1995.
E.M. Setzer. A review of wols law of the transformation of bone. The Angle Orthodontist,
2004.
M. Singh, A.R. Nagrath, and P.S. Maini. Changes in trabecular pattern of the upper end
of the femur as an index of osteoporosis. The Journal of Bone and Joint Surgery, 1970.
T.M. Skerry. One mechanostat or many? modications of the site-specic response of bone
to mechanical loading by nature and nurture. J Musculoskelet Neuronal Interact 2006,
2006.
A.D. Speirs, M.O. Heller, G.N. Duda, and W.R. Taylor. Physiologically based boundary
conditions in nite element modelling. Journal of Biomechanics, 2007.
P. Stephenson and B.B. Seedhom. Cross-sectional geometry of the human femur in the
mid-third region. Proceedings of the Institute of Mechanical Engineers, 1998.
J.A. Szivek, J.B. Benjamin, and P.L. Anderson. An experimental mehod for the appli-
cation of lateral muscle loading and its eect on femoral strain distributions. Medical
Engineering and Physics, 2000.
A. Thibon. Meso-scale predictive structural modelling of the lower limb. Masters thesis,
Imperial College of London, 2011.
C.H. Turner, J. Rho, Y. Takano, T.Y. Tsui, and G.M. Pharr. The elastic properties of tra-
becular and cortical bone tissues are similar: results from two microscopic measurement
techniques. Journal of Biomechanics, 1998.
76
J. Wol. The Law of Bone Remodelling. Springer-Verlag, 1987.
77
APPENDICES
The iterative algorithm
1. Lecture of the excel input les
1
2 clear all;
3
4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 %Lecture of the excel files
7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8
9 coor=xlsread(coor.xlsx); %nodes coordinates
10 connec=xlsread(liaison.xlsx); %connectivity table
11 dof=xlsread(dofe.xlsx); %degrees of liberty table
12 %load cases
13 load(:,:,1)=xlsread(forcewalk20.xlsx);
14 load(:,:,2)=xlsread(forcewalk32.xlsx);
15 load(:,:,3)=xlsread(forcewalk52.xlsx);
16 load(:,:,4)=xlsread(forcewalk82.xlsx);
17 load(:,:,5)=xlsread(forcewalk112.xlsx);
18 load(:,:,6)=xlsread(forcewalk132.xlsx);
19 load(:,:,7)=xlsread(forcewalk152.xlsx);
20 load(:,:,8)=xlsread(forcewalk172.xlsx);
21 load(:,:,9)=xlsread(forcewalk192.xlsx);
22 load(:,:,10)=xlsread(forcewalk62.xlsx);
23 load(:,:,11)=xlsread(forcewalk72.xlsx);
24 load(:,:,12)=xlsread(forcewalk90.xlsx);
25 load(:,:,13)=xlsread(forcewalk100.xlsx);
26 load(:,:,14)=xlsread(forcewalk140.xlsx);
27 load(:,:,15)=xlsread(forcewalk145.xlsx);
28 load(:,:,16)=xlsread(forcewalk162.xlsx);
29 load(:,:,17)=xlsread(forcewalk175.xlsx);
30 load(:,:,18)=xlsread(forcewalk180.xlsx);
31 load(:,:,19)=xlsread(forcewalk185.xlsx);
32 load(:,:,20)=xlsread(forcewalk16.xlsx);
33 load(:,:,21)=xlsread(forcewalk22.xlsx);
34 load(:,:,22)=xlsread(forcewalk26.xlsx);
35 load(:,:,23)=xlsread(forcewalk29.xlsx);
36 load(:,:,24)=xlsread(forcewalk35.xlsx);
37 load(:,:,25)=xlsread(forcewalk102.xlsx);
79
38 load(:,:,26)=xlsread(forcewalk105.xlsx);
39 load(:,:,27)=xlsread(forcewalk108.xlsx);
40 load(:,:,28)=xlsread(forcewalk110.xlsx);
41 load(:,:,29)=xlsread(forcestair22.xlsx);
42 load(:,:,30)=xlsread(forcestair39.xlsx);
43 load(:,:,31)=xlsread(forcestair62.xlsx);
44 load(:,:,32)=xlsread(forcestair82.xlsx);
45 load(:,:,33)=xlsread(forcestair102.xlsx);
46 load(:,:,34)=xlsread(forcestair132.xlsx);
47 load(:,:,35)=xlsread(forcestair152.xlsx);
48 load(:,:,36)=xlsread(forcestair172.xlsx);
49 load(:,:,37)=xlsread(forcestair192.xlsx);
50 load(:,:,38)=xlsread(forcesit31.xlsx);
51 load(:,:,39)=xlsread(forcesit51.xlsx);
52 load(:,:,40)=xlsread(forcesit70.xlsx);
53 load(:,:,41)=xlsread(forcesit91.xlsx);
54 load(:,:,42)=xlsread(forcesit111.xlsx);
55 load(:,:,43)=xlsread(forcesit131.xlsx);
56 load(:,:,44)=xlsread(forcesit151.xlsx);
57 load(:,:,45)=xlsread(forcesit171.xlsx);
58 load(:,:,46)=xlsread(forcesit201.xlsx);
59 load(:,:,47)=xlsread(forcestair30.xlsx);
60 load(:,:,48)=xlsread(forcestair50.xlsx);
61 load(:,:,49)=xlsread(forcestair70.xlsx);
62 load(:,:,50)=xlsread(forcestair87.xlsx);
63 load(:,:,51)=xlsread(forcestair94.xlsx);
64 load(:,:,52)=xlsread(forcestair112.xlsx);
65 load(:,:,53)=xlsread(forcestair122.xlsx);
66 load(:,:,54)=xlsread(forcestair142.xlsx);
67 load(:,:,55)=xlsread(forcestair162.xlsx);
68 load(:,:,56)=xlsread(forcestair182.xlsx);
69 load(:,:,57)=xlsread(forcestair202.xlsx);
70 load(:,:,58)=xlsread(forcesit21.xlsx);
71 load(:,:,59)=xlsread(forcesit41.xlsx);
72 load(:,:,60)=xlsread(forcesit57.xlsx);
73 load(:,:,61)=xlsread(forcesit65.xlsx);
74 load(:,:,62)=xlsread(forcesit80.xlsx);
75 load(:,:,63)=xlsread(forcesit101.xlsx);
76 load(:,:,64)=xlsread(forcesit121.xlsx);
77 load(:,:,65)=xlsread(forcesit141.xlsx);
78 load(:,:,66)=xlsread(forcesit161.xlsx);
79 load(:,:,67)=xlsread(forcesit181.xlsx);
80 load(:,:,68)=xlsread(forcesit191.xlsx);
80
2. Denition of the problem parameters
1 %Problem Parameters
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3
4 %Number of elements
5 Ne=119;
6 %Number of nodes
7 Nn=119;
8 %Number of unknows
9 Ndof=708;
10 %Number of variable
11 Nvariable=Nn*6;
12 %Number of elements composing the femur
13 Nfemur=33;
14
15 %element length
16 for e=1:Ne,
17 nodes=connec(e,:);
18 Le(1,e)=sqrt((coor(nodes(2),1)-coor(nodes(1),1))^2 + ...
19 (coor(nodes(2),2)-coor(nodes(1),2))^2 + ...
20 (coor(nodes(2),3)-coor(nodes(1),3))^2);
21 end
22
23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
24 %General Material properties
25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26
27 %Young Modulus
28 E=zeros(1,Ne);
29 for e=1:Nfemur,
30 E(1,e)=18000;
31 end
32 for e=(Nfemur+1):Ne,
33 E(1,e)=18000000;
34 end
35
36 %Poissons ratio
37 nu=0.3;
38
39 %Shear Modulus
40 G=zeros(1,Ne);
41 for e=1:Nfemur,
42 G(1,e)=E(1,e)/(2*(1+nu));
43 end
44 for e=(Nfemur+1):Ne,
81
45 G(1,e)=E(1,e)/(2*(1+nu));
46 end
47
48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49 %External forces
50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51
52 for i=1:68,
53 for e=1:Ne,
54 f(:,e,i)=[load(e,1,i);load(e,2,i);load(e,3,i);load(e,4,i);load(e,5,i);...
55 load(e,6,i);load(e,7,i);load(e,8,i);load(e,9,i);load(e,10,i);...
56 load(e,11,i);load(e,12,i)];
57 end
58 end
59
60 %target strain
61 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62
63 targetstrain=1250*10^(-6)*ones(1,Nfemur);
64
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3. Initialisation of the algorithm
1
2 %Initialisation of the algorithm
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4
5 %Geometrical parameters
6 for e=1:Ne,
7 t(1,e)=5;
8 Ro1(1,e)=13;
9 Ro2(1,e)=15;
10 end
11
12 %Mechanical properties of the sections
13 A=zeros(1,Ne);
14 Iz1=zeros(1,e);
15 Iy1=zeros(1,Ne);
16 J=zeros(1,Ne);
17
18 for e=1:Ne,
19 A(1,e)=pi*((Ro1(1,e)+t(1,e)/2)*(Ro2(1,e)+t(1,e)/2)) - ...
20 pi*((Ro1(1,e)-t(1,e)/2)*(Ro2(1,e)-t(1,e)/2));
21 Iz1(1,e)=(pi/4)*((Ro2(1,e)+t(1,e)/2)*(Ro1(1,e)+t(1,e)/2)^3) - ...
22 (pi/4)*((Ro2(1,e)-t(1,e)/2)*(Ro1(1,e)-t(1,e)/2)^3);
82
23 Iy1(1,e)=(pi/4)*((Ro2(1,e)+t(1,e)/2)^3*(Ro1(1,e)+t(1,e)/2)) - ...
24 (pi/4)*((Ro2(1,e)-t(1,e)/2)^3*(Ro1(1,e)-t(1,e)/2));
25 p(1,e)=pi*sqrt(2*((Ro2(1,e)+t(1,e)/2)^2+(Ro1(1,e)+t(1,e)/2)^2)-...
26 ((Ro2(1,e)+t(1,e)/2-Ro1(1,e)-t(1,e)/2)^2)/2.2)+...
27 pi*sqrt(2*((Ro2(1,e)-t(1,e)/2)^2+(Ro1(1,e)-t(1,e)/2)^2)-...
28 ((Ro2(1,e)-t(1,e)/2-Ro1(1,e)+t(1,e)/2)^2)/2.2);
29 Zt(1,e)=2*pi*t(1,e)*(Ro2(1,e))*(Ro1(1,e));
30 J(1,e)=(2*Zt(1,e)^2)/(t(1,e)*p(1,e));
31 end
32
33 %limitation values
34 minA=50;
35 minI=500;
36 mint=0.1;
37 maxt=8;
38 minR=12;
39 for e=1:5,
40 maxR(1,e)=30;
41 end
42 for e=6:25,
43 maxR(1,e)=30;
44 end
45 for e=26:33,
46 maxR(1,e)=30;
47 end
4. Optimisation of the angular parameter
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % Optimisation of the angle
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4
5 for i=1:68, %Loop on the load cases
6
7 phi=zeros(1,Ne); %Angle Parameter
8 for e=1:Ne,
9 phi(1,e,1)=0;
10 end
11 j=0;
12 cpt=0;
13 counter=1;
14
15 while(cpt<Nfemur) && (j<50) % loop until the angle parameter is optimised
16 %Determination of the maximum bending strain values associated to all the load
cases for each element
17
83
18 j=j+1;
19
20 %Element stiffness matrix in the principal axes
21
22 for e=1:Ne,
23 k(:,:,e)=[A(1,e)*E(1,e)/Le(1,e) 0 0 0 0 0 -(A(1,e)*E(1,e))/Le(1,e) 0 0 0 0
0;...
24 0 (12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0
(-12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)
^2;...
25 0 0 (12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 0 0
(-12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2
0;...
26 0 0 0 (G(1,e)*J(1,e))/Le(1,e) 0 0 0 0 0 (-G(1,e)*J(1,e))/Le(1,e) 0 0;...
27 0 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (4*E(1,e)*Iy1(1,e))/Le(1,e) 0 0 0
(6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (2*E(1,e)*Iy1(1,e))/Le(1,e) 0;...
28 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (4*E(1,e)*Iz1(1,e))/Le(1,e) 0 (-6*E
(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (2*E(1,e)*Iz1(1,e))/Le(1,e);...
29 -(A(1,e)*E(1,e))/Le(1,e) 0 0 0 0 0 (A(1,e)*E(1,e))/Le(1,e) 0 0 0 0 0;...
30 0 (-12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (-6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0
(12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (-6*E(1,e)*Iz1(1,e))/Le(1,e)
^2;...
31 0 0 (-12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 0 0
(12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0;...
32 0 0 0 (-G(1,e)*J(1,e))/Le(1,e) 0 0 0 0 0 (G(1,e)*J(1,e))/Le(1,e) 0 0;...
33 0 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (2*E(1,e)*Iy1(1,e))/Le(1,e) 0 0 0
(6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (4*E(1,e)*Iy1(1,e))/Le(1,e) 0;...
34 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (2*E(1,e)*Iz1(1,e))/Le(1,e) 0 (-6*E
(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (4*E(1,e)*Iz1(1,e))/Le(1,e)];
35 end
36
37 %Initialisation of Z (rotation matrix from local axis to principal
38 %axis)
39 for e=1:Ne,
40 Z(:,:,e)=[1 0 0;0 1 0;0 0 1];
41 end
42
43 %Rotation matrix from local axes to principal axes
44 a=zeros(1,Ne);
45 if(j>1)
46 s=size(phi);
47 for x=1:s(3),
48 for e=1:Ne,
49 a(1,e)=a(1,e)+phi(1,e,x);
50 end
84
51 end
52 end
53
54 for e=1:Ne,
55 Z(:,:,e)=[1 0 0;0 cosd(a(1,e)) sind(a(1,e));0 -sind(a(1,e)) cosd(a(1,e))]*Z
(:,:,e);
56 end
57
58 %Global rotation matrix from global axes to principal axes
59 globalvector=[1 0 0];
60 for e=1:Ne,
61 nodes=connec(e,:);
62 if coor(nodes(1),1)==coor(nodes(2),1) && coor(nodes(1),2)==coor(nodes(2)
,2)
63 if coor(nodes(2),3)> coor(nodes(1),3)
64 lambda=[0 0 1;0 1 0;-1 0 0];
65 else
66 lambda=[0 0 -1;0 1 0;1 0 0];
67 end
68 else
69 CXx=(coor(nodes(2),1) - coor(nodes(1),1))/Le(1,e);
70 CYx=(coor(nodes(2),2) - coor(nodes(1),2))/Le(1,e);
71 CZx=(coor(nodes(2),3) - coor(nodes(1),3))/Le(1,e);
72 D=sqrt(CXx*CXx+CYx*CYx);
73 CXy=-CYx/D;
74 CYy=CXx/D;
75 CZy=0;
76 CXz=-CXx*CZx/D;
77 CZz=D;
78 CYz=-CYx*CZx/D;
79 lambda=[CXx CYx CZx;CXy CYy CZy;CXz CYz CZz];
80 end
81
82
83 R(:,:,e)=[Z(:,:,e)*lambda zeros(3,9);zeros(3) Z(:,:,e)*lambda zeros(3,6);...
84 zeros(3,6) Z(:,:,e)*lambda zeros(3);zeros(3,9) Z(:,:,e)*lambda];
85
86 kdash(1:12,1:12,e)=R(:,:,e)*k(:,:,e)*R(:,:,e);
87
88 end
89
90 %Stiffness Matrix assemblage
91 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
92
93 %Initialisation
85
94 K=zeros(Ndof,Ndof);
95 F=zeros(Ndof,1);
96 displge=zeros(Nn,6);
97
98 Fext=zeros(Ndof,1);
99
100
101 for e=1:Ne,
102 nodes=connec(e,:);
103 dofe=dof(nodes,:);
104 dofe=reshape(dofe,[1,12]);
105 pe=find(dofe>0);
106 Ie=dofe(pe);
107 K(Ie,Ie)=K(Ie,Ie)+kdash(pe,pe,e);
108 pe_Ude=find(dofe<0);
109 Ie_Ude=-dofe(pe_Ude);
110 Ude=displge(Ie_Ude);
111 F(Ie)=F(Ie)-kdash(pe,pe_Ude,e)*Ude;
112 end
113
114 %Exterior Forces Assemblage
115 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
116
117 for e=1:Ne,
118 nodes=connec(e,:);
119 dofe=dof(nodes,:);
120 dofe=reshape(dofe,[1,12]);
121 pe=find(dofe>0);
122 Ie=dofe(pe);
123 Fext(Ie,1)=Fext(Ie,1)+f(pe,e,i);
124 end
125
126 Ft=Fext+F;
127
128 %Resolution
129 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
130
131 U=K\Ft;
132
133 %Displacements
134 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
135 displ1=zeros(Nn,6);
136 ic=find(dof>0);
137 displ1(ic)=U(dof(ic));
138
86
139 d1=reshape(displ1,[Nvariable,1]);
140
141 z=1; %Displacements in the local axis
142 for e=1:Nfemur,
143 dep(:,:,e)=d1(z:z+11,1);
144 dep(:,1,e)=R(:,:,e)*dep(:,1,e);
145 z=z+6;
146 end
147
148 %Strain Computations
149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
150
151
152 curvez=zeros(1,Nfemur);
153 for e=1:Nfemur,
154 curvez(1,e)=(dep(12,1,e)-dep(6,1,e))/Le(1,e);
155 end
156
157
158
159 curvey=zeros(1,Nfemur);
160 for e=1:Nfemur,
161 curvey(1,e)=(dep(11,1,e)-dep(5,1,e))/Le(1,e);
162 end
163
164
165 %Looking for the maximum bending strain
166 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167
168 counter=counter+1;
169
170 for e=1:Nfemur,
171 bendingstrainmax1=0;
172 anglemax=0;
173 theta=0;
174 c=Ro1(1,e)+t(1,e)/2;
175 b=Ro2(1,e)+t(1,e)/2;
176
177 while(theta<=360) %Loop on the general parameter theta to describe the
178 y=c*cosd(theta); %hollow elliptical section
179 z=b*sind(theta);
180 X=curvey(1,e)*z-curvez(1,e)*y;
181 if(X>bendingstrainmax1)
182 bendingstrainmax1=X;
183 anglemax=theta;
87
184 end
185 theta=theta+0.1;
186 end
187 phi(1,e,counter)=anglemax-90;
188 bendingstrainmax(1,e,i)=bendingstrainmax1; %Determination of the
189 % maximum bending strain value
190 end
191
192 %Check for the convergence
193 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
194
195 cpt=0;
196
197 for e=1:Nfemur,
198 if ((phi(1,e,counter)>359.89999) || ((phi(1,e,counter)<0.100001)&&(phi(1,
e,counter)>0))) || ...
199 ((phi(1,e,counter)>-0.100001) && (phi(1,e,counter)<0))
200 cpt=cpt+1;
201 end
202 end
203 end
204
205 end
206
207 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
208 %Determining the maximum bending strain for one element for all the load
209 %cases
210
211 for e=1:Nfemur,
212
213 M=0;
214
215 for i=1:68,
216 M=[M bendingstrainmax(1,e,i)]; %Looking for the maximum value among
217 % the maximum bending strain values for one
218 % element
219 end
220
221 [X,W]=max(M);
222
223 indic(1,e)=W-1;
224 end
225
226 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
227
88
228 angle=zeros(1,Ne);
229
230 for e1=1:Nfemur, %Loop on the elements
231 phi=zeros(1,Ne);
232 for e=1:Ne,
233 phi(1,e,1)=0;
234 end
235 j=0;
236 cpt=0;
237 counter=1;
238
239 while(cpt<Nfemur) && (j<50) %Loop until the parameter is optimised for each of
240 %the elements
241
242 j=j+1;
243
244 for e=1:Ne,
245 k(:,:,e)=[A(1,e)*E(1,e)/Le(1,e) 0 0 0 0 0 -(A(1,e)*E(1,e))/Le(1,e) 0 0 0 0
0;...
246 0 (12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0
(-12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)
^2;...
247 0 0 (12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 0 0
(-12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2
0;...
248 0 0 0 (G(1,e)*J(1,e))/Le(1,e) 0 0 0 0 0 (-G(1,e)*J(1,e))/Le(1,e) 0 0;...
249 0 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (4*E(1,e)*Iy1(1,e))/Le(1,e) 0 0 0
(6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (2*E(1,e)*Iy1(1,e))/Le(1,e) 0;...
250 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (4*E(1,e)*Iz1(1,e))/Le(1,e) 0 (-6*E
(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (2*E(1,e)*Iz1(1,e))/Le(1,e);...
251 -(A(1,e)*E(1,e))/Le(1,e) 0 0 0 0 0 (A(1,e)*E(1,e))/Le(1,e) 0 0 0 0 0;...
252 0 (-12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (-6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0
(12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (-6*E(1,e)*Iz1(1,e))/Le(1,e)
^2;...
253 0 0 (-12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 0 0
(12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0;...
254 0 0 0 (-G(1,e)*J(1,e))/Le(1,e) 0 0 0 0 0 (G(1,e)*J(1,e))/Le(1,e) 0 0;...
255 0 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (2*E(1,e)*Iy1(1,e))/Le(1,e) 0 0 0
(6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (4*E(1,e)*Iy1(1,e))/Le(1,e) 0;...
256 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (2*E(1,e)*Iz1(1,e))/Le(1,e) 0 (-6*E
(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (4*E(1,e)*Iz1(1,e))/Le(1,e)];
257 end
258
259 %Initialisation of Z (rotation matrix from local axis to principal
260 %axis)
89
261 for e=1:Ne,
262 Z(:,:,e)=[1 0 0;0 1 0;0 0 1];
263 end
264
265 %Rotation matrix from local axes to principal axes
266 a=zeros(1,Ne);
267 if(j>1)
268 s=size(phi);
269 for x=1:s(3),
270 for e=1:Ne,
271 a(1,e)=a(1,e)+phi(1,e,x);
272 end
273 end
274 end
275
276 for e=1:Ne,
277 Z(:,:,e)=[1 0 0;0 cosd(a(1,e)) sind(a(1,e));0 -sind(a(1,e)) cosd(a(1,e))]*Z
(:,:,e);
278 end
279
280 %Global rotation matrix from global axes to principal axes
281 globalvector=[1 0 0];
282 for e=1:Ne,
283 nodes=connec(e,:);
284 if coor(nodes(1),1)==coor(nodes(2),1) && coor(nodes(1),2)==coor(nodes(2)
,2)
285 if coor(nodes(2),3)> coor(nodes(1),3)
286 lambda=[0 0 1;0 1 0;-1 0 0];
287 else
288 lambda=[0 0 -1;0 1 0;1 0 0];
289 end
290 else
291 CXx=(coor(nodes(2),1) - coor(nodes(1),1))/Le(1,e);
292 CYx=(coor(nodes(2),2) - coor(nodes(1),2))/Le(1,e);
293 CZx=(coor(nodes(2),3) - coor(nodes(1),3))/Le(1,e);
294 D=sqrt(CXx*CXx+CYx*CYx);
295 CXy=-CYx/D;
296 CYy=CXx/D;
297 CZy=0;
298 CXz=-CXx*CZx/D;
299 CZz=D;
300 CYz=-CYx*CZx/D;
301 lambda=[CXx CYx CZx;CXy CYy CZy;CXz CYz CZz];
302 end
303
90
304
305 R(:,:,e)=[Z(:,:,e)*lambda zeros(3,9);zeros(3) Z(:,:,e)*lambda zeros(3,6);...
306 zeros(3,6) Z(:,:,e)*lambda zeros(3);zeros(3,9) Z(:,:,e)*lambda];
307
308 kdash(1:12,1:12,e)=R(:,:,e)*k(:,:,e)*R(:,:,e);
309
310 end
311
312 %Stiffness Matrix assemblage
313 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
314
315 %Initialisation
316 K=zeros(Ndof,Ndof);
317 F=zeros(Ndof,1);
318 Fext=zeros(Ndof,1);
319 displ=zeros(Nn,6);
320
321 for e=1:Ne,
322 nodes=connec(e,:);
323 dofe=dof(nodes,:);
324 dofe=reshape(dofe,[1,12]);
325 pe=find(dofe>0);
326 Ie=dofe(pe);
327 K(Ie,Ie)=K(Ie,Ie)+kdash(pe,pe,e);
328 pe_Ude=find(dofe<0);
329 Ie_Ude=-dofe(pe_Ude);
330 Ude=displ(Ie_Ude);
331 F(Ie)=F(Ie)-kdash(pe,pe_Ude,e)*Ude;
332 end
333
334 %Exterior Forces Assemblage
335 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
336
337 for e=1:Ne,
338 nodes=connec(e,:);
339 dofe=dof(nodes,:);
340 dofe=reshape(dofe,[1,12]);
341 pe=find(dofe>0);
342 Ie=dofe(pe);
343 Fext(Ie,1)=Fext(Ie,1)+f(pe,e,indic(1,e1));
344 end
345
346 Ft = Fext + F;
347
348 %Resolution
91
349 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
350
351 U=K\Ft;
352
353 %Displacements
354 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
355
356 ic=find(dof>0);
357 displ(ic)=U(dof(ic));
358 d=reshape(displ,[Nvariable,1]);
359
360 z=1;
361 for e=1:Nfemur,
362 dep(:,:,e)=d(z:z+11,1);
363 dep(:,1,e)=R(:,:,e)*dep(:,1,e);
364 z=z+6;
365 end
366
367 %Strain Computations
368 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
369
370 %Axial strain
371 axialstrain=zeros(1,Nfemur);
372 for e=1:Nfemur,
373 axialstrain(1,e)=(dep(7,1,e)-dep(1,1,e))/Le(1,e);
374 end
375
376 %Bending strain
377 curvey=zeros(1,Nfemur);
378 curvez=zeros(1,Nfemur);
379 for e=1:Nfemur,
380 curvey(1,e)=(dep(11,1,e) - dep(5,1,e))/Le(1,e);
381 curvez(1,e)=(dep(12,1,e) - dep(6,1,e))/Le(1,e);
382 end
383
384 %Looking for the maximum bending strain
385 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
386
387 counter=counter+1;
388
389 for e=1:Nfemur,
390 bendingstrainmax1=0;
391 anglemax=0;
392 theta=0;
393 c=Ro1(1,e)+t(1,e)/2;
92
394 b=Ro2(1,e)+t(1,e)/2;
395
396 while (theta<=360)
397 y=c*cosd(theta);
398 z=b*sind(theta);
399 X=+curvey(1,e)*z-curvez(1,e)*(y);
400 if(X>bendingstrainmax1)
401 bendingstrainmax1=X;
402 anglemax=theta;
403 end
404 theta=theta+0.1;
405 end
406 phi(1,e,counter)=anglemax-90;
407 if(bendingstrainmax(1,e1,indic(e1))==bendingstrainmax1)
408 333 %Test
409 end
410
411 end
412
413 %Check for the convergence
414 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
415
416 cpt=0;
417
418 for e=1:Nfemur,
419 if ((phi(1,e,counter)>359.89999) || ((phi(1,e,counter)<0.100001)&&(phi(1,
e,counter)>0))) || ...
420 ((phi(1,e,counter)>-0.100001) && (phi(1,e,counter)<0))
421 cpt=cpt+1;
422 end
423 end
424 end
425
426 a=zeros(1,Ne);
427 s=size(phi);
428 for x=1:s(3),
429 for e=1:Ne,
430 a(1,e)=a(1,e)+phi(1,e,x);
431 end
432 end
433 angle(1,e1)=a(1,e1); % The optimised parameter phi for the element e1.
434
435 end
93
5. Fixing the parameter
1
2 %Initialisation of Z (rotation matrix from local axis to principal
3 %axis)
4 for e=1:Ne,
5 Z(:,:,e)=[1 0 0;0 1 0;0 0 1];
6 end
7
8
9 for e=1:Ne,
10 Z(:,:,e)=[1 0 0;0 cosd(angle(1,e)) sind(angle(1,e));0 -sind(angle(1,e)) cosd
(angle(1,e))]*Z(:,:,e);
11 end
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6. Optimising the parameters R
1
, R
2
and t
1 %Optimisation of the parameters Ro1, Ro2 and t
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3
4 %Initialisation of the loop
5 j=0;
6 cpt=0;
7
8
9 while (j<200) % Number of iterations (can be changed)
10
11 j=j+1;
12
13 for i=1:68, %Loop on the load cases
14
15 %Element stiffness matrix in the principal axes
16
17 for e=1:Ne,
18 k(:,:,e)=[A(1,e)*E(1,e)/Le(1,e) 0 0 0 0 0 -(A(1,e)*E(1,e))/Le(1,e) 0 0 0 0
0;...
19 0 (12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0
(-12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)
^2;...
20 0 0 (12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 0 0
(-12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2
0;...
21 0 0 0 (G(1,e)*J(1,e))/Le(1,e) 0 0 0 0 0 (-G(1,e)*J(1,e))/Le(1,e) 0 0;...
22 0 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (4*E(1,e)*Iy1(1,e))/Le(1,e) 0 0 0
(6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (2*E(1,e)*Iy1(1,e))/Le(1,e) 0;...
94
23 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (4*E(1,e)*Iz1(1,e))/Le(1,e) 0 (-6*E
(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (2*E(1,e)*Iz1(1,e))/Le(1,e);...
24 -(A(1,e)*E(1,e))/Le(1,e) 0 0 0 0 0 (A(1,e)*E(1,e))/Le(1,e) 0 0 0 0 0;...
25 0 (-12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (-6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0
(12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (-6*E(1,e)*Iz1(1,e))/Le(1,e)
^2;...
26 0 0 (-12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 0 0
(12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0;...
27 0 0 0 (-G(1,e)*J(1,e))/Le(1,e) 0 0 0 0 0 (G(1,e)*J(1,e))/Le(1,e) 0 0;...
28 0 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (2*E(1,e)*Iy1(1,e))/Le(1,e) 0 0 0
(6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (4*E(1,e)*Iy1(1,e))/Le(1,e) 0;...
29 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (2*E(1,e)*Iz1(1,e))/Le(1,e) 0 (-6*E
(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (4*E(1,e)*Iz1(1,e))/Le(1,e)];
30 end
31
32 %Global rotation matrix from global axes to principal axes
33 globalvector=[1 0 0];
34 for e=1:Ne,
35 nodes=connec(e,:);
36 if coor(nodes(1),1)==coor(nodes(2),1) && coor(nodes(1),2)==coor(nodes(2)
,2)
37 if coor(nodes(2),3)> coor(nodes(1),3)
38 lambda=[0 0 1;0 1 0;-1 0 0];
39 else
40 lambda=[0 0 -1;0 1 0;1 0 0];
41 end
42 else
43 CXx=(coor(nodes(2),1) - coor(nodes(1),1))/Le(1,e);
44 CYx=(coor(nodes(2),2) - coor(nodes(1),2))/Le(1,e);
45 CZx=(coor(nodes(2),3) - coor(nodes(1),3))/Le(1,e);
46 D=sqrt(CXx*CXx+CYx*CYx);
47 CXy=-CYx/D;
48 CYy=CXx/D;
49 CZy=0;
50 CXz=-CXx*CZx/D;
51 CZz=D;
52 CYz=-CYx*CZx/D;
53 lambda=[CXx CYx CZx;CXy CYy CZy;CXz CYz CZz];
54 end
55
56
57 R(:,:,e)=[Z(:,:,e)*lambda zeros(3,9);zeros(3) Z(:,:,e)*lambda zeros(3,6);...
58 zeros(3,6) Z(:,:,e)*lambda zeros(3);zeros(3,9) Z(:,:,e)*lambda];
59
60 kdash(1:12,1:12,e)=R(:,:,e)*k(:,:,e)*R(:,:,e);
95
61
62 end
63
64 %Stiffness Matrix assemblage
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66
67 %Initialisation
68 K=zeros(Ndof,Ndof);
69 F=zeros(Ndof,1);
70 displge=zeros(Nn,6);
71
72 Fext=zeros(Ndof,1);
73
74 for e=1:Ne,
75 nodes=connec(e,:);
76 dofe=dof(nodes,:);
77 dofe=reshape(dofe,[1,12]);
78 pe=find(dofe>0);
79 Ie=dofe(pe);
80 K(Ie,Ie)=K(Ie,Ie)+kdash(pe,pe,e);
81 pe_Ude=find(dofe<0);
82 Ie_Ude=-dofe(pe_Ude);
83 Ude=displge(Ie_Ude);
84 F(Ie)=F(Ie)-kdash(pe,pe_Ude,e)*Ude;
85 end
86
87 %Exterior Forces Assemblage
88 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
89
90 for e=1:Ne,
91 nodes=connec(e,:);
92 dofe=dof(nodes,:);
93 dofe=reshape(dofe,[1,12]);
94 pe=find(dofe>0);
95 Ie=dofe(pe);
96 Fext(Ie,1)=Fext(Ie,1)+f(pe,e,i);
97 end
98
99 Ft=Fext+F;
100
101 %Resolution
102 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103
104 U=K\Ft;
105
96
106 %Displacements
107 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108 displ1=zeros(Nn,6);
109
110 ic=find(dof>0);
111
112 displ1(ic)=U(dof(ic));
113
114 d1=reshape(displ1,[Nvariable,1]);
115
116
117 z=1;
118 for e=1:Nfemur,
119 dep(:,:,e)=d1(z:z+11,1);
120 dep(:,1,e)=R(:,:,e)*dep(:,1,e);
121 z=z+6;
122 end
123
124 %Strain Computations
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
126
127
128 curvez=zeros(1,Nfemur);
129 for e=1:Nfemur,
130 curvez(1,e)=(dep(12,1,e)-dep(6,1,e))/Le(1,e);
131 end
132
133
134
135 curvey=zeros(1,Nfemur);
136 for e=1:Nfemur,
137 curvey(1,e)=(dep(11,1,e)-dep(5,1,e))/Le(1,e);
138 end
139
140
141 %Looking for the maximum bending strain for each element
142 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
143
144
145 for e=1:Nfemur,
146 bendingstrainmax1=0;
147 anglemax=0;
148 theta=0;
149 c=Ro1(1,e)+t(1,e)/2;
150 b=Ro2(1,e)+t(1,e)/2;
97
151
152 while(theta<=360)
153 y=c*cosd(theta);
154 z=b*sind(theta);
155 X=curvey(1,e)*z-curvez(1,e)*y;
156 if(X>bendingstrainmax1)
157 bendingstrainmax1=X;
158 abs1(1,e)=y;
159 ord1(1,e)=z;
160 end
161 theta=theta+5; % Can be changed to reduce the computational time
162 end
163 end
164
165 %Strain Computations
166 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167
168 axialstrain(:,:)=zeros(1,Nfemur);
169 for e=1:Nfemur,
170 axialstrain(1,e)=(dep(7,1,e)-dep(1,1,e))/Le(1,e);
171 end
172
173
174 bendingstrainz1(:,:)=zeros(1,Nfemur);
175 curvez(:,:)=zeros(1,Nfemur);
176 for e=1:Nfemur,
177 curvez(1,e)=(dep(12,1,e)-dep(6,1,e))/Le(1,e);
178 bendingstrainz1(1,e)=-curvez(1,e)*abs1(1,e);
179 end
180
181
182 bendingstrainy1(:,:)=zeros(1,Nfemur);
183 curvey(:,:)=zeros(1,Nfemur);
184 for e=1:Nfemur,
185 curvey(1,e)=(dep(11,1,e)-dep(5,1,e))/Le(1,e);
186 bendingstrainy1(1,e)=curvey(1,e)*ord1(1,e);
187 end
188
189 totalbendingstrain1=zeros(1,Nfemur);
190 for e=1:Nfemur,
191 totalbendingstrain1(1,e)=bendingstrainz1(1,e)+bendingstrainy1(1,e);
192 end
193
194
195
98
196 %Optimisation on three strages
197 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
198
199 %optimisation of t based on the axial strain
200
201 if (mod(j,3)==0)
202
203 totalstrain=zeros(1,Nfemur);
204
205 for e=1:Nfemur,
206 totalstrain(1,e)=axialstrain(1,e)+totalbendingstrain1(1,e);
207 targetaxialstrain(1,e)=abs((targetstrain(1,e)*axialstrain(1,e))/(
totalstrain(1,e))); %target axial strain
208
209 difference=targetaxialstrain(1,e)-abs(axialstrain(1,e));
210 tol=0.05*targetaxialstrain(1,e);
211 if(difference<-tol)
212 Ra(1,e)=targetaxialstrain(1,e)/abs(axialstrain(1,e));
213 A1(1,e)=max(max(A(1,e)/Ra(1,e),A(1,e)/2),minA);
214 end
215
216 if(difference>tol)
217 Ra(1,e)=targetaxialstrain(1,e)/abs(axialstrain(1,e));
218 A1(1,e)=max(max(A(1,e)/Ra(1,e),A(1,e)/2),minA);
219 end
220
221 if((difference>-tol) && (difference<tol)) || (difference==0)
222 A1(1,e,i)=A(1,e);
223 end
224
225 X=newtonaire(t(1,e),0.001,A1(1,e),Ro1(1,e),Ro2(1,e)); %Newton Method
to solve the equation
226 if(X>maxt)
227 t1(1,e,i)=maxt;
228 end
229 if(X<mint)
230 t1(1,e,i)=mint;
231 end
232 if(X<maxt) && (X>mint)
233 t1(1,e,i)=X;
234 end
235
236 end
237 end
238
99
239 %Optimisation of Ro2 based on the bending strain about y1
240
241 if (mod(j,3)==2)
242
243 totalstrain=zeros(1,Nfemur);
244
245 for e=1:Nfemur,
246 totalstrain(1,e)=axialstrain(1,e)+totalbendingstrain1(1,e);
247 targettotalbendingstrain1(1,e)=abs((targetstrain(1,e)*
totalbendingstrain1(1,e))/(totalstrain(1,e))); %target value
248 targetbendingstrainy1(1,e)=abs((bendingstrainy1(1,e)*
targettotalbendingstrain1(1,e))/(totalbendingstrain1(1,e))); %
target value
249
250 difference=targetbendingstrainy1(1,e)-abs(bendingstrainy1(1,e));
251 tol=0.05*targetbendingstrainy1(1,e);
252 if(difference<-tol)
253 Rb1(1,e)=targetbendingstrainy1(1,e)/abs(bendingstrainy1(1,e));
254 Iy1t(1,e)=max(max(Iy1(1,e)/Rb1(1,e),Iy1(1,e)/2),minI);
255 end
256
257 if(difference>tol)
258 Rb1(1,e)=targetbendingstrainy1(1,e)/abs(bendingstrainy1(1,e));
259 Iy1t(1,e)=max(max(Iy1(1,e)/Rb1(1,e),Iy1(1,e)/2),minI);
260 end
261
262 if((difference>-tol) && (difference<tol)) || (difference==0)
263 Iy1t(1,e)=Iy1(1,e);
264 end
265
266 X=newtonbendingy1(Ro2(1,e),0.001,Iy1t(1,e),Ro1(1,e),t(1,e));
267 if(X>maxR(1,e))
268 Ro2t(1,e,i)=maxR(1,e);
269 end
270 if(X<minR)
271 Ro2t(1,e,i)=minR;
272 end
273 if(X<maxR(1,e)) && (X>minR)
274 Ro2t(1,e,i)=X;
275 end
276
277 end
278 end
279
280
100
281 %Optimisation of Ro1 based on the bending strain about z1
282
283 if (mod(j,3)==1)
284
285 totalstrain=zeros(1,Nfemur);
286
287 for e=1:Nfemur,
288 totalstrain(1,e)=axialstrain(1,e)+totalbendingstrain1(1,e);
289 targettotalbendingstrain1(1,e)=abs((targetstrain(1,e)*
totalbendingstrain1(1,e))/(totalstrain(1,e))); %target value
290 targetbendingstrainz1(1,e)=abs((bendingstrainz1(1,e)*
targettotalbendingstrain1(1,e))/(totalbendingstrain1(1,e)));%
target value
291
292 difference=targetbendingstrainz1(1,e)-abs(bendingstrainz1(1,e));
293 tol=0.05*targetbendingstrainz1(1,e);
294 if(difference<-tol)
295 Rb1(1,e)=targetbendingstrainz1(1,e)/abs(bendingstrainz1(1,e));
296 Iz1t(1,e)=max(max(Iz1(1,e)/Rb1(1,e),Iz1(1,e)/2),minI);
297 end
298
299 if(difference>tol)
300 Rb1(1,e)=targetbendingstrainz1(1,e)/abs(bendingstrainz1(1,e));
301 Iz1t(1,e)=max(max(Iz1(1,e)/Rb1(1,e),Iz1(1,e)/2),minI);
302 end
303
304 if((difference>-tol) && (difference<tol)) || (difference==0)
305 Iz1t(1,e)=Iz1(1,e);
306 end
307
308 X=newtonbendingz1(Ro1(1,e),0.001,Iz1t(1,e),Ro2(1,e),t(1,e));
309 if(X>maxR(1,e))
310 Ro1t(1,e,i)=maxR(1,e);
311 end
312 if(X<minR)
313 Ro1t(1,e,i)=minR;
314 end
315 if(X<maxR(1,e)) && (X>minR)
316 Ro1t(1,e,i)=X;
317 end
318
319 end
320 end
321
322 end
101
323
324 if(mod(j,3)==0) %Determination of the maximum value of t for each of the element
325 for e=1:Nfemur,
326 M=0;
327 for i=1:68,
328 M=[M t1(1,e,i)];
329 end
330 t(1,e)=max(M);
331
332 A(1,e)=pi*((Ro1(1,e)+t(1,e)/2)*(Ro2(1,e)+t(1,e)/2)) - ...
333 pi*((Ro1(1,e)-t(1,e)/2)*(Ro2(1,e)-t(1,e)/2));
334 Iz1(1,e)=(pi/4)*((Ro2(1,e)+t(1,e)/2)*(Ro1(1,e)+t(1,e)/2)^3) - ...
335 (pi/4)*((Ro2(1,e)-t(1,e)/2)*(Ro1(1,e)-t(1,e)/2)^3);
336 Iy1(1,e)=(pi/4)*((Ro2(1,e)+t(1,e)/2)^3*(Ro1(1,e)+t(1,e)/2)) - ...
337 (pi/4)*((Ro2(1,e)-t(1,e)/2)^3*(Ro1(1,e)-t(1,e)/2));
338 p(1,e)=pi*sqrt(2*((Ro2(1,e)+t(1,e)/2)^2+(Ro1(1,e)+t(1,e)/2)^2)-...
339 ((Ro2(1,e)+t(1,e)/2-Ro1(1,e)-t(1,e)/2)^2)/2.2)+...
340 pi*sqrt(2*((Ro2(1,e)-t(1,e)/2)^2+(Ro1(1,e)-t(1,e)/2)^2)-...
341 ((Ro2(1,e)-t(1,e)/2-Ro1(1,e)+t(1,e)/2)^2)/2.2);
342 Zt(1,e)=2*pi*t(1,e)*(Ro2(1,e))*(Ro1(1,e));
343 J(1,e)=(2*Zt(1,e)^2)/(t(1,e)*p(1,e));
344
345 end
346 end
347
348 if(mod(j,3)==1) %Determination of the maximum value of Ro1 for each of the
element
349 for e=1:Nfemur,
350 M=0;
351 for i=1:68,
352 M=[M Ro1t(1,e,i)];
353 end
354 Ro1(1,e)=max(M);
355
356 A(1,e)=pi*((Ro1(1,e)+t(1,e)/2)*(Ro2(1,e)+t(1,e)/2)) - ...
357 pi*((Ro1(1,e)-t(1,e)/2)*(Ro2(1,e)-t(1,e)/2));
358 Iz1(1,e)=(pi/4)*((Ro2(1,e)+t(1,e)/2)*(Ro1(1,e)+t(1,e)/2)^3) - ...
359 (pi/4)*((Ro2(1,e)-t(1,e)/2)*(Ro1(1,e)-t(1,e)/2)^3);
360 Iy1(1,e)=(pi/4)*((Ro2(1,e)+t(1,e)/2)^3*(Ro1(1,e)+t(1,e)/2)) - ...
361 (pi/4)*((Ro2(1,e)-t(1,e)/2)^3*(Ro1(1,e)-t(1,e)/2));
362 p(1,e)=pi*sqrt(2*((Ro2(1,e)+t(1,e)/2)^2+(Ro1(1,e)+t(1,e)/2)^2)-...
363 ((Ro2(1,e)+t(1,e)/2-Ro1(1,e)-t(1,e)/2)^2)/2.2)+...
364 pi*sqrt(2*((Ro2(1,e)-t(1,e)/2)^2+(Ro1(1,e)-t(1,e)/2)^2)-...
365 ((Ro2(1,e)-t(1,e)/2-Ro1(1,e)+t(1,e)/2)^2)/2.2);
366 Zt(1,e)=2*pi*t(1,e)*(Ro2(1,e))*(Ro1(1,e));
102
367 J(1,e)=(2*Zt(1,e)^2)/(t(1,e)*p(1,e));
368
369 end
370 end
371
372 if(mod(j,3)==2) %Determination of the maximum value of Ro3 for each of the
element
373 for e=1:Nfemur,
374 M=0;
375 for i=1:68,
376 M=[M Ro2t(1,e,i)];
377 end
378 Ro2(1,e)=max(M);
379
380 A(1,e)=pi*((Ro1(1,e)+t(1,e)/2)*(Ro2(1,e)+t(1,e)/2)) - ...
381 pi*((Ro1(1,e)-t(1,e)/2)*(Ro2(1,e)-t(1,e)/2));
382 Iz1(1,e)=(pi/4)*((Ro2(1,e)+t(1,e)/2)*(Ro1(1,e)+t(1,e)/2)^3) - ...
383 (pi/4)*((Ro2(1,e)-t(1,e)/2)*(Ro1(1,e)-t(1,e)/2)^3);
384 Iy1(1,e)=(pi/4)*((Ro2(1,e)+t(1,e)/2)^3*(Ro1(1,e)+t(1,e)/2)) - ...
385 (pi/4)*((Ro2(1,e)-t(1,e)/2)^3*(Ro1(1,e)-t(1,e)/2));
386 p(1,e)=pi*sqrt(2*((Ro2(1,e)+t(1,e)/2)^2+(Ro1(1,e)+t(1,e)/2)^2)-...
387 ((Ro2(1,e)+t(1,e)/2-Ro1(1,e)-t(1,e)/2)^2)/2.2)+...
388 pi*sqrt(2*((Ro2(1,e)-t(1,e)/2)^2+(Ro1(1,e)-t(1,e)/2)^2)-...
389 ((Ro2(1,e)-t(1,e)/2-Ro1(1,e)+t(1,e)/2)^2)/2.2);
390 Zt(1,e)=2*pi*t(1,e)*(Ro2(1,e))*(Ro1(1,e));
391 J(1,e)=(2*Zt(1,e)^2)/(t(1,e)*p(1,e));
392
393 end
394 end
395
396 end
7. Final loop to check if the strains lie in the lazy zone
1 %Final loop
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3
4
5 for i=1:68,
6 j=0;
7 cpt=0;
8 counter=1;
9
10 %Element stiffness matrix in the principal axes
11
12 for e=1:Ne,
103
13 k(:,:,e)=[A(1,e)*E(1,e)/Le(1,e) 0 0 0 0 0 -(A(1,e)*E(1,e))/Le(1,e) 0 0 0 0
0;...
14 0 (12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0
(-12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)
^2;...
15 0 0 (12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 0 0
(-12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2
0;...
16 0 0 0 (G(1,e)*J(1,e))/Le(1,e) 0 0 0 0 0 (-G(1,e)*J(1,e))/Le(1,e) 0 0;...
17 0 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (4*E(1,e)*Iy1(1,e))/Le(1,e) 0 0 0
(6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (2*E(1,e)*Iy1(1,e))/Le(1,e) 0;...
18 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (4*E(1,e)*Iz1(1,e))/Le(1,e) 0 (-6*E
(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (2*E(1,e)*Iz1(1,e))/Le(1,e);...
19 -(A(1,e)*E(1,e))/Le(1,e) 0 0 0 0 0 (A(1,e)*E(1,e))/Le(1,e) 0 0 0 0 0;...
20 0 (-12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (-6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0
(12*E(1,e)*Iz1(1,e))/Le(1,e)^3 0 0 0 (-6*E(1,e)*Iz1(1,e))/Le(1,e)
^2;...
21 0 0 (-12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 0 0
(12*E(1,e)*Iy1(1,e))/Le(1,e)^3 0 (6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0;...
22 0 0 0 (-G(1,e)*J(1,e))/Le(1,e) 0 0 0 0 0 (G(1,e)*J(1,e))/Le(1,e) 0 0;...
23 0 0 (-6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (2*E(1,e)*Iy1(1,e))/Le(1,e) 0 0 0
(6*E(1,e)*Iy1(1,e))/Le(1,e)^2 0 (4*E(1,e)*Iy1(1,e))/Le(1,e) 0;...
24 0 (6*E(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (2*E(1,e)*Iz1(1,e))/Le(1,e) 0 (-6*E
(1,e)*Iz1(1,e))/Le(1,e)^2 0 0 0 (4*E(1,e)*Iz1(1,e))/Le(1,e)];
25 end
26
27
28 for e=1:Ne,
29 Z(:,:,e)=[1 0 0;0 cosd(angle(1,e)) sind(angle(1,e));0 -sind(angle(1,e)) cosd
(angle(1,e))]*Z(:,:,e);
30 end
31
32 %Global rotation matrix from global axes to principal axes
33 globalvector=[1 0 0];
34 for e=1:Ne,
35 nodes=connec(e,:);
36 if coor(nodes(1),1)==coor(nodes(2),1) && coor(nodes(1),2)==coor(nodes(2)
,2)
37 if coor(nodes(2),3)> coor(nodes(1),3)
38 lambda=[0 0 1;0 1 0;-1 0 0];
39 else
40 lambda=[0 0 -1;0 1 0;1 0 0];
41 end
42 else
43 CXx=(coor(nodes(2),1) - coor(nodes(1),1))/Le(1,e);
104
44 CYx=(coor(nodes(2),2) - coor(nodes(1),2))/Le(1,e);
45 CZx=(coor(nodes(2),3) - coor(nodes(1),3))/Le(1,e);
46 D=sqrt(CXx*CXx+CYx*CYx);
47 CXy=-CYx/D;
48 CYy=CXx/D;
49 CZy=0;
50 CXz=-CXx*CZx/D;
51 CZz=D;
52 CYz=-CYx*CZx/D;
53 lambda=[CXx CYx CZx;CXy CYy CZy;CXz CYz CZz];
54 end
55
56
57 R(:,:,e)=[Z(:,:,e)*lambda zeros(3,9);zeros(3) Z(:,:,e)*lambda zeros(3,6);...
58 zeros(3,6) Z(:,:,e)*lambda zeros(3);zeros(3,9) Z(:,:,e)*lambda];
59
60 kdash(1:12,1:12,e)=R(:,:,e)*k(:,:,e)*R(:,:,e);
61
62 end
63
64 %Stiffness Matrix assemblage
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66
67 %Initialisation
68 K=zeros(Ndof,Ndof);
69 F=zeros(Ndof,1);
70 displge=zeros(Nn,6);
71
72 Fext=zeros(Ndof,1);
73
74
75 for e=1:Ne,
76 nodes=connec(e,:);
77 dofe=dof(nodes,:);
78 dofe=reshape(dofe,[1,12]);
79 pe=find(dofe>0);
80 Ie=dofe(pe);
81 K(Ie,Ie)=K(Ie,Ie)+kdash(pe,pe,e);
82 pe_Ude=find(dofe<0);
83 Ie_Ude=-dofe(pe_Ude);
84 Ude=displge(Ie_Ude);
85 F(Ie)=F(Ie)-kdash(pe,pe_Ude,e)*Ude;
86 end
87
88 %Exterior Forces Assemblage
105
89 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
90
91 for e=1:Ne,
92 nodes=connec(e,:);
93 dofe=dof(nodes,:);
94 dofe=reshape(dofe,[1,12]);
95 pe=find(dofe>0);
96 Ie=dofe(pe);
97 Fext(Ie,1)=Fext(Ie,1)+f(pe,e,i);
98 end
99
100 Ft=Fext+F;
101
102 %Resolution
103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
104
105 U=K\Ft;
106
107 %Displacements
108 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
109 displ1=zeros(Nn,6);
110
111 ic=find(dof>0);
112
113 displ1(ic)=U(dof(ic));
114
115 d1=reshape(displ1,[Nvariable,1]);
116
117
118 z=1;
119 for e=1:Nfemur,
120 dep(:,:,e)=d1(z:z+11,1);
121 dep(:,1,e)=R(:,:,e)*dep(:,1,e);
122 z=z+6;
123 end
124
125 %Strain Computations
126 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127 axialstrain(:,:,i)=zeros(1,Nfemur);
128 for e=1:Nfemur,
129 axialstrain(1,e,i)=(dep(7,1,e)-dep(1,1,e))/Le(1,e);
130 end
131
132 curvez=zeros(1,Nfemur);
133 for e=1:Nfemur,
106
134 curvez(1,e)=(dep(12,1,e)-dep(6,1,e))/Le(1,e);
135 end
136
137 curvey=zeros(1,Nfemur);
138 for e=1:Nfemur,
139 curvey(1,e)=(dep(11,1,e)-dep(5,1,e))/Le(1,e);
140 end
141
142
143 %Looking for the maximum bending strain
144 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
145
146
147 for e=1:Nfemur,
148 bendingstrainmax1=0;
149 anglemax=0;
150 theta=0;
151 c=Ro1(1,e)+t(1,e)/2;
152 b=Ro2(1,e)+t(1,e)/2;
153
154 while(theta<=360)
155 y=c*cosd(theta);
156 z=b*sind(theta);
157 X=curvey(1,e)*z-curvez(1,e)*y;
158 if(X>bendingstrainmax1)
159 bendingstrainmax1=X;
160 anglemax=theta;
161 end
162 theta=theta+5;
163 end
164 bendingstrainmax(1,e,i)=bendingstrainmax1;
165 end
166 end
167
168 %Maximum strain values associated to all the load cases for each of the
169 %element
170
171 for i=1:68,
172 strainmax1(:,:,i)=zeros(1,Nfemur);
173 for e=1:Nfemur,
174 strainmax1(1,e,i)=axialstrain(1,e,i)+bendingstrainmax(1,e,i);
175 end
176 end
177
178 %Determination of the maximum value of the maximum bending strain values
107
179 max1=zeros(1,25);
180 max3=zeros(1,68);
181
182 for e=1:25,
183 M1=0;
184 for i=1:68,
185 M1=[M1 abs(strainmax1(1,e,i))];
186 end
187 max1(1,e)=max(M1);
188 end
189
190 for i=1:68,
191 M3=0;
192 for e=1:25,
193 M3=[M3 abs(strainmax1(1,e,i))];
194 end
195 max3(1,i)=max(M3);
196 end
108
Newton Method
1 function x = newtonaire(x0,eps,A,r1,r2) %To calculate the parameter t from the
area A
2 err=1;
3 xt=x0;x=x0;
4 nb=0;
5
6 while(err>eps)
7 nb=nb+1;
8 x=x-faire(A,r1,r2,x)/dfaire(A,r1,r2,x);
9 err=norm(x-xt);
10 xt=x;
11 end
12
13 function y = faire(A,r1,r2,t)
14 y=pi*(r1+t/2)*(r2+t/2)-pi*(r1-t/2)*(r2-t/2)-A;
15
16 function y = dfaire(A,r1,r2,t)
17 y=(pi/2)*(r2+t/2)+(pi/2)*(r1+t/2)+(pi/2)*(r2-t/2)+(pi/2)*(r1-t/2);
18
19
20
21
22 function x = newtonbendingy1(x0,eps,I1,r,t) %To calculate the parameter R2 from
Iy1
23 err=1;
24 xt=x0;x=x0;
25 nb=0;
26
27 while(err>eps)
28 nb=nb+1;
29 x=x-fbendingy1(r,x,t,I1)/dfbendingy1(r,x,t);
30 err=norm(x-xt);
31 xt=x;
32 end
33
34 function y = fbendingy1(r1,r2,t,I2)
35 y=(pi/4)*(r1+t/2)*(r2+t/2)^3 - (pi/4)*(r1-t/2)*(r2-t/2)^3 - I2;
36
37 function y = dfbendingy1(r1,r2,t)
109
38 y=((3*pi)/4)*(r1+t/2)*(r2+t/2)^2 - ((3*pi)/4)*(r1-t/2)*(r2-t/2)^2;
39
40
41
42
43 function x = newtonbendingz1(x0,eps,I1,r,t) %To optimise the parameter R1 from
Iz1
44 err=1;
45 xt=x0;x=x0;
46 nb=0;
47
48 while(err>eps)
49 nb=nb+1;
50 x=x-fbendingz1(x,r,t,I1)/dfbendingz1(x,r,t);
51 err=norm(x-xt);
52 xt=x;
53 end
54
55 function y = fbendingz1(r1,r2,t,I1)
56 y=(pi/4)*(r2+t/2)*(r1+t/2)^3 - (pi/4)*(r2-t/2)*(r1-t/2)^3 - I1;
57
58 function y = dfbendingz1(r1,r2,t)
59 y=((3*pi)/4)*(r2+t/2)*(r1+t/2)^2 - ((3*pi)/4)*(r2-t/2)*(r1-t/2)^2;
110